|
|
|
@ -743,8 +743,6 @@
|
|
|
|
|
DISTINCT lddl.id id, |
|
|
|
|
lddl.train_number trainNumber, |
|
|
|
|
lddl.note_number noteNumber, |
|
|
|
|
<!-- lddl.warehouse_name warehouseName, |
|
|
|
|
lddl.warehouse_id warehouseId,--> |
|
|
|
|
lddl.type type, |
|
|
|
|
lddl.kind kind, |
|
|
|
|
lddl.vehicle_name vehicleName, |
|
|
|
@ -755,19 +753,8 @@
|
|
|
|
|
join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id |
|
|
|
|
WHERE lds.delivery_id = lddl.id |
|
|
|
|
) deliveryNumber, |
|
|
|
|
<!-- lddl.vehicle_id vehicleId, |
|
|
|
|
lddl.driver_id driverId, --> |
|
|
|
|
lddl.delivery_status deliveryStatus, |
|
|
|
|
lddl.preparation_time preparationTime, |
|
|
|
|
<!-- lddl.distribution_company distributionCompany, |
|
|
|
|
lddl.state state, |
|
|
|
|
(SELECT GROUP_CONCAT(DISTINCT ldsu.forklift_name SEPARATOR ',') FROM |
|
|
|
|
logpm_distribution_signfor lds |
|
|
|
|
join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id |
|
|
|
|
join logpm_distribution_stockup_info ldsi on ldr.id = ldsi.reservation_id |
|
|
|
|
join logpm_distribution_stockup ldsu on ldsu.id = ldsi.stockup_id |
|
|
|
|
WHERE lds.delivery_id = lddl.id |
|
|
|
|
) forkliftName, --> |
|
|
|
|
lddl.create_time createTime, |
|
|
|
|
(SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_signfor lds WHERE lds.delivery_id =lddl.id) customersNumber, |
|
|
|
|
lddl.price price, |
|
|
|
@ -783,19 +770,9 @@
|
|
|
|
|
lddl.id = lds.delivery_id) scannedNumber, |
|
|
|
|
(SELECT GROUP_CONCAT(DISTINCT ldsu.loader_name SEPARATOR ',') from logpm_distribution_signfor lds INNER JOIN logpm_distribution_stockup_info AS ldsi ON lds.reservation_id = ldsi.reservation_id |
|
|
|
|
INNER JOIN logpm_distribution_stockup AS ldsu ON ldsu.id = ldsi.stockup_id WHERE lds.delivery_id = lddl.id) loadingTeamName, |
|
|
|
|
<!-- (SELECT GROUP_CONCAT( lds.reservation_id SEPARATOR ',') from logpm_distribution_signfor lds WHERE lds.delivery_id = lddl.id) reservationId, --> |
|
|
|
|
lddl.lead_time leadTime, |
|
|
|
|
<!-- lddl.order_id orderId, |
|
|
|
|
lddl.fee fee,--> |
|
|
|
|
lddl.loading_time loadingTime, |
|
|
|
|
<!-- lddl.note_number noteNumber, |
|
|
|
|
lddl.source source, --> |
|
|
|
|
lddl.task_time taskTime, |
|
|
|
|
<!-- (SELECT COALESCE (sum(ldr.reservation_stock_list_num) ,0) |
|
|
|
|
FROM |
|
|
|
|
logpm_distribution_signfor lds |
|
|
|
|
join logpm_distribution_reservation ldr on lds.reservation_id =ldr.id |
|
|
|
|
WHERE lds.delivery_id = lddl.id) inventoryNub, --> |
|
|
|
|
(SELECT COALESCE(sum(lds.receivedin_quantity+lds.received_quantity), 0) FROM logpm_distribution_signfor lds WHERE |
|
|
|
|
lddl.id = lds.delivery_id) signNub, |
|
|
|
|
( (SELECT COALESCE(count(*), 0) FROM logpm_distribution_loadscan ldl WHERE |
|
|
|
@ -805,18 +782,10 @@
|
|
|
|
|
( select GROUP_CONCAT(ldr.consignee) from logpm_distribution_reservation ldr |
|
|
|
|
where ldr.id in (select lds.reservation_id from logpm_distribution_signfor lds where lds.delivery_id = lddl.id ) |
|
|
|
|
) consignee |
|
|
|
|
|
|
|
|
|
-- , |
|
|
|
|
-- ( |
|
|
|
|
-- select sum(reservation_num) |
|
|
|
|
-- from logpm_distribution_reservation_stocklist |
|
|
|
|
-- where reservation_id = ldsf.reservation_id |
|
|
|
|
-- ) inventoryNub |
|
|
|
|
FROM |
|
|
|
|
logpm_distribution_delivery_list lddl |
|
|
|
|
left join logpm_distribution_delivery_self ldds on lddl.id =ldds.delivery_id |
|
|
|
|
left join logpm_distribution_signfor ldsf on ldsf.delivery_id = lddl.id |
|
|
|
|
<!--left join logpm_distribution_reservation ldr on ldr.id = lddl.reservation_id--> |
|
|
|
|
<where> |
|
|
|
|
lddl.is_deleted =0 |
|
|
|
|
<if test="array != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(array)"> |
|
|
|
|