Browse Source

大屏 居民提交

master
lichao 2 years ago
parent
commit
10d39e8c21
  1. 21
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseScreenListFormDTO.java
  2. 143
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerChildAgencyResultDTO.java
  3. 122
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseScreenListResultDTO.java
  4. 20
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseScreenStatisticsResultDTO.java
  5. 3
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  6. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  7. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  8. 26
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  9. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  10. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java
  11. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  12. 91
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  13. 20
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcUserScreenListFormDTO.java
  14. 448
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserScreenListResultDTO.java
  15. 22
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserScreenResultDTO.java
  16. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserStreetResultDTO.java
  17. 25
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  18. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java
  19. 77
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

21
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseScreenListFormDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @program: epmet-cloud
* @description:
* @author: lc
* @create: 2022-06-09 15:12
**/
@Data
public class HouseScreenListFormDTO implements Serializable {
private String agencyId;
private String level;
private Integer pageSize;
private Integer pageNo;
}

143
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerChildAgencyResultDTO.java

@ -0,0 +1,143 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 子组织表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerChildAgencyResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 上级组织机构ID
*/
private String pid;
/**
* 所有上级组织机构ID(以英文:隔开)
*/
private String pids;
/**
* 所有上级名称,-连接
*/
private String allParentName;
/**
* 组织名称
*/
private String organizationName;
/**
* 机关级别社区级community
街道:street,
区县级: district,
市级: city
省级:province 机关级别社区级community街道:street,区县级: district,市级: city省级:province
*/
private String level;
/**
* 地区编码
*/
private String areaCode;
/**
* 总人数
*/
private Integer totalUser;
/**
*
*/
private String province;
/**
* 城市名称
*/
private String city;
/**
* 区县名称
*/
private String district;
/**
* 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701
*/
private String parentAreaCode;
/**
* 街道
*/
private String street;
/**
* 社区名称0409
*/
private String community;
/**
* 坐标
*/
private String coordinates;
/**
* 中心位置经度
*/
private String longitude;
/**
* 中心位置纬度
*/
private String latitude;
/**
* 中心点位位置
*/
private String centerAddress;
/**
* 组织编码
*/
private String code;
/**
* 负责人姓名
*/
private String contacts;
/**
* 联系电话
*/
private String mobile;
}

122
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseScreenListResultDTO.java

@ -0,0 +1,122 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Description 房屋 类型 统计
* @Author lc
* @Date
*/
@NoArgsConstructor
@Data
public class HouseScreenListResultDTO implements Serializable {
private static final long serialVersionUID = -1098032063828430218L;
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 所属组织的PIDS包括agencygrid
*/
private String orgIdPath;
/**
* 小区id
*/
private String neighborHoodId;
/**
* 片区idneighbor_hood_part.id,可为空
*/
private String partId;
/**
* 所属楼栋id
*/
private String buildingId;
/**
* 所属单元id
*/
private String buildingUnitId;
/**
* 房屋名字后台插入时生成
*/
private String houseName;
/**
* 全名:小区楼栋单元房屋
*/
private String fullName;
/**
* 门牌号
*/
private String doorName;
/**
* 房屋类型这里存储字典value就可以
*/
private String houseType;
/**
* 存储字典value
*/
private String purpose;
/**
* 1出租 0自住 2闲置 3未出售
*/
private Integer rentFlag;
/**
* 房主姓名
*/
private String ownerName;
/**
* 房主电话
*/
private String ownerPhone;
/**
* 房主身份证号
*/
private String ownerIdCard;
/**
* 排序
*/
private BigDecimal sort;
/**
* 备注
*/
private String remark;
/**
* 房屋编码
*/
private String houseCode;
private String houseQrcodeUrl;
/**
* 居住人数
*/
private Integer resiNumber;
/**
* 房屋可编辑编码
*/
private String coding;
private String microGridId;
}

20
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseScreenStatisticsResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description 房屋 类型 统计
* @Author lc
* @Date
*/
@NoArgsConstructor
@Data
public class HouseScreenStatisticsResultDTO implements Serializable {
private static final long serialVersionUID = -1098032063828430218L;
private String agencyId;
private String agencyName;
private Integer count;
}

3
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -716,4 +716,7 @@ public interface GovOrgOpenFeignClient {
@GetMapping("/gov/org/customeragency/getLevelAagencyList/{level}")
Result<List<CustomerAgencyResultDTO>> getLevelAagencyList(@PathVariable("level") String level);
@GetMapping("/gov/org/customeragency/getChildAgencyList/{agencyId}")
Result<List<CustomerChildAgencyResultDTO>> getChildAgencyList(@PathVariable("agencyId") String agencyId);
}

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java

@ -469,6 +469,11 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getLevelAagencyList", level);
}
@Override
public Result<List<CustomerChildAgencyResultDTO>> getChildAgencyList(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getChildAgencyList", agencyId);
}
@Override
public Result<List<CustomerGridStaffListResultDTO>> gridStaff(CustomerGridStaffListFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "gridStaffList", dto);

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -500,4 +500,9 @@ public class CustomerAgencyController {
return customerAgencyService.getLevelAagencyList(level);
}
@GetMapping("getChildAgencyList/{agencyId}")
public Result<List<CustomerChildAgencyResultDTO>> getChildAgencyList(@PathVariable("agencyId") String agencyId) {
return customerAgencyService.getChildAgencyList(agencyId);
}
}

26
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java

@ -692,4 +692,30 @@ public class HouseController implements ResultDataResolver {
return new Result<List<HouseStreeTypeStatisticsResultDTO>>().ok(result);
}
/**
* @Description: 大屏 获取房屋统计
* @param agencyId:
* @param level:
* @Return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.HouseScreenStatisticsResultDTO>>
* @Author: lichao
* @Date: 2023/12/5 11:13
*/
@GetMapping("screen/getScreenHouseStatistics")
public Result<List<HouseScreenStatisticsResultDTO>> getScreenHouseStatistics(String agencyId,String level) {
List<HouseScreenStatisticsResultDTO> result = houseService.getScreenHouseStatistics(agencyId,level);
return new Result<List<HouseScreenStatisticsResultDTO>>().ok(result);
}
/**
* @Description: 大屏 获取房屋列表
* @param dto:
* @Return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData < com.epmet.dto.result.HouseScreenListResultDTO>>
* @Author: lichao
* @Date: 2023/12/5 15:06
*/
@GetMapping("screen/getScreenHouseList")
public Result<PageData<HouseScreenListResultDTO>> getScreenHouseList(HouseScreenListFormDTO dto) {
PageData<HouseScreenListResultDTO> result = houseService.getScreenHouseList(dto);
return new Result<PageData<HouseScreenListResultDTO>>().ok(result);
}
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -337,4 +337,6 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
Result<CommunityInfoResultDTO> getCommunityInfoByUserId(String userId);
Result<List<CustomerAgencyResultDTO>> getLevelAagencyList(String level);
Result<List<CustomerChildAgencyResultDTO>> getChildAgencyList(String agencyId);
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java

@ -205,4 +205,8 @@ public interface HouseService {
List<HouseStreeStatisticsResultDTO> getStreeHouseStatistics();
List<HouseStreeTypeStatisticsResultDTO> getStreeHouseTypeStatistics(String streetId);
List<HouseScreenStatisticsResultDTO> getScreenHouseStatistics(String agencyId, String level);
PageData<HouseScreenListResultDTO> getScreenHouseList(HouseScreenListFormDTO dto);
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -17,6 +17,7 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -1598,4 +1599,12 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
return new Result<List<CustomerAgencyResultDTO>>().ok(ConvertUtils.sourceToTarget(result, CustomerAgencyResultDTO.class));
}
@Override
public Result<List<CustomerChildAgencyResultDTO>> getChildAgencyList(String agencyId) {
LambdaQueryWrapper<CustomerAgencyEntity> childAgencyListLq =
new LambdaQueryWrapper<CustomerAgencyEntity>().eq(CustomerAgencyEntity::getPid,agencyId);
List<CustomerAgencyEntity> result = baseDao.selectList(childAgencyListLq);
return new Result<List<CustomerChildAgencyResultDTO>>().ok(ConvertUtils.sourceToTarget(result, CustomerChildAgencyResultDTO.class));
}
}

91
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -1403,4 +1403,95 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
}
return result;
}
@Override
public List<HouseScreenStatisticsResultDTO> getScreenHouseStatistics(String agencyId, String level) {
List<HouseScreenStatisticsResultDTO> result = new ArrayList<>();
// 当前可能有两种情况 一种是社区下房屋数量 一种是网格下房屋数量
if (level.equals("street")){
LambdaQueryWrapper<CustomerAgencyEntity> childAgencyListLq =
new LambdaQueryWrapper<CustomerAgencyEntity>().eq(CustomerAgencyEntity::getPid,agencyId);
List<CustomerAgencyEntity> communityList = customerAgencyDao.selectList(childAgencyListLq);
communityList.forEach(
community -> {
HouseScreenStatisticsResultDTO dto = new HouseScreenStatisticsResultDTO();
LambdaQueryWrapper<IcHouseEntity> houseEntityLambdaQueryWrapper
= new LambdaQueryWrapper<IcHouseEntity>().likeRight(IcHouseEntity::getOrgIdPath, community.getPids()+ ":" + community.getId());
List<IcHouseEntity> houseEntities = icHouseDao.selectList(houseEntityLambdaQueryWrapper);
dto.setAgencyName(community.getOrganizationName());
dto.setAgencyId(community.getId());
dto.setCount(houseEntities.size());
result.add(dto);
});
}else if(level.equals("community")){
LambdaQueryWrapper<CustomerGridEntity> gridListLq =
new LambdaQueryWrapper<CustomerGridEntity>().eq(CustomerGridEntity::getPid,agencyId);
List<CustomerGridEntity> gridList = customerGridDao.selectList(gridListLq);
gridList.forEach(grid->{
HouseScreenStatisticsResultDTO dto = new HouseScreenStatisticsResultDTO();
dto.setAgencyId(grid.getId());
dto.setAgencyName(grid.getGridName());
LambdaQueryWrapper<IcNeighborHoodEntity> neighborHoodEntityLambdaQueryWrapper =
new LambdaQueryWrapper<IcNeighborHoodEntity>().eq(IcNeighborHoodEntity::getGridId,grid.getId());
List<IcNeighborHoodEntity> neighborHoodEntities = icNeighborHoodDao.selectList(neighborHoodEntityLambdaQueryWrapper);
if (neighborHoodEntities.size()>0){
List<String> neighorHoodIds = neighborHoodEntities.stream().map(IcNeighborHoodEntity::getId).collect(Collectors.toList());
LambdaQueryWrapper<IcHouseEntity> houseEntityLambdaQueryWrapper
= new LambdaQueryWrapper<IcHouseEntity>().in(IcHouseEntity::getNeighborHoodId, neighorHoodIds);
List<IcHouseEntity> houseEntities = icHouseDao.selectList(houseEntityLambdaQueryWrapper);
dto.setCount(houseEntities.size());
}
result.add(dto);
});
}
return result;
}
@Override
public PageData<HouseScreenListResultDTO> getScreenHouseList(HouseScreenListFormDTO dto) {
List<HouseScreenListResultDTO> list = new ArrayList<>();
PageInfo<HouseScreenListResultDTO> pageInfo = new PageInfo<>();
// 当前可能有两种情况 一种是社区下房屋数量 一种是网格下房屋数量
if (dto.getLevel().equals("community")) {
LambdaQueryWrapper<CustomerAgencyEntity> childAgencyListLq =
new LambdaQueryWrapper<CustomerAgencyEntity>().eq(CustomerAgencyEntity::getPid, dto.getAgencyId());
CustomerAgencyEntity community = customerAgencyDao.selectById(dto.getAgencyId());
LambdaQueryWrapper<IcHouseEntity> houseEntityLambdaQueryWrapper
= new LambdaQueryWrapper<IcHouseEntity>().likeRight(IcHouseEntity::getOrgIdPath, community.getPids() + ":" + community.getId());
PageHelper.startPage(dto.getPageNo(), dto.getPageSize());
List<IcHouseEntity> houseEntities = icHouseDao.selectList(houseEntityLambdaQueryWrapper);
PageInfo<IcHouseEntity> page = new PageInfo<>(houseEntities);
pageInfo.setTotal(page.getTotal());
list = ConvertUtils.sourceToTarget(houseEntities, HouseScreenListResultDTO.class);
}else if (dto.getLevel().equals("grid")) {
LambdaQueryWrapper<IcNeighborHoodEntity> neighborHoodEntityLambdaQueryWrapper =
new LambdaQueryWrapper<IcNeighborHoodEntity>().eq(IcNeighborHoodEntity::getGridId,dto.getAgencyId());
List<IcNeighborHoodEntity> neighborHoodEntities = icNeighborHoodDao.selectList(neighborHoodEntityLambdaQueryWrapper);
if (neighborHoodEntities.size()>0){
List<String> neighorHoodIds = neighborHoodEntities.stream().map(IcNeighborHoodEntity::getId).collect(Collectors.toList());
LambdaQueryWrapper<IcHouseEntity> houseEntityLambdaQueryWrapper
= new LambdaQueryWrapper<IcHouseEntity>().in(IcHouseEntity::getNeighborHoodId, neighorHoodIds);
PageHelper.startPage(dto.getPageNo(),dto.getPageSize());
List<IcHouseEntity> houseEntities = icHouseDao.selectList(houseEntityLambdaQueryWrapper);
PageInfo<IcHouseEntity> page = new PageInfo<>(houseEntities);
pageInfo.setTotal(page.getTotal());
list = ConvertUtils.sourceToTarget(houseEntities,HouseScreenListResultDTO.class);
}
}
return new PageData<>(list,pageInfo.getTotal());
}
}

20
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcUserScreenListFormDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @program: epmet-cloud
* @description:
* @author: lc
* @create: 2022-06-09 15:12
**/
@Data
public class IcUserScreenListFormDTO implements Serializable {
private String agencyId;
private String level;
private Integer pageSize;
private Integer pageNo;
}

448
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserScreenListResultDTO.java

@ -0,0 +1,448 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author lc
* @DateTime 2022/8/5 11:14
* @DESC
*/
@Data
public class IcUserScreenListResultDTO implements Serializable {
private static final long serialVersionUID = -3215965796907113918L;
private String id;
/**
* 客户Id customer.id
*/
private String customerId;
/**
*
*/
private String agencyId;
/**
*
*/
private String pids;
/**
* 网格ID
*/
private String gridId;
/**
* 所属小区ID
*/
private String villageId;
/**
* 所属楼宇Id
*/
private String buildId;
/**
* 单元id
*/
private String unitId;
/**
* 所属家庭Id
*/
private String homeId;
/**
* 是否本地户籍
*/
private String isBdhj;
/**
* 姓名
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 性别
*/
private String gender;
/**
* 身份证号
*/
private String idCard;
/**
* 出生日期
*/
private String birthday;
/**
* 备注
*/
private String remarks;
/**
* 联系人
*/
private String contacts;
/**
* 联系人电话
*/
private String contactsMobile;
/**
* 九小场所url
*/
private String ninePlace;
/**
* 是否党员
*/
private String isParty;
/**
* 是否低保户
*/
private String isDbh;
/**
* 是否保障房
*/
private String isEnsureHouse;
/**
* 是否失业
*/
private String isUnemployed;
/**
* 是否育龄妇女
*/
private String isYlfn;
/**
* 是否退役军人
*/
private String isVeterans;
/**
* 是否统战人员
*/
private String isUnitedFront;
/**
* 是否信访人员
*/
private String isXfry;
/**
* 是否志愿者
*/
private String isVolunteer;
/**
* 是否老年人
*/
private String isOldPeople;
/**
* 是否空巢
*/
private String isKc;
/**
* 是否失独
*/
private String isSd;
/**
* 是否失能
*/
private String isSn;
/**
* 是否失智
*/
private String isSz;
/**
* 是否残疾
*/
private String isCj;
/**
* 是否大病
*/
private String isDb;
/**
* 是否慢病
*/
private String isMb;
/**
* 是否特殊人群
*/
private String isSpecial;
/**
* 是否租户:1 :0
*/
private String isTenant;
/**
* 是否流动人口:1 :0
*/
private String isFloating;
/**
* 是否新阶层人士:1 :0
*/
private String isXjc;
/**
* 文化程度字典表
*/
private String culture;
/**
* 文化程度备注
*/
private String cultureRemakes;
/**
* 特长字典表
*/
private String specialSkill;
/**
* 兴趣爱好
*/
private String hobby;
/**
* 兴趣爱好备注
*/
private String hobbyRemakes;
/**
* 宗教信仰
*/
private String faith;
/**
* 宗教信仰备注
*/
private String faithRemakes;
/**
* 残疾类别字典表
*/
private String cjlb;
/**
* 残疾登记(状况)字典表
*/
private String cjzk;
/**
* 残疾证号
*/
private String cjzh;
/**
* 残疾说明
*/
private String cjsm;
/**
* 有无监护人yes no
*/
private String ynJdr;
/**
* 有无技能特长yes no
*/
private String ynJntc;
/**
* 有无劳动能力
*/
private String ynLdnl;
/**
* 有无非义务教育阶段助学yes no
*/
private String ynFywjyjdzx;
/**
* 所患大病
*/
private String shdb;
/**
* 患大病时间
*/
private String dbsj;
/**
* 所患慢性病
*/
private String shmxb;
/**
* 患慢性病时间
*/
private String mxbsj;
/**
* 是否参保
*/
private String isCb;
/**
* 自付金额
*/
private String zfje;
/**
* 救助金额
*/
private String jzje;
/**
* 救助时间[yyyy-MM-dd]
*/
private String jzsj;
/**
* 享受救助明细序号
*/
private String jzmxxh;
/**
* 健康信息备注
*/
private String healthRemakes;
/**
* 工作单位
*/
private String gzdw;
/**
* 职业
*/
private String zy;
/**
* 离退休时间
*/
private String ltxsj;
/**
* 工作信息备注
*/
private String workRemake;
/**
* 退休金额
*/
private String txje;
/**
* 月收入
*/
private String ysr;
/**
* 籍贯
*/
private String jg;
/**
* 户籍所在地
*/
private String hjszd;
/**
* 现居住地
*/
private String xjzd;
/**
* 人户情况
*/
private String rhzk;
/**
* 居住信息备注
*/
private String jzxxRemakes;
/**
* 民族字典表
*/
private String mz;
/**
* 与户主关系字典表
*/
private String yhzgx;
/**
* 居住情况字典表
*/
private String jzqk;
/**
* 婚姻状况字典表
*/
private String hyzk;
/**
* 配偶情况字典表
*/
private String poqk;
/**
* 有无赡养人
*/
private String ynSyr;
/**
* 与赡养人关系字典表
*/
private String ysyrgx;
/**
* 赡养人电话
*/
private String syrMobile;
/**
* 家庭信息备注
*/
private String jtxxRemakes;
/**
* 用户状态0:正常;1:迁出;2:注销
*/
private String status;
/**
* 用户详细状态01新增02导入03迁入04新生11迁出21死亡
*/
private String subStatus;
}

22
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserScreenResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author lc
* @DateTime 2022/8/5 11:14
* @DESC
*/
@Data
public class IcUserScreenResultDTO implements Serializable {
private static final long serialVersionUID = -3215965796907113918L;
private String agencyId;
private String agencyName;
private Integer count;
}

2
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserStreetResultDTO.java

@ -5,7 +5,7 @@ import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @Author lc
* @DateTime 2022/8/5 11:14
* @DESC
*/

25
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -1331,4 +1331,29 @@ public class IcResiUserController implements ResultDataResolver {
return new Result<IcUserStreetTypeResultDTO>().ok(icResiUserService.getStreetUserTypeStatistics(streetId));
}
/**
* @Description: 大屏 获取居民统计
* @param agencyId:
* @param level:
* @Return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.IcUserScreenResultDTO>>
* @Author: lichao
* @Date: 2023/12/5 16:45
*/
@GetMapping("screen/getScreenUserStatistics")
public Result<List<IcUserScreenResultDTO>> getScreenUserStatistics(String agencyId,String level){
return new Result<List<IcUserScreenResultDTO>>().ok(icResiUserService.getScreenUserStatistics(agencyId,level));
}
/**
* @Description: 大屏 获取居民列表
* @param dto:
* @Return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData < com.epmet.dto.result.IcUserScreenListResultDTO>>
* @Author: lichao
* @Date: 2023/12/5 16:45
*/
@GetMapping("screen/getScreenUserList")
public Result<PageData<IcUserScreenListResultDTO>> getScreenUserList(IcUserScreenListFormDTO dto) {
PageData<IcUserScreenListResultDTO> result = icResiUserService.getScreenUserList(dto);
return new Result<PageData<IcUserScreenListResultDTO>>().ok(result);
}
}

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

@ -511,4 +511,8 @@ public interface IcResiUserService extends BaseService<IcResiUserEntity> {
List<IcUserStreetResultDTO> getStreetUserStatistics();
IcUserStreetTypeResultDTO getStreetUserTypeStatistics(String streetId);
List<IcUserScreenResultDTO> getScreenUserStatistics(String agencyId, String level);
PageData<IcUserScreenListResultDTO> getScreenUserList(IcUserScreenListFormDTO dto);
}

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

@ -3285,6 +3285,83 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
return result;
}
@Override
public List<IcUserScreenResultDTO> getScreenUserStatistics(String agencyId, String level) {
List<IcUserScreenResultDTO> result = new ArrayList<>();
if (level.equals("street")){
List<CustomerChildAgencyResultDTO> communityList = govOrgOpenFeignClient.getChildAgencyList(agencyId).getData();
communityList.forEach(
community -> {
IcUserScreenResultDTO dto = new IcUserScreenResultDTO();
LambdaQueryWrapper<IcResiUserEntity> userEntityLambdaQueryWrapper
= new LambdaQueryWrapper<IcResiUserEntity>().eq(IcResiUserEntity::getAgencyId, community.getId());
List<IcResiUserEntity> userEntities = baseDao.selectList(userEntityLambdaQueryWrapper);
dto.setAgencyName(community.getOrganizationName());
dto.setAgencyId(community.getId());
dto.setCount(userEntities.size());
result.add(dto);
});
}else if (level.equals("community")){
List<CustomerGridDTO> gridList = govOrgOpenFeignClient.getGridIListByAgency(agencyId).getData();
gridList.forEach(grid-> {
IcUserScreenResultDTO dto = new IcUserScreenResultDTO();
LambdaQueryWrapper<IcResiUserEntity> userEntityLambdaQueryWrapper
= new LambdaQueryWrapper<IcResiUserEntity>().likeRight(IcResiUserEntity::getGridId, grid.getId());
List<IcResiUserEntity> userEntities = baseDao.selectList(userEntityLambdaQueryWrapper);
dto.setAgencyId(grid.getId());
dto.setAgencyName(grid.getGridName());
dto.setCount(userEntities.size());
result.add(dto);
});
}
return result;
}
@Override
public PageData<IcUserScreenListResultDTO> getScreenUserList(IcUserScreenListFormDTO dto) {
List<IcUserScreenListResultDTO> list = new ArrayList<>();
PageInfo<IcUserScreenListResultDTO> pageData = new PageInfo<>();
if (dto.getLevel().equals("community")){
LambdaQueryWrapper<IcResiUserEntity> userEntityLambdaQueryWrapper
= new LambdaQueryWrapper<IcResiUserEntity>().eq(IcResiUserEntity::getAgencyId, dto.getAgencyId());
PageHelper.startPage(dto.getPageNo(),dto.getPageSize());
List<IcResiUserEntity> userEntities = baseDao.selectList(userEntityLambdaQueryWrapper);
PageInfo<IcResiUserEntity> pageInfo = new PageInfo<>(userEntities);
pageData.setTotal(pageInfo.getTotal());
list = ConvertUtils.sourceToTarget(userEntities,IcUserScreenListResultDTO.class);
}else if (dto.getLevel().equals("grid")){
LambdaQueryWrapper<IcResiUserEntity> userEntityLambdaQueryWrapper
= new LambdaQueryWrapper<IcResiUserEntity>().eq(IcResiUserEntity::getGridId, dto.getAgencyId());
PageHelper.startPage(dto.getPageNo(),dto.getPageSize());
List<IcResiUserEntity> userEntities = baseDao.selectList(userEntityLambdaQueryWrapper);
PageInfo<IcResiUserEntity> pageInfo = new PageInfo<>(userEntities);
pageData.setTotal(pageInfo.getTotal());
list = ConvertUtils.sourceToTarget(userEntities,IcUserScreenListResultDTO.class);
}
return new PageData<>(list,pageData.getTotal());
}
public PaCustomerDTO getCustomerInfo(String appId) {
JSONObject jsonObject = new JSONObject();
String data = HttpClientManager.getInstance().sendPostByJSON("https://epmet-cloud.elinkservice.cn/api/third/customermp/getcustomermsg/" + appId, JSON.toJSONString(jsonObject)).getData();

Loading…
Cancel
Save