| | |
| | | logger.warn("[mobilePosition移动位置Notify] 未找到通道{}所属的设备", channelId); |
| | | return; |
| | | } |
| | | // 兼容设备部分设备上报是通道编号与设备编号一致的情况 |
| | | if(deviceId.equals(channelId)) { |
| | | List<DeviceChannel> deviceChannels = deviceChannelService.queryChaneListByDeviceId(deviceId); |
| | | if (deviceChannels.size() == 1) { |
| | | channelId = deviceChannels.get(0).getChannelId(); |
| | | } |
| | | } |
| | | if (!ObjectUtils.isEmpty(device.getName())) { |
| | | mobilePosition.setDeviceName(device.getName()); |
| | | } |
| | |
| | | deviceChannel.setLongitude(mobilePosition.getLongitude()); |
| | | deviceChannel.setLatitude(mobilePosition.getLatitude()); |
| | | deviceChannel.setGpsTime(mobilePosition.getTime()); |
| | | deviceChannel = deviceChannelService.updateGps(deviceChannel, device); |
| | | |
| | | mobilePosition.setLongitudeWgs84(deviceChannel.getLongitudeWgs84()); |
| | | mobilePosition.setLatitudeWgs84(deviceChannel.getLatitudeWgs84()); |
| | | mobilePosition.setLongitudeGcj02(deviceChannel.getLongitudeGcj02()); |
| | | mobilePosition.setLatitudeGcj02(deviceChannel.getLatitudeGcj02()); |
| | | // deviceChannel = deviceChannelService.updateGps(deviceChannel, device); |
| | | // |
| | | // mobilePosition.setLongitudeWgs84(deviceChannel.getLongitudeWgs84()); |
| | | // mobilePosition.setLatitudeWgs84(deviceChannel.getLatitudeWgs84()); |
| | | // mobilePosition.setLongitudeGcj02(deviceChannel.getLongitudeGcj02()); |
| | | // mobilePosition.setLatitudeGcj02(deviceChannel.getLatitudeGcj02()); |
| | | |
| | | deviceChannelService.updateChannelGPS(device, deviceChannel, mobilePosition); |
| | | |