Browse Source

【政策找人】修复年龄->出生日期重复转换问题

master
wangxianzhang 3 years ago
parent
commit
8d27413c88
  1. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/IcUserController.java
  2. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/ResiServiceImpl.java

6
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/IcUserController.java

@ -17,6 +17,7 @@ import com.epmet.dataaggre.dto.epmetuser.result.IcUserCategoryResultDTO;
import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO;
import com.epmet.dataaggre.service.ResiService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import com.epmet.dataaggre.service.impl.ResiServiceImpl;
import com.epmet.feign.EpmetHeartOpenFeignClient;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@ -41,7 +42,7 @@ public class IcUserController implements ResultDataResolver {
private EpmetUserService epmetUserService;
@Autowired
private ResiService icResiService;
private ResiServiceImpl icResiService;
@Autowired
private EpmetHeartOpenFeignClient heartOpenFeignClient;
@ -105,6 +106,9 @@ public class IcUserController implements ResultDataResolver {
return new Result().ok(new PageData<>(new ArrayList<>(), 0));
}
// 对特殊规则进行转换。
icResiService.specificRuleConvert(resiRule);
PageData<ResiByPolicyInfoResultDTO> page = icResiService.listByPolicyRules(orgId, orgType, neighborHoodId, buildingId, unitId,
houseId, idCard, name, pageNo, pageSize, resiRule, houseRule, statRule);
return new Result<PageData<ResiByPolicyInfoResultDTO>>().ok(page);

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

@ -75,9 +75,6 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver {
String client = EpmetRequestHolder.getLoginUserClient();
String customerId = EpmetRequestHolder.getLoginUserCustomerId();
// 对特殊规则进行转换。
specificRuleConvert(resiRule);
// 查询当前组织及下级id路径
LoginUserDetailsResultDTO userDetail = getResultDataOrThrowsException(userOpenFeignClient.getLoginUserDetails(new LoginUserDetailsFormDTO(app, client, userId)),
ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), null, null);
@ -148,7 +145,7 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver {
* 为特定的规则进行转换
* @param resiRule
*/
private void specificRuleConvert(List<ResisByPolicyRulesFormDTO.ResiRule> resiRule) {
public void specificRuleConvert(List<ResisByPolicyRulesFormDTO.ResiRule> resiRule) {
// 使用年龄计算出生日期
if (resiRule != null) {
resiRule.stream().forEach((r) -> {
@ -267,6 +264,9 @@ public class ResiServiceImpl implements ResiService, ResultDataResolver {
Integer pageSize = 500;
Integer pageNo = 1;
// 对特殊规则进行转换。
specificRuleConvert(resiRule);
try {
do {
PageData<ResiByPolicyInfoResultDTO> resis = this.listByPolicyRules(orgId, orgType, neighborHoodId, buildingId, unitId,

Loading…
Cancel
Save