forked from I3-YF/i3plus-mes-pcn-yfai
pcn step
parent
0338eb1752
commit
d7fff9d021
@ -1,110 +0,0 @@
|
|||||||
//package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.station;
|
|
||||||
//
|
|
||||||
//import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionProcessContextStepService;
|
|
||||||
//import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
|
||||||
//import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseModuleService;
|
|
||||||
//import cn.estsh.i3plus.platform.common.util.MesPcnConstWords;
|
|
||||||
//import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
|
|
||||||
//import cn.estsh.i3plus.pojo.mes.model.ButtonDynamicModel;
|
|
||||||
//import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
|
|
||||||
//import cn.estsh.i3plus.pojo.mes.model.StationResultBean;
|
|
||||||
//import com.alibaba.fastjson.JSONObject;
|
|
||||||
//import lombok.extern.slf4j.Slf4j;
|
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
//import org.springframework.stereotype.Service;
|
|
||||||
//import org.springframework.util.StringUtils;
|
|
||||||
//
|
|
||||||
//import java.util.Map;
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * @Description : 展示组件:非排序生产(按钮 临时)
|
|
||||||
// * @Author :wangjie
|
|
||||||
// **/
|
|
||||||
//@Slf4j
|
|
||||||
//@Service("mesProductionNoSortFunctionModuleService")
|
|
||||||
//class MesProductionNoSortFunctionModuleService extends BaseModuleService {
|
|
||||||
//
|
|
||||||
// @Autowired
|
|
||||||
// private IMesProductionProcessContextStepService productionProcessContextStepService;
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public boolean doFunction(StationRequestBean reqBean) {
|
|
||||||
//
|
|
||||||
// StationResultBean resultBean = new StationResultBean();
|
|
||||||
//
|
|
||||||
// String functionCmd = (String) reqBean.getDataMap().get(MesPcnExtConstWords.FUNCTION_CMD);
|
|
||||||
// ButtonDynamicModel buttonDynamicModel = !StringUtils.isEmpty(functionCmd) ? JSONObject.parseObject(functionCmd, ButtonDynamicModel.class) : null;
|
|
||||||
//
|
|
||||||
// if (null != buttonDynamicModel)
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// this.sendMessage(reqBean, resultBean, "后端未获取到业务功能指令!", MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// switch (command) {
|
|
||||||
// case MesPcnExtConstWords.CMD_WORK_ORDER :
|
|
||||||
// if (StringUtils.isEmpty(value)) {
|
|
||||||
// this.sendMessage(reqBean, null, "请选择启动状态的生产工单!", MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// String selectWorkOrderNo = (String) doHandleSelectWorkOrderNo(reqBean, 1, null);
|
|
||||||
// selectWorkOrderNo = (StringUtils.isEmpty(selectWorkOrderNo) || !selectWorkOrderNo.contains(MesPcnExtConstWords.COLON)) ? selectWorkOrderNo : selectWorkOrderNo.split(MesPcnExtConstWords.COLON)[1];
|
|
||||||
// if (!StringUtils.isEmpty(selectWorkOrderNo) && selectWorkOrderNo.equals(value)) return result;
|
|
||||||
// reqBean.setForceJumpProcess(true);
|
|
||||||
// if ((Boolean) doHandleSelectWorkOrderNo(reqBean, 2, value.toString())) result = true;
|
|
||||||
// else {
|
|
||||||
// this.sendMessage(reqBean, null, String.format("切换的生产工单[%s]缓存失败,请重试!", value), MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case MesPcnExtConstWords.CMD_BUSI_FLAG :
|
|
||||||
// if (StringUtils.isEmpty(value)) {
|
|
||||||
// this.sendMessage(reqBean, null, "请点击业务按钮!", MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// String curBusiFlag = (String) doHandleBusiFlag(reqBean, 1, null);
|
|
||||||
// if (!StringUtils.isEmpty(curBusiFlag) && curBusiFlag.equals(value)) return result;
|
|
||||||
// reqBean.setTriggerAutoFsm(true);
|
|
||||||
// if (StringUtils.isEmpty(curBusiFlag)) {
|
|
||||||
// if ((Boolean) doHandleBusiFlag(reqBean, 2, value.toString())) result = true;
|
|
||||||
// else {
|
|
||||||
// this.sendMessage(reqBean, null, String.format("业务按钮[%s]缓存失败,请重试!", value), MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case MesPcnExtConstWords.CMD_FORCE_CENTER_PASS :
|
|
||||||
// if (StringUtils.isEmpty(value)) {
|
|
||||||
// this.sendMessage(reqBean, null, "入参缺少产线强制放行的工步代码!", MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
// String pwd = (String) dataMap.get(MesPcnExtConstWords.PWD);
|
|
||||||
// if (!jxProduceSnExtService.checkPorceCenterPassPwd(reqBean, pwd)) {
|
|
||||||
// this.sendMessage(reqBean, null, String.format("产线强制放行验证密码[%s]不正确!", pwd), MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
// reqBean.setForceSpecStepCode(value.toString());
|
|
||||||
// result = true;
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (!result) this.sendMessage(reqBean, null, "操作太频繁!", MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
|
||||||
// else {
|
|
||||||
// //跳过工序
|
|
||||||
// reqBean.setClientInfo(shippingDispatchService.getActorClientInfo(reqBean));
|
|
||||||
// reqBean.setInterfaceType(MesPcnConstWords.SHIPPING);
|
|
||||||
// reqBean.setBusiType(MesPcnConstWords.WS_CMD_DO_SCAN);
|
|
||||||
// shippingDispatchService.doSendScanQueueNextExec(reqBean);
|
|
||||||
// }
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
@ -0,0 +1,78 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.station.function;
|
||||||
|
|
||||||
|
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.BaseSwsService;
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.IShippingDispatchService;
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.function.IFsmModuleFunctionService;
|
||||||
|
import cn.estsh.i3plus.platform.common.util.MesPcnConstWords;
|
||||||
|
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.model.ButtonDynamicModel;
|
||||||
|
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.stereotype.Service;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 工位参数按钮事件接口实现【选择工单】
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class MesFunctionChooseWorkOrderService extends BaseSwsService implements IFsmModuleFunctionService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IShippingDispatchService shippingDispatchService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean doFunction(StationRequestBean reqBean, StationResultBean resultBean, ButtonDynamicModel buttonDynamicModel) {
|
||||||
|
|
||||||
|
if (!checkCavityOrderIsValid(buttonDynamicModel.getFunctionValue())) {
|
||||||
|
this.sendMessage(reqBean, resultBean.writeDbLog(), String.format("生产线[%s]工位[%s]%s失败,请检查选择的工单信息[%s]的有效性!",
|
||||||
|
reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), buttonDynamicModel.getButtonName(), buttonDynamicModel.getFunctionValue()), MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存手动选择的腔数及工单信息上下文
|
||||||
|
productionDispatchContextStepService.saveFunctionChooseCavityOrderContext(reqBean, buttonDynamicModel.getFunctionValue());
|
||||||
|
|
||||||
|
reqBean.setClientInfo(shippingDispatchService.getActorClientInfo(reqBean));
|
||||||
|
reqBean.setInterfaceType(MesPcnConstWords.SHIPPING);
|
||||||
|
reqBean.setBusiType(MesPcnConstWords.WS_CMD_DO_SCAN);
|
||||||
|
reqBean.setTriggerAutoFsm(true);
|
||||||
|
|
||||||
|
shippingDispatchService.doSendScanQueueIfNoQueue(reqBean, false);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//腔数=工单个数 数据格式: 腔数;工单1;工单2;工单3
|
||||||
|
private Boolean checkCavityOrderIsValid(String functionValue) {
|
||||||
|
|
||||||
|
if (StringUtils.isEmpty(functionValue)) return false;
|
||||||
|
|
||||||
|
String[] value = functionValue.split(MesPcnExtConstWords.SEMICOLON);
|
||||||
|
|
||||||
|
if (null == value) return false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
Integer cavity = Integer.valueOf(value[0]);
|
||||||
|
|
||||||
|
if (cavity != value.length - 1) return false;
|
||||||
|
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.station.function;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.IShippingDispatchService;
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.function.IFsmModuleFunctionService;
|
||||||
|
import cn.estsh.i3plus.platform.common.util.MesPcnConstWords;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.model.ButtonDynamicModel;
|
||||||
|
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.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 工位参数按钮事件接口实现【重置工序】
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class MesFunctionJumpProcessService implements IFsmModuleFunctionService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IShippingDispatchService shippingDispatchService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean doFunction(StationRequestBean reqBean, StationResultBean resultBean, ButtonDynamicModel buttonDynamicModel) {
|
||||||
|
|
||||||
|
reqBean.setClientInfo(shippingDispatchService.getActorClientInfo(reqBean));
|
||||||
|
reqBean.setInterfaceType(MesPcnConstWords.SHIPPING);
|
||||||
|
reqBean.setBusiType(MesPcnConstWords.WS_CMD_DO_SCAN);
|
||||||
|
reqBean.setForceJumpProcess(true);
|
||||||
|
shippingDispatchService.doSendScanQueueNextExec(reqBean);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.station.function;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.mes.pcn.actor.shipping.dispatch.IFsmCommonService;
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseSwsService;
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.IShippingDispatchService;
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.function.IFsmModuleFunctionService;
|
||||||
|
import cn.estsh.i3plus.platform.common.util.MesPcnConstWords;
|
||||||
|
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.model.ButtonDynamicModel;
|
||||||
|
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.stereotype.Service;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 工位参数按钮事件接口实现【强过工步集】
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class MesFunctionJumpStateService extends BaseSwsService implements IFsmModuleFunctionService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFsmCommonService fsmCommonService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IShippingDispatchService shippingDispatchService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean doFunction(StationRequestBean reqBean, StationResultBean resultBean, ButtonDynamicModel buttonDynamicModel) {
|
||||||
|
|
||||||
|
Map<String, String> wcpcMap = fsmCommonService.doHandleFsmWcpcMapDataForDoScan(reqBean);
|
||||||
|
String jumpState = wcpcMap.get(MesPcnEnumUtil.STATION_REQUEST_BEAN_CMD.JUMP_STATE.getCode());
|
||||||
|
|
||||||
|
if (StringUtils.isEmpty(jumpState)) {
|
||||||
|
this.sendMessage(reqBean, resultBean.writeDbLog(), String.format("生产线[%s]工位[%s]%s失败,未配置工位参数[%s]!",
|
||||||
|
reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), buttonDynamicModel.getButtonName(), MesPcnEnumUtil.STATION_REQUEST_BEAN_CMD.JUMP_STATE.getCode()), MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.EXP_TEXT);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
reqBean.setClientInfo(shippingDispatchService.getActorClientInfo(reqBean));
|
||||||
|
reqBean.setInterfaceType(MesPcnConstWords.SHIPPING);
|
||||||
|
reqBean.setBusiType(MesPcnConstWords.WS_CMD_DO_SCAN);
|
||||||
|
reqBean.setScanInfo(jumpState);
|
||||||
|
shippingDispatchService.doSendScanQueueNextExec(reqBean);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.station.function;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionProcessContextStepService;
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.IStepService;
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.function.IFsmModuleFunctionService;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.model.ButtonDynamicModel;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.model.StationResultBean;
|
||||||
|
import cn.estsh.impp.framework.boot.util.SpringContextsUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 工位参数按钮事件接口实现【重置上下文】
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class MesFunctionResetCellContextService implements IFsmModuleFunctionService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMesProductionProcessContextStepService productionProcessContextStepService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean doFunction(StationRequestBean reqBean) {
|
||||||
|
|
||||||
|
//删除BASE上下文数据
|
||||||
|
productionProcessContextStepService.deleteProductionProcessContext(reqBean);
|
||||||
|
|
||||||
|
//删除BUSI上下文数据
|
||||||
|
return ((IStepService) SpringContextsUtil.getBean("mesProductionContextFlushStepService")).execute(reqBean).isCompleted();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean doFunction(StationRequestBean reqBean, StationResultBean resultBean, ButtonDynamicModel buttonDynamicModel) { return doFunction(reqBean); }
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.station.function;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.BaseSwsService;
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.IShippingDispatchService;
|
||||||
|
import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.function.IFsmModuleFunctionService;
|
||||||
|
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.model.ButtonDynamicModel;
|
||||||
|
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.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 工位参数按钮事件接口实现【切换工位】
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class MesFunctionSwitchCellService extends BaseSwsService implements IFsmModuleFunctionService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IShippingDispatchService shippingDispatchService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean doFunction(StationRequestBean reqBean, StationResultBean resultBean, ButtonDynamicModel buttonDynamicModel) {
|
||||||
|
|
||||||
|
this.sendMessage(reqBean, resultBean.writeDbLog(), String.format("生产线[%s]工位[%s]%s,客户端已下线!",
|
||||||
|
reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), buttonDynamicModel.getButtonName()), MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,58 +0,0 @@
|
|||||||
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.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("mesProductSnMarkUnkonwStepService")
|
|
||||||
public class MesProductSnMarkUnkonwStepService extends BaseStepService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IMesProductionProcessContextStepService productionProcessContextStepService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IMesProductionDispatchContextStepService productionDispatchContextStepService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IMesProduceSnExtService produceSnExtService;
|
|
||||||
|
|
||||||
//TODO 更新条码 未知 单独工步
|
|
||||||
|
|
||||||
//TODO 装配件工步 判断空腔条码
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public StepResult execute(StationRequestBean reqBean) {
|
|
||||||
|
|
||||||
StationResultBean resultBean = new StationResultBean();
|
|
||||||
|
|
||||||
StepResult stepResult = StepResult.getSuccessComplete();
|
|
||||||
|
|
||||||
//获取上下文信息
|
|
||||||
MesProductionProcessContext productionProcessContext = productionProcessContextStepService.getCurCellEquipment(reqBean);
|
|
||||||
|
|
||||||
//获取生产过程上下文对象有异常信息 抛出异常
|
|
||||||
if (!productionProcessContext.getSuccess()) return execNonCompleteAndSendMsgReturn(reqBean, resultBean.writeDbLog(), stepResult, productionProcessContext.getMessage());
|
|
||||||
|
|
||||||
//存储生产过程上下文对象
|
|
||||||
productionProcessContextStepService.saveProductionProcessContext(reqBean, productionProcessContext);
|
|
||||||
|
|
||||||
return stepResult;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue