forked from I3-YF/i3plus-mes-pcn-yfai
Merge remote-tracking branch 'origin/dev' into dev
commit
3f4f041c5e
@ -0,0 +1,75 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProduceSnExtService;
|
||||||
|
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.bean.MesWorkCell;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.bean.MesWorkCenter;
|
||||||
|
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("mesProdCraftRouteCheckStepService")
|
||||||
|
public class MesProdCraftRouteCheckStepService extends BaseStepService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMesProductionProcessContextStepService productionProcessContextStepService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMesProduceSnExtService produceSnExtService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StepResult execute(StationRequestBean reqBean) {
|
||||||
|
|
||||||
|
StationResultBean resultBean = new StationResultBean();
|
||||||
|
|
||||||
|
StepResult stepResult = StepResult.getSuccessComplete();
|
||||||
|
|
||||||
|
//获取上下文信息
|
||||||
|
MesProductionProcessContext productionProcessContext = productionProcessContextStepService.getCurCellEquipment(reqBean);
|
||||||
|
|
||||||
|
//获取生产过程上下文对象有异常信息 抛出异常
|
||||||
|
if (!productionProcessContext.getSuccess()) execExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), productionProcessContext.getMessage());
|
||||||
|
|
||||||
|
//存储生产过程上下文对象
|
||||||
|
productionProcessContextStepService.saveProductionProcessContext(reqBean, productionProcessContext);
|
||||||
|
|
||||||
|
//从上下文中取出生产线对象
|
||||||
|
MesWorkCenter workCenter = productionProcessContext.getWorkCenter();
|
||||||
|
|
||||||
|
//从上下文中取出工位对象
|
||||||
|
MesWorkCell workCell = productionProcessContext.getWorkCell();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return stepResult;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue