forked from I3-YF/i3plus-mes-pcn-yfai
工序完成 优化
parent
c488a5ef5c
commit
c077635e3c
@ -1,35 +0,0 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step.context;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionCustomContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepService;
|
||||
import cn.estsh.i3plus.mes.pcn.actor.shipping.dispatch.FsmJumpProcessService;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Primary
|
||||
public class MesProductionContextFlushService extends FsmJumpProcessService {
|
||||
|
||||
@Autowired
|
||||
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
|
||||
|
||||
@Autowired
|
||||
private IMesProductionCustomContextStepService productionCustomContextStepService;
|
||||
|
||||
//重置工序业务实现
|
||||
@Override
|
||||
public Boolean doJumpProcess(StationRequestBean requestBean, Integer jumpProcessSource) {
|
||||
|
||||
//清除上下文中的所有业务数据
|
||||
productionDispatchContextStepService.doFlushProductionDispatchContext(requestBean);
|
||||
|
||||
//发送工序完成音
|
||||
if (MesPcnEnumUtil.FSM_JUMP_PROCESS_SOURCE.TASK_COMPLETE.getValue() == jumpProcessSource) productionCustomContextStepService.sendProcessCompleteSound(requestBean);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.step.context;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionCustomContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionDispatchContextStepService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.process.BaseProcessMonitorService;
|
||||
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 org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Primary
|
||||
public class MesProductionProcessMonitorService extends BaseProcessMonitorService {
|
||||
|
||||
@Autowired
|
||||
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
|
||||
|
||||
@Autowired
|
||||
private IMesProductionCustomContextStepService productionCustomContextStepService;
|
||||
|
||||
@Override
|
||||
public Boolean doProcessStart(StationRequestBean requestBean) {
|
||||
return super.doProcessStart(requestBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean doProcessComplete(StationRequestBean requestBean) {
|
||||
doJumpProcess(requestBean);
|
||||
//发送工序完成音
|
||||
this.sendMessage(requestBean, new StationResultBean().resultObj(MesPcnExtConstWords.PROCESS_COMPLETE).busiType(MesPcnEnumUtil.STATION_BUSI_TYPE.CUSTOM_COMPONENT.getValue()).dataType(MesPcnEnumUtil.STATION_DATA_TYPE.SOUND.getValue()));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean doJumpProcess(StationRequestBean requestBean) {
|
||||
//清除上下文中的所有业务数据
|
||||
productionDispatchContextStepService.doFlushProductionDispatchContext(requestBean);
|
||||
//清除工步客制化区域数据【装配件清单】
|
||||
this.sendMessage(requestBean, new StationResultBean().busiType(MesPcnEnumUtil.STATION_BUSI_TYPE.STEP_CUSTOM_CONTENT.getValue()).dataType(MesPcnEnumUtil.STATION_DATA_TYPE.TABLES.getValue()));
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue