From 2eae9b4893666db3799e96efa13a0fd3062ccbd8 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Tue, 21 Jan 2025 17:46:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=95=B4=E6=89=98=E5=A4=87=E8=B4=A7?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/AftersalesWorkOrderMapper.xml | 8 +-- .../mapper/DistributionStockupMapper.xml | 5 +- .../impl/DistributionStockupServiceImpl.java | 55 ++++++++++++------- 3 files changed, 43 insertions(+), 25 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml index 8a5f4173a..c2f4d1d2c 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml @@ -2037,7 +2037,7 @@ lawo.create_time AS createTime, lawo.commit_time AS commitTime, GROUP_CONCAT( laprr.result_type ) AS resultType, - SUM(laprr.money) AS money, + (SELECT SUM(money) FROM logpm_aftersales_processing_results WHERE is_deleted = 0 AND work_order_id = lawo.id) AS money, lawo.warehouse_service_name AS warehouseServiceName, lawo.headquarters_name AS headquartersName, GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName, @@ -2222,7 +2222,7 @@ lawo.commit_time AS commitTime, lawo.over_time AS overTime, GROUP_CONCAT(DISTINCT laprr.result_type ) AS resultType, - SUM(laprr.money) AS money, + (SELECT SUM(money) FROM logpm_aftersales_processing_results WHERE is_deleted = 0 AND work_order_id = lawo.id) AS money, lawo.warehouse_service_name AS warehouseServiceName, lawo.headquarters_name AS headquartersName, GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName, @@ -3758,7 +3758,7 @@ lawo.commit_time AS commitTime, lawo.over_time AS overTime, GROUP_CONCAT( laprr.result_type ) AS resultType, - SUM(laprr.money) AS money, + (SELECT SUM(money) FROM logpm_aftersales_processing_results WHERE is_deleted = 0 AND work_order_id = lawo.id) AS money, lawo.warehouse_service_name AS warehouseServiceName, lawo.headquarters_name AS headquartersName, GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName, @@ -3948,7 +3948,7 @@ lawo.commit_time AS commitTime, lawo.over_time AS overTime, GROUP_CONCAT( laprr.result_type ) AS resultType, - SUM(laprr.money) AS money, + (SELECT SUM(money) FROM logpm_aftersales_processing_results WHERE is_deleted = 0 AND work_order_id = lawo.id) AS money, lawo.warehouse_service_name AS warehouseServiceName, lawo.headquarters_name AS headquartersName, GROUP_CONCAT(DISTINCT lapr.business_name) AS businessName, diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml index e760a4fe3..e9d6ae6cc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml @@ -1581,6 +1581,7 @@ logpm_distribution_stock AS ldss WHERE ldss.is_deleted = 0 + AND ldss.cancel_status != 1 AND ldss.reservation_id = ldr.id ) AS scanNum, IFNULL( SUM( ldr.reservation_stock_list_num ), 0 ) AS inventoryNum @@ -1655,7 +1656,7 @@ logpm_distribution_stock AS ldss WHERE ldss.is_deleted = 0 - and ldss.cancel_status != 1 + AND ldss.cancel_status != 1 AND ldss.reservation_id = ldbl.id ) AS scanNum, ( @@ -2162,7 +2163,7 @@ GROUP BY ldsi.stockup_id,ldr.id,ldpl.id HAVING - count( ldr.id )>0 + count( ldpl.id ) > 0