package com.house365.ws.util;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Date: 16/9/18</p>
 *
 * @author XN
 * @version 1.0
 */
public class Constant {

    public static final String CUSTOMER_NAME = "name";

    public static final String CUSTOMER_PHONE = "phone";

    public static final String CUSTOMER_PERIOD = "period";

    public static final String CUSTOMER_SEX = "sex";
    //活动来源
    public static final String CUSTOMER_ACTSOURCE = "actSource";
    //初次来源
    public static final String CUSTOMER_FIRSTSOURCE = "firstSource";
    public static final String CUSTOMER_FIRSTSOURCEID = "firstSourceId";
    public static final String CUSTOMER_LATESTSOURCEID = "latestSourceId";
    //最近来源
    public static final String CUSTOMER_LATESTSOURCE = "latestSource";
    //最近回访
    public static final String CUSTOMER_CRM_LATESTSCALL = "latestCall";
    //活动来源
    public static final String CUSTOMER_TRACESTATUS = "traceStatus";
    //最近回访结果
    public static final String CUSTOMER_CRM_LATESTSCALL_RESULT = "latestCallResult";
    public static final String CUSTOMER_STATUS = "status";
    //状态变更发生时间
    public static final String OCCURTIME = "occurTime";

    public static final String CITY_CODE = "cityCode";
    public static final String CITY_NAME = "cityName";
    public static final String CRMID = "crmId";
    public static final String NEWHOUSEID = "newhouseId";

    public static final String BUYINTENTION = "1";

    //系统用户ID
    public static final String USER_ID = "userId";
    public static final String ACC_ID = "accId";
    public static final String TYPE = "type";
    public static final String TOKEN = "token";
    //系统用户登录名
    public static final String USER_NAME = "name";
    //系统用户密码
    public static final String USER_PASSWORD = "password";

    public static final String PROJECT_CONTRACT = "contract";

    public static final String PROJECT_CONTRACT_CODE = "contractCode";

    //项目ID
    public static final String PROJECT_ID = "projectId";
    public static final String CHANNEL = "channel";
    //客户约看项目ID
    public static final String CUSTOMER_PROJECT_ID = "customerProjectId";
    //客户ID
    public static final String CUSTOMER_ID = "customerId";
    //公告ID
    public static final String NOTICE_ID = "noticeId";
    //时间过滤
    public static final String TIME_FILTER = "timeFilter";
    //客户状态
    public static final String PROJECT_FILTER = "projectFilter";
    //客户意向
    public static final String BUY_INTENTION_FILTER = "buyIntentionFilter";

    //分页-当前页
    public static final String CURRENT_PAGE = "currentPage";

    public static final String USER_PHONE = "userPhone";

    public static final String SHORT = "short";

    public static final String[] AddCustomerParams = {CUSTOMER_ACTSOURCE, CUSTOMER_NAME, CUSTOMER_PHONE, CITY_CODE, CRMID, CITY_NAME};

    public static final String[] ACCIDPARAMS = {"realName", "cityCode"};

    public static final String[] USERID = {"userId"};

    public static final String[] CITYCODE = {"cityCode"};

    public static final String[] USERPHONE = {"phone", "cityCode"};

    public static final String[] AddCustomerParams4Promote = {CUSTOMER_ACTSOURCE, CUSTOMER_PHONE, CUSTOMER_NAME, CITY_CODE, CITY_NAME, "requestType", "crmId", "sex", "lastJoinVisitTime"};

    public static final String[] AddCustomerParams4Protection = {CUSTOMER_PHONE, CITY_CODE};

    public static final String[] AddHotlineCustomerParams = {CUSTOMER_PHONE, CITY_CODE, CITY_NAME};

    public static final String[] AddProgramCustomerParams = {CUSTOMER_PHONE, CITY_CODE, CITY_NAME,"userPhone", "name", "traceStatus", "actSource" ,"lastjoinVisitTime","lastJoinVisitRemark","lastJoinVisitWorker"};

    public static final String[] ValidUserParams = {USER_NAME, USER_PASSWORD};

    public static final String[] BindUserParams = {CUSTOMER_PHONE, CUSTOMER_ACTSOURCE, USER_ID};

    public static final String[] BindAccIdParams = {ACC_ID, USER_ID, TOKEN};

    public static final String[] AccIdParams = {ACC_ID};

    public static final String[] WaitCallCustomer = {CUSTOMER_ID, CUSTOMER_PHONE};

    public static final String[] VersionParams = {TYPE};

    public static final String[] ChangeCustomerProjectStatusParams = {CUSTOMER_PHONE, PROJECT_CONTRACT, CUSTOMER_STATUS};

    public static final String[] ProjectContractCode = {PROJECT_CONTRACT_CODE};

    public static final String[] CRMStatisticParamsOLD = {CUSTOMER_PHONE};
    public static final String[] CRMStatisticParams = {CUSTOMER_PHONE, "sign"};
    public static final String[] NoticeParams = {"id", "sign"};
    public static final String[] UserParams = {"id", "prop", "newValue", "sign"};
    public static final String[] IdParams = {"id"};

    public static final String MANAGER = "经管系统";

    public static final String PAGE = "page";

    public static final String PAGESIZE = "pageSize";

    public static final String PAGENO = "10";

    /**
     * 客户来源
     */
    public static enum CustomerSourceEnum {
        CRM("CRM"), SYSTEM("SYSTEM"), MANAGE("MANAGE"), HOTLINE("HOTLINE"), WECHAT("WECHAT"),NEWHOUSE("NEWHOUSE");

        private String msg;

        CustomerSourceEnum(String msg) {
            this.msg = msg;
        }

        /**
         * @return the msg
         */
        public String getMsg() {
            return msg;
        }

        /**
         * @param msg the msg to set
         */
        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    public static enum CustomerTypeEnum {
        ONLINE(1), OFFLINE(0);

        private Integer msg;

        CustomerTypeEnum(Integer msg) {
            this.msg = msg;
        }

        /**
         * @return the msg
         */
        public Integer getMsg() {
            return msg;
        }

        /**
         * @param msg the msg to set
         */
        public void setMsg(Integer msg) {
            this.msg = msg;
        }
    }

    /**
     * 客户性别 1 男 0 女 2 未知
     */
    public static enum CustomerSexEnum {
        MAIL(1), FEMAIL(0), NOTSURE(2);

        private Integer msg;

        CustomerSexEnum(Integer msg) {
            this.msg = msg;
        }

        /**
         * @return the msg
         */
        public Integer getMsg() {
            return msg;
        }

        /**
         * @param msg the msg to set
         */
        public void setMsg(Integer msg) {
            this.msg = msg;
        }
    }

    /**
     * 状态 0 未约看 1 约看、2 到访、3 认筹、4 认购、5 签约、6 退房
     */
    public static enum CustomerStatusEnum {
        NORECORD("未约看", 0), RECORDED("约看", 1), VISITED("到访", 2), ORDERED("认筹", 3), BUY("认购", 4), SING("签约", 5), CANCEL(
            "退房", 6);

        private String msg;
        private int status;

        CustomerStatusEnum(String msg, int status) {
            this.msg = msg;
            this.status = status;
        }

        public static String getMsgByStatus(int i) {
            switch (i) {
                case 0:
                    return NORECORD.getMsg();
                case 1:
                    return RECORDED.getMsg();
                case 2:
                    return VISITED.getMsg();
                case 3:
                    return ORDERED.getMsg();
                case 4:
                    return BUY.getMsg();
                case 5:
                    return SING.getMsg();
                case 6:
                    return CANCEL.getMsg();
                default:
                    return "";
            }
        }

        /**
         * @return the msg
         */
        public String getMsg() {
            return msg;
        }

        /**
         * @param msg the msg to set
         */
        public void setMsg(String msg) {
            this.msg = msg;
        }

        /**
         * @return the status
         */
        public int getStatus() {
            return status;
        }

        /**
         * @param status the status to set
         */
        public void setStatus(int status) {
            this.status = status;
        }
    }

    //98 未跟踪 0 未约看 99 删除
    public static enum HotLineStatusEnum {
        INIT(98), NORECORD(0), DELETE(99);

        private Integer msg;

        HotLineStatusEnum(Integer msg) {
            this.msg = msg;
        }

        /**
         * @return the msg
         */
        public Integer getMsg() {
            return msg;
        }

        /**
         * @param msg the msg to set
         */
        public void setMsg(Integer msg) {
            this.msg = msg;
        }
    }

}
