package cn.com.countrygarden.bi.main.model.common;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by chenweijiang on 2017/9/20.
 */
public interface CommConstant {

    String[] updateByProposal = {"name",
            "organId",
            "projectType",
            "corpType",
            "projectNature",
            "area",
            "proposalDate",
            "status",
            "gmtModified",
            "modifiedBy"};

    public interface CommStatus {
        String prophase = "prophase";
        String candidate = "candidate";
        String passed = "passed";
        String suspend = "suspend";
        String contract = "contract";
        String release = "release";

        Map<String, String> statusName = new HashMap<String, String>() {
            {
                put(CommStatus.prophase, "前介");
                put(CommStatus.candidate, "上会待定");
                put(CommStatus.passed, "上会通过");
                put(CommStatus.suspend, "已停止");
                put(CommStatus.contract, "已签约");
                put(CommStatus.release, "已解约");
            }
        };

    }

    interface OperationName {
        String prophase = "前介";
        String candidate = "上会待定";
        String passed = "上会通过";
        String proposalSuspend = "上会已停止";
        String suspend = "已停止";
        String contract = "已签约";
        String release = "已解约";
    }

    Map<String, String> proposalStatus = new HashMap<String, String>() {
        {
            put("通过", CommStatus.passed);
            put("停止", CommStatus.suspend);
            put("待定", CommStatus.candidate);
        }
    };

    Map<String, String> contractStatus = new HashMap<String, String>() {
        {
            put("已签约", CommStatus.contract);
            put("已解约", CommStatus.release);
        }
    };

    String areaRex = "^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$";


    String ORGANCACHEKEY = "biapp:marketing:organ:map";
    int ORGANCACHTIME = 60 * 60 * 6;
    String ORGANNameCACHEKEY = "biapp:marketing:organ:name:map";

    interface ProjectNatureCache {
        String key = "biapp:marketing:project:nature:map";
        int time = 60 * 60 * 6;
    }

    interface ProjectTypeCache {
        String key = "biapp:marketing:project:type:map";
        int time = 60 * 60 * 6;
    }

    interface CooperationTypeCache {
        String key = "biapp:marketing:project:cooperationtype:map";
        int time = 60 * 60 * 6;
    }


    interface CommUploadFileType {
        String FILE_TYPE_PROPOSAL = "1"; // 上会
        String FILE_TYPE_CONTRACT = "2"; // 签约合同
        String FILE_TYPE_MONTH_CHARGE = "3"; // 月度收费面积
        String FILE_TYPE_QUATER_CHARGE = "4"; // 季度收费面积
        String FILE_TYPE_MISSION_QUOTA = "5"; // 任务指标
    }
}
