more filter for sales order
This commit is contained in:
@@ -5,6 +5,8 @@ import com.imyeyu.java.bean.BasePage;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/// GAO 销售订单分页请求
|
/// GAO 销售订单分页请求
|
||||||
///
|
///
|
||||||
/// @author Codex
|
/// @author Codex
|
||||||
@@ -25,15 +27,27 @@ public class GaoSalesOrderPage extends BasePage {
|
|||||||
/// 订单类型
|
/// 订单类型
|
||||||
private GaoSalesOrder.OrderType orderType;
|
private GaoSalesOrder.OrderType orderType;
|
||||||
|
|
||||||
|
/// 订单类型列表
|
||||||
|
private List<GaoSalesOrder.OrderType> orderTypeList;
|
||||||
|
|
||||||
/// 订单状态
|
/// 订单状态
|
||||||
private GaoSalesOrder.Status status;
|
private GaoSalesOrder.Status status;
|
||||||
|
|
||||||
|
/// 订单状态列表
|
||||||
|
private List<GaoSalesOrder.Status> statusList;
|
||||||
|
|
||||||
/// 付款状态
|
/// 付款状态
|
||||||
private GaoSalesOrder.PaymentStatus paymentStatus;
|
private GaoSalesOrder.PaymentStatus paymentStatus;
|
||||||
|
|
||||||
|
/// 付款状态列表
|
||||||
|
private List<GaoSalesOrder.PaymentStatus> paymentStatusList;
|
||||||
|
|
||||||
/// 退款状态
|
/// 退款状态
|
||||||
private GaoSalesOrder.RefundStatus refundStatus;
|
private GaoSalesOrder.RefundStatus refundStatus;
|
||||||
|
|
||||||
|
/// 退款状态列表
|
||||||
|
private List<GaoSalesOrder.RefundStatus> refundStatusList;
|
||||||
|
|
||||||
/// true 为筛选可收款且未付清订单
|
/// true 为筛选可收款且未付清订单
|
||||||
private Boolean pendingReceive;
|
private Boolean pendingReceive;
|
||||||
|
|
||||||
|
|||||||
@@ -31,10 +31,42 @@
|
|||||||
AND cp.`deleted_at` IS NULL
|
AND cp.`deleted_at` IS NULL
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="orderType != null">AND o.`order_type` = #{orderType}</if>
|
<choose>
|
||||||
<if test="status != null">AND o.`status` = #{status}</if>
|
<when test="orderTypeList != null and 0 < orderTypeList.size()">
|
||||||
<if test="paymentStatus != null">AND o.`payment_status` = #{paymentStatus}</if>
|
AND o.`order_type` IN
|
||||||
<if test="refundStatus != null">AND o.`refund_status` = #{refundStatus}</if>
|
<foreach collection="orderTypeList" item="orderTypeItem" open="(" separator="," close=")">
|
||||||
|
#{orderTypeItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
<when test="orderType != null">AND o.`order_type` = #{orderType}</when>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<when test="statusList != null and 0 < statusList.size()">
|
||||||
|
AND o.`status` IN
|
||||||
|
<foreach collection="statusList" item="statusItem" open="(" separator="," close=")">
|
||||||
|
#{statusItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
<when test="status != null">AND o.`status` = #{status}</when>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<when test="paymentStatusList != null and 0 < paymentStatusList.size()">
|
||||||
|
AND o.`payment_status` IN
|
||||||
|
<foreach collection="paymentStatusList" item="paymentStatusItem" open="(" separator="," close=")">
|
||||||
|
#{paymentStatusItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
<when test="paymentStatus != null">AND o.`payment_status` = #{paymentStatus}</when>
|
||||||
|
</choose>
|
||||||
|
<choose>
|
||||||
|
<when test="refundStatusList != null and 0 < refundStatusList.size()">
|
||||||
|
AND o.`refund_status` IN
|
||||||
|
<foreach collection="refundStatusList" item="refundStatusItem" open="(" separator="," close=")">
|
||||||
|
#{refundStatusItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
<when test="refundStatus != null">AND o.`refund_status` = #{refundStatus}</when>
|
||||||
|
</choose>
|
||||||
<if test="pendingReceive != null and pendingReceive">AND o.`status` IN ('ACTIVE', 'FULFILLED') AND o.`payment_status` IN ('UNPAID', 'PARTIALLY_PAID')</if>
|
<if test="pendingReceive != null and pendingReceive">AND o.`status` IN ('ACTIVE', 'FULFILLED') AND o.`payment_status` IN ('UNPAID', 'PARTIALLY_PAID')</if>
|
||||||
<if test="fulfilledButUnpaid != null and fulfilledButUnpaid">AND o.`status` = 'FULFILLED' AND o.`paid_amount` < o.`sale_amount`</if>
|
<if test="fulfilledButUnpaid != null and fulfilledButUnpaid">AND o.`status` = 'FULFILLED' AND o.`paid_amount` < o.`sale_amount`</if>
|
||||||
<if test="keyword != null and keyword.trim() != ''">AND (o.`order_no` LIKE CONCAT('%', #{keyword}, '%') OR c.`name` LIKE CONCAT('%', #{keyword}, '%') OR c.`code` LIKE CONCAT('%', #{keyword}, '%'))</if>
|
<if test="keyword != null and keyword.trim() != ''">AND (o.`order_no` LIKE CONCAT('%', #{keyword}, '%') OR c.`name` LIKE CONCAT('%', #{keyword}, '%') OR c.`code` LIKE CONCAT('%', #{keyword}, '%'))</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user