|
@@ -132,16 +132,18 @@ public class IotInspectPlanServiceImpl implements IotInspectPlanService {
|
|
|
iotInspectPlanMapper.updateById(f);
|
|
iotInspectPlanMapper.updateById(f);
|
|
|
});
|
|
});
|
|
|
//往新的队伍中添加该设备
|
|
//往新的队伍中添加该设备
|
|
|
- List<IotInspectPlanDO> targetPlan = iotInspectPlanMapper.selectList("dept_id", deptId);
|
|
|
|
|
- if (CollUtil.isNotEmpty(targetPlan)) {
|
|
|
|
|
- IotInspectPlanDO iotInspectPlanDO = targetPlan.get(0);
|
|
|
|
|
- List<IotInspectRouteRespVO> routeDOS = JSON.parseArray(iotInspectPlanDO.getDeviceIds(), IotInspectRouteRespVO.class);
|
|
|
|
|
- if (Objects.nonNull(iotInspectRouteDO.get())){
|
|
|
|
|
- routeDOS.add(iotInspectRouteDO.get());
|
|
|
|
|
|
|
+ if (CollUtil.isNotEmpty(listByJsonDeviceId)) {
|
|
|
|
|
+ List<IotInspectPlanDO> targetPlan = iotInspectPlanMapper.selectList("dept_id", deptId);
|
|
|
|
|
+ if (CollUtil.isNotEmpty(targetPlan)) {
|
|
|
|
|
+ IotInspectPlanDO iotInspectPlanDO = targetPlan.get(0);
|
|
|
|
|
+ List<IotInspectRouteRespVO> routeDOS = JSON.parseArray(iotInspectPlanDO.getDeviceIds(), IotInspectRouteRespVO.class);
|
|
|
|
|
+ if (Objects.nonNull(iotInspectRouteDO.get())){
|
|
|
|
|
+ routeDOS.add(iotInspectRouteDO.get());
|
|
|
|
|
+ }
|
|
|
|
|
+ //更新巡检计划的巡检明细
|
|
|
|
|
+ iotInspectPlanDO.setDeviceIds(JSON.toJSONString(routeDOS));
|
|
|
|
|
+ iotInspectPlanMapper.updateById(iotInspectPlanDO);
|
|
|
}
|
|
}
|
|
|
- //更新巡检计划的巡检明细
|
|
|
|
|
- iotInspectPlanDO.setDeviceIds(JSON.toJSONString(routeDOS));
|
|
|
|
|
- iotInspectPlanMapper.updateById(iotInspectPlanDO);
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|