From 6701732c08bb8e5a20c5d7c2deb69c760344013d Mon Sep 17 00:00:00 2001
From: lius <Lius2225@163.com>
Date: 星期一, 31 七月 2023 15:40:06 +0800
Subject: [PATCH] 对比分析接口

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

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEfficiencyReportMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEfficiencyReportMapper.xml
index 9c855df..c7b0eb8 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEfficiencyReportMapper.xml
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEfficiencyReportMapper.xml
@@ -111,4 +111,31 @@
         ORDER BY
             t1.the_date
     </select>
+
+    <!--鏌ヨ鍘熷鏁版嵁-->
+    <select id="comparativeAnalysis" resultType="org.jeecg.modules.mdc.dto.MdcComAnaDto">
+        SELECT
+            mesi.equipment_id equipmentId,
+            SUM ( mesi.open_long ) openLong,
+            SUM ( mesi.close_long ) closeLong,
+            SUM ( mesi.wait_long ) waitLong,
+            SUM ( mesi.process_long ) processLong
+        FROM
+            mdc_equipment_statistical_info mesi
+            LEFT JOIN mdc_equipment me ON mesi.equipment_id = me.equipment_id
+        <where>
+            <if test="vo.equipmentIdList != null and vo.equipmentIdList.size() > 0 ">
+                AND mesi.equipment_id IN
+                <foreach collection="vo.equipmentIdList" item="id" index="index" open="(" close=")" separator=",">
+                    #{ id }
+                </foreach>
+            </if>
+            <if test="vo.driveType != null and vo.driveType != null">
+                AND me.drive_type = #{ vo.driveType }
+            </if>
+            AND mesi.the_date BETWEEN #{ vo.startTime } AND #{ vo.endTime }
+        </where>
+        GROUP BY
+            mesi.equipment_id
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3