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() {