From 0d3e5cefe51ab44f28097839405c1a4c31466650 Mon Sep 17 00:00:00 2001 From: lius <Lius2225@163.com> Date: 星期四, 07 九月 2023 14:40:49 +0800 Subject: [PATCH] 报警分析走势 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentRunningSectionMapper.xml | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 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 ad4fba3..4cfc2d6 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 @@ -91,5 +91,38 @@ start_time </select> + <!--鏌ヨ鏁伴噺--> + <select id="findAlarmCount" resultType="java.lang.Integer"> + SELECT + COUNT(*) + FROM + mdc_equipment_running_section + <where> + AND status = '22' + AND alarm = #{ alarmCode } + AND (start_time <= #{ vo.endDate } AND end_time >= #{ vo.startDate }) + AND equipment_id = #{ equipmentId } + </where> + </select> + + <!--鏍规嵁鏃ユ湡鏌ヨ鏁伴噺--> + <select id="findAlarmCountByDate" resultType="java.lang.Integer"> + SELECT + COUNT(*) + FROM + mdc_equipment_running_section + <where> + AND status = '22' + AND alarm = #{ vo.alarmCode } + AND (start_time <= #{ vo.endDate } AND end_time >= #{ vo.startDate }) + <if test="vo.equipmentIdList != null and vo.equipmentIdList.size() > 0 "> + AND equipment_id IN + <foreach collection="vo.equipmentIdList" item="id" index="index" open="(" close=")" separator=","> + #{ id } + </foreach> + </if> + </where> + </select> + </mapper> \ No newline at end of file -- Gitblit v1.9.3