Browse Source

Merge branch 'dev' into pre-production

master
汤建军 10 months ago
parent
commit
8b22e80c9f
  1. 25
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

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

@ -1731,21 +1731,15 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = JSONObject.parseObject(JSONObject.toJSONString(distrilbutionBillLading), DistrilbutionBillLadingEntity.class); DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = JSONObject.parseObject(JSONObject.toJSONString(distrilbutionBillLading), DistrilbutionBillLadingEntity.class);
IPage<DistrilbutionBillLadingAppVO> inventory = baseMapper.getInventory(page, distrilbutionBillLadingEntity); IPage<DistrilbutionBillLadingAppVO> inventory = baseMapper.getInventory(page, distrilbutionBillLadingEntity);
inventory.getRecords().forEach(i -> { inventory.getRecords().forEach(i -> {
if (i.getQuantity().equals(i.getDeliveryNum())) {
//已备货
// List<DistributionBillLadingScanEntity> list = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
// .eq(DistributionBillLadingScanEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
// .eq(DistributionBillLadingScanEntity::getMaterialType, '1')
// );
List<DisStockListDetailEntity> listed = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda() List<DisStockListDetailEntity> listed = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getReservationId, i.getBillLadingId()) .eq(DisStockListDetailEntity::getReservationId, i.getBillLadingId())
.ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) .ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
); );
if (Func.isNotEmpty(listed)){ if (Func.isNotEmpty(listed)){
int sum = listed.stream().filter(f -> InventoryStockUpStatusConstant.yibeihuo.getValue().equals(f.getStockStatus()) && Func.isNotEmpty(f.getStockPackageCode())).mapToInt(DisStockListDetailEntity::getNum).sum(); int sum = listed.stream().filter(f -> InventoryStockUpStatusConstant.yibeihuo.getValue().equals(f.getStockStatus()) && Func.isNotEmpty(f.getStockPackageCode())).mapToInt(DisStockListDetailEntity::getNum).sum();
log.info(i.getDescriptionGoods()+">>>>>>>>>>>>>>自提客户备货库存数量:",sum); log.info(i.getDescriptionGoods()+">>>>>>>>>>>>>>自提客户备货库存数量:",sum);
if (sum>0){ if (sum == i.getQuantity()){
i.setEsauInventoryNum(sum); i.setEsauInventoryNum(sum);
}else { }else {
i.setEsauInventoryNum(-1); i.setEsauInventoryNum(-1);
@ -1753,12 +1747,21 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}else { }else {
i.setEsauInventoryNum(-1); i.setEsauInventoryNum(-1);
} }
// if (i.getQuantity().equals(i.getDeliveryNum())) {
//已备货
// List<DistributionBillLadingScanEntity> list = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
// .eq(DistributionBillLadingScanEntity::getBillLadingId, distrilbutionBillLadingEntity.getId())
// .eq(DistributionBillLadingScanEntity::getMaterialType, '1')
// );
// i.setEsauInventoryNum(list.size());
} else {
// } else {
//没有备货完成 //没有备货完成
i.setEsauInventoryNum(-1); // i.setEsauInventoryNum(-1);
} // }
}); });
return inventory; return inventory;

Loading…
Cancel
Save