Commit 3f1e4bd4 authored by liuzeheng's avatar liuzeheng

异常状态、审核状态多选

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