From e17986e0800584f650b42c6fb632d0244d695a35 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 31 十月 2024 16:13:55 +0800
Subject: [PATCH] update

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/screen/mapper/xml/MdcSubLargeScreenMapper.xml |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/screen/mapper/xml/MdcSubLargeScreenMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/screen/mapper/xml/MdcSubLargeScreenMapper.xml
index 4c3398d..1155b0b 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/screen/mapper/xml/MdcSubLargeScreenMapper.xml
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/screen/mapper/xml/MdcSubLargeScreenMapper.xml
@@ -5,7 +5,8 @@
     <!--褰撴棩鐢熶骇璁″垝-->
     <select id="todayProductionProgress" resultType="org.jeecg.modules.screen.dto.MdcProductDayscheduleDto">
         SELECT
-            t1.*
+            t1.*,
+            t2.equipment_name equipmentName
         FROM
             mdcJc_ProductDayschedule t1
                 LEFT JOIN mdc_equipment t2 ON t1.equipmentID = t2.equipment_id
@@ -31,5 +32,31 @@
                 LEFT JOIN mdc_production_equipment t3 ON t1.id = t3.equipment_id
         WHERE
             t3.production_id  = #{productionId}
+        ORDER BY
+            t1.sort_no
+    </select>
+
+    <!--鍒�鍏峰鍛藉垪琛�-->
+    <select id="toolLifeList" resultType="org.jeecg.modules.screen.dto.ToolLifeDto">
+        SELECT
+            t.*
+        FROM
+            (
+                SELECT
+                    a.EquipmentID equipmentId,
+                    t1.equipment_name equipmentName,
+                    a.TId tId,
+                    a.InitLife initLife,
+                    a.CurrentLife currentLife,
+                    row_number( ) OVER ( partition BY EquipmentID, TId ORDER BY CollectTime DESC ) rw
+                FROM
+                    Basi_CuttingToolCraftLife a
+                        LEFT JOIN mdc_equipment t1 ON t1.equipment_id = a.EquipmentID
+                        LEFT JOIN mdc_production_equipment t2 ON t1.id = t2.equipment_id
+                WHERE
+                    t2.production_id = #{productionId}
+            ) t
+        WHERE
+            t.rw = 1;
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3