From dfadab4fecc90bd2ad720dc67eba44c4b69b155a Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期三, 05 三月 2025 10:05:40 +0800 Subject: [PATCH] art: 所有设备 台账 维修工单 根据设备id查询维修工单,并过滤掉已完成的维修工单 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcProcessQuantityMapper.xml | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcProcessQuantityMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcProcessQuantityMapper.xml index 5935c84..2025e93 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcProcessQuantityMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcProcessQuantityMapper.xml @@ -23,7 +23,7 @@ FROM mdc_process_quantity t1 LEFT JOIN mdc_standard_process_duration t2 ON t1.standard_id = t2.id - LEFT JOIN mdc_equipment t3 ON t2.equipment_id = t3.equipment_id + LEFT JOIN mdc_equipment t3 ON t1.equipment_id = t3.equipment_id <where> <if test="mdcProcessQuantity.equipmentId != null and mdcProcessQuantity.equipmentId != ''"> AND t3.equipment_id LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentId }),'%') @@ -77,7 +77,7 @@ FROM mdc_process_quantity t1 LEFT JOIN mdc_standard_process_duration t2 ON t1.standard_id = t2.id - LEFT JOIN mdc_equipment t3 ON t2.equipment_id = t3.equipment_id + LEFT JOIN mdc_equipment t3 ON t1.equipment_id = t3.equipment_id <where> <if test="mdcProcessQuantity.equipmentId != null and mdcProcessQuantity.equipmentId != ''"> AND t3.equipment_id LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentId }),'%') @@ -130,7 +130,26 @@ t1.update_time updateTime FROM mdc_process_quantity t1 LEFT JOIN mdc_standard_process_duration t2 ON t1.standard_id = t2.id - LEFT JOIN mdc_equipment t3 ON t2.equipment_id = t3.equipment_id + LEFT JOIN mdc_equipment t3 ON t1.equipment_id = t3.equipment_id WHERE t1.id = #{ id } </select> + + <select id="findList" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto"> + SELECT + t1.id id, + t1.equipment_id equipmentId, + t2.parts_code partsCode, + t2.batch_code batchCode, + t2.sequence_number sequenceNumber, + t1.standard_id standardId, + t1.efficient_date efficientDate, + t1.process_quantity processQuantity, + t2.duration duration + FROM + mdc_process_quantity t1 + LEFT JOIN mdc_standard_process_duration t2 ON t1.standard_id = t2.id + WHERE + t1.equipment_id = #{equipmentId} + AND t1.efficient_date LIKE CONCAT(CONCAT('%',#{ validDate }),'%') + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3