From 4b087ed17b0142c4e9f548de2de6d43b5afc4332 Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Mon, 21 Oct 2024 18:43:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../step/context/MesProductionCustomContextStepService.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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;