Commit be6298e4 authored by tianyiming's avatar tianyiming

单个稳压泵指标展示修改

parent fb4a1fae
......@@ -22,8 +22,9 @@ public enum PressurePumpRelateEnum {
PRESSURE_PUMP_START_BEFORE_MINUTE("-5", "稳压泵启泵前分钟数"),
PIPE_PRESSURE_NORMAL_STATUS("正常", "稳压泵管网压力正常状态"),
PIPE_PRESSURE_ABNORMAL_STATUS("异常", "稳压泵管网压力异常状态"),
START("1", "稳压泵启动"),
STOP("0", "稳压泵停止"),
START("1", "启动"),
STOP("0", "停止"),
RESET("2", "复位"),
CREATED_TIME("createdTime", "物联采集信号创建时间属性"),
UN_CLEAN_TIME("false", "未消除");
......
......@@ -144,8 +144,12 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
time = false;
}
}
if(PressurePumpRelateEnum.START.getDesc().contains(stateMap.get("equipment_index_name")) && PressurePumpRelateEnum.IOT_INDEX_VALUE_FALSE.getValue().contains(stateMap.get("value"))){
item.put("equipment_index_name", PressurePumpRelateEnum.STOP.getDesc());
if(PressurePumpRelateEnum.IOT_INDEX_VALUE_FALSE.getValue().contains(stateMap.get("value"))){
if(PressurePumpRelateEnum.START.getDesc().contains(stateMap.get("equipment_index_name"))){
item.put("equipment_index_name", PressurePumpRelateEnum.STOP.getDesc());
} else {
item.put("equipment_index_name", PressurePumpRelateEnum.RESET.getDesc());
}
} else {
item.put("equipment_index_name", stateMap.get("equipment_index_name"));
}
......
......@@ -2832,41 +2832,19 @@
</select>
<select id="queryPressureNowSignalBySpecificId" resultType="java.util.Map">
( SELECT
DATE_FORMAT( i.update_date, '%Y-%m-%d %H:%i:%S' ) update_date,
i.equipment_index_name,
`value`
FROM
wl_equipment_specific_index i
WHERE
i.equipment_specific_id = #{id,jdbcType=VARCHAR}
AND
VALUE = "true"
AND i.equipment_index_key NOT IN ( 'FHS_PressurePump_Start', 'FHS_PressurePump_Stop' )
ORDER BY
i.update_date DESC
LIMIT 1
) UNION
(
SELECT
DATE_FORMAT( i.update_date, '%Y-%m-%d %H:%i:%S' ) update_date,
i.equipment_index_name,
VALUE
DATE_FORMAT( i.update_date, '%Y-%m-%d %H:%i:%S' ) update_date,
i.equipment_index_name,
`value`
FROM
wl_equipment_specific_index i
wl_equipment_specific_index i
WHERE
i.equipment_specific_id = #{id,jdbcType=VARCHAR}
AND
VALUE
<![CDATA[<>]]> ''
AND
VALUE
IS NOT NULL
AND i.equipment_index_key = 'FHS_PressurePump_Start'
)
i.equipment_specific_id = #{id,jdbcType=VARCHAR}
AND
VALUE in ("true","false")
ORDER BY
update_date DESC
LIMIT 1
i.update_date DESC
LIMIT 1
</select>
<select id="getPressurePumpInfo3Small" resultType="java.util.Map">
......
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