|
|
@ -611,16 +611,14 @@ public class DeviceMessageHandler { |
|
|
|
String content = direction + stakeMark + precipitationType; |
|
|
|
|
|
|
|
Map<String, Object> contentMap = new HashMap<>(); |
|
|
|
contentMap.put("content", content); |
|
|
|
contentMap.put("event", meteorologicalDetectorData); |
|
|
|
WebSocketService.broadcast(WebSocketEvent.WARNING, contentMap); |
|
|
|
|
|
|
|
JSONObject object = new JSONObject(); |
|
|
|
object.put("meteorologicalDetectorData", meteorologicalDetectorData); |
|
|
|
String string = object.toString(); |
|
|
|
|
|
|
|
DcWarning dcWarning = new DcWarning(); |
|
|
|
dcWarning.setWarningState(UniversalEnum.ONE.getNumber()); |
|
|
|
dcWarning.setRemark(content); |
|
|
|
dcWarning.setRemark(new Date()+" "+content); |
|
|
|
dcWarning.setWarningTime(new Date()); |
|
|
|
dcWarning.setWarningType(UniversalEnum.EIGHT_ONE.getNumber()); |
|
|
|
dcWarning.setWarningSubclass(UniversalEnum.EIGHT_ONE.getValue()); |
|
|
@ -635,6 +633,10 @@ public class DeviceMessageHandler { |
|
|
|
if (direction.equals(UniversalEnum.DIRECTION_OF_JINAN.getValue())) { |
|
|
|
dcWarning.setDirection(UniversalEnum.THREE.getValue()); |
|
|
|
} |
|
|
|
contentMap.put("content", content); |
|
|
|
contentMap.put("event", dcWarning); |
|
|
|
|
|
|
|
WebSocketService.broadcast(WebSocketEvent.WARNING, contentMap); |
|
|
|
|
|
|
|
dcWarningService.insertDcWarning(dcWarning); |
|
|
|
|
|
|
@ -663,7 +665,7 @@ public class DeviceMessageHandler { |
|
|
|
String string = object.toString(); |
|
|
|
DcWarning dcWarning = new DcWarning(); |
|
|
|
dcWarning.setWarningState(UniversalEnum.ONE.getNumber()); |
|
|
|
dcWarning.setRemark(content); |
|
|
|
dcWarning.setRemark(new Date()+" "+content); |
|
|
|
dcWarning.setWarningTime(new Date()); |
|
|
|
dcWarning.setWarningType(UniversalEnum.EIGHT_FOUR.getNumber()); |
|
|
|
dcWarning.setWarningSubclass(UniversalEnum.EIGHT_FOUR.getValue()); |
|
|
@ -677,7 +679,11 @@ public class DeviceMessageHandler { |
|
|
|
if (direction.equals(UniversalEnum.DIRECTION_OF_JINAN.getValue())) { |
|
|
|
dcWarning.setDirection(UniversalEnum.THREE.getValue()); |
|
|
|
} |
|
|
|
|
|
|
|
dcWarningService.insertDcWarning(dcWarning); |
|
|
|
contentMap.put("content", content); |
|
|
|
contentMap.put("event", dcWarning); |
|
|
|
WebSocketService.broadcast(WebSocketEvent.WARNING, contentMap); |
|
|
|
|
|
|
|
//待确认数量
|
|
|
|
dcEventService.getCountNum(); |
|
|
|