package com.bcxin.ars.enums;

import com.bcxin.ars.export.*;

/**
 * @author linqinglin
 * @date 2019/09/17 0017 13:41
 */
public enum SignType {

    LESS_EQUAL {
        @Override
        public String getOperator() {
            return "<=";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new EqualExportWhereStrategy();
        }
    },
    GREATER_EQUAL {
        @Override
        public String getOperator() {
            return ">=";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new EqualExportWhereStrategy();
        }
    },
    EQUAL {
        @Override
        public String getOperator() {
            return "=";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new EqualExportWhereStrategy();
        }
    },
    DATE_LESS_EQUAL {
        //日期需要格式化处理
        @Override
        public String getOperator() {
            return "<=";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new DateExportWhereStrategy();
        }
    },
    OTHERIF {
        //日期需要格式化处理
        @Override
        public String getOperator() {
            return "=";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new OtherIfExportWhereStrategy();
        }
    },
    DATE_GREATER_EQUAL {
        //日期需要格式化处理
        @Override
        public String getOperator() {
            return ">=";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new DateExportWhereStrategy();
        }
    },
    DATE_GREATER_EQUAL_HMS {
        //日期需要格式化处理
        @Override
        public String getOperator() {
            return ">=";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new HMSDateExportWhereStrategy();
        }
    },
    TASK_DATE_GREATER_EQUAL {
        //驻勤点日期需要格式化处理
        @Override
        public String getOperator() {
            return ">=";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new TaskDateExportWhereStrategy();
        }
    },
    TASK_DATE_LESS_EQUAL {
        //日期需要格式化处理
        @Override
        public String getOperator() {
            return "<=";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new TaskDateExportWhereStrategy();
        }
    },
    DATE_EQUAL {
        //日期需要格式化处理
        @Override
        public String getOperator() {
            return "=";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new DateExportWhereStrategy();
        }
    },
    EQUAL_NULL_EMPTY {
        @Override
        public String getOperator() {
            return "=";
        }

        @Override
        public String getDefaultValue() {
            return "";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new EqualNullExportWhereStrategy();
        }
    },

    EQUAL_NULL_ZERO {
        @Override
        public String getOperator() {
            return "=";
        }

        @Override
        public String getDefaultValue() {
            return "0";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new EqualNullExportWhereStrategy();
        }
    },
    OUTDAY  {
        @Override
        public String getOperator() {
            return " >= ";
        }

        @Override
        public String getDefaultValue() {
            return "0";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new OutDayExportWhereStrategy();
        }
    },
    IDCARDSEX  {
        @Override
        public String getOperator() {
            return " = ";
        }

        @Override
        public String getDefaultValue() {
            return "0";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return null;
        }
    },
    IDCARDNATIVE  {
        @Override
        public String getOperator() {
            return " like ";
        }

        @Override
        public String getDefaultValue() {
            return "0";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new IdCardNativeExportWhereStrategy();
        }
    },
    EQUAL_AND_NULL{
        @Override
        public String getOperator() {
            return " = ";
        }

        @Override
        public String getDefaultValue() {
            return "";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new EqualAndNullExportWhereStrategy();
        }
    },
    //不等于
    NOTEQUAL  {
        @Override
        public String getOperator() {
            return " != ";
        }

        @Override
        public String getDefaultValue() {
            return "";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new NotEqualExportWhereStrategy();
        }
    },
    //不为空
    NOTEMPTY  {
        @Override
        public String getOperator() {
            return " != ";
        }

        @Override
        public String getDefaultValue() {
            return "";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new NotEmptyExportWhereStrategy();
        }
    },
    //包含
    IN  {
        @Override
        public String getOperator() {
            return " in ";
        }

        @Override
        public String getDefaultValue() {
            return "";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new InExportWhereStrategy();
        }
    },
    CASE  {
        @Override
        public String getOperator() {
            return " != ";
        }

        @Override
        public String getDefaultValue() {
            return "";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new CaseExportWhereStrategy();
        }
    },
    LIKE {
        @Override
        public String getOperator() {
            return "like";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new LikeExportWhereStrategy();
        }
    },
    LIKE_AREACODE {
        @Override
        public String getOperator() {
            return "like";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new LikeAreaCodeExportWhereStrategy();
        }
    },
    LIKE_AFTER {
        @Override
        public String getOperator() {
            return "like";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new LikeAfterExportWhereStrategy();
        }
    },
    OR {
        @Override
        public String getOperator() {
            return " or ";
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new OrExportWhereStrategy();
        }
    },
    OR_LIKE {
        @Override
        public String getOperator() {
            return null;
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new OrLikeExportWhereStrategy();
        }
    },
    IS_HAVE_TASk{
        @Override
        public String getOperator() {
            return null;
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new IsHaveTaskExportWhereStrategy();
        }
    },
    OLDDATA_TRAINID{
        @Override
        public String getOperator() {
            return null;
        }

        @Override
        public String getDefaultValue() {
            return "0";
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new OldDataTrainIdExportWhereStrategy();
        }
    },
    LEARN_RATE_SIGN {
        @Override
        public String getOperator() {
            return null;
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new LearnRateExportWhereStrategy();
        }
    },
    FEE_STATE {
        @Override
        public String getOperator() {
            return null;
        }

        @Override
        public String getDefaultValue() {
            return null;
        }

        @Override
        public ExportWhereStrategy getExportWhereStrategy() {
            return new LearnRateExportWhereStrategy();
        }
    };

    public abstract String getOperator();

    public abstract String getDefaultValue();

    public abstract ExportWhereStrategy getExportWhereStrategy();
}
