Commit ae7935bc authored by liuzeheng's avatar liuzeheng

OrderQueryDTO 入参

parent 7f74b932
......@@ -324,7 +324,7 @@
LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id
WHERE
e.order_exception_status !=2 and o.deleted=0
<include refid="myOrderQuerySql">
<include refid="myOrderQuery">
</include>
</select>
......@@ -752,6 +752,53 @@
or pb.`title_zh` = #{query.notEqProdKey} or pb.`title_en` = #{query.notEqProdKey})
))
</if>
<if test="query.objectiveId != null and query.objectiveId.size() != 0">
AND ob.`objective_id` in
<foreach item='orderId' index='index' collection='query.objectiveId' open='(' separator=',' close=')'>
#{orderId}
</foreach>
</if>
<if test="query.destCountryId != null ">
AND ob.`objective_country_id` in
<foreach item='destCountryId' index='index' collection='query.destCountryId' open='(' separator=',' close=')'>
#{destCountryId}
</foreach>
</if>
<if test = "query.startWarehouseId != null and query.destWarehouseId != null ">
and (o.line_id in(
select whl.id
from ecw_warehouse_line whl
where whl.start_warehouse_id in
<foreach item='startWarehouseId' index='index' collection='query.startWarehouseId' open='(' separator=',' close=')'>
#{startWarehouseId}
</foreach>
and whl.dest_warehouse_id in
<foreach item='destWarehouseId' index='index' collection='query.destWarehouseId' open='(' separator=',' close=')'>
#{destWarehouseId}
</foreach>
))
</if>
<if test = "query.startWarehouseId != null and query.destWarehouseId == null ">
and (o.line_id in(
select whl.id
from ecw_warehouse_line whl
where whl.start_warehouse_id in
<foreach item='startWarehouseId' index='index' collection='query.startWarehouseId' open='(' separator=',' close=')'>
#{startWarehouseId}
</foreach>
))
</if>
<if test = "query.startWarehouseId == null and query.destWarehouseId != null ">
and (o.line_id in(
select whl.id
from ecw_warehouse_line whl
where whl.dest_warehouse_id in
<foreach item='destWarehouseId' index='index' collection='query.destWarehouseId' open='(' separator=',' close=')'>
#{destWarehouseId}
</foreach>
))
</if>
<if test="query.isNeat == false ">
AND o.sum_num <![CDATA[ < ]]> o.cost->>'$.totalNum'
</if>
......@@ -776,7 +823,7 @@
LEFT JOIN ecw_order_consignee c ON o.order_id = c.order_id
LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id
where o.order_type = 2 and o.deleted = 0 and eoi.warehouse_in_info is not null
<include refid="myOrderQuerySql">
<include refid="myOrderQuery">
</include>
</select>
......@@ -797,7 +844,7 @@
LEFT JOIN ecw_order_consignee c ON o.order_id = c.order_id
LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id
where eowa.type = 3 and eowa.`status` = 2 and o.deleted = 0 and (eoi.volume is not null and eoi.volume != 0.00)
<include refid="myOrderQuerySql">
<include refid="myOrderQuery">
</include>
</select>
......@@ -818,7 +865,7 @@
LEFT JOIN ecw_order_consignee c ON o.order_id = c.order_id
LEFT JOIN ecw_order_consignor r ON o.order_id = r.order_id
where ecc.status = 3 and o.deleted = 0
<include refid="myOrderQuerySql">
<include refid="myOrderQuery">
</include>
</select>
......@@ -833,7 +880,7 @@
ecw_order o
LEFT JOIN ecw_order_item eoi on eoi.order_id = o.order_id
where o.deleted = 0 and o.shipment_state >320 and o.shipment_state !=323
<include refid="myOrderQuerySql">
<include refid="myOrderQuery">
</include>
</select>
......@@ -859,7 +906,7 @@
left join ecw_order_item eoi on o.order_id = eoi.order_id
left join ecw_order_objective ob on o.order_id = ob.order_id
where o.deleted = 0 and o.shipment_state > 314 and con.`is_default` = 1
<include refid="myOrderQuerySql">
<include refid="myOrderQuery">
</include>
</select>
......@@ -877,7 +924,7 @@
left join ecw_order o on eoi.order_id = o.order_id
left join ecw_currency ec on eoi.sea_freight_currency = ec.id
and eoi.deleted = 0 and o.deleted = 0
<include refid="myOrderQuerySql">
<include refid="myOrderQuery">
</include>
</select>
......
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