From a05cd762bc334f0eebbc8dd15b445fe98425c365 Mon Sep 17 00:00:00 2001 From: "xiangwei.zhang" <752558143@qq.com> Date: Sun, 29 Sep 2024 09:32:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=A1=E7=A0=81=E6=89=93=E5=8D=B0=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apiservice/serviceimpl/busi/MesProduceSnPrintService.java | 2 ++ .../serviceimpl/step/MesProductSnPrintStepService.java | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnPrintService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnPrintService.java index bbf41be..08e9463 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnPrintService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesProduceSnPrintService.java @@ -171,6 +171,8 @@ public class MesProduceSnPrintService implements IMesProduceSnPrintService { resultModel.getMesProduceSnList().forEach(mesProduceSn -> { mesProduceSn.setWorkCenterCode(workCenterCode); + mesProduceSn.setPrintCount(MesPcnExtConstWords.ONE); + mesProduceSn.setPrintStatus(MesExtEnumUtil.PRINT_STATUS.PRINTED.getValue()); mesProduceSn.setFid(UUID.randomUUID().toString()); //保存条码 mesProduceSnRDao.insert(mesProduceSn); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnPrintStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnPrintStepService.java index a50c873..87ec2ab 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnPrintStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductSnPrintStepService.java @@ -143,9 +143,13 @@ public class MesProductSnPrintStepService extends BaseStepService { for (MesProductionPsOutContext outSn : productionPsOutContextList) { DdlPackBean packBean = DdlPackBean.getDdlPackBean(outSn.getOrganizeCode()); DdlPreparedPack.getNumEqualPack(outSn.getId(), MesPcnExtConstWords.ID, packBean); - mesProduceSnRao.updateByProperties( - new String[]{MesPcnExtConstWords.PRINT_STATUS, MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME}, - new Object[]{MesExtEnumUtil.PRINT_STATUS.PRINTED.getValue(), reqBean.getUserInfo(), TimeTool.getNowTime(true)}, packBean); + + MesProduceSn produceSn = mesProduceSnRao.getByProperty(packBean); + if (produceSn!= null) { + mesProduceSnRao.updateByProperties( + new String[]{MesPcnExtConstWords.PRINT_STATUS, "printCount", MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME}, + new Object[]{MesExtEnumUtil.PRINT_STATUS.PRINTED.getValue(),MesPcnExtConstWords.ONE, reqBean.getUserInfo(), TimeTool.getNowTime(true)}, packBean); + } } //保存打印条码记录 snLogRao.saveAll(snLogList);