huanghongfa
2021-10-08 690b6ec75d6f9198d1ca292e107109b80646faf8
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,7 +74,9 @@
    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());