From 32be453ce79ce4e9efbeb3ab4ef6db501a6f0230 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期一, 31 三月 2025 09:19:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

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

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentStatisticalInfoMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentStatisticalInfoMapper.xml
index e5d1c6b..2d4f020 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentStatisticalInfoMapper.xml
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentStatisticalInfoMapper.xml
@@ -12,4 +12,18 @@
     <select id="selectProcessLong" resultType="java.lang.Integer">
         SELECT TOP 1 process_long FROM mdc_equipment_statistical_info WHERE equipment_id = #{equipmentId} AND the_date = #{validDate}
     </select>
+
+    <select id="findByEquipmentAndMonth" resultType="org.jeecg.modules.mdc.dto.MdcEquipmentStatisticalDto">
+        SELECT
+            SUM(open_long) openLong,
+            SUM(close_long) closeLong,
+            SUM(wait_long) waitLong,
+            SUM(process_long) processLong,
+            SUM(error_long) errorLong,
+            COUNT(*) dayNum
+        FROM
+            mdc_equipment_statistical_info
+        WHERE
+            equipment_id = #{equipmentId} AND the_date LIKE CONCAT(#{date}, '%')
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3