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..ecaf411e3 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