# CbCaseQuery.java

    package cloud.wconnect.finance.pojo.query.chargeback;

    import cloud.wconnect.commonlib.pojo.dto.group.Addition;
    import cloud.wconnect.commonlib.pojo.dto.group.Edition;
    import cloud.wconnect.commonlib.pojo.dto.group.QueryActionA;
    import cloud.wconnect.commonlib.pojo.dto.group.QueryActionB;
    import lombok.Data;
    import org.hibernate.validator.constraints.Range;

    import jakarta.validation.constraints.Min;
    import jakarta.validation.constraints.NotNull;

    /**
     * Query: Cb Case
     *
     * @author yyt
     * 2023/8/22
     */
    @Data
    public class CbCaseQuery extends CaseCommonQuery {

        /**
         * 银行平台
         */
        private Integer vendor;

        /**
         * Action（0:无,1:Accept,2:Challenge）
         */
        @Range(min = 0, max = 2, message = "the action must in [0:无,1:Accept,2:Challenge]", groups = {Addition.class, QueryActionA.class})
        private Integer action;

        /**
         * Result（0：无，1:Win，2:Loss，3:Frozen，4:Processed）
         */
        @Range(min = 0, max = 4, message = "the result must in [0：无，1:Win，2:Loss，3:Frozen，4:Processed]", groups = {Addition.class, QueryActionA.class})
        private Integer result;

        /**
         * Stage（1:init，2:hotel operation，3:overdue，4:portal，5:patch，6:final）
         */
        @Range(min = 1, max = 6, message = "the stage must in [1:init，2:hotel operation，3:overdue，4:portal，5:patch，6:final]",
                groups = {Addition.class, QueryActionA.class})
        private Integer stage;

        /**
         * 审批层级
         */
        private Integer progress;

        /**
         * Case状态 (0:无，1:Draft，2:New Case，3:Ignored，4:Accept，5:Dispute，6:Processed，7:Win，8:Loss，9:Forzen，12:Close，13：Fill out adj form)
         */
        @Range(min = 0, max = 13,
                message = "the status must in [0:无，1:Draft，2:New Case，3:Ignored，4:Accept，5:Dispute，6:Processed，7:Win，8:Loss，9:Forzen，12:Close，13：Fill out adj form]",
                groups = {Addition.class, QueryActionA.class})
        private Integer status;

        /**
         * 姓名搜索
         */
        private String guestName;

        /**
         * conf.no
         */
        private String confNumber;

        /**
         * case号
         */
        private String caseNumber;

        /**
         * 卡号
         */
        private String cardNumber;

        /**
         * 交易开始时间
         */
        private Long trxDateBegin;

        /**
         * 交易结束时间
         */
        private Long trxDateEnd;

        /**
         * 银行有无退款(0:否,1:是)
         */
        private Boolean nonChargeback;

        /**
         * 类型（1：搜索在几天后将超期的case，2：搜索状态未变更超过5天的case，3：搜索等待我处理的case，4：检索未完成 case）
         */
        @NotNull(message = "the type must not be null", groups = Edition.class)
        @Range(min = 1, max = 4, message = "the type must in [1：search over time case，2：search status not change case，3：search wait processing case，4：search incomplete case]", groups = Edition.class)
        private Integer type;

        public static final int SEARCH_OVER_TIME_CASE = 1;

        public static final int SEARCH_STATUS_NOT_CHANGE_CASE = 2;

        public static final int SEARCH_WAIT_PROCESSING_CASE = 3;

        public static final int SEARCH_INCOMPLETE_CASE = 4;

        /**
         * 页码
         */
        @NotNull(message = "the page must not be null", groups = {Addition.class, Edition.class})
        private Integer page;

        /**
         * 每页条数
         */
        @NotNull(message = "the size must not be null", groups = {Addition.class, Edition.class})
        private Integer size;

        /**
         * 搜索在几天后将超期的 case
         */
        private Boolean overTime;

        /**
         * 搜索状态未变更超过 5 天的 case
         */
        private Boolean statusNotChange;

        /**
         * 搜索等待我处理的 case
         */
        private Boolean waitProcessing;

        /**
         * 搜索未完成的 case
         */
        private Boolean incomplete;

        /**
         * 类型（1：列表数据导出，2：Ohers列表导出，3：相同 Case Number 列表导出）
         */
        @NotNull(message = "the exportType must not be null", groups = QueryActionA.class)
        @Range(min = 1, max = 3, message = "the exportType must in [1：export list data，2：export other list data，3：export same case number list data]",
                groups = QueryActionA.class)
        private Integer exportType;

        public static final int EXPORT_LIST_DATA = 1;

        public static final int EXPORT_OTHER_LIST_DATA = 2;

        public static final int EXPORT_EXPORT_SAME_CASE_NUMBER_LIST_DATA = 3;

        /**
         * case id
         */
        private Long id;

        /**
         * Issue Date 开始日期
         */
        private Long issueDateBegin;

        /**
         * Issue Date 结束日期
         */
        private Long issueDateEnd;

        /**
         * case 集合脚标，获取上一个或下一个 Case 时传值
         */
        @NotNull(message = "the index must not be null", groups =  QueryActionB.class)
        @Min(value = 0, message = "the index min value is 0", groups =  QueryActionB.class)
        private Integer index;

        /**
         * 是否有 overdue 阶段（true：有，false：无）
         */
        private Boolean hasOverdue;

        /**
         * 有 overdue 且 酒店没有表态的 case（true：是，false：否）
         */
        private Boolean filterStage;

    }