package com.zzsn.knowbase.constant;

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

public class Constants {
    //个人素材一级分类id
    public static final String SC_CATEGORY = "1826201944893501441";
    //个人素材知识库id
    public static final String SC_USER = "1826201830565163010";
    //redis缓存  key常量
    public static final String FINANCE = "SAVE_ES:";
    public static final String RESEARCH = "RESEARCH:";

    //旧同步数据时索引
    public final static String ES_DATA_NEW_INDEX = "newclbdatabase";

    //评价中心es索引
    public static final String GZJG_ES_INDEX = "gzjg";

    //新采集库（22.04.23）
    public final static String ES_BASE_DATA = "basedata_2023";

    //新领导讲话索引（22.08.24）
    public final static String LEADER_SPEECH_BASE_DATA = "leaderspeech_new";

    //专题库
    public final static String ES_SUBJECT_DATA = "subjectdatabase";

    //审计对接旧索引（废弃）
    public final static String ES_SUBJECT_DEV_DATA = "subjectdatabase_dev";

    //处理后的专题资讯信息存储索引。
    public final static String ES_DATA_FOR_SUBJECT = "subjectdatabase_2023";
    //知识库
    public final static String ES_DATA_FOR_KNOWLEDGE = "knowledgedatabase_nt";
    /*
     * 专题内容主次关系索引
     */
    public static final String SUB_PRIMARY_SECONDARY_MAP = "subprimarysecondarymap";
    public final static String ES_DATA_FOR_SUBJECT_YJZX = "yjzx_subjectdatabase_2023";

    //研究报告索引
    public final static String RESEARCH_REPORT_DATA = "researchreportdata_2023";

    //政策法规
    public final static String POLICY_DATA = "policy";

    //素材库索引
    public final static String ES_DATA_FOR_AIREPORTMATERIAL = "ai_report_material";

    //新建的es索引
    public final static String ES_DATA_FOR_COLLECTION = "collectiondatabase_dev";

    //法规库
    public final static String ES_DATA_FOR_FAGUI = "knowledgebasefg";

    //文件上传路径
    public final static String FILE_PATH_PREFIX = "static/uploadFiles";

    //验证服务占用记录
    public final static String VERIFY_SERVICE = "VERIFY_SERVICE:";

    //专题采集数据
    public final static String SUBJECT_DATA = "SUBJECT_DATA:COLLECT:";
    /*
     * 政策法规向数据库中同步
     */
    public final static String POLICY_INFO_DB_SYN = "POLICY:DB:";

    //python文件上床地址（李孟对接）
    public final static String PYTHON_FILE_PATH = "D:/FTP";

    //爬取到的网页类型
    public final static String TYPE_HTML = "HTML";

    public final static String TYPE_EXCEL = "EXCEL";

    public final static String TYPE_WORD = "WORD";

    public final static String TYPE_PPT = "PPT";

    public final static String TYPE_PDF = "PDF";

    public final static String TYPE_IMG = "IMG";

    public final static String TYPE_FILE = "FILE";

    public final static String DEFAULT_LANG = "cn";


    public final static String YDYL_ARTICLE_SUBJECT_ID = "1653954370072371202";

    public final static String LABEL_TYPE_ARTICLE_TYPE_ID = "1651433081113829378";

    public final static String LABEL_TYPE_PROJECT_TYPE_ID = "1651428096456155138";

    public final static String LABEL_TYPE_BUSINESS_TYPE_ID = "1651428583591010305";

    public final static String LABEL_TYPE_RISK_TYPE_ID = "1651428400094404610";


    //专题分析 关键词类型ID
    public static final String KEYWORDS_TYPE_ID = "1545323639679737857";
    //专题分析 专题类型ID
    public static final String SUBJECT_TYPE_ID = "1545666456444723202";
    //项目ID
    public static final String PROJECT_ID = "1545303889230684162";
    //专题对应的id
    public static final String POLICY_SUBJECT_ID = "1660551578301423617";

    //专题分析 绑定搜素引擎ID
    public static final String[] SEARCH_ENGINES_ID = new String[]{"1539145903551361026", "1539146006513135617", "1539146115049140225", "1539146210310172674", "1539146330581839873", "1539146509640871938", "1539146774620221441", "1539146892010401794"};

    //信息源网址入缓存前缀
    public static final String SITE_NAME_KEY = "SITE_NAME_KEY:";

    //信息源网址入缓存前缀
    public static final int SUMMARY_MAX_LENGTH = 260;

    //专题数据提取新词时间节点
    public static final String SUBJECT_NEW_KEYWORDS_TIME = "SUBJECT_LAST_NEW_KEYWORDS_TIME:";
    //专题数据提取热词时间节点
    public static final String SUBJECT_HOT_KEYWORDS_TIME = "SUBJECT_LAST_HOT_KEYWORDS_TIME:";
    //全量数据时间节点
    public static final String COMBINE_FULL_DATA_TASK_TIME = "COMBINE_FULL_DATA_TASK_TIME:";
    //三元组入库时间节点
    public static final String TRIPLET_TO_NEO_TASK_TIME =  "TRIPLET_TO_NEO_TASK_TIME:";
    //前台-热词集合redis缓存key
    public final static String HOT_WORD_KEY = "FRONT::HOT_WORD";
    //前台-热词趋势redis缓存key
    public final static String HOT_WORD_TREND_KEY = "FRONT::HOT_WORD_TREND";

    public static final String FSP = System.getProperty("file.separator");

    public static final String USER_HOME = System.getProperty("user.home");
    /*
     * 临时文件保存路径。
     */
    public static final String TEMP_FILES_DIR = USER_HOME+FSP+"temp"+FSP;

    public static final String APPLICATION_DATA_DIR = USER_HOME+FSP+"mrasdata"+FSP;

    //专题采集数据
    public final static String SEND_TO_MACHINE_DATA = "SUBJECT_DATA:SYNtOMACHINE:";

    //报告任务分组 推送报告任务(包括邮箱和微信企业号)和生成报告任务
    public static final String PUSH_EMAIL_GROUP = "PUSH_EMAIL";
    public static final String PUSH_WECHAT_GROUP = "PUSH_WECHAT";
    public static final String CREATE_GROUP = "CREATE";
    //fastdfs  文件浏览地址 前部分
    public static final String FILE_PATH_URL_PREFIX = "http://114.115.215.96/";
    //obs  文件浏览地址 前部分
    public static final String OBS_FILE_PATH_URL_PREFIX = "https://zzsn.luyuen.com/";
    public static final String OBS_FILE_PATH_URL_PREFIX_NOS = "http://zzsn.luyuen.com/";
    public static final String OBS_FILE_PATH_URL_HOST = "https://zzsn.obs.cn-north-1.myhuaweicloud.com:443/";


    //情报同步最大的id
    public final static String SPECIAL_INFORMATION_SYN = "SPECIAL_DATA_MAX_ID";

    /*
     * 情报语言信息同步
     */
    public final static String SPECIAL_LANGUAGE_SYN = "SPECIAL_LANGUAGE_MAX_ID";

    /*
     * 项目信息同步的最大id
     */
    public final static String PROJECT_INFO_SYN = "PROJECT_INFO_MAX_ID";

    //专题数据提取图谱信息时间节点
    public static final String ARTICLE_TAR_TIME = "ARTICLE_TAR_TIME:";

    /*
     * 政策法规信息同步最大id
     */
    public final static String POLICY_INFO_SYN = "POLICY_INFO_MAX_ID";
    public final static String USER_INFO = "userInfo";


    /*
     * 数据索引全
     */
    public static Map<String,String> ALL_INDEX = new HashMap<>();
    /*
     * 政策法规标签
     */
    public static Map<String,String> POLICY_LABELS = new HashMap<>();
    public static final String POLICY_LABELSLIST = "1704428137399386114,1704429336999690242,1704428299907694593,1704427938249637890,1714102959951728642";

    public static final String SCIENCE_FILE = "摘要,Abstract,参考文献,致谢,结论,参考文献：,主要参考文献";
    /*
     * 行业的映射关系
     */
    public final static Map<String, String> industryMap = new HashMap<String, String>();

    static {
        industryMap.put("25634569604562944", "1493167501570842625");
        industryMap.put("25634563304718336", "1493168560984924161");
        industryMap.put("25634564323934208", "1493168791227047938");
        industryMap.put("25634562709127168", "1493168919421755394");
        industryMap.put("25634567461273600", "1493169086308917250");
        industryMap.put("1479035335737290754", "1493481192505847810");
        industryMap.put("25634566303645696", "1631520486049972226");
        industryMap.put("1479035618374660098", "1631521136611717121");
        industryMap.put("1479035799887360001", "1631521522051469314");
        industryMap.put("1479035948546076674", "1631521910020435970");
        industryMap.put("1479036104142172162", "1631522617045897217");
        industryMap.put("1479036223038107649", "1631523006419935233");
        industryMap.put("1479036475275161601", "1631523443135049729");
        industryMap.put("25634570133045248", "1631523835390464002");
        industryMap.put("1479036714153357314", "1631524152807002113");
        industryMap.put("1479036863562854402", "1631524581930536962");
        industryMap.put("1479036996182552578", "1631524634367725569");
        industryMap.put("1479037230665117697", "1631525020126228482");
        industryMap.put("1479037374659768321", "1631526287150006274");
        industryMap.put("1479037472202502145", "1631526704474808321");


        ALL_INDEX.put("subjectdatabase_2023","");//新平台专题库
        ALL_INDEX.put("articlebase","");//研究中心资讯库
        ALL_INDEX.put("knowledgebasezx","");//研究资讯
        ALL_INDEX.put("knowledgebasefg","");//政策法规
        ALL_INDEX.put("knowledgebaseqy","");//企业资讯
        ALL_INDEX.put("knowledgebasezk","");//智库资讯
        ALL_INDEX.put("knowledgebasejh","");//领导讲话
        ALL_INDEX.put("researchreportdata_2023","");//新平台研报
        ALL_INDEX.put("policy","");//政策法规


        POLICY_LABELS.put("1704428137399386114","1642");//栏目id-政策标签id（国务院国资委）
        POLICY_LABELS.put("1704429336999690242","1666");//栏目id-政策标签id（地方国资委）
        POLICY_LABELS.put("1704428299907694593","1699");//栏目id-政策标签id（国务院各部委文件/其他部门）
        POLICY_LABELS.put("1704427938249637890","1766");//栏目id-政策标签id（国务院文件）
    }

    /*
     * 模型日志类型
     */
    public static final String MODEL_LOG_TYPE_ADD = "创建";

    public static final String MODEL_LOG_TYPE_SET_CONF = "设置配置信息";

    public static final String MODEL_LOG_TYPE_UPLOAD_YULIAO = "语料上传";

    public static final String MODEL_LOG_TYPE_TRAIN = "模型训练";

    public static final String MODEL_LOG_TYPE_TEST = "模型测试";

    public static final String MODEL_LOG_TYPE_PUBLISH = "模型发布";

    /*
     * 模型参数字典表键值
     */
    public static final String MODEL_PARAMTER_DICT_ID = "1658713610162970626";

    //研究中心-研究报告
    public final static String SUBJECT_REPORT_KEYWORDS = "SUBJECT_REPORT_KEYWORDS:";

    //研究中心-研究报告处理时间节点
    public final static String SUBJECT_REPORT_TIME = "SUBJECT_REPORT_TIME:";
    //招投标索引
    public final static String TENDER = "tender";

    public static final Integer MAX_FILE_SIZE = 50 * 1024 * 1024;
    public static final Integer CONVERT_TIMEOUT_MS = 120000;
    public static final String CONVERTATION_ERROR_MESSAGE_TEMPLATE = "Error occurred in the ConvertService: ";
    public static final Long FULL_LOADING_IN_PERCENT = 100L;
    public static final Integer FILE_SAVE_TIMEOUT = 5000;
    public static final Integer MAX_KEY_LENGTH = 20;
    public static final Integer ANONYMOUS_USER_ID = 4;
    public static final Integer KILOBYTE_SIZE = 1024;

    private Constants() { }
}
