From 7f11e541f239d8c816bcefb32aae6b9efa31e28e Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期三, 13 十二月 2023 16:49:15 +0800
Subject: [PATCH] 生产线点检

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

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentRunningSectionMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentRunningSectionMapper.xml
index 7d4294e..003fed6 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentRunningSectionMapper.xml
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentRunningSectionMapper.xml
@@ -71,5 +71,59 @@
             start_time
     </select>
 
+    <!--鏌ヨ涓�娈垫椂闂村唴鐨勬姤璀︽暟鎹�-->
+    <select id="findAlarmList" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection">
+        SELECT
+            *
+        FROM
+            mdc_equipment_running_section
+        <where>
+            <if test="vo.equipmentIdList != null and vo.equipmentIdList.size() > 0 ">
+                AND equipment_id IN
+                <foreach collection="vo.equipmentIdList" item="id" index="index" open="(" close=")" separator=",">
+                    #{ id }
+                </foreach>
+            </if>
+            AND (start_time &lt;= #{ vo.endDate } AND end_time &gt;= #{ vo.startDate })
+            AND status = '22'
+            AND alarm != ''
+        </where>
+        ORDER BY
+            start_time
+    </select>
+
+    <!--鏌ヨ鏁伴噺-->
+    <select id="findAlarmCount" resultType="java.lang.Integer">
+        SELECT
+            COUNT(*)
+        FROM
+            mdc_equipment_running_section
+        <where>
+            AND status = '22'
+            AND alarm = #{ alarmCode }
+            AND (start_time &lt;= #{ endDate } AND end_time &gt;= #{ startDate })
+            AND equipment_id = #{ equipmentId }
+        </where>
+    </select>
+
+    <!--鏍规嵁鏃ユ湡鏌ヨ鏁伴噺-->
+    <select id="findAlarmCountByDate" resultType="java.lang.Integer">
+        SELECT
+            COUNT(*)
+        FROM
+            mdc_equipment_running_section
+        <where>
+            AND status = '22'
+            AND alarm = #{ vo.alarmCode }
+            AND (start_time &lt;= #{ endDate } AND end_time &gt;= #{ startDate })
+            <if test="vo.equipmentIdList != null and vo.equipmentIdList.size() > 0 ">
+                AND equipment_id IN
+                <foreach collection="vo.equipmentIdList" item="id" index="index" open="(" close=")" separator=",">
+                    #{ id }
+                </foreach>
+            </if>
+        </where>
+    </select>
+
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3