Browse Source

【政策】修复

master
wangxianzhang 3 years ago
parent
commit
09b3ee4ca0
  1. 16
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java

16
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java

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

Loading…
Cancel
Save