|
@@ -153,8 +153,13 @@ public class InsuranceKindCodeMapping {
|
|
|
private static final Map<String, String> KIND_NAME_MAP = new HashMap<>();
|
|
private static final Map<String, String> KIND_NAME_MAP = new HashMap<>();
|
|
|
private static final Map<String, String> KIND_ENERGY_NAME_MAP = new HashMap<>();
|
|
private static final Map<String, String> KIND_ENERGY_NAME_MAP = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
+ /** 反向映射:人保险种代码 → 掌柜鼎平台险种代码 */
|
|
|
|
|
+ private static final Map<String, String> REVERSE_KIND_CODE_MAP = new HashMap<>();
|
|
|
|
|
+ /** 人保险种代码 → 险种名称 */
|
|
|
|
|
+ private static final Map<String, String> RB_CODE_NAME_MAP = new HashMap<>();
|
|
|
|
|
+
|
|
|
static {
|
|
static {
|
|
|
- // 初始化险种代码映射
|
|
|
|
|
|
|
+ // 初始化险种代码映射(平台 → 人保)
|
|
|
KIND_CODE_MAP.put(KIND_A, CODE_A);
|
|
KIND_CODE_MAP.put(KIND_A, CODE_A);
|
|
|
KIND_CODE_MAP.put(KIND_B, CODE_B);
|
|
KIND_CODE_MAP.put(KIND_B, CODE_B);
|
|
|
KIND_CODE_MAP.put(KIND_D3, CODE_D3);
|
|
KIND_CODE_MAP.put(KIND_D3, CODE_D3);
|
|
@@ -169,7 +174,22 @@ public class InsuranceKindCodeMapping {
|
|
|
KIND_CODE_MAP.put(KIND_TY3, CODE_TY3);
|
|
KIND_CODE_MAP.put(KIND_TY3, CODE_TY3);
|
|
|
KIND_CODE_MAP.put(KIND_TY4, CODE_TY4);
|
|
KIND_CODE_MAP.put(KIND_TY4, CODE_TY4);
|
|
|
|
|
|
|
|
- // 初始化险种名称映射
|
|
|
|
|
|
|
+ // 初始化反向映射(人保 → 平台)
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_A, KIND_A);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_B, KIND_B);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_D3, KIND_D3);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_D4, KIND_D4);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_L, KIND_L);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_BD, KIND_BD);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_YBW1, KIND_YBW1);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_YBW3, KIND_YBW3);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_YBW2, KIND_YBW2);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_TY1, KIND_TY1);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_TY2, KIND_TY2);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_TY3, KIND_TY3);
|
|
|
|
|
+ REVERSE_KIND_CODE_MAP.put(CODE_TY4, KIND_TY4);
|
|
|
|
|
+
|
|
|
|
|
+ // 初始化险种名称映射(平台 → 名称)
|
|
|
KIND_NAME_MAP.put(KIND_A, NAME_A);
|
|
KIND_NAME_MAP.put(KIND_A, NAME_A);
|
|
|
KIND_NAME_MAP.put(KIND_B, NAME_B);
|
|
KIND_NAME_MAP.put(KIND_B, NAME_B);
|
|
|
KIND_NAME_MAP.put(KIND_D3, NAME_D3);
|
|
KIND_NAME_MAP.put(KIND_D3, NAME_D3);
|
|
@@ -184,6 +204,21 @@ public class InsuranceKindCodeMapping {
|
|
|
KIND_NAME_MAP.put(KIND_TY3, NAME_TY3);
|
|
KIND_NAME_MAP.put(KIND_TY3, NAME_TY3);
|
|
|
KIND_NAME_MAP.put(KIND_TY4, NAME_TY4);
|
|
KIND_NAME_MAP.put(KIND_TY4, NAME_TY4);
|
|
|
|
|
|
|
|
|
|
+ // 初始化人保编码 → 名称映射
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_A, NAME_A);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_B, NAME_B);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_D3, NAME_D3);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_D4, NAME_D4);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_L, NAME_L);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_BD, NAME_BD);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_YBW1, NAME_YBW1);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_YBW3, NAME_YBW3);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_YBW2, NAME_YBW2);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_TY1, NAME_TY1);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_TY2, NAME_TY2);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_TY3, NAME_TY3);
|
|
|
|
|
+ RB_CODE_NAME_MAP.put(CODE_TY4, NAME_TY4);
|
|
|
|
|
+
|
|
|
// 初始化新能源险种名称映射
|
|
// 初始化新能源险种名称映射
|
|
|
KIND_ENERGY_NAME_MAP.put(KIND_A, ENERGY_NAME_A);
|
|
KIND_ENERGY_NAME_MAP.put(KIND_A, ENERGY_NAME_A);
|
|
|
KIND_ENERGY_NAME_MAP.put(KIND_B, ENERGY_NAME_B);
|
|
KIND_ENERGY_NAME_MAP.put(KIND_B, ENERGY_NAME_B);
|
|
@@ -202,6 +237,26 @@ public class InsuranceKindCodeMapping {
|
|
|
return KIND_CODE_MAP.getOrDefault(kindCode, kindCode);
|
|
return KIND_CODE_MAP.getOrDefault(kindCode, kindCode);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据人保险种代码获取掌柜鼎平台险种代码(反向映射)
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param rbKindCode 人保险种代码(如"051050")
|
|
|
|
|
+ * @return 平台险种代码(如"A"),未匹配则返回原值
|
|
|
|
|
+ */
|
|
|
|
|
+ public static String getPlatformKindCode(String rbKindCode) {
|
|
|
|
|
+ return REVERSE_KIND_CODE_MAP.getOrDefault(rbKindCode, rbKindCode);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据人保险种代码获取险种名称
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param rbKindCode 人保险种代码(如"051050")
|
|
|
|
|
+ * @return 险种名称(如"车损险"),未匹配则返回原值
|
|
|
|
|
+ */
|
|
|
|
|
+ public static String getKindNameByRbCode(String rbKindCode) {
|
|
|
|
|
+ return RB_CODE_NAME_MAP.getOrDefault(rbKindCode, rbKindCode);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 根据掌柜险种代码获取险种名称
|
|
* 根据掌柜险种代码获取险种名称
|
|
|
*/
|
|
*/
|