forked from I3-YF/i3plus-mes-pcn-yfai
fsm reset
parent
fc046df6b4
commit
7439a515cd
@ -0,0 +1,50 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionProcessContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.context.MesProductionProcessContext;
|
||||
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationResultBean;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StepResult;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description : 生产工单顺序防错
|
||||
* @Author : wangjie
|
||||
**/
|
||||
@Slf4j
|
||||
@Service("mesProduceSeqCheckStepService")
|
||||
public class MesProduceSeqCheckStepService extends BaseStepService {
|
||||
|
||||
@Autowired
|
||||
private IMesProductionProcessContextStepService productionProcessContextStepService;
|
||||
|
||||
@Autowired
|
||||
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
|
||||
|
||||
@Override
|
||||
public StepResult execute(StationRequestBean reqBean) {
|
||||
|
||||
StationResultBean resultBean = new StationResultBean();
|
||||
|
||||
StepResult stepResult = StepResult.getSuccessComplete();
|
||||
|
||||
//获取上下文信息
|
||||
MesProductionProcessContext productionProcessContext = productionProcessContextStepService.doHandleCurCellEquipment(reqBean);
|
||||
|
||||
//获取生产过程上下文对象有异常信息 抛出异常
|
||||
if (!productionProcessContext.getSuccess()) execExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), productionProcessContext.getMessage());
|
||||
|
||||
//存储生产过程上下文对象
|
||||
productionProcessContextStepService.saveProductionProcessContext(reqBean, productionProcessContext);
|
||||
|
||||
|
||||
|
||||
return stepResult;
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue