diff --git a/sql/v2.1.sql b/sql/v2.1.sql
index d01e871e..af5fe8cb 100644
--- a/sql/v2.1.sql
+++ b/sql/v2.1.sql
@@ -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`;
\ No newline at end of file
+ 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`;
\ No newline at end of file
diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/domain/XhpcWorkOrderDomain.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/domain/XhpcWorkOrderDomain.java
index 778003c6..8240b2d8 100644
--- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/domain/XhpcWorkOrderDomain.java
+++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/domain/XhpcWorkOrderDomain.java
@@ -37,10 +37,15 @@ public class XhpcWorkOrderDomain implements Serializable {
private String content;
/**
- * 故障时间
+ * 故障开始时间
*/
private Date faultTime;
+ /**
+ * 故障结束时间
+ */
+ private Date faultEndTime;
+
/**
* 设备类型
*/
diff --git a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkOrderMapper.xml b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkOrderMapper.xml
index 1330bb17..04df7afc 100644
--- a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkOrderMapper.xml
+++ b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkOrderMapper.xml
@@ -7,6 +7,7 @@
+
@@ -23,7 +24,7 @@
- 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
@@ -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
and o.type=#{params.orderType}
@@ -98,12 +105,12 @@
where work_order_id = #{workOrderId,jdbcType=BIGINT}
- 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 @@
fault_time,
+
+ fault_end_time,
+
device_type,
@@ -170,6 +180,9 @@
#{faultTime, jdbcType=TIMESTAMP},
+
+ #{faultEndTime},
+
#{deviceType,jdbcType=VARCHAR},
@@ -225,6 +238,9 @@
fault_time = #{faultTime, jdbcType=TIMESTAMP},
+
+ fault_end_time = #{faultEndTime},
+
device_type = #{deviceType,jdbcType=VARCHAR},
@@ -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},