From c642e468df7f88cdd33d7b5417dd500ee3850813 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期一, 08 七月 2024 11:05:58 +0800
Subject: [PATCH] 调整标准加工时间和加工数量维护功能

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcProcessQuantityMapper.xml |  142 +++++++++++++++++++++++++----------------------
 1 files changed, 75 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..33b8dc0 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,132 @@
     <!--鍒嗛〉鏌ヨ-->
     <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,
+            t1.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 t1.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 t1.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,
+        t1.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 t1.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 t1.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,
+            t1.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>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3