diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/MesProductionNoSortModuleService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/MesProductionNoSortModuleService.java index b6f6415..ea044cc 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/MesProductionNoSortModuleService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/station/MesProductionNoSortModuleService.java @@ -68,20 +68,20 @@ public class MesProductionNoSortModuleService extends BaseModuleService { List prodShiftDataContext = mesProductionDispatchContextStepService.getProdShiftDataContext(reqBean.getOrganizeCode(), reqBean.getWorkCenterCode()); MesProdShiftContext mesProdShiftKvBean = mesProductionDispatchContextStepService.getMesProdShiftKvBean(reqBean.getOrganizeCode(), reqBean.getWorkCenterCode()); -// if (CollectionUtils.isEmpty(prodShiftDataContext)) { -// this.sendMessage(reqBean, new StationResultBean().writeDbLog(), "请先开班", MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT); -// throw ImppExceptionBuilder.newInstance().setSystemID(CommonEnumUtil.SOFT_TYPE.MES_PCN.getCode()).setErrorCode("NO_SHOW_MSG").build(); -// } + if (CollectionUtils.isEmpty(prodShiftDataContext)) { + this.sendMessage(reqBean, new StationResultBean().writeDbLog(), "请先开班", MesPcnEnumUtil.STATION_BUSI_TYPE.MESSAGE, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT); + throw ImppExceptionBuilder.newInstance().setSystemID(CommonEnumUtil.SOFT_TYPE.MES_PCN.getCode()).setErrorCode("NO_SHOW_MSG").build(); + } // 发送班次班组和工单 StationResultBean resultBean = getStationResultBean(reqBean, moduleContentContext, prodShiftDataContext); this.sendMessage(reqBean, resultBean); // 整合班次加工数量 List productionStatisticsContext = mesProductionDispatchContextStepService.getProductionStatisticsContext(reqBean); -// if (CollectionUtils.isEmpty(productionStatisticsContext)) { -// productionStatisticsContext = StationKvBeanUtil.addStationKvBeanList(new ArrayList<>(), new StationKvBean(new StringJoiner(MesPcnExtConstWords.AND).add(mesProdShiftKvBean.getShiftGroup()).add(mesProdShiftKvBean.getShiftCode()).toString(), "加工次数", "0"), -// new StationKvBean("color", "颜色", MesExtEnumUtil.COLOR.BLACK.getValue())); -// } + if (CollectionUtils.isEmpty(productionStatisticsContext)) { + productionStatisticsContext = StationKvBeanUtil.addStationKvBeanList(new ArrayList<>(), new StationKvBean(new StringJoiner(MesPcnExtConstWords.AND).add(mesProdShiftKvBean.getShiftGroup()).add(mesProdShiftKvBean.getShiftCode()).toString(), "加工次数", "0"), + new StationKvBean("color", "颜色", MesExtEnumUtil.COLOR.BLACK.getValue())); + } StationResultBean shiftCountBean = getStationResultBean(reqBean, productionStatisticsContext,mesWorkCell); this.sendMessage(reqBean, shiftCountBean); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesCountDownShowStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesCountDownShowStepService.java index d49aae9..388658e 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesCountDownShowStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesCountDownShowStepService.java @@ -52,7 +52,7 @@ public class MesCountDownShowStepService extends BaseStepService { MesProductionProcessContext productionProcessContext = productionProcessContextStepService.getProductionProcessContext(reqBean); //获取生产过程上下文对象有异常信息 抛出异常 - if (!productionProcessContext.getSuccess()) execExpSendMsgAndThrowEx(reqBean, resultBean.writeDbLog(), productionProcessContext.getMessage()); + if (!productionProcessContext.getSuccess()) return stepResult.msg(productionProcessContext.getMessage()); //存储生产过程上下文对象 productionProcessContextStepService.saveProductionProcessContext(reqBean, productionProcessContext);