diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
index c8802a443..b2a2d98f4 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
@@ -353,6 +353,12 @@
and ldr.mall_name like concat('%',#{param.mallName},'%')
+
+ and lds.id in
+
+ #{a}
+
+
and ldr.warehouse_id in
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
index e70d6c458..95556764e 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
@@ -1750,21 +1750,72 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl queryWrapper = Condition.getQueryWrapper(distributionSignfor, DistributionSignforEntity.class);
-// queryWrapper.lambda().eq(DistributionSignforEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
-// if(ObjectUtils.isNotNull(o)){
-// queryWrapper.in("id",String.valueOf(o).split(","));
-// }
-// queryWrapper.eq("warehouse_id",myCurrentWarehouse.getId());
+
DistributionSignforVO distributionSignforVO = JSON.parseObject(JSON.toJSONString(distributionSignfor), DistributionSignforVO.class);
+
+
+//获取当前登录人仓库
+ List myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse();
+ //取出id
+ List collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
+ distributionSignforVO.setWarehouseIdList(collect);
+ List distributionSignforVOS = baseMapper.selectDistributionSignforPage(null, distributionSignforVO);
+ distributionSignforVOS.forEach(d -> {
+ if (d.getDeliveryType().equals(DistributionTypeConstant.shipie.getValue())) {
+ d.setDeliveryTypeName(DistributionTypeConstant.shipie.getName());
+ } else if (d.getDeliveryType().equals(DistributionTypeConstant.shangpei.getValue())) {
+ d.setDeliveryTypeName(DistributionTypeConstant.shangpei.getName());
+ } else {
+ d.setDeliveryTypeName("");
+ }
+ List distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(d.getReservationId());
+ //查询库存品信息
+ List list = disStockListDetailService.list(Wrappers.query().lambda()
+ .eq(DisStockListDetailEntity::getReservationId, d.getReservationId())
+ );
+ int weizhuangchejianshu = 0;
+ int weiqianshoujianshu = 0;
+ int zhuangchejianshu = 0;
+ int qianshoujianshu = 0;
+ if (Func.isNotEmpty(list) && list.size() > 0) {
+ zhuangchejianshu += list.stream().filter(f -> f.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
+// weizhuangchejianshu += list.stream().filter(f -> f.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
+ qianshoujianshu += list.stream().filter(f -> f.getStockSignfoStatus().equals(InventorySigningStatusConstant.yiqianshou.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
+// weiqianshoujianshu += list.stream().filter(f -> f.getStockSignfoStatus().equals(InventorySigningStatusConstant.weiqianshou.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
+ }
+ if (Func.isNotEmpty(distributionParcelListEntities)) {
+ weizhuangchejianshu += distributionParcelListEntities.stream().filter(f -> f.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())).mapToInt(DistributionParcelListEntity::getQuantity).sum();
+ zhuangchejianshu += distributionParcelListEntities.stream().filter(f -> f.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue())).mapToInt(DistributionParcelListEntity::getQuantity).sum();
+ weiqianshoujianshu += distributionParcelListEntities.stream().filter(f -> !f.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())).mapToInt(DistributionParcelListEntity::getQuantity).sum();
+ qianshoujianshu += distributionParcelListEntities.stream().filter(f -> f.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())).mapToInt(DistributionParcelListEntity::getQuantity).sum();
+ }
+ //该客户的异常装车件数
+ Integer abnormalLoading = distributionLoadscanMapper.selectAbnormalLoadingByReservationId(d.getReservationId());
+ //该客户的异常签收件数
+ Integer abnormalSigning = distributionLoadscanMapper.selectAbnormalSigningByReservationId(d.getReservationId());
+// DistributionLoadingNumDTO reservationSigningNum = distributionReservationMapper.selectReservationSigningNum(d.getReservationId());
+ if (d.getDeliveryType().equals(DistributionTypeConstant.shipie.getValue())) {
+ List disStockListDetailEntities = distributionReservationMapper.selectInventoryListByReservation(d.getReservationId());
+ if (Func.isNotEmpty(disStockListDetailEntities)) {
+ //查询库存品未装车数
+ int inventoryuweizhuancghe = disStockListDetailEntities.stream().filter(f -> f.getStockLockingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
+ weizhuangchejianshu += inventoryuweizhuancghe;
+ //查询库存品为签收数
+ int inventoryweiqianshou = disStockListDetailEntities.stream().filter(f -> f.getStockSignfoStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
+ weiqianshoujianshu += inventoryweiqianshou;
+ }
+ }
+ //设置计划未装车数
+ d.setUnloadedNumber(weizhuangchejianshu);
+ d.setAbnormalLoadedNumber(abnormalLoading);
+ d.setLoadedNumber(zhuangchejianshu);
+ d.setUnreceivedQuantity(weiqianshoujianshu);
+ d.setReceivedQuantity(qianshoujianshu);
+ d.setAbnormalReceivedQuantity(abnormalSigning);
+ });
+
+
+
if (ObjectUtils.isNotNull(o)) {
String id = (String) o;
String[] split = id.split(",");