|
|
@@ -328,7 +328,22 @@ public class FactorMatch {
|
|
|
// 字典还原依据:参与比较的这条因子元数据 ptlAgreementUndwrtRulesAttr 自身挂的 dictId,
|
|
|
// 再到 undwrtRulesDictList 中按 name 找 code(如 "家庭自用" -> "04")。
|
|
|
Integer dictId = ptlAgreementUndwrtRulesAttr.getDictId();
|
|
|
-
|
|
|
+ // ===== 新增:把传入的 name 还原成 code 再参与比较 =====
|
|
|
+ // 只对依赖字典的 select/radio/checkbox 做还原;input/inputNumber/date 等保留原值
|
|
|
+ if (CollUtil.isNotEmpty(undwrtRulesDictList)
|
|
|
+ && dictId != null
|
|
|
+ && !ptlAgreementCostRule.getAttrCode().equals("LicenseArea") // 车牌归属地无字典,纯文本
|
|
|
+ && !ptlAgreementCostRule.getAttrCode().equals("LicenseNo")) {
|
|
|
+ String normalized = value;
|
|
|
+ for (PtlAgreementUndwrtRulesDictLabal label : undwrtRulesDictList) {
|
|
|
+ if (Objects.equals(label.getDictId(), dictId) && label.getName().equals(value)) {
|
|
|
+ normalized = label.getCode();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ value = normalized;
|
|
|
+ }
|
|
|
+ // ====================================================
|
|
|
boolean result = false;
|
|
|
if (ptlAgreementUndwrtRulesAttr.getAttrType().equals("checkbox")) {
|
|
|
result = checkBoxEqual(ptlAgreementCostRule, value, dictId, undwrtRulesDictList);
|
|
|
@@ -380,9 +395,6 @@ public class FactorMatch {
|
|
|
String[] split = ptlAgreementCostRule.getMin().split(",");
|
|
|
for (String sp : split) {
|
|
|
String spTrim = sp.trim();
|
|
|
- if (spTrim.equals(value.trim())) {
|
|
|
- return true;
|
|
|
- }
|
|
|
if (dictId == null && CollUtil.isNotEmpty(undwrtRulesDictList)) {
|
|
|
for (PtlAgreementUndwrtRulesDictLabal label : undwrtRulesDictList) {
|
|
|
if (label.getCode().equals(spTrim) && value.trim().equals(label.getName())) {
|
|
|
@@ -390,6 +402,9 @@ public class FactorMatch {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (spTrim.equals(value.trim())) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
@@ -508,9 +523,6 @@ public class FactorMatch {
|
|
|
}
|
|
|
} else {
|
|
|
// dictId 为空时(无字典):把 min 里的 code 翻成 name,再用实际 value(汉字)与 name 比较
|
|
|
- if (ptlAgreementCostRule.getMin().contains(value)) {
|
|
|
- return true;
|
|
|
- }
|
|
|
if (dictId == null && CollUtil.isNotEmpty(undwrtRulesDictList)) {
|
|
|
for (PtlAgreementUndwrtRulesDictLabal label : undwrtRulesDictList) {
|
|
|
if (label.getCode().equals(ptlAgreementCostRule.getMin()) && value.equals(label.getName())) {
|
|
|
@@ -518,6 +530,9 @@ public class FactorMatch {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (ptlAgreementCostRule.getMin().contains(value)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
return false;
|
|
|
}
|