forked from rongchao/epmet-cloud-rizhao
				
			
				 20 changed files with 790 additions and 13 deletions
			
			
		| @ -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<IcCityManagementEntity> { | |||
| 
 | |||
| 
 | |||
| } | |||
| @ -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<IcDangerousChemicalsEntity> { | |||
| } | |||
| @ -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<IcHouseEntity> { | |||
| } | |||
| @ -0,0 +1,32 @@ | |||
| /** | |||
|  * 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.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<IcCommunitySelfOrganizationEntity> { | |||
| } | |||
| @ -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; | |||
| 
 | |||
| } | |||
| @ -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; | |||
| 
 | |||
| } | |||
| @ -0,0 +1,120 @@ | |||
| /** | |||
|  * 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.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; | |||
| } | |||
| @ -0,0 +1,115 @@ | |||
| /** | |||
|  * 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.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; | |||
| 
 | |||
| } | |||
| @ -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<IcCommunitySelfOrganizationEntity> searchCommunityOrgEntities(String customerId, String agencyId, String agencyPids, String search, Boolean isPage, Integer pageNo, Integer pageSize); | |||
| } | |||
| @ -0,0 +1,50 @@ | |||
| package com.epmet.dataaggre.service.heart.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.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; | |||
| 
 | |||
| @DataSource(value = DataSourceConstant.EPMET_HEART) | |||
| @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<IcCommunitySelfOrganizationEntity> searchCommunityOrgEntities( | |||
|             String customerId, String agencyId, String agencyPids, String search, | |||
|             Boolean isPage, Integer pageNo, Integer pageSize) { | |||
| 
 | |||
|         LambdaQueryWrapper<IcCommunitySelfOrganizationEntity> 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); | |||
|     } | |||
| } | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| 
 | |||
| <mapper namespace="com.epmet.dataaggre.dao.govorg.IcCityManagementDao"> | |||
| 
 | |||
| </mapper> | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| 
 | |||
| <mapper namespace="com.epmet.dataaggre.dao.govorg.IcDangerousChemicalsDao"> | |||
| 
 | |||
| </mapper> | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| 
 | |||
| <mapper namespace="com.epmet.dataaggre.dao.govorg.IcHouseDao"> | |||
| 
 | |||
| </mapper> | |||
| @ -0,0 +1,5 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| 
 | |||
| <mapper namespace="com.epmet.dataaggre.dao.heart.IcCommunitySelfOrganizationDao"> | |||
| </mapper> | |||
					Loading…
					
					
				
		Reference in new issue