Commit 22fed74d authored by wujiang's avatar wujiang

修改告警问题

parent 179edab1
...@@ -70,8 +70,8 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent ...@@ -70,8 +70,8 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent
for(Object o:arr) for(Object o:arr)
{ {
JSONObject json = JSONObject.parseObject(JSONObject.toJSONString(o)); JSONObject json = JSONObject.parseObject(JSONObject.toJSONString(o));
if (json.containsKey(value)) { if (json.containsKey("key")&&value.equals(json.get("key"))) {
String warn = json.getString(value); String warn = json.getString("label");
if (warn.indexOf("备留") == -1) { if (warn.indexOf("备留") == -1) {
equipAlarmEvent.setEquipName(objName); equipAlarmEvent.setEquipName(objName);
equipAlarmEvent.setEventDesc(indexName); equipAlarmEvent.setEventDesc(indexName);
...@@ -81,7 +81,6 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent ...@@ -81,7 +81,6 @@ public class AlarmEventServiceImpl extends BaseService<AlarmEventDto, AlarmEvent
} }
} }
} }
} else { } else {
// equipAlarmEvent.setEquipIndex(value); // equipAlarmEvent.setEquipIndex(value);
equipAlarmEvent.setEquipName(objName); equipAlarmEvent.setEquipName(objName);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
equip_alarm_event(created_time,staion_name,staion_id,gateway_id,equip_index,event_desc,equip_name,front_module,value) equip_alarm_event(created_time,staion_name,staion_id,gateway_id,equip_index,event_desc,equip_name,front_module,value)
VALUES VALUES
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(NOW(),#{item.stationName},#{item.stationId},#{item.gatewayId},#{item.equipIndex},'#{item.eventDesc}','#{item.equipName}',#{item.frontModule},#{item.value}) (NOW(),#{item.stationName},#{item.stationId},#{item.gatewayId},#{item.equipIndex},'#{item.eventDesc}','#{item.equipName}',#{item.frontModule},'#{item.value}')
</foreach> </foreach>
</insert> </insert>
</mapper> </mapper>
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