From 7785f01ed2f2d2a802f2e97d95c80562f1bf9e24 Mon Sep 17 00:00:00 2001
From: PigBaoBei <2739175034@qq.com>
Date: Mon, 13 May 2024 17:11:53 +0800
Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=8F=90=E8=AE=A2=E5=8D=95=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E7=95=8C=E9=9D=A2=E6=9F=A5=E8=AF=A2=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../distribution/mapper/DistrilbutionBillStockMapper.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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 b2d7cba79..d154c16a8 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
@@ -141,7 +141,7 @@
where ldpl.material_name is not null and ldpl.stock_article_id = ldbs.stock_article_id) materialName,
(select IFNULL(sum(lds.stock_quantity),0)
from logpm_distribution_stock lds
- where lds.stock_article = ldbs.stock_article_id ) preparedQuantity ,
+ where lds.stock_article = ldbs.stock_article_id AND lds.bill_lading_id = ldbl.id ) preparedQuantity ,
(select COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '')
from logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id and lwtg.association_type = '3'
@@ -156,12 +156,12 @@
logpm_distrilbution_bill_lading AS ldbl
LEFT JOIN logpm_distrilbution_bill_stock ldbs ON ldbs.bill_lading_id = ldbl.id
LEFT JOIN logpm_distribution_stock_article ldsa on ldbs.stock_article_id = ldsa.id
- LEFT JOIN logpm_distribution_stock lds on lds.stock_article = ldbs.stock_article_id
+
LEFT JOIN logpm_distribution_bill_lading_scan AS ldbls ON ldbl.id = ldbls.bill_lading_id
ldbs.is_deleted = 0 and ldbs.bill_lading_id = #{param.billLadingId} and ldbs.order_status in (1,3)
- GROUP BY ldbl.id
+ GROUP BY ldbl.id,ldbs.stock_article_id