From 3f03a2f3722862992e2dc9c412a5ebda7c5c21f9 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 20 Apr 2022 16:58:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E6=88=BF=E6=A6=82=E8=A7=88=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=E6=96=B9=E6=B3=95=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/HouseChartFormDTO.java | 29 ++++++++ .../epmet/dto/result/HouseChartResultDTO.java | 50 +++++++++++++ .../dto/result/SubUserHouseListResultDTO.java | 74 +++++++++++++++++++ .../com/epmet/controller/HouseController.java | 35 +++++++-- .../java/com/epmet/service/HouseService.java | 21 ++++-- .../epmet/service/impl/HouseServiceImpl.java | 24 +++++- .../com/epmet/dto/form/UserChartFormDTO.java | 29 ++++++++ .../epmet/dto/result/UserChartResultDTO.java | 42 +++++++++++ .../controller/IcResiUserController.java | 13 ++++ .../com/epmet/service/IcResiUserService.java | 6 ++ .../service/impl/IcResiUserServiceImpl.java | 10 +++ 11 files changed, 317 insertions(+), 16 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseChartFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserChartResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseChartFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseChartFormDTO.java new file mode 100644 index 0000000000..6d3d8f433a --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseChartFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author sun + * @dscription 【人房】房屋总数饼图-接口入参 + */ +@Data +public class HouseChartFormDTO implements Serializable { + + private static final long serialVersionUID = 405799151478155056L; + + /** + * 组织、网格、小区Id + */ + private String orgId; + /** + * 组织、网格、小区类型 agency grid village + */ + private String orgType; + + //token这信息 + private String customerId; + private String userId; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java new file mode 100644 index 0000000000..b412f00b07 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java @@ -0,0 +1,50 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author sun + * @dscription 【人房】房屋总数饼图-接口返参 + */ +@Data +public class HouseChartResultDTO implements Serializable { + /** + * 组织、网格、小区Id + */ + private String orgId; + /** + * 组织、网格、小区类型 agency grid village + */ + private String orgType; + /** + * 房屋总数 + */ + private Integer houseTotal; + /** + * 房屋自住总数 + */ + private Integer zzHouseTotal; + /** + * 房屋自住总数占比(保留两位小数,带百分号的) + */ + private String zzHouseRatio; + /** + * 房屋常住总数 + */ + private Integer czHouseTotal; + /** + * 房屋常住总数占比(保留两位小数,带百分号的) + */ + private String czHouseRatio; + /** + * 房屋闲置总数 + */ + private Integer xzHouseTotal; + /** + * 房屋闲置总数占比(保留两位小数,带百分号的) + */ + private String xzHouseRatio; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java new file mode 100644 index 0000000000..c2771bb8f9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java @@ -0,0 +1,74 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author sun + * @dscription 【人房】下级人房概览列表-接口返参 + */ +@Data +public class SubUserHouseListResultDTO implements Serializable { + /** + * 组织、网格、小区Id + */ + private String orgId; + /** + * 组织、网格、小区名称 + */ + private String orgName; + /** + * 组织、网格、小区类型 agency grid village + */ + private String orgType; + /** + * 房屋总数 + */ + private Integer houseTotal; + /** + * 房屋自住总数 + */ + private Integer zzHouseTotal; + /** + * 房屋自住总数占比(保留两位小数,带百分号的) + */ + private String zzHouseRatio; + /** + * 房屋常住总数 + */ + private Integer czHouseTotal; + /** + * 房屋常住总数占比(保留两位小数,带百分号的) + */ + private String czHouseRatio; + /** + * 房屋闲置总数 + */ + private Integer xzHouseTotal; + /** + * 房屋闲置总数占比(保留两位小数,带百分号的) + */ + private String xzHouseRatio; + /** + * 居民总数 + */ + private Integer userTotal; + /** + * 常住人口总数 + */ + private Integer czUserTotal; + /** + * 常住人口占比(保留两位小数,带百分号的) + */ + private String czUserRatio; + /** + * 流动人口总数 + */ + private Integer ldUserTotal; + /** + * 流动人口占比(保留两位小数,带百分号的) + */ + private String ldUserRatio; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 5ef535aa11..322d580490 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -31,10 +31,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.form.*; -import com.epmet.dto.result.HouseInfoDTO; -import com.epmet.dto.result.IcHouseListResultDTO; -import com.epmet.dto.result.ImportTaskCommonResultDTO; -import com.epmet.dto.result.LoginUserDetailsResultDTO; +import com.epmet.dto.result.*; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.HouseService; @@ -47,7 +44,10 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.InputStream; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Set; /** @@ -248,4 +248,29 @@ public class HouseController implements ResultDataResolver { } return new Result().ok(houseService.getHouseInfoDTO(tokenDto.getCustomerId(), houseId)); } + + /** + * @Author sun + * @Description 【人房】房屋总数饼图 + **/ + @NoRepeatSubmit + @PostMapping("housechart") + public Result houseChart(@LoginUser TokenDto tokenDto, @RequestBody HouseChartFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + return new Result().ok(houseService.houseChart(formDTO)); + } + + /** + * @Author sun + * @Description 【人房】下级人房概览列表 + **/ + @NoRepeatSubmit + @PostMapping("subuserhouselist") + public Result> subUserHouseList(@LoginUser TokenDto tokenDto, @RequestBody HouseChartFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + return new Result>().ok(houseService.subUserHouseList(formDTO)); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index bc9af52b79..759c95c5fe 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -19,13 +19,8 @@ package com.epmet.service; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.form.IcHouseAddFormDTO; -import com.epmet.dto.form.IcHouseListFormDTO; -import com.epmet.dto.form.ImportInfoFormDTO; -import com.epmet.dto.form.NeighborHoodManageDelFormDTO; -import com.epmet.dto.result.HouseInfoDTO; -import com.epmet.dto.result.IcHouseListResultDTO; -import com.epmet.dto.result.ImportTaskCommonResultDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.*; import javax.servlet.http.HttpServletResponse; import java.io.InputStream; @@ -68,4 +63,16 @@ public interface HouseService { void allDelete(NeighborHoodManageDelFormDTO formDTO); HouseInfoDTO getHouseInfoDTO(String customerId,String houseId); + + /** + * @Author sun + * @Description 【人房】房屋总数饼图 + **/ + HouseChartResultDTO houseChart(HouseChartFormDTO formDTO); + + /** + * @Author sun + * @Description 【人房】下级人房概览列表 + **/ + List subUserHouseList(HouseChartFormDTO formDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index bac35ce64c..2d54a6d4c7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -27,10 +27,7 @@ import com.epmet.dto.IcBuildingDTO; import com.epmet.dto.IcBuildingUnitDTO; import com.epmet.dto.IcHouseDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.HouseInfoDTO; -import com.epmet.dto.result.IcHouseListResultDTO; -import com.epmet.dto.result.ImportTaskCommonResultDTO; -import com.epmet.dto.result.NeighborHoodManageDelResultDTO; +import com.epmet.dto.result.*; import com.epmet.enums.HousePurposeEnums; import com.epmet.enums.HouseTypeEnums; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; @@ -344,4 +341,23 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { } return houseInfo; } + + /** + * @Author sun + * @Description 【人房】房屋总数饼图 + **/ + @Override + public HouseChartResultDTO houseChart(HouseChartFormDTO formDTO) { + return null; + } + + /** + * @Author sun + * @Description 【人房】下级人房概览列表 + **/ + @Override + public List subUserHouseList(HouseChartFormDTO formDTO) { + return null; + } + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java new file mode 100644 index 0000000000..36ae55e8f7 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author sun + * @dscription 【人房】居民总数饼图-接口入参 + */ +@Data +public class UserChartFormDTO implements Serializable { + + private static final long serialVersionUID = 405799151478155056L; + + /** + * 组织、网格、小区Id + */ + private String orgId; + /** + * 组织、网格、小区类型 agency grid village + */ + private String orgType; + + //token这信息 + private String customerId; + private String userId; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserChartResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserChartResultDTO.java new file mode 100644 index 0000000000..dd8560b16f --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserChartResultDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author sun + * @dscription 【人房】居民总数饼图-接口返参 + */ +@Data +public class UserChartResultDTO implements Serializable { + /** + * 组织、网格、小区Id + */ + private String orgId; + /** + * 组织、网格、小区类型 agency grid village + */ + private String orgType; + /** + * 居民总数 + */ + private Integer userTotal; + /** + * 常住人口总数 + */ + private Integer czUserTotal; + /** + * 常住人口占比(保留两位小数,带百分号的) + */ + private String czUserRatio; + /** + * 流动人口总数 + */ + private Integer ldUserTotal; + /** + * 流动人口占比(保留两位小数,带百分号的) + */ + private String ldUserRatio; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 5a44547fc8..ab051346d9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -888,4 +888,17 @@ public class IcResiUserController implements ResultDataResolver { }); return new Result(); } + + /** + * @Author sun + * @Description 【人房】居民总数饼图 + **/ + @NoRepeatSubmit + @PostMapping("userchart") + public Result userChart(@LoginUser TokenDto tokenDto, @RequestBody UserChartFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + return new Result().ok(icResiUserService.userChart(formDTO)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index 8bcebefd92..1e8e704811 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -244,4 +244,10 @@ public interface IcResiUserService extends BaseService { * @Date 2022/3/29 16:25 */ EpidemicPreventionInfoDTO getEpidemicPreventionInfo(EpidemicPreventionFormDTO formDTO); + + /** + * @Author sun + * @Description 【人房】居民总数饼图 + **/ + HouseChartResultDTO userChart(UserChartFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index bf4e68bd1d..3feebd6529 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -1594,4 +1594,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl(list, null == list?NumConstant.ZERO:list.size()); } + + /** + * @Author sun + * @Description 【人房】居民总数饼图 + **/ + @Override + public HouseChartResultDTO userChart(UserChartFormDTO formDTO) { + return null; + } + }