From 9b015b51b72ba050b4c38a6ba79eb45b7065e67d Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 25 七月 2024 10:11:52 +0800
Subject: [PATCH] 调整sql

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

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentWorklineMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentWorklineMapper.xml
index b2d831d..05698e7 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentWorklineMapper.xml
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/EquipmentWorklineMapper.xml
@@ -5,4 +5,20 @@
     <select id="getMacingDataList" resultType="org.jeecg.modules.mdc.dto.MdcEquipmentDto">
         select top 1 [${tableName}].* from [${tableName}] order by CollectTime  desc
     </select>
+
+    <select id="findRunningData" resultType="java.lang.String">
+        SELECT ProductCount FROM [${tableName}] WHERE ProductCount &lt;&gt; '' AND CollectTime BETWEEN #{ startTime } AND #{ endTime } GROUP BY ProductCount ORDER BY ProductCount
+    </select>
+
+    <select id="getEquipProgramNum" resultType="org.jeecg.modules.mdc.dto.EquipmentMachingDto">
+        select Programnumber,CollectTime from [${tableName}] where CollectTime &gt; #{startTime} and CollectTime &lt;= #{endTime} and Programnumber is not null
+    </select>
+
+    <select id="findProductCountStartTime" resultType="org.jeecg.modules.mdc.dto.MdcEquipmentDto">
+        SELECT TOP 1 [${tableName}].* FROM [${tableName}] WHERE ProductCount = #{ productCount } AND CollectTime BETWEEN #{ startTime } AND #{ endTime } ORDER BY CollectTime ASC
+    </select>
+
+    <select id="findProductCountEndTime" resultType="org.jeecg.modules.mdc.dto.MdcEquipmentDto">
+        SELECT TOP 1 [${tableName}].* FROM [${tableName}] WHERE ProductCount = #{ productCount } AND CollectTime BETWEEN #{ startTime } AND #{ endTime } ORDER BY CollectTime DESC
+    </select>
 </mapper>

--
Gitblit v1.9.3