From 6da57b610d97be3f79084d43440e7823d707b249 Mon Sep 17 00:00:00 2001
From: hyingbo <1363390067@qq.com>
Date: 星期四, 04 九月 2025 17:54:55 +0800
Subject: [PATCH] 设备管理调整

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

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EquipmentHomeMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EquipmentHomeMapper.xml
new file mode 100644
index 0000000..f86c224
--- /dev/null
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EquipmentHomeMapper.xml
@@ -0,0 +1,37 @@
+<?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.eam.mapper.EquipmentHomeMapper">
+
+
+    <select id="getEquipmentTechnologyStatusList"  parameterType="String" resultType="Map">
+        SELECT
+            ( SELECT COUNT ( 0 ) FROM eam_equipment WHERE del_flag = '0' and technology_status = '1') as qualifiedCount,
+            ( SELECT COUNT ( 0 ) FROM eam_equipment WHERE del_flag = '0' and technology_status = '2') as  limitedUseCount,
+            ( SELECT COUNT ( 0 ) FROM eam_equipment WHERE del_flag = '0' and technology_status = '3')  as disabledCount
+    </select>
+
+    <select id="getReportRepairEquipmentList"  parameterType="String" resultType="Map">
+        SELECT
+            ( select COUNT(0) from eam_report_repair t1 left join eam_equipment t2 on t1.equipment_id = t2.id WHERE t1.del_flag = '0' and SUBSTRING(CONVERT(VARCHAR(10), t1.fault_start_time, 120), 1, 10) = SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 1, 10)) as failurTotalCount,
+            ( select COUNT(0) from eam_report_repair t1 left join eam_equipment t2 on t1.equipment_id = t2.id where t1.del_flag = '0' and t1.breakdown_flag = '1' and SUBSTRING(CONVERT(VARCHAR(10), t1.fault_start_time, 120), 1, 10) = SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 1, 10)) as  noStopCount,
+            ( select COUNT(0) from eam_report_repair t1 left join eam_equipment t2 on t1.equipment_id = t2.id where t1.del_flag = '0' and t1.breakdown_flag = '0' and SUBSTRING(CONVERT(VARCHAR(10), t1.fault_start_time, 120), 1, 10) = SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 1, 10)) as  stopCount
+    </select>
+    <select id="getThirdGuaranteesPlan" resultType="org.jeecg.modules.eam.entity.EamThirdMaintenanceOrder">
+        SELECT
+          *
+        FROM
+          eam_third_maintenance_order
+        WHERE
+          del_flag = '0'
+          AND SUBSTRING(CONVERT (VARCHAR (10), maintenance_date, 120), 1, 7) = #{date}
+    </select>
+    <select id="getSecondGuaranteesPlan" resultType="org.jeecg.modules.eam.entity.EamSecondMaintenanceOrder">
+        SELECT
+          *
+        FROM
+            eam_second_maintenance_order
+        WHERE
+          del_flag = '0'
+          AND SUBSTRING(CONVERT (VARCHAR (10), maintenance_date, 120), 1, 7) = #{date}
+    </select>
+</mapper>
\ No newline at end of file

--
Gitblit v1.9.3