Commit 68b453bc by 杨林龙

1.25.0 优化设备类型校验逻辑

1 parent 93906df9
...@@ -984,10 +984,14 @@ public class WorkOrderService { ...@@ -984,10 +984,14 @@ public class WorkOrderService {
DeviceDTO deviceDTO = deviceDTOR.getData(DeviceDTO.class); DeviceDTO deviceDTO = deviceDTOR.getData(DeviceDTO.class);
if (deviceDTO != null) { if (deviceDTO != null) {
// 增加设备类型校验 // 增加设备类型校验
// deviceItem.setWireType(deviceDTO.getSource()); if (Objects.isNull(deviceItem.getWireType())) {
deviceItem.setWireType(deviceDTO.getSource());
} else {
// 包活干会将设备类型传递过来 此处校验主要对包活干设备类型校验
if (!deviceDTO.getSource().equals(deviceItem.getWireType())) { if (!deviceDTO.getSource().equals(deviceItem.getWireType())) {
throw new StdInterfaceException("656565", "设备类型不匹配"); throw new StdInterfaceException("656565", "设备类型不匹配");
} }
}
} else { } else {
throw new StdInterfaceException("656565", "该设备尚未入库"); throw new StdInterfaceException("656565", "该设备尚未入库");
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!