|
@ -499,9 +499,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
ApplyTaskResponse taskResponse = ApplyTaskResponse.responseOk(requestNo); |
|
|
ApplyTaskResponse taskResponse = ApplyTaskResponse.responseOk(requestNo); |
|
|
SchBasePoint basePoint = pointService.getById(baseRequest.getDevice_code()); |
|
|
SchBasePoint basePoint = pointService.getById(baseRequest.getDevice_code()); |
|
|
if (ObjectUtil.isEmpty(baseRequest.getVehicle_code())) { |
|
|
if (ObjectUtil.isEmpty(baseRequest.getVehicle_code())) { |
|
|
taskResponse.setCode(HttpStatus.HTTP_BAD_REQUEST); |
|
|
throw new BadRequestException("载具编码不能为空!"); |
|
|
taskResponse.setMessage("载具编码不能为空!"); |
|
|
|
|
|
return taskResponse; |
|
|
|
|
|
} |
|
|
} |
|
|
if (ObjectUtil.isEmpty(baseRequest.getVehicle_type())) { |
|
|
if (ObjectUtil.isEmpty(baseRequest.getVehicle_type())) { |
|
|
baseRequest.setVehicle_type(GeneralDefinition.MATERIAL_CUP); |
|
|
baseRequest.setVehicle_type(GeneralDefinition.MATERIAL_CUP); |
|
@ -511,24 +509,18 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { |
|
|
baseRequest.getVehicle_type(), GroupBindMaterialStatusEnum.BOUND.getValue()); |
|
|
baseRequest.getVehicle_type(), GroupBindMaterialStatusEnum.BOUND.getValue()); |
|
|
if (ObjectUtil.isEmpty(one)) { |
|
|
if (ObjectUtil.isEmpty(one)) { |
|
|
// 返回400,物料不存在
|
|
|
// 返回400,物料不存在
|
|
|
taskResponse.setCode(HttpStatus.HTTP_BAD_REQUEST); |
|
|
throw new BadRequestException("组盘不存在或已静置完成!"); |
|
|
taskResponse.setMessage("组盘不存在或已静置完成!"); |
|
|
|
|
|
return taskResponse; |
|
|
|
|
|
} |
|
|
} |
|
|
String yjDeviceCode = basePoint.getParent_point_code(); // 压机设备编码
|
|
|
String yjDeviceCode = basePoint.getParent_point_code(); // 压机设备编码
|
|
|
// 获取当前工单
|
|
|
// 获取当前工单
|
|
|
PdmBdWorkorder productionTask = workorderService.getDeviceProductionTask(yjDeviceCode); |
|
|
PdmBdWorkorder productionTask = workorderService.getDeviceProductionTask(yjDeviceCode); |
|
|
// 校验物料是否正确
|
|
|
// 校验物料是否正确
|
|
|
if (ObjectUtil.isEmpty(productionTask)) { |
|
|
if (ObjectUtil.isEmpty(productionTask)) { |
|
|
taskResponse.setCode(HttpStatus.HTTP_BAD_REQUEST); |
|
|
throw new BadRequestException("压机" + yjDeviceCode + "工单不存在!"); |
|
|
taskResponse.setMessage("压机" + yjDeviceCode + "工单不存在!"); |
|
|
|
|
|
return taskResponse; |
|
|
|
|
|
} |
|
|
} |
|
|
String rawMaterialCode = productionTask.getRaw_material_code(); |
|
|
String rawMaterialCode = productionTask.getRaw_material_code(); |
|
|
if (!rawMaterialCode.equals(one.getRedundance_material_code())) { |
|
|
if (!rawMaterialCode.equals(one.getRedundance_material_code())) { |
|
|
taskResponse.setCode(HttpStatus.HTTP_BAD_REQUEST); |
|
|
throw new BadRequestException("物料不一样!"); |
|
|
taskResponse.setMessage("物料不一样!"); |
|
|
|
|
|
return taskResponse; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 判断是否静置完成
|
|
|
// 判断是否静置完成
|
|
|