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. 34
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java
  7. 6
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java
  8. 14
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java
  9. 32
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java
  10. 7
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java
  11. 46
      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));
}
}
}

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

@ -48,7 +48,7 @@ import java.util.*;
/**
* 人口信息表
* 人口信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-08-19
@ -56,7 +56,7 @@ import java.util.*;
@RestController
@RequestMapping("populationinformation")
public class PopulationInformationController {
@Autowired
private PopulationInformationService populationInformationService;
@ -232,4 +232,4 @@ public class PopulationInformationController {
}
}
}

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

@ -30,7 +30,7 @@ import java.util.List;
import java.util.Map;
/**
* 人口信息表
* 人口信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-08-19
@ -38,7 +38,7 @@ import java.util.Map;
@Mapper
public interface PopulationInformationDao extends BaseDao<PopulationInformationEntity> {
/**
* @Description 根据身份证信息获取人口信息
* @Description 根据身份证信息获取人口信息
* @Author songyunpeng
* @Date 2020/8/21
* @Param [residentsIdentityNo]
@ -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
@ -197,4 +205,4 @@ public interface PopulationInformationDao extends BaseDao<PopulationInformationE
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO>
**/
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressExportList(Map<String, Object> params);
}
}

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

@ -30,7 +30,7 @@ import java.util.List;
import java.util.Map;
/**
* 人口信息表
* 人口信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-08-19
@ -97,7 +97,7 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
*/
void delete(String[] ids);
/**
* @Description 根据房屋ID获取户主信息
* @Description 根据房屋ID获取户主信息
* @Author songyunpeng
* @Date 2020/8/21
* @Param [id]
@ -121,7 +121,7 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
PageData<PopulationInformationDTO> listPage(Map<String, Object> params);
/**
* @Description 获取机动车列表信息
* @Description 获取机动车列表信息
* @Author songyunpeng
* @Date 2020/8/26
* @Param [params]
@ -138,7 +138,7 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
List<PopulationInformationDTO> motorVehicleList(Map<String, Object> params);
/**
* @Description 获取居民信息采集总览数据
* @Description 获取居民信息采集总览数据
* @Author songyunpeng
* @Date 2020/8/28
* @Param []
@ -146,7 +146,15 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
PopulationInfoOverviewDTO getPopulationInfoOverview();
/**
* @Description 清空入党时间
* @Description 获取居民信息采集总览
* @Author songyunpeng
* @Date 2021/6/23
* @Param [communityId]
* @return com.elink.esua.epdc.dto.PopulationInfoOverviewDTO
**/
PopulationInfoOverviewDTO getPopulationInfoOverviewForScreen(String communityId);
/**
* @Description 清空入党时间
* @Author songyunpeng
* @Date 2020/9/4
* @Param [id]
@ -154,7 +162,7 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
void setJionTimeToNull(String id);
/**
* @Description 清空失业登记时间
* @Description 清空失业登记时间
* @Author songyunpeng
* @Date 2020/9/4
* @Param [id]
@ -162,7 +170,7 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
void setUnemploymentRegisterTimeToNull(String id);
/**
* @Description 大屏找人接口
* @Description 大屏找人接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [epdcScreenSelectPeopleFormDTO]
@ -170,7 +178,7 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
PageData<EpdcScreenSelectPeopleResultDTO> selectPeople(EpdcScreenSelectPeopleFormDTO epdcScreenSelectPeopleFormDTO);
/**
* @Description 大屏找人详情接口
* @Description 大屏找人详情接口
* @Author songyunpeng
* @Date 2020/9/14
* @Param [dto]
@ -178,7 +186,7 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
Result<EpdcScreenSelectPeopleDetailResultDTO> selectPeopleDetail(EpdcScreenSelectPeopleDetailFormDTO dto);
/**
* @Description 房屋用途数据接口
* @Description 房屋用途数据接口
* @Author songyunpeng
* @Date 2020/9/15
* @Param []
@ -186,7 +194,7 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
Result<EpdcScreenHouseUseResultDTO> housingUse();
/**
* @Description 网格排名
* @Description 网格排名
* @Author songyunpeng
* @Date 2020/9/15
* @Param [dto]
@ -202,7 +210,7 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
PageData<EpdcScreenHouseInfoByPeopleResultDTO> selectHouseByPeople(EpdcScreenHouseInfoByPeopleFormDTO dto);
/**
* @Description 以房找人接口
* @Description 以房找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
@ -243,4 +251,4 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO>
**/
Integer selectCountPeopleByCurrentAddressForPc(Map<String, Object> params);
}
}

7
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);
@ -575,4 +580,4 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
break;
}
}
}
}

46
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 (
@ -552,4 +596,4 @@
</select>
</mapper>
</mapper>

Loading…
Cancel
Save