Browse Source

大屏居民信息采集接口完善

feature/screenDataPush
songyunpeng 4 years ago
parent
commit
c9258d9dbe
  1. 26
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenPopulationController.java
  2. 21
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
  3. 11
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java
  4. 17
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java
  5. 10
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
  6. 34
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java
  7. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java
  8. 11
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

26
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenPopulationController.java

@ -5,6 +5,7 @@ import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.PopulationInfoOverviewDTO;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.service.AppUserService;
@ -142,4 +143,29 @@ public class ApiScreenPopulationController {
ValidatorUtils.validateEntity(dto);
return appUserService.gridRanking(dto);
}
/**
* @Description 获取居民信息采集总览数据 - 街道
* @Author songyunpeng
* @Date 2020/8/27
* @Param []
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
@GetMapping("getPopulationInfoOverviewForStreet")
@ReportData
public Result<PopulationInfoOverviewDTO> getPopulationInfoOverview() {
return appUserService.getPopulationInfoOverview();
}
/**
* @Description 获取居民信息采集总览数据 - screen - 社区
* @Author songyunpeng
* @Date 2021/6/24
* @Param [communityId]
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
@GetMapping("getPopulationInfoOverviewForCommunity/{communityId}")
@ReportData
public Result<PopulationInfoOverviewDTO> getPopulationInfoOverviewForScreen(@PathVariable("communityId")String communityId) {
return appUserService.getPopulationInfoOverviewForScreen(communityId);
}
}

21
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java

@ -1,6 +1,5 @@
package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
@ -554,6 +553,26 @@ public interface UserFeignClient {
@PostMapping(value = "app-user/screenPopulationInfo/selectPeopleByCurrentAddress", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>> selectPeopleByCurrentAddress(@RequestBody EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
/**
* @Description 社区获取居民信息采集总览数据
* @Author songyunpeng
* @Date 2021/6/24
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.PopulationInfoOverviewDTO>>
**/
@GetMapping(value = "app-user/screenPopulationInfo/getPopulationInfoOverviewForCommunity/{communityId}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PopulationInfoOverviewDTO> getPopulationInfoOverviewForScreen(@PathVariable("communityId")String communityId);
/**
* @Description 街道获取居民信息采集总览数据
* @Author songyunpeng
* @Date 2021/6/24
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.PopulationInfoOverviewDTO>>
**/
@GetMapping(value = "app-user/screenPopulationInfo/getPopulationInfoOverviewForStreet", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PopulationInfoOverviewDTO> getPopulationInfoOverview();
/**
* @Description 获取用户积分接口
* @Author songyunpeng

11
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java

@ -1,6 +1,5 @@
package com.elink.esua.epdc.feign.fallback;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
@ -259,6 +258,16 @@ public class UserFeignClientFallback implements UserFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "selectPeopleByCurrentAddress", dto);
}
@Override
public Result<PopulationInfoOverviewDTO> getPopulationInfoOverviewForScreen(String communityId) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getPopulationInfoOverviewForScreen", communityId);
}
@Override
public Result<PopulationInfoOverviewDTO> getPopulationInfoOverview() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getPopulationInfoOverview");
}
@Override
public Result<EpdcAppUserPointsResultDTO> getPointsByUserId(String userId) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getPointsByUserId", userId);

17
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java

@ -4,6 +4,7 @@ import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.DeptOption;
import com.elink.esua.epdc.dto.PopulationInfoOverviewDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO;
@ -410,4 +411,20 @@ public interface AppUserService {
* @since 2021/1/25 15:03
*/
Result<List<VolunteerTagsResultDTO>> listOfVolunteerTags();
/**
* @Description 获取居民信息采集总览数据 - 街道
* @Author songyunpeng
* @Date 2021/6/24
* @Param []
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
Result<PopulationInfoOverviewDTO> getPopulationInfoOverview();
/**
* @Description 获取居民信息采集总览数据 - screen - 社区
* @Author songyunpeng
* @Date 2021/6/24
* @Param [communityId]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.PopulationInfoOverviewDTO>
**/
Result<PopulationInfoOverviewDTO> getPopulationInfoOverviewForScreen(String communityId);
}

10
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java

@ -1744,4 +1744,14 @@ public class AppUserServiceImpl implements AppUserService {
return userFeignClient.getVolunteerTags();
}
@Override
public Result<PopulationInfoOverviewDTO> getPopulationInfoOverview() {
return userFeignClient.getPopulationInfoOverview();
}
@Override
public Result<PopulationInfoOverviewDTO> getPopulationInfoOverviewForScreen(String communityId) {
return userFeignClient.getPopulationInfoOverviewForScreen(communityId);
}
}

34
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java

@ -19,14 +19,12 @@ package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.PopulationInfoOverviewDTO;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.service.PopulationInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
@ -38,7 +36,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("screenPopulationInfo")
public class EpdcScreenPopulationInformationController {
@Autowired
private PopulationInformationService populationInformationService;
/**
@ -125,7 +123,27 @@ public class EpdcScreenPopulationInformationController {
public Result<PageData<EpdcScreenGridRankingResultDTO>> gridRanking(@RequestBody EpdcScreenGridRankingFormDTO dto){
return new Result<PageData<EpdcScreenGridRankingResultDTO>>().ok(populationInformationService.gridRanking(dto));
}
/**
* @Description 获取居民信息采集总览数据 - 街道
* @Author songyunpeng
* @Date 2020/8/27
* @Param []
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
@GetMapping("getPopulationInfoOverviewForStreet")
public Result<PopulationInfoOverviewDTO> getPopulationInfoOverview() {
return new Result<PopulationInfoOverviewDTO>().ok(populationInformationService.getPopulationInfoOverview());
}
/**
* @Description 获取居民信息采集总览数据 - screen - 社区
* @Author songyunpeng
* @Date 2021/6/24
* @Param [communityId]
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
@GetMapping("getPopulationInfoOverviewForCommunity/{communityId}")
public Result<PopulationInfoOverviewDTO> getPopulationInfoOverviewForScreen(@PathVariable("communityId")String communityId) {
return new Result<PopulationInfoOverviewDTO>().ok(populationInformationService.getPopulationInfoOverviewForScreen(communityId));
}
}
}

4
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java

@ -202,10 +202,6 @@ public class PopulationInformationController {
public PopulationInfoOverviewDTO getPopulationInfoOverview() {
return populationInformationService.getPopulationInfoOverview();
}
@GetMapping("getPopulationInfoOverviewForScreen/{communityId}")
public PopulationInfoOverviewDTO getPopulationInfoOverviewForScreen(@PathVariable("communityId")String communityId) {
return populationInformationService.getPopulationInfoOverviewForScreen(communityId);
}
/**
* @Description 以城找人

11
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

@ -176,6 +176,14 @@
where t.DEL_FLAG ='0';
</select>
<select id="getPopulationInfoOverviewForScreen" resultType="com.elink.esua.epdc.dto.PopulationInfoOverviewDTO">
select
count(t.HOUSE_USE = '0' or null) as sinceTheLiving,
count(t.HOUSE_USE = '1' or null) as rent,
count(t.HOUSE_USE = '2' or null) as business,
count(t.ID) as houseNum,
employment,unemployment,populationNum,motorVehicleNum,partyMemberNum
from epdc_housing_information t
left join(
select count(EMPLOYMENT_STATUS = '0' or null) as employment,
count(EMPLOYMENT_STATUS = '1' or null) as unemployment,
(select count(a.ID)
@ -208,7 +216,8 @@
left join epdc_housing_information c on c.ID = b.HOUSE_ID
where a.DEL_FLAG = 0
and b.IS_HOUSE_HEAD = 1
and find_in_set(#{communityId}, c.PARENT_DEPT_IDS)
and find_in_set(#{communityId}, c.PARENT_DEPT_IDS))a on 1=1
where t.DEL_FLAG ='0' and find_in_set(#{communityId}, t.PARENT_DEPT_IDS);
</select>
<select id="selectListPeople"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenSelectPeopleResultDTO">

Loading…
Cancel
Save