diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesRawPartChargingServiceImpl.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesRawPartChargingServiceImpl.java index 53f0bd9..1f3dffc 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesRawPartChargingServiceImpl.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesRawPartChargingServiceImpl.java @@ -144,18 +144,19 @@ public class MesRawPartChargingServiceImpl implements IMesRawPartChargingService checkNotNull(mesRawPartChargingModel); List mesRawPartChargingList = findMesRawPartCharging(mesRawPartChargingModel); - if(CollectionUtils.isEmpty(mesRawPartChargingList)){ - MesPcnException.throwMesBusiException("料筒条码【%s】未绑定,无需初始化", mesRawPartChargingModel.getPackageSn()); - } - for (MesRawPartCharging mesRawPartCharging : mesRawPartChargingList) { - //删除绑定信息 - mesRawPartCharging.setIsDeleted(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()); - ConvertBean.serviceModelUpdate(mesRawPartCharging,mesRawPartChargingModel.getUserName()); - mesRawPartChargingRepository.update(mesRawPartCharging); - //保存日志 - saveLog(mesRawPartChargingModel, mesRawPartCharging, MesExtEnumUtil.CHARGING_LOG_STATUS.CLEAR); + if(!CollectionUtils.isEmpty(mesRawPartChargingList)){ + for (MesRawPartCharging mesRawPartCharging : mesRawPartChargingList) { + //删除绑定信息 + mesRawPartCharging.setIsDeleted(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()); + ConvertBean.serviceModelUpdate(mesRawPartCharging,mesRawPartChargingModel.getUserName()); + mesRawPartChargingRepository.update(mesRawPartCharging); + //保存日志 + saveLog(mesRawPartChargingModel, mesRawPartCharging, MesExtEnumUtil.CHARGING_LOG_STATUS.CLEAR); + } +// MesPcnException.throwMesBusiException("料筒条码【%s】未绑定,无需初始化", mesRawPartChargingModel.getPackageSn()); } + } private List getMesRawPackagePartList(MesRawPartChargingModel mesRawPartChargingModel, MesRawPackageDetail packageDetail) { diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/AionPrintStrategy.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/AionPrintStrategy.java index e1be928..eec3318 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/AionPrintStrategy.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/AionPrintStrategy.java @@ -136,8 +136,8 @@ public class AionPrintStrategy implements IPrintTemplateStrategyService { if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); MesNumberRule numberRule = numberRuleRepository.getByProperty( new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, - new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProcessMatchRule()}); - if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProcessMatchRule()); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProductMatchRule()}); + if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule()); return numberRule; } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/GqxnyPrintStrategy.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/GqxnyPrintStrategy.java index ac7858c..bb8770e 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/GqxnyPrintStrategy.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/GqxnyPrintStrategy.java @@ -151,8 +151,8 @@ public class GqxnyPrintStrategy implements IPrintTemplateStrategyService { if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); MesNumberRule numberRule = numberRuleRepository.getByProperty( new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, - new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProcessMatchRule()}); - if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProcessMatchRule()); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProductMatchRule()}); + if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule()); return numberRule; } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengNewPrintStrategy.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengNewPrintStrategy.java index 7c66b42..bae9400 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengNewPrintStrategy.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengNewPrintStrategy.java @@ -123,8 +123,8 @@ public class XiaoPengNewPrintStrategy implements IPrintTemplateStrategyService { if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); MesNumberRule numberRule = numberRuleRepository.getByProperty( new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, - new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProcessMatchRule()}); - if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProcessMatchRule()); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProductMatchRule()}); + if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule()); return numberRule; } diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengPrintStrategy.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengPrintStrategy.java index f2f6eed..a2b9ad7 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengPrintStrategy.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/print/strategy/XiaoPengPrintStrategy.java @@ -125,8 +125,8 @@ public class XiaoPengPrintStrategy implements IPrintTemplateStrategyService { if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); MesNumberRule numberRule = numberRuleRepository.getByProperty( new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, - new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProcessMatchRule()}); - if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProcessMatchRule()); + new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), part.getProductMatchRule()}); + if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule()); return numberRule; }