From e6d701963edc05441f58b689b1ed18b89d0faff3 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期三, 05 三月 2025 10:41:01 +0800
Subject: [PATCH] art: 所有设备 台账 技术状态鉴定 根据设备id查询技术状态鉴定,并过滤掉已完成的技术状态鉴定
---
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcProcessQuantityMapper.xml | 33 ++++++++++++++++++++++++++-------
1 files changed, 26 insertions(+), 7 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 33b8dc0..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
@@ -6,7 +6,7 @@
<select id="pageList" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto">
SELECT
t1.id id,
- t1.equipment_id equipmentId,
+ t3.equipment_id equipmentId,
t3.equipment_name equipmentName,
t2.parts_code partsCode,
t2.batch_code batchCode,
@@ -26,7 +26,7 @@
LEFT JOIN mdc_equipment t3 ON t1.equipment_id = t3.equipment_id
<where>
<if test="mdcProcessQuantity.equipmentId != null and mdcProcessQuantity.equipmentId != ''">
- AND t1.equipment_id LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentId }),'%')
+ AND t3.equipment_id LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentId }),'%')
</if>
<if test="mdcProcessQuantity.equipmentName != null and mdcProcessQuantity.equipmentName != ''">
AND t3.equipment_name LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentName }),'%')
@@ -47,7 +47,7 @@
AND t1.process_quantity = #{ mdcProcessQuantity.processQuantity }
</if>
<if test="mdcProcessQuantity.mdcSectionIds != null and mdcProcessQuantity.mdcSectionIds.size() > 0 ">
- AND t1.equipment_id IN
+ AND t3.equipment_id IN
<foreach collection="mdcProcessQuantity.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
#{ id }
</foreach>
@@ -60,7 +60,7 @@
<select id="list" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto">
SELECT
t1.id id,
- t1.equipment_id equipmentId,
+ t3.equipment_id equipmentId,
t3.equipment_name equipmentName,
t2.parts_code partsCode,
t2.batch_code batchCode,
@@ -80,7 +80,7 @@
LEFT JOIN mdc_equipment t3 ON t1.equipment_id = t3.equipment_id
<where>
<if test="mdcProcessQuantity.equipmentId != null and mdcProcessQuantity.equipmentId != ''">
- AND t1.equipment_id LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentId }),'%')
+ AND t3.equipment_id LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentId }),'%')
</if>
<if test="mdcProcessQuantity.equipmentName != null and mdcProcessQuantity.equipmentName != ''">
AND t3.equipment_name LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentName }),'%')
@@ -101,7 +101,7 @@
AND t1.process_quantity = #{ mdcProcessQuantity.processQuantity }
</if>
<if test="mdcProcessQuantity.mdcSectionIds != null and mdcProcessQuantity.mdcSectionIds.size() > 0 ">
- AND t1.equipment_id IN
+ AND t3.equipment_id IN
<foreach collection="mdcProcessQuantity.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
#{ id }
</foreach>
@@ -114,7 +114,7 @@
<select id="findById" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto">
SELECT
t1.id id,
- t1.equipment_id equipmentId,
+ t3.equipment_id equipmentId,
t3.equipment_name equipmentName,
t2.parts_code partsCode,
t2.batch_code batchCode,
@@ -133,4 +133,23 @@
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