工步弹框

tags/yfai-pcn-ext-v2.3
王杰 8 months ago
parent 1988ac9e83
commit 2dcadee21b

@ -7,6 +7,7 @@ import cn.estsh.i3plus.mes.pcn.serviceimpl.fsm.function.IFsmModuleFunctionServic
import cn.estsh.i3plus.mes.pcn.util.StringUtil;
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesProdRouteOptParam;
import cn.estsh.i3plus.pojo.mes.model.StationCustomDialogBean;
import cn.estsh.i3plus.pojo.mes.model.StationRequestBean;
import cn.estsh.i3plus.pojo.mes.model.StationResultBean;
import cn.estsh.i3plus.pojo.mes.model.StepResult;
@ -59,26 +60,27 @@ public class MesCustomDialogStepService extends BaseStepService {
if (StringUtils.isEmpty(customPageName)) stepExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), String.format("弹框会话工步未配置工步参数[%s]!", MesPcnExtConstWords.CUSTOM_PAGE_NAME));
//获取工步弹框需要渲染的数据
Object stepDialogContext = fsmModuleFunctionService.stepDialogDispatch(reqBean, customPageName);
//获取工步弹框需要渲染的数据; 无须渲染动态数据时无须重写stepDialogDispatch方法且接口方法已默认返回true可以直接弹框
StationCustomDialogBean scdBean = fsmModuleFunctionService.stepDialogDispatch(reqBean, new StationCustomDialogBean(customPageName));
//没有数据返回NULL则默认不需要弹框, 无须渲染动态数据时无须重写stepDialogDispatch方法且接口方法已默认返回true可以直接弹框
if (null == stepDialogContext) return stepResult;
//当前不需要弹框
if (null == scdBean || !scdBean.getIsDialog()) return stepResult;
if (!(stepDialogContext instanceof Boolean))
log.info("工厂{}生产线{}工位{}:FSM STATE DISPATCHER --- DO STEP --- {} EXEC --- stepDialogContext:{}",
reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), StringUtil.toLowerCaseFirst(this.getClass().getSimpleName()), JSONObject.toJSONString(stepDialogContext));
//发送弹框数据
this.sendMessage(reqBean, resultBean.busiType(MesPcnEnumUtil.STATION_BUSI_TYPE.CUSTOM_COMPONENT.getValue()).dataType(MesPcnEnumUtil.STATION_DATA_TYPE.CUSTOM_DIALOG.getValue()).customPageName(customPageName).resultObj(stepDialogContext));
if (null != scdBean.getObj())
log.info("工厂{}生产线{}工位{}:FSM STATE DISPATCHER --- DO STEP --- {} EXEC --- StationCustomDialogBean={}",
reqBean.getOrganizeCode(), reqBean.getWorkCenterCode(), reqBean.getWorkCellCode(), StringUtil.toLowerCaseFirst(this.getClass().getSimpleName()), JSONObject.toJSONString(scdBean));
//清除剩余扫描队列
shippingDispatchService.clearScanQueue(reqBean);
//结束线程
stepSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), "弹框会话开启!");
//发送弹框数据
this.sendMessage(reqBean, resultBean.busiType(MesPcnEnumUtil.STATION_BUSI_TYPE.CUSTOM_COMPONENT.getValue()).dataType(MesPcnEnumUtil.STATION_DATA_TYPE.CUSTOM_DIALOG.getValue()).customPageName(customPageName).resultObj(scdBean.getObj()));
//弹框业务同步处理
if (!scdBean.getIsAsyn()) stepSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(MesPcnEnumUtil.WORK_CELL_SCAN_MONITOR_LOG_TYPE.PROCESS.getValue()), "弹框会话开启!");
return stepResult;
//弹框业务异步处理
return stepSuccessCompleteAndSendMsgReturn(reqBean, resultBean, stepResult, "弹框会话开启!");
}

Loading…
Cancel
Save