|
|
@ -455,9 +455,6 @@ |
|
|
|
(select GROUP_CONCAT(DISTINCT ldpl.material_name ) |
|
|
|
(select GROUP_CONCAT(DISTINCT ldpl.material_name ) |
|
|
|
from logpm_distribution_parcel_list ldpl |
|
|
|
from logpm_distribution_parcel_list ldpl |
|
|
|
where ldpl.material_name is not null and ldpl.stock_article_id = ldbs.stock_article_id) materialName, |
|
|
|
where ldpl.material_name is not null and ldpl.stock_article_id = ldbs.stock_article_id) materialName, |
|
|
|
(select IFNULL(sum(lds.stock_quantity),0) |
|
|
|
|
|
|
|
from logpm_distribution_stock lds |
|
|
|
|
|
|
|
where lds.stock_article = ldbs.stock_article_id ) preparedQuantity , |
|
|
|
|
|
|
|
(select COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') |
|
|
|
(select COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') |
|
|
|
from logpm_distribution_parcel_list ldpl |
|
|
|
from logpm_distribution_parcel_list ldpl |
|
|
|
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id and lwtg.association_type = '3' |
|
|
|
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id and lwtg.association_type = '3' |
|
|
@ -466,12 +463,13 @@ |
|
|
|
from logpm_distribution_parcel_list ldpl |
|
|
|
from logpm_distribution_parcel_list ldpl |
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id and lwug.association_type = '3' |
|
|
|
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id and lwug.association_type = '3' |
|
|
|
where ldpl.stock_article_id = ldbs.stock_article_id) goodsAllocation, |
|
|
|
where ldpl.stock_article_id = ldbs.stock_article_id) goodsAllocation, |
|
|
|
ldsa.service_number serviceNumber,ldsa.waybill_number waybillNumber,ldsa.train_number trainNumber,ldsa.send_warehouse_name sendWarehouseName |
|
|
|
ldsa.service_number serviceNumber,ldsa.waybill_number waybillNumber,ldsa.train_number trainNumber,ldsa.send_warehouse_name sendWarehouseName, |
|
|
|
|
|
|
|
IFNULL(SUM(lds.stock_quantity),0) AS preparedQuantity |
|
|
|
from |
|
|
|
from |
|
|
|
logpm_distrilbution_bill_lading AS ldbl |
|
|
|
logpm_distrilbution_bill_lading AS ldbl |
|
|
|
LEFT JOIN logpm_distrilbution_bill_stock ldbs ON ldbs.bill_lading_id = ldbl.id |
|
|
|
LEFT JOIN logpm_distrilbution_bill_stock ldbs ON ldbs.bill_lading_id = ldbl.id |
|
|
|
LEFT JOIN logpm_distribution_stock_article ldsa on ldbs.stock_article_id = ldsa.id |
|
|
|
LEFT JOIN logpm_distribution_stock_article ldsa on ldbs.stock_article_id = ldsa.id |
|
|
|
LEFT JOIN logpm_distribution_stock lds on lds.stock_article = ldbs.stock_article_id |
|
|
|
LEFT JOIN logpm_distribution_stock lds on lds.stock_article = ldbs.stock_article_id AND ldbl.id = lds.bill_lading_id |
|
|
|
WHERE |
|
|
|
WHERE |
|
|
|
ldbs.is_deleted = 0 and ldbs.bill_lading_id = #{id} and ldbs.order_status in (1,3) |
|
|
|
ldbs.is_deleted = 0 and ldbs.bill_lading_id = #{id} and ldbs.order_status in (1,3) |
|
|
|
</select> |
|
|
|
</select> |
|
|
|