package com.chinaweal.aiccs.common.constant;


import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author <a href="https://blog.lroyia.top">lroyia</a>
 * @since 2021/2/7 15:06
 **/
public class BaseDataConstant {

    // Map集合，其中常量为key，常量的文字描述为value

    //认缴出资方式  C：货币，P：实物，I：知识产权，D:债权、L:土地使用权、S:股权,O：其他
    private static final Map<String, String> CAPSHOULDTYPE_MAP = newHashMap(7);

    //CAPTYPE_MAP 实缴出资方式: C：货币，P：实物，I：知识产权，D:债权、L:土地使用权、S:股权,O：其他
    private static final Map<String, String> CAPTYPE_MAP = newHashMap(7);
    //保证范围:新版：1：主债权，2：利息，3：违约金，4：损害赔偿金，5：实现债权的费用，6：其他约定）
    private static final Map<String, String> RAGE_MAP = newHashMap(6);

    // 流程节点对应意见类型Map
    private static final Map<String, String> WORKFLOWNODE_OPINIONTYPE_MAP = newHashMap(8);
    private static final Map<String, String> WORKFLOWNODE_AMENDS_OPINION_OPINIONTYPE_MAP = newHashMap(8);

    //认缴出资方式   C：货币，P：实物，I：知识产权，D:债权、L:土地使用权、S:股权,O：其他
    public static final String CAPSHOULDTYPE_MAP_MONEY = "C"; // 货币
    public static final String CAPSHOULDTYPE_MAP_THING = "P"; // 实物
    public static final String CAPSHOULDTYPE_MAP_KNOW = "I"; // 知识产权
    public static final String CAPSHOULDTYPE_MAP_OBLIGATORY = "D"; // 债权
    public static final String CAPSHOULDTYPE_MAP_USELAND = "L"; // 土地使用权
    public static final String CAPSHOULDTYPE_MAP_STOCK = "S"; // 股权
    public static final String CAPSHOULDTYPE_MAP_OTHER = "O"; // 其他

    //认缴出资方式   C：货币，P：实物，I：知识产权，D:债权、L:土地使用权、S:股权,O：其他
    public static final String CAPTYPE_MAP_MONEY = "C"; // 货币
    public static final String CAPTYPE_MAP_THING = "P"; // 实物
    public static final String CAPTYPE_MAP_KNOW = "I"; // 知识产权
    public static final String CAPTYPE_MAP_OBLIGATORY = "D"; // 债权
    public static final String CAPTYPE_MAP_USELAND = "L"; // 土地使用权
    public static final String CAPTYPE_MAP_STOCK = "S"; // 股权
    public static final String CAPTYPE_MAP_OTHER = "O"; // 其他

    //保证范围:新版：1：主债权，2：利息，3：违约金，4：损害赔偿金，5：实现债权的费用，6：其他约定）
    public static final String RAGE_MAP_MAINCREDITOR = "1"; // 主债权
    public static final String RAGE_MAP_INTEREST = "2"; // 利息
    public static final String RAGE_MAP_PENALTY = "3"; // 违约金
    public static final String RAGE_MAP_DAMAGES = "4"; // 损害赔偿金
    public static final String RAGE_MAP_MAINCREDITORMONEY = "5"; // 实现债权的费用
    public static final String RAGE_MAP_OTHERARRANGE = "6"; // 其他约定


    // Map集合，其中常量为key，常量的文字描述为value
    public static final Map<String, String> OPINION_TYPE_MAP = newHashMap(7);
    public static final Map<String, String> BUSINESS_TYPE_MAP = newHashMap(15);
    public static final Map<String, String> BUSINESS_STATUS_MAP = newHashMap(4);
    public static final Map<String, String> PLEDGE_STATUS_MAP = newHashMap(2);
    public static final Map<String, String> COL_BIZ_STATUS_MAP = newHashMap(9);
    public static final Map<String, String> PROBLEM_RESOUCE_MAP = newHashMap(2); // 问题核查
    public static final Map<String, String> REVOKE_CASEREASON_MAP = newHashMap(2); //批吊业务-立案理由
    public static final Map<String, String> REVOKE_ILLEGALTYPE_MAP = newHashMap(4); //批吊业务-立案理由


    public static final String NO = "0";//为否（假）
    public static final String YES = "1";//为是（真）

    public static final String OPINION_TYPE_ENTER = "0"; //录入 或 受理
    public static final String OPINION_TYPE_APPROV = "1"; //审查
    public static final String OPINION_TYPE_APPROVE = "2"; // 审核 或 核准
    public static final String OPINION_TYPE_PRINT = "3"; //打印
    public static final String OPINION_TYPE_COLLATE = "4"; //校对
    public static final String OPINION_TYPE_ISSUE = "5"; //发照

    public static final String BUSINESS_TYPE_NOLICENCEEDIT = "1";//无照经营修改
    public static final String BUSINESS_TYPE_NOLICENCEADD = "2";//无照经营添加
    public static final String BUSINESS_TYPE_NOLICENCEDEL = "3";//无照经营删除
    public static final String BUSTNESS_TYPE_CREDIT = "4";//信用分类管理调整
    public static final String BUSTNESS_TYPE_CREDITINFO_ADD = "8";//外部信用信息增加
    public static final String BUSTNESS_TYPE_CREDITINFO_UPDATA = "9";//外部信用信息修改
    public static final String BUSTNESS_TYPE_CREDITINFO_DELETE = "10";//外部信用信息删除
    public static final String EXPTLIST_TYPE_ENTEREXCP = "5";//列入企业异常名录
    public static final String EXPTLIST_TYPE_OBJECTION = "6";//企业异常名录异议
    public static final String EXPTLIST_TYPE_REMOVE = "7";//移除企业异常名录
    public static final String EXPTLIST_TYPE_INDIVIDUAL_TAG = "11";//个体工商户标记
    public static final String EXPTLIST_TYPE_INDIVIDUAL_RESTORE = "12";//个体工商户恢复
    public static final String EXPTLIST_TYPE_INDIVIDUAL_OBJECTION = "18";//个体工商户标记异议
    public static final String EXPTLIST_TYPE_FARMER_ADD = "13";//农民专业合作社列入
    public static final String EXPTLIST_TYPE_FARMER_REMOVE = "14";//农民专业合作社移除
    public static final String EXPTLIST_TYPE_FARMER_OBJECTION = "19";//列入农合异常名录异议
    public static final String BUSTNESS_TYPE_REM_ABN_OBJECTION = "20"; // 移出异常名录异议
    public static final String BUSINESS_TYPE_FORCE_DEREGISTER = "50";// 拟强制注销

    public static final String BUSINESS_TYPE_REMOVE_NOTICE = "1001"; // 除名告知
    public static final String BUSINESS_TYPE_REMOVE_OBJECTION = "1002"; // 除名异议
    public static final String BUSINESS_TYPE_REMOVE_AUDIT = "1003"; // 除名决定
    public static final String BUSINESS_TYPE_REMOVE_REPAIR = "1004"; // 除名修复
    public static final String BUSINESS_TYPE_REMOVE_REVIEW = "1005"; // 除名复议
    public static final String BUSINESS_TYPE_REMOVE_REVOKE = "1006"; // 除名撤销

    // 地址批量列异
    public static final String EXPTLIST_TYPE_ADDRESSBATCH_ENTEREXCP = "71";//企业地址批量列异
    public static final String EXPTLIST_TYPE_ADDRESSBATCH_INDIVIDUAL_TAG = "72";//个体户地址批量列异
    public static final String EXPTLIST_TYPE_ADDRESSBATCH_FARMER_ADD = "73";//农合地址批量列异

    public static final String SERILLEGAL_TYPE_INCLUDEDILLEGAL = "55";//拟列入严重违法失信
    public static final String SERILLEGAL_TYPE_ENTERSERILLEGAL = "15";//列入严重违法失信
    public static final String SERILLEGAL_TYPE_OBJECTION = "16";//严重违法失信异议
    public static final String SERILLEGAL_TYPE_REMOVE = "17";//移出严重违法失信
    public static final String SERILLEGAL_TYPE_OT_ENTER = "80";//其他部门列入严重违法失信企业名单（黑名单）
    public static final String SERILLEGAL_TYPE_OT_REMOVE = "81";//其他部门移出严重违法失信企业名单（黑名单）
    public static final String BUSINESS_TYPE_RPEI_EXE_INFO = "18";// 企业破产重整计划或者和解协议

    public static final String CANCEL_REGISTRATION = "31";  // 冒用他人身份
    public static final String CANCEL_EASYENTRY = "81";  // 撤销案件简易录入结果
    public static final String CANCEL_REVOKE = "82";  // 撤销撤销案件
    public static final String CANCEL_REVOKE_BATCH = "83";  // 批量撤销撤销案件
    public static final String CANCEL_REGISTRATIONBG = "84";  // 撤销变更案件
    public static final String CANCEL_EASYENTRYBG = "85";  // 撤销变更录入结果
    public static final String CANCEL_REVOKEBG = "86";  // 撤销撤销变更案件
    public static final String CANCEL_REGISTRATIONZX = "87";  // 撤销注销案件
    public static final String CANCEL_EASYENTRYZX = "88";  // 撤销注销录入结果
    public static final String CANCEL_REVOKEZX = "89";  // 撤销撤销注销案件
    public static final String BIZ_TYPE_CANCEL_REVOKE = "90";  // 撤销注销

    public static final String BUSINESS_TYPE_REVOKEABN = "21";//撤销列入经营异常名录

    public static final String BUSINESS_TYPE_ENTERPRISE_MODIFY = "22";//企业经营异常修改
    public static final String BUSINESS_TYPE_INDIVIDUAL_MODIFY = "23";//个体户经营异常修改
    public static final String BUSINESS_TYPE_FARMER_MODIFY = "24";//农合经营异常修改

    public static final String BUSINESS_TYPE_REM_PUNISH = "27";// 行政处罚修复

    public static final String BUSINESS_TYPE_DELETE = "99";//业务删除

    public static final String MARKET_INSPECT = "66";  // 现场核查

    public static final String BUSINESS_STATUS_TOSIGN = "-1";//待签收
    public static final String BUSINESS_STATUS_TRANSACT = "0";//在办
    public static final String BUSINESS_STATUS_HANGUP = "1";//挂起
    public static final String BUSINESS_STATUS_END = "2";//结束
    public static final String BUSINESS_STATUS_FORCE_END = "3";//强制结束
    public static final String BUSINESS_STATUS_XYXF_END = "4";//信用修复作废
    public static final String BUSINESS_STATUS_RETURN_APPLY = "5";//信用修复回退到移动端  或 列异线索回退


    public static final String EXPTLIST_TYPE_APP = "01";//企业异常名录经办
    public static final String EXPTLIST_TYPE_APPROVED = "02";//企业异常名录经办

    //拍卖会备案
    public static final String AUCTION_TYPE_BEFORE = "26";//拍卖前备案
    public static final String AUCTION_TYPE_AFTER = "27";//拍卖后备案

    //批量吊銷
    public static final String REVOKE_TYPE_BATCHREVOKE = "51";//批量吊銷
    public static final String REVOKE_TYPE_BATCHREVOKE_CANCEL = "52";//批量吊銷--撤销
    public static final String REVOKE_TYPE_BATCHREVOKE_REVIEW = "53";//批量吊銷--复议
    public static final String REVOKE_TYPE_BATCHREVOKE_LITIGATION = "54";//批量吊銷--诉讼

    //批量注销
    public static final String DEACTIVATIONL_TYPE_BATCH = "91";//批量吊銷
    //联合惩戒
    public static final String PUNISH_TYPE_LOCK = "61";//联合惩戒列入
    public static final String PUNISH_TYPE_UNLOCK = "62";//联合惩戒移出

    // 登记业务状态
    public static final String COL_BIZ_STATUS_IDLE = "00"; // 未启动业务
    public static final String COL_BIZ_STATUS_SETUP = "01"; // 设立登记中
    public static final String COL_BIZ_STATUS_MODIFY = "02"; // 变更登记中
    public static final String COL_BIZ_STATUS_CANCEL = "03"; // 注销登记中
    public static final String COL_BIZ_STATUS_LICENSE = "04"; // 证照管理中
    public static final String COL_BIZ_STATUS_DATA_MODIFY = "05"; // 资料修改中
    public static final String COL_BIZ_STATUS_DATA_REPLENISH = "06"; // 数据补录中
    public static final String COL_BIZ_STATUS_CONTINUE = "11"; // 延续中
    public static final String COL_BIZ_STATUS_BACKOUT = "12"; // 撤销中

    /**
     * 年报公示异议
     **/
    public static final String ANNUAL_DISSENT_BIZ = "30";

    /**
     * 问题反馈
     **/
    public static final String PROBLEM_FEEDBACK_BIZ = "32";

    /**
     * 严重违法信用修复
     **/
    public static final String CREDIT_REPAIR_ILLEGAL_BIZ = "33";
    /**
     * 经营异常名录移出 企业
     **/
    public static final String CREDIT_REPAIR_ENT_BIZ = "34";
    /**
     * 经营异常名录移出 农专
     **/
    public static final String CREDIT_REPAIR_FARMER_BIZ = "35";
    /**
     * 个体户消除经营异常状态
     **/
    public static final String CREDIT_REPAIR_INDIVIDUAL_BIZ = "36";

    /**
     * 列异勘误
     **/
    public static final String CORRECTIONS_ABNORMAL_BIZ = "40";
    /**
     * 列严勘误
     **/
    public static final String CORRECTIONS_ILLEGAL_BIZ = "41";
    /**
     * 批吊勘误
     **/
    public static final String CORRECTIONS_REVOKE_BIZ = "42";

    //抵押登记的状态
    public static final String PLEDGE_STATUS_CANCEL = "02"; // 已注销
    public static final String PLEDGE_STATUS_OK = "01"; // 登记成立

    // 问题核查
    public static final String PROBLEM_COMPLAIN = "p01"; // 投诉
    public static final String PROBLEM_REPORT = "p02"; // 举报 aicode

    //推送吊销接口appid与appsecret（测试环境238）  改到配置文件读取
    public static final String TFTOKEN_APPID = "2cc35f3016b6470684d67a0dcc85b223"; // appid
    public static final String TFTOKEN_APPSECRET = "istUFExQqyZLGzoquzUTIVnsUvZplfmK5sa2qOougPrV7jJKeZ+QJvRjOuUIRVqA0WwFMhSkO6AFE1w89iwXD9Ji/ZwH0tvsQq3ei6O1aWs6+E+IcGn1aqJzh/iC75iomcW5ZFWQ8WcuokP+0Z+vqj2v4NN0Vdm9hCGAKZrO+6O733YrmHxEI1O66EqOOZzPiYTqgWCkugo1P3jlryDRm3Nua0lUlMcuQ89wtsTBfkpnxDRVday1NqN9+oodXNlokI4ktihLWkpY1jFtAU9Q1BgluvPXBWh4e5z4N8kGgxT4Q2cK/LoxFEiI0cofcrS9HhZn3OP4sOE16Mh0tlloNg=="; // APPSECRET
    public static final String PROBLEM_AICODE = "revocationAiccode"; // AICODE

    //推送撤销吊销接口appid与appsecret（测试环境238）  改到配置文件读取
    public static final String TFCANCELTOKEN_APPID = "e0b4baae1a1b4edfa9c2d997b6103582"; // appid
    public static final String TFCANCELTOKEN_APPSECRET = "JV1c1ORoV0+SVDv0158V56WvjJm+svh//4o/103ug+t6UMq8C4KRTFTh2qvOc/fOIGJJnIZ29eVbFqESFrrk9NUXlnL6FEBbOHw7G+HQ4I19r7SQEQNLCURgz9bHxZuFjVj0Tgv++mwVGca+0aIfYoJP+h2FU/Yo4JSX8IQ17FB8FFvExusHGbds6lUXV6Be7p7XMGz6qt1zN+zsOzDs/DyHT9hcMK+7qIMTbah8tXy9EW5JlZKesfqyp53dpXuO6B9Sb2fYSOfBFmCsMmjpiXJUuQXyA7OzqmaI9cyBJa0xM8wmh0Wmeb9jink75/EQwBcCLAJRDJykogq3ZiGk7A=="; // appsecret
    public static final String TFCANCELTOKEN_AICODE = "cancelRevocation"; // aiccode

    //推送撤销设立接口aiccode
    public static final String TFCANCELREGTOKEN_AICODE = "revocationReg"; // aiccode

    //推送撤销撤销设立接口aiccode
    public static final String TFCANCELREVOCATIONREGTOKEN_AICODE = "cancelRevocationReg"; // aiccode

    //推送联合惩戒数据接口appid与appsecret（测试）
    public static final String TFLOCKTOKEN_APPID = "2cc35f3016b6470684d67a0dcc85b223";
    public static final String TFLOCKTOKEN_APPSECRET = "istUFExQqyZLGzoquzUTIVnsUvZplfmK5sa2qOougPrV7jJKeZ+QJvRjOuUIRVqA0WwFMhSkO6AFE1w89iwXD9Ji/ZwH0tvsQq3ei6O1aWs6+E+IcGn1aqJzh/iC75iomcW5ZFWQ8WcuokP+0Z+vqj2v4NN0Vdm9hCGAKZrO+6O733YrmHxEI1O66EqOOZzPiYTqgWCkugo1P3jlryDRm3Nua0lUlMcuQ89wtsTBfkpnxDRVday1NqN9+oodXNlokI4ktihLWkpY1jFtAU9Q1BgluvPXBWh4e5z4N8kGgxT4Q2cK/LoxFEiI0cofcrS9HhZn3OP4sOE16Mh0tlloNg==";
    public static final String TFLOCK_AICODE = "accountLock";  //锁定数据
    public static final String TFUNLOCK_AICODE = "accountUnlock";  //解锁数据
    public static final String LOCKTOKEN_REDIS = "lockToken"; //缓存key值

    public static final String REVOKE_CASEREASON_GS = "涉嫌构成《中华人民共和国公司法》第二百一十一条所指向的“公司成立后无正当理由超过六个月未开业的，或者开业后自行停业连续六个月以上”行为";
    public static final String REVOKE_CASEREASON_GRDZQY = "涉嫌构成《中华人民共和国个人独资企业法》第三十六条所指向的“个人独资企业成立后无正当理由超过六个月未开业的，或者开业后自行停业连续六个月以上”行为";

    /**
     * 经营异常名录异议 受理通知书内容
     */
    public static final String ABN_DISSENT_AGREE_ACCEPT_CONTENT = "我局收到你单位提交的列入经营异常名录异议申请书及有关材料。经审查，决定予以受理。";
    /**
     * 经营异常名录异议 不予受理通知书内容
     */
    public static final String ABN_DISSENT_DISAGREE_ACCEPT_CONTENT = "我局收到你单位提交的列入经营异常名录异议申请书及有关材料。经审查，不符合《企业经营异常名录管理暂行办法》" +
            "《广州市商事主体经营异常名录管理规则》或《企业名称登记管理规定》的要求，决定不予受理。";
    /**
     * 经营异常名录异议 不予受理通知书内容
     */
    public static final String ABN_DISSENT_RESULT_NOTICE_CONTENT = "关于你单位提交的列入经营异常名录异议申请，经核实，";
    /**
     * Rsa公钥与秘钥
     */
    public static final String privateKey = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAN9mbyts8rxsXVC/TLDeF43PNA7AOURTvliXyAXpV8w31HiEGMnvfH4NvFhejv/9Y8iJjyJm4uxecjtJRSLtnLePAL7jKWZWRei7hbP+td4svD7hGA5QLcoK9ZGvbGBPWPNpC5T90SFl58aT8hTUYV3lWpuSKSavqzzxSpuTiQpbAgMBAAECgYEAiIY+PCipszL6WCWAhbpEZLqTEsywcqxG8DdZ2xr+N+SKqVf5GjeMOjDEwLCQ7ap594zxd1GvLkqNvuOJJ85UbcjeVWSjHoer/TXlJg4xT/7kWrmSxWjldOiayfRfIfzu64WQsWNhH2BLc+iTilTE2cO3gBjAJyO5yGiBt5ZJKlECQQDwnllq9kjkdyqXDoxFukyqXj5vH2+kEj9lJ2MYgD8dZvp15BunC/Y2IlEjouID8w3I21jDD7PoIZImcjB6LOv5AkEA7a5Pig4jGKaXAyR20CuDMLCcylKSiu2n3u5pmr6AmXSWRpXs6nnn/iir96doGDxdFUkQz3Fmor2JQkUZL/618wJAE4hHKe+kKyehRXHg4SgmYQ4Vc1/R6Dey/bscyDhg5zocysUhmYXXDr3qaEIoprlsPQnRQsRbjlRrUMOkO8a5wQJBAMvVTYlMDnU5iRC82Ng2ONAs5onsvpg+sFTTieWXspnoDmiCcyezXG3vW2uMOg1u1zVF8BC3ZBn1Ch23PJ6YhlkCQGscxzS2fQfjkXXu2n+E4UXC4wp4cnFK0UyKRfUOL60X1f3hCR+6bIbGqiJTGdYn7oC6Sub0z555QGT9vkRlgG4=";
    public static final String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfZm8rbPK8bF1Qv0yw3heNzzQOwDlEU75Yl8gF6VfMN9R4hBjJ73x+DbxYXo7//WPIiY8iZuLsXnI7SUUi7Zy3jwC+4ylmVkXou4Wz/rXeLLw+4RgOUC3KCvWRr2xgT1jzaQuU/dEhZefGk/IU1GFd5Vqbkikmr6s88Uqbk4kKWwIDAQAB";

    /**
     * 长软接口token缓存key值
     */
    public static final String CHANGRUAN_TOKEN = "changRuanToken"; //缓存key值

    /**
     * 长软接口账号
     */
    public static final String CHANGRUAN_USER = "r5Sg03";

    /**
     * 创建一个新的HashMap对象
     *
     * @param size 集合中实际要存放的元素的数量
     * @return
     */
    private static Map<String, String> newHashMap(int size) {
        return new LinkedHashMap<String, String>((int) Math.ceil(size / 0.75));
    }

    private static void initStaticWorlFlowMap() {
        // 流程节点对应意见类型，用正则表达式匹配
        WORKFLOWNODE_OPINIONTYPE_MAP.put("[a-zA-z]+Enter$", OPINION_TYPE_ENTER); //录入
        WORKFLOWNODE_OPINIONTYPE_MAP.put("^handle[a-zA-Z]+", OPINION_TYPE_APPROV); //审查
        WORKFLOWNODE_OPINIONTYPE_MAP.put("^approve[a-zA-Z]+", OPINION_TYPE_APPROVE); // 审核或核准
        WORKFLOWNODE_OPINIONTYPE_MAP.put("^print[a-zA-Z]+", OPINION_TYPE_PRINT); //打印
        WORKFLOWNODE_OPINIONTYPE_MAP.put("[a-zA-z]+Collate$", OPINION_TYPE_COLLATE); //校对
        WORKFLOWNODE_OPINIONTYPE_MAP.put("[a-zA-z]+Issue$", OPINION_TYPE_ISSUE); //发照

//        WORKFLOWNODE_OPINIONTYPE_MAP.put("^bizDept[a-zA-Z]+", OPINION_TYPE_BUSINESS); //业务部门
//        WORKFLOWNODE_OPINIONTYPE_MAP.put("^approve[a-zA-Z]+", OPINION_TYPE_APPROVE); //核审部门
//        WORKFLOWNODE_OPINIONTYPE_MAP.put("^leaderApr[a-zA-Z]+", OPINION_TYPE_LEADER); //领导审核
//        WORKFLOWNODE_OPINIONTYPE_MAP.put("^lawDept[a-zA-Z]+", OPINION_TYPE_LAW); //法规部门
//        WORKFLOWNODE_OPINIONTYPE_MAP.put("^financeDept[a-zA-Z]+", OPINION_TYPE_FINANCE); //财务部门
//        WORKFLOWNODE_OPINIONTYPE_MAP.put("^deptLeaderApr[a-zA-Z]+", OPINION_TYPE_DEPTLEADER); //部门领导审核

    }

    /**
     * 智能审批用户信息Map
     */
    public final static Map<String, String> SMART_PROCESS_USER_MAP = initSmartProcessUserMap();

    public static Map<String, String> initSmartProcessUserMap() {
        Map<String, String> map = new HashMap<>();
        map.put("440101", "xyxf_znsp_sj");
        map.put("440103", "xyxf_znsp_lw");
        map.put("440104", "xyxf_znsp_yx");
        map.put("440105", "xyxf_znsp_hz");
        map.put("440106", "xyxf_znsp_th");
        map.put("440110", "xyxf_znsp_ns");
        map.put("440111", "xyxf_znsp_by");
        map.put("440112", "xyxf_znsp_hp");
        map.put("440121", "xyxf_znsp_hd");
        map.put("440122", "xyxf_znsp_ch");
        map.put("440125", "xyxf_znsp_zc");
        map.put("440126", "xyxf_znsp_py");
        return Collections.unmodifiableMap(map);
    }

    /**
     * 初始化常量的Map集合
     */
    private static void initStaticFieldMap() {

        OPINION_TYPE_MAP.put(OPINION_TYPE_ENTER, "受理人");
        OPINION_TYPE_MAP.put(OPINION_TYPE_APPROV, "审查人");
        OPINION_TYPE_MAP.put(OPINION_TYPE_APPROVE, "核准人");
        OPINION_TYPE_MAP.put(OPINION_TYPE_PRINT, "打印人");
        OPINION_TYPE_MAP.put(OPINION_TYPE_COLLATE, "校对人");
        OPINION_TYPE_MAP.put(OPINION_TYPE_ISSUE, "发照人");

        BUSINESS_TYPE_MAP.put(BUSINESS_TYPE_NOLICENCEEDIT, "无照经营修改");
        BUSINESS_TYPE_MAP.put(BUSINESS_TYPE_NOLICENCEADD, "无照经营添加");
        BUSINESS_TYPE_MAP.put(BUSINESS_TYPE_NOLICENCEDEL, "无照经营删除");
        BUSINESS_TYPE_MAP.put(BUSTNESS_TYPE_CREDIT, "信用分类调整");
        BUSINESS_TYPE_MAP.put(BUSTNESS_TYPE_CREDITINFO_ADD, "外部信用信息增加");
        BUSINESS_TYPE_MAP.put(BUSTNESS_TYPE_CREDITINFO_UPDATA, "外部信用信息修改");
        BUSINESS_TYPE_MAP.put(BUSTNESS_TYPE_CREDITINFO_DELETE, "外部信用信息删除");

        //拍卖会备案
        BUSINESS_TYPE_MAP.put(AUCTION_TYPE_BEFORE, "拍卖前备案");
        BUSINESS_TYPE_MAP.put(AUCTION_TYPE_AFTER, "拍卖后备案");


        BUSINESS_TYPE_MAP.put(EXPTLIST_TYPE_ENTEREXCP, "列入企业异常名录");
        BUSINESS_TYPE_MAP.put(EXPTLIST_TYPE_OBJECTION, "企业异常名录异议");
        BUSINESS_TYPE_MAP.put(EXPTLIST_TYPE_REMOVE, "移出企业异常名录");

        BUSINESS_TYPE_MAP.put(SERILLEGAL_TYPE_ENTERSERILLEGAL, "列入严重违法失信名单");
        BUSINESS_TYPE_MAP.put(SERILLEGAL_TYPE_OBJECTION, "严重违法失信名单异议");
        BUSINESS_TYPE_MAP.put(SERILLEGAL_TYPE_REMOVE, "移出严重违法失信名单");
        BUSINESS_TYPE_MAP.put(SERILLEGAL_TYPE_OT_ENTER, "其他部门列入严重违法失信企业名单（黑名单）");
        BUSINESS_TYPE_MAP.put(SERILLEGAL_TYPE_OT_REMOVE, "其他部门移出严重违法失信企业名单（黑名单）");

        BUSINESS_TYPE_MAP.put(EXPTLIST_TYPE_INDIVIDUAL_TAG, "个体工商户经营异常状态标记");
        BUSINESS_TYPE_MAP.put(EXPTLIST_TYPE_INDIVIDUAL_OBJECTION, "个体工商户经营异常状态异议");
        BUSINESS_TYPE_MAP.put(EXPTLIST_TYPE_INDIVIDUAL_RESTORE, "个体工商户经营异常状态恢复");
        BUSINESS_TYPE_MAP.put(EXPTLIST_TYPE_FARMER_ADD, "列入农民专业合作社经营异常名录");
        BUSINESS_TYPE_MAP.put(EXPTLIST_TYPE_FARMER_OBJECTION, "农民专业合作社经营异常名录异议");
        BUSINESS_TYPE_MAP.put(EXPTLIST_TYPE_FARMER_REMOVE, "移除农民专业合作社经营异常名录");
        BUSINESS_TYPE_MAP.put(BUSINESS_TYPE_DELETE, "业务删除");
        BUSINESS_TYPE_MAP.put(BUSINESS_TYPE_REVOKEABN, "撤销列入经营异常");
        BUSINESS_TYPE_MAP.put(BUSINESS_TYPE_ENTERPRISE_MODIFY, "企业经营异常名录修改");
        BUSINESS_TYPE_MAP.put(BUSINESS_TYPE_INDIVIDUAL_MODIFY, "个体工商户经营异常名录修改");
        BUSINESS_TYPE_MAP.put(BUSINESS_TYPE_FARMER_MODIFY, "农民专业合作社经营异常名录修改");


        BUSINESS_STATUS_MAP.put(BUSINESS_STATUS_TOSIGN, "待签收");
        BUSINESS_STATUS_MAP.put(BUSINESS_STATUS_TRANSACT, "在办");
        BUSINESS_STATUS_MAP.put(BUSINESS_STATUS_HANGUP, "挂起");
        BUSINESS_STATUS_MAP.put(BUSINESS_STATUS_END, "结束");
        BUSINESS_STATUS_MAP.put(BUSINESS_STATUS_FORCE_END, "强制结束");

        //认缴出资方式   C：货币，P：实物，I：知识产权，D:债权、L:土地使用权、S:股权,O：其他
        CAPSHOULDTYPE_MAP.put(CAPSHOULDTYPE_MAP_MONEY, "货币");
        CAPSHOULDTYPE_MAP.put(CAPSHOULDTYPE_MAP_THING, "实物");
        CAPSHOULDTYPE_MAP.put(CAPSHOULDTYPE_MAP_KNOW, "知识产权");
        CAPSHOULDTYPE_MAP.put(CAPSHOULDTYPE_MAP_OBLIGATORY, "债权");
        CAPSHOULDTYPE_MAP.put(CAPSHOULDTYPE_MAP_USELAND, "土地使用权");
        CAPSHOULDTYPE_MAP.put(CAPSHOULDTYPE_MAP_STOCK, "股权");
        CAPSHOULDTYPE_MAP.put(CAPSHOULDTYPE_MAP_OTHER, "其他");

        //认缴出资方式   C：货币，P：实物，I：知识产权，D:债权、L:土地使用权、S:股权,O：其他
        CAPTYPE_MAP.put(CAPTYPE_MAP_MONEY, "货币");
        CAPTYPE_MAP.put(CAPTYPE_MAP_THING, "实物");
        CAPTYPE_MAP.put(CAPTYPE_MAP_KNOW, "知识产权");
        CAPTYPE_MAP.put(CAPTYPE_MAP_OBLIGATORY, "债权");
        CAPTYPE_MAP.put(CAPTYPE_MAP_USELAND, "土地使用权");
        CAPTYPE_MAP.put(CAPTYPE_MAP_STOCK, "股权");
        CAPTYPE_MAP.put(CAPTYPE_MAP_OTHER, "其他");

        //保证范围:新版：1：主债权，2：利息，3：违约金，4：损害赔偿金，5：实现债权的费用，6：其他约定）
        RAGE_MAP.put(RAGE_MAP_MAINCREDITOR, "主债权");
        RAGE_MAP.put(RAGE_MAP_INTEREST, "利息");
        RAGE_MAP.put(RAGE_MAP_PENALTY, "违约金");
        RAGE_MAP.put(RAGE_MAP_DAMAGES, "损害赔偿金");
        RAGE_MAP.put(RAGE_MAP_MAINCREDITORMONEY, "实现债权的费用");
        RAGE_MAP.put(RAGE_MAP_OTHERARRANGE, "其他约定");


        // 抵押登记的状态
        PLEDGE_STATUS_MAP.put(PLEDGE_STATUS_CANCEL, "已注销");
        PLEDGE_STATUS_MAP.put(PLEDGE_STATUS_OK, "登记成立");

        // 登记业务状态
        COL_BIZ_STATUS_MAP.put(COL_BIZ_STATUS_IDLE, "未启动业务");
        COL_BIZ_STATUS_MAP.put(COL_BIZ_STATUS_SETUP, "设立登记中");
        COL_BIZ_STATUS_MAP.put(COL_BIZ_STATUS_MODIFY, "变更登记中");
        COL_BIZ_STATUS_MAP.put(COL_BIZ_STATUS_CANCEL, "注销登记中");
        COL_BIZ_STATUS_MAP.put(COL_BIZ_STATUS_LICENSE, "证照管理中");
        COL_BIZ_STATUS_MAP.put(COL_BIZ_STATUS_DATA_MODIFY, "资料修改中");
        COL_BIZ_STATUS_MAP.put(COL_BIZ_STATUS_DATA_REPLENISH, "数据补录中");
        COL_BIZ_STATUS_MAP.put(COL_BIZ_STATUS_CONTINUE, "延续中");
        COL_BIZ_STATUS_MAP.put(COL_BIZ_STATUS_BACKOUT, "撤销中");

        COL_BIZ_STATUS_MAP.put(ANNUAL_DISSENT_BIZ, "年报公示信息异议");

        COL_BIZ_STATUS_MAP.put(PROBLEM_FEEDBACK_BIZ, "上报问题反馈");

        COL_BIZ_STATUS_MAP.put(CORRECTIONS_ABNORMAL_BIZ, "列异勘误");
        COL_BIZ_STATUS_MAP.put(CORRECTIONS_ILLEGAL_BIZ, "列严勘误");

        //批吊业务-立案理由
        REVOKE_CASEREASON_MAP.put("1", REVOKE_CASEREASON_GS);
        REVOKE_CASEREASON_MAP.put("2", REVOKE_CASEREASON_GRDZQY);

        // '1'一年未年报实地查无、'2'连续两年未年报、'3'连续5年未年报、'4'因实地查无列入经营异常名录两年以上
        REVOKE_ILLEGALTYPE_MAP.put("1", "一年未年报实地查无");
        REVOKE_ILLEGALTYPE_MAP.put("2", "连续两年未年报");
        REVOKE_ILLEGALTYPE_MAP.put("3", "连续5年未年报");
        REVOKE_ILLEGALTYPE_MAP.put("4", "因实地查无列入经营异常名录两年以上");

        // 问题核查
        PROBLEM_RESOUCE_MAP.put(PROBLEM_COMPLAIN, "投诉");
        PROBLEM_RESOUCE_MAP.put(PROBLEM_REPORT, "举报");

    }

    static {
        initStaticWorlFlowMap();
        // 初始化常量的Map集合
        initStaticFieldMap();
    }

    public static String getWorkFlowNodeAmendsOpinionOpiniontype(String s) {
        return WORKFLOWNODE_AMENDS_OPINION_OPINIONTYPE_MAP.get(s);
    }


    public static String getOpinionTypeByWorkFlowNode(String s) {
        for (Map.Entry<String, String> entry : WORKFLOWNODE_OPINIONTYPE_MAP.entrySet()) {
            if (s.matches(entry.getKey())) {
                return entry.getValue();
            }
        }
        return null;
    }

    public static final String CREDITREPAIR_ONE = "列入经营异常名录3年内且依照《经营异常名录管理办法》第八条规定被列入经营异常名录的企业更正其公示的信息后，申请移出";
    public static final String CREDITREPAIRGT_ONE = "依照《个体工商户年度报告办法》第十三条规定被标记为经营异常状态的个体工商户，向工商行政管理部门补报纸质年度报告并申请恢复正常记载状态";
    public static final String CREDITREPAIR_TWO = "列入经营异常名录3年内且依照《经营异常名录管理办法》第九条规定被列入经营异常名录的企业，提出通过登记的住所或者经营场所可以重新取得联系，申请移出";
    public static final String CREDITREPAIRGT_TWO = "工商行政管理部门在依法履职过程中通过登记的经营场所及经营者住所无法与个体工商户取得联系的，现通过登记的住所或者经营场所可以重新取得联系，申请恢复正常记载状态";
    public static final String CREDITREPAIR_THREE = "列入经营异常名录3年内且依照《经营异常名录管理办法》第九条规定被列入经营异常名录的企业，依法办理住所或者经营场所变更登记后，申请移出";
    public static final String CREDITREPAIRGT_THREE = "经查实未在登记住所从事经营活动，依据《广州市商事登记暂行办法》第二十七条拟标记经营异常状态，并向社会公示后，申请恢复正常记载状态";


    public static String getYesOrNo(String s) {
        return YES.equals(s) ? "是" : "否";
    }


    public static String getOpinionType(String s) {
        return OPINION_TYPE_MAP.get(s);
    }

    public static String getPledgeStatus(String key) {
        return PLEDGE_STATUS_MAP.get(key);
    }

    // 获得数字所对应的字符串描述
    public static String getColBizStatus(String key) {
        return COL_BIZ_STATUS_MAP.get(key);
    }

    public static String getBusinessType(String bustype) {
        return BUSINESS_TYPE_MAP.get(bustype);
    }

    public static String getIsSignOn(String isSignOn) {
        return YES.equals(isSignOn) ? "已签收" : "未签收";
    }

    public static String getIsPaid(String isPaid) {
        return YES.equals(isPaid) ? "已缴费" : "未缴费";
    }

    public static String getBusStatus(String busstatus) {
        return BUSINESS_STATUS_MAP.get(busstatus);
    }

    public static String getCapshouldtype(String capshouldtype) {
        return CAPSHOULDTYPE_MAP.get(capshouldtype);
    }

    public static String getCaptype(String captype) {
        return CAPTYPE_MAP.get(captype);
    }

    public static String getRage(String rage) {
        return RAGE_MAP.get(rage);
    }

    public static String getProblemResouceType(String type) {
        return PROBLEM_RESOUCE_MAP.get(type);
    }

}
