From 012cbdb1e6008fc7b836294ea5d38963164ff50f Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Wed, 3 Apr 2024 23:43:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=8F=90=E9=A1=B5=E9=9D=A2=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/DistrilbutionBillLadingMapper.xml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml index 13f078554..3bd62a9b2 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml @@ -41,24 +41,13 @@ GROUP_CONCAT(DISTINCT dsa.customer_telephone) customerTelephone,dsa.warehouse,dsa.warehouse_entry_time warehouseEntryTime,dsa.storage_fee storageFee, - count( dbp.packet_number )+IFNULL((SELECT SUM(quantity) FROM logpm_distribution_reservation_zero_package WHERE reservation_id = dbl.id AND zero_package_status !=2),0) + IFNULL((SELECT SUM(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = dbl.id AND inventory_status != 2),0)AS totalNumber, + IFNULL((SELECT SUM(packet_number) FROM logpm_distrilbution_bill_package WHERE bill_lading_id = dbl.id AND packet_bar_status != 2),0)+IFNULL((SELECT SUM(quantity) FROM logpm_distribution_reservation_zero_package WHERE reservation_id = dbl.id AND zero_package_status !=2),0) + IFNULL((SELECT SUM(quantity) FROM logpm_distribution_delivery_details WHERE bill_lading_id = dbl.id AND inventory_status != 2),0)AS totalNumber, dbl.certificate_type certificateType, GROUP_CONCAT(DISTINCT dsa.brand) brand,dsa.type_service typeService, dbl.pick_up_time pickUpTime,dbl.consignee,dbl.delivery_document deliveryDocument,dbl.conditions, dbl.total_cost totalCost, dbl.pick_up_plate pickUpPlate,dbl.pickup_batch pickupBatch, - ( select COUNT(id) from logpm_distribution_bill_lading_scan @@ -81,9 +70,8 @@ GROUP BY id ) AS productInformation from logpm_distrilbution_bill_lading dbl - LEFT JOIN logpm_distrilbution_bill_package dbp on dbp.bill_lading_id = dbl.id and dbp.packet_bar_status in (1,3) - LEFT JOIN logpm_distribution_reservation_zero_package ldrzp on ldrzp.reservation_id = dbl.id and ldrzp.stock_status in (1,3) - LEFT JOIN logpm_distribution_stock_article dsa on dbp.stock_article_id = dsa.id OR ldrzp.stock_article_id = dsa.id + LEFT JOIN logpm_distrilbution_bill_stock AS lds on lds.bill_lading_id = dbl.id + LEFT JOIN logpm_distribution_stock_article dsa on lds.stock_article_id = dsa.id dbl.is_deleted = 0 and dsa.service_number like