Merge remote-tracking branch 'origin/dev' into dev

tags/yfai-pcn-ext-v2.1
xiangwei.zhang 9 months ago
commit c301a99fd2

@ -144,18 +144,19 @@ public class MesRawPartChargingServiceImpl implements IMesRawPartChargingService
checkNotNull(mesRawPartChargingModel); checkNotNull(mesRawPartChargingModel);
List<MesRawPartCharging> mesRawPartChargingList = findMesRawPartCharging(mesRawPartChargingModel); List<MesRawPartCharging> mesRawPartChargingList = findMesRawPartCharging(mesRawPartChargingModel);
if(CollectionUtils.isEmpty(mesRawPartChargingList)){ if(!CollectionUtils.isEmpty(mesRawPartChargingList)){
MesPcnException.throwMesBusiException("料筒条码【%s】未绑定无需初始化", mesRawPartChargingModel.getPackageSn()); for (MesRawPartCharging mesRawPartCharging : mesRawPartChargingList) {
} //删除绑定信息
for (MesRawPartCharging mesRawPartCharging : mesRawPartChargingList) { mesRawPartCharging.setIsDeleted(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
//删除绑定信息 ConvertBean.serviceModelUpdate(mesRawPartCharging,mesRawPartChargingModel.getUserName());
mesRawPartCharging.setIsDeleted(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()); mesRawPartChargingRepository.update(mesRawPartCharging);
ConvertBean.serviceModelUpdate(mesRawPartCharging,mesRawPartChargingModel.getUserName()); //保存日志
mesRawPartChargingRepository.update(mesRawPartCharging); saveLog(mesRawPartChargingModel, mesRawPartCharging, MesExtEnumUtil.CHARGING_LOG_STATUS.CLEAR);
//保存日志 }
saveLog(mesRawPartChargingModel, mesRawPartCharging, MesExtEnumUtil.CHARGING_LOG_STATUS.CLEAR); // MesPcnException.throwMesBusiException("料筒条码【%s】未绑定无需初始化", mesRawPartChargingModel.getPackageSn());
} }
} }
private List<MesRawPackagePart> getMesRawPackagePartList(MesRawPartChargingModel mesRawPartChargingModel, MesRawPackageDetail packageDetail) { private List<MesRawPackagePart> getMesRawPackagePartList(MesRawPartChargingModel mesRawPartChargingModel, MesRawPackageDetail packageDetail) {

@ -136,8 +136,8 @@ public class AionPrintStrategy implements IPrintTemplateStrategyService {
if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo());
MesNumberRule numberRule = numberRuleRepository.getByProperty( MesNumberRule numberRule = numberRuleRepository.getByProperty(
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, 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()}); 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.getProcessMatchRule()); if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule());
return numberRule; return numberRule;
} }

@ -151,8 +151,8 @@ public class GqxnyPrintStrategy implements IPrintTemplateStrategyService {
if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo());
MesNumberRule numberRule = numberRuleRepository.getByProperty( MesNumberRule numberRule = numberRuleRepository.getByProperty(
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, 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()}); 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.getProcessMatchRule()); if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule());
return numberRule; return numberRule;
} }

@ -123,8 +123,8 @@ public class XiaoPengNewPrintStrategy implements IPrintTemplateStrategyService {
if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo());
MesNumberRule numberRule = numberRuleRepository.getByProperty( MesNumberRule numberRule = numberRuleRepository.getByProperty(
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, 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()}); 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.getProcessMatchRule()); if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule());
return numberRule; return numberRule;
} }

@ -125,8 +125,8 @@ public class XiaoPengPrintStrategy implements IPrintTemplateStrategyService {
if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo()); if (StringUtils.isEmpty(part.getProductMatchRule())) MesPcnException.throwMesBusiException("物料[%s]未维护零件条码匹配规则", part.getPartNo());
MesNumberRule numberRule = numberRuleRepository.getByProperty( MesNumberRule numberRule = numberRuleRepository.getByProperty(
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.RULE_CODE}, 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()}); 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.getProcessMatchRule()); if (null == numberRule) MesPcnException.throwMesBusiException("物料[%s]维护的零件条码匹配规则[%s]信息不存在", part.getPartNo(), part.getProductMatchRule());
return numberRule; return numberRule;
} }

Loading…
Cancel
Save