From b91643134013ce5d4a2ecae54429ea47cbe820ba Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Thu, 28 Dec 2023 09:30:35 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E9=A2=84=E7=BA=A6=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E6=9F=A5=E8=AF=A2=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/DistributionStockArticleMapper.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 7c4deac6a..c9c49a1fc 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 @@ -572,7 +572,8 @@ ldsa.create_time, ldsa.update_user, ldsa.update_time, - (ldsa.incoming_num - oun.num) AS handQuantity, + (ldsa.incoming_num - if((select num from order_use_num where stock_article_id=ldsa.id) is null,0,(select num from order_use_num where stock_article_id=ldsa.id)))AS handQuantity, + ldsa.status, ldsa.is_deleted, ldsa.create_dept, ldsa.reserve1, ldsa.reserve2, ldsa.reserve3, ldsa.reserve4, ldsa.reserve5, ldsa.service_number, ldsa.order_code, @@ -612,7 +613,10 @@ LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id LEFT JOIN order_use_num AS oun ON ldsa.id = oun.stock_article_id - ldsa.order_status in ('10','20','30','70') and ldsa.reservation_status in ('10','20') AND (ldsa.incoming_num - oun.num) > 0 + ldsa.order_status in ('10','20','30','70') AND + + (ldsa.incoming_num - if((select num from order_use_num where stock_article_id=ldsa.id) is null,0,(select num from order_use_num where stock_article_id=ldsa.id)))>0 + and ldsa.warehouse_id = #{par.warehouseId}