|
|
@ -93,14 +93,6 @@ |
|
|
|
lds.received_quantity receivedQuantity, |
|
|
|
lds.received_quantity receivedQuantity, |
|
|
|
lds.is_have_abnormal_package isHaveAbnormalPackage, |
|
|
|
lds.is_have_abnormal_package isHaveAbnormalPackage, |
|
|
|
lds.signee_name signeeName, |
|
|
|
lds.signee_name signeeName, |
|
|
|
(SELECT |
|
|
|
|
|
|
|
ldss.forklift_name |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
logpm_distribution_stockup_info AS ldsi |
|
|
|
|
|
|
|
LEFT JOIN logpm_distribution_stockup AS ldss ON ldsi.stockup_id = ldss.id |
|
|
|
|
|
|
|
WHERE |
|
|
|
|
|
|
|
ldsi.reservation_id = lds.reservation_id |
|
|
|
|
|
|
|
) AS forkliftName, |
|
|
|
|
|
|
|
CASE |
|
|
|
CASE |
|
|
|
WHEN ldr.stockup_status ='10' THEN '待指派' |
|
|
|
WHEN ldr.stockup_status ='10' THEN '待指派' |
|
|
|
WHEN ldr.stockup_status ='20' THEN '待备货' |
|
|
|
WHEN ldr.stockup_status ='20' THEN '待备货' |
|
|
@ -118,10 +110,20 @@ |
|
|
|
CASE |
|
|
|
CASE |
|
|
|
WHEN lds.driver_signing ='1' THEN '未完成' |
|
|
|
WHEN lds.driver_signing ='1' THEN '未完成' |
|
|
|
else '已完成' |
|
|
|
else '已完成' |
|
|
|
END driverSigning |
|
|
|
END driverSigning, |
|
|
|
|
|
|
|
t.forklift_name AS forkliftName |
|
|
|
FROM |
|
|
|
FROM |
|
|
|
logpm_distribution_signfor lds |
|
|
|
logpm_distribution_signfor lds |
|
|
|
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id |
|
|
|
LEFT JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id |
|
|
|
|
|
|
|
LEFT JOIN (SELECT |
|
|
|
|
|
|
|
ldss.forklift_name, |
|
|
|
|
|
|
|
ldsi.reservation_id |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
logpm_distribution_stockup_info AS ldsi |
|
|
|
|
|
|
|
LEFT JOIN logpm_distribution_stockup AS ldss ON ldsi.stockup_id = ldss.id |
|
|
|
|
|
|
|
WHERE |
|
|
|
|
|
|
|
ldsi.reservation_id = lds.reservation_id |
|
|
|
|
|
|
|
) AS t ON t.reservation_id = ldsi.reservation_id |
|
|
|
<where> |
|
|
|
<where> |
|
|
|
lds.is_deleted = 0 and lds.delivery_id = #{id} and ldr.reservation_status != 40 AND (ldr.reservation_num + ldr.reservation_stock_list_num) > 0 |
|
|
|
lds.is_deleted = 0 and lds.delivery_id = #{id} and ldr.reservation_status != 40 AND (ldr.reservation_num + ldr.reservation_stock_list_num) > 0 |
|
|
|
</where> |
|
|
|
</where> |
|
|
|