diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java index 1f43499c7..dce78f797 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java @@ -919,31 +919,31 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl brandList = v.stream().map(DistributionParcelListEntity::getBrandName).collect(Collectors.toList()); if (brandList.size()>1){ //多个品牌 - throw new RuntimeException(k+"多个品牌"); + throw new ServiceException(k+"多个品牌"); } List mallList = v.stream().map(DistributionParcelListEntity::getMallName).collect(Collectors.toList()); if (mallList.size()>1){ //多个商场 - throw new RuntimeException(k+"多个商场"); + throw new ServiceException(k+"多个商场"); } List brandId = v.stream().map(DistributionParcelListEntity::getBrandId).distinct().collect(Collectors.toList()); if (brandId.size()>1){ //多个品牌 - throw new RuntimeException(k+"多个品牌"); + throw new ServiceException(k+"多个品牌"); } List materialName = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMaterialName).distinct().collect(Collectors.toList()); if (materialName.size()>1){ - throw new RuntimeException(k+"存在多个物料单位"); + throw new ServiceException(k+"存在多个物料单位"); } List materialUnit = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMaterialUnit).distinct().collect(Collectors.toList()); if (materialUnit.size()>1){ //多个物料单位 - throw new RuntimeException(k+"存在多个物料单位"); + throw new ServiceException(k+"存在多个物料单位"); } int num = v.stream().mapToInt(DistributionParcelListEntity::getQuantity).sum(); if (num <= 0) { //无有效的在库数量 - throw new RuntimeException("无有效的在库数量"); + throw new ServiceException("无有效的在库数量"); } DistributionStockListEntity distributionStockListEntity = new DistributionStockListEntity(); //直接添加