工单管理-新增字段

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

View File

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