forked from rongchao/epmet-cloud-rizhao
145 changed files with 7366 additions and 90 deletions
@ -0,0 +1,13 @@ |
|||
package com.epmet.commons.rocketmq.constants; |
|||
|
|||
/** |
|||
* @Description MQ用户自定义属性 |
|||
* @author wxz |
|||
* @date 2021.10.14 15:47:03 |
|||
*/ |
|||
public interface MQUserPropertys { |
|||
|
|||
//阻塞消息label
|
|||
String BLOCKED_MSG_LABEL = "blockedMsgLabel"; |
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.epmet.commons.rocketmq.messages; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 组织、网格、人员中间库数据上报MQ |
|||
* @author sun |
|||
*/ |
|||
@Data |
|||
public class OrgOrStaffMQMsg implements Serializable { |
|||
|
|||
//客户Id
|
|||
private String customerId; |
|||
//组织、网格、人员Id
|
|||
private String orgId; |
|||
//数据类型【组织:agency 网格:grid 人员:staff】
|
|||
private String orgType; |
|||
//操作类型【组织新增:agency_create 组织变更:agency_change 网格新增:grid_create 网格变更:grid_change 人员新增:staff_create 人员变更:staff_change】
|
|||
private String type; |
|||
|
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.commons.rocketmq.messages; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 用户巡查消息体 |
|||
* @author liujianjun |
|||
*/ |
|||
@Data |
|||
public class StaffPatrolMQMsg { |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 巡查记录id |
|||
*/ |
|||
private String patrolId; |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.basereport.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/10/15 10:55 |
|||
*/ |
|||
@Data |
|||
public class EventInfoFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 8479649048108914555L; |
|||
private String customerId; |
|||
private String projectId; |
|||
/** |
|||
* 操作类型【新增:add 修改删除:edit】 |
|||
*/ |
|||
private String type; |
|||
} |
@ -0,0 +1,143 @@ |
|||
package com.epmet.dto.basereport.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/10/15 10:57 |
|||
*/ |
|||
@Data |
|||
public class EventInfoResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -6483163020737762044L; |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格编码 |
|||
*/ |
|||
private String orgCode; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String orgName; |
|||
|
|||
/** |
|||
* 事件名称 |
|||
*/ |
|||
private String eventName; |
|||
|
|||
/** |
|||
* 事件类别 |
|||
*/ |
|||
private String eventCategory; |
|||
|
|||
/** |
|||
* 上报时间 YYYY-MM-DD HH:MM:SS |
|||
*/ |
|||
private Date reportTime; |
|||
|
|||
/** |
|||
* 发生时间 格式为“YYYY-MM-DD” |
|||
*/ |
|||
private Date happenDate; |
|||
|
|||
/** |
|||
* 发生地点 |
|||
*/ |
|||
private String happenPlace; |
|||
|
|||
/** |
|||
* 事件简述 |
|||
*/ |
|||
private String eventDescription; |
|||
|
|||
/** |
|||
* 办结方式 01自办;02上报 源于居民端的最终结案的项目为02;工作端立项的项目最终结案的01 |
|||
*/ |
|||
private String waysOfResolving; |
|||
|
|||
/** |
|||
* 是否办结 Y:是、N:否 |
|||
*/ |
|||
private String successfulOrNo; |
|||
|
|||
/** |
|||
* 办结层级01省、自治区、直辖市02地、市、州、盟03县、市、区、旗04乡镇、街道05片区06村、社区07网格 |
|||
*/ |
|||
private String completeLevel; |
|||
|
|||
/** |
|||
* 基础信息主键 |
|||
*/ |
|||
private String baseInfoId; |
|||
|
|||
/** |
|||
* 办结时间 |
|||
*/ |
|||
private Date completeTime; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private BigDecimal lng; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private BigDecimal lat; |
|||
|
|||
/** |
|||
* 主要当事人姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 涉及人数 |
|||
*/ |
|||
private Integer numberInvolved; |
|||
|
|||
/** |
|||
* 涉及单位 |
|||
*/ |
|||
private String relatedUnits; |
|||
|
|||
/** |
|||
* 重点场所类别 01九小场所, 02公共场所 |
|||
*/ |
|||
private String keyAreaType; |
|||
|
|||
/** |
|||
* 宗教活动规模 01 0-50人,02 51-200人,03 201人以上 |
|||
|
|||
*/ |
|||
private String religionScale; |
|||
|
|||
/** |
|||
* 宗教类别 01道教 02佛教 03基督教 04伊斯兰教 05其他 |
|||
|
|||
*/ |
|||
private String religionType; |
|||
|
|||
/** |
|||
* 重点场所是否变动 Y:是、N:否 |
|||
*/ |
|||
private String isKeyareaState; |
|||
|
|||
/** |
|||
* 重点人员是否在当地 Y:是、N:否 |
|||
*/ |
|||
private String isKeypeopleLocate; |
|||
|
|||
/** |
|||
* 重点人员现状 |
|||
*/ |
|||
private String keypeopleStatus; |
|||
} |
@ -0,0 +1,145 @@ |
|||
/** |
|||
* 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.org.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 机关单位信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-04-20 |
|||
*/ |
|||
@Data |
|||
public class CustomerAgencyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID |
|||
*/ |
|||
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 String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 总人数 |
|||
*/ |
|||
private Integer totalUser; |
|||
|
|||
/** |
|||
* 省 |
|||
*/ |
|||
private String province; |
|||
|
|||
/** |
|||
* 市 |
|||
*/ |
|||
private String city; |
|||
|
|||
/** |
|||
* 区县 |
|||
*/ |
|||
private String district; |
|||
|
|||
/** |
|||
* 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701 |
|||
*/ |
|||
private String parentAreaCode; |
|||
|
|||
/** |
|||
* 街道 |
|||
*/ |
|||
private String street; |
|||
|
|||
/** |
|||
* 社区 |
|||
*/ |
|||
private String community; |
|||
} |
@ -0,0 +1,129 @@ |
|||
/** |
|||
* 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.org.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 客户网格表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-16 |
|||
*/ |
|||
@Data |
|||
public class CustomerGridDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** 组织-网格 */ |
|||
private String gridNamePath; |
|||
|
|||
/** |
|||
* 中心位置经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 中心位置纬度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 所属地区码(所属组织地区码) |
|||
*/ |
|||
private String areaCode; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 管辖区域 |
|||
*/ |
|||
private String manageDistrict; |
|||
|
|||
/** |
|||
* 当前网格总人数 |
|||
*/ |
|||
private Integer totalUser; |
|||
|
|||
/** |
|||
* 所属组织机构ID(customer_organization.id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 所有上级组织ID |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 所属组织机构名 |
|||
*/ |
|||
private String agencyName; |
|||
|
|||
/** |
|||
* 所有上级组织名 |
|||
*/ |
|||
private String allParentName; |
|||
} |
@ -0,0 +1,103 @@ |
|||
/** |
|||
* 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.org.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 网格员基础信息表 |
|||
*/ |
|||
@Data |
|||
public class GridBaseInfoDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 工作人员Id |
|||
*/ |
|||
private String staffId; |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 网格员姓名 |
|||
*/ |
|||
private String GRID_LEVEL; |
|||
|
|||
/** |
|||
* 专属网格类型[01:党政机关; 02:医院; 03:学校; 04:企业; 05:园区; 06:商圈; 07:市场; 08:景区; |
|||
*/ |
|||
private String GRID_TYPE; |
|||
|
|||
/** |
|||
* 网格内人口规模[01:500人以下(含500人); 02:500-1000人(含1000人); 03:1000-1500人(含1500人); 04:1500人以上] |
|||
*/ |
|||
private String POPULATION_SIZE; |
|||
|
|||
/** |
|||
* 是否成立网格党支部或网格党小组[Y:是、N:否] |
|||
*/ |
|||
private String IS_PARTY_BRANCH; |
|||
|
|||
/** |
|||
* 网格党组织类型[01:网格党支部; 02:网格党小组] |
|||
*/ |
|||
private String PARTY_BRANCH_TYPE; |
|||
|
|||
/** |
|||
* 中心点(质心)经度 |
|||
*/ |
|||
private String LNG; |
|||
|
|||
/** |
|||
* 中心点(质心)纬度 |
|||
*/ |
|||
private String LAT; |
|||
|
|||
/** |
|||
* 网格颜色 |
|||
*/ |
|||
private Date GRID_COLOR; |
|||
|
|||
/** |
|||
* 空间范围 |
|||
*/ |
|||
private String SHAPE; |
|||
|
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.dto.user.param; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* desc:查询巡查 参数 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/6/7 16:23 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class MidPatrolFormDTO extends PageFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 4411051728689886810L; |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 巡查记录id 没有则查询全部 |
|||
*/ |
|||
private String patrolId; |
|||
|
|||
} |
@ -0,0 +1,182 @@ |
|||
/** |
|||
* 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.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 网格员基础信息表 |
|||
*/ |
|||
@Data |
|||
public class GridUserInfoDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 工作人员Id |
|||
*/ |
|||
private String staffId; |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 网格员姓名 |
|||
*/ |
|||
private String nickName; |
|||
|
|||
/** |
|||
* 专属网格类型[01:党政机关; 02:医院; 03:学校; 04:企业; 05:园区; 06:商圈; 07:市场; 08:景区; |
|||
*/ |
|||
private String cardNum; |
|||
|
|||
/** |
|||
* 网格员类型[01:专职网格员; 02:兼职网格员; 03:网格长; 04:综治机构人员; 05:职能部门人员] |
|||
*/ |
|||
private String userType; |
|||
|
|||
/** |
|||
* 手机号码 |
|||
*/ |
|||
private String phonenumber; |
|||
|
|||
/** |
|||
* 性别[1:男性; 2:女性; 9:未说明的性别] |
|||
*/ |
|||
private String sex; |
|||
|
|||
/** |
|||
* 民族[字典表主键] |
|||
*/ |
|||
private String nation; |
|||
|
|||
/** |
|||
* 政治面貌[字典表主键] |
|||
*/ |
|||
private String paerty; |
|||
|
|||
/** |
|||
* 出生日期[YYYY-MM-DD] |
|||
*/ |
|||
private Date birthday; |
|||
|
|||
/** |
|||
* 学历[字典表主键] |
|||
*/ |
|||
private String education; |
|||
|
|||
/** |
|||
* 入职时间 |
|||
*/ |
|||
private Date entryDate; |
|||
|
|||
/** |
|||
* 是否离职 |
|||
*/ |
|||
private String isLeave; |
|||
|
|||
/** |
|||
* 离职时间 |
|||
*/ |
|||
private Date leaveDate; |
|||
|
|||
/** |
|||
* 网格员年收入 |
|||
*/ |
|||
private String income; |
|||
|
|||
/** |
|||
* 是否社区(村)两委委员[Y:是、N:否] |
|||
*/ |
|||
private String isCommittee; |
|||
|
|||
/** |
|||
* 是否社区工作者[Y:是、N:否] |
|||
*/ |
|||
private String isCommunityWorkers; |
|||
|
|||
/** |
|||
* 是否社会工作者[Y:是、N:否] |
|||
*/ |
|||
private String isSocialWorker; |
|||
|
|||
/** |
|||
* 是否村(居)民小组长[Y:是、N:否 |
|||
*/ |
|||
private String isVillageLeader; |
|||
|
|||
/** |
|||
* 是否警务助理[Y:是、N:否] |
|||
*/ |
|||
private String isPoliceAssistant; |
|||
|
|||
/** |
|||
* 是否人民调解员[Y:是、N:否] |
|||
*/ |
|||
private String isMediator; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
/** |
|||
* 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.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 工作人员巡查明细记录 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-06-07 |
|||
*/ |
|||
@Data |
|||
public class MidPatrolDetailResult implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 维度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
} |
@ -0,0 +1,137 @@ |
|||
/** |
|||
* 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.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 工作人员巡查主记录 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-06-07 |
|||
*/ |
|||
@Data |
|||
public class MidPatrolRecordResult implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String grid; |
|||
|
|||
/** |
|||
* 网格所有上级id |
|||
*/ |
|||
private String gridPids; |
|||
|
|||
/** |
|||
* 工作人员用户id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 工作人员所属组织id=网格所属的组织id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 巡查开始时间 |
|||
*/ |
|||
private Date patrolStartTime; |
|||
|
|||
/** |
|||
* 巡查结束时间,前端传入 |
|||
*/ |
|||
private Date patrolEndTime; |
|||
|
|||
/** |
|||
* 实际结束时间=操作结束巡查的时间 |
|||
*/ |
|||
private Date actrualEndTime; |
|||
|
|||
/** |
|||
* 本次巡查总耗时,单位秒;结束巡查时写入 |
|||
*/ |
|||
private Integer totalTime; |
|||
|
|||
/** |
|||
* 正在巡查中:patrolling;结束:end |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 维度 |
|||
*/ |
|||
private String latitude; |
|||
|
|||
/** |
|||
* 精度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 经纬度组合成的路线 经度,维度; |
|||
*/ |
|||
private String route; |
|||
|
|||
} |
@ -0,0 +1,105 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.basereport.form.EventInfoFormDTO; |
|||
import com.epmet.dto.org.result.CustomerAgencyDTO; |
|||
import com.epmet.dto.org.result.CustomerGridDTO; |
|||
import com.epmet.dto.user.param.MidPatrolFormDTO; |
|||
import com.epmet.dto.user.result.GridUserInfoDTO; |
|||
import com.epmet.dto.user.result.MidPatrolDetailResult; |
|||
import com.epmet.dto.user.result.MidPatrolRecordResult; |
|||
import com.epmet.opendata.dto.BaseDisputeProcessDTO; |
|||
import com.epmet.opendata.dto.form.GridBaseInfoFormDTO; |
|||
import com.epmet.opendata.dto.form.StaffBaseInfoFormDTO; |
|||
import com.epmet.service.DataReportingService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @dscription 省网格化平台数据上报--数据查询 |
|||
* @author sun |
|||
*/ |
|||
@RequestMapping("datareporting") |
|||
@RestController |
|||
public class DataReportingController { |
|||
@Autowired |
|||
private DataReportingService dataReportingService; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 批量查询客户组织基础信息 |
|||
**/ |
|||
@PostMapping("agencybaseinfo") |
|||
public Result<List<CustomerAgencyDTO>> getAgencyBaseInfo(@RequestBody(required = false) GridBaseInfoFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, GridBaseInfoFormDTO.Grid.class); |
|||
return new Result<List<CustomerAgencyDTO>>().ok(dataReportingService.getAgencyBaseInfo(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 批量查询客户网格基础信息 |
|||
**/ |
|||
@PostMapping("gridbaseinfo") |
|||
public Result<List<CustomerGridDTO>> getGridBaseInfo(@RequestBody(required = false) GridBaseInfoFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, GridBaseInfoFormDTO.Grid.class); |
|||
return new Result<List<CustomerGridDTO>>().ok(dataReportingService.getGridBaseInfo(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 批量查询客户网格员基础信息 |
|||
**/ |
|||
@PostMapping("staffbaseinfo") |
|||
public Result<List<GridUserInfoDTO>> getStaffBaseInfo(@RequestBody(required = false) StaffBaseInfoFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, StaffBaseInfoFormDTO.Staff.class); |
|||
return new Result<List<GridUserInfoDTO>>().ok(dataReportingService.getStaffBaseInfo(formDTO)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* desc: 条件获取巡查主表信息 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.user.result.MidPatrolRecordResult>> |
|||
* @author LiuJanJun |
|||
* @date 2021/10/15 12:01 下午 |
|||
*/ |
|||
@PostMapping("getPatrolRecordList") |
|||
public Result<List<MidPatrolRecordResult>> getPatrolRecordList(@RequestBody(required = false) MidPatrolFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, StaffBaseInfoFormDTO.Staff.class); |
|||
return new Result<List<MidPatrolRecordResult>>().ok(dataReportingService.getPatrolRecordList(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* desc: 条件获取巡查明细信息 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.user.result.CustomerStaffDTO>> |
|||
* @author LiuJanJun |
|||
* @date 2021/10/15 12:01 下午 |
|||
*/ |
|||
@PostMapping("getPatrolDetailList") |
|||
public Result<List<MidPatrolDetailResult>> getPatrolDetailList(@RequestBody(required = false) MidPatrolFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, StaffBaseInfoFormDTO.Staff.class); |
|||
return new Result<List<MidPatrolDetailResult>>().ok(dataReportingService.getPatrolDetailList(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 事件上报 |
|||
* @Param formDTO |
|||
* @Return {@link Result<List<BaseDisputeProcessDTO>>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/10/15 14:09 |
|||
*/ |
|||
@PostMapping("eventinfo") |
|||
public Result<List<BaseDisputeProcessDTO>> getEventInfo(@RequestBody(required = false) EventInfoFormDTO formDTO) { |
|||
return new Result<List<BaseDisputeProcessDTO>>().ok(dataReportingService.getEventInfo(formDTO)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,73 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.dto.basereport.form.EventInfoFormDTO; |
|||
import com.epmet.dto.basereport.result.EventInfoResultDTO; |
|||
import com.epmet.dto.org.result.CustomerAgencyDTO; |
|||
import com.epmet.dto.org.result.CustomerGridDTO; |
|||
import com.epmet.dto.user.param.MidPatrolFormDTO; |
|||
import com.epmet.dto.user.result.GridUserInfoDTO; |
|||
import com.epmet.dto.user.result.MidPatrolDetailResult; |
|||
import com.epmet.dto.user.result.MidPatrolRecordResult; |
|||
import com.epmet.opendata.dto.BaseDisputeProcessDTO; |
|||
import com.epmet.opendata.dto.form.GridBaseInfoFormDTO; |
|||
import com.epmet.opendata.dto.form.StaffBaseInfoFormDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @dscription 省网格化平台数据上报--数据查询 |
|||
* @author sun |
|||
*/ |
|||
public interface DataReportingService { |
|||
/** |
|||
* @Author sun |
|||
* @Description 批量查询客户组织基础信息 |
|||
* |
|||
* @return*/ |
|||
List<CustomerAgencyDTO> getAgencyBaseInfo(GridBaseInfoFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 批量查询客户网格基础信息 |
|||
* |
|||
* @return*/ |
|||
List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 批量查询客户网格员基础信息 |
|||
* |
|||
* @return*/ |
|||
List<GridUserInfoDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO); |
|||
|
|||
/** |
|||
* desc: 获取巡查记录列表 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.dto.user.result.CustomerStaffDTO> |
|||
* @author LiuJanJun |
|||
* @date 2021/10/15 1:21 下午 |
|||
*/ |
|||
List<MidPatrolRecordResult> getPatrolRecordList(MidPatrolFormDTO formDTO); |
|||
|
|||
/** |
|||
* desc: 获取巡查明细列表 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.dto.user.result.MidPatrolDetailResult> |
|||
* @author LiuJanJun |
|||
* @date 2021/10/15 1:22 下午 |
|||
*/ |
|||
List<MidPatrolDetailResult> getPatrolDetailList(MidPatrolFormDTO formDTO); |
|||
|
|||
|
|||
/** |
|||
* 事件上报 |
|||
* @Param formDTO |
|||
* @Return {@link List<EventInfoResultDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/10/15 14:10 |
|||
*/ |
|||
List<BaseDisputeProcessDTO> getEventInfo(EventInfoFormDTO formDTO); |
|||
|
|||
} |
@ -0,0 +1,235 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.commons.tools.constant.StrConstant; |
|||
import com.epmet.commons.tools.utils.DateUtils; |
|||
import com.epmet.constant.OrgTypeConstant; |
|||
import com.epmet.constant.ProjectConstant; |
|||
import com.epmet.dto.basereport.form.EventInfoFormDTO; |
|||
import com.epmet.dto.org.result.CustomerAgencyDTO; |
|||
import com.epmet.dto.org.result.CustomerGridDTO; |
|||
import com.epmet.dto.screen.ScreenCustomerGridDTO; |
|||
import com.epmet.dto.screen.ScreenProjectDataDTO; |
|||
import com.epmet.dto.user.param.MidPatrolFormDTO; |
|||
import com.epmet.dto.user.result.CustomerStaffDTO; |
|||
import com.epmet.dto.user.result.GridUserInfoDTO; |
|||
import com.epmet.dto.user.result.MidPatrolDetailResult; |
|||
import com.epmet.dto.user.result.MidPatrolRecordResult; |
|||
import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; |
|||
import com.epmet.entity.stats.CustomerProjectCategoryDictEntity; |
|||
import com.epmet.opendata.dto.BaseDisputeProcessDTO; |
|||
import com.epmet.opendata.dto.form.GridBaseInfoFormDTO; |
|||
import com.epmet.opendata.dto.form.StaffBaseInfoFormDTO; |
|||
import com.epmet.service.DataReportingService; |
|||
import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService; |
|||
import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService; |
|||
import com.epmet.service.evaluationindex.screen.ScreenProjectDataService; |
|||
import com.epmet.service.org.CustomerAgencyService; |
|||
import com.epmet.service.org.CustomerGridService; |
|||
import com.epmet.service.stats.CustomerProjectCategoryDictService; |
|||
import com.epmet.service.user.StatsStaffPatrolService; |
|||
import com.epmet.service.user.UserService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* @dscription 省网格化平台数据上报--数据查询 |
|||
* @author sun |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class DataReportingServiceImpl implements DataReportingService { |
|||
@Autowired |
|||
private CustomerAgencyService customerAgencyService; |
|||
@Autowired |
|||
private CustomerGridService customerGridService; |
|||
@Autowired |
|||
private UserService userService; |
|||
@Resource |
|||
private ScreenProjectDataService screenProjectDataService; |
|||
@Resource |
|||
private ScreenCustomerAgencyService screenCustomerAgencyService; |
|||
@Resource |
|||
private ScreenCustomerGridService screenCustomerGridService; |
|||
@Autowired |
|||
private StatsStaffPatrolService statsStaffPatrolService; |
|||
@Resource |
|||
private CustomerProjectCategoryDictService customerProjectCategoryDictService; |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 批量查询客户组织基础信息 |
|||
**/ |
|||
@Override |
|||
public List<CustomerAgencyDTO> getAgencyBaseInfo(GridBaseInfoFormDTO formDTO) { |
|||
//批量查询客户组织信息
|
|||
List<CustomerAgencyDTO> resultList = customerAgencyService.getAgencyBaseInfo(formDTO); |
|||
return resultList; |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 批量查询客户网格基础信息 |
|||
**/ |
|||
@Override |
|||
public List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO) { |
|||
//批量查询客户网格信息
|
|||
List<CustomerGridDTO> resultList = customerGridService.getGridBaseInfo(formDTO); |
|||
return resultList; |
|||
} |
|||
|
|||
/** |
|||
* @Author sun |
|||
* @Description 批量查询客户网格员基础信息 |
|||
**/ |
|||
@Override |
|||
public List<GridUserInfoDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) { |
|||
//1.查询工作人员所属网格信息
|
|||
List<GridUserInfoDTO> resultList = customerGridService.getStaffGrid(formDTO); |
|||
|
|||
//2.查询工作人员基础信息
|
|||
List<CustomerStaffDTO> staffDTOList = userService.getStaffBaseInfo(formDTO); |
|||
if (CollectionUtils.isEmpty(staffDTOList)) { |
|||
return new ArrayList<>(); |
|||
} |
|||
Map<String, CustomerStaffDTO> staffMap = new HashMap<>(); |
|||
staffDTOList.forEach(staff -> staffMap.put(staff.getUserId(), staff)); |
|||
|
|||
//3.封装数据
|
|||
resultList.forEach(st -> { |
|||
if (staffMap.containsKey(st.getStaffId())) { |
|||
CustomerStaffDTO dto = staffMap.get(st.getStaffId()); |
|||
st.setNickName(dto.getRealName()); |
|||
st.setCardNum("01"); |
|||
st.setUserType(dto.getWorkType().equals("fulltime") ? "01" : "02"); |
|||
st.setPhonenumber(dto.getMobile()); |
|||
st.setSex(0 == dto.getGender() ? "9" : dto.getGender().toString()); |
|||
st.setNation("01"); |
|||
st.setPaerty("13"); |
|||
st.setBirthday(new Date()); |
|||
st.setEducation("20"); |
|||
st.setEntryDate(new Date()); |
|||
st.setIsLeave("N"); |
|||
//st.setLeaveDate();
|
|||
st.setIncome("05"); |
|||
st.setIsCommittee("Y"); |
|||
st.setIsCommunityWorkers("Y"); |
|||
st.setIsSocialWorker("Y"); |
|||
st.setIsVillageLeader("Y"); |
|||
st.setIsPoliceAssistant("N"); |
|||
st.setIsMediator("Y"); |
|||
st.setDelFlag(dto.getDelFlag()); |
|||
st.setCreatedBy(dto.getCreatedBy()); |
|||
st.setCreatedTime(dto.getCreatedTime()); |
|||
st.setUpdatedBy(dto.getUpdatedBy()); |
|||
st.setUpdatedTime(dto.getUpdatedTime()); |
|||
} |
|||
}); |
|||
|
|||
return resultList; |
|||
} |
|||
|
|||
/** |
|||
* 事件上报 |
|||
* |
|||
* @param formDTO |
|||
* @Param formDTO |
|||
* @Return {@link List<BaseDisputeProcessDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/10/15 14:10 |
|||
*/ |
|||
@Override |
|||
public List<BaseDisputeProcessDTO> getEventInfo(EventInfoFormDTO formDTO) { |
|||
List<BaseDisputeProcessDTO> list; |
|||
//根据入参,获取项目
|
|||
List<ScreenProjectDataDTO> projectList = screenProjectDataService.getProjectList(formDTO.getCustomerId(), formDTO.getProjectId()); |
|||
//项目列表为空,返回空数组
|
|||
if(CollectionUtils.isEmpty(projectList)) { |
|||
return Collections.emptyList(); |
|||
} |
|||
//项目ID不为空时,因为只有一条,可以直接处理
|
|||
if (StringUtils.isNotEmpty(formDTO.getProjectId())) { |
|||
list = projectList.stream().map(project -> { |
|||
BaseDisputeProcessDTO dto = getBaseDisputeProcessDTO(project); |
|||
if (OrgTypeConstant.AGENCY.equals(project.getOrgType())) { |
|||
ScreenCustomerAgencyEntity agency = screenCustomerAgencyService.getAgencyById(project.getOrgId()); |
|||
dto.setOrgCode(agency.getCode()); |
|||
dto.setOrgName(agency.getAgencyName()); |
|||
} else { |
|||
ScreenCustomerGridDTO grid = screenCustomerGridService.getGridById(project.getOrgId()); |
|||
dto.setOrgCode(grid.getCode()); |
|||
dto.setOrgName(grid.getGridName()); |
|||
} |
|||
return dto; |
|||
}).collect(Collectors.toList()); |
|||
} else { |
|||
//项目ID不为空时,提前取出客户下的组织和网格
|
|||
Map<String, ScreenCustomerAgencyEntity> agencyMap = screenCustomerAgencyService.getAgencyList(formDTO.getCustomerId()); |
|||
Map<String, ScreenCustomerGridDTO> gridMap = screenCustomerGridService.getGridList(formDTO.getCustomerId()); |
|||
list = projectList.stream().map(project -> { |
|||
BaseDisputeProcessDTO dto = getBaseDisputeProcessDTO(project); |
|||
if (OrgTypeConstant.AGENCY.equals(project.getOrgType())) { |
|||
ScreenCustomerAgencyEntity agency = agencyMap.get(project.getOrgId()); |
|||
dto.setOrgCode(agency.getCode()); |
|||
dto.setOrgName(agency.getAgencyName()); |
|||
} else { |
|||
ScreenCustomerGridDTO grid = gridMap.get(project.getOrgId()); |
|||
dto.setOrgCode(grid.getCode()); |
|||
dto.setOrgName(grid.getGridName()); |
|||
} |
|||
return dto; |
|||
}).collect(Collectors.toList()); |
|||
} |
|||
return list.stream().filter(item -> StringUtils.isNotBlank(item.getEventCategory())).collect(Collectors.toList()); |
|||
} |
|||
|
|||
private BaseDisputeProcessDTO getBaseDisputeProcessDTO(ScreenProjectDataDTO project) { |
|||
BaseDisputeProcessDTO dto = new BaseDisputeProcessDTO(); |
|||
dto.setId(project.getProjectId()); |
|||
dto.setCustomerId(project.getCustomerId()); |
|||
dto.setEventName(project.getProjectTitle()); |
|||
String categoryCode = project.getCategoryCode().split(StrConstant.COMMA)[0]; |
|||
//如果是孔村、榆山、锦水的项目需要关联分类字典表
|
|||
if("2fe0065f70ca0e23ce4c26fca5f1d933".equals(project.getCustomerId()) || |
|||
"44876154d10d7cb7affd92000f84f833".equals(project.getCustomerId()) || |
|||
"46c55cb862d6d5e6d05d2ab61a1cc07e".equals(project.getCustomerId())) { |
|||
CustomerProjectCategoryDictEntity categoryEntity = customerProjectCategoryDictService.getByCategoryCode(project.getCustomerId(), categoryCode); |
|||
if (null != categoryEntity) { |
|||
categoryCode = categoryEntity.getEpmetCategoryCode(); |
|||
} else { |
|||
categoryCode = null; |
|||
} |
|||
} |
|||
dto.setReportTime(project.getProjectCreateTime()); |
|||
dto.setHappenDate(DateUtils.parseDate(DateUtils.format(project.getProjectCreateTime()), DateUtils.DATE_PATTERN)); |
|||
dto.setEventDescription(project.getProjectContent()); |
|||
//TODO 办结方式
|
|||
dto.setWaysOfResolving("01"); |
|||
dto.setSuccessfulOrNo(ProjectConstant.CLOSED_CASE.equals(project.getProjectStatusCode())?"Y":"N"); |
|||
//TODO 办结层级
|
|||
dto.setCompleteLevel("01"); |
|||
dto.setCompleteTime(project.getCloseCaseTime()); |
|||
dto.setLat(project.getLatitude()); |
|||
dto.setLng(project.getLongitude()); |
|||
return dto; |
|||
} |
|||
|
|||
|
|||
|
|||
@Override |
|||
public List<MidPatrolRecordResult> getPatrolRecordList(MidPatrolFormDTO formDTO) { |
|||
return userService.getPatrolRecordList(formDTO); |
|||
} |
|||
|
|||
@Override |
|||
public List<MidPatrolDetailResult> getPatrolDetailList(MidPatrolFormDTO formDTO) { |
|||
return userService.getPatrolDetailList(formDTO); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.service; |
|||
|
|||
public interface SystemMessageScannerService { |
|||
/** |
|||
* @description 扫描未成功发送到MQ的消息 |
|||
* |
|||
* @param |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.10.16 23:24:05 |
|||
*/ |
|||
void scanPenddingSystemMQMessage(); |
|||
|
|||
/** |
|||
* @description 扫描发送成功但是未正常处理的MQ的消息 |
|||
* |
|||
* @param |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.10.16 23:24:27 |
|||
*/ |
|||
void scanBlockedSystemMQMessage(); |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class SystemMessageScannerServiceImpl implements SystemMessageScannerService { |
|||
|
|||
@Autowired |
|||
private EpmetMessageOpenFeignClient messageOpenFeignClient; |
|||
|
|||
@Override |
|||
public void scanPenddingSystemMQMessage() { |
|||
messageOpenFeignClient.penddingMqMsgScan(); |
|||
} |
|||
|
|||
@Override |
|||
public void scanBlockedSystemMQMessage() { |
|||
messageOpenFeignClient.blockedMqMsgScan(); |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.task; |
|||
|
|||
import com.epmet.service.SystemMessageScannerService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component("blockedMQSystemMessageScanner") |
|||
@Slf4j |
|||
public class BlockedMQSystemMessageScanner implements ITask { |
|||
|
|||
@Autowired |
|||
private SystemMessageScannerService systemMessageScannerService; |
|||
|
|||
@Override |
|||
public void run(String params) { |
|||
try { |
|||
//log.info("【blockedMQSystemMessageScanner】开始执行scanBlockedSystemMQMessage任务");
|
|||
systemMessageScannerService.scanBlockedSystemMQMessage(); |
|||
log.info("【blockedMQSystemMessageScanner】执行scanBlockedSystemMQMessage任务完成"); |
|||
} catch (Exception e) { |
|||
log.error("【blockedMQSystemMessageScanner】执行scanBlockedSystemMQMessage任务失败"); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.task; |
|||
|
|||
import com.epmet.service.SystemMessageScannerService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component("penddingMQSystemMessageScanner") |
|||
@Slf4j |
|||
public class PenddingMQSystemMessageScanner implements ITask { |
|||
|
|||
@Autowired |
|||
private SystemMessageScannerService systemMessageScannerService; |
|||
|
|||
@Override |
|||
public void run(String params) { |
|||
try { |
|||
//log.info("【blockedMQSystemMessageScanner】开始执行scanBlockedSystemMQMessage任务");
|
|||
systemMessageScannerService.scanPenddingSystemMQMessage(); |
|||
log.info("【blockedMQSystemMessageScanner】执行scanPenddingSystemMQMessage任务完成"); |
|||
} catch (Exception e) { |
|||
log.error("【blockedMQSystemMessageScanner】执行scanPenddingSystemMQMessage任务失败"); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,35 @@ |
|||
/** |
|||
* 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.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.SystemMessagePenddingEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* 系统消息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-16 |
|||
*/ |
|||
@Mapper |
|||
public interface SystemMessagePenddingDao extends BaseDao<SystemMessagePenddingEntity> { |
|||
|
|||
void physicalDeleteById(@Param("penddingId") String penddingId); |
|||
} |
@ -0,0 +1,61 @@ |
|||
/** |
|||
* 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.entity; |
|||
|
|||
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-10-16 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("system_message_pendding") |
|||
public class SystemMessagePenddingEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 消息类型。init_customer:客户初始化,login登录,logout退出 |
|||
*/ |
|||
private String msgType; |
|||
|
|||
/** |
|||
* 消息主表id |
|||
*/ |
|||
private String msgId; |
|||
|
|||
/** |
|||
* 消息发送途径 |
|||
*/ |
|||
private String sendApproach; |
|||
|
|||
/** |
|||
* 消息内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
} |
@ -0,0 +1,14 @@ |
|||
CREATE TABLE `system_message_pendding` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`MSG_ID` varchar(64) NOT NULL COMMENT '消息主表id', |
|||
`MSG_TYPE` varchar(32) NOT NULL COMMENT '消息类型。init_customer:客户初始化,login登录,logout退出', |
|||
`SEND_APPROACH` varchar(32) NOT NULL COMMENT '消息发送途径', |
|||
`CONTENT` varchar(1024) NOT NULL COMMENT '消息内容', |
|||
`REVISION` int(11) DEFAULT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人(发布消息的人)', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='系统消息滞留表' |
@ -0,0 +1,26 @@ |
|||
<?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.dao.SystemMessagePenddingDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.SystemMessagePenddingEntity" id="systemMessagePenddingMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="msgId" column="MSG_ID"/> |
|||
<result property="msgType" column="MSG_TYPE"/> |
|||
<result property="sendApproach" column="SEND_APPROACH"/> |
|||
<result property="content" column="CONTENT"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
|
|||
<!--物理删除消息堆积--> |
|||
<delete id="physicalDeleteById"> |
|||
delete from system_message_pendding where ID = #{penddingId} |
|||
</delete> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,21 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>open-data-worker</artifactId> |
|||
<groupId>com.epmet</groupId> |
|||
<version>2.0.0</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>open-data-worker-client</artifactId> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-tools</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
</dependencies> |
|||
</project> |
@ -0,0 +1,207 @@ |
|||
/** |
|||
* 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.opendata.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 事件信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Data |
|||
public class BaseDisputeProcessDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格编码 |
|||
*/ |
|||
private String orgCode; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String orgName; |
|||
|
|||
/** |
|||
* 事件名称 |
|||
*/ |
|||
private String eventName; |
|||
|
|||
/** |
|||
* 事件类别 |
|||
*/ |
|||
private String eventCategory; |
|||
|
|||
/** |
|||
* 上报时间 YYYY-MM-DD HH:MM:SS |
|||
*/ |
|||
private Date reportTime; |
|||
|
|||
/** |
|||
* 发生时间 格式为“YYYY-MM-DD” |
|||
*/ |
|||
private Date happenDate; |
|||
|
|||
/** |
|||
* 发生地点 |
|||
*/ |
|||
private String happenPlace; |
|||
|
|||
/** |
|||
* 事件简述 |
|||
*/ |
|||
private String eventDescription; |
|||
|
|||
/** |
|||
* 办结方式 01自办;02上报 源于居民端的最终结案的项目为02;工作端立项的项目最终结案的01 |
|||
*/ |
|||
private String waysOfResolving; |
|||
|
|||
/** |
|||
* 是否办结 Y:是、N:否 |
|||
*/ |
|||
private String successfulOrNo; |
|||
|
|||
/** |
|||
* 办结层级 |
|||
01省、自治区、直辖市 |
|||
02地、市、州、盟 |
|||
03县、市、区、旗 |
|||
04乡镇、街道 |
|||
05片区 |
|||
06村、社区 |
|||
07网格 |
|||
|
|||
*/ |
|||
private String completeLevel; |
|||
|
|||
/** |
|||
* 基础信息主键 |
|||
*/ |
|||
private String baseInfoId; |
|||
|
|||
/** |
|||
* 办结时间 |
|||
*/ |
|||
private Date completeTime; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private BigDecimal lng; |
|||
|
|||
/** |
|||
* 纬度 |
|||
*/ |
|||
private BigDecimal lat; |
|||
|
|||
/** |
|||
* 主要当事人姓名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 涉及人数 |
|||
*/ |
|||
private Integer numberInvolved; |
|||
|
|||
/** |
|||
* 涉及单位 |
|||
*/ |
|||
private String relatedUnits; |
|||
|
|||
/** |
|||
* 重点场所类别 01九小场所, 02公共场所 |
|||
*/ |
|||
private String keyAreaType; |
|||
|
|||
/** |
|||
* 宗教活动规模 01 0-50人,02 51-200人,03 201人以上 |
|||
|
|||
*/ |
|||
private String religionScale; |
|||
|
|||
/** |
|||
* 宗教类别 01道教 02佛教 03基督教 04伊斯兰教 05其他 |
|||
|
|||
*/ |
|||
private String religionType; |
|||
|
|||
/** |
|||
* 重点场所是否变动 Y:是、N:否 |
|||
*/ |
|||
private String isKeyareaState; |
|||
|
|||
/** |
|||
* 重点人员是否在当地 Y:是、N:否 |
|||
*/ |
|||
private String isKeypeopleLocate; |
|||
|
|||
/** |
|||
* 重点人员现状 |
|||
*/ |
|||
private String keypeopleStatus; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Long delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,136 @@ |
|||
/** |
|||
* 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.opendata.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 网格基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Data |
|||
public class BaseGridInfoDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织/网格Id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 网格编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 网格层级[07:网格] |
|||
*/ |
|||
private String gridLevel; |
|||
|
|||
/** |
|||
* 专属网格类型[01:党政机关; 02:医院; 03:学校; 04:企业; 05:园区; 06:商圈; 07:市场; 08:景区; |
|||
*/ |
|||
private String gridType; |
|||
|
|||
/** |
|||
* 网格内人口规模[01:500人以下(含500人); 02:500-1000人(含1000人); 03:1000-1500人(含1500人); 04:1500人以上] |
|||
*/ |
|||
private String populationSize; |
|||
|
|||
/** |
|||
* 是否成立网格党支部或网格党小组[Y:是、N:否] |
|||
*/ |
|||
private String isPartyBranch; |
|||
|
|||
/** |
|||
* 网格党组织类型[01:网格党支部; 02:网格党小组] |
|||
*/ |
|||
private String partyBranchType; |
|||
|
|||
/** |
|||
* 中心点(质心)经度 |
|||
*/ |
|||
private String lng; |
|||
|
|||
/** |
|||
* 中心点(质心)纬度 |
|||
*/ |
|||
private String lat; |
|||
|
|||
/** |
|||
* 网格颜色 |
|||
*/ |
|||
private String gridColor; |
|||
|
|||
/** |
|||
* 空间范围 |
|||
*/ |
|||
private String shape; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Long delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,191 @@ |
|||
/** |
|||
* 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.opendata.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 网格员基础信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-10-15 |
|||
*/ |
|||
@Data |
|||
public class BaseGridUserDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 人员Id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 网格编码 |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 网格员姓名 |
|||
*/ |
|||
private String nickName; |
|||
|
|||
/** |
|||
* 专属网格类型[01:党政机关; 02:医院; 03:学校; 04:企业; 05:园区; 06:商圈; 07:市场; 08:景区; |
|||
*/ |
|||
private String cardNum; |
|||
|
|||
/** |
|||
* 网格员类型[01:专职网格员; 02:兼职网格员; 03:网格长; 04:综治机构人员; 05:职能部门人员] |
|||
*/ |
|||
private String userType; |
|||
|
|||
/** |
|||
* 手机号码 |
|||
*/ |
|||
private String phonenumber; |
|||
|
|||
/** |
|||
* 性别[1:男性; 2:女性; 9:未说明的性别] |
|||
*/ |
|||
private String sex; |
|||
|
|||
/** |
|||
* 民族[字典表主键] |
|||
*/ |
|||
private String nation; |
|||
|
|||
/** |
|||
* 政治面貌[字典表主键] |
|||
*/ |
|||
private String paerty; |
|||
|
|||
/** |
|||
* 出生日期[YYYY-MM-DD] |
|||
*/ |
|||
private Date birthday; |
|||
|
|||
/** |
|||
* 学历[字典表主键] |
|||
*/ |
|||
private String education; |
|||
|
|||
/** |
|||
* 入职时间 |
|||
*/ |
|||
private Date entryDate; |
|||
|
|||
/** |
|||
* 是否离职 |
|||
*/ |
|||
private String isLeave; |
|||
|
|||
/** |
|||
* 离职时间 |
|||
*/ |
|||
private Date leaveDate; |
|||
|
|||
/** |
|||
* 网格员年收入 |
|||
*/ |
|||
private String income; |
|||
|
|||
/** |
|||
* 是否社区(村)两委委员[Y:是、N:否] |
|||
*/ |
|||
private String isCommittee; |
|||
|
|||
/** |
|||
* 是否社区工作者[Y:是、N:否] |
|||
*/ |
|||
private String isCommunityWorkers; |
|||
|
|||
/** |
|||
* 是否社会工作者[Y:是、N:否] |
|||
*/ |
|||
private String isSocialWorker; |
|||
|
|||
/** |
|||
* 是否村(居)民小组长[Y:是、N:否 |
|||
*/ |
|||
private String isVillageLeader; |
|||
|
|||
/** |
|||
* 是否警务助理[Y:是、N:否] |
|||
*/ |
|||
private String isPoliceAssistant; |
|||
|
|||
/** |
|||
* 是否人民调解员[Y:是、N:否] |
|||
*/ |
|||
private String isMediator; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Long delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.opendata.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @dscription 插叙客户网格基础信息--接口入参 |
|||
* @author sun |
|||
*/ |
|||
@Data |
|||
public class GridBaseInfoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -3634745091993094743L; |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
@NotBlank(message = "事件标识不能为空", groups = {Grid.class}) |
|||
private String customerId = ""; |
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private List<String> orgIdList; |
|||
/** |
|||
* 操作类型【新增:add 修改删除:edit】 |
|||
*/ |
|||
private String type; |
|||
|
|||
public interface Grid extends CustomerClientShowGroup {} |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.opendata.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @dscription 插叙客户网格人员基础信息--接口入参 |
|||
* @author sun |
|||
*/ |
|||
@Data |
|||
public class StaffBaseInfoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -3634745091993094743L; |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
@NotBlank(message = "事件标识不能为空", groups = {Staff.class}) |
|||
private String customerId = ""; |
|||
/** |
|||
* 人员Id |
|||
*/ |
|||
private List<String> staffIdList; |
|||
/** |
|||
* 操作类型【新增:add 修改删除:edit】 |
|||
*/ |
|||
private String type; |
|||
public interface Staff extends CustomerClientShowGroup {} |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.opendata.dto.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotEmpty; |
|||
|
|||
/** |
|||
* 插入或更新巡查记录主表 |
|||
* @author liujianjun |
|||
*/ |
|||
@Data |
|||
public class UpsertPatrolRecordForm extends PageFormDTO { |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
@NotEmpty(message = "customerId不能为空") |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 巡查记录id |
|||
*/ |
|||
private String patrolId; |
|||
|
|||
/** |
|||
* 操作类型 |
|||
* SystemMessageType.USER_PATROL_START |
|||
* SystemMessageTypSTOP |
|||
*/ |
|||
@NotEmpty(message = "actionType不能为空") |
|||
private String actionType; |
|||
|
|||
} |
@ -0,0 +1,11 @@ |
|||
FROM java:8 |
|||
|
|||
RUN export LANG="zh_CN.UTF-8" |
|||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime |
|||
RUN echo 'Asia/Shanghai' > /etc/timezone |
|||
|
|||
COPY ./target/*.jar ./open-data-worker.jar |
|||
|
|||
EXPOSE 8107 |
|||
|
|||
ENTRYPOINT ["sh", "-c", "exec $RUN_INSTRUCT"] |
@ -0,0 +1,18 @@ |
|||
version: "3.7" |
|||
services: |
|||
gov-voice-server: |
|||
container_name: open-data-worker-server-dev |
|||
image: 192.168.1.140:5000/epmet-cloud-dev/open-data-worker-server:version_placeholder |
|||
ports: |
|||
- "8107:8107" |
|||
network_mode: host # 使用现有网络 |
|||
volumes: |
|||
- "/opt/epmet-cloud-logs/dev:/logs" |
|||
environment: |
|||
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./open-data-worker.jar" |
|||
restart: "unless-stopped" |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: '0.1' |
|||
memory: 250M |
@ -0,0 +1,18 @@ |
|||
version: "3.7" |
|||
services: |
|||
gov-voice-server: |
|||
container_name: open-data-worker-server-prod |
|||
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/open-data-worker-server:0.3.69 |
|||
ports: |
|||
- "8107:8107" |
|||
network_mode: host # 使用现有网络 |
|||
volumes: |
|||
- "/opt/epmet-cloud-logs/prod:/logs" |
|||
environment: |
|||
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./open-data-worker.jar" |
|||
restart: "unless-stopped" |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: '0.1' |
|||
memory: 600M |
@ -0,0 +1,18 @@ |
|||
version: "3.7" |
|||
services: |
|||
gov-voice-server: |
|||
container_name: open-data-worker-server-test |
|||
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/open-data-worker-server:version_placeholder |
|||
ports: |
|||
- "8107:8107" |
|||
network_mode: host # 使用现有网络 |
|||
volumes: |
|||
- "/opt/epmet-cloud-logs/test:/logs" |
|||
environment: |
|||
RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./open-data-worker.jar" |
|||
restart: "unless-stopped" |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: '0.1' |
|||
memory: 350M |
@ -0,0 +1,282 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<parent> |
|||
<artifactId>open-data-worker</artifactId> |
|||
<groupId>com.epmet</groupId> |
|||
<version>2.0.0</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>open-data-worker-server</artifactId> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-tools</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-mybatis</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework</groupId> |
|||
<artifactId>spring-context-support</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-actuator</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>de.codecentric</groupId> |
|||
<artifactId>spring-boot-admin-starter-client</artifactId> |
|||
<version>${spring.boot.admin.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> |
|||
</dependency> |
|||
<!-- 替换Feign原生httpclient --> |
|||
<dependency> |
|||
<groupId>io.github.openfeign</groupId> |
|||
<artifactId>feign-httpclient</artifactId> |
|||
<version>10.3.0</version> |
|||
</dependency> |
|||
|
|||
<!--rocketmq--> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-rocketmq</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-message-client</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>open-data-worker-client</artifactId> |
|||
<version>2.0.0</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-user-client</artifactId> |
|||
<version>2.0.0</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>data-statistical-client</artifactId> |
|||
<version>2.0.0</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<finalName>${project.artifactId}</finalName> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-surefire-plugin</artifactId> |
|||
<configuration> |
|||
<skipTests>true</skipTests> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory> |
|||
<resources> |
|||
<resource> |
|||
<filtering>true</filtering> |
|||
<directory>${basedir}/src/main/resources</directory> |
|||
</resource> |
|||
</resources> |
|||
</build> |
|||
|
|||
<profiles> |
|||
<profile> |
|||
<id>dev</id> |
|||
<properties> |
|||
<server.port>8117</server.port> |
|||
<spring.profiles.active>dev</spring.profiles.active> |
|||
|
|||
<!-- 数据库配置--> |
|||
<spring.datasource.druid.url> |
|||
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_open_data?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]> |
|||
</spring.datasource.druid.url> |
|||
<spring.datasource.druid.username>epmet_open_data_user</spring.datasource.druid.username> |
|||
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password> |
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>192.168.1.140</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>123456</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>true</nacos.register-enabled> |
|||
<nacos.server-addr>192.168.1.140:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>1fecc730-5e6e-464c-aae9-7567944e7936</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
<!--是否开启服务列表变更监听--> |
|||
<nacos.service-list-changed-listening.enable>true</nacos.service-list-changed-listening.enable> |
|||
|
|||
<!--flyway migration 数据库迁移工具--> |
|||
<spring.flyway.enabled>false</spring.flyway.enabled> |
|||
|
|||
<!--钉钉 机器人地址--> |
|||
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4</dingTalk.robot.webHook> |
|||
<dingTalk.robot.secret>SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd</dingTalk.robot.secret> |
|||
|
|||
<!--rocketmq--> |
|||
<rocketmq.enable>true</rocketmq.enable> |
|||
<rocketmq.nameserver>192.168.1.140:9876;192.168.1.141:9876</rocketmq.nameserver> |
|||
</properties> |
|||
</profile> |
|||
<profile> |
|||
<id>local</id> |
|||
<activation> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation> |
|||
<properties> |
|||
<server.port>8117</server.port> |
|||
<spring.profiles.active>local</spring.profiles.active> |
|||
|
|||
<!-- 数据库配置--> |
|||
<spring.datasource.druid.url> |
|||
<![CDATA[jdbc:mysql://192.168.1.140:3306/epmet_open_data?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]> |
|||
</spring.datasource.druid.url> |
|||
<spring.datasource.druid.username>epmet_open_data_user</spring.datasource.druid.username> |
|||
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password> |
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>192.168.1.140</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>123456</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>false</nacos.register-enabled> |
|||
<nacos.server-addr>192.168.1.140:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>1fecc730-5e6e-464c-aae9-7567944e7936</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
<!--是否开启服务列表变更监听--> |
|||
<nacos.service-list-changed-listening.enable>false</nacos.service-list-changed-listening.enable> |
|||
|
|||
<!--flyway migration 数据库迁移工具--> |
|||
<spring.flyway.enabled>false</spring.flyway.enabled> |
|||
|
|||
<!--钉钉 机器人地址--> |
|||
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4</dingTalk.robot.webHook> |
|||
<dingTalk.robot.secret>SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd</dingTalk.robot.secret> |
|||
|
|||
<!--rocketmq--> |
|||
<rocketmq.enable>false</rocketmq.enable> |
|||
<rocketmq.nameserver>192.168.1.140:9876;192.168.1.141:9876</rocketmq.nameserver> |
|||
</properties> |
|||
</profile> |
|||
<profile> |
|||
<id>test</id> |
|||
<!--<activation> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation>--> |
|||
<properties> |
|||
<server.port>8117</server.port> |
|||
<spring.profiles.active>test</spring.profiles.active> |
|||
|
|||
<!-- 数据库配置--> |
|||
<spring.datasource.druid.url> |
|||
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_open_data?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]> |
|||
</spring.datasource.druid.url> |
|||
<spring.datasource.druid.username>epmet</spring.datasource.druid.username> |
|||
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password> |
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>true</nacos.register-enabled> |
|||
<nacos.server-addr>192.168.10.150:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>67e3c350-533e-4d7c-9f8f-faf1b4aa82ae</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
<!--是否开启服务列表变更监听--> |
|||
<nacos.service-list-changed-listening.enable>true</nacos.service-list-changed-listening.enable> |
|||
|
|||
<!--flyway migration 数据库迁移工具--> |
|||
<spring.flyway.enabled>true</spring.flyway.enabled> |
|||
|
|||
<!--钉钉 机器人地址--> |
|||
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4</dingTalk.robot.webHook> |
|||
<dingTalk.robot.secret>SECfcc020bdc83bb17a2c00f39977b1fbc409ef4188c7beaea11c5caa90eeaf87fd</dingTalk.robot.secret> |
|||
|
|||
<!--rocketmq--> |
|||
<rocketmq.enable>true</rocketmq.enable> |
|||
<rocketmq.nameserver>192.168.10.161:9876</rocketmq.nameserver> |
|||
</properties> |
|||
</profile> |
|||
<profile> |
|||
<id>prod</id> |
|||
<properties> |
|||
<server.port>8117</server.port> |
|||
<spring.profiles.active>prod</spring.profiles.active> |
|||
|
|||
<!-- 数据库配置--> |
|||
<spring.datasource.druid.url> |
|||
<![CDATA[jdbc:mysql://rm-m5e3vzs2637224wj9.mysql.rds.aliyuncs.com:3306/epmet_open_data?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]> |
|||
</spring.datasource.druid.url> |
|||
<spring.datasource.druid.username>epmet_open_data_user</spring.datasource.druid.username> |
|||
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password> |
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>EpmEtclOUdrEdIs!Q2w</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>true</nacos.register-enabled> |
|||
<nacos.server-addr>192.168.11.180:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>bd205d23-e696-47be-b995-916313f86e99</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
<!--是否开启服务列表变更监听--> |
|||
<nacos.service-list-changed-listening.enable>true</nacos.service-list-changed-listening.enable> |
|||
|
|||
<!--flyway migration 数据库迁移工具--> |
|||
<spring.flyway.enabled>true</spring.flyway.enabled> |
|||
|
|||
<!--生产钉钉 机器人地址--> |
|||
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c</dingTalk.robot.webHook> |
|||
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1</dingTalk.robot.secret> |
|||
|
|||
<!--rocketmq--> |
|||
<rocketmq.enable>true</rocketmq.enable> |
|||
<rocketmq.nameserver>192.168.11.187:9876;192.168.11.184:9876</rocketmq.nameserver> |
|||
</properties> |
|||
</profile> |
|||
</profiles> |
|||
|
|||
</project> |
@ -0,0 +1,26 @@ |
|||
package com.epmet; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.boot.web.servlet.ServletComponentScan; |
|||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
|||
import org.springframework.cloud.openfeign.EnableFeignClients; |
|||
import org.springframework.context.annotation.ComponentScan; |
|||
|
|||
/** |
|||
* @Description OpenData服务启动类 |
|||
* 注意:此处要使用@ComponentScan的原因是,启动类处于包com.epmet.opendata下,想用com.epmet.commons包下的一些Spring对象,需要 |
|||
* 手动指定扫描包,否则无法扫描 |
|||
* @author wxz |
|||
* @date 2021.10.13 15:16:05 |
|||
*/ |
|||
@SpringBootApplication |
|||
@EnableDiscoveryClient |
|||
@EnableFeignClients |
|||
@ServletComponentScan |
|||
//@ComponentScan(value = { "com.epmet" })
|
|||
public class OpenDataApplication { |
|||
public static void main(String[] args) { |
|||
SpringApplication.run(OpenDataApplication.class, args); |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.epmet.opendata.aspect; |
|||
|
|||
import com.epmet.commons.tools.aspect.BaseRequestLogAspect; |
|||
import org.aspectj.lang.ProceedingJoinPoint; |
|||
import org.aspectj.lang.annotation.Around; |
|||
import org.aspectj.lang.annotation.Aspect; |
|||
import org.springframework.core.annotation.Order; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.context.request.RequestAttributes; |
|||
import org.springframework.web.context.request.RequestContextHolder; |
|||
import org.springframework.web.context.request.ServletRequestAttributes; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
|
|||
/** |
|||
* 日志/异常处理切面实现,调用父类方法完成日志记录和异常处理。 |
|||
*/ |
|||
@Aspect |
|||
@Component |
|||
@Order(0) |
|||
public class RequestLogAspect extends BaseRequestLogAspect { |
|||
|
|||
@Override |
|||
@Around(value = "execution(* com.epmet.opendata.controller.*Controller*.*(..)) ") |
|||
public Object proceed(ProceedingJoinPoint point) throws Throwable { |
|||
return super.proceed(point, getRequest()); |
|||
} |
|||
|
|||
/** |
|||
* 获取Request对象 |
|||
* |
|||
* @return |
|||
*/ |
|||
private HttpServletRequest getRequest() { |
|||
RequestAttributes ra = RequestContextHolder.getRequestAttributes(); |
|||
ServletRequestAttributes sra = (ServletRequestAttributes) ra; |
|||
return sra.getRequest(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* |
|||
* https://www.renren.io
|
|||
* |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.epmet.opendata.config; |
|||
|
|||
import com.epmet.commons.tools.config.ModuleConfig; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 模块配置信息 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.0.0 |
|||
*/ |
|||
@Service |
|||
public class ModuleConfigImpl implements ModuleConfig { |
|||
@Override |
|||
public String getName() { |
|||
return "govvoice"; |
|||
} |
|||
} |
@ -0,0 +1,161 @@ |
|||
package com.epmet.opendata.config; |
|||
|
|||
import com.alibaba.cloud.nacos.NacosDiscoveryProperties; |
|||
import com.alibaba.nacos.api.exception.NacosException; |
|||
import com.alibaba.nacos.api.naming.NamingService; |
|||
import com.alibaba.nacos.api.naming.listener.Event; |
|||
import com.alibaba.nacos.api.naming.listener.EventListener; |
|||
import com.alibaba.nacos.api.naming.listener.NamingEvent; |
|||
import com.alibaba.nacos.api.naming.pojo.ListView; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.netflix.loadbalancer.DynamicServerListLoadBalancer; |
|||
import com.netflix.loadbalancer.ILoadBalancer; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
|||
import org.springframework.cloud.netflix.ribbon.SpringClientFactory; |
|||
import org.springframework.context.annotation.Configuration; |
|||
|
|||
import javax.annotation.PostConstruct; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.concurrent.*; |
|||
|
|||
/** |
|||
* @author wxz |
|||
* @Description Nacos服务列表刷新监听注册器 |
|||
* @date 2021.09.22 14:33:11 |
|||
*/ |
|||
@Slf4j |
|||
@Configuration |
|||
@ConditionalOnProperty(prefix = "spring.cloud.nacos.discovery.serviceListChangedListening", name = "enable", havingValue = "true", matchIfMissing = false) |
|||
public class NacosServiceListListenerRegisterer { |
|||
|
|||
public static final String REFRESH_SERVER_LIST_METHOD_NAME = "restOfInit"; |
|||
// 服务列表拉取间隔:10s
|
|||
public static final long SERVICE_LIST_PULLING_DELAY_SECONDS = 10; |
|||
|
|||
private NamingService namingService; |
|||
|
|||
private ScheduledExecutorService executor; |
|||
|
|||
@Autowired |
|||
private NacosDiscoveryProperties discoveryProperties; |
|||
|
|||
@Autowired |
|||
private SpringClientFactory springClientFactory; |
|||
|
|||
// 监听中的服务列表
|
|||
private List<String> observingServers = new ArrayList<>(33); |
|||
|
|||
@PostConstruct |
|||
public void init() { |
|||
namingService = discoveryProperties.namingServiceInstance(); |
|||
// 启动监听
|
|||
executor = new ScheduledThreadPoolExecutor(2, new ThreadFactory() { |
|||
@Override |
|||
public Thread newThread(Runnable r) { |
|||
Thread thread = new Thread(r); |
|||
thread.setDaemon(true); |
|||
thread.setName("NacosServiceListWatchingRegisterer"); |
|||
return thread; |
|||
} |
|||
}); |
|||
|
|||
// 立即启动,并15s刷新一次服务列表,用于新服务列表的发现
|
|||
ScheduledFuture<?> future = executor.scheduleAtFixedRate(new EpmetNacosServiceListListener(), 0, SERVICE_LIST_PULLING_DELAY_SECONDS, TimeUnit.SECONDS); |
|||
} |
|||
|
|||
public class EpmetNacosServiceListListener implements Runnable { |
|||
|
|||
@Override |
|||
public void run() { |
|||
doRefreshServerList(); |
|||
} |
|||
|
|||
/** |
|||
* @param |
|||
* @return |
|||
* @description 执行刷新 |
|||
* @author wxz |
|||
* @date 2021.09.22 16:04:49 |
|||
*/ |
|||
private synchronized void doRefreshServerList() { |
|||
ListView<String> serviceListView = null; |
|||
try { |
|||
serviceListView = namingService.getServicesOfServer(1, 100); |
|||
//启动监听
|
|||
if (serviceListView == null || serviceListView.getCount() == 0) { |
|||
log.info("【Nacos服务列表定时刷新】当前无任何可添加监听的服务"); |
|||
return; |
|||
} |
|||
List<String> serviceList = serviceListView.getData(); |
|||
log.info("【Nacos服务列表定时刷新】Nacos服务端服务列表: {}", serviceList); |
|||
|
|||
for (String service : serviceList) { |
|||
try { |
|||
|
|||
// 如果该服务已经在监听列表中存在了,则不再注册监听。注:不能取消空服务的监听,因为空服务随时可能恢复运行,需要实时监听。
|
|||
if (observingServers.contains(service)) { |
|||
continue; |
|||
} |
|||
|
|||
namingService.subscribe(service, new EventListener() { |
|||
@Override |
|||
public void onEvent(Event event) { |
|||
if (event instanceof NamingEvent) { |
|||
NamingEvent namingEvent = (NamingEvent) event; |
|||
log.info("【Nacos服务列表刷新监听】收到事件:{}:[{}]", namingEvent.getServiceName(), namingEvent.getInstances()); |
|||
doRefreshServerList(service); |
|||
} |
|||
} |
|||
}); |
|||
|
|||
// 将该服务加入到监听列表中
|
|||
observingServers.add(service); |
|||
} catch (NacosException e) { |
|||
String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); |
|||
log.error("【Nacos服务列表定时刷新】订阅ApplicationContext的刷新事件失败,错误信息:{}", errorStackTrace); |
|||
} |
|||
} |
|||
|
|||
} catch (NacosException e) { |
|||
String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); |
|||
log.error("【Nacos服务列表定时刷新】链接Nacos服务端失败,错误信息:{}", errorStackTrace); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @param serviceName |
|||
* @return |
|||
* @description 刷新ServerList |
|||
* @author wxz |
|||
* @date 2021.09.22 09:29:16 |
|||
*/ |
|||
private void doRefreshServerList(String serviceName) { |
|||
// 刷新方式1:反射调用DynamicServerListLoadBalancer中的restOfInit()方法。该方法原来只执行一次,此处不推荐用
|
|||
//ILoadBalancer loadBalancer = springClientFactory.getLoadBalancer(serviceName);
|
|||
//if (loadBalancer instanceof ZoneAwareLoadBalancer) {
|
|||
// ZoneAwareLoadBalancer zaLoadBalancer = (ZoneAwareLoadBalancer) loadBalancer;
|
|||
// IClientConfig clientConfig = springClientFactory.getClientConfig(serviceName);
|
|||
// try {
|
|||
// Method restOfInitMethod = zaLoadBalancer.getClass().getSuperclass().getDeclaredMethod(REFRESH_SERVER_LIST_METHOD_NAME, IClientConfig.class);
|
|||
// restOfInitMethod.setAccessible(true);
|
|||
// restOfInitMethod.invoke(zaLoadBalancer, clientConfig);
|
|||
// } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
|
|||
// String errorStackTrace = ExceptionUtils.getErrorStackTrace(e);
|
|||
// log.error("【LoadBalancer刷新服务列表】失败:{}", errorStackTrace);
|
|||
// }
|
|||
//}
|
|||
|
|||
// 刷新方式2:DynamicServerListLoadBalancer#updateListOfServers()该方法为ribbon定时刷新服务列表的时候真正调用的方法,但是加了@VisibleForTesting
|
|||
// 暂且 1 try
|
|||
ILoadBalancer loadBalancer = springClientFactory.getLoadBalancer(serviceName); |
|||
if (loadBalancer instanceof DynamicServerListLoadBalancer) { |
|||
DynamicServerListLoadBalancer dslb = (DynamicServerListLoadBalancer) loadBalancer; |
|||
dslb.updateListOfServers(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue