From 9eed422dd7968aae629efc2d6489e4cc10173c9b Mon Sep 17 00:00:00 2001 From: jun Date: Fri, 22 Nov 2024 16:15:05 +0800 Subject: [PATCH] =?UTF-8?q?InternalBarcodeDP=E6=9D=A1=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E5=88=99=E5=8E=BB=E6=8E=89=E9=9B=B6=E4=BB=B6=E5=8F=B7=E5=90=8E?= =?UTF-8?q?=E5=9B=9B=E4=BD=8D=E6=8B=BC=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../numberrule/InternalBarcodeNumberRuleStrategyService.java | 6 +++--- .../serviceimpl/print/strategy/InternalBarcodePrintStrategy.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/numberrule/InternalBarcodeNumberRuleStrategyService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/numberrule/InternalBarcodeNumberRuleStrategyService.java index 03cb847..9f4e21c 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/numberrule/InternalBarcodeNumberRuleStrategyService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/numberrule/InternalBarcodeNumberRuleStrategyService.java @@ -25,10 +25,10 @@ public class InternalBarcodeNumberRuleStrategyService implements INumberRulePack @Override public GenSerialNoModel execute(GenSerialNoModel genSerialNoModel) { - if (StringUtils.isEmpty(genSerialNoModel.getShiftCode()) || StringUtils.isEmpty(genSerialNoModel.getPartNo())) { - MesPcnException.throwMesBusiException("班次代码或零件号未维护"); + if (StringUtils.isEmpty(genSerialNoModel.getShiftCode())) { + MesPcnException.throwMesBusiException("班次代码未维护"); } - genSerialNoModel.setDynamicRule(new StringJoiner(MesPcnExtConstWords.COMMA).add(genSerialNoModel.getPartNo().substring(genSerialNoModel.getPartNo().length() - 4)).add(genSerialNoModel.getShiftCode()).toString()); + genSerialNoModel.setDynamicRule(genSerialNoModel.getShiftCode()); Date date = new Date(); //年月日缩写 genSerialNoModel.setYear(getYearShort(date)); diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/InternalBarcodePrintStrategy.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/InternalBarcodePrintStrategy.java index d766e34..d532366 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/InternalBarcodePrintStrategy.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/InternalBarcodePrintStrategy.java @@ -61,8 +61,8 @@ public class InternalBarcodePrintStrategy implements IPrintTemplateStrategyServi MesPart mesPart = mesPartService.getMesPartByPartNo(mesProduceSnPrintModel.getPartNo(), organizeCode); MesCustomerPart customerPart = (!Objects.isNull(genSerialNoModel) && !CollectionUtils.isEmpty(genSerialNoModel.getDataMap()) && genSerialNoModel.getDataMap().containsKey(MesCustomerPart.class.getSimpleName())) ? (MesCustomerPart) genSerialNoModel.getDataMap().get(MesCustomerPart.class.getSimpleName()) : mesCustomerPartService.getMesCustomerPart(organizeCode,mesProduceSnPrintModel.getPartNo()); if (!isStep){ - if (StringUtils.isEmpty(genSerialNoModel.getShiftCode()) || StringUtils.isEmpty(genSerialNoModel.getPartNo())) { - MesPcnException.throwMesBusiException("班次代码或零件号未维护"); + if (StringUtils.isEmpty(genSerialNoModel.getShiftCode())) { + MesPcnException.throwMesBusiException("班次代码未维护"); } if (!Objects.isNull(customerPart)) { genSerialNoModel.setCustPartNo(customerPart.getCustPartNo());