Commit c5e358bd by 杨林龙

1.23.0 优化新增设备校验逻辑

1 parent a35c1014
...@@ -1434,11 +1434,10 @@ public class VehicleService extends AbstractCommonService { ...@@ -1434,11 +1434,10 @@ public class VehicleService extends AbstractCommonService {
return; return;
} }
// List<String> modifySnList = new ArrayList<>();
List<SimpleDeviceItem> devices = Lists.newArrayList(); List<SimpleDeviceItem> devices = Lists.newArrayList();
vehicleInfoVo.getDeviceInfoDtos().forEach(device -> { vehicleInfoVo.getDeviceInfoDtos().forEach(device -> {
// 只有工单正常激活的才校验设备组合类型 // 只有工单正常激活的才校验设备组合类型
if (ActiveFlagEnum.WORKORDER_ACTIVE.getCode().equals(device.getActiveFlag()) || device.getActiveFlag()==null) { if (ActiveFlagEnum.WORKORDER_ACTIVE.getCode().equals(device.getActiveFlag()) || device.getActiveFlag() == null) {
SimpleDeviceItem item = new SimpleDeviceItem(); SimpleDeviceItem item = new SimpleDeviceItem();
item.setSn(device.getSn()); item.setSn(device.getSn());
item.setModel(device.getDeviceClassifyName()); item.setModel(device.getDeviceClassifyName());
...@@ -1446,11 +1445,10 @@ public class VehicleService extends AbstractCommonService { ...@@ -1446,11 +1445,10 @@ public class VehicleService extends AbstractCommonService {
} }
}); });
// 补充逻辑,如果是修改设备号则不进行设备验证 这一步逻辑可以不用 if (CollectionUtil.isEmpty(devices)) {
// if (!CollectionUtil.isEmpty(modifySnList)) { log.info("devices is null");
// log.info("update vehicle device snList is:" + JSON.toJSONString(modifySnList)); return;
// return; }
// }
DevicesComposeVerifyBO verifyBO = new DevicesComposeVerifyBO(); DevicesComposeVerifyBO verifyBO = new DevicesComposeVerifyBO();
verifyBO.setWorkOrderId(vehicle.getWorkOrderId()); verifyBO.setWorkOrderId(vehicle.getWorkOrderId());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!