648540858
2023-09-01 cde7f6460a563a4e9b2624b395d9bdfe6f90e14c
src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
old mode 100644 new mode 100755
@@ -108,6 +108,7 @@
            inviteStreamService.clearInviteInfo(device.getDeviceId());
        }
        device.setUpdateTime(now);
        device.setKeepaliveTime(now);
        if (device.getKeepaliveIntervalTime() == 0) {
            // 默认心跳间隔60
            device.setKeepaliveIntervalTime(60);
@@ -182,6 +183,17 @@
            // 发送redis消息
            redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), null, true);
        }
//
//        try {
//            cmder.alarmSubscribe(device, 600, "0", "4", "0", "2023-7-27T00:00:00", "2023-7-28T00:00:00");
//        } catch (InvalidArgumentException e) {
//            throw new RuntimeException(e);
//        } catch (SipException e) {
//            throw new RuntimeException(e);
//        } catch (ParseException e) {
//            throw new RuntimeException(e);
//        }
    }
@@ -532,18 +544,19 @@
        if (deviceInStore.getGeoCoordSys() != null) {
            // 坐标系变化,需要重新计算GCJ02坐标和WGS84坐标
            if (!deviceInStore.getGeoCoordSys().equals(device.getGeoCoordSys())) {
                updateDeviceChannelGeoCoordSys(device);
                deviceInStore.setGeoCoordSys(device.getGeoCoordSys());
                updateDeviceChannelGeoCoordSys(deviceInStore);
            }
        }else {
            device.setGeoCoordSys("WGS84");
            deviceInStore.setGeoCoordSys("WGS84");
        }
        if (device.getCharset() == null) {
            device.setCharset("GB2312");
            deviceInStore.setCharset("GB2312");
        }
        // 更新redis
        redisCatchStorage.updateDevice(device);
        deviceMapper.updateCustom(device);
        deviceMapper.updateCustom(deviceInStore);
        redisCatchStorage.removeDevice(deviceInStore.getDeviceId());
    }
    @Override