diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionCustomContextStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionCustomContextStepService.java index f40ade2..1d9feec 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionCustomContextStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/context/MesProductionCustomContextStepService.java @@ -113,19 +113,13 @@ public class MesProductionCustomContextStepService extends BaseStepService imple @Override public MesProdShiftContext getMesProdShiftKvBean(String organizeCode, String workCenterCode) { - log.info("获取生产线的当前班组班次信息 --- getMesProdShiftKvBean --- start"); - List stationKvBeans = getProdShiftDataContext(organizeCode, workCenterCode); + if (CollectionUtils.isEmpty(stationKvBeans)) return null; - log.info("获取生产线的当前班组班次信息 --- getMesProdShiftKvBean --- end"); - - MesProdShiftContext mesProdShiftContext = new MesProdShiftContext(); - if (CollectionUtils.isEmpty(stationKvBeans)) { - return null; - } StationKvBean shiftGroupKvBean = stationKvBeans.stream().filter(stationKvBean -> Objects.equal(stationKvBean.getKey(), MesPcnExtConstWords.SHIFT_GROUP)).findFirst().orElse(null); StationKvBean shiftCodeKvBean = stationKvBeans.stream().filter(stationKvBean -> Objects.equal(stationKvBean.getKey(), MesPcnExtConstWords.SHIFT_CODE)).findFirst().orElse(null); + MesProdShiftContext mesProdShiftContext = new MesProdShiftContext(); mesProdShiftContext.setShiftCode(shiftGroupKvBean == null ? null : shiftCodeKvBean.getValue()); mesProdShiftContext.setShiftGroup(shiftCodeKvBean == null ? null : shiftGroupKvBean.getValue()); return mesProdShiftContext;