AND (o.`salesman_id` = #{query.salesmanId} or o.`customer_id` in(select cus.id from ecw_customer cus where cus.is_customer_service_confirmed = 1 and cus.customer_service = #{query.salesmanId} ))
AND (o.`salesman_id` = #{query.salesmanId} or
o.`customer_id` in(
select cus.id from ecw_customer cus
where cus.is_customer_service_confirmed =
1 and cus.customer_service = #{query.salesmanId} ))
</if>
...
...
@@ -1623,7 +1627,8 @@
wi.`update_time` between #{query.beginWarehouseInTime} and #{query.endWarehouseInTime})
</if>
<iftest="query.creator != null and query.creator != '' ">
AND o.`creator` = #{query.creator} and (o.user_id is null or o.user_id = 0)
<!--2024-06-28 我的订单,客户要去除创建人是本人,业绩归属是当前用户的订单-->
AND (o.`creator` = #{query.creator} or o.salesman_id=#{query.creator}) and (o.user_id is null or o.user_id = 0)
</if>
<iftest ='query.cargoControlStatus != null and query.cargoControlStatus != 3'>
AND o.`cargo_control_status` = #{query.cargoControlStatus}