|
|
@ -1089,10 +1089,10 @@ |
|
|
|
SELECT COUNT(*) |
|
|
|
SELECT COUNT(*) |
|
|
|
FROM logpm_distrilbution_bill_package dp |
|
|
|
FROM logpm_distrilbution_bill_package dp |
|
|
|
WHERE dp.stock_article_id = ldbs.stock_article_id and dp.packet_bar_status in (1,3) and dp.packet_bar_code is |
|
|
|
WHERE dp.stock_article_id = ldbs.stock_article_id and dp.packet_bar_status in (1,3) and dp.packet_bar_code is |
|
|
|
not null |
|
|
|
not null AND dp.bill_lading_id = ldsi.reservation_id |
|
|
|
) AS reservationNum |
|
|
|
) AS reservationNum |
|
|
|
from logpm_distribution_stockup_info ldsi |
|
|
|
from logpm_distribution_stockup_info ldsi |
|
|
|
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldsi.reservation_id = ldbs.bill_lading_id and ldbs.order_status in (1,2) |
|
|
|
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldsi.reservation_id = ldbs.bill_lading_id and ldbs.order_status in (1,3) |
|
|
|
LEFT JOIN logpm_distribution_stock_article ldsa ON ldsa.id = ldbs.stock_article_id |
|
|
|
LEFT JOIN logpm_distribution_stock_article ldsa ON ldsa.id = ldbs.stock_article_id |
|
|
|
INNER JOIN logpm_distribution_stockup lds ON lds.id = ldsi.stockup_id |
|
|
|
INNER JOIN logpm_distribution_stockup lds ON lds.id = ldsi.stockup_id |
|
|
|
<where> |
|
|
|
<where> |
|
|
|