Commit 811de315 authored by zhengyi's avatar zhengyi

订单统计sql修正

parent 63e5f9e1
......@@ -6861,7 +6861,7 @@
op.`create_time` between #{query.beginPickUpTime} and #{query.endPickUpTime})
</if>
<if test="query.beginWarehouseInTime != null and query.endWarehouseInTime != null ">
AND o.order_id in(select distinct wi.order_id from ecw_order_warehouse_in wi where wi.deleted = 0 and
AND o.order_id in (select distinct wi.order_id from ecw_order_warehouse_in wi where wi.deleted = 0 and
wi.`update_time` between #{query.beginWarehouseInTime} and #{query.endWarehouseInTime})
</if>
<if test="query.salesmanId != null ">
......@@ -7405,10 +7405,10 @@
left join ecw_order_consignee nee on nee.order_id = o.order_id and nee.deleted = 0
left join ecw_channel channel on channel.channel_id = o.channel_id
<if test="query.beginWarehouseInTime != null and query.endWarehouseInTime != null ">
left join ecw_order_warehouse_in wi ON wi.order_id = o.order_id and wi.deleted = 0
left join ecw_order_warehouse_in wi ON wi.order_item_id = it.order_item_id and wi.deleted = 0
</if>
<if test="query.beginRucangTime != null and query.endRucangTime != null ">
left join ecw_order_warehouse_in wi ON wi.order_id = o.order_id and wi.deleted = 0
left join ecw_order_warehouse_in wi ON wi.order_item_id = it.order_item_id and wi.deleted = 0
</if>
where o.deleted = 0 and o.in_warehouse_state != 211 and o.in_warehouse_state != 208 and o.status != 10
<if test = "query.deptId != null ">
......@@ -7466,10 +7466,10 @@
left join ecw_order_consignee nee on nee.order_id = o.order_id
left join ecw_channel channel on channel.channel_id = o.channel_id
<if test="query.beginWarehouseInTime != null and query.endWarehouseInTime != null ">
left join ecw_order_warehouse_in wi ON wi.order_id = o.order_id and wi.deleted = 0
left join ecw_order_warehouse_in wi ON wi.order_item_id = it.order_item_id and wi.deleted = 0
</if>
<if test="query.beginRucangTime != null and query.endRucangTime != null ">
left join ecw_order_warehouse_in wi ON wi.order_id = o.order_id and wi.deleted = 0
left join ecw_order_warehouse_in wi ON wi.order_item_id = it.order_item_id and wi.deleted = 0
</if>
where o.deleted = 0 and o.in_warehouse_state != 211 and o.in_warehouse_state != 208 and o.status != 10
<if test = "query.deptId != null ">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment