From e67165796923cb4b5b5f45bc1f8c7598b49f928f Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Sun, 7 Jan 2024 07:03:07 +0800 Subject: [PATCH] =?UTF-8?q?1=E4=BF=AE=E5=A4=8D=E7=89=A9=E6=96=99=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionDeliveryListServiceImpl.java | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index ec8ccce83..069e08b23 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -6455,18 +6455,33 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl list = distributionParcelListService.list(Wrappers.query().select("DISTINCT material_unit").lambda().eq(DistributionParcelListEntity::getStockArticleId, stockArticleId)); - if (!list.isEmpty()) { + List list = distributionParcelListService.list(Wrappers.query().lambda().eq(DistributionParcelListEntity::getStockArticleId, stockArticleId)); + + Set tes = new HashSet<>(); + + if(!list.isEmpty()){ StringBuffer str = new StringBuffer(); - list.forEach(i -> { - if (ObjectUtils.isNotNull(i.getMaterialUnit())) { - str.append(i.getMaterialUnit()); + + for (DistributionParcelListEntity distributionParcelListEntity : list) { + if(ObjectUtils.isNotNull(distributionParcelListEntity.getMaterialUnit())){ + tes.add(distributionParcelListEntity.getMaterialUnit()); } - }); + } + + for (String te : tes) { + if(!str.toString().isEmpty()){ + str.append(","); + } + str.append(te); + } return str.toString(); - } else { + + + }else{ return "无"; } + + } public String reservationMa() {