异常整批返修--当最后一道工序在检验任务待办事项判定不合格 找不到产品条码(改为从派工单找产品条码)

master
赵嘉伟 3 years ago
parent f5d2427fc5
commit bfe27ab5ef

@ -588,10 +588,15 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
sfcDto.setAbnormalNo(abnormalBill2.getAbnormalNo());
sfcDto.setQty(sfc.getQty());
Map map = sfcMapper.findOperationBySfc(site, sfc.getSfc());
if(map != null && StringUtils.isBlank((String)map.get("STEP_ID"))){
throw new BaseException("整批返修失败,根据产品条码"+sfc.getSfc()+"找不到STEP_ID");
if(map == null || StringUtils.isBlank((String)map.get("STEP_ID"))){
if(StringUtils.notBlank(abnormalBill2.getStepId())){
sfcDto.setStepId(abnormalBill2.getStepId());
}else{
throw new BaseException("整批返修失败,根据产品条码"+sfc.getSfc()+"找不到STEP_ID(工步)");
}
}else{
sfcDto.setStepId((String) map.get("STEP_ID"));
}
sfcDto.setStepId((String) map.get("STEP_ID"));
this.batchRepair(sfcDto);
}
}
@ -1361,10 +1366,14 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
//根据sfc找工单等信息
SfcDto sfcData = splitSfcMapper.getSfcData(handle);
String operation = sfcData.getOperation();
if (sfcData==null){
throw new BaseException("未找到产品条码信息");
Sfc sfcServiceById = sfcService.getById(handle);
if (!sfcServiceById.getStatusBo().equals(HandleEnum.STATUS.getHandle(site,"405"))){
throw new BaseException("未找到产品条码信息");
}
sfcData= splitSfcMapper.getCompleteSfcData(handle).get(0);
}
String operation = sfcData.getOperation();
SfcDispatchDto sfcDispatchDto = new SfcDispatchDto();
sfcDispatchDto.setSite(site);
sfcDispatchDto.setSfc(sfc);

Loading…
Cancel
Save