排序 保存加工结果

tags/yfai-pcn-ext-v2.3
王杰 8 months ago
parent 2b1e11ebf9
commit 7e795f15d2

@ -0,0 +1,46 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step;
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService;
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.IStepService;
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
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 cn.estsh.impp.framework.boot.util.SpringContextsUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @Description :
* @Author : wangjie
**/
@Slf4j
@Service("mesProductionDataSaveNosortStepService")
public class MesProductionDataSaveNosortStepService extends BaseStepService {
@Override
public StepResult execute(StationRequestBean reqBean) {
//保存开模记录工步
((IStepService) SpringContextsUtil.getBean("mesMouldRecordGenerateStepService")).executeInState(reqBean);
//保存零件条码信息工步
((IStepService) SpringContextsUtil.getBean("mesProductSnSaveStepService")).executeInState(reqBean);
//加工异常处理工步
((IStepService) SpringContextsUtil.getBean("mesProductResultErrorHandleStepService")).executeInState(reqBean);
//生成加工记录工步
((IStepService) SpringContextsUtil.getBean("mesProductionRecordGenerateStepService")).executeInState(reqBean);
//保存装配记录工步
((IStepService) SpringContextsUtil.getBean("mesAssemblySaveStepService")).executeInState(reqBean);
//保存工单信息工步
((IStepService) SpringContextsUtil.getBean("mesWorkOrderSaveStepService")).executeInState(reqBean);
return stepSuccessCompleteAndSendMsgReturn(reqBean, new StationResultBean().writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), "保存加工结果成功!");
}
}

@ -0,0 +1,46 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step;
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService;
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.IStepService;
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
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 cn.estsh.impp.framework.boot.util.SpringContextsUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @Description :
* @Author : wangjie
**/
@Slf4j
@Service("mesProductionDataSaveSortStepService")
public class MesProductionDataSaveSortStepService extends BaseStepService {
@Override
public StepResult execute(StationRequestBean reqBean) {
//保存开模记录工步
((IStepService) SpringContextsUtil.getBean("mesMouldRecordGenerateStepService")).executeInState(reqBean);
//保存零件条码信息工步
((IStepService) SpringContextsUtil.getBean("mesProductSnSaveStepService")).executeInState(reqBean);
//加工异常处理工步
((IStepService) SpringContextsUtil.getBean("mesProductResultErrorHandleStepService")).executeInState(reqBean);
//生成加工记录工步
((IStepService) SpringContextsUtil.getBean("mesProductionRecordGenerateStepService")).executeInState(reqBean);
//保存装配记录工步
((IStepService) SpringContextsUtil.getBean("mesAssemblySaveStepService")).executeInState(reqBean);
//保存工单信息工步
((IStepService) SpringContextsUtil.getBean("mesWorkOrderSaveStepService")).executeInState(reqBean);
return stepSuccessCompleteAndSendMsgReturn(reqBean, new StationResultBean().writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), "保存加工结果成功!");
}
}

@ -1,13 +1,14 @@
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step;
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionProcessContextStepService;
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseStepService;
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.IStepService;
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
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 cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
import cn.estsh.impp.framework.boot.util.SpringContextsUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
@ -18,28 +19,17 @@ import org.springframework.stereotype.Service;
@Service("mesProductionDataSaveStepService")
public class MesProductionDataSaveStepService extends BaseStepService {
@Autowired
public IMesProductionProcessContextStepService productionProcessContextStepService;
@Override
public StepResult execute(StationRequestBean reqBean) {
//保存开模记录工步
((IStepService) SpringContextsUtil.getBean("mesMouldRecordGenerateStepService")).executeInState(reqBean);
//保存零件条码信息工步
((IStepService) SpringContextsUtil.getBean("mesProductSnSaveStepService")).executeInState(reqBean);
//加工异常处理工步
((IStepService) SpringContextsUtil.getBean("mesProductResultErrorHandleStepService")).executeInState(reqBean);
//生成加工记录工步
((IStepService) SpringContextsUtil.getBean("mesProductionRecordGenerateStepService")).executeInState(reqBean);
//保存装配记录工步
((IStepService) SpringContextsUtil.getBean("mesAssemblySaveStepService")).executeInState(reqBean);
//保存工单信息工步
((IStepService) SpringContextsUtil.getBean("mesWorkOrderSaveStepService")).executeInState(reqBean);
//排序线 保存加工结果工步
if (MesExtEnumUtil.WORK_CENTER_TYPE.SORT.getValue() == productionProcessContextStepService.getCenterType(reqBean)) return ((IStepService) SpringContextsUtil.getBean("mesProductionDataSaveSortStepService")).executeInState(reqBean);
return stepSuccessCompleteAndSendMsgReturn(reqBean, new StationResultBean().writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), "保存加工结果成功!");
//非排序线 保存加工结果工步
return ((IStepService) SpringContextsUtil.getBean("mesProductionDataSaveNosortStepService")).executeInState(reqBean);
}

Loading…
Cancel
Save