BAOLH
2025-04-01 472612e136812f11ed6f5c28fa4a3a8d694cba19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/*
 *  Copyright 2019-2020 Zheng Jie
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package me.zhengjie.utils;
 
/**
 * 常用静态常量
 *
 * @author Zheng Jie
 * @date 2018-12-26
 */
public class ElAdminConstant {
 
    /**
     * 用于IP定位转换
     */
    public static final String REGION = "内网IP|内网IP";
    /**
     * win 系统
     */
    public static final String WIN = "win";
 
    /**
     * mac 系统
     */
    public static final String MAC = "mac";
 
    /**
     * 常用接口
     */
    public static class Url {
        // IP归属地查询
        public static final String IP_URL = "http://whois.pconline.com.cn/ipJson.jsp?ip=%s&json=true";
    }
 
    /**
     * 常用枚举
     */
    public static class Enum {
        // 公司前缀
        public enum CompanySuffix {
            COMPANY_1("以恒(大连)企业管理有限公司", "YHQG"),
            COMPANY_2("大连以恒科技有限公司", "YHKJ"),
            COMPANY_3("恒春科技(大连)有限公司", "HCKJ"),
            COMPANY_4("恒臻科技(大连)有限责任公司", "HZKJ"),
            COMPANY_5("兴安盟恒新知识产权服务有限公司", "XAHX"),
            COMPANY_6("兴安盟以恒科技有限公司", "XAYH"),
            COMPANY_7("兴安盟准诺信息咨询有限公司", "XAZN"),
            COMPANY_8("以恒数智医疗科技(大连)有限公司", "YHSZ"),
            COMPANY_9("以恒咨询(大连)有限责任公司", "YHZX"),
            COMPANY_10("博达创新(北京)咨询有限责任公司", "BDZX"),
            COMPANY_11("内蒙古逐兔咨询有限公司", "NMZT"),
            COMPANY_12("云顶咨询(阜新)有限责任公司", "YDZX"),
            COMPANY_13("泓天建设有限公司内蒙古建筑分公司", "HTJS");
 
            private final String companyName;
            private final String code;
 
            CompanySuffix(String companyName, String code) {
                this.companyName = companyName;
                this.code = code;
            }
 
            public static CompanySuffix findByCompanyName(String name) {
                for (CompanySuffix value : CompanySuffix.values()) {
                    if (value.getCompanyName().equals(name)) {
                        return value;
                    }
                }
                return null;
            }
 
            public static CompanySuffix findByCode(String companyCode) {
                for (CompanySuffix value : CompanySuffix.values()) {
                    if (value.getCode().equals(companyCode)) {
                        return value;
                    }
                }
                return null;
            }
 
            public String getCompanyName() {
                return companyName;
            }
            public String getCode() {
                return code;
            }
        }
 
        // 合同类型字典
        public enum ContractTypeDict {
            DICT_1("contract_type", "contract_technology",  "technology_second_type", "科技", "project_distinguish_product"),
            DICT_2("contract_type", "contract_consultation", "consultation_second_type", "咨询", "project_distinguish_performance"),
            DICT_3("contract_type", "contract_weak_current", "weak_current_second_type", "弱电", "project_distinguish_project"),
            DICT_4("contract_type", "contract_ip", "ip_second_type", "知识产权", "5");
 
            private final String dictName;
            private final String dictValue;
            private final String secondDictName;
            private final String importValue;
            private final String goalSetting;
 
            ContractTypeDict(String dictName, String dictValue, String secondDictName, String importValue, String goalSetting) {
                this.dictName = dictName;
                this.dictValue = dictValue;
                this.secondDictName = secondDictName;
                this.importValue = importValue;
                this.goalSetting = goalSetting;
            }
 
            public static ContractTypeDict findByDictValue(String dictValue) {
                for (ContractTypeDict value : ContractTypeDict.values()) {
                    if (value.getDictValue().equals(dictValue)) {
                        return value;
                    }
                }
                return null;
            }
 
            public static ContractTypeDict findByImportValue(String importValue) {
                for (ContractTypeDict value : ContractTypeDict.values()) {
                    if (value.getImportValue().equals(importValue)) {
                        return value;
                    }
                }
                return null;
            }
 
            public static ContractTypeDict findByGoalSetting(String goalSetting) {
                for (ContractTypeDict value : ContractTypeDict.values()) {
                    if (value.getGoalSetting().equals(goalSetting)) {
                        return value;
                    }
                }
                return null;
            }
 
            public String getDictName() {
                return dictName;
            }
            public String getDictValue() {
                return dictValue;
            }
            public String getSecondDictName() {
                return secondDictName;
            }
            public String getImportValue() {
                return importValue;
            }
            public String getGoalSetting() {
                return goalSetting;
            }
        }
    }
}