Browse Source

修改部分

master
HAHA 3 years ago
parent
commit
06c5265351
  1. 9
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java
  2. 8
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java

9
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java

@ -7,10 +7,13 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.OrgLevelEnum;
import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.*;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.result.CustomerStaffGridResultDTO;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.opendata.dao.CaLoudongDao;
import com.epmet.opendata.dto.ca.CaLoudongDTO;
@ -115,11 +118,11 @@ public class CaLoudongServiceImpl extends BaseServiceImpl<CaLoudongDao, CaLoudon
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getUserId());
String agencyId = staffInfo.getAgencyId();
// 根据组织id获取gridId网格id
Result<List<CustomerGridDTO>> gridIListByAgency = govOrgOpenFeignClient.getGridIListByAgency(agencyId);
Result<List<CustomerStaffGridResultDTO>> staffGridList = govOrgOpenFeignClient.getStaffGridList(dto.getCustomerId(), agencyId, OrgTypeEnum.AGENCY.getCode());
List<String> gridList = new ArrayList<>();
gridList.add(agencyId);
gridIListByAgency.getData().forEach(item -> {
gridList.add(item.getId());
staffGridList.getData().forEach(item -> {
gridList.add(item.getGridId());
});
PageHelper.startPage(dto.getPage(), dto.getLimit());

8
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java

@ -9,6 +9,7 @@ import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.OrgTypeEnum;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.TokenDto;
@ -16,6 +17,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.result.CustomerStaffGridResultDTO;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.opendata.dao.CaResidentDao;
@ -120,11 +122,11 @@ public class CaResidentServiceImpl extends BaseServiceImpl<CaResidentDao, CaResi
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getUserId());
String agencyId = staffInfo.getAgencyId();
// 根据组织id获取gridId网格id
Result<List<CustomerGridDTO>> gridIListByAgency = govOrgOpenFeignClient.getGridIListByAgency(agencyId);
Result<List<CustomerStaffGridResultDTO>> staffGridList = govOrgOpenFeignClient.getStaffGridList(dto.getCustomerId(), agencyId, OrgTypeEnum.AGENCY.getCode());
List<String> gridList = new ArrayList<>();
gridList.add(agencyId);
gridIListByAgency.getData().forEach(item -> {
gridList.add(item.getId());
staffGridList.getData().forEach(item -> {
gridList.add(item.getGridId());
});
// 分页查询

Loading…
Cancel
Save