Browse Source

Merge remote-tracking branch 'origin/feature/syp_houseInfo'

feature/screenDataPush
songyunpeng 4 years ago
parent
commit
d3fc3840d7
  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. 30
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java
  7. 8
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java
  8. 8
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java
  9. 5
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java
  10. 44
      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);
}
}

30
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.*;
/**
@ -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));
}
}

8
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java

@ -86,6 +86,14 @@ public interface PopulationInformationDao extends BaseDao<PopulationInformationE
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
PopulationInfoOverviewDTO getPopulationInfoOverview();
/**
* @Description 获取居民信息采集总览数据 - 大屏
* @Author songyunpeng
* @Date 2020/8/27
* @Param []
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
PopulationInfoOverviewDTO getPopulationInfoOverviewForScreen(@Param("communityId")String communityId);
/**
* @Description 清空入党时间
* @Author songyunpeng

8
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java

@ -145,6 +145,14 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
PopulationInfoOverviewDTO getPopulationInfoOverview();
/**
* @Description 获取居民信息采集总览
* @Author songyunpeng
* @Date 2021/6/23
* @Param [communityId]
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
PopulationInfoOverviewDTO getPopulationInfoOverviewForScreen(String communityId);
/**
* @Description 清空入党时间
* @Author songyunpeng

5
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java

@ -302,6 +302,11 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
return baseDao.getPopulationInfoOverview();
}
@Override
public PopulationInfoOverviewDTO getPopulationInfoOverviewForScreen(String communityId) {
return baseDao.getPopulationInfoOverviewForScreen(communityId);
}
@Override
public void setJionTimeToNull(String id) {
baseDao.setJionTimeToNull(id);

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

@ -175,6 +175,50 @@
from epdc_population_information where DEL_FLAG = 0 and RESIDENTS_IDENTITY_NO is not null and RESIDENTS_IDENTITY_NO != '')a on 1=1
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)
+
(select a.residentNum
from (
SELECT hi.PARENT_DEPT_IDS,
SUM(t2.num1) as residentNum
FROM `epdc_housing_information` hi
LEFT JOIN(
SELECT hr1.`HOUSE_ID`, SUM(t.num) as num1
FROM `epdc_house_resident` hr1
LEFT JOIN(
SELECT hr.`HOUSE_HEAD_ID`, COUNT(hr.`ID`) AS num
FROM `epdc_house_resident` hr
WHERE hr.`DEL_FLAG` = '0'
AND `IS_HOUSE_HEAD` = '0'
GROUP BY hr.`HOUSE_HEAD_ID`
ORDER BY COUNT(hr.`ID`) DESC) t on t.HOUSE_HEAD_ID = hr1.`RESIDENT_ID`
WHERE hr1.`DEL_FLAG` = '0'
AND hr1.`IS_HOUSE_HEAD` = '1'
GROUP BY hr1.`HOUSE_ID`) t2 on t2.HOUSE_ID = hi.`ID`
AND hi.`DEL_FLAG` = '0'
GROUP BY hi.`PARENT_DEPT_NAMES`) a
where find_in_set(#{communityId}, a.PARENT_DEPT_IDS))) as populationNum,
sum(MOTOR_VEHICLE_NUM) as motorVehicleNum,
count(POLITICS_STATUS = '1' or null) as partyMemberNum
from epdc_population_information a
left join epdc_house_resident b on a.ID = b.RESIDENT_ID and b.DEL_FLAG = '0'
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))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">
select data.name,data.gridName,data.identityFlag,data.houseId,data.populationId,data.identity,data.CREATED_TIME,data.identity as identityName from (

Loading…
Cancel
Save