|
|
|
@ -153,12 +153,7 @@ public class MesWorkOrderQueueAcceptStepService extends BaseStepService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//验证是否满足腔数
|
|
|
|
|
if (CollectionUtils.isEmpty(curPushList) || curPushList.size() < cellEquipContext.getCavity()) {
|
|
|
|
|
return stepDynamicsCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog().checkRepeat(), stepResult,
|
|
|
|
|
false, MesPcnEnumUtil.STATION_BUSI_TYPE.GUIDE, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT,
|
|
|
|
|
CollectionUtils.isEmpty(curPushList) ? "当前未接收到工位工单队列,持续监听中..." : String.format("当前接收到到工位工单队列个数[%s]不满足腔数[%s],持续监听中...", curPushList.size(), cellEquipContext.getCavity()),
|
|
|
|
|
getStepParams(reqBean), MesPcnExtConstWords.READ_FAILURE_SLEEP, MesPcnExtConstWords.READ_FAILURE_SLEEP_DEFAULT_TIME);
|
|
|
|
|
}
|
|
|
|
|
if (!CollectionUtils.isEmpty(curPushList) && curPushList.size() == cellEquipContext.getCavity()) {
|
|
|
|
|
|
|
|
|
|
//搜集工单号
|
|
|
|
|
List<String> workOrderNoList = curPushList.stream().filter(o -> null != o).map(MesQueueOrderPush::getWorkOrderNo).collect(Collectors.toList());
|
|
|
|
@ -177,10 +172,7 @@ public class MesWorkOrderQueueAcceptStepService extends BaseStepService {
|
|
|
|
|
//加工单验证工步 【排序】
|
|
|
|
|
stepResult = ((IStepService) SpringContextsUtil.getBean("mesWorkOrderCheckSortStepService")).executeInState(reqBean);
|
|
|
|
|
|
|
|
|
|
if (!stepResult.isCompleted()) {
|
|
|
|
|
stepThreadSleepAndSendTaskCompleteAndThrowEx(reqBean, stepResult, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT,
|
|
|
|
|
getStepParams(reqBean), MesPcnExtConstWords.READ_FAILURE_SLEEP, MesPcnExtConstWords.READ_FAILURE_SLEEP_DEFAULT_TIME);
|
|
|
|
|
}
|
|
|
|
|
if (stepResult.isCompleted()) {
|
|
|
|
|
|
|
|
|
|
//保存上下文推单信息
|
|
|
|
|
productionDispatchContextStepService.dispatchSortQueuePushContext(reqBean, curPushList);
|
|
|
|
@ -189,6 +181,8 @@ public class MesWorkOrderQueueAcceptStepService extends BaseStepService {
|
|
|
|
|
reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), StringUtil.toLowerCaseFirst(this.getClass().getSimpleName()), JSONObject.toJSONString(curPushList));
|
|
|
|
|
|
|
|
|
|
return stepResult;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
//当需要加锁且满足腔数的情况下, 保存排序线工单队列推送锁数据
|
|
|
|
@ -202,6 +196,16 @@ public class MesWorkOrderQueueAcceptStepService extends BaseStepService {
|
|
|
|
|
if (!CollectionUtils.isEmpty(queuePushMap2Locked)) queuePushMap2Locked.values().forEach(o -> unLock(reqBean, o));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!stepResult.isCompleted()) {
|
|
|
|
|
stepThreadSleepAndSendTaskCompleteAndThrowEx(reqBean, stepResult, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT,
|
|
|
|
|
getStepParams(reqBean), MesPcnExtConstWords.READ_FAILURE_SLEEP, MesPcnExtConstWords.READ_FAILURE_SLEEP_DEFAULT_TIME);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return stepDynamicsCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog().checkRepeat(), stepResult,
|
|
|
|
|
false, MesPcnEnumUtil.STATION_BUSI_TYPE.GUIDE, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT,
|
|
|
|
|
CollectionUtils.isEmpty(curPushList) ? "当前未接收到工位工单队列,持续监听中..." : String.format("当前接收到到工位工单队列个数[%s]不满足腔数[%s],持续监听中...", curPushList.size(), cellEquipContext.getCavity()),
|
|
|
|
|
getStepParams(reqBean), MesPcnExtConstWords.READ_FAILURE_SLEEP, MesPcnExtConstWords.READ_FAILURE_SLEEP_DEFAULT_TIME);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//加锁
|
|
|
|
|