Commit 32e33865 authored by 332784038@qq.com's avatar 332784038@qq.com

订单查询备案属性与报关类型多参数并行查询业务补充完整

parent ebb459b3
......@@ -560,6 +560,8 @@ public class OrderQueryVO {
@ApiModelProperty(value = "报关类别:我司全代:1,自单代报:2,混合报关:3")
private List<Integer> customsTypes;
@ApiModelProperty(value = "产品备案属性:1有牌,2无牌,3中性,4混牌")
private List<Integer> productRecords;
@ApiModelProperty(value = "审核类型(字典 order_approval_type) 0 为正常")
private List<Integer> auditTypeList;
......
......@@ -341,6 +341,7 @@
<if test="query.productRecord != null">
AND o.`product_record` = #{query.productRecord}
</if>
<if test="query.transportId != null">
AND o.`transport_id` = #{query.transportId}
</if>
......@@ -422,6 +423,40 @@
))
</if>
<if test="query.customsTypes != null and query.customsTypes.size()>0">
<if test="query.customsTypes != null and query.customsTypes.size()==1 ">
AND o.`customs_type` =
<foreach item='customsType' index="index" collection='query.customsTypes' >
#{customsType}
</foreach>
</if>
<if test="query.customsTypes != null and query.customsTypes.size()>1 ">
AND o.`customs_type` in
<foreach item='customsType' index="index" collection='query.customsTypes' open='(' separator=',' close=')'>
#{customsType}
</foreach>
</if>
</if>
<if test="query.productRecords != null and query.productRecords.size()>0">
<if test="query.productRecords != null and query.productRecords.size()==1 ">
AND o.`product_record` =
<foreach item='productRecord' index="index" collection='query.productRecords' >
#{productRecord}
</foreach>
</if>
<if test="query.productRecords != null and query.productRecords.size()>1 ">
AND o.`product_record` in
<foreach item='productRecord' index="index" collection='query.productRecords' open='(' separator=',' close=')'>
#{productRecord}
</foreach>
</if>
</if>
<if test="query.packageType != null and query.packageType != '' ">
AND CONCAT(',',o.package_type,',') REGEXP CONCAT(',',REPLACE(#{query.packageType},',',',|,'), ',')
</if>
......@@ -608,12 +643,12 @@
<if test="query.salesmanId != null and query.creator">
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} ) or o.`creator` = #{query.creator})
</if>
<!-- <if test="query.customsType != null">-->
<!-- AND o.`customs_type` = #{query.customsType}-->
<!-- </if>-->
<!-- <if test="query.productRecord != null">-->
<!-- AND o.`product_record` = #{query.productRecord}-->
<!-- </if>-->
<if test="query.customsType != null">
AND o.`customs_type` = #{query.customsType}
</if>
<if test="query.productRecord != null">
AND o.`product_record` = #{query.productRecord}
</if>
<if test="query.customsTypes != null and query.customsTypes.size()>0">
<if test="query.customsTypes != null and query.customsTypes.size()==1 ">
......@@ -633,18 +668,18 @@
</if>
<if test="query.productRecord != null and query.productRecord.size()>0">
<if test="query.productRecords != null and query.productRecords.size()>0">
<if test="query.productRecord != null and query.productRecord != '' and query.productRecord.size()==1 ">
<if test="query.productRecords != null and query.productRecords.size()==1 ">
AND o.`product_record` =
<foreach item='productRecord' index="index" collection='query.productRecord' >
<foreach item='productRecord' index="index" collection='query.productRecords' >
#{productRecord}
</foreach>
</if>
<if test="query.productRecord != null and query.productRecord != '' and query.productRecord.size()>1 ">
<if test="query.productRecords != null and query.productRecords.size()>1 ">
AND o.`product_record` in
<foreach item='productRecord' index="index" collection='query.productRecord' open='(' separator=',' close=')'>
<foreach item='productRecord' index="index" collection='query.productRecords' open='(' separator=',' close=')'>
#{productRecord}
</foreach>
</if>
......@@ -1631,18 +1666,18 @@
</if>
<if test="query.customsType != null and query.customsType.size()>0">
<if test="query.customsTypes != null and query.customsTypes.size()>0">
<if test="query.customsType != null and query.customsType != '' and query.customsType.size()==1 ">
<if test="query.customsTypes != null and query.customsTypes.size()==1 ">
AND o.`customs_type` =
<foreach item='customsType' index="index" collection='query.customsType' >
<foreach item='customsType' index="index" collection='query.customsTypes' >
#{customsType}
</foreach>
</if>
<if test="query.customsType != null and query.customsType != '' and query.customsType.size()>1 ">
<if test="query.customsTypes != null and query.customsTypes.size()>1 ">
AND o.`customs_type` in
<foreach item='customsType' index="index" collection='query.customsType' open='(' separator=',' close=')'>
<foreach item='customsType' index="index" collection='query.customsTypes' open='(' separator=',' close=')'>
#{customsType}
</foreach>
</if>
......@@ -1650,18 +1685,18 @@
</if>
<if test="query.productRecord != null and query.productRecord.size()>0">
<if test="query.productRecords != null and query.productRecords.size()>0">
<if test="query.productRecord != null and query.productRecord != '' and query.productRecord.size()==1 ">
<if test="query.productRecords != null and query.productRecords.size()==1 ">
AND o.`product_record` =
<foreach item='productRecord' index="index" collection='query.productRecord' >
<foreach item='productRecord' index="index" collection='query.productRecords' >
#{productRecord}
</foreach>
</if>
<if test="query.productRecord != null and query.productRecord != '' and query.productRecord.size()>1 ">
<if test="query.productRecords != null and query.productRecords.size()>1 ">
AND o.`product_record` in
<foreach item='productRecord' index="index" collection='query.productRecord' open='(' separator=',' close=')'>
<foreach item='productRecord' index="index" collection='query.productRecords' open='(' separator=',' close=')'>
#{productRecord}
</foreach>
</if>
......@@ -2337,6 +2372,40 @@
</foreach>
))
</if>
<if test="query.customsTypes != null and query.customsTypes.size()>0">
<if test="query.customsTypes != null and query.customsTypes.size()==1 ">
AND o.`customs_type` =
<foreach item='customsType' index="index" collection='query.customsTypes' >
#{customsType}
</foreach>
</if>
<if test="query.customsTypes != null and query.customsTypes.size()>1 ">
AND o.`customs_type` in
<foreach item='customsType' index="index" collection='query.customsTypes' open='(' separator=',' close=')'>
#{customsType}
</foreach>
</if>
</if>
<if test="query.productRecords != null and query.productRecords.size()>0">
<if test="query.productRecords != null and query.productRecords.size()==1 ">
AND o.`product_record` =
<foreach item='productRecord' index="index" collection='query.productRecords' >
#{productRecord}
</foreach>
</if>
<if test="query.productRecords != null and query.productRecords.size()>1 ">
AND o.`product_record` in
<foreach item='productRecord' index="index" collection='query.productRecords' open='(' separator=',' close=')'>
#{productRecord}
</foreach>
</if>
</if>
<if test="query.number != null and query.number != '' ">
AND (o.`number` like concat("%",concat(#{query.number},"%")) or o.order_id in( select distinct oi.order_id
from ecw_order_item oi
......@@ -2924,6 +2993,40 @@
))
</if>
<if test="query.customsTypes != null and query.customsTypes.size()>0">
<if test="query.customsTypes != null and query.customsTypes.size()==1 ">
AND o.`customs_type` =
<foreach item='customsType' index="index" collection='query.customsTypes' >
#{customsType}
</foreach>
</if>
<if test="query.customsTypes != null and query.customsTypes.size()>1 ">
AND o.`customs_type` in
<foreach item='customsType' index="index" collection='query.customsTypes' open='(' separator=',' close=')'>
#{customsType}
</foreach>
</if>
</if>
<if test="query.productRecords != null and query.productRecords.size()>0">
<if test="query.productRecords != null and query.productRecords.size()==1 ">
AND o.`product_record` =
<foreach item='productRecord' index="index" collection='query.productRecords' >
#{productRecord}
</foreach>
</if>
<if test="query.productRecords != null and query.productRecords.size()>1 ">
AND o.`product_record` in
<foreach item='productRecord' index="index" collection='query.productRecords' open='(' separator=',' close=')'>
#{productRecord}
</foreach>
</if>
</if>
<if test="query.number != null and query.number != '' ">
AND (o.`number` like concat("%",concat(#{query.number},"%")) or o.order_id in( select distinct oi.order_id
from ecw_order_item oi
......@@ -3979,6 +4082,40 @@
<if test="query.productRecord != null">
AND o.`product_record` = #{query.productRecord}
</if>
<if test="query.customsTypes != null and query.customsTypes.size()>0">
<if test="query.customsTypes != null and query.customsTypes.size()==1 ">
AND o.`customs_type` =
<foreach item='customsType' index="index" collection='query.customsTypes' >
#{customsType}
</foreach>
</if>
<if test="query.customsTypes != null and query.customsTypes.size()>1 ">
AND o.`customs_type` in
<foreach item='customsType' index="index" collection='query.customsTypes' open='(' separator=',' close=')'>
#{customsType}
</foreach>
</if>
</if>
<if test="query.productRecords != null and query.productRecords.size()>0">
<if test="query.productRecords != null and query.productRecords.size()==1 ">
AND o.`product_record` =
<foreach item='productRecord' index="index" collection='query.productRecords' >
#{productRecord}
</foreach>
</if>
<if test="query.productRecords != null and query.productRecords.size()>1 ">
AND o.`product_record` in
<foreach item='productRecord' index="index" collection='query.productRecords' open='(' separator=',' close=')'>
#{productRecord}
</foreach>
</if>
</if>
<if test="query.transportId != null">
AND o.`transport_id` = #{query.transportId}
</if>
......
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