From ff165658b255893c80cef7f441e4764b88d00fc4 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 31 八月 2023 17:53:41 +0800
Subject: [PATCH] 升版日期修改

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml          |   58 ++---------------------------
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java  |    2 +
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java |    4 +
 3 files changed, 9 insertions(+), 55 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java
index 04cda53..6dc727a 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java
@@ -348,6 +348,8 @@
         inspectionCycle.setCreateTime(new Date());
         inspectionCycle.setUpdateBy(null);
         inspectionCycle.setUpdateTime(null);
+        inspectionCycle.setLoseEfficacyTime(null);
+        inspectionCycle.setTakeEffectTime(null);
         boolean b = inspectionCycleService.save(inspectionCycle);
         if(b){
             return Result.OK("鐗堟湰鍗囩骇鎴愬姛锛�");
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java
index f03cd50..d8e8e12 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java
@@ -344,12 +344,14 @@
      */
     @PostMapping(value = "/revise")
     public Result<String> revise(@RequestBody MaintenanceCycle maintenanceCycle) {
-        String cycleUnit = sysBaseApi.queryDictTextByKey("cycle_unit", String.valueOf(maintenanceCycle.getCycleUnit()));
+        String cycleUnit = sysBaseApi.queryDictTextByKey("maintenance_cycle_unit", String.valueOf(maintenanceCycle.getCycleUnit()));
         maintenanceCycle.setId("");
         maintenanceCycle.setName(String.valueOf(maintenanceCycle.getCycle()).concat(cycleUnit));
         maintenanceCycle.setCreateTime(new Date());
         maintenanceCycle.setUpdateBy(null);
         maintenanceCycle.setUpdateTime(null);
+        maintenanceCycle.setLoseEfficacyTime(null);
+        maintenanceCycle.setTakeEffectTime(null);
         boolean b = maintenanceCycleService.save(maintenanceCycle);
         if(b){
             return Result.OK("鐗堟湰鍗囩骇鎴愬姛锛�");
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml
index 1a46fd8..75c128d 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamEquipmentMapper.xml
@@ -6,38 +6,7 @@
         SELECT DISTINCT
             t1.id,
             t1.num,
-            '璁惧棰嗗��' AS 'type',
-            t3.item_text AS businessType,
-            t1.create_time AS createTime,
-            t1.create_by AS createBy
-        FROM
-            mom_eam_equipment_unloading t1
-        LEFT JOIN mom_eam_equipment_unloading_borrow_detail t2 ON t1.id = t2.equipment_unloading_id
-        LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'business_type' ) t3 ON t3.item_value = t1.business_type
-        where t1.del_flag = '0' and t2.del_flag = '0' and t2.equipment_id = #{params.equipmentId}
-
-        UNION All
-
-        SELECT DISTINCT
-            t1.id,
-            t1.num,
-            '璁惧褰掕繕' AS 'type',
-            t3.item_text AS businessType,
-            t1.create_time AS createTime,
-            t1.create_by AS createBy
-        FROM
-            mom_eam_equipment_unloading t1
-        LEFT JOIN mom_eam_equipment_unloading_return_detail t2 ON t1.id = t2.equipment_unloading_id
-        LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'business_type' ) t3 ON t3.item_value = t1.business_type
-        where t1.del_flag = '0' and t2.del_flag = '0' and t2.equipment_id = #{params.equipmentId}
-
-        UNION All
-
-        SELECT DISTINCT
-            t1.id,
-            t1.num,
             '璁惧璋冨叆' AS 'type',
-            '' as  businessType,
             t1.create_time AS createTime,
             t1.create_by AS createBy
         FROM
@@ -45,13 +14,12 @@
         left join mom_eam_equipment_transfer_in_detail t2 on t1.id = t2.equipment_transfer_id
         where t1.del_flag = '0' and t2.del_flag = '0' and t2.equipment_id = #{params.equipmentId}
 
-        UNION All
+        UNION
 
         SELECT DISTINCT
             t1.id,
             t1.num,
             '璁惧璋冨嚭' AS 'type',
-            '' as  businessType,
             t1.create_time AS createTime,
             t1.create_by AS createBy
         FROM
@@ -59,13 +27,12 @@
         left join mom_eam_equipment_transfer_out_detail t2 on t1.id = t2.equipment_transfer_id
         where t1.del_flag = '0' and t2.del_flag = '0' and t2.equipment_id = #{params.equipmentId}
 
-        UNION All
+        UNION
 
         SELECT DISTINCT
             t1.id,
             t1.num,
             '璁惧鍙樺姩' AS 'type',
-            '' as  businessType,
             t1.create_time AS createTime,
             t1.create_by AS createBy
         FROM
@@ -89,25 +56,8 @@
         left join mom_base_team t3 on t1.team_id = t3.id
         left join sys_user t4 on t1.inspection_user_id = t4.id
         left join mom_eam_inspection_cycle t5 on t1.inspection_cycle_id = t5.id
-        WHERE t1.del_flag = '0' and t2.del_flag= '0'  and t5.del_flag= '0' and t2.equipment_id = #{params.equipmentId}
+        WHERE t1.del_flag = '0' and t2.del_flag= '0'  and t5.del_flag= '0' and t2.equipment_id = ${params.equipmentId}
 
---         UNION All
---
---         SELECT DISTINCT
---             t1.id,
---             '涓撲笟鐐规' as inspectionType,
---             t1.num,
---             t1.inspection_time as inspectionTime,
---             t3.name as teamName,
---             t4.realname as inspectionUserName,
---             t1.plan_end_time as actualEndTime
---         FROM
---             mom_eam_specialty_inspection_order t1
---         LEFT JOIN mom_eam_specialty_inspection_order_detail t2 on t1.id = t2.specialty_inspection_order_id
---         left join sys_user t4 on t1.inspection_user_id = t4.id
---         left join mom_eam_specialty_inspection_plan t5 on t1.specialty_inspection_plan_id = t5.id
---         left join mom_base_team t3 on t5.team_id = t3.id
---         WHERE t1.del_flag = '0' and t2.del_flag= '0'  and t5.del_flag= '0' and t2.equipment_id = #{params.equipmentId}
     </select>
 
     <select id="getResumeMaintenanceRecordList"  parameterType="Map" resultType="Map">
@@ -127,7 +77,7 @@
         left join sys_user t5 on t5.id= t1.maintenance_user_id
         WHERE t1.del_flag = '0' and t2.del_flag= '0'  and t3.del_flag= '0' and t1.equipment_id = #{params.equipmentId}
 
-        UNION All
+        UNION
 
         SELECT DISTINCT
             t1.id,

--
Gitblit v1.9.3