|
@@ -273,7 +273,17 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
DeviceInfo deviceInfo = copy(DeviceInfo.class, update)
|
|
DeviceInfo deviceInfo = copy(DeviceInfo.class, update)
|
|
.setUpdateTime(LocalDateTime.now());
|
|
.setUpdateTime(LocalDateTime.now());
|
|
updateById(deviceInfo);
|
|
updateById(deviceInfo);
|
|
- DeviceInfoDto.Vo device = R.feignCheckData(this.obj(new DeviceInfoDto.Obj().setDeviceId(update.getDeviceId()).setIsSysinfo(true)));
|
|
|
|
|
|
+ Long deviceId = deviceInfo.getDeviceId();
|
|
|
|
+ DeviceInfoDto.Vo device = R.feignCheckData(this.obj(new DeviceInfoDto.Obj().setDeviceId(deviceId).setIsSysinfo(true)));
|
|
|
|
+ Long algorithmId = update.getAlgorithmId();
|
|
|
|
+ if (algorithmId != null && AlgorithmTypeEnum.CLOUD.getId() == algorithmId) {
|
|
|
|
+ //云从算法
|
|
|
|
+ boolean b = cloudWalkApiService.checkDeviceExist(deviceId);
|
|
|
|
+ if (!b) {
|
|
|
|
+ //货柜不存在,新增
|
|
|
|
+ cloudWalkApiService.containerAdd(new ContainerAddDTO().setContainerCode(String.valueOf(deviceId)));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
Integer deviceType = device.getDeviceType();
|
|
Integer deviceType = device.getDeviceType();
|
|
if (ObjectUtil.equals(DeviceTypeEnum.TYPE5.getCode(), deviceType)) {
|
|
if (ObjectUtil.equals(DeviceTypeEnum.TYPE5.getCode(), deviceType)) {
|
|
DeviceUpdateDTO deviceUpdateDTO = new DeviceUpdateDTO();
|
|
DeviceUpdateDTO deviceUpdateDTO = new DeviceUpdateDTO();
|