Commit 42177af4 authored by chenzhao's avatar chenzhao

修改bug

parent 3b547583
...@@ -1291,7 +1291,7 @@ ...@@ -1291,7 +1291,7 @@
AS `status` AS `status`
FROM FROM
(SELECT ffs.id,ffs.name FROM f_fire_fighting_system ffs (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 ) temp
LEFT JOIN LEFT JOIN
(SELECT esa.system_ids,COUNT(DISTINCT(esa.iot_code)) AS notReturned (SELECT esa.system_ids,COUNT(DISTINCT(esa.iot_code)) AS notReturned
...@@ -1302,9 +1302,8 @@ ...@@ -1302,9 +1302,8 @@
GROUP BY esa.system_ids)temp1 GROUP BY esa.system_ids)temp1
on on
FIND_IN_SET(temp.id,temp1.system_ids) FIND_IN_SET(temp.id,temp1.system_ids)
LEFT JOIN
LEFT JOIN (SELECT esa.system_ids,COUNT(DISTINCT(esa.iot_code)) AS total
(SELECT esa.system_ids,COUNT(DISTINCT(esa.iot_code)) AS total
FROM wl_equipment_specific_alarm esa FROM wl_equipment_specific_alarm esa
WHERE esa.type = "BREAKDOWN" and esa.create_date BETWEEN #{startTime} and #{endTime} WHERE esa.type = "BREAKDOWN" and esa.create_date BETWEEN #{startTime} and #{endTime}
GROUP BY esa.system_ids)temp2 GROUP BY esa.system_ids)temp2
...@@ -1329,12 +1328,12 @@ ...@@ -1329,12 +1328,12 @@
( (
SELECT COUNT(DISTINCT(esa.iot_code)) FROM wl_equipment_specific_alarm esa SELECT COUNT(DISTINCT(esa.iot_code)) FROM wl_equipment_specific_alarm esa
WHERE esa.org_code = #{orgCode} WHERE esa.org_code = #{orgCode}
and create_date between #{startTime} and #{endTime} and update_date between #{startTime} and #{endTime}
)AS alarmEquipNum, )AS alarmEquipNum,
( (
SELECT COUNT(DISTINCT(esa.iot_code)) FROM wl_equipment_specific_alarm esa SELECT COUNT(DISTINCT(esa.iot_code)) FROM wl_equipment_specific_alarm esa
WHERE esa.org_code = #{orgCode} AND esa.equipment_specific_index_value = "true" 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 )as notReturned)temp
</select> </select>
<select id="inspectionMessage" resultType="java.util.Map"> <select id="inspectionMessage" resultType="java.util.Map">
......
...@@ -2201,7 +2201,7 @@ ...@@ -2201,7 +2201,7 @@
) )
) )
) AS `todayAlarmNum`, ) AS `todayAlarmNum`,
IF ( IF (
( (
( (
...@@ -4672,7 +4672,27 @@ ...@@ -4672,7 +4672,27 @@
</select> </select>
<select id="getWaterInfoBySuper" resultType="java.util.Map"> <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 (SELECT
r.`name`, r.`name`,
IFNULL( rp.min_water_level, 0 ) AS minLevel, IFNULL( rp.min_water_level, 0 ) AS minLevel,
...@@ -4871,7 +4891,10 @@ ...@@ -4871,7 +4891,10 @@
a.nowPressureDate, a.nowPressureDate,
( (
CASE CASE
WHEN nowPressure IS NOT NULL
AND maxLevel IS NOT NULL
AND nowPressure - maxLevel > 0 THEN
'压力高'
WHEN nowPressure IS NOT NULL WHEN nowPressure IS NOT NULL
AND minLevel IS NOT NULL AND minLevel IS NOT NULL
AND nowPressure - minLevel >= 0 THEN 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