From cb7eb6fa3477e624f7112a2eac632783b96bf4b4 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期一, 15 一月 2024 16:19:35 +0800
Subject: [PATCH] 点检标准 多sheet页导入

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml |   53 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 52 insertions(+), 1 deletions(-)

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
index 15df7d9..893762f 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
@@ -58,6 +58,7 @@
         WHERE
             med.equipment_id = me.id
             AND med.dep_id = #{ departId }
+        ORDER BY me.equipment_id
     </select>
 
     <!--鏍规嵁浜х嚎id鏌ヨ璁惧-->
@@ -70,6 +71,7 @@
         WHERE
             mpe.equipment_id = me.id
             AND mpe.production_id = #{ productionId }
+        ORDER BY me.equipment_id
     </select>
 
     <!--鏍规嵁浜х嚎id鏌ヨ璁惧id闆嗗悎-->
@@ -129,7 +131,7 @@
             k.equipment_type,
             k.equipment_type_pictures
         ORDER BY
-            equipmentName
+            EquipmentID
     </select>
 
     <!--鏍规嵁閮ㄩ棬id鏌ヨ璁惧id闆嗗悎-->
@@ -166,6 +168,7 @@
                 #{id}
             </foreach>
         </where>
+        ORDER BY sd.depart_order
     </select>
 
     <!--鏍规嵁璁惧缂栧彿鏌ヨ璁惧淇℃伅鍜屼骇绾夸俊鎭�-->
@@ -188,6 +191,54 @@
                 #{id}
             </foreach>
         </where>
+        ORDER BY mp.production_order
+    </select>
+
+    <!--鏍规嵁澶у睆杞﹂棿id鏌ヨ璁惧鍒楄〃-->
+    <select id="getEquipmentByWorkshopId" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
+        SELECT
+            me.*
+        FROM
+            mdc_workshop_equipment mwe
+            LEFT JOIN mdc_equipment me ON me.equipment_id = mwe.equipment_id
+        <where>
+            AND mwe.workshop_id = #{ workshopEquipmentVo.workshopId }
+            <if test="workshopEquipmentVo.equipmentId != null and workshopEquipmentVo.equipmentId != ''">
+                AND mwe.equipment_id = #{ workshopEquipmentVo.equipmentId }
+            </if>
+        </where>
+        ORDER BY me.equipment_id
+    </select>
+
+    <!--鍒嗛〉鍒楄〃-->
+    <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
+        SELECT
+            t1.*
+        FROM
+            mdc_equipment t1
+            LEFT JOIN mdc_production_equipment t2 ON t1.id = t2.equipment_id
+            LEFT JOIN mdc_production t3 ON t2.production_id = t3.id
+        <where>
+            <if test="mdcEquipment.equipmentId != null and mdcEquipment.equipmentId != '' ">
+                AND t1.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipment.equipmentId}),'%')
+            </if>
+            <if test="mdcEquipment.equipmentName != null and mdcEquipment.equipmentName != '' ">
+                AND t1.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipment.equipmentName}),'%')
+            </if>
+            <if test="mdcEquipment.equipmentModel != null and mdcEquipment.equipmentModel != '' ">
+                AND t1.equipment_name = #{mdcEquipment.equipmentModel}
+            </if>
+            <if test="mdcEquipment.equipmentType != null and mdcEquipment.equipmentType != '' ">
+                AND t1.equipmentType = #{mdcEquipment.equipmentType}
+            </if>
+            <if test="mdcEquipment.driveType != null and mdcEquipment.driveType != '' ">
+                AND t1.drive_type = #{mdcEquipment.driveType}
+            </if>
+            <if test="mdcEquipment.productionName != null and mdcEquipment.productionName != '' ">
+                AND t3.production_name LIKE CONCAT(CONCAT('%',#{mdcEquipment.productionName}),'%')
+            </if>
+        </where>
+        order by t1.sort_no
     </select>
 
 

--
Gitblit v1.9.3