From 1292cf73f7db223f35ab450eabeeedbf8802eb5a Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期四, 14 三月 2024 09:35:32 +0800 Subject: [PATCH] 首页设备状态计数接口 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentRunningSectionMapper.xml | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 50 insertions(+), 1 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentRunningSectionMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentRunningSectionMapper.xml index 58c6950..a2b6082 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentRunningSectionMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentRunningSectionMapper.xml @@ -86,6 +86,7 @@ </if> AND (start_time <= #{ vo.endDate } AND end_time >= #{ vo.startDate }) AND status = '22' + AND alarm != '' </where> ORDER BY start_time @@ -100,7 +101,7 @@ <where> AND status = '22' AND alarm = #{ alarmCode } - AND (start_time <= #{ vo.endDate } AND end_time >= #{ vo.startDate }) + AND (start_time <= #{ endDate } AND end_time >= #{ startDate }) AND equipment_id = #{ equipmentId } </where> </select> @@ -124,5 +125,53 @@ </where> </select> + <!--鏌ヨ鏃堕棿娈靛唴杩愯鏁版嵁--> + <select id="selectRunningData" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection"> + SELECT + * + FROM + mdc_equipment_running_section + WHERE + equipment_id = #{ equipmentId } + AND status = '3' + AND (start_time <= #{ endDate } AND end_time >= #{ startDate }) + ORDER BY + start_time + </select> + + <!--鏌ヨ鎶ヨ鍙锋姤璀﹁缁嗕俊鎭�--> + <select id="selectAlarmList" resultType="org.jeecg.modules.mdc.dto.MdcAlarmListDto"> + SELECT + t1.equipment_id, + t2.equipment_name, + t1.start_time, + t1.end_time, + t1.duration + FROM + mdc_equipment_running_section t1 LEFT JOIN mdc_equipment t2 ON t1.equipment_id = t2.equipment_id + <where> + AND t1.status = '22' + AND t1.alarm = #{ vo.alarmCode } + AND (t1.start_time <= #{ endDate } AND t1.end_time >= #{ startDate }) + <if test="vo.equipmentIdList != null and vo.equipmentIdList.size() > 0 "> + AND t1.equipment_id IN + <foreach collection="vo.equipmentIdList" item="id" index="index" open="(" close=")" separator=","> + #{ id } + </foreach> + </if> + </where> + </select> + + <select id="getDataList" resultType="java.lang.Integer"> + SELECT + status + FROM + mdc_equipment_running_section + WHERE + equipment_id = #{ equipmentId } + AND start_time > #{date} + AND status IS NOT NULL + </select> + </mapper> \ No newline at end of file -- Gitblit v1.9.3