diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcCityManagementDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcCityManagementDao.java new file mode 100644 index 0000000000..46e2005b33 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcCityManagementDao.java @@ -0,0 +1,17 @@ +package com.epmet.dataaggre.dao.govorg; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dataaggre.entity.govorg.IcCityManagementEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 城市管理图层 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Mapper +public interface IcCityManagementDao extends BaseDao { + + +} \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcDangerousChemicalsDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcDangerousChemicalsDao.java new file mode 100644 index 0000000000..1474d31ef9 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcDangerousChemicalsDao.java @@ -0,0 +1,15 @@ +package com.epmet.dataaggre.dao.govorg; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dataaggre.entity.govorg.IcDangerousChemicalsEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 重点危化品企业 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Mapper +public interface IcDangerousChemicalsDao extends BaseDao { +} \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcHouseDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcHouseDao.java new file mode 100644 index 0000000000..5df9a571dc --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/IcHouseDao.java @@ -0,0 +1,15 @@ +package com.epmet.dataaggre.dao.govorg; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dataaggre.entity.govorg.IcHouseEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 房屋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +@Mapper +public interface IcHouseDao extends BaseDao { +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/heart/IcCommunitySelfOrganizationDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/heart/IcCommunitySelfOrganizationDao.java new file mode 100644 index 0000000000..2499308cf6 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/heart/IcCommunitySelfOrganizationDao.java @@ -0,0 +1,32 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dataaggre.dao.heart; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dataaggre.entity.heart.IcCommunitySelfOrganizationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Mapper +public interface IcCommunitySelfOrganizationDao extends BaseDao { +} \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/IcCityManagementEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/IcCityManagementEntity.java new file mode 100644 index 0000000000..a1baff300a --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/IcCityManagementEntity.java @@ -0,0 +1,76 @@ +package com.epmet.dataaggre.entity.govorg; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 城市管理图层 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_city_management") +public class IcCityManagementEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 所属组织机构Id + */ + private String agencyId; + + /** + * agencyId的所有上级,包含自己 + */ + private String agencyIdPath; + + /** + * 来源【新增:add 导入:import 】 + */ + private String sourceType; + + /** + * 场所名称 + */ + private String name; + + /** + * 场所分类【字典表ic_coverage_category_dict key:city_management】 + */ + private String category; + + /** + * 占地面积,单位平方公里 + */ + private String areaCovered; + + /** + * 容纳人数 + */ + private Integer capacity; + + /** + * 地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/IcDangerousChemicalsEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/IcDangerousChemicalsEntity.java new file mode 100644 index 0000000000..f63c518051 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/IcDangerousChemicalsEntity.java @@ -0,0 +1,91 @@ +package com.epmet.dataaggre.entity.govorg; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 重点危化品企业 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_dangerous_chemicals") +public class IcDangerousChemicalsEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 所属组织机构Id + */ + private String agencyId; + + /** + * agencyId的所有上级,包含自己 + */ + private String agencyIdPath; + + /** + * 来源【新增:add 导入:import 】 + */ + private String sourceType; + + /** + * 企业名称 + */ + private String name; + + /** + * 企业类型【字典表ic_coverage_category_dict key:dangerous_chemicals】 + */ + private String category; + + /** + * 周边安全距离,单位公里 + */ + private String safeDistance; + + /** + * 危化品种类【字典表 ic_danger_type】 + */ + private String dangerType; + + /** + * 负责人姓名 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalMobile; + + /** + * 经营地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 备注 + */ + private String remark; + +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/IcHouseEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/IcHouseEntity.java new file mode 100644 index 0000000000..8f02451776 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/IcHouseEntity.java @@ -0,0 +1,120 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dataaggre.entity.govorg; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 房屋信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-25 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_house") +public class IcHouseEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 小区id + */ + private String neighborHoodId; + + /** + * 片区id,neighbor_hood_part.id,可为空。 + */ + private String partId; + + /** + * 所属楼栋id + */ + private String buildingId; + + /** + * 所属单元id + */ + private String buildingUnitId; + + /** + * 房屋名字后台插入时生成 + */ + private String houseName; + + /** + * 门牌号 + */ + 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; +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/heart/IcCommunitySelfOrganizationEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/heart/IcCommunitySelfOrganizationEntity.java new file mode 100644 index 0000000000..94d8aa3baf --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/heart/IcCommunitySelfOrganizationEntity.java @@ -0,0 +1,115 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dataaggre.entity.heart; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 社区自组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-11-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_community_self_organization") +public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型,agency:组织,grid:网格 + */ + private String orgType; + + /** + * 组织ID的父级 + */ + private String pid; + + /** + * org_id的所有上级 + */ + private String pids; + + /** + * 组织名称 + */ + private String organizationName; + + /** + * 分类,来源于字典表dictType=self_org_category; + */ + private String categoryCode; + + /** + * 组织人数 + */ + private Integer organizationPersonCount; + + /** + * 负责人姓名 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalPhone; + + /** + * 服务事项 + */ + private String serviceItem; + + /** + * 社区自组织创建时间 + */ + private Date organizationCreatedTime; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 备注 + */ + private String remark; + +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgCoverageService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgCoverageService.java index bad471c582..7549b7f76f 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgCoverageService.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgCoverageService.java @@ -1,5 +1,9 @@ package com.epmet.dataaggre.service.govorg; +import com.epmet.dataaggre.entity.govorg.IcCityManagementEntity; +import com.epmet.dataaggre.entity.govorg.IcDangerousChemicalsEntity; +import com.epmet.dataaggre.entity.govorg.IcHouseEntity; +import com.epmet.dataaggre.entity.heart.IcCommunitySelfOrganizationEntity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -35,4 +39,43 @@ public interface GovOrgCoverageService { * @return */ Map> getMappingRelationByCoverageType(List coverageTypes); + + /** + * 搜索城市资源 + * @param customerId + * @param agencyIdPath 查询人所属的组织ID路径,包含他本身所在的组织 + * @param search 关键词,名称 + * @param isPage + * @param pageNo + * @param pageSize + * @return + */ + List searchCityResourceEntities(String customerId, String agencyIdPath, String search, Boolean isPage, + Integer pageNo, Integer pageSize); + + /** + * 搜索危化企业列表 + * @param customerId + * @param agencyIdPath 查询人所属的组织ID路径,包含他本身所在的组织 + * @param search 关键词,名称 + * @param isPage + * @param pageNo + * @param pageSize + * @return + */ + List searchDangerousChemicalEntities(String customerId, String agencyIdPath, String search, Boolean isPage, + Integer pageNo, Integer pageSize); + + /** + * 搜索群租房列表 + * @param customerId + * @param agencyIdPath 查询人所属的组织ID路径,包含他本身所在的组织 + * @param search + * @param isPage + * @param pageNo + * @param pageSize + * @return + */ + List searchGroupRentHouseEntities(String customerId, String agencyIdPath, String search, Boolean isPage, + Integer pageNo, Integer pageSize); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgCoverageServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgCoverageServiceImpl.java index e53d39884b..758331793c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgCoverageServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgCoverageServiceImpl.java @@ -3,9 +3,17 @@ package com.epmet.dataaggre.service.govorg.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.dataaggre.constant.DataSourceConstant; +import com.epmet.dataaggre.dao.govorg.IcCityManagementDao; import com.epmet.dataaggre.dao.govorg.IcCoverageCategoryDictDao; +import com.epmet.dataaggre.dao.govorg.IcDangerousChemicalsDao; +import com.epmet.dataaggre.dao.govorg.IcHouseDao; +import com.epmet.dataaggre.entity.govorg.IcCityManagementEntity; import com.epmet.dataaggre.entity.govorg.IcCoverageCategoryDictEntity; +import com.epmet.dataaggre.entity.govorg.IcDangerousChemicalsEntity; +import com.epmet.dataaggre.entity.govorg.IcHouseEntity; import com.epmet.dataaggre.service.govorg.GovOrgCoverageService; +import com.github.pagehelper.PageHelper; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -21,6 +29,15 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { @Autowired private IcCoverageCategoryDictDao coverageCategoryDictDao; + @Autowired + private IcCityManagementDao cityManagementDao; + + @Autowired + private IcDangerousChemicalsDao dangerousChemicalsDao; + + @Autowired + private IcHouseDao icHouseDao; + /** * 根据categoryKeys分类key列表,查询他们和图层时间的关系,映射为一个map * @param categoryKeys @@ -63,4 +80,59 @@ public class GovOrgCoverageServiceImpl implements GovOrgCoverageService { } return mapping; } + + /** + * 搜索城市资源 + * @param customerId + * @param agencyIdPath 查询人所属的组织ID路径,包含他本身所在的组织 + * @param search 关键词,名称 + * @param isPage + * @param pageNo + * @param pageSize + * @return + */ + @Override + public List searchCityResourceEntities(String customerId, String agencyIdPath, String search, Boolean isPage, Integer pageNo, Integer pageSize) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(IcCityManagementEntity::getCustomerId, customerId); + query.likeRight(IcCityManagementEntity::getAgencyIdPath, agencyIdPath); + if (StringUtils.isNotBlank(search)) { + query.like(IcCityManagementEntity::getName, search); + } + + if (isPage) { + PageHelper.startPage(pageNo ,pageSize); + } + return cityManagementDao.selectList(query); + } + + /** + * 搜索危化企业列表 + * @param customerId + * @param agencyIdPath 查询人所属的组织ID路径,包含他本身所在的组织 + * @param search 关键词,名称 + * @param isPage + * @param pageNo + * @param pageSize + * @return + */ + @Override + public List searchDangerousChemicalEntities(String customerId, String agencyIdPath, String search, Boolean isPage, Integer pageNo, Integer pageSize) { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(IcDangerousChemicalsEntity::getCustomerId, customerId); + query.likeRight(IcDangerousChemicalsEntity::getAgencyIdPath, agencyIdPath); + if (StringUtils.isNotBlank(search)) { + query.like(IcDangerousChemicalsEntity::getName, search); + } + + if (isPage) { + PageHelper.startPage(pageNo ,pageSize); + } + return dangerousChemicalsDao.selectList(query); + } + + @Override + public List searchGroupRentHouseEntities(String customerId, String agencyIdPath, String search, Boolean isPage, Integer pageNo, Integer pageSize) { + return null; + } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/heart/HeartService.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/heart/HeartService.java new file mode 100644 index 0000000000..a48ff394b8 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/heart/HeartService.java @@ -0,0 +1,23 @@ +package com.epmet.dataaggre.service.heart; + +import com.epmet.dataaggre.entity.heart.IcCommunitySelfOrganizationEntity; + +import java.util.List; + +/** + * heart service + */ +public interface HeartService { + /** + * 搜索社区自组织列表 + * @param customerId 客户ID + * @param agencyId 当前查询人员所属组织ID + * @param agencyPids 当前查询人员所属组织的所有上级id path + * @param search 搜索条件 + * @param isPage + * @param pageNo + * @param pageSize + * @return + */ + List searchCommunityOrgEntities(String customerId, String agencyId, String agencyPids, String search, Boolean isPage, Integer pageNo, Integer pageSize); +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/heart/impl/HeartServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/heart/impl/HeartServiceImpl.java new file mode 100644 index 0000000000..6774ae9b0d --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/heart/impl/HeartServiceImpl.java @@ -0,0 +1,47 @@ +package com.epmet.dataaggre.service.heart.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.epmet.dataaggre.dao.heart.IcCommunitySelfOrganizationDao; +import com.epmet.dataaggre.entity.heart.IcCommunitySelfOrganizationEntity; +import com.epmet.dataaggre.service.heart.HeartService; +import com.epmet.dto.result.PartyMemberUserIdsResultDTO; +import com.github.pagehelper.PageHelper; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class HeartServiceImpl implements HeartService { + + @Autowired + private IcCommunitySelfOrganizationDao communitySelfOrganizationDao; + + /** + * 搜索社区自组织列表 + * @param customerId 客户ID + * @param agencyId 当前查询人员所属组织ID + * @param agencyPids 当前查询人员所属组织的所有上级id path + * @param search 搜索条件 + * @return 社区自组织列表 + */ + @Override + public List searchCommunityOrgEntities( + String customerId, String agencyId, String agencyPids, String search, + Boolean isPage, Integer pageNo, Integer pageSize) { + + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.eq(IcCommunitySelfOrganizationEntity::getCustomerId, customerId); + query.like(IcCommunitySelfOrganizationEntity::getOrganizationName, search); + query.or(q -> q.eq(IcCommunitySelfOrganizationEntity::getOrgId, agencyId).likeRight(IcCommunitySelfOrganizationEntity::getPids, agencyPids)); + if (StringUtils.isNotBlank(search)) { + query.like(IcCommunitySelfOrganizationEntity::getOrganizationName, search); + } + + if (isPage) { + PageHelper.startPage(pageNo, pageSize); + } + return communitySelfOrganizationDao.selectList(query); + } +} diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java index 75fc1d6192..bd3456f43b 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java @@ -9,11 +9,15 @@ import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.dataaggre.dto.epmetuser.result.IcResiInfoResultDTO; import com.epmet.dataaggre.dto.govorg.result.CoverageAnalisisDataListResultDTO; import com.epmet.dataaggre.entity.epmetuser.IcResiUserEntity; +import com.epmet.dataaggre.entity.govorg.IcCityManagementEntity; +import com.epmet.dataaggre.entity.govorg.IcDangerousChemicalsEntity; +import com.epmet.dataaggre.entity.heart.IcCommunitySelfOrganizationEntity; import com.epmet.dataaggre.service.CoverageService; import com.epmet.dataaggre.service.epmetuser.IcResiService; import com.epmet.dataaggre.service.epmetuser.impl.IcResiServiceImpl; import com.epmet.dataaggre.service.govorg.GovOrgCoverageService; import com.epmet.dataaggre.service.govorg.GovOrgService; +import com.epmet.dataaggre.service.heart.HeartService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -38,6 +42,9 @@ public class CoverageServiceImpl implements CoverageService { @Autowired private IcResiService icResiService; + @Autowired + private HeartService heartService; + /** * 场所类型常量 */ @@ -52,9 +59,6 @@ public class CoverageServiceImpl implements CoverageService { public static final String PLACE_TYPE_PUBLIC_SERVICE= "public_service"; public static final String PLACE_TYPE_SUPERIOR_RESOURCE= "superior_resource"; - /** 优势资源 **/ - public static final String PLACE_TYPE_YSZY= "yszy"; - /** * 图层,大屏数据分析,数据列表 * @param coverageTypes 图层列表 @@ -124,15 +128,20 @@ public class CoverageServiceImpl implements CoverageService { /** * 执行数据查询 - * @param categoryKey + * @param customerId + * @param agencyId 查询的工作人员所在组织id + * @param staffOrgIds 查询的工作人员所在组织的id path,包含agencyId + * @param placeType 场所类型 + * @param categoryKey 类别key + * @param search 关键词 * @return */ - public List doDataListSearch(String customerId, String agencyId, String agencyPids, String placeType, String categoryKey, String search, + public List doDataListSearch(String customerId, String agencyId, String staffOrgIds, String placeType, String categoryKey, String search, Integer pageNo, Integer pageSize,Boolean isPage) { if (PLACE_TYPE_RESI.equals(placeType)) { // 使用分类查询居民信息 - List resiEntities = icResiService.listResisByCategories4Coverage(customerId, agencyId, agencyPids, categoryKey, search, pageNo, pageSize, isPage); + List resiEntities = icResiService.listResisByCategories4Coverage(customerId, agencyId, staffOrgIds, categoryKey, search, pageNo, pageSize, isPage); return resiEntities.stream().map(re -> { // 使用楼栋的坐标补充居民的坐标信息 BuildingInfoCache resiBuilding = getBuildingInfo(re.getId(), re.getBuildId()); @@ -140,20 +149,50 @@ public class CoverageServiceImpl implements CoverageService { }).collect(Collectors.toList()); } else if (PLACE_TYPE_SPECIAL_RESI.equals(placeType)) { // 特殊人群 - List resiInfos = icResiService.listSpecialResisBySpecialType(customerId, agencyId, agencyPids, categoryKey, search, pageNo, pageSize, isPage); + List resiInfos = icResiService.listSpecialResisBySpecialType(customerId, agencyId, staffOrgIds, categoryKey, search, pageNo, pageSize, isPage); return resiInfos.stream().map(re -> { BuildingInfoCache resiBuilding = getBuildingInfo(re.getId(), re.getBuildId()); return new CoverageAnalisisDataListResultDTO(re.getId(), categoryKey, placeType, re.getName(), resiBuilding.getLatitude(), resiBuilding.getLongitude()); }).collect(Collectors.toList()); } else if (PLACE_TYPE_EVENT.equals(placeType)) { - // 难点痛点 + // 难点痛点 todo + } else if (PLACE_TYPE_CITY_MANAGEMENT.equals(placeType)) { + // 城市资源管理 + List cityResources = orgCoverageService.searchCityResourceEntities(customerId, staffOrgIds, search, isPage, pageNo, pageSize); + cityResources.stream() + .map(resource -> new CoverageAnalisisDataListResultDTO(resource.getId(), categoryKey, placeType, resource.getName(), resource.getLatitude(), resource.getLongitude())) + .collect(Collectors.toList()); - } else if (PLACE_TYPE_YSZY.equals(placeType)) { + } else if (PLACE_TYPE_COMUNITY_ORG.equals(placeType)) { + // 社区自组织 + List l = heartService.searchCommunityOrgEntities(customerId, agencyId, staffOrgIds, search, isPage, pageNo, pageSize); + return l.stream() + .map(org -> new CoverageAnalisisDataListResultDTO(org.getId(), categoryKey, placeType, org.getOrganizationName(), org.getLatitude(), org.getLongitude())) + .collect(Collectors.toList()); + } else if (PLACE_TYPE_DANGEROUS_CHEMICALS.equals(placeType)) { + // 危化企业 + List l = orgCoverageService.searchDangerousChemicalEntities(customerId, staffOrgIds, search, isPage, pageNo, pageSize); + return l.stream().map(dc -> new CoverageAnalisisDataListResultDTO(dc.getId(), categoryKey, placeType, dc.getName(), dc.getLatitude(), dc.getLongitude())) + .collect(Collectors.toList()); + } else if (PLACE_TYPE_ENTERPRISE_PARTROL.equals(placeType)) { + // 企事业单位巡查 todo + + + } else if (PLACE_TYPE_GROUP_RENT.equals(placeType)) { + // 群租房。出租的房屋,住的人口超过5人属于群租房(是个规定) - } + } else if (PLACE_TYPE_PUBLIC_SERVICE.equals(placeType)) { + // 公共服务 + + + } else if (PLACE_TYPE_SUPERIOR_RESOURCE.equals(placeType)) { + // 优势资源 + + + } return null; } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcCityManagementDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcCityManagementDao.xml new file mode 100644 index 0000000000..8cdd63a520 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcCityManagementDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcDangerousChemicalsDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcDangerousChemicalsDao.xml new file mode 100644 index 0000000000..1892256119 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcDangerousChemicalsDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcHouseDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcHouseDao.xml new file mode 100644 index 0000000000..98bc2f33de --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/IcHouseDao.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/heart/IcCommunitySelfOrganizationDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/heart/IcCommunitySelfOrganizationDao.xml new file mode 100644 index 0000000000..c785e28c0d --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/heart/IcCommunitySelfOrganizationDao.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file