From 510605168439e08fc74b397ef5031abb2a115d4b Mon Sep 17 00:00:00 2001
From: PigBaoBei <2739175034@qq.com>
Date: Tue, 7 May 2024 20:25:06 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E5=BA=93=E8=AE=A2=E5=8D=95=E5=AF=BC?=
=?UTF-8?q?=E5=87=BABUG=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/DistributionReservationMapper.xml | 3 +-
.../DistributionStockArticleMapper.java | 2 +-
.../mapper/DistributionStockArticleMapper.xml | 48 ++++++++++---------
.../mapper/DistrilbutionBillStockMapper.xml | 2 +-
.../DistributionStockArticleServiceImpl.java | 19 ++++++--
5 files changed, 44 insertions(+), 30 deletions(-)
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
index d328268e0..bf4d52f2a 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
@@ -1821,7 +1821,8 @@
ldrzp.reservation_id = #{param.reservationId} AND ldrzp.zero_package_status in ('1','3')
-
+ GROUP BY
+ ldrzp.parcel_list_id
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
index d3839e21f..712d37788 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
@@ -150,7 +150,7 @@
from logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id and lwug.association_type = '3'
where ldpl.stock_article_id = ldbs.stock_article_id) goodsAllocation,
- ldsa.service_number serviceNumber,ldsa.waybill_number waybillNumber,ldsa.train_number trainNumber,ldsa.send_warehouse_name sendWarehouseName
+ ldsa.service_number serviceNumber,ldsa.waybill_number waybillNumber,ldsa.train_number trainNumber,ldsa.send_warehouse_name sendWarehouseName,
GROUP_CONCAT(DISTINCT ldbls.scan_user) AS scanUser ,MAX(ldbls.create_time) AS signingTime
from
logpm_distrilbution_bill_lading AS ldbl
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
index 02c38752e..03d80f041 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
@@ -165,20 +165,29 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl warehouseList = warehouseClient.getMyWarehouseList();
+ if (!warehouseList.isEmpty()){
+ List warehouseListIds = warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
+ paramMap.put("warehouseIds", warehouseListIds);
+ }
+ }else {
+ paramMap.put("warehouseId", myCurrentWarehouse.getId());
}
// 用户勾选数据的ids
Object ids = paramMap.get("ids");
- List idArr = null;
+ List idArr = null;
if (null != ids && !"".equals(ids.toString())) {
- idArr = Arrays.asList(paramMap.get("ids").toString().split(","));
+// idArr = Arrays.asList(paramMap.get("ids").toString().split(","));
+ idArr = Func.toLongList((String) paramMap.get("ids"));
+
}
String tenantId = AuthUtil.getTenantId();
- paramMap.put("warehouseId", myCurrentWarehouse.getId());
paramMap.put("tenantId", tenantId);
+ paramMap.put("orderIds", idArr);
- List list = baseMapper.exportDistributionStockArticle(paramMap, idArr);
+ List list = baseMapper.exportDistributionStockArticle(paramMap);
List excelList = new ArrayList<>();
//
list.forEach(li -> {