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