Browse Source

备货BUG修复

dist.1.3.0
汤建军 5 months ago
parent
commit
aa42c434be
  1. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -367,6 +367,7 @@
association_value ) AS t2 ON t.cargo_number = t2.association_value
where ldslNew.is_deleted = 0
AND ldslNew.warehouse_id=#{warehouseId}
AND ldslNew.market_name=#{mallName}
GROUP BY
ldslNew.cargo_number
</select>

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -904,8 +904,9 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
List<String> materialUnit = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMaterialUnit).distinct().collect(Collectors.toList());
List<Long> mallId = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMarketId).distinct().collect(Collectors.toList());
List<String> materialName = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getMaterialName).distinct().collect(Collectors.toList());
List<String> brandName = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getBrandName).distinct().collect(Collectors.toList());
List<Long> brandId = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getBrandId).distinct().collect(Collectors.toList());
if (materialId.size() != 1 || materialCode.size() != 1 || materialUnit.size() != 1 || mallId.size() != 1 || materialName.size() != 1 || brandId.size() != 1) {
if (materialId.size() != 1 || materialCode.size() != 1 || materialUnit.size() != 1 || mallId.size() != 1 || materialName.size() != 1 || brandName.size() != 1) {
//该批次包件出现多种物料包件
return null;
}
@ -941,6 +942,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
// distributionStockListEntity.setCategory(Optional.ofNullable(distributionParcelList.getBrandId()+"").orElse(null));//品分类
// 品牌
distributionStockListEntity.setBrandId(brandId.get(0));
distributionStockListEntity.setBrandName(brandName.get(0));
distributionStockListEntity.setUnpackingQuantity(0);
distributionStockListEntity.setSourceType("1"); //类型

Loading…
Cancel
Save