Browse Source

人房概览数据统计方法模板

master
sunyuchao 3 years ago
parent
commit
3f03a2f372
  1. 29
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseChartFormDTO.java
  2. 50
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseChartResultDTO.java
  3. 74
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubUserHouseListResultDTO.java
  4. 35
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  5. 21
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java
  6. 24
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  7. 29
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserChartFormDTO.java
  8. 42
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserChartResultDTO.java
  9. 13
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  10. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java
  11. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

29
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;
}

50
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;
}

74
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;
}

35
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<HouseInfoDTO>().ok(houseService.getHouseInfoDTO(tokenDto.getCustomerId(), houseId));
}
/**
* @Author sun
* @Description 人房房屋总数饼图
**/
@NoRepeatSubmit
@PostMapping("housechart")
public Result<HouseChartResultDTO> houseChart(@LoginUser TokenDto tokenDto, @RequestBody HouseChartFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<HouseChartResultDTO>().ok(houseService.houseChart(formDTO));
}
/**
* @Author sun
* @Description 人房下级人房概览列表
**/
@NoRepeatSubmit
@PostMapping("subuserhouselist")
public Result<List<SubUserHouseListResultDTO>> subUserHouseList(@LoginUser TokenDto tokenDto, @RequestBody HouseChartFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<List<SubUserHouseListResultDTO>>().ok(houseService.subUserHouseList(formDTO));
}
}

21
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<SubUserHouseListResultDTO> subUserHouseList(HouseChartFormDTO formDTO);
}

24
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<SubUserHouseListResultDTO> subUserHouseList(HouseChartFormDTO formDTO) {
return null;
}
}

29
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;
}

42
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;
}

13
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<HouseChartResultDTO> userChart(@LoginUser TokenDto tokenDto, @RequestBody UserChartFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<HouseChartResultDTO>().ok(icResiUserService.userChart(formDTO));
}
}

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java

@ -244,4 +244,10 @@ public interface IcResiUserService extends BaseService<IcResiUserEntity> {
* @Date 2022/3/29 16:25
*/
EpidemicPreventionInfoDTO getEpidemicPreventionInfo(EpidemicPreventionFormDTO formDTO);
/**
* @Author sun
* @Description 人房居民总数饼图
**/
HouseChartResultDTO userChart(UserChartFormDTO formDTO);
}

10
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -1594,4 +1594,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
return new PageData<>(list, null == list?NumConstant.ZERO:list.size());
}
/**
* @Author sun
* @Description 人房居民总数饼图
**/
@Override
public HouseChartResultDTO userChart(UserChartFormDTO formDTO) {
return null;
}
}

Loading…
Cancel
Save