Commit 3f1e4bd4 authored by liuzeheng's avatar liuzeheng

异常状态、审核状态多选

parent 8f5fb78a
...@@ -4,13 +4,11 @@ import com.alibaba.excel.annotation.ExcelProperty; ...@@ -4,13 +4,11 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Collection; import java.util.*;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
...@@ -107,7 +105,7 @@ public class OrderQueryDTO { ...@@ -107,7 +105,7 @@ public class OrderQueryDTO {
private Integer status; private Integer status;
@ApiModelProperty(value = "订单异常状态(字典 order_abnormal_state)") @ApiModelProperty(value = "订单异常状态(字典 order_abnormal_state)")
private Integer abnormalState; private List<Integer> abnormalState;
@ApiModelProperty(value = "订单入仓状态(字典 order_warehouse_in_status)") @ApiModelProperty(value = "订单入仓状态(字典 order_warehouse_in_status)")
private Integer inWarehouseState; private Integer inWarehouseState;
...@@ -493,7 +491,7 @@ public class OrderQueryDTO { ...@@ -493,7 +491,7 @@ public class OrderQueryDTO {
private Boolean isNeat; private Boolean isNeat;
@ApiModelProperty(value = "审核类型(字典 order_approval_type) 0 为正常") @ApiModelProperty(value = "审核类型(字典 order_approval_type) 0 为正常")
private Integer auditType; private List<Integer> auditType;
@ApiModelProperty(value = "审核结果") @ApiModelProperty(value = "审核结果")
private String auditResult; private String auditResult;
...@@ -549,8 +547,22 @@ public class OrderQueryDTO { ...@@ -549,8 +547,22 @@ public class OrderQueryDTO {
this.status = 5; this.status = 5;
this.transportId = 3; // 空运待出查询,只查空运的订单 this.transportId = 3; // 空运待出查询,只查空运的订单
this.airShipment = 1; this.airShipment = 1;
this.auditType = 0; //this.auditType = 0;
this.abnormalState = 0; if(CollectionUtils.isEmpty(auditType)){
this.auditType= new ArrayList<>();
this.auditType.add(0);
}else {
this.auditType.add(0);
}
//this.abnormalState = 0;
if(CollectionUtils.isEmpty(abnormalState)){
this.abnormalState = new ArrayList<>();
this.abnormalState.add(0) ;
}else {
this.abnormalState.add(0) ;
}
break; break;
case 10502: case 10502:
// 空运可出 // 空运可出
...@@ -574,8 +586,21 @@ public class OrderQueryDTO { ...@@ -574,8 +586,21 @@ public class OrderQueryDTO {
// 兼容空运已入仓的可出、备货中、已备货,且无异常无审批,海运的已入仓无异常无审批 // 兼容空运已入仓的可出、备货中、已备货,且无异常无审批,海运的已入仓无异常无审批
this.airShipment = 20; this.airShipment = 20;
} }
this.auditType = 0; //this.auditType = 0;
this.abnormalState = 0; if(CollectionUtils.isEmpty(auditType)){
this.auditType = new ArrayList<>();
this.auditType.add(0) ;
}else {
this.auditType.add(0) ;
}
//this.abnormalState = 0;
if(CollectionUtils.isEmpty(abnormalState)){
this.abnormalState = new ArrayList<>();
this.abnormalState.add(0) ;
}else {
this.abnormalState.add(0) ;
}
break; break;
case 132411: case 132411:
// 空运已出货 // 空运已出货
......
...@@ -1003,50 +1003,142 @@ ...@@ -1003,50 +1003,142 @@
</if> </if>
</if> </if>
<!-- <if test="query.status != null and query.status.size()>0">-->
<!-- <if test="query.status != null and query.status != '' and query.status.size()==1 ">-->
<!-- AND o.`status` =-->
<!-- <foreach item='status' index="index" collection='query.status' >-->
<!-- #{status}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="query.status != null and query.status != '' and query.status.size()>1 ">-->
<!-- AND o.`status` in-->
<!-- <foreach item='status' index="index" collection='query.status' open='(' separator=',' close=')'>-->
<!-- #{status}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- </if>-->
<if test="query.status != null"> <if test="query.status != null">
AND o.`status` = #{query.status} AND o.`status` = #{query.status}
</if> </if>
<if test="query.abnormalState != null"> <!-- <if test="query.abnormalState != null">-->
<choose> <!-- <choose>-->
<when test="query.abnormalState != 0"> <!-- <when test="query.abnormalState != 0">-->
<!-- <choose>-->
<!-- <when test="query.abnormalState != -1">-->
<!-- AND o.`abnormal_state` = #{query.abnormalState}-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- AND o.`abnormal_state` != 0-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- AND o.`abnormal_state` = 0-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </if>-->
<if test="query.abnormalState != null and query.abnormalState.size()>0">
<if test="query.abnormalState != null and query.abnormalState != '' and query.abnormalState.size()==1 ">
<foreach item='abnormalState' index="index" collection='query.abnormalState' >
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
AND o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
AND o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
</if>
<if test="query.abnormalState != null and query.abnormalState != '' and query.abnormalState.size()>1 ">
AND (1!=1
<foreach item='abnormalState' index="index" collection='query.abnormalState'>
<choose> <choose>
<when test="query.abnormalState != -1"> <when test="abnormalState != '0'">
AND o.`abnormal_state` = #{query.abnormalState} <choose>
<when test="abnormalState != '-1'">
OR o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
OR o.`abnormal_state` != 0
</otherwise>
</choose>
</when> </when>
<otherwise> <otherwise>
AND o.`abnormal_state` != 0 OR o.`abnormal_state` = 0
</otherwise> </otherwise>
</choose> </choose>
</when> </foreach>
<otherwise>
AND o.`abnormal_state` = 0 )
</otherwise> </if>
</choose>
</if> </if>
<if test="query.inWarehouseState != null"> <if test="query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState} AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if> </if>
<if test="query.shipmentState != null"> <if test="query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState} AND o.`shipment_State` = #{query.shipmentState}
</if> </if>
<if test="query.auditType != null"> <!-- <if test="query.auditType != null">-->
<choose> <!-- <choose>-->
<when test="query.auditType != 0"> <!-- <when test="query.auditType != 0">-->
<!-- <choose>-->
<!-- <when test="query.auditType != -1">-->
<!-- AND o.`audit_type` = #{query.auditType}-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- AND o.`audit_type` != 0-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- AND o.`audit_type` = 0-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </if>-->
<if test="query.auditType != null and query.auditType.size()>0">
<if test="query.auditType != null and query.auditType != '' and query.auditType.size()==1 ">
<foreach item='auditType' index="index" collection='query.auditType' >
<choose> <choose>
<when test="query.auditType != -1"> <when test="auditType != 0">
AND o.`audit_type` = #{query.auditType} <choose>
<when test="auditType != -1">
AND o.`audit_type` = #{auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when> </when>
<otherwise> <otherwise>
AND o.`audit_type` != 0 AND o.`audit_type` = 0
</otherwise> </otherwise>
</choose> </choose>
</when> </foreach>
<otherwise> </if>
AND o.`audit_type` = 0
</otherwise>
</choose>
</if> </if>
<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>
...@@ -3727,50 +3819,143 @@ ...@@ -3727,50 +3819,143 @@
</foreach> </foreach>
</if> </if>
</if> </if>
<!-- <if test="query.status != null and query.status.size()>0">-->
<!-- <if test="query.status != null and query.status != '' and query.status.size()==1 ">-->
<!-- AND o.`status` =-->
<!-- <foreach item='status' index="index" collection='query.status' >-->
<!-- #{status}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="query.status != null and query.status != '' and query.status.size()>1 ">-->
<!-- AND o.`status` in-->
<!-- <foreach item='status' index="index" collection='query.status' open='(' separator=',' close=')'>-->
<!-- #{status}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- </if>-->
<if test = "query.status != null"> <if test = "query.status != null">
AND o.`status` = #{query.status} AND o.`status` = #{query.status}
</if> </if>
<if test = "query.abnormalState != null"> <!-- <if test = "query.abnormalState != null">-->
<choose> <!-- <choose>-->
<when test = "query.abnormalState != 0"> <!-- <when test = "query.abnormalState != 0">-->
<!-- <choose>-->
<!-- <when test = "query.abnormalState != -1">-->
<!-- AND o.`abnormal_state` = #{query.abnormalState}-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- AND o.`abnormal_state` != 0-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- AND o.`abnormal_state` = 0-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </if>-->
<if test="query.abnormalState != null and query.abnormalState.size()>0">
<if test="query.abnormalState != null and query.abnormalState != '' and query.abnormalState.size()==1 ">
<foreach item='abnormalState' index="index" collection='query.abnormalState' >
<choose> <choose>
<when test = "query.abnormalState != -1"> <when test="abnormalState != '0'">
AND o.`abnormal_state` = #{query.abnormalState} <choose>
<when test="abnormalState != '-1'">
AND o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
AND o.`abnormal_state` != 0
</otherwise>
</choose>
</when> </when>
<otherwise> <otherwise>
AND o.`abnormal_state` != 0 AND o.`abnormal_state` = 0
</otherwise> </otherwise>
</choose> </choose>
</when> </foreach>
<otherwise> </if>
AND o.`abnormal_state` = 0
</otherwise> <if test="query.abnormalState != null and query.abnormalState != '' and query.abnormalState.size()>1 ">
</choose> AND (1!=1
<foreach item='abnormalState' index="index" collection='query.abnormalState'>
<choose>
<when test="abnormalState != '0'">
<choose>
<when test="abnormalState != '-1'">
OR o.`abnormal_state` = #{abnormalState}
</when>
<otherwise>
OR o.`abnormal_state` != 0
</otherwise>
</choose>
</when>
<otherwise>
OR o.`abnormal_state` = 0
</otherwise>
</choose>
</foreach>
)
</if>
</if> </if>
<if test = "query.inWarehouseState != null"> <if test = "query.inWarehouseState != null">
AND o.`in_warehouse_state` = #{query.inWarehouseState} AND o.`in_warehouse_state` = #{query.inWarehouseState}
</if> </if>
<if test = "query.shipmentState != null"> <if test = "query.shipmentState != null">
AND o.`shipment_State` = #{query.shipmentState} AND o.`shipment_State` = #{query.shipmentState}
</if> </if>
<if test = "query.auditType != null"> <!-- <if test = "query.auditType != null">-->
<choose> <!-- <choose>-->
<when test = 'query.auditType != 0'> <!-- <when test = 'query.auditType != 0'>-->
<!-- <choose>-->
<!-- <when test = 'query.auditType != -1'>-->
<!-- AND o.`audit_type` = #{query.auditType}-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- AND o.`audit_type` != 0-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- AND o.`audit_type` = 0-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </if>-->
<if test="query.auditType != null and query.auditType.size()>0">
<if test="query.auditType != null and query.auditType != '' and query.auditType.size()==1 ">
<foreach item='auditType' index="index" collection='query.auditType' >
<choose> <choose>
<when test = 'query.auditType != -1'> <when test="auditType != 0">
AND o.`audit_type` = #{query.auditType} <choose>
<when test="auditType != -1">
AND o.`audit_type` = #{auditType}
</when>
<otherwise>
AND o.`audit_type` != 0
</otherwise>
</choose>
</when> </when>
<otherwise> <otherwise>
AND o.`audit_type` != 0 AND o.`audit_type` = 0
</otherwise> </otherwise>
</choose> </choose>
</when> </foreach>
<otherwise> </if>
AND o.`audit_type` = 0
</otherwise>
</choose>
</if> </if>
<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>
......
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