SELECT
a.id,
a.create_by,
a.create_by_name,
a.create_time,
a.update_by,
a.update_by_name,
a.update_time,
a.top_organization_id,
a.organization_id,
a.organization_name,
a.del_flag,
a.order_id,
a.intercept_state,
a.intercept_by,
a.intercept_by_name,
a.intercept_time,
a.fail_cause,
a.task_nos,
b.customer_orders,
b.order_type,
b.job_task_type,
b.delivery_system
FROM
oms_intercept_order a
left join oms_purchase_order b on a.order_id = b.id
where a.del_flag = 1
and a.top_organization_id = #{topOrganizationId}
and a.organization_id = #{organizationId}
and a.organization_name like concat('%', #{organizationName}, '%')
and a.order_id = #{orderId}
and a.intercept_state = #{interceptState}
and a.intercept_by = #{interceptBy}
and a.intercept_by_name like concat('%', #{interceptByName}, '%')
and a.intercept_time = #{interceptTime}
and a.fail_cause = #{failCause}
and a.task_nos = #{taskNos}