From 57945f688fd21076e36ab5332028c8b4a6dcf59c Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期四, 04 九月 2025 16:37:31 +0800 Subject: [PATCH] 同步密网设备管理代码 --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml index b596292..9461c66 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml @@ -9,4 +9,48 @@ on wmo.equipment_id = e.id ${ew.customSqlSegment} </select> + + <select id="findInspectionUser" parameterType="String" resultType="org.jeecg.modules.eam.vo.InspectionVo"> + + SELECT + t2.realname operator, + t3.realname as confirmUser, + CONVERT(VARCHAR, DATEPART(DAY, t1.inspection_date)) as dayTime + FROM + eam_inspection_order t1 + left join sys_user t2 on t1.operator = t2.username + left join sys_user t3 on t1.confirm_user = t3.username + WHERE t1.del_flag = '0' + AND t1.equipment_id = #{equipmentId} + AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.inspection_date, 120 ), 1, 7 ) = SUBSTRING(CONVERT(VARCHAR(10),#{yearMonth}, 120 ), 1, 7 ) + </select> + + <select id="findInspectionResult" parameterType="String" resultType="org.jeecg.modules.eam.vo.InspectionVo"> + + SELECT + t1.item_demand as inspectionContent, + CONVERT(VARCHAR, DATEPART(DAY, t2.inspection_date)) as dayTime, + case t1.inspection_result when '1' then '鈭�' when '2' then 'x' else '' end as inspectionResult + FROM + eam_inspection_order_detail t1 + LEFT JOIN eam_inspection_order t2 ON t1.order_id = t2.id + WHERE t1.item_demand = #{itemDemand} + and t2.equipment_id = #{equipmentId} + AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t2.inspection_date, 120 ), 1, 7 ) = SUBSTRING(CONVERT(VARCHAR(10),#{yearMonth}, 120 ), 1, 7 ) + </select> + + <select id="findInspectionStandard" parameterType="String" resultType="Map"> + SELECT + ROW_NUMBER() OVER (ORDER BY t1.id) AS seq, + t1.item_demand as itemDemand + FROM + eam_maintenance_standard_detail t1 + LEFT JOIN eam_maintenance_standard t2 ON t1.standard_id = t2.id + WHERE + t2.maintenance_category = 'POINT_INSPECTION' + AND t2.standard_status = 'NORMAL' + and equipment_id =#{equipmentId} + ORDER BY + item_code ASC + </select> </mapper> -- Gitblit v1.9.3