Browse Source

修改剩余部分

feature/teamB_zz_wgh
HAHA 3 years ago
parent
commit
d0138dcaaf
  1. 8
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java
  2. 8
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java
  3. 8
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java

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

@ -8,12 +8,14 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; 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.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.result.CustomerStaffGridResultDTO;
import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.opendata.dao.CaPingfangDao; import com.epmet.opendata.dao.CaPingfangDao;
import com.epmet.opendata.dto.ca.CaPingfangDTO; import com.epmet.opendata.dto.ca.CaPingfangDTO;
@ -110,11 +112,11 @@ public class CaPingfangServiceImpl extends BaseServiceImpl<CaPingfangDao, CaPing
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getUserId()); CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getUserId());
String agencyId = staffInfo.getAgencyId(); String agencyId = staffInfo.getAgencyId();
// 根据组织id获取gridId网格id // 根据组织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<>(); List<String> gridList = new ArrayList<>();
gridList.add(agencyId); gridList.add(agencyId);
gridIListByAgency.getData().forEach(item -> { staffGridList.getData().forEach(item -> {
gridList.add(item.getId()); gridList.add(item.getGridId());
}); });
PageHelper.startPage(dto.getPage(), dto.getLimit()); PageHelper.startPage(dto.getPage(), dto.getLimit());

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

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; 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.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
@ -15,6 +16,7 @@ import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.result.CustomerStaffGridResultDTO;
import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.opendata.dao.CaRentalDao; import com.epmet.opendata.dao.CaRentalDao;
import com.epmet.opendata.dto.ca.CaRentalDTO; import com.epmet.opendata.dto.ca.CaRentalDTO;
@ -113,11 +115,11 @@ public class CaRentalServiceImpl extends BaseServiceImpl<CaRentalDao, CaRentalEn
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getUserId()); CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getUserId());
String agencyId = staffInfo.getAgencyId(); String agencyId = staffInfo.getAgencyId();
// 根据组织id获取gridId网格id // 根据组织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<>(); List<String> gridList = new ArrayList<>();
gridList.add(agencyId); gridList.add(agencyId);
gridIListByAgency.getData().forEach(item -> { staffGridList.getData().forEach(item -> {
gridList.add(item.getId()); gridList.add(item.getGridId());
}); });
PageHelper.startPage(dto.getPage(), dto.getLimit()); PageHelper.startPage(dto.getPage(), dto.getLimit());

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

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; 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.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
@ -14,6 +15,7 @@ import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.result.CustomerStaffGridResultDTO;
import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.opendata.dao.CaRotatorsDao; import com.epmet.opendata.dao.CaRotatorsDao;
@ -116,11 +118,11 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl<CaRotatorsDao, CaRota
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getUserId()); CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getUserId());
String agencyId = staffInfo.getAgencyId(); String agencyId = staffInfo.getAgencyId();
// 根据组织id获取gridId网格id // 根据组织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<>(); List<String> gridList = new ArrayList<>();
gridList.add(agencyId); gridList.add(agencyId);
gridIListByAgency.getData().forEach(item -> { staffGridList.getData().forEach(item -> {
gridList.add(item.getId()); gridList.add(item.getGridId());
}); });
PageHelper.startPage(dto.getPage(), dto.getLimit()); PageHelper.startPage(dto.getPage(), dto.getLimit());

Loading…
Cancel
Save