Browse Source

修改自提列表查询数量

training
caoyizhong 1 year ago
parent
commit
ac027c15ef
  1. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -30,7 +30,18 @@
select dbl.id,dsa.service_number serviceNumber,dsa.waybill_number waybillNumber,dsa.consignee_unit consigneeUnit,dsa.customer_name customerName,dsa.customer_telephone select dbl.id,dsa.service_number serviceNumber,dsa.waybill_number waybillNumber,dsa.consignee_unit consigneeUnit,dsa.customer_name customerName,dsa.customer_telephone
customerTelephone,dsa.warehouse,dsa.warehouse_entry_time warehouseEntryTime,dsa.storage_fee storageFee,dsa.total_number totalNumber,dbl.certificate_type certificateType, customerTelephone,dsa.warehouse,dsa.warehouse_entry_time warehouseEntryTime,dsa.storage_fee storageFee,dsa.total_number totalNumber,dbl.certificate_type certificateType,
dsa.brand,dsa.type_service typeService,dbl.pick_up_time pickUpTime,dbl.consignee,dbl.delivery_document deliveryDocument,dbl.conditions,dbl.total_cost totalCost, dsa.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.pick_up_plate pickUpPlate,dbl.pickup_batch pickupBatch,
(
select COUNT(lds.id)
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock lds on lds.stock_list_id = lddd.stock_list_id
where lddd.bill_lading_id = dbl.id
) + (
select COUNT(lds.id)
from logpm_distrilbution_bill_stock ldbs
LEFT JOIN logpm_distribution_stock lds on lds.stock_article = ldbs.stock_article_id
where ldbs.bill_lading_id = dbl.id
) stopNum
from logpm_distrilbution_bill_lading dbl from logpm_distrilbution_bill_lading dbl
LEFT JOIN logpm_distribution_stock_article dsa on dbl.stock_article_id = dsa.id LEFT JOIN logpm_distribution_stock_article dsa on dbl.stock_article_id = dsa.id
<where> <where>

Loading…
Cancel
Save