from logpm_trunkline_advance_detail ltad FORCE INDEX (idx_createtime_count_1)
left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id
left join logpm_warehouse_warehouse waw on waw.id = lww.destination_warehouse_id
left join logpm_distribution_parcel_list ldpls on ldpls.warehouse_id = lww.departure_warehouse_id and ldpls.order_package_code = ltad.order_package_code
@ -1366,7 +1370,7 @@
left join logpm_distribution_parcel_list ldplm on ldplm.warehouse_id = lww.destination_warehouse_id and ldplm.order_package_code = ltad.order_package_code
left join logpm_trunkline_cars_load_scan ltclsm on ltclsm.scan_code = ldplm.order_package_code and ltclsm.unload_node_id = ldplm.warehouse_id
left join logpm_trunkline_cars_load_line ltcllm on ltcllm.load_id = ltclsm.load_id and ltcllm.node_id = ltclsm.unload_node_id
left join logpm_quality_deliver lqd on lqd.order_package_code = ltad.order_package_code and lqd.retention_time is null
left join logpm_quality_deliver lqd on lqd.order_package_code = ltad.order_package_code and lqd.biz_status <= 100
left join logpm_reportconfig_order_all oat on oat.departure_warehouse_id = lww.departure_warehouse_id and oat.destination_warehouse_id = lww.destination_warehouse_id and oat.is_deleted = 0
where ltad.waybill_id is not null
and ltad.create_time > '2024-10-22 00:00:00'
@ -1435,7 +1439,6 @@
lww.consignee,
lww.departure_warehouse_name,
lww.destination_warehouse_name,
lqd.delivery_type,lww.service_type,
oat.day_time
<trimprefix="HAVING"prefixOverrides="AND">
<iftest="param.trainNumber != null and param.trainNumber !='' ">
from logpm_trunkline_advance_detail ltad FORCE INDEX (idx_createtime_count_1)
left join logpm_warehouse_waybill lww on lww.id = ltad.waybill_id
left join logpm_warehouse_warehouse waw on waw.id = lww.destination_warehouse_id
left join logpm_distribution_parcel_list ldpls on ldpls.warehouse_id = lww.departure_warehouse_id and ldpls.order_package_code = ltad.order_package_code
@ -1497,7 +1500,7 @@
left join logpm_distribution_parcel_list ldplm on ldplm.warehouse_id = lww.destination_warehouse_id and ldplm.order_package_code = ltad.order_package_code
left join logpm_trunkline_cars_load_scan ltclsm on ltclsm.scan_code = ldplm.order_package_code and ltclsm.unload_node_id = ldplm.warehouse_id
left join logpm_trunkline_cars_load_line ltcllm on ltcllm.load_id = ltclsm.load_id and ltcllm.node_id = ltclsm.unload_node_id
left join logpm_quality_deliver lqd on lqd.order_package_code = ltad.order_package_code and lqd.retention_time is null
left join logpm_quality_deliver lqd on lqd.order_package_code = ltad.order_package_code and lqd.biz_status <= 100
left join logpm_reportconfig_order_all oat on oat.departure_warehouse_id = lww.departure_warehouse_id and oat.destination_warehouse_id = lww.destination_warehouse_id and oat.is_deleted = 0
where ltad.waybill_id is not null
and ltad.create_time > '2024-10-22 00:00:00'
@ -1566,7 +1569,6 @@
lww.consignee,
lww.departure_warehouse_name,
lww.destination_warehouse_name,
lqd.delivery_type,lww.service_type,
oat.day_time
<trimprefix="HAVING"prefixOverrides="AND">
<iftest="param.trainNumber != null and param.trainNumber !='' ">