From b5d02520af582a86aa95d7903558a5bf50a77aa7 Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期二, 17 六月 2025 16:12:46 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentFaultInfoMapper.xml | 26 ++++++++++++++++++++++++++ 1 files changed, 26 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..35d17f7 --- /dev/null +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentFaultInfoMapper.xml @@ -0,0 +1,26 @@ +<?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 < #{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> +</mapper> \ No newline at end of file -- Gitblit v1.9.3