添加用户的组织转换和企业的组织机构转换

This commit is contained in:
sh
2026-01-30 17:14:49 +08:00
parent 3a02e2972a
commit 10e81e9236
3 changed files with 51 additions and 0 deletions

View File

@@ -87,7 +87,14 @@ public class StringUtil {
*/
public static final String SFZ_VALID_REGEX="^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$";
/**
* 学历转换
*/
public static final Map<String, String> EDU_DESC_TO_CODE_MAP;
/**
* 组织机构转换
*/
public static final Map<String, String> REGION_CODE_CODE_MAP;
static {
Map<String, String> tempMap = new HashMap<>();
@@ -99,6 +106,35 @@ public class StringUtil {
EDU_DESC_TO_CODE_MAP = Collections.unmodifiableMap(tempMap);
}
static {
Map<String, String> tempMap = new HashMap<>();
tempMap.put("0", "653101000000");
tempMap.put("1", "653121000000");
tempMap.put("2", "653122000000");
tempMap.put("3", "653123000000");
tempMap.put("4", "653128000000");
tempMap.put("5", "653129000000");
tempMap.put("6", "653125000000");
tempMap.put("7", "653124000000");
tempMap.put("8", "653126000000");
tempMap.put("9", "653127000000");
tempMap.put("10", "653130000000");
tempMap.put("11", "653131000000");
REGION_CODE_CODE_MAP = Collections.unmodifiableMap(tempMap);
}
/**
* areaToRegion
* @param area
* @return
*/
public static String getAreaToRegionCode(String area) {
if (area == null || area.trim().isEmpty()) {
return null;
}
return REGION_CODE_CODE_MAP.get(area.trim());
}
/**
* 获取学历
* @param eduDesc