From 0f24f901e4e9d6c7e07cb3cea856ed59b568fdc9 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Sun, 15 Oct 2023 11:44:13 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=9C=A8=E5=BA=93=E8=AE=A2=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2sql=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/DistributionStockArticleMapper.xml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml index ae41898b4..8cb243fca 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml @@ -342,18 +342,8 @@ ldsa.available_quantity, ldsa.is_have_data, ldsa.stock_article_code, ldsa.dealer_name, ldsa.dealer_code, ldsa.train_number, ldsa.factory_train, ldsa.sending, ldsa.send_warehouse_id, ldsa.send_warehouse_name, ldsa.is_zero, ldsa.accept_warehouse_id, ldsa.accept_warehouse_name, ldsa.order_delivery_status, - (select GROUP_CONCAT(DISTINCT lwtg.tray_code) - from logpm_distribution_parcel_list ldpl - LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id - LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id - where ldpl.stock_article_id = ldsa.id) trays, - ( - select GROUP_CONCAT(DISTINCT lwug.position_code) - from logpm_distribution_parcel_list ldpl - LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id - LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id - where ldsa.id = ldpl.stock_article_id - ) allocation + GROUP_CONCAT( DISTINCT lwtg.tray_code ) trays, + GROUP_CONCAT( DISTINCT lwug.position_code ) allocation from logpm_distribution_stock_article ldsa LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id @@ -455,7 +445,7 @@ concat('%',#{param.allocation},'%') - GROUP BY ldsa.id ,ldpl.id + group by ldsa.id