Commit bcf8b6ea authored by liuzeheng's avatar liuzeheng

报关方式、备案属性多选

parent 7a17f668
...@@ -86,7 +86,7 @@ public class OrderQueryDTO { ...@@ -86,7 +86,7 @@ public class OrderQueryDTO {
private String marks; private String marks;
@ApiModelProperty(value = "产品备案属性:1有牌,2无牌,3中性,4混牌") @ApiModelProperty(value = "产品备案属性:1有牌,2无牌,3中性,4混牌")
private Integer productRecord; private List<Integer> productRecord;
@ApiModelProperty(value = "是否控货") @ApiModelProperty(value = "是否控货")
private Boolean isCargoControl; private Boolean isCargoControl;
...@@ -95,7 +95,7 @@ public class OrderQueryDTO { ...@@ -95,7 +95,7 @@ public class OrderQueryDTO {
private Integer cargoControlStatus; private Integer cargoControlStatus;
@ApiModelProperty(value = "报关类别:我司全代:1,自单代报:2,混合报关:3") @ApiModelProperty(value = "报关类别:我司全代:1,自单代报:2,混合报关:3")
private Integer customsType; private List<Integer> customsType;
@ApiModelProperty(value = "上传文件") @ApiModelProperty(value = "上传文件")
private String upFile; private String upFile;
...@@ -164,7 +164,7 @@ public class OrderQueryDTO { ...@@ -164,7 +164,7 @@ public class OrderQueryDTO {
private BigDecimal useVolumeUnit; private BigDecimal useVolumeUnit;
@ApiModelProperty(value = "入仓类型") @ApiModelProperty(value = "入仓类型")
private Integer warehouseType; private List<Integer> warehouseType;
@ApiModelProperty(value = "是否发送过入仓短信 已发送:1,未发送:0") @ApiModelProperty(value = "是否发送过入仓短信 已发送:1,未发送:0")
private Boolean sendsms; private Boolean sendsms;
...@@ -406,7 +406,7 @@ public class OrderQueryDTO { ...@@ -406,7 +406,7 @@ public class OrderQueryDTO {
private List<Long> objectiveId; private List<Long> objectiveId;
@ApiModelProperty(value = "始发仓ID") @ApiModelProperty(value = "始发仓ID")
private Long startWarehouseId; private List<Long> startWarehouseId;
@ApiModelProperty(value = "目的仓ID") @ApiModelProperty(value = "目的仓ID")
private List<Long> destWarehouseId; private List<Long> destWarehouseId;
......
...@@ -981,24 +981,34 @@ ...@@ -981,24 +981,34 @@
</if> </if>
<!-- <if test="query.type != null and query.type != '' and query.type == 0 ">-->
<!-- AND (o.type is null or o.type = '' or o.type = '0')-->
<!-- </if>-->
<!-- <if test="query.type == 1 ">-->
<!-- AND FIND_IN_SET(1, o.type)-->
<!-- </if>-->
<!-- <if test="query.type == 2 ">-->
<!-- AND FIND_IN_SET(2, o.type)-->
<!-- </if>-->
<if test="query.pdaStartWareIds != null and query.pdaStartWareIds != '' "> <if test="query.pdaStartWareIds != null and query.pdaStartWareIds != '' ">
AND FIND_IN_SET(ew_start.`id`, #{query.pdaStartWareIds}) AND FIND_IN_SET(ew_start.`id`, #{query.pdaStartWareIds})
</if> </if>
<if test="query.pdaDestWareIds != null and query.pdaDestWareIds != '' "> <if test="query.pdaDestWareIds != null and query.pdaDestWareIds != '' ">
AND FIND_IN_SET(ew_dest.`id`, #{query.pdaDestWareIds}) AND FIND_IN_SET(ew_dest.`id`, #{query.pdaDestWareIds})
</if> </if>
<if test="query.isExternalWarehouse != null"> <!-- <if test="query.isExternalWarehouse != null">-->
AND o.`is_external_warehouse` = #{query.isExternalWarehouse} <!-- AND o.`is_external_warehouse` = #{query.isExternalWarehouse}-->
<!-- </if>-->
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse.size()>0">
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse != '' and query.isExternalWarehouse.size()==1 ">
AND o.`is_external_warehouse` =
<foreach item='isExternalWarehouse' index="index" collection='query.isExternalWarehouse' >
#{isExternalWarehouse}
</foreach>
</if>
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse != '' and query.isExternalWarehouse.size()>1 ">
AND o.`is_external_warehouse` in
<foreach item='isExternalWarehouse' index="index" collection='query.isExternalWarehouse' open='(' separator=',' close=')'>
#{isExternalWarehouse}
</foreach>
</if>
</if> </if>
<if test="query.status != null"> <if test="query.status != null">
AND o.`status` = #{query.status} AND o.`status` = #{query.status}
</if> </if>
...@@ -1045,20 +1055,71 @@ ...@@ -1045,20 +1055,71 @@
<if test="query.salesmanId != null "> <if test="query.salesmanId != null ">
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> </if>
<if test="query.customsType != null"> <!-- <if test="query.customsType != null">-->
AND o.`customs_type` = #{query.customsType} <!-- AND o.`customs_type` = #{query.customsType}-->
<!-- </if>-->
<if test="query.customsType != null and query.customsType.size()>0">
<if test="query.customsType != null and query.customsType != '' and query.customsType.size()==1 ">
AND o.`customs_type` =
<foreach item='customsType' index="index" collection='query.customsType' >
#{customsType}
</foreach>
</if>
<if test="query.customsType != null and query.customsType != '' and query.customsType.size()>1 ">
AND o.`customs_type` in
<foreach item='customsType' index="index" collection='query.customsType' open='(' separator=',' close=')'>
#{customsType}
</foreach>
</if>
</if> </if>
<if test="query.productRecord != null"> <!-- <if test="query.productRecord != null">-->
AND o.`product_record` = #{query.productRecord} <!-- AND o.`product_record` = #{query.productRecord}-->
<!-- </if>-->
<if test="query.productRecord != null and query.productRecord.size()>0">
<if test="query.productRecord != null and query.productRecord != '' and query.productRecord.size()==1 ">
AND o.`product_record` =
<foreach item='productRecord' index="index" collection='query.productRecord' >
#{productRecord}
</foreach>
</if>
<if test="query.productRecord != null and query.productRecord != '' and query.productRecord.size()>1 ">
AND o.`product_record` in
<foreach item='productRecord' index="index" collection='query.productRecord' open='(' separator=',' close=')'>
#{productRecord}
</foreach>
</if>
</if> </if>
<if test="query.transportId != null"> <if test="query.transportId != null">
AND o.`transport_id` = #{query.transportId} AND o.`transport_id` = #{query.transportId}
</if> </if>
<if test="query.channelId != null"> <if test="query.channelId != null">
AND o.`channel_id` = #{query.channelId} AND o.`channel_id` = #{query.channelId}
</if> </if>
<if test="query.warehouseType != null"> <if test="query.warehouseType != null and query.warehouseType.size()>0">
AND o.`warehouse_type` = #{query.warehouseType}
<if test="query.warehouseType != null and query.warehouseType != '' and query.warehouseType.size()==1 ">
AND o.`warehouse_type` =
<foreach item='warehouseType' index="index" collection='query.warehouseType' >
#{warehouseType}
</foreach>
</if>
<if test="query.warehouseType != null and query.warehouseType != '' and query.warehouseType.size()>1 ">
AND o.`warehouse_type` in
<foreach item='warehouseType' index="index" collection='query.warehouseType' open='(' separator=',' close=')'>
#{warehouseType}
</foreach>
</if>
</if> </if>
<if test="query.number != null and query.number != '' "> <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 AND (o.`number` like concat("%",concat(#{query.number},"%")) or o.order_id in( select distinct oi.order_id
...@@ -1308,11 +1369,15 @@ ...@@ -1308,11 +1369,15 @@
or pb.`title_zh` = #{query.notEqProdKey} or pb.`title_en` = #{query.notEqProdKey}) or pb.`title_zh` = #{query.notEqProdKey} or pb.`title_en` = #{query.notEqProdKey})
)) ))
</if> </if>
<if test="query.startWarehouseId != null and query.destWarehouseId.size() !=0 "> <if test="query.startWarehouseId != null and query.destWarehouseId !=null and query.destWarehouseId.size() !=0 ">
and (o.line_id in( and (o.line_id in(
select whl.id select whl.id
from ecw_warehouse_line whl from ecw_warehouse_line whl
where whl.start_warehouse_id = #{query.startWarehouseId} 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 and whl.dest_warehouse_id in
<foreach item='destWarehouseId' index='index' collection='query.destWarehouseId' open='(' separator=',' close=')'> <foreach item='destWarehouseId' index='index' collection='query.destWarehouseId' open='(' separator=',' close=')'>
#{destWarehouseId} #{destWarehouseId}
...@@ -1320,14 +1385,17 @@ ...@@ -1320,14 +1385,17 @@
)) ))
</if> </if>
<if test="query.startWarehouseId != null and query.destWarehouseId =null "> <if test="query.startWarehouseId != null and query.destWarehouseId =null ">
and (o.line_id in( and (o.line_id in(
select whl.id select whl.id
from ecw_warehouse_line whl from ecw_warehouse_line whl
where whl.start_warehouse_id = #{query.startWarehouseId} where whl.start_warehouse_id in
<foreach item='startWarehouseId' index='index' collection='query.startWarehouseId' open='(' separator=',' close=')'>
#{startWarehouseId}
</foreach>
)) ))
</if> </if>
<if test="query.startWarehouseId == null and query.destWarehouseId !=null and query.destWarehouseId.size() != 0 "> <if test="query.startWarehouseId = null and query.destWarehouseId !=null and query.destWarehouseId.size() != 0 ">
and (o.line_id in( and (o.line_id in(
select whl.id select whl.id
from ecw_warehouse_line whl from ecw_warehouse_line whl
...@@ -3648,9 +3716,27 @@ ...@@ -3648,9 +3716,27 @@
<if test = "query.packageType != null and query.packageType != '' "> <if test = "query.packageType != null and query.packageType != '' ">
AND CONCAT(',',o.package_type,',') REGEXP CONCAT(',',REPLACE(#{query.packageType},',',',|,'), ',') AND CONCAT(',',o.package_type,',') REGEXP CONCAT(',',REPLACE(#{query.packageType},',',',|,'), ',')
</if> </if>
<if test = "query.isExternalWarehouse != null"> <!-- <if test = "query.isExternalWarehouse != null">-->
AND o.`is_external_warehouse` = #{query.isExternalWarehouse} <!-- AND o.`is_external_warehouse` = #{query.isExternalWarehouse}-->
<!-- </if>-->
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse.size()>0">
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse != '' and query.isExternalWarehouse.size()==1 ">
AND o.`is_external_warehouse` =
<foreach item='isExternalWarehouse' index="index" collection='query.isExternalWarehouse' >
#{isExternalWarehouse}
</foreach>
</if>
<if test="query.isExternalWarehouse != null and query.isExternalWarehouse != '' and query.isExternalWarehouse.size()>1 ">
AND o.`is_external_warehouse` in
<foreach item='isExternalWarehouse' index="index" collection='query.isExternalWarehouse' open='(' separator=',' close=')'>
#{isExternalWarehouse}
</foreach>
</if>
</if> </if>
<if test = "query.status != null"> <if test = "query.status != null">
AND o.`status` = #{query.status} AND o.`status` = #{query.status}
</if> </if>
...@@ -3697,11 +3783,45 @@ ...@@ -3697,11 +3783,45 @@
<if test = "query.salesmanId != null "> <if test = "query.salesmanId != null ">
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> </if>
<if test = "query.customsType != null"> <!-- <if test = "query.customsType != null">-->
AND o.`customs_type` = #{query.customsType} <!-- AND o.`customs_type` = #{query.customsType}-->
<!-- </if>-->
<if test="query.customsType != null and query.customsType.size()>0">
<if test="query.customsType != null and query.customsType != '' and query.customsType.size()==1 ">
AND o.`customs_type` =
<foreach item='customsType' index="index" collection='query.customsType' >
#{customsType}
</foreach>
</if>
<if test="query.customsType != null and query.customsType != '' and query.customsType.size()>1 ">
AND o.`customs_type` in
<foreach item='customsType' index="index" collection='query.customsType' open='(' separator=',' close=')'>
#{customsType}
</foreach>
</if>
</if> </if>
<if test = "query.productRecord != null">
AND o.`product_record` = #{query.productRecord} <!-- <if test = "query.productRecord != null">-->
<!-- AND o.`product_record` = #{query.productRecord}-->
<!-- </if>-->
<if test="query.productRecord != null and query.productRecord.size()>0">
<if test="query.productRecord != null and query.productRecord != '' and query.productRecord.size()==1 ">
AND o.`product_record` =
<foreach item='productRecord' index="index" collection='query.productRecord' >
#{productRecord}
</foreach>
</if>
<if test="query.productRecord != null and query.productRecord != '' and query.productRecord.size()>1 ">
AND o.`product_record` in
<foreach item='productRecord' index="index" collection='query.productRecord' open='(' separator=',' close=')'>
#{productRecord}
</foreach>
</if>
</if> </if>
<if test = "query.transportId != null"> <if test = "query.transportId != null">
AND o.`transport_id` = #{query.transportId} AND o.`transport_id` = #{query.transportId}
...@@ -3709,8 +3829,23 @@ ...@@ -3709,8 +3829,23 @@
<if test = "query.channelId != null"> <if test = "query.channelId != null">
AND o.`channel_id` = #{query.channelId} AND o.`channel_id` = #{query.channelId}
</if> </if>
<if test = "query.warehouseType != null">
AND o.`warehouse_type` = #{query.warehouseType} <if test="query.warehouseType != null and query.warehouseType.size()>0">
<if test="query.warehouseType != null and query.warehouseType != '' and query.warehouseType.size()==1 ">
AND o.`warehouse_type` =
<foreach item='warehouseType' index="index" collection='query.warehouseType' >
#{warehouseType}
</foreach>
</if>
<if test="query.warehouseType != null and query.warehouseType != '' and query.warehouseType.size()>1 ">
AND o.`warehouse_type` in
<foreach item='warehouseType' index="index" collection='query.warehouseType' open='(' separator=',' close=')'>
#{warehouseType}
</foreach>
</if>
</if> </if>
<if test = "query.number != null and query.number != '' "> <if test = "query.number != null and query.number != '' ">
AND (o.`number` like concat('%',concat(#{query.number},'%')) AND (o.`number` like concat('%',concat(#{query.number},'%'))
...@@ -3922,21 +4057,34 @@ ...@@ -3922,21 +4057,34 @@
and (o.line_id in( and (o.line_id in(
select whl.id select whl.id
from ecw_warehouse_line whl from ecw_warehouse_line whl
where whl.start_warehouse_id = #{query.startWarehouseId} and whl.dest_warehouse_id = #{query.destWarehouseId} 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>
<if test = "query.startWarehouseId != null and query.destWarehouseId == null "> <if test = "query.startWarehouseId != null and query.destWarehouseId == null ">
and (o.line_id in( and (o.line_id in(
select whl.id select whl.id
from ecw_warehouse_line whl from ecw_warehouse_line whl
where whl.start_warehouse_id = #{query.startWarehouseId} where whl.start_warehouse_id in
<foreach item='startWarehouseId' index='index' collection='query.startWarehouseId' open='(' separator=',' close=')'>
#{startWarehouseId}
</foreach>
)) ))
</if> </if>
<if test = "query.startWarehouseId == null and query.destWarehouseId != null "> <if test = "query.startWarehouseId == null and query.destWarehouseId != null ">
and (o.line_id in( and (o.line_id in(
select whl.id select whl.id
from ecw_warehouse_line whl from ecw_warehouse_line whl
where whl.dest_warehouse_id = #{query.destWarehouseId} where whl.dest_warehouse_id in
<foreach item='destWarehouseId' index='index' collection='query.destWarehouseId' open='(' separator=',' close=')'>
#{destWarehouseId}
</foreach>
)) ))
</if> </if>
<if test = "query.airShipment != null and query.airShipment == 1"> <if test = "query.airShipment != null and query.airShipment == 1">
......
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