|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.epmet.dataaggre.service.impl; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
|
|
|
import com.epmet.dataaggre.dto.epmetuser.form.ResisByPolicyRulesFormDTO; |
|
|
|
import com.epmet.dataaggre.dto.epmetuser.result.ResiByPolicyInfoResultDTO; |
|
|
@ -10,6 +11,7 @@ import com.epmet.dataaggre.service.ResiService; |
|
|
|
import com.epmet.dataaggre.service.epmetuser.EpmetUserService; |
|
|
|
import com.epmet.dataaggre.service.govorg.GovOrgService; |
|
|
|
import com.epmet.dto.IcNeighborHoodDTO; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -28,7 +30,7 @@ public class ResiServiceImpl implements ResiService { |
|
|
|
private GovOrgService govOrgService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<ResiByPolicyInfoResultDTO> listByPolicyRules(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId, |
|
|
|
public PageData<ResiByPolicyInfoResultDTO> listByPolicyRules(String orgId, String orgType, String neighborHoodId, String buildingId, String unitId, |
|
|
|
String houseId, String idCard, String name, Integer pageNo, Integer pageSize, |
|
|
|
List<ResisByPolicyRulesFormDTO.ResiRule> resiRule, |
|
|
|
List<ResisByPolicyRulesFormDTO.HouseRule> houseRule, |
|
|
@ -40,8 +42,9 @@ public class ResiServiceImpl implements ResiService { |
|
|
|
|
|
|
|
// 1.用户没配置house和stat规则,直接按照居民规则查询
|
|
|
|
if (CollectionUtils.isEmpty(houseRule) && CollectionUtils.isEmpty(statRule)) { |
|
|
|
return epmetUserService.listByPolicyRules(customerId, orgId, orgType, neighborHoodId, buildingId, unitId, |
|
|
|
List<ResiByPolicyInfoResultDTO> resis = epmetUserService.listByPolicyRules(customerId, orgId, orgType, neighborHoodId, buildingId, unitId, |
|
|
|
houseId, idCard, name, pageNo, pageSize, resiRule, null); |
|
|
|
return new PageData<>(resis, new PageInfo(resis).getTotal()); |
|
|
|
} |
|
|
|
|
|
|
|
// 2.用户至少配置了house和stat规则的一个,那么就先查询房屋出来,然后根据房屋去找居民
|
|
|
@ -80,7 +83,8 @@ public class ResiServiceImpl implements ResiService { |
|
|
|
|
|
|
|
// 补充额外信息
|
|
|
|
fillResisExtraInfoForPolicy(resultResis); |
|
|
|
return resultResis; |
|
|
|
// todo
|
|
|
|
return new PageData<>(resultResis, 100); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|