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 5cec0e930..8ecee4715 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 @@ -427,11 +427,9 @@ from logpm_distribution_parcel_list ldp where ldp.stock_article_id = ldsa.id and ldp.order_package_status = 70 ) signinQuantity, - sum(( - select COUNT(ldl.id) - from logpm_distribution_loadscan ldl - where ldl.package_id = ldpl.id and ldl.signfor_state = 1 - )) deliveryQuantity + ( + SELECT COUNT( ldrp.id ) FROM logpm_distribution_reservation_package ldrp WHERE ldrp.stock_article_id = ldsa.id AND ldrp.packet_bar_status = 1 + ) deliveryQuantity 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