|
|
|
@ -3,6 +3,7 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.*;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.*;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
|
|
|
|
import cn.estsh.i3plus.mes.pcn.actor.shipping.dispatch.IFsmCommonService;
|
|
|
|
|
import cn.estsh.i3plus.mes.pcn.api.iservice.base.IPartService;
|
|
|
|
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService;
|
|
|
|
|
import cn.estsh.i3plus.mes.pcn.util.StationKvBeanUtil;
|
|
|
|
@ -39,6 +40,9 @@ import java.util.stream.Collectors;
|
|
|
|
|
public class MesProductionPartNoReadStepService extends BaseStepService {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IFsmCommonService fsmCommonService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IMesProductionProcessContextStepService productionProcessContextStepService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@ -64,10 +68,20 @@ public class MesProductionPartNoReadStepService extends BaseStepService {
|
|
|
|
|
@Override
|
|
|
|
|
public StepResult init(StationRequestBean reqBean) {
|
|
|
|
|
|
|
|
|
|
StepResult stepResult = StepResult.getSuccessComplete();
|
|
|
|
|
|
|
|
|
|
String endlessLoopReadTimes = fsmCommonService.doHandleFsmWcpcMapDataForDoScan(reqBean).get(MesPcnExtConstWords.ENDLESS_LOOP_READ_TIMES);
|
|
|
|
|
if (StringUtils.isEmpty(endlessLoopReadTimes)) endlessLoopReadTimes = MesPcnExtConstWords.ENDLESS_LOOP_READ_TIMES_DEFAULT;
|
|
|
|
|
if (productionDispatchContextStepService.doCheckOverEndlessLoopReadTimes(reqBean, endlessLoopReadTimes)) {
|
|
|
|
|
execThreadSleepAndSendTaskCompleteAndThrowEx(reqBean, new StationResultBean().isWs(false).restoreDbLog().checkRepeat(),
|
|
|
|
|
stepResult.isCompleted(false).msg(String.format("当前读取到设备的零件号匹配失败超过[%s]次!", endlessLoopReadTimes)),
|
|
|
|
|
MesPcnEnumUtil.STATION_BUSI_TYPE.RUNNING_INFO, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT, getStepParams(reqBean), MesPcnExtConstWords.READ_FAILURE_SLEEP, MesPcnExtConstWords.READ_FAILURE_SLEEP_DEFAULT_TIME);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//发送工步内容
|
|
|
|
|
productionCustomContextStepService.doSendStepContextMessage(reqBean);
|
|
|
|
|
|
|
|
|
|
return super.init(reqBean);
|
|
|
|
|
return stepResult;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|