From 57cd8d8bf2c8b77dade86efa1ac51dae72c7656c Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期五, 08 十月 2021 11:30:24 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test --- springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/config/WebSocketClient.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/config/WebSocketClient.java b/springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/config/WebSocketClient.java index 19c81ea..60f89e9 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/config/WebSocketClient.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/config/WebSocketClient.java @@ -12,6 +12,7 @@ import org.springframework.stereotype.Component; import com.alibaba.fastjson.JSONObject; +import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_property.dao.ComPropertyAlarmDao; import com.panzhihua.service_property.dto.DeviceDto; import com.panzhihua.service_property.entity.ComPropertyAlarm; @@ -73,10 +74,13 @@ void dealData(String message) { comPropertyAlarmDao = SpringUtil.getBean(ComPropertyAlarmDao.class); DeviceDto deviceInfo = JSONObject.parseObject(message, DeviceDto.class); - if (deviceInfo.getCallstatus().equals("RINGING")) { + boolean checkFlag = + "RINGING".equals(deviceInfo.getCallstatus()) && StringUtils.isNotEmpty(deviceInfo.getOri_number()); + if ("abort".equals(deviceInfo.getStatus()) || checkFlag) { logger.info("收到设备报警信息:{}", message); ComPropertyAlarm comPropertyAlarm = new ComPropertyAlarm(); - comPropertyAlarm.setSerialNo(deviceInfo.getUserid()); + comPropertyAlarm.setSerialNo(deviceInfo.getOri_number()); + comPropertyAlarm.setReceiveNo(deviceInfo.getUserid()); comPropertyAlarm.setStatus(0); comPropertyAlarm.setCreateTime(new Date()); comPropertyAlarm.setType(1); -- Gitblit v1.7.1