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