更新工单分页接口显示场站和设备信息
This commit is contained in:
parent
45befa30c4
commit
8ce57ae370
@ -1121,4 +1121,8 @@ ALTER TABLE `xhpc_work_user`
|
||||
ADD COLUMN `station_ids` text COMMENT '场站ID(用逗号分隔)' AFTER `operator_ids`;
|
||||
|
||||
ALTER TABLE `xhpc_work_dept`
|
||||
ADD COLUMN `type` int(4) NULL DEFAULT null COMMENT '人员类型(1-管理员,2-运维人员)' AFTER `status`;
|
||||
ADD COLUMN `type` int(4) NULL DEFAULT null COMMENT '人员类型(1-管理员,2-运维人员)' AFTER `status`;
|
||||
|
||||
|
||||
ALTER TABLE `xhpc_work_order`
|
||||
ADD COLUMN `fault_end_time` datetime NULL DEFAULT null COMMENT '故障结束时间' AFTER `fault_time`;
|
||||
@ -37,10 +37,15 @@ public class XhpcWorkOrderDomain implements Serializable {
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 故障时间
|
||||
* 故障开始时间
|
||||
*/
|
||||
private Date faultTime;
|
||||
|
||||
/**
|
||||
* 故障结束时间
|
||||
*/
|
||||
private Date faultEndTime;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
||||
<result column="fault_time" jdbcType="TIMESTAMP" property="faultTime" />
|
||||
<result column="fault_end_time" property="faultEndTime" />
|
||||
<result column="device_type" jdbcType="VARCHAR" property="deviceType" />
|
||||
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
|
||||
<result column="station_id" jdbcType="BIGINT" property="stationId" />
|
||||
@ -23,7 +24,7 @@
|
||||
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
o.work_order_id, o.`type`, o.title, o.content, o.fault_time, o.device_type, o.serial_number, o.station_id,
|
||||
o.work_order_id, o.`type`, o.title, o.content, o.fault_time, o.fault_end_time, o.device_type, o.serial_number, o.station_id,
|
||||
o.reason, o.disposal_method, o.`status`, o.del_flag, o.tenant_id, o.create_time, o.create_by, o.update_time,
|
||||
o.update_by, o.remark
|
||||
</sql>
|
||||
@ -61,12 +62,18 @@
|
||||
GROUP_CONCAT(u.work_user_id) as 'userId',
|
||||
GROUP_CONCAT(u.user_name, '(', d.dept_name, ')') as 'userName',
|
||||
o.`status` as 'status',
|
||||
s.name as 'stationName',
|
||||
sd.device_name as 'deviceName',
|
||||
o.fault_time as 'faultTime',
|
||||
o.fault_end_time as 'faultEndTime',
|
||||
o.create_time as createTime
|
||||
from xhpc_work_order o
|
||||
left join xhpc_work_type_dict td on td.work_type_id=o.type
|
||||
LEFT JOIN xhpc_work_order_user ou on o.work_order_id=ou.order_id
|
||||
LEFT JOIN xhpc_work_user u on ou.user_id=u.work_user_id
|
||||
LEFT JOIN xhpc_work_dept d on d.work_dept_id=u.dept_id
|
||||
left join xhpc_work_station s on o.station_id=s.work_station_id
|
||||
left join xhpc_station_device sd on sd.serial_number=o.serial_number
|
||||
where o.del_flag=0
|
||||
<if test="params.orderType != null and params.orderType != ''">
|
||||
and o.type=#{params.orderType}
|
||||
@ -98,12 +105,12 @@
|
||||
where work_order_id = #{workOrderId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<insert id="insert" keyColumn="work_order_id" keyProperty="workOrderId" parameterType="com.xhpc.activity.domain.XhpcWorkOrderDomain" useGeneratedKeys="true">
|
||||
insert into xhpc_work_order (`type`, title, content, fault_time
|
||||
insert into xhpc_work_order (`type`, title, content, fault_time, fault_end_time,
|
||||
device_type, serial_number, reason, disposal_method,
|
||||
`status`, del_flag, tenant_id,
|
||||
create_time, create_by, update_time,
|
||||
update_by, remark)
|
||||
values (#{type,jdbcType=SMALLINT}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{faultTime, jdbcType=TIMESTAMP}
|
||||
values (#{type,jdbcType=SMALLINT}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{faultTime, jdbcType=TIMESTAMP}, #{faultEndTime},
|
||||
#{deviceType,jdbcType=VARCHAR}, #{serialNumber,jdbcType=VARCHAR},
|
||||
#{reason,jdbcType=VARCHAR}, #{disposalMethod,jdbcType=VARCHAR},
|
||||
1, 0, #{tenantId,jdbcType=VARCHAR},
|
||||
@ -125,6 +132,9 @@
|
||||
<if test="faultTime != null">
|
||||
fault_time,
|
||||
</if>
|
||||
<if test="faultEndTime != null">
|
||||
fault_end_time,
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type,
|
||||
</if>
|
||||
@ -170,6 +180,9 @@
|
||||
<if test="faultTime!=null">
|
||||
#{faultTime, jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="faultEndTime!=null">
|
||||
#{faultEndTime},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
#{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -225,6 +238,9 @@
|
||||
<if test="faultTime!=null">
|
||||
fault_time = #{faultTime, jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="faultEndTime!=null">
|
||||
fault_end_time = #{faultEndTime},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -262,6 +278,7 @@
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
fault_time = #{faultTime, jdbcType=TIMESTAMP},
|
||||
fault_end_time = #{faultEndTime},
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
serial_number = #{serialNumber,jdbcType=VARCHAR},
|
||||
station_id=#{stationId},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user