From 30eaf5cfaac85c2d60305b7a60913aaacebb0b50 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 15 Aug 2024 14:32:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E5=BA=93=E5=AD=98=E5=93=81BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DistributionParcelListServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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(); //直接添加