|
|
@ -73,7 +73,7 @@ public class MesProductResultErrorHandleStepService extends BaseStepService {
|
|
|
|
// 获取加工结果
|
|
|
|
// 获取加工结果
|
|
|
|
String result = mesProductionDispatchContextStepService.getProductResultContext(reqBean);
|
|
|
|
String result = mesProductionDispatchContextStepService.getProductResultContext(reqBean);
|
|
|
|
// 如果是报废或者可疑,需要编辑条码状态为不合格、并且nc判定需要新增一条记录
|
|
|
|
// 如果是报废或者可疑,需要编辑条码状态为不合格、并且nc判定需要新增一条记录
|
|
|
|
if (StringUtils.isEmpty(result) || Objects.equal(MesExtEnumUtil.EQUIP_VARIABLE_CFG_CATEGORY.PRODUCT_OK.getValue(), result)) {
|
|
|
|
if (StringUtils.isEmpty(result) || Objects.equal(MesExtEnumUtil.EQUIP_VARIABLE_CFG_CATEGORY.PRODUCT_OK.getCode(), result)) {
|
|
|
|
return execSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(), stepResult, "加工结果合格,无需记录异常");
|
|
|
|
return execSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(), stepResult, "加工结果合格,无需记录异常");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 获取条码列表
|
|
|
|
// 获取条码列表
|
|
|
@ -111,7 +111,7 @@ public class MesProductResultErrorHandleStepService extends BaseStepService {
|
|
|
|
partInspection.setPartNo(mesProduceSn.getPartNo());
|
|
|
|
partInspection.setPartNo(mesProduceSn.getPartNo());
|
|
|
|
partInspection.setPartName(mesProduceSn.getPartName());
|
|
|
|
partInspection.setPartName(mesProduceSn.getPartName());
|
|
|
|
partInspection.setDefectTypeCode(mesDefectType.getDefectTypeCode());
|
|
|
|
partInspection.setDefectTypeCode(mesDefectType.getDefectTypeCode());
|
|
|
|
partInspection.setInspectionDate(DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMATTER));
|
|
|
|
partInspection.setInspectionDate(DateUtil.format(new Date(), DatePattern.NORM_DATETIME_MS_PATTERN));
|
|
|
|
partInspection.setLotNo(mesProduceSn.getLotNo());
|
|
|
|
partInspection.setLotNo(mesProduceSn.getLotNo());
|
|
|
|
if (!Objects.equal(MesExtEnumUtil.EQUIP_VARIABLE_CFG_CATEGORY.PRODUCT_SCRAP.getValue(), result)) {
|
|
|
|
if (!Objects.equal(MesExtEnumUtil.EQUIP_VARIABLE_CFG_CATEGORY.PRODUCT_SCRAP.getValue(), result)) {
|
|
|
|
partInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.SCRAP.getValue());
|
|
|
|
partInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.SCRAP.getValue());
|
|
|
|