|
|
@ -150,13 +150,15 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver { |
|
|
|
*/ |
|
|
|
private void specificRuleConvert(List<ResisByPolicyRulesFormDTO.ResiRule> resiRule) { |
|
|
|
// 使用年龄计算出生日期
|
|
|
|
resiRule.stream().forEach((r) -> { |
|
|
|
if ("BIRTHDAY".equals(r.getColKey())) { |
|
|
|
LocalDate birthday = LocalDate.now().minus(Long.valueOf(r.getColVal()), ChronoUnit.YEARS); |
|
|
|
r.setQueryType(revertQueryType(r.getQueryType())); |
|
|
|
r.setColVal(birthday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
|
|
|
} |
|
|
|
}); |
|
|
|
if (resiRule != null) { |
|
|
|
resiRule.stream().forEach((r) -> { |
|
|
|
if ("BIRTHDAY".equals(r.getColKey())) { |
|
|
|
LocalDate birthday = LocalDate.now().minus(Long.valueOf(r.getColVal()), ChronoUnit.YEARS); |
|
|
|
r.setQueryType(revertQueryType(r.getQueryType())); |
|
|
|
r.setColVal(birthday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|