From c9258d9dbeb3dd5ca9af75516e2a2832f337f63d Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Thu, 24 Jun 2021 14:36:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=B1=85=E6=B0=91=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E9=87=87=E9=9B=86=E6=8E=A5=E5=8F=A3=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ApiScreenPopulationController.java | 26 ++++++++++++++ .../esua/epdc/feign/UserFeignClient.java | 21 +++++++++++- .../fallback/UserFeignClientFallback.java | 11 +++++- .../esua/epdc/service/AppUserService.java | 17 ++++++++++ .../epdc/service/impl/AppUserServiceImpl.java | 10 ++++++ ...ScreenPopulationInformationController.java | 34 ++++++++++++++----- .../PopulationInformationController.java | 4 --- .../mapper/PopulationInformationDao.xml | 11 +++++- 8 files changed, 119 insertions(+), 15 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenPopulationController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenPopulationController.java index c5bcc162..4695c6dc 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScreenPopulationController.java +++ b/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 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 getPopulationInfoOverviewForScreen(@PathVariable("communityId")String communityId) { + return appUserService.getPopulationInfoOverviewForScreen(communityId); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java index 9038e209..35dd202b 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java +++ b/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> selectPeopleByCurrentAddress(@RequestBody EpdcScreenResidentInfoByCurrentAddressFormDTO dto); + /** + * @Description 社区获取居民信息采集总览数据 + * @Author songyunpeng + * @Date 2021/6/24 + * @Param [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + @GetMapping(value = "app-user/screenPopulationInfo/getPopulationInfoOverviewForCommunity/{communityId}", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getPopulationInfoOverviewForScreen(@PathVariable("communityId")String communityId); + /** + * @Description 街道获取居民信息采集总览数据 + * @Author songyunpeng + * @Date 2021/6/24 + * @Param [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + **/ + @GetMapping(value = "app-user/screenPopulationInfo/getPopulationInfoOverviewForStreet", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getPopulationInfoOverview(); + + /** * @Description 获取用户积分接口 * @Author songyunpeng diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java index 1a8d4c94..dfaa177e 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java +++ b/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 getPopulationInfoOverviewForScreen(String communityId) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getPopulationInfoOverviewForScreen", communityId); + } + + @Override + public Result getPopulationInfoOverview() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getPopulationInfoOverview"); + } + @Override public Result getPointsByUserId(String userId) { return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getPointsByUserId", userId); diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java index 4e44115b..a7a59c10 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppUserService.java +++ b/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> listOfVolunteerTags(); + /** + * @Description 获取居民信息采集总览数据 - 街道 + * @Author songyunpeng + * @Date 2021/6/24 + * @Param [] + * @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO + **/ + Result getPopulationInfoOverview(); + /** + * @Description 获取居民信息采集总览数据 - screen - 社区 + * @Author songyunpeng + * @Date 2021/6/24 + * @Param [communityId] + * @return com.elink.esua.epdc.commons.tools.utils.Result + **/ + Result getPopulationInfoOverviewForScreen(String communityId); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java index 35b42017..9214f96a 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java +++ b/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 getPopulationInfoOverview() { + return userFeignClient.getPopulationInfoOverview(); + } + + @Override + public Result getPopulationInfoOverviewForScreen(String communityId) { + return userFeignClient.getPopulationInfoOverviewForScreen(communityId); + } + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java index 17a88980..b4192060 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java +++ b/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> gridRanking(@RequestBody EpdcScreenGridRankingFormDTO dto){ return new Result>().ok(populationInformationService.gridRanking(dto)); } + /** + * @Description 获取居民信息采集总览数据 - 街道 + * @Author songyunpeng + * @Date 2020/8/27 + * @Param [] + * @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO + **/ + @GetMapping("getPopulationInfoOverviewForStreet") + public Result getPopulationInfoOverview() { + return new Result().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 getPopulationInfoOverviewForScreen(@PathVariable("communityId")String communityId) { + return new Result().ok(populationInformationService.getPopulationInfoOverviewForScreen(communityId)); + } - - -} \ No newline at end of file +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java index 007f0584..d62f4eab 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java +++ b/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 以城找人 diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml index 17c350ac..d5a22586 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml @@ -176,6 +176,14 @@ where t.DEL_FLAG ='0';