GROUP_CONCAT(DISTINCT IFNULL( m.driverName,'')) AS driverName,
GROUP_CONCAT(DISTINCT IFNULL( m.vehicleName,'')) AS vehicleName,
GROUP_CONCAT(DISTINCT IFNULL( m.examine_user_name,'')) AS examineUserNames,
k.earliestWarehouseEntryTime AS earliestWarehouseEntryTime
k.earliestWarehouseEntryTime AS earliestWarehouseEntryTime,
j.scanSigningTime AS scanSigningTime
FROM
logpm_distribution_stock_article AS ldsa
LEFT JOIN (
@ -1191,7 +1192,7 @@
CONCAT( lds.examine_user_name ) AS examine_user_name,
CONCAT( lddl.driver_name ) AS driverName,
CONCAT( lddl.vehicle_name ) AS vehicleName,
lds.signing_time
MAX(lds.signing_time) AS signing_time
FROM
logpm_distribution_reservation_stockarticle AS ldrs
LEFT JOIN logpm_distribution_reservation ldr ON ldrs.reservation_id = ldr.id
@ -1200,8 +1201,10 @@
LEFT JOIN
logpm_distribution_signfor As lds ON lds.reservation_id = ldr.id
LEFT JOIN logpm_distribution_delivery_list AS lddl ON lds.delivery_id = lddl.id
GROUP BY ldr.id
) AS m ON ldsa.id = m.stock_article_id AND t.reservation_id = m.reservation_id
LEFT JOIN ( SELECT stock_article_id, min( create_time ) AS earliestWarehouseEntryTime FROM logpm_distribution_parcel_list) AS k ON k.stock_article_id = ldsa.id
LEFT JOIN ( SELECT stock_article_id, min( create_time ) AS earliestWarehouseEntryTime FROM logpm_distribution_parcel_list GROUP BY stock_article_id) AS k ON k.stock_article_id = ldsa.id
LEFT JOIN ( SELECT order_id, max( signing_time ) AS scanSigningTime FROM logpm_distribution_loadscan WHERE scan_status != 1 AND signfor_state = 2 GROUP BY order_id ) AS j ON j.order_id = ldsa.id
<where>
ldsa.order_status in ('70','80')
<iftest="param.waybillNumber != null and param.waybillNumber != ''">
@ -1246,19 +1249,19 @@
</if>
<iftest="param.warehouseIdList != null and param.warehouseId != ''">
AND ldsa.warehouse_id IN
<foreachcollection="param.warehouseIdList"item="item"index="index"open="AND ldsa.warehouse_id in ("close=")"separator=",">