uat-temp-wj-shenshanorder
王杰 2 months ago
parent 0a4e306a06
commit 60858c597a

@ -99,6 +99,8 @@ public class MesWorkOrderCheckSortStepService extends MesWorkOrderCheckStepServi
List<MesProductionPsOutContext> productionPsOutContextList = new ArrayList<>();
if (!checkWorkOrderValid(reqBean, resultBean, stepResult, productionProcessContext,
equipVariableCollectContextList, productionPartContextList, productionPsInContextList, productionPsOutContextList).isCompleted()) {
//推单场景下是读取的工单, 验证工单无效需要验证是否是连续的重复信息
if (equipVariableCollectContextList.get(0).getMessageSource().compareTo(MesExtEnumUtil.CELL_MESSAGE_SOURCE.READ.getValue()) == 0) resultBean.checkRepeat();
return stepNonCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(), stepResult, stepResult.getMsg());
}

@ -172,10 +172,7 @@ public class MesWorkOrderQueueAcceptStepService extends BaseStepService {
//保存上下文扫/读信息:加工单
productionDispatchContextStepService.dispatchScanWorkOrderNoContext(reqBean, equipVariableCollectContextList);
this.sendMessage(reqBean, new StationResultBean().writeDbLog(), String.format("获取到工位工单推送队列%s!", workOrderNoList.toString()), MesPcnEnumUtil.STATION_BUSI_TYPE.RUNNING_INFO, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT);
log.info("工厂{}生产线{}工位{}:FSM STATE DISPATCHER --- DO STEP --- {} EXEC --- QUEUE_ORDER_PUSH:{}",
reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), StringUtil.toLowerCaseFirst(this.getClass().getSimpleName()), JSONObject.toJSONString(curPushList));
this.sendMessage(reqBean, new StationResultBean().writeDbLog().checkRepeat(), String.format("获取到工位工单推送队列%s!", workOrderNoList.toString()), MesPcnEnumUtil.STATION_BUSI_TYPE.RUNNING_INFO, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT);
//加工单验证工步 【排序】
stepResult = ((IStepService) SpringContextsUtil.getBean("mesWorkOrderCheckSortStepService")).executeInState(reqBean);
@ -188,6 +185,9 @@ public class MesWorkOrderQueueAcceptStepService extends BaseStepService {
//保存上下文推单信息
productionDispatchContextStepService.dispatchSortQueuePushContext(reqBean, curPushList);
log.info("工厂{}生产线{}工位{}:FSM STATE DISPATCHER --- DO STEP --- {} EXEC --- QUEUE_ORDER_PUSH:{}",
reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), StringUtil.toLowerCaseFirst(this.getClass().getSimpleName()), JSONObject.toJSONString(curPushList));
return stepResult;
} finally {
@ -229,15 +229,8 @@ public class MesWorkOrderQueueAcceptStepService extends BaseStepService {
try {
String lockTime = lockTimeMap.get(key);
if ((StringUtils.isEmpty(lockTime) || TimeTool.getSecoundsBetweenTime(1, lockTime, TimeTool.getNowTime(true)) >= MesPcnExtConstWords.TEN) && lock.isLocked()) {
if (lock.isHeldByCurrentThread()) {
lock.unlock();
log.info("工厂{}生产线{}工位{}:FSM STATE DISPATCHER --- DO STEP --- {} EXEC --- CHECK_TIME_OUT [{}] UNLOCK SUCCESS",
reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), StringUtil.toLowerCaseFirst(this.getClass().getSimpleName()), pushSourceCode);
} else {
lockMap.remove(key);
log.info("工厂{}生产线{}工位{}:FSM STATE DISPATCHER --- DO STEP --- {} EXEC --- CHECK_TIME_OUT [{}] UNLOCK REMOVE",
reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), StringUtil.toLowerCaseFirst(this.getClass().getSimpleName()), pushSourceCode);
}
if (lock.isHeldByCurrentThread()) lock.unlock();
else lockMap.remove(key);
}
} catch (Exception e) {
log.info("工厂{}生产线{}工位{}:FSM STATE DISPATCHER --- DO STEP --- {} EXEC --- CHECK_TIME_OUT [{}] EXCEPTION: {}",

Loading…
Cancel
Save