Commit 22fed74d authored by wujiang's avatar wujiang

修改告警问题

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