tags/yfai-pcn-ext-v1.0
王杰 11 months ago
parent f87e216c67
commit 27335597ad

@ -68,20 +68,20 @@ public class MesProductionNoSortModuleService extends BaseModuleService {
List<StationKvBean> 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<StationKvBean> 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);

@ -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);

Loading…
Cancel
Save