From 286375a43369462cd75147271949cf819916912f Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期五, 12 一月 2024 16:39:17 +0800
Subject: [PATCH] 问题项修改

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/MaintenanceStandardMapper.xml |   78 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 74 insertions(+), 4 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/MaintenanceStandardMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/MaintenanceStandardMapper.xml
index ec86d85..3588fc9 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/MaintenanceStandardMapper.xml
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/MaintenanceStandardMapper.xml
@@ -8,7 +8,6 @@
             t1.num,
             t1.version,
             t1.depart_id as departId,
-            t1.team_id as teamId,
             t1.equipment_id AS equipmentId,
             t2.num AS equipmentNum,
             t2.NAME AS equipmentName,
@@ -30,7 +29,10 @@
         left join sys_depart t4 on t2.use_id = t4.id
         left join mom_base_team t5 on t2.team_id = t5.id
         left join (select * from v_sys_dict where dict_code = 'assign_mode') t6 on t1.assign_mode = t6.item_value
-        where t1.del_flag = 0 and t1.type = #{params.type} and t2.use_id = #{params.useId}
+        where t1.del_flag = 0 and t1.type = #{params.type} and t2.technology_status in ('qualified','limitedUse')
+        <if test="params.useId != null and params.useId != ''">
+            and t2.use_id = #{params.useId}
+        </if>
         <if test="params.num != null and params.num != ''">
             and t1.num like concat('%',#{params.num},'%')
         </if>
@@ -43,6 +45,58 @@
         <if test="params.equipmentNum != null and params.equipmentNum != ''">
             and t2.num like concat('%',#{params.equipmentNum},'%')
         </if>
+        <if test="params.maintenanceType != null and params.maintenanceType != ''">
+            and t1.maintenance_type = #{params.maintenanceType}
+        </if>
+        ORDER BY t1.create_time desc
+    </select>
+
+    <select id="getMaintenanceStandard3List"  parameterType="Map" resultType="Map">
+        SELECT
+        t1.id,
+        t1.num,
+        t1.version,
+        t1.depart_id as departId,
+        t1.equipment_id AS equipmentId,
+        t2.num AS equipmentNum,
+        t2.NAME AS equipmentName,
+        t2.model AS equipmentModel,
+        t3.item_text as specificEquipment,
+        t1.create_by AS createBy,
+        t1.create_time AS createTime,
+        t1.update_by AS updateBy,
+        t1.update_time AS updateTime,
+        t4.depart_name as useDepartName,
+        t5.id as teamId,
+        t5.name as teamName,
+        t1.assign_mode as assignMode,
+        t6.item_text as  assignModeName
+        FROM
+        mom_eam_maintenance_standard t1
+        LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id
+        LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'specific_equipment' ) t3 ON t3.item_value = t2.specific_equipment
+        left join sys_depart t4 on t2.use_id = t4.id
+        left join mom_base_team t5 on t2.team_id = t5.id
+        left join (select * from v_sys_dict where dict_code = 'assign_mode') t6 on t1.assign_mode = t6.item_value
+        where t1.del_flag = 0 and t1.type = #{params.type} and t2.equipment_importance_id in ('A','B','C') and t2.technology_status in ('qualified','limitedUse')
+        <if test="params.useId != null and params.useId != ''">
+            and t2.use_id = #{params.useId}
+        </if>
+        <if test="params.num != null and params.num != ''">
+            and t1.num like concat('%',#{params.num},'%')
+        </if>
+        <if test="params.versionStatus != null and params.versionStatus != ''">
+            and t1.version_status = #{params.versionStatus}
+        </if>
+        <if test="params.equipmentName != null and params.equipmentName != ''">
+            and t2.name like concat('%',#{params.equipmentName},'%')
+        </if>
+        <if test="params.equipmentNum != null and params.equipmentNum != ''">
+            and t2.num like concat('%',#{params.equipmentNum},'%')
+        </if>
+        <if test="params.maintenanceType != null and params.maintenanceType != ''">
+            and t1.maintenance_type = #{params.maintenanceType}
+        </if>
         ORDER BY t1.create_time desc
     </select>
 
@@ -51,7 +105,6 @@
             t1.id,
             t1.num,
             t1.depart_id as departId,
-            t1.team_id as teamId,
             t1.equipment_id AS equipmentId,
             t2.num AS equipmentNum,
             t2.NAME AS equipmentName,
@@ -70,7 +123,19 @@
             t4.name as teamName,
             t2.use_id useId,
             t7.depart_name as useDepartName,
-            t1.remark
+            t1.remark,
+            t1.take_effect_time as takeEffectTime,
+            t1.lose_efficacy_time as loseEfficacyTime,
+            t1.approval_status as approvalStatus,
+            t8.item_text as approvalStatusName,
+            t1.maintenance_type as maintenanceType,
+            t9.item_text as maintenanceTypeName,
+            t1.audit_feedback as auditFeedback,
+            t1.approval_feedback as approvalFeedback,
+            t1.write_person as writePerson,
+            t1.audit_person as auditPerson,
+            t1.approval_person as approvalPerson,
+            t1.lose_efficacy_person as loseEfficacyPerson
         FROM
             mom_eam_maintenance_standard t1
         LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id
@@ -79,6 +144,8 @@
         left join (select * from v_sys_dict where dict_code = 'version_status') t5 on t1.version_status = t5.item_value
         left join (select * from v_sys_dict where dict_code = 'assign_mode') t6 on t1.assign_mode = t6.item_value
         left join sys_depart t7 on t2.use_id = t7.id
+        left join (select * from v_sys_dict where dict_code = 'approval_status') t8 on t1.approval_status = t8.item_value
+        left join (select * from v_sys_dict where dict_code = 'maintenance_type') t9 on t1.maintenance_type = t9.item_value
         where t1.del_flag = 0 and t1.type = #{params.type}
         <if test="params.num != null and params.num != ''">
             and t1.num like concat('%',#{params.num},'%')
@@ -92,6 +159,9 @@
         <if test="params.equipmentNum != null and params.equipmentNum != ''">
             and t2.num like concat('%',#{params.equipmentNum},'%')
         </if>
+        <if test="params.maintenanceType != null and params.maintenanceType != ''">
+            and t1.maintenance_type = #{params.maintenanceType}
+        </if>
         ORDER BY t1.create_time desc
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3