From 792ff6e14b5074d30f8a7bd804d3b8e6454c3969 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 11 一月 2024 17:41:45 +0800
Subject: [PATCH] 保养拆分

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/DailyMaintenanceOrderMapper.xml |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/DailyMaintenanceOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/DailyMaintenanceOrderMapper.xml
index 3e44ae1..e86c3f0 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/DailyMaintenanceOrderMapper.xml
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/DailyMaintenanceOrderMapper.xml
@@ -9,6 +9,7 @@
             t1.location,
             t1.photo,
             t1.maintenance_project_id as maintenanceProjectId,
+            t5.item_text as maintenanceRole,
             t3.num as maintenanceProjectNum,
             t3.name as maintenanceProjectName,
             t3.standard,
@@ -19,6 +20,7 @@
         LEFT JOIN mom_eam_maintenance_standard t2 ON t1.maintenance_standard_id = t2.id
         LEFT JOIN mom_eam_maintenance_project t3 ON t1.maintenance_project_id = t3.id
         LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'maintenance_project_method' ) t4 ON t4.item_value = t3.maintenance_method
+        LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'maintenance_role' ) t5 ON t5.item_value = t1.maintenance_role
         where t1.del_flag = '0' and t2.del_flag = '0' and t3.del_flag = '0' and t2.type = 'daily'
         <if test="maintenanceStandardId != null and maintenanceStandardId != ''">
             and t2.id = #{maintenanceStandardId}
@@ -31,8 +33,8 @@
     <select id="getMaintenanceCycleByStandardId"  parameterType="Map" resultType="org.jeecg.modules.eam.model.MaintenanceCycleVo">
         SELECT DISTINCT
             t2.id AS value,
-	        concat( t2.CODE, '/', t2.name ) AS text,
-	        concat( t2.CODE, '/', t2.name ) AS title
+	        t2.name AS text,
+	        t2.name AS title
         FROM
             mom_eam_maintenance_standard_detail t1
             LEFT JOIN mom_eam_maintenance_cycle t2 ON t1.maintenance_cycle_id = t2.id
@@ -50,7 +52,7 @@
             t4.maintenance_type as maintenanceType,
             t10.item_text as maintenanceTypeName,
             t4.cycle as maintenanceCycle,
-            concat(t4.code, '/', t4.name) as maintenanceCycleName,
+            t4.name as maintenanceCycleName,
             t3.id as equipmentId,
             t3.num as equipmentNum,
             t3.name as equipmentName,
@@ -74,16 +76,18 @@
             t1.plan_end_time as planEndTime,
             t1.actual_start_time as actualStartTime,
             t1.actual_end_time as actualEndTime,
-            t8.realname as maintenanceUserName,
+            t1.maintenance_user_id as maintenanceUserId,
             t9.item_text as assignModeName,
             t1.create_by as createBy,
             t1.create_time as createTime,
             t1.remark,
             t1.description,
+            t1.confirm_status as confirmStatus,
             t1.precision_inspection_status as precisionInspectionStatus,
             t1.maintenance_order_uda3 as receipts,
             t12.num as receiptsNum,
-            t13.item_text as receiptsName
+            t13.item_text as receiptsName,
+            t14.item_text as confirmStatusName
         FROM
             mom_eam_daily_maintenance_order t1
         LEFT JOIN mom_eam_maintenance_standard t2 ON t1.maintenance_standard_id = t2.id
@@ -93,11 +97,11 @@
         LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'daily_maintenance_order_status' ) t5 on t5.item_value = t1.status
         left join sys_depart t6 on t3.use_id = t6.id
         left join mom_base_team t7 on t7.id = t3.team_id
-        left join sys_user t8 on t1.maintenance_user_id = t8.id
         left join ( SELECT * FROM v_sys_dict WHERE dict_code = 'assign_mode' ) t9 on t9.item_value = t2.assign_mode
         left join (SELECT * FROM v_sys_dict WHERE dict_code = 'maintenance_type') t10 on t10.item_value = t4.maintenance_type
         left join sys_file_name t12 on t1.maintenance_order_uda3 = t12.id
         left join (SELECT * FROM v_sys_dict WHERE dict_code = 'sys_file_name') t13 on t13.item_value = t12.name
+        left join (SELECT * FROM v_sys_dict WHERE dict_code = 'two_maintenance_devolution_status') t14 on t14.item_value = t1.confirm_status
         WHERE t1.del_flag = 0 and t2.del_flag = 0 and t3.del_flag = 0 and t4.del_flag = 0 and t4.maintenance_type =#{params.maintenanceType}
         <if test="params.num != null and params.num != ''">
             and t1.num like concat('%',#{params.num},'%')
@@ -116,7 +120,7 @@
         t4.maintenance_type as maintenanceType,
         t10.item_text as maintenanceTypeName,
         t4.cycle as maintenanceCycle,
-        concat(t4.code, '/', t4.name) as maintenanceCycleName,
+        t4.name as maintenanceCycleName,
         t3.id as equipmentId,
         t3.num as equipmentNum,
         t3.name as equipmentName,
@@ -140,7 +144,7 @@
         t1.plan_end_time as planEndTime,
         t1.actual_start_time as actualStartTime,
         t1.actual_end_time as actualEndTime,
-        t8.realname as maintenanceUserName,
+        t1.maintenance_user_id as maintenanceUserId,
         t9.item_text as assignModeName,
         t1.create_by as createBy,
         t1.create_time as createTime,
@@ -167,7 +171,6 @@
         LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'daily_maintenance_order_status' ) t5 on t5.item_value = t1.status
         left join sys_depart t6 on t3.use_id = t6.id
         left join mom_base_team t7 on t7.id = t3.team_id
-        left join sys_user t8 on t1.maintenance_user_id = t8.id
         left join ( SELECT * FROM v_sys_dict WHERE dict_code = 'assign_mode' ) t9 on t9.item_value = t2.assign_mode
         left join (SELECT * FROM v_sys_dict WHERE dict_code = 'maintenance_type') t10 on t10.item_value = t4.maintenance_type
         left join (SELECT * FROM v_sys_dict WHERE dict_code = 'check_status') t12 on t12.item_value = t1.check_status

--
Gitblit v1.9.3