From d10ee39ef95eb2442902e36dd36b1683cbd10af6 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期四, 06 三月 2025 15:10:03 +0800
Subject: [PATCH] art: 项目性维修-详情页面-附件,设备状态,技术状态不展示问题修改, 设备选择过滤,只能选择用户范围内的设备信息
---
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcProcessQuantityMapper.xml | 161 +++++++++++++++++++++++++++++++----------------------
1 files changed, 94 insertions(+), 67 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 f484955..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
@@ -5,124 +5,151 @@
<!--鍒嗛〉鏌ヨ-->
<select id="pageList" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto">
SELECT
- mpq.id id,
- mspd.equipment_id equipmentId,
- mspd.equipment_name equipmentName,
- mspd.parts_code partsCode,
- mspd.batch_code batchCode,
- mspd.sequence_number sequenceNumber,
- mpq.standard_id standardId,
- mpq.efficient_date efficientDate,
- mpq.process_quantity processQuantity,
- mspd.duration duration,
- mpq.remark remark,
- mpq.create_by createBy,
- mpq.create_time createTime,
- mpq.update_by updateBy,
- mpq.update_time updateTime
- FROM mdc_process_quantity mpq LEFT JOIN mdc_standard_process_duration mspd ON mpq.standard_id = mspd.id
+ t1.id id,
+ t3.equipment_id equipmentId,
+ t3.equipment_name equipmentName,
+ 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,
+ t1.remark remark,
+ t1.create_by createBy,
+ t1.create_time createTime,
+ t1.update_by updateBy,
+ 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 t1.equipment_id = t3.equipment_id
<where>
<if test="mdcProcessQuantity.equipmentId != null and mdcProcessQuantity.equipmentId != ''">
- AND mspd.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 mspd.equipment_name LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentName }),'%')
+ AND t3.equipment_name LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentName }),'%')
</if>
<if test="mdcProcessQuantity.partsCode != null and mdcProcessQuantity.partsCode != ''">
- AND mspd.parts_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.partsCode }),'%')
+ AND t2.parts_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.partsCode }),'%')
</if>
<if test="mdcProcessQuantity.batchCode != null and mdcProcessQuantity.batchCode != ''">
- AND mspd.batch_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.batchCode }),'%')
+ AND t2.batch_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.batchCode }),'%')
</if>
<if test="mdcProcessQuantity.sequenceNumber != null and mdcProcessQuantity.sequenceNumber != ''">
- AND mspd.sequence_number LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.sequenceNumber }),'%')
+ AND t2.sequence_number LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.sequenceNumber }),'%')
</if>
<if test="mdcProcessQuantity.startTime != null and mdcProcessQuantity.endTime != null">
- AND mpq.efficient_date BETWEEN #{ mdcProcessQuantity.startTime } AND #{ mdcProcessQuantity.endTime }
+ AND t1.efficient_date BETWEEN #{ mdcProcessQuantity.startTime } AND #{ mdcProcessQuantity.endTime }
</if>
<if test="mdcProcessQuantity.processQuantity != null and mdcProcessQuantity.processQuantity != ''">
- AND mpq.process_quantity = #{ mdcProcessQuantity.processQuantity }
+ AND t1.process_quantity = #{ mdcProcessQuantity.processQuantity }
</if>
<if test="mdcProcessQuantity.mdcSectionIds != null and mdcProcessQuantity.mdcSectionIds.size() > 0 ">
- AND mspd.equipment_id IN
+ AND t3.equipment_id IN
<foreach collection="mdcProcessQuantity.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
#{ id }
</foreach>
</if>
</where>
- ORDER BY mspd.equipment_name ASC, mpq.efficient_date DESC
+ ORDER BY t3.equipment_name ASC, t1.efficient_date DESC
</select>
<!--瀵煎嚭鏁版嵁鏌ヨ-->
<select id="list" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto">
SELECT
- mpq.id id,
- mspd.equipment_id equipmentId,
- mspd.equipment_name equipmentName,
- mspd.parts_code partsCode,
- mspd.batch_code batchCode,
- mspd.sequence_number sequenceNumber,
- mpq.standard_id standardId,
- mpq.efficient_date efficientDate,
- mpq.process_quantity processQuantity,
- mspd.duration duration,
- mpq.remark remark,
- mpq.create_by createBy,
- mpq.create_time createTime,
- mpq.update_by updateBy,
- mpq.update_time updateTime
- FROM mdc_process_quantity mpq LEFT JOIN mdc_standard_process_duration mspd ON mpq.standard_id = mspd.id
+ t1.id id,
+ t3.equipment_id equipmentId,
+ t3.equipment_name equipmentName,
+ 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,
+ t1.remark remark,
+ t1.create_by createBy,
+ t1.create_time createTime,
+ t1.update_by updateBy,
+ 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 t1.equipment_id = t3.equipment_id
<where>
<if test="mdcProcessQuantity.equipmentId != null and mdcProcessQuantity.equipmentId != ''">
- AND mspd.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 mspd.equipment_name LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentName }),'%')
+ AND t3.equipment_name LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentName }),'%')
</if>
<if test="mdcProcessQuantity.partsCode != null and mdcProcessQuantity.partsCode != ''">
- AND mspd.parts_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.partsCode }),'%')
+ AND t2.parts_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.partsCode }),'%')
</if>
<if test="mdcProcessQuantity.batchCode != null and mdcProcessQuantity.batchCode != ''">
- AND mspd.batch_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.batchCode }),'%')
+ AND t2.batch_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.batchCode }),'%')
</if>
<if test="mdcProcessQuantity.sequenceNumber != null and mdcProcessQuantity.sequenceNumber != ''">
- AND mspd.sequence_number LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.sequenceNumber }),'%')
+ AND t2.sequence_number LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.sequenceNumber }),'%')
</if>
<if test="mdcProcessQuantity.startTime != null and mdcProcessQuantity.endTime != null">
- AND mpq.efficient_date BETWEEN #{ mdcProcessQuantity.startTime } AND #{ mdcProcessQuantity.endTime }
+ AND t1.efficient_date BETWEEN #{ mdcProcessQuantity.startTime } AND #{ mdcProcessQuantity.endTime }
</if>
<if test="mdcProcessQuantity.processQuantity != null and mdcProcessQuantity.processQuantity != ''">
- AND mpq.process_quantity = #{ mdcProcessQuantity.processQuantity }
+ AND t1.process_quantity = #{ mdcProcessQuantity.processQuantity }
</if>
<if test="mdcProcessQuantity.mdcSectionIds != null and mdcProcessQuantity.mdcSectionIds.size() > 0 ">
- AND mspd.equipment_id IN
+ AND t3.equipment_id IN
<foreach collection="mdcProcessQuantity.mdcSectionIds" item="id" index="index" open="(" close=")" separator=",">
#{ id }
</foreach>
</if>
</where>
- ORDER BY mspd.equipment_name ASC, mpq.efficient_date DESC
+ ORDER BY t3.equipment_name ASC, t1.efficient_date DESC
</select>
<!--鏍规嵁id鏌ヨ-->
<select id="findById" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto">
SELECT
- mpq.id id,
- mspd.equipment_id equipmentId,
- mspd.equipment_name equipmentName,
- mspd.parts_code partsCode,
- mspd.batch_code batchCode,
- mspd.sequence_number sequenceNumber,
- mpq.standard_id standardId,
- mpq.efficient_date efficientDate,
- mpq.process_quantity processQuantity,
- mspd.duration duration,
- mpq.remark remark,
- mpq.create_by createBy,
- mpq.create_time createTime,
- mpq.update_by updateBy,
- mpq.update_time updateTime
- FROM mdc_process_quantity mpq LEFT JOIN mdc_standard_process_duration mspd ON mpq.standard_id = mspd.id
- WHERE mpq.id = { id }
+ t1.id id,
+ t3.equipment_id equipmentId,
+ t3.equipment_name equipmentName,
+ 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,
+ t1.remark remark,
+ t1.create_by createBy,
+ t1.create_time createTime,
+ t1.update_by updateBy,
+ 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 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