|
|
@@ -28,17 +28,17 @@ public class FactorMatch {
|
|
|
private static final Map<String, String> plateFourCodeMap = new HashMap<>();
|
|
|
|
|
|
static {
|
|
|
- plateFourCodeMap.put("晋D", "1404");
|
|
|
- plateFourCodeMap.put("晋M", "1408");
|
|
|
- plateFourCodeMap.put("晋J", "1411");
|
|
|
- plateFourCodeMap.put("晋C", "1403");
|
|
|
- plateFourCodeMap.put("晋K", "1407");
|
|
|
- plateFourCodeMap.put("晋L", "1410");
|
|
|
- plateFourCodeMap.put("晋B", "1402");
|
|
|
- plateFourCodeMap.put("晋F", "1406");
|
|
|
- plateFourCodeMap.put("晋A", "1401");
|
|
|
- plateFourCodeMap.put("晋E", "1405");
|
|
|
- plateFourCodeMap.put("晋H", "1409");
|
|
|
+ plateFourCodeMap.put("1404", "晋D");
|
|
|
+ plateFourCodeMap.put("1408", "晋M");
|
|
|
+ plateFourCodeMap.put("1411", "晋J");
|
|
|
+ plateFourCodeMap.put("1403", "晋C");
|
|
|
+ plateFourCodeMap.put("1407", "晋K");
|
|
|
+ plateFourCodeMap.put("1410", "晋L");
|
|
|
+ plateFourCodeMap.put("1402", "晋B");
|
|
|
+ plateFourCodeMap.put("1406", "晋F");
|
|
|
+ plateFourCodeMap.put("1401", "晋A");
|
|
|
+ plateFourCodeMap.put("1405", "晋E");
|
|
|
+ plateFourCodeMap.put("1409", "晋H");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -125,7 +125,6 @@ public class FactorMatch {
|
|
|
if (CollUtil.isNotEmpty(undwrtRulesDictList) && ptlAgreementProductCostsAttrLink != null) {
|
|
|
String minStr = ptlAgreementProductCostsAttrLink.getMin();
|
|
|
if (minStr != null && !minStr.isEmpty()) {
|
|
|
- // 如果还是空的(rule 里 code 在 dict 都不存在),fallback 用 attrMeta 的 dictId 再查一遍
|
|
|
if (codeToNameMap.isEmpty() && ptlAgreementUndwrtRulesAttr != null && ptlAgreementUndwrtRulesAttr.getDictId() != null) {
|
|
|
Integer dictId = ptlAgreementUndwrtRulesAttr.getDictId();
|
|
|
for (PtlAgreementUndwrtRulesDictLabal label : undwrtRulesDictList) {
|
|
|
@@ -138,13 +137,24 @@ public class FactorMatch {
|
|
|
}
|
|
|
|
|
|
if (ptlAgreementProductCostsAttrLink.getMin() != null) {
|
|
|
- logs.append("检验的值:").append(displayRuleValue(ptlAgreementProductCostsAttrLink.getMin(), codeToNameMap)).append("\n");
|
|
|
+ String min = ptlAgreementProductCostsAttrLink.getMin();
|
|
|
+ StringBuilder str = new StringBuilder();
|
|
|
+ for (String s : min.split(",")) {
|
|
|
+ str.append(plateFourCodeMap.getOrDefault(s, s)).append(",");
|
|
|
+ }
|
|
|
+ logs.append("检验的值:").append(str.toString()).append("\n");
|
|
|
+
|
|
|
} else {
|
|
|
- logs.append("检验的值:").append(displayRuleValue(ptlAgreementProductCostsAttrLink.getMax(), codeToNameMap)).append("\n");
|
|
|
+ String max = ptlAgreementProductCostsAttrLink.getMax();
|
|
|
+ StringBuilder str = new StringBuilder();
|
|
|
+ for (String s : max.split(",")) {
|
|
|
+ str.append(plateFourCodeMap.getOrDefault(s, s)).append(",");
|
|
|
+ }
|
|
|
+ logs.append("检验的值:").append(str.toString()).append("\n");
|
|
|
}
|
|
|
|
|
|
- String val = codeToNameMap.getOrDefault(ruleAttrMappingVo.getValue(), StrUtil.EMPTY);
|
|
|
- logs.append("传入的值:" + displayRuleValue((StrUtil.isNotBlank(val) ? val : ruleAttrMappingVo.getValue()), codeToNameMap) + "\n");
|
|
|
+ String val = plateFourCodeMap.getOrDefault(ruleAttrMappingVo.getValue(), ruleAttrMappingVo.getValue());
|
|
|
+ logs.append("传入的值:" + val + "\n");
|
|
|
|
|
|
if (CollUtil.isNotEmpty(collect)) {
|
|
|
logs.append("规则匹配失败:" + collect.get(0).getAttrName() + "\n");
|
|
|
@@ -266,16 +276,24 @@ public class FactorMatch {
|
|
|
}
|
|
|
}
|
|
|
if (ptlAgreementProductCostsAttrLink.getMin() != null) {
|
|
|
- String min = codeToNameMap.getOrDefault(ptlAgreementProductCostsAttrLink.getMin(), StrUtil.EMPTY);
|
|
|
- logs.append("检验的值:").append(displayRuleValue(ptlAgreementProductCostsAttrLink.getMin(), codeToNameMap)).append("\n");
|
|
|
+ String min = ptlAgreementProductCostsAttrLink.getMin();
|
|
|
+ StringBuilder str = new StringBuilder();
|
|
|
+ for (String s : min.split(",")) {
|
|
|
+ str.append(plateFourCodeMap.getOrDefault(s, s)).append(",");
|
|
|
+ }
|
|
|
+ logs.append("检验的值:").append(str.toString()).append("\n");
|
|
|
|
|
|
} else {
|
|
|
- String max = codeToNameMap.getOrDefault(ptlAgreementProductCostsAttrLink.getMax(), StrUtil.EMPTY);
|
|
|
- logs.append("检验的值:" + displayRuleValue((StrUtil.isNotBlank(max) ? max : ptlAgreementProductCostsAttrLink.getMax()), codeToNameMap) + "\n");
|
|
|
+ String max = ptlAgreementProductCostsAttrLink.getMax();
|
|
|
+ StringBuilder str = new StringBuilder();
|
|
|
+ for (String s : max.split(",")) {
|
|
|
+ str.append(plateFourCodeMap.getOrDefault(s, s)).append(",");
|
|
|
+ }
|
|
|
+ logs.append("检验的值:").append(str.toString()).append("\n");
|
|
|
}
|
|
|
|
|
|
- String val = codeToNameMap.getOrDefault(ruleAttrMappingVo.getValue(), StrUtil.EMPTY);
|
|
|
- logs.append("传入的值:" + displayRuleValue((StrUtil.isNotBlank(val) ? val : ruleAttrMappingVo.getValue()), codeToNameMap) + "\n");
|
|
|
+ String val = plateFourCodeMap.getOrDefault(ruleAttrMappingVo.getValue(), ruleAttrMappingVo.getValue());
|
|
|
+ logs.append("传入的值:" + val + "\n");
|
|
|
|
|
|
if (CollUtil.isNotEmpty(collect)) {
|
|
|
logs.append("<span style=\"color:red;\">规则匹配失败:" + collect.get(0).getAttrName() + "</span>\n");
|