From 08394ddba46994e5b6c05080fc9b40b4daf36292 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期一, 11 八月 2025 16:11:57 +0800
Subject: [PATCH] update

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml
index 2e1c915..be6712a 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOeeInfoMapper.xml
@@ -28,22 +28,28 @@
         ORDER BY the_date DESC, equipment_id ASC
     </select>
 
-    <select id="findByEquIdsAndDate" resultType="java.math.BigDecimal">
+    <select id="findByEquIdsAndDate" resultType="org.jeecg.modules.mdc.entity.MdcOeeInfo">
         SELECT
-            AVG ( oee )
+            the_date,
+            AVG ( oee ) oee
         FROM
             mdc_oee_info
         <where>
-            the_date = #{date}
+            the_date BETWEEN #{start} AND #{end}
             AND equipment_id IN
             <foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=",">
                 #{ id }
             </foreach>
+            AND plan_close_long != 1440
         </where>
+        GROUP BY
+            the_date
+        ORDER BY
+            the_date
     </select>
 
-    <select id="findByEquIdAndDate" resultType="java.math.BigDecimal">
-        SELECT oee FROM mdc_oee_info WHERE the_date = #{date} AND equipment_id = #{equipmentId}
+    <select id="findByEquIdAndDate" resultType="org.jeecg.modules.mdc.entity.MdcOeeInfo">
+        SELECT * FROM mdc_oee_info WHERE the_date BETWEEN #{start} AND #{end} AND equipment_id = #{equipmentId} ORDER BY the_date
     </select>
 
     <select id="findByEquIdAndMonth" resultType="java.math.BigDecimal">
@@ -53,6 +59,6 @@
             mdc_oee_info
         WHERE
             the_date LIKE CONCAT(#{month}, '%')
-          AND equipment_id = #{equipmentId}
+          AND equipment_id = #{equipmentId} AND plan_close_long != 1440
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3