From 23855599412c4d61b38d78f0f3abd3430a48b5b1 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期三, 25 六月 2025 11:51:38 +0800
Subject: [PATCH] Merge branch 'mdc_hyjs_master'

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

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentFaultInfoMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentFaultInfoMapper.xml
new file mode 100644
index 0000000..3136e97
--- /dev/null
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentFaultInfoMapper.xml
@@ -0,0 +1,30 @@
+<?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.MdcEquipmentFaultInfoMapper">
+
+    <select id="findFaultRecord" resultType="org.jeecg.modules.mdc.vo.EquFaultRecord">
+        SELECT
+            t3.equipment_code equipmentId,
+            t1.fault_start_time startTime,
+            t2.actual_end_time endTime
+        FROM
+            eam_report_repair t1
+            LEFT JOIN eam_repair_order t2 ON t2.report_id = t1.id
+            LEFT JOIN eam_equipment t3 ON t1.equipment_id = t3.id
+        WHERE
+            (
+                ( t1.fault_start_time BETWEEN #{startTime} AND #{endTime} )
+                OR ( t2.actual_end_time BETWEEN #{startTime} AND #{endTime} )
+                OR ( t1.fault_start_time &lt; #{startTime} AND t2.actual_end_time IS NULL )
+            )
+          AND t3.equipment_code IN
+            <foreach collection="equipmentIdList" item="id" index="index" open="(" close=")" separator=",">
+                #{ id }
+            </foreach>
+          AND t1.report_status != 'ABOLISH'
+    </select>
+
+    <select id="getMaxStaticsData" resultType="java.lang.String">
+        SELECT TOP 1 the_date FROM mdc_equipment_fault_info ORDER BY the_date DESC
+    </select>
+</mapper>
\ No newline at end of file

--
Gitblit v1.9.3