|
|
@@ -345,14 +345,15 @@ public class FactorMatch {
|
|
|
|
|
|
private static boolean checkBoxEqual(PtlAgreementCostRule rule, String value) {
|
|
|
if (rule.getMin() == null || value == null) return false;
|
|
|
- return 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;
|
|
|
}
|
|
|
|
|
|
private static boolean selectEqual(PtlAgreementCostRule rule, String value, PtlAgreementUndwrtRulesAttr meta) {
|
|
|
if (rule.getMin() == null || value == null) return false;
|
|
|
if ("LicenseArea".equals(meta.getAttrCode()) || "LicenseNo".equals(meta.getAttrCode())) return inputTextEqual(rule, value);
|
|
|
if ("VehicleAge".equals(meta.getAttrCode())) return inputNumberEqual(rule, value);
|
|
|
- return rule.getMin().contains(value);
|
|
|
+ return "6".equals(rule.getOperator()) ? rule.getMin().contains(value) : !rule.getMin().contains(value);
|
|
|
}
|
|
|
|
|
|
private static boolean radioEqual(PtlAgreementCostRule rule, String value) {
|
|
|
@@ -389,12 +390,12 @@ public class FactorMatch {
|
|
|
String[] split = rule.getMin().split(",");
|
|
|
List<String> equalsMap = Arrays.asList("CharacterBasedRating", "JqCharacterBasedRating", "SyCharacterBasedRating");
|
|
|
if (equalsMap.contains(rule.getAttrCode())) {
|
|
|
- return Arrays.stream(split).anyMatch(value::equals);
|
|
|
+ return "1".equals(rule.getOperator()) ? Arrays.stream(split).anyMatch(value::equals) : Arrays.stream(split).noneMatch(value::equals);
|
|
|
}
|
|
|
boolean contains = Arrays.stream(split).anyMatch(value::contains);
|
|
|
boolean notOp = ("BrandandModel".equals(rule.getAttrCode()) || "CarOwnerName".equals(rule.getAttrCode())
|
|
|
|| "CarOwnersAddress".equals(rule.getAttrCode()) || "ApplicantAddress".equals(rule.getAttrCode())
|
|
|
- || "InsuredAddress".equals(rule.getAttrCode())) && "2".equals(rule.getOperator());
|
|
|
+ || "InsuredAddress".equals(rule.getAttrCode())) && "6".equals(rule.getOperator());
|
|
|
return notOp ? !contains : contains;
|
|
|
}
|
|
|
|