From a6954d841cf6aeed8c3ed7e7d409d25bedc318e6 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期五, 22 十一月 2024 16:04:46 +0800
Subject: [PATCH] update
---
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml | 82 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml
index 6f7d0c0..90a5d0a 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml
@@ -72,6 +72,12 @@
<if test="params.inspectionEndTime != null">
and t1.actual_end_time <= #{params.inspectionEndTime}
</if>
+ <if test="params.workCenterIds != null">
+ and t2.work_center_id in
+ <foreach collection="params.workCenterIds" open="(" separator="," close=")" item="workCenterId">
+ #{workCenterId}
+ </foreach>
+ </if>
ORDER BY t1.create_time desc
</select>
@@ -190,4 +196,80 @@
</if>
ORDER BY t1.create_time desc
</select>
+
+ <select id="findDayInspectionProjectList" parameterType="Map" resultType="Map">
+ SELECT
+ t4.num as equipmentNum,
+ t4.name as equipmentName,
+ t3.name,
+ t1.detection_standard as detectionStandard,
+ case t1.inspection_project_result when '1' then '鈭�' when '2' then 'x' when '3' then '鈻�' when '4' then 'T' else '' end as insResult,
+ SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t2.create_time, 120 ), 9, 10 ) as createTime
+ FROM
+ mom_eam_inspection_order_detail t1
+ LEFT JOIN mom_eam_inspection_order t2 ON t1.inspection_order_id = t2.id
+ LEFT JOIN mom_eam_inspection_project t3 ON t1.inspection_project_id = t3.id
+ LEFT JOIN mom_eam_equipment t4 ON t2.equipment_id = t4.id
+ LEFT JOIN mom_eam_inspection_cycle t5 ON t2.inspection_cycle_id = t5.id
+ left join (SELECT * FROM v_sys_dict WHERE dict_code = 'inspection_project_result') t6 on t1.inspection_project_result = t6.item_value
+ WHERE
+ t5.name = '1鏃�'
+ <if test="params.num != null and params.num != ''"> and t4.num = #{params.num} </if>
+ <if test="params.num == null "> and t4.num = '-1' </if>
+ <if test="params.dataTime != null and params.dataTime != ''"> AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t2.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), #{params.dataTime}, 120 ), 2, 7 ) </if>
+ <if test="params.dataTime == null ">AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t2.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), GETDATE( ), 120 ), 1, 7 ) </if>
+ AND t1.inspection_standard_detail_id IN (
+ SELECT
+ tt2.id
+ FROM
+ mom_eam_daily_inspection_standard tt1
+ LEFT JOIN mom_eam_daily_inspection_standard_detail tt2 ON tt1.id= tt2.daily_inspection_standard_id
+ LEFT JOIN mom_eam_equipment tt3 ON tt1.equipment_id = tt3.id
+ LEFT JOIN mom_eam_inspection_cycle tt4 ON tt2.inspection_cycle_id = tt4.id
+ WHERE
+ tt4.name = '1鏃�'
+ <if test="params.num != null and params.num != ''"> and tt3.num = #{params.num} </if>
+ <if test="params.num == null "> and tt3.num = '-1' </if>
+ AND tt1.version_status = '2'
+ AND tt1.del_flag = '0'
+ )
+ </select>
+
+ <select id="findWeekInspectionProjectList" parameterType="Map" resultType="Map">
+ SELECT
+ t4.num as equipmentNum,
+ t4.name as equipmentName,
+ t3.name,
+ t1.detection_standard as detectionStandard,
+ case t1.inspection_project_result when '1' then '鈭�' when '2' then 'x' when '3' then '鈻�' when '4' then 'T' else '' end as insResult,
+ SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t2.create_time, 120 ), 9, 10 ) as createTime
+ FROM
+ mom_eam_inspection_order_detail t1
+ LEFT JOIN mom_eam_inspection_order t2 ON t1.inspection_order_id = t2.id
+ LEFT JOIN mom_eam_inspection_project t3 ON t1.inspection_project_id = t3.id
+ LEFT JOIN mom_eam_equipment t4 ON t2.equipment_id = t4.id
+ LEFT JOIN mom_eam_inspection_cycle t5 ON t2.inspection_cycle_id = t5.id
+ left join (SELECT * FROM v_sys_dict WHERE dict_code = 'inspection_project_result') t6 on t1.inspection_project_result = t6.item_value
+ WHERE
+ t5.name = '1鍛�'
+ <if test="params.num != null and params.num != ''"> and t4.num = #{params.num} </if>
+ <if test="params.num == null "> and t4.num = '-1' </if>
+ <if test="params.dataTime != null and params.dataTime != ''"> AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t2.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), #{params.dataTime}, 120 ), 2, 7 ) </if>
+ <if test="params.dataTime == null ">AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t2.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), GETDATE( ), 120 ), 1, 7 ) </if>
+ AND t1.inspection_standard_detail_id IN (
+ SELECT
+ tt2.id
+ FROM
+ mom_eam_daily_inspection_standard tt1
+ LEFT JOIN mom_eam_daily_inspection_standard_detail tt2 ON tt1.id= tt2.daily_inspection_standard_id
+ LEFT JOIN mom_eam_equipment tt3 ON tt1.equipment_id = tt3.id
+ LEFT JOIN mom_eam_inspection_cycle tt4 ON tt2.inspection_cycle_id = tt4.id
+ WHERE
+ tt4.name = '1鍛�'
+ <if test="params.num != null and params.num != ''"> and tt3.num = #{params.num} </if>
+ <if test="params.num == null "> and tt3.num = '-1' </if>
+ AND tt1.version_status = '2'
+ AND tt1.del_flag = '0'
+ )
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3