|
|
|
@ -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 |
|
|
|
|
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, |
|
|
|
|
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 |
|
|
|
|
LEFT JOIN logpm_distribution_stock_article dsa on dbl.stock_article_id = dsa.id |
|
|
|
|
<where> |
|
|
|
|