LEFT JOIN logpm_warehouse_updown_goods_log lwugl on lds.parcel_list_id = lwugl.association_id and lwugl.binding_type = 2 and lwugl.create_time >= DATE_SUB(NOW(), INTERVAL 10 MINUTE)
where lds.reservation_id = #{reservationId} and lds.stockup_id = #{stockupId} and lds.parcel_list_id = #{parcelListId}
GROUP BY lwugl.create_time ,lwugl.position_code,lwugl.allocation_id
LEFT JOIN logpm_warehouse_updown_goods_log lwugl on lds.parcel_list_id = lwugl.association_id and lwugl.binding_type = 2 and lwugl.create_time >= DATE_SUB(NOW(), INTERVAL 10 MINUTE)
where lds.bill_lading_id = #{reservationId} and lds.stockup_id = #{stockupId} and lds.parcel_list_id = #{parcelListId}
GROUP BY lwugl.create_time ,lwugl.position_code,lwugl.allocation_id
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldsl.material_id and lwug.association_type = '4' and ldsl.market_id = lwug.market_id
and ldsl.incoming_batch = lwug.incoming_batch
where lddd.id = '1704701570896048130'
GROUP BY lwug.position_code ,lwug.allocation_id,lwug.allocation_title,lwug.num
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldsl.material_id and lwug.association_type = '4' and ldsl.market_id = lwug.market_id and ldsl.incoming_batch = lwug.incoming_batch
where lddd.bill_lading_id = #{reservationId}
GROUP BY lddd.stock_list_id,ldsl.description_goods,ldsl.sku,ldsl.cargo_norms,lddd.quantity,ldsl.cargo_unit,ldsl.tray_name,ldsl.unpack,lddd.id