From 63d50da13d256f7df075f37054a239740bf172ac Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 14 三月 2024 16:01:05 +0800
Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/mdc_430 into develop

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

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcHomeMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcHomeMapper.xml
new file mode 100644
index 0000000..b358a64
--- /dev/null
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcHomeMapper.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.mdc.mapper.MdcHomeMapper">
+
+    <select id="getProductionByPid" resultType="org.jeecg.modules.system.entity.MdcProduction">
+        SELECT
+            t1.*
+        FROM
+            mdc_production t1
+                LEFT JOIN mdc_user_production t2 ON t1.id = t2.pro_id
+        WHERE
+            t1.parent_id = #{ productionId } AND t2.user_id = #{ userId }
+    </select>
+
+    <select id="getProcessCount" resultType="java.math.BigDecimal">
+        SELECT
+            SUM(process_long)
+        FROM
+            mdc_equipment_statistical_info
+        <where>
+            <if test="equipmentIdList != null and equipmentIdList.size() > 0 ">
+                AND equipment_id IN
+                <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
+            AND the_date = #{ date }
+        </where>
+    </select>
+
+    <select id="getOeeByDate" resultType="java.math.BigDecimal">
+        SELECT
+            SUM(overall_equipment_efficiency)
+        FROM
+            mdc_overall_equipment_efficiency
+        <where>
+            <if test="equipmentIdList != null and equipmentIdList.size() > 0 ">
+                AND equipment_id IN
+                <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
+            AND valid_date = #{ date }
+        </where>
+    </select>
+
+    <select id="getUtilizationByMonth" resultType="java.util.Map">
+        SELECT
+            SUM(process_long) processLong,
+            COUNT(*) processDay
+        FROM
+            mdc_equipment_statistical_info
+        <where>
+            <if test="equipmentIdList != null and equipmentIdList.size() > 0 ">
+                AND equipment_id IN
+                <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
+            AND the_date LIKE CONCAT('%', #{ date } ,'%')
+        </where>
+    </select>
+
+</mapper>
\ No newline at end of file

--
Gitblit v1.9.3