Browse Source

1修复物料名称重复

single_db
pref_mail@163.com 1 year ago
parent
commit
e671657969
  1. 25
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

25
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -6455,18 +6455,33 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
* @return * @return
*/ */
private String getUnit(Long stockArticleId) { private String getUnit(Long stockArticleId) {
List<DistributionParcelListEntity> list = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().select("DISTINCT material_unit").lambda().eq(DistributionParcelListEntity::getStockArticleId, stockArticleId)); List<DistributionParcelListEntity> list = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, stockArticleId));
Set<String> tes = new HashSet<>();
if(!list.isEmpty()){ if(!list.isEmpty()){
StringBuffer str = new StringBuffer(); StringBuffer str = new StringBuffer();
list.forEach(i -> {
if (ObjectUtils.isNotNull(i.getMaterialUnit())) { for (DistributionParcelListEntity distributionParcelListEntity : list) {
str.append(i.getMaterialUnit()); 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(); return str.toString();
}else{ }else{
return "无"; return "无";
} }
} }
public String reservationMa() { public String reservationMa() {

Loading…
Cancel
Save