工单管理-新增字段

This commit is contained in:
2025-07-15 17:59:57 +08:00
parent af32d62c80
commit 161c54b6ef
2 changed files with 72 additions and 48 deletions

View File

@ -11,13 +11,13 @@ import com.xzzn.common.annotation.Excel;
* 工单主对象 ems_ticket * 工单主对象 ems_ticket
* *
* @author xzzn * @author xzzn
* @date 2025-06-26 * @date 2025-07-15
*/ */
public class EmsTicket extends BaseEntity public class EmsTicket extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** $column.columnComment */ /** */
private String id; private String id;
/** 工单号规则T+日期+6位随机 */ /** 工单号规则T+日期+6位随机 */
@ -44,9 +44,14 @@ public class EmsTicket extends BaseEntity
@Excel(name = "1待处理 2处理中 3已完成") @Excel(name = "1待处理 2处理中 3已完成")
private Long status; private Long status;
/** 期望完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "期望完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date expectedCompleteTime;
/** 完成时间 */ /** 完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date completeTime; private Date completeTime;
/** 处理人ID */ /** 处理人ID */
@ -127,6 +132,16 @@ public class EmsTicket extends BaseEntity
return status; return status;
} }
public void setExpectedCompleteTime(Date expectedCompleteTime)
{
this.expectedCompleteTime = expectedCompleteTime;
}
public Date getExpectedCompleteTime()
{
return expectedCompleteTime;
}
public void setCompleteTime(Date completeTime) public void setCompleteTime(Date completeTime)
{ {
this.completeTime = completeTime; this.completeTime = completeTime;
@ -147,31 +162,34 @@ public class EmsTicket extends BaseEntity
return workUserId; return workUserId;
} }
public Long getIsDelete() { public void setIsDelete(Long isDelete)
return isDelete; {
this.isDelete = isDelete;
} }
public void setIsDelete(Long isDelete) { public Long getIsDelete()
this.isDelete = isDelete; {
return isDelete;
} }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("ticketNo", getTicketNo()) .append("ticketNo", getTicketNo())
.append("userId", getUserId()) .append("userId", getUserId())
.append("title", getTitle()) .append("title", getTitle())
.append("content", getContent()) .append("content", getContent())
.append("images", getImages()) .append("images", getImages())
.append("status", getStatus()) .append("status", getStatus())
.append("createTime", getCreateTime()) .append("expectedCompleteTime", getExpectedCompleteTime())
.append("completeTime", getCompleteTime()) .append("completeTime", getCompleteTime())
.append("createBy", getCreateBy()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("createBy", getCreateBy())
.append("updateTime", getUpdateTime()) .append("updateBy", getUpdateBy())
.append("workUserId", getWorkUserId()) .append("updateTime", getUpdateTime())
.append("isDelete", getIsDelete()) .append("workUserId", getWorkUserId())
.toString(); .append("isDelete", getIsDelete())
.toString();
} }
} }

View File

@ -12,8 +12,9 @@
<result property="content" column="content" /> <result property="content" column="content" />
<result property="images" column="images" /> <result property="images" column="images" />
<result property="status" column="status" /> <result property="status" column="status" />
<result property="createTime" column="create_time" /> <result property="expectedCompleteTime" column="expected_complete_time" />
<result property="completeTime" column="complete_time" /> <result property="completeTime" column="complete_time" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
@ -22,28 +23,28 @@
</resultMap> </resultMap>
<sql id="selectEmsTicketVo"> <sql id="selectEmsTicketVo">
select id, ticket_no, user_id, title, content, images, status, create_time, complete_time, create_by, update_by, update_time, work_user_id, isDelete from ems_ticket select id, ticket_no, user_id, title, content, images, status, expected_complete_time, complete_time, create_time, create_by, update_by, update_time, work_user_id, isDelete from ems_ticket
</sql> </sql>
<select id="selectEmsTicketList" parameterType="EmsTicket" resultMap="EmsTicketResult"> <select id="selectEmsTicketList" parameterType="EmsTicket" resultMap="EmsTicketResult">
<include refid="selectEmsTicketVo"/> <include refid="selectEmsTicketVo"/>
<where> <where>
isDelete = 1
<if test="ticketNo != null and ticketNo != ''"> and ticket_no = #{ticketNo}</if> <if test="ticketNo != null and ticketNo != ''"> and ticket_no = #{ticketNo}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if> <if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="title != null and title != ''"> and title = #{title}</if> <if test="title != null and title != ''"> and title = #{title}</if>
<if test="content != null and content != ''"> and content = #{content}</if> <if test="content != null and content != ''"> and content = #{content}</if>
<if test="images != null and images != ''"> and images = #{images}</if> <if test="images != null and images != ''"> and images = #{images}</if>
<if test="status != null "> and status = #{status}</if> <if test="status != null "> and status = #{status}</if>
<if test="expectedCompleteTime != null "> and expected_complete_time = #{expectedCompleteTime}</if>
<if test="completeTime != null "> and complete_time = #{completeTime}</if> <if test="completeTime != null "> and complete_time = #{completeTime}</if>
<if test="workUserId != null "> and work_user_id = #{workUserId}</if> <if test="workUserId != null "> and work_user_id = #{workUserId}</if>
<if test="isDelete != null "> and isDelete = #{isDelete}</if>
</where> </where>
</select> </select>
<select id="selectEmsTicketById" parameterType="String" resultMap="EmsTicketResult"> <select id="selectEmsTicketById" parameterType="String" resultMap="EmsTicketResult">
<include refid="selectEmsTicketVo"/> <include refid="selectEmsTicketVo"/>
where id = #{id} where id = #{id}
and isDelete = 1
</select> </select>
<insert id="insertEmsTicket" parameterType="EmsTicket" useGeneratedKeys="true" keyProperty="id"> <insert id="insertEmsTicket" parameterType="EmsTicket" useGeneratedKeys="true" keyProperty="id">
@ -55,8 +56,9 @@
<if test="content != null and content != ''">content,</if> <if test="content != null and content != ''">content,</if>
<if test="images != null">images,</if> <if test="images != null">images,</if>
<if test="status != null">status,</if> <if test="status != null">status,</if>
<if test="createTime != null">create_time,</if> <if test="expectedCompleteTime != null">expected_complete_time,</if>
<if test="completeTime != null">complete_time,</if> <if test="completeTime != null">complete_time,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
@ -70,8 +72,9 @@
<if test="content != null and content != ''">#{content},</if> <if test="content != null and content != ''">#{content},</if>
<if test="images != null">#{images},</if> <if test="images != null">#{images},</if>
<if test="status != null">#{status},</if> <if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if> <if test="expectedCompleteTime != null">#{expectedCompleteTime},</if>
<if test="completeTime != null">#{completeTime},</if> <if test="completeTime != null">#{completeTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
@ -89,8 +92,9 @@
<if test="content != null and content != ''">content = #{content},</if> <if test="content != null and content != ''">content = #{content},</if>
<if test="images != null">images = #{images},</if> <if test="images != null">images = #{images},</if>
<if test="status != null">status = #{status},</if> <if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="expectedCompleteTime != null">expected_complete_time = #{expectedCompleteTime},</if>
<if test="completeTime != null">complete_time = #{completeTime},</if> <if test="completeTime != null">complete_time = #{completeTime},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
@ -123,7 +127,9 @@
s.user_name as userName, s.user_name as userName,
s1.user_name as workName, s1.user_name as workName,
t.create_time as createTime, t.create_time as createTime,
t.id t.id,
t.images,
t.expected_complete_time as expectedCompleteTime
FROM ems_ticket t FROM ems_ticket t
LEFT JOIN sys_user s on t.user_id = s.user_id LEFT JOIN sys_user s on t.user_id = s.user_id
LEFT JOIN sys_user s1 on t.work_user_id = s1.user_id LEFT JOIN sys_user s1 on t.work_user_id = s1.user_id