Commit 42177af4 authored by chenzhao's avatar chenzhao

修改bug

parent 3b547583
......@@ -1291,7 +1291,7 @@
AS `status`
FROM
(SELECT ffs.id,ffs.name FROM f_fire_fighting_system ffs
WHERE ffs.biz_org_code = #{bizOrgCode}
WHERE ffs.biz_org_code like concat(#{bizOrgCode} ,'%')
) temp
LEFT JOIN
(SELECT esa.system_ids,COUNT(DISTINCT(esa.iot_code)) AS notReturned
......@@ -1302,9 +1302,8 @@
GROUP BY esa.system_ids)temp1
on
FIND_IN_SET(temp.id,temp1.system_ids)
LEFT JOIN
(SELECT esa.system_ids,COUNT(DISTINCT(esa.iot_code)) AS total
LEFT JOIN
(SELECT esa.system_ids,COUNT(DISTINCT(esa.iot_code)) AS total
FROM wl_equipment_specific_alarm esa
WHERE esa.type = "BREAKDOWN" and esa.create_date BETWEEN #{startTime} and #{endTime}
GROUP BY esa.system_ids)temp2
......@@ -1329,12 +1328,12 @@
(
SELECT COUNT(DISTINCT(esa.iot_code)) FROM wl_equipment_specific_alarm esa
WHERE esa.org_code = #{orgCode}
and create_date between #{startTime} and #{endTime}
and update_date between #{startTime} and #{endTime}
)AS alarmEquipNum,
(
SELECT COUNT(DISTINCT(esa.iot_code)) FROM wl_equipment_specific_alarm esa
WHERE esa.org_code = #{orgCode} AND esa.equipment_specific_index_value = "true"
and create_date between #{startTime} and #{endTime}
and update_date between #{startTime} and #{endTime}
)as notReturned)temp
</select>
<select id="inspectionMessage" resultType="java.util.Map">
......
......@@ -2201,7 +2201,7 @@
)
)
) AS `todayAlarmNum`,
IF (
(
(
......@@ -4672,7 +4672,27 @@
</select>
<select id="getWaterInfoBySuper" resultType="java.util.Map">
select * from (
select
*,
(
CASE
WHEN nowLevel IS NOT NULL
AND maxLevel IS NOT NULL
AND nowLevel - maxLevel > 0 THEN
'1'
WHEN nowLevel IS NOT NULL
AND minLevel IS NOT NULL
AND nowLevel != '--'
AND nowLevel - minLevel >= 0 THEN
'2'
WHEN nowLevel IS NOT NULL
AND minLevel IS NOT NULL AND nowLevel != '--'
AND minLevel - nowLevel > 0 THEN
'0' ELSE '4'
END
) AS `status`
from (
(SELECT
r.`name`,
IFNULL( rp.min_water_level, 0 ) AS minLevel,
......@@ -4871,7 +4891,10 @@
a.nowPressureDate,
(
CASE
WHEN nowPressure IS NOT NULL
AND maxLevel IS NOT NULL
AND nowPressure - maxLevel > 0 THEN
'压力高'
WHEN nowPressure IS NOT NULL
AND minLevel IS NOT NULL
AND nowPressure - minLevel >= 0 THEN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment