(SELECT count(*) FROM logpm_distribution_stock AS lds WHERE lds.stock_list_id =#{reservationId} AND lds.is_deleted = 0) AS realNum,
t.reservationNum as planNum,
(SELECT SUM(aldrs.reality_num) FROM logpm_distribution_reservation_stocklist AS aldrs WHERE aldrs.reservation_id = #{reservationId} AND aldrs.stocklist_id in (t.aaa)) AS realNum,
(SELECT SUM(newldrs.reservation_num) FROM logpm_distribution_reservation_stocklist AS newldrs WHERE newldrs.reservation_id = #{reservationId} AND newldrs.stocklist_id in (t.aaa)) AS planNum,
(
select GROUP_CONCAT( DISTINCT (allocation_id)) from logpm_warehouse_updown_goods where association_value =ldslNew.cargo_number or association_value in (
SELECT order_package_code from logpm_distribution_parcel_list where conditions=2 and material_code=ldslNew.cargo_number)
@ -320,7 +320,8 @@
ldsl.id,
ldrs.id as deliveryDetailsId,
ldsl.cargo_unit as cargoUnit,
ldrs.reservation_num AS reservationNum
ldrs.reservation_num AS reservationNum,
GROUP_CONCAT(ldsl.id) AS aaa
FROM
logpm_distribution_reservation_stocklist ldrs
LEFT JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id