|
@@ -346,14 +346,14 @@ public class FactorMatch {
|
|
|
private static boolean checkBoxEqual(PtlAgreementCostRule rule, String value) {
|
|
private static boolean checkBoxEqual(PtlAgreementCostRule rule, String value) {
|
|
|
if (rule.getMin() == null || value == null) return false;
|
|
if (rule.getMin() == null || value == null) return false;
|
|
|
boolean contains = Arrays.stream(rule.getMin().split(",")).anyMatch(o -> o.trim().equals(value.trim()));
|
|
boolean contains = Arrays.stream(rule.getMin().split(",")).anyMatch(o -> o.trim().equals(value.trim()));
|
|
|
- return "6".equals(rule.getOperator()) ? !contains : contains;
|
|
|
|
|
|
|
+ return "1".equals(rule.getOperator()) ? contains : !contains;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private static boolean selectEqual(PtlAgreementCostRule rule, String value, PtlAgreementUndwrtRulesAttr meta) {
|
|
private static boolean selectEqual(PtlAgreementCostRule rule, String value, PtlAgreementUndwrtRulesAttr meta) {
|
|
|
if (rule.getMin() == null || value == null) return false;
|
|
if (rule.getMin() == null || value == null) return false;
|
|
|
if ("LicenseArea".equals(meta.getAttrCode()) || "LicenseNo".equals(meta.getAttrCode())) return inputTextEqual(rule, value);
|
|
if ("LicenseArea".equals(meta.getAttrCode()) || "LicenseNo".equals(meta.getAttrCode())) return inputTextEqual(rule, value);
|
|
|
if ("VehicleAge".equals(meta.getAttrCode())) return inputNumberEqual(rule, value);
|
|
if ("VehicleAge".equals(meta.getAttrCode())) return inputNumberEqual(rule, value);
|
|
|
- return "6".equals(rule.getOperator()) ? rule.getMin().contains(value) : !rule.getMin().contains(value);
|
|
|
|
|
|
|
+ return "1".equals(rule.getOperator()) ? rule.getMin().contains(value) : !rule.getMin().contains(value);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private static boolean radioEqual(PtlAgreementCostRule rule, String value) {
|
|
private static boolean radioEqual(PtlAgreementCostRule rule, String value) {
|
|
@@ -363,7 +363,7 @@ public class FactorMatch {
|
|
|
// min 为 "1" 表示新能源,否则表示非新能源
|
|
// min 为 "1" 表示新能源,否则表示非新能源
|
|
|
// operator "1"(等于):新能源状态与规则一致即匹配;operator "6"(不包含):相反
|
|
// operator "1"(等于):新能源状态与规则一致即匹配;operator "6"(不包含):相反
|
|
|
boolean matched = EnergyTypeCode.isNewEnergy(value) == "1".equals(min);
|
|
boolean matched = EnergyTypeCode.isNewEnergy(value) == "1".equals(min);
|
|
|
- return "6".equals(rule.getOperator()) ? !matched : matched;
|
|
|
|
|
|
|
+ return "1".equals(rule.getOperator()) ? matched : !matched;
|
|
|
}
|
|
}
|
|
|
return "1".equals(rule.getOperator()) ? min.contains(value) : !min.contains(value);
|
|
return "1".equals(rule.getOperator()) ? min.contains(value) : !min.contains(value);
|
|
|
}
|
|
}
|
|
@@ -395,7 +395,7 @@ public class FactorMatch {
|
|
|
boolean contains = Arrays.stream(split).anyMatch(value::contains);
|
|
boolean contains = Arrays.stream(split).anyMatch(value::contains);
|
|
|
boolean notOp = ("BrandandModel".equals(rule.getAttrCode()) || "CarOwnerName".equals(rule.getAttrCode())
|
|
boolean notOp = ("BrandandModel".equals(rule.getAttrCode()) || "CarOwnerName".equals(rule.getAttrCode())
|
|
|
|| "CarOwnersAddress".equals(rule.getAttrCode()) || "ApplicantAddress".equals(rule.getAttrCode())
|
|
|| "CarOwnersAddress".equals(rule.getAttrCode()) || "ApplicantAddress".equals(rule.getAttrCode())
|
|
|
- || "InsuredAddress".equals(rule.getAttrCode())) && "6".equals(rule.getOperator());
|
|
|
|
|
|
|
+ || "InsuredAddress".equals(rule.getAttrCode())) && ("6".equals(rule.getOperator()) || "2".equals(rule.getOperator()));
|
|
|
return notOp ? !contains : contains;
|
|
return notOp ? !contains : contains;
|
|
|
}
|
|
}
|
|
|
|
|
|