|
|
|
@ -40,7 +40,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description : 加工异常处理工步 注释调整
|
|
|
|
|
* @Description : 加工异常处理工步
|
|
|
|
|
* @Author : zxw
|
|
|
|
|
**/
|
|
|
|
|
@Slf4j
|
|
|
|
@ -61,8 +61,6 @@ public class MesProductResultErrorHandleStepService extends BaseStepService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private IMesProductionDispatchContextStepService mesProductionDispatchContextStepService;
|
|
|
|
|
|
|
|
|
|
public static final String ORDER_NO_JIS_SORT = "ORDER_NO_JIS_SORT";
|
|
|
|
|
|
|
|
|
|
private static final Map<String, ActorRef> refMap = new ConcurrentHashMap<>(200);
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -73,10 +71,17 @@ public class MesProductResultErrorHandleStepService extends BaseStepService {
|
|
|
|
|
|
|
|
|
|
// 获取加工结果
|
|
|
|
|
String result = mesProductionDispatchContextStepService.getProductResultContext(reqBean);
|
|
|
|
|
|
|
|
|
|
// 如果是报废或者可疑,需要编辑条码状态为不合格、并且nc判定需要新增一条记录
|
|
|
|
|
if (StringUtils.isEmpty(result) || Objects.equal(MesExtEnumUtil.EQUIP_VARIABLE_CFG_CATEGORY.PRODUCT_OK.getCode() + "", result)) {
|
|
|
|
|
return execSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(), stepResult, "加工结果合格,无需记录异常");
|
|
|
|
|
Integer resultInt;
|
|
|
|
|
try {
|
|
|
|
|
resultInt = StringUtils.isEmpty(result) ? MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue() : Integer.valueOf(result);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
resultInt = MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (resultInt.compareTo(MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue()) == 0) return stepResult;
|
|
|
|
|
|
|
|
|
|
// 获取条码列表
|
|
|
|
|
List<MesProductionPsOutContext> mesProduceSns = mesProductionDispatchContextStepService.getProductionPsOutContext(reqBean);
|
|
|
|
|
|
|
|
|
@ -85,10 +90,7 @@ public class MesProductResultErrorHandleStepService extends BaseStepService {
|
|
|
|
|
// 保存加工异常记录(NC判断记录)
|
|
|
|
|
saveProductResultException(reqBean, mesProduceSns,productionPartContexts, result);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return execSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), stepResult, "加工异常处理成功");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return execSuccessCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), stepResult, String.format("加工[%s] NC信息保存成功!", MesExtEnumUtil.PRODUCE_QC_STATUS.valueOfDescription(resultInt)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|