queryProjectDistribution(ProjectDistributionFormDTO formDTO);
+
+ /**
+ * 查询resi_event_mention
+ *
+ * @param userId
+ * @return int
+ * @author yinzuomei
+ * @date 2021/8/3 15:27
+ */
+ int countRedDot(String userId);
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
index d48c31f2d7..2063b3f83d 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java
@@ -233,4 +233,18 @@ public class GovProjectServiceImpl implements GovProjectService {
throw new RenException("计算首次响应时间失败");
}
}
+
+ /**
+ * 查询resi_event_mention
+ *
+ * @param userId
+ * @return int
+ * @author yinzuomei
+ * @date 2021/8/3 15:27
+ */
+ @Override
+ public int countRedDot(String userId) {
+ return projectDao.countRedDot(userId);
+ }
+
}
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/ResiUserBadgeDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/ResiUserBadgeDao.xml
index ba7b99c850..40e651d1e9 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/ResiUserBadgeDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/ResiUserBadgeDao.xml
@@ -3,4 +3,17 @@
+
+ SELECT
+ rub.*
+ FROM
+ resi_user_badge rub
+ INNER JOIN badge b ON ( rub.BADGE_ID = b.ID )
+ WHERE
+ rub.DEL_FLAG = '0'
+ AND b.DEL_FLAG = '0'
+ AND rub.USER_ID = #{userId}
+ AND b.BADGE_KEY = #{badgeKey}
+ AND rub.CERTIFICATION_AUTID_STATUS = 'approved'
+
\ No newline at end of file
diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml
index d376938904..1e144e3420 100644
--- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml
+++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml
@@ -144,4 +144,15 @@
order by p.CREATED_TIME desc
+
+
+ SELECT
+ count(1) as total
+ FROM
+ resi_event_mention rem
+ WHERE
+ rem.DEL_FLAG = '0'
+ AND rem.RED_DOT = '1'
+ AND rem.USER_ID = #{userId}
+
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ResiEventDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ResiEventDTO.java
new file mode 100644
index 0000000000..d0e2efaf01
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/ResiEventDTO.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.project;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 居民报事表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@Data
+public class ResiEventDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 事件id
+ */
+ private String resiEventId;
+
+ /**
+ * 报给?:
+ 网格:grid;
+ 社区:community;
+ 乡(镇、街道)级:street;
+ 区县级: district;
+ 市级: city;
+ 省级:province。
+ */
+ private String orgType;
+
+ /**
+ * 报给的组织或者网格id
+ */
+ private String orgId;
+
+ /**
+ * org_id的上级组织id,org_id是跟组织,此列为0
+ */
+ private String orgPid;
+
+ /**
+ * org_id的所有上级组织id,org_id是跟组织,此列为0
+ */
+ private String orgPids;
+
+ /**
+ * 含义:已读read,未读:un_read;组织下的工作人员从待处理=>处理中,点击查看详情前更新为已读;
+ */
+ private String orgRead;
+
+ /**
+ * (1)含义:1:展示红点;0:不展示;(2)注意:发布事件插入数据时为1,(3)何时更新?:人大代表回复or报事人回复or工作人员回复、立项、办结更新为1;
+ */
+ private Boolean redDot;
+
+ private String projectId;
+
+ private String createdBy;
+
+}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java
index b714ce2210..af4ef095f6 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java
@@ -81,4 +81,5 @@ public interface ProjectConstant {
* 项目来源于 工作端立项
*/
String PROJECT_ORIGIN_AGENCY="agency";
+ String PROJECT_ORIGIN_EVENT="resi_event";
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java
index 704aa3ee26..a0f70a5591 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java
@@ -19,10 +19,7 @@ package com.epmet.dao.project;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ProjectDTO;
-import com.epmet.dto.project.ProjectAgencyDTO;
-import com.epmet.dto.project.ProjectCategoryDTO;
-import com.epmet.dto.project.ProjectGridDTO;
-import com.epmet.dto.project.ProjectPointDTO;
+import com.epmet.dto.project.*;
import com.epmet.dto.project.result.ProjectExceedParamsResultDTO;
import com.epmet.entity.project.ProjectEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -194,4 +191,11 @@ public interface ProjectDao extends BaseDao {
List selectClosedProjectIds(@Param("customerId")String customerId,
@Param("origin")String origin,
@Param("projectStatus")String projectStatus);
+
+ /**
+ * 获取已转项目事件事件
+ * @param customerId
+ * @return
+ */
+ List getEventList(@Param("customerId")String customerId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java
index f96f3babc7..f766873cea 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java
@@ -206,24 +206,54 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl projectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.RESOLVED,
OrgTypeConstant.AGENCY);
+ Map eventProjectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
+ dateId, ProjectConstant.RESOLVED,
+ ProjectConstant.PROJECT_ORIGIN_EVENT);
if (!projectResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = projectResolvedTotal.get(item.getAgencyId());
+ int sum = item.getApprovalProjectResolvedCount();
+ if (null != dto) {
+ sum = sum + dto.getSum();
+ }
+ item.setApprovalProjectResolvedCount(sum);
+ });
+ }
+ if (!eventProjectResolvedTotal.isEmpty()) {
+ agencyGovernDailyList.forEach(item -> {
+ OrgStatisticsResultDTO dto = eventProjectResolvedTotal.get(item.getAgencyId());
+ int sum = item.getApprovalProjectResolvedCount();
if (null != dto) {
- item.setApprovalProjectResolvedCount(dto.getSum());
+ sum = sum + dto.getSum();
}
+ item.setApprovalProjectResolvedCount(sum);
});
}
// 当前组织内:来源于议题的项目:结案无需解决数
Map projectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.UNRESOLVED,
OrgTypeConstant.AGENCY);
+ Map eventProjectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
+ dateId, ProjectConstant.UNRESOLVED,
+ ProjectConstant.PROJECT_ORIGIN_EVENT);
if (!projectUnResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = projectUnResolvedTotal.get(item.getAgencyId());
+ int sum = item.getApprovalProjectUnResolvedCount();
+ if (null != dto) {
+ sum = sum + dto.getSum();
+ }
+ item.setApprovalProjectUnResolvedCount(sum);
+ });
+ }
+ if (!eventProjectUnResolvedTotal.isEmpty()) {
+ agencyGovernDailyList.forEach(item -> {
+ OrgStatisticsResultDTO dto = eventProjectUnResolvedTotal.get(item.getAgencyId());
+ int sum = item.getApprovalProjectUnResolvedCount();
if (null != dto) {
- item.setApprovalProjectUnResolvedCount(dto.getSum());
+ sum = sum + dto.getSum();
}
+ item.setApprovalProjectUnResolvedCount(sum);
});
}
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java
index 56346813b5..a5bb954bef 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java
@@ -108,6 +108,8 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl issueProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_ISSUE,DimObjectStatusConstant.UNRESOLVED);
Map approvalProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_AGENCY,DimObjectStatusConstant.RESOLVED);
Map approvalProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_AGENCY,DimObjectStatusConstant.UNRESOLVED);
+ Map eventProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_EVENT,DimObjectStatusConstant.RESOLVED);
+ Map eventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_EVENT,DimObjectStatusConstant.UNRESOLVED);
Map inGroupTopicResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.RESOLVED,NumConstant.ZERO_STR);
Map inGroupTopicUnResolvedMap=getTopicMap(customerId, null,ProjectConstant.CLOSED, DimObjectStatusConstant.UNRESOLVED,NumConstant.ZERO_STR);
Map dtoMap=getGovernGridClosedTotalCommonDTOMap(customerId,gridIds);
@@ -142,14 +144,24 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl projectList = projectService.getProjectInfo(customerId, dateString);
factOriginProjectMainDailyService.deleteByDate(customerId, dateString);
if (!CollectionUtils.isEmpty(projectList)) {
+ Map projectEventMap = projectService.getEventList(customerId);
//提取议题ID
List issueIds =
projectList.stream().filter(item -> ProjectConstant.ISSUE.equals(item.getOrigin())).map(ProjectDTO::getOriginId).collect(Collectors.toList());
@@ -154,11 +153,6 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
entity.setMonthId(dimId.getMonthId());
entity.setWeekId(dimId.getWeekId());
entity.setDateId(dimId.getDateId());
- if (ProjectConstant.ISSUE.equals(project.getOrigin())) {
- entity.setIssueId(project.getOriginId());
- } else {
- entity.setIssueId("");
- }
entity.setProjectStatus(project.getStatus());
entity.setIsResolved(project.getClosedStatus());
entity.setCreatedTime(project.getCreatedTime());
@@ -168,6 +162,20 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
entity.setTopicId("");
entity.setTopicCreatorId("");
entity.setGridId("");
+ if (ProjectConstant.ISSUE.equals(project.getOrigin())) {
+ entity.setIssueId(project.getOriginId());
+ } else if (ProjectConstant.PROJECT_ORIGIN_EVENT.equals(project.getOrigin())){
+ entity.setIssueId("");
+ ResiEventDTO eventDTO = projectEventMap.get(project.getId());
+ if (null != eventDTO) {
+ if (ProjectConstant.PUBLISHER_TYPE_GRID.equals(eventDTO.getOrgType())) {
+ entity.setGridId(eventDTO.getOrgId());
+ entity.setTopicCreatorId(eventDTO.getCreatedBy());
+ }
+ }
+ } else {
+ entity.setIssueId("");
+ }
String[] pIds = project.getOrgIdPath().split(StrConstant.COLON);
if (pIds.length > 1) {
entity.setPid(pIds[pIds.length - 2]);
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java
index c359035647..4c587f9694 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java
@@ -270,7 +270,7 @@ public class StatsIssueServiceImpl implements StatsIssueService {
//已结案项目统计
List closedProjectTotalList = projectService.getGridClosedProjectTotal(customerId, dateString);
//已结案项目增量
- List closedProjectIncList = projectService.getGridClosedProjectTotal(customerId, dateString);
+ List closedProjectIncList = projectService.getGridClosedProjectInc(customerId, dateString);
Map resolveMap= new HashMap<>();
Map unResolveMap = new HashMap<>();
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java
index e826c9f9e7..f4283979b0 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java
@@ -22,6 +22,7 @@ import com.epmet.dto.ProjectCategoryDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.project.ProjectAgencyDTO;
import com.epmet.dto.project.ProjectGridDTO;
+import com.epmet.dto.project.ResiEventDTO;
import com.epmet.dto.project.result.ProjectExceedParamsResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity;
import com.epmet.entity.project.ProjectEntity;
@@ -191,4 +192,11 @@ public interface ProjectService extends BaseService {
* @return
*/
List selectClosedProjectIds(String customerId,String origin ,String projectStatus);
+
+ /**
+ * 获取事件信息
+ * @param customerId
+ * @return
+ */
+ Map getEventList(String customerId);
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java
index f67bff807c..095a0ec901 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java
@@ -23,10 +23,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.project.ProjectDao;
import com.epmet.dto.ProjectDTO;
-import com.epmet.dto.project.ProjectAgencyDTO;
-import com.epmet.dto.project.ProjectCategoryDTO;
-import com.epmet.dto.project.ProjectGridDTO;
-import com.epmet.dto.project.ProjectPointDTO;
+import com.epmet.dto.project.*;
import com.epmet.dto.project.result.ProjectExceedParamsResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity;
import com.epmet.entity.project.ProjectEntity;
@@ -37,6 +34,7 @@ import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.*;
+import java.util.function.Function;
import java.util.stream.Collectors;
/**
@@ -239,5 +237,14 @@ public class ProjectServiceImpl extends BaseServiceImpl getEventList(String customerId) {
+ List list = baseDao.getEventList(customerId);
+ if (org.apache.commons.collections4.CollectionUtils.isEmpty(list)) {
+ return Collections.emptyMap();
+ }
+ return list.stream().collect(Collectors.toMap(ResiEventDTO::getProjectId, Function.identity()));
+ }
+
}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.23__resi_event.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.23__resi_event.sql
new file mode 100644
index 0000000000..57f4883dee
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.23__resi_event.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `epmet_data_statistical`.`fact_origin_project_main_daily`
+ MODIFY COLUMN `ORIGIN` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目来源 来源:议题issue 组织agency,事件resi_event' AFTER `PIDS`,
+ MODIFY COLUMN `ORIGIN_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目来源ID:议题id ;or组织id,事件ID' AFTER `ORIGIN`;
\ No newline at end of file
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
index 280de575cf..92dd3ee38a 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
@@ -707,7 +707,8 @@
) a ON fm.GRID_ID = a.orgId
WHERE
PROJECT_STATUS = 'closed'
- AND ORIGIN = "issue"
+ AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event')
+ AND GRID_ID != ''
AND CUSTOMER_ID = #{customerId}
AND DATE_ID <= #{dateId}
GROUP BY
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
index 11ce137aab..fdf90af1f3 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
@@ -1083,7 +1083,7 @@
FROM
fact_origin_project_main_daily
WHERE
- ORIGIN = 'agency'
+ (ORIGIN = 'agency' OR ORIGIN = 'resi_event')
AND CUSTOMER_ID = #{customerId}
AND DATE_ID = #{dateId}
@@ -1101,7 +1101,7 @@
FROM
fact_origin_project_main_daily
WHERE
- ORIGIN = 'agency'
+ (ORIGIN = 'agency' OR ORIGIN = 'resi_event')
AND CUSTOMER_ID = #{customerId}
AND DATE_ID <= #{dateId}
diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml
index 0b60e3efd5..476ae619c8 100644
--- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml
+++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml
@@ -55,7 +55,7 @@
FROM project
WHERE
DEL_FLAG = '0'
- AND ORIGIN = 'issue'
+ AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event')
AND STATUS = 'closed'
AND CUSTOMER_ID = #{customerId}
AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') #{date}
@@ -69,7 +69,7 @@
FROM project
WHERE
DEL_FLAG = '0'
- AND ORIGIN = 'issue'
+ AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event')
AND STATUS = 'closed'
AND CUSTOMER_ID = #{customerId}
AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') = #{date}
@@ -220,4 +220,19 @@
AND p.ORIGIN =#{origin}
+
+
+ select rero.RESI_EVENT_ID,
+ rero.ORG_TYPE,
+ rero.ORG_ID,
+ rero.ORG_PID,
+ rero.ORG_PIDS,
+ re.CREATED_BY,
+ re.PROJECT_ID
+ from resi_event_report_org rero
+ inner join resi_event re on rero.RESI_EVENT_ID = re.id and re.SHIFT_PROJECT = 1 and re.DEL_FLAG = '0'
+ where rero.del_flag = '0'
+ and rero.CUSTOMER_ID = #{customerId}
+
+
diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
index 4914a71cfc..4fc64984c9 100644
--- a/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
+++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
@@ -22,6 +22,7 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AliyunGroup;
import com.epmet.commons.tools.validator.group.QcloudGroup;
import com.epmet.commons.tools.validator.group.QiniuGroup;
+import com.epmet.constants.PrivacyType;
import com.epmet.dto.UploadDTO;
import com.epmet.dto.form.RemoveFileFormDTO;
import com.epmet.dto.result.UploadImgResultDTO;
@@ -373,4 +374,31 @@ public class OssController {
return ossService.uploadImgV2(file, null, customerId);
}
+ /**
+ * @Description 上传报事文件(目前只有图片)
+ * @return
+ * @author wxz
+ * @date 2021.08.03 16:23
+ */
+ @PostMapping("upload-resi-event-file")
+ public Result uploadResiEventFile(@RequestPart(value = "file") MultipartFile file, @RequestParam("customerId") String customerId) {
+
+ // 体积限制
+ int sizeMb = 10;
+ int sizeThreshold = sizeMb * 1024 * 1024; // 大小限制10m
+ if (file.getSize() > sizeThreshold) {
+ throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode(),
+ EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg().concat(",限制在").concat(String.valueOf(sizeMb)).concat("M以内"));
+ }
+
+ // 格式限制,只允许png和jpeg
+ if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType())
+ && !MediaType.IMAGE_JPEG_VALUE.equals(file.getContentType())) {
+ throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode()
+ , EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg());
+ }
+
+ return ossService.uploadImgV2(file, PrivacyType.EXTERNAL, customerId);
+ }
+
}
diff --git a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/RedDotFormDTO.java b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/RedDotFormDTO.java
index be67ff5a33..aa4906e7ee 100644
--- a/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/RedDotFormDTO.java
+++ b/epmet-module/gov-grid/gov-grid-client/src/main/java/com/epmet/dto/form/RedDotFormDTO.java
@@ -25,5 +25,10 @@ public class RedDotFormDTO implements Serializable {
*/
//@NotBlank(message = "网格id不能为空")
private String gridId;
+
+ /**
+ * 当前工作人员所属的组织id
+ */
+ private String agencyId;
}
diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/constant/WorkGrassRootsFunctionConstant.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/constant/WorkGrassRootsFunctionConstant.java
index 772990f98d..fb077deb46 100644
--- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/constant/WorkGrassRootsFunctionConstant.java
+++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/constant/WorkGrassRootsFunctionConstant.java
@@ -32,6 +32,9 @@ public class WorkGrassRootsFunctionConstant {
*/
public static final String WORK_GRASSROOTS_BADGE="work_grassroots_badge";
-
+ /**
+ * 基层治理-群众直报 功能入口
+ */
+ public static final String RESI_EVENT_MANAGE="resi_event_manage";
}
diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java
index a2916ee01c..bb57c4f241 100644
--- a/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java
+++ b/epmet-module/gov-grid/gov-grid-server/src/main/java/com/epmet/service/impl/RemindServiceImpl.java
@@ -44,6 +44,8 @@ public class RemindServiceImpl implements RemindService {
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+ @Autowired
+ private GovProjectOpenFeignClient govProjectOpenFeignClient;
@Override
public RedDotResultDTO queryGridRedDot(RedDotFormDTO formDTO) {
@@ -217,12 +219,11 @@ public class RemindServiceImpl implements RemindService {
RedDotResultDTO redDotResultDTO = new RedDotResultDTO();
redDotResultDTO.setOtherGridRedDot(false);
redDotResultDTO.setFunctionList(Collections.EMPTY_LIST);
-
+ List functionList = new ArrayList<>();
+ List details = new ArrayList<>();
Result> govOrgResult = govOrgFeignClient.getMyGrids(formDTO.getStaffId());
if (govOrgResult.success() && !CollectionUtils.isEmpty(govOrgResult.getData())) {
- List functionList = new ArrayList<>();
- List details = new ArrayList<>();
List gridIdList = govOrgResult.getData().stream().map(CustomerGridByUserIdResultDTO::getGridId).collect(Collectors.toList());
//1、群组管理(待审核的小组申请、变更小组申请)
@@ -335,11 +336,20 @@ public class RemindServiceImpl implements RemindService {
}
});
}
- redDotResultDTO.setFunctionList(functionList);
- redDotResultDTO.setDetails(details);
} else {
logger.warn(String.format("基层治理红点查询,获取工作人员所属网格失败,当前staffId=%s", formDTO.getStaffId()));
}
+
+ // 群众直报:当前工作人员所属的组织存在待处理(未读的)、有新的回复的(相当于处理中有红点的)记录就显示红点
+ if(org.apache.commons.lang3.StringUtils.isNotBlank(formDTO.getAgencyId())){
+ Result projectRes=govProjectOpenFeignClient.queryResiEventManageRedDot(formDTO.getAgencyId());
+ if(projectRes.success()&&null !=projectRes.getData()&&projectRes.getData().getTotalCount()>0){
+ functionList.add(WorkGrassRootsFunctionConstant.RESI_EVENT_MANAGE);
+ details.add(new RedDotDetialDTO(WorkGrassRootsFunctionConstant.RESI_EVENT_MANAGE, projectRes.getData().getTotalCount().longValue()));
+ }
+ }
+ redDotResultDTO.setFunctionList(functionList);
+ redDotResultDTO.setDetails(details);
return redDotResultDTO;
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EventTitleOrgResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EventTitleOrgResultDTO.java
new file mode 100644
index 0000000000..50b05afb6c
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EventTitleOrgResultDTO.java
@@ -0,0 +1,20 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/5 5:23 下午
+ * @DESC
+ */
+@Data
+public class EventTitleOrgResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -517506506008916648L;
+
+ private String agencyId;
+ private String gridId;
+ private String gridName;
+}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrgNameByTypeResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrgNameByTypeResultDTO.java
new file mode 100644
index 0000000000..dd5aa27458
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/OrgNameByTypeResultDTO.java
@@ -0,0 +1,22 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/4 5:48 下午
+ * @DESC
+ */
+@Data
+public class OrgNameByTypeResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -6544341694748437312L;
+
+ private String orgId;
+
+ private String orgType;
+
+ private String orgName;
+}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/OrgLevelEnums.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/OrgLevelEnums.java
new file mode 100644
index 0000000000..00107ec8f5
--- /dev/null
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/enums/OrgLevelEnums.java
@@ -0,0 +1,66 @@
+package com.epmet.enums;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.Optional;
+
+/**
+ * @Description 入职级别枚举
+ * @author wxz
+ * @date 2021.08.03 14:29:01
+*/
+@Slf4j
+public enum OrgLevelEnums {
+
+ GRID("grid", "网格"),
+ COMMUNITY("community", "社区"),
+ STREET("street", "街道"),
+ DISTRICT("district", "区"),
+ CITY("city", "市"),
+ PROVINCE("province", "省"),
+
+ DEPARTMENT("department", "部门"),
+ ;
+
+ private String level;
+ private String levelName;
+
+ OrgLevelEnums(String level, String levelName) {
+ this.level = level;
+ this.levelName = levelName;
+ }
+
+ /**
+ * @Description 级别枚举对象
+ * @return
+ * @author wxz
+ * @date 2021.08.03 14:46
+ */
+ public static OrgLevelEnums getLevelObject(String level) {
+ for (OrgLevelEnums l :OrgLevelEnums.values()) {
+ if (l.getLevel().equals(level)) {
+ return l;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @Description 级别中文名称
+ * @return
+ * @author wxz
+ * @date 2021.08.03 14:47
+ */
+ public static String getLevelName(String level) {
+ OrgLevelEnums levelObject = getLevelObject(level);
+ return levelObject == null ? null : levelObject.getLevelName();
+ }
+
+ public String getLevel() {
+ return level;
+ }
+
+ public String getLevelName() {
+ return levelName;
+ }
+}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
index bf6df86b7b..7237abcc5b 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
@@ -370,4 +370,41 @@ public interface GovOrgOpenFeignClient {
*/
@PostMapping("/gov/org/staff/mine")
Result queryStaffProfile(@RequestBody StaffInfoFromDTO fromDTO);
+
+ /**
+ * @Description 查询工作人员名字 【xx组织-章三】
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/4 4:23 下午
+ */
+ @PostMapping("/gov/org/staff/staffname")
+ Result staffName(@RequestParam("userId")String userId);
+
+ /**
+ * @Description 查询网格名字
+ * @Param gridName
+ * @author zxc
+ * @date 2021/8/4 4:26 下午
+ */
+ @PostMapping("/gov/org/customergrid/selectgridname")
+ Result gridName(@RequestParam("gridId")String gridId);
+
+ /**
+ * @Description 根据类型查询组织名称
+ * @Param formList
+ * @author zxc
+ * @date 2021/8/4 6:14 下午
+ */
+ @PostMapping("/gov/org/customergrid/selectorgnamebytype")
+ Result> selectOrgNameByType(@RequestBody List formList);
+
+ /**
+ * @Description 根据人查询所在组织
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/5 10:08 上午
+ */
+ @PostMapping("/gov/org/customergrid/selectorgsbyuserid")
+ Result> selectOrgsByUserId(@RequestParam("userId")String userId);
+
}
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
index c384f302aa..91f9052c84 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
@@ -215,6 +215,26 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "mine", fromDTO);
}
+ @Override
+ public Result staffName(String userId) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "staffName", userId);
+ }
+
+ @Override
+ public Result gridName(String gridId) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "gridName", gridId);
+ }
+
+ @Override
+ public Result> selectOrgNameByType(List formList) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectOrgNameByType", formList);
+ }
+
+ @Override
+ public Result> selectOrgsByUserId(String userId) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectOrgsByUserId", userId);
+ }
+
@Override
public Result selectPidsByGridId(String gridId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectPidsByGridId", gridId);
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java
index bb06477812..c765a58962 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java
@@ -252,4 +252,38 @@ public class CustomerGridController {
public Result selectPidsByGridId(@RequestParam("gridId") String gridId){
return new Result().ok(customerGridService.selectPidsByGridId(gridId));
}
+
+ /**
+ * @Description 查询网格名字
+ * @Param gridId
+ * @author zxc
+ * @date 2021/8/4 4:26 下午
+ */
+ @PostMapping("selectgridname")
+ Result gridName(@RequestParam("gridId")String gridId){
+ return new Result().ok(customerGridService.gridName(gridId));
+ }
+
+ /**
+ * @Description 根据类型查询组织名称
+ * @Param formList
+ * @author zxc
+ * @date 2021/8/4 6:14 下午
+ */
+ @PostMapping("selectorgnamebytype")
+ public Result> selectOrgNameByType(@RequestBody List formList){
+ return new Result>().ok(customerGridService.selectOrgNameByType(formList));
+ }
+
+ /**
+ * @Description 根据人查询所在组织
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/5 10:08 上午
+ */
+ @PostMapping("/selectorgsbyuserid")
+ public Result> selectOrgsByUserId(@RequestParam("userId")String userId){
+ return new Result>().ok(customerGridService.selectOrgsByUserId(userId));
+ }
+
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
index 53e6330d06..cba514d051 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
@@ -17,7 +17,9 @@
package com.epmet.controller;
+import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@@ -29,6 +31,7 @@ import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
+import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.excel.CustomerStaffGridExcel;
import com.epmet.service.CustomerStaffGridService;
@@ -131,4 +134,15 @@ public class CustomerStaffGridController {
public Result> selectGridStaffByGridIds(@RequestBody List gridIds){
return new Result>().ok(customerStaffGridService.selectGridStaffByGridIds(gridIds));
}
+
+ /**
+ * @Description 查询ORG
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/5 5:36 下午
+ */
+ @PostMapping("eventorg")
+ public Result> eventOrg(@LoginUser TokenDto tokenDto){
+ return new Result>().ok(customerStaffGridService.eventOrg(tokenDto.getUserId()));
+ }
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java
index 88ee0bd046..834cd56869 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java
@@ -12,10 +12,7 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.service.StaffService;
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 org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -157,4 +154,15 @@ public class StaffController {
ValidatorUtils.validateEntity(fromDTO, StaffBasicInfoFromDTO.AddUserInternalGroup.class);
return staffService.staffBasicInfo(fromDTO);
}
+
+ /**
+ * @Description 查询工作人员名字
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/4 3:38 下午
+ */
+ @PostMapping("staffname")
+ public Result staffName(@RequestParam("userId")String userId){
+ return new Result().ok(staffService.staffName(userId));
+ }
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java
index ec16bf0dcd..fae6640a7d 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java
@@ -276,4 +276,28 @@ public interface CustomerGridDao extends BaseDao {
* @date 2021/7/16 9:52 上午
*/
String selectPidsByGridId(@Param("gridId")String gridId);
+
+ /**
+ * @Description 查询网格名字
+ * @Param gridId
+ * @author zxc
+ * @date 2021/8/4 4:30 下午
+ */
+ String gridName(String gridId);
+
+ /**
+ * @Description 查询组织名字
+ * @Param orgIds
+ * @author zxc
+ * @date 2021/8/4 6:25 下午
+ */
+ List selectOrgNameByType(@Param("orgIds") List orgIds);
+
+ /**
+ * @Description 根据人查询所在组织
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/5 10:08 上午
+ */
+ List selectOrgsByUserId(@Param("userId") String userId);
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java
index ffc46fa725..864603ee07 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java
@@ -108,4 +108,12 @@ public interface CustomerStaffAgencyDao extends BaseDao getAgencyStaffList(@Param("agencyId")String agencyId);
+
+ /**
+ * @Description 查询工作人员所属组织名字
+ * @Param staffId
+ * @author zxc
+ * @date 2021/8/4 3:54 下午
+ */
+ String selectStaffBelongAgency(@Param("staffId")String staffId);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
index d9ce1b0e61..426a0e6b3a 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
@@ -22,6 +22,7 @@ import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerStaffDepartmentDTO;
import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.LatestGridFormDTO;
+import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -106,4 +107,12 @@ public interface CustomerStaffGridDao extends BaseDao {
* @date 2021/6/8 3:36 下午
*/
List selectGridStaffByGridIds(@Param("gridIds") List gridIds);
+
+ /**
+ * @Description 查询ORG
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/5 5:36 下午
+ */
+ List eventOrg(@Param("userId") String userId);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java
index b892fa84f8..78221d8fa8 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java
@@ -295,4 +295,28 @@ public interface CustomerGridService extends BaseService {
* @date 2021/7/16 9:52 上午
*/
String selectPidsByGridId(String gridId);
+
+ /**
+ * @Description 查询网格名字
+ * @Param gridId
+ * @author zxc
+ * @date 2021/8/4 4:26 下午
+ */
+ String gridName(String gridId);
+
+ /**
+ * @Description 根据类型查询组织名称
+ * @Param formList
+ * @author zxc
+ * @date 2021/8/4 6:14 下午
+ */
+ List selectOrgNameByType(List formList);
+
+ /**
+ * @Description 根据人查询所在组织
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/5 10:08 上午
+ */
+ List selectOrgsByUserId(String userId);
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
index 0cf4041cce..1e78f3725b 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
@@ -26,6 +26,7 @@ import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CommonStaffInfoResultDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
+import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
@@ -126,4 +127,12 @@ public interface CustomerStaffGridService extends BaseService selectGridStaffByGridIds(List gridIds);
+
+ /**
+ * @Description 查询ORG
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/5 5:36 下午
+ */
+ List eventOrg(String userId);
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java
index f23330fa24..5ac3ac549a 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java
@@ -105,4 +105,12 @@ public interface StaffService {
* @author sun
*/
Result staffBasicInfo(StaffBasicInfoFromDTO fromDTO);
+
+ /**
+ * @Description 查询工作人员名字
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/4 3:38 下午
+ */
+ String staffName(String userId);
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
index 007aabd4b9..23de67608c 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
@@ -721,4 +721,37 @@ public class CustomerGridServiceImpl extends BaseServiceImpl selectOrgNameByType(List formList) {
+ return baseDao.selectOrgNameByType(formList);
+ }
+
+ /**
+ * @Description 根据人查询所在组织
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/5 10:08 上午
+ */
+ @Override
+ public List selectOrgsByUserId(String userId) {
+ return baseDao.selectOrgsByUserId(userId);
+ }
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
index ac8abc82fc..27d3da6576 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
@@ -31,6 +31,7 @@ import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
+import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
@@ -181,4 +182,15 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl eventOrg(String userId) {
+ return baseDao.eventOrg(userId);
+ }
}
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
index a77dd1c449..ec8ea004aa 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
@@ -7,6 +7,7 @@ import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
+import com.epmet.dao.CustomerStaffAgencyDao;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
@@ -14,6 +15,7 @@ import com.epmet.entity.CustomerAgencyEntity;
import com.epmet.entity.CustomerStaffAgencyEntity;
import com.epmet.feign.*;
import com.epmet.service.*;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -51,6 +53,8 @@ public class StaffServiceImpl implements StaffService {
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private RedisUtils redisUtils;
+ @Autowired
+ private CustomerStaffAgencyDao customerStaffAgencyDao;
@Override
public Result getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) {
@@ -274,4 +278,27 @@ public class StaffServiceImpl implements StaffService {
public Result staffBasicInfo(StaffBasicInfoFromDTO fromDTO) {
return epmetUserOpenFeignClient.getStaffBasicInfo(fromDTO);
}
+
+ /**
+ * @Description 查询工作人员名字
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/4 3:38 下午
+ */
+ @Override
+ public String staffName(String userId) {
+ // 查询所属组织名字
+ String agencyName = customerStaffAgencyDao.selectStaffBelongAgency(userId);
+ if (StringUtils.isEmpty(agencyName)){
+ throw new RenException("查询工作人员所属组织名称为空");
+ }
+ StaffBasicInfoFromDTO formDTO = new StaffBasicInfoFromDTO();
+ formDTO.setStaffId(userId);
+ Result staffBasicInfo = epmetUserOpenFeignClient.getStaffBasicInfo(formDTO);
+ if (!staffBasicInfo.success()){
+ throw new RenException("查询工作人员姓名失败");
+ }
+ String result = agencyName.concat(staffBasicInfo.getData().getRealName());
+ return result;
+ }
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
index 6c348a0489..0667d009c4 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
@@ -584,4 +584,38 @@
SELECT PIDS FROM customer_grid WHERE DEL_FLAG = '0' AND ID = #{gridId}
+
+
+
+ SELECT
+ CONCAT(ca.ORGANIZATION_NAME,'-',cg.GRID_NAME) AS gridName
+ FROM customer_grid cg
+ LEFT JOIN customer_agency ca ON (ca.id = cg.PID AND ca.DEL_FLAG = '0')
+ WHERE cg.DEL_FLAG = 0
+ AND cg.ID = #{gridId}
+
+
+
+
+ SELECT GRID_NAME AS orgName FROM customer_grid WHERE DEL_FLAG = '0'
+ AND(
+
+ id = #{orgId}
+
+ )
+ UNION ALL
+ SELECT ORGANIZATION_NAME AS orgName FROM customer_agency WHERE DEL_FLAG = '0'
+ AND(
+
+ id = #{orgId}
+
+ )
+
+
+
+
+ SELECT GRID_ID AS orgId FROM customer_staff_grid WHERE del_flag = '0' AND USER_ID = #{userId}
+ union ALL
+ SELECT agency_id AS orgId FROM customer_staff_agency WHERE del_flag = '0' and USER_ID = #{userId}
+
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
index 3df433a5b6..b7559668a8 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
@@ -152,4 +152,14 @@
del_flag = '0'
AND agency_id = #{agencyId}
+
+
+
+ SELECT
+ CONCAT(ca.ORGANIZATION_NAME,'-') AS agencyName
+ FROM customer_staff_agency sa
+ LEFT JOIN customer_agency ca ON (ca.ID = sa.AGENCY_ID AND ca.DEL_FLAG = '0')
+ WHERE sa.DEL_FLAG = 0
+ AND sa.USER_ID = #{staffId}
+
\ No newline at end of file
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
index 5e08a59b97..1d11a957b2 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
@@ -102,6 +102,27 @@
)
+
+
+ SELECT
+ sa.AGENCY_ID AS agencyId,
+ sa.AGENCY_ID AS gridId,
+ ca.ORGANIZATION_NAME AS gridName
+ FROM customer_staff_agency sa
+ LEFT JOIN customer_agency ca ON (ca.ID = sa.AGENCY_ID AND ca.DEL_FLAG = 0)
+ WHERE sa.DEL_FLAG = 0
+ AND sa.USER_ID = #{userId}
+ UNION ALL
+ SELECT
+ cg.PID AS agencyId,
+ sg.GRID_ID AS gridId,
+ cg.GRID_NAME AS gridName
+ FROM customer_staff_grid sg
+ LEFT JOIN customer_grid cg ON (cg.ID = sg.GRID_ID AND cg.DEL_FLAG = 0)
+ WHERE sg.DEL_FLAG = 0
+ AND sg.USER_ID = #{userId}
+
+
insert into customer_staff_grid
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/EventProjectInfoDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/EventProjectInfoDTO.java
new file mode 100644
index 0000000000..f3866f0a13
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/EventProjectInfoDTO.java
@@ -0,0 +1,47 @@
+package com.epmet.dto;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/3 1:38 下午
+ * @DESC
+ */
+@Data
+public class EventProjectInfoDTO implements Serializable {
+
+ private static final long serialVersionUID = 5622220354099001615L;
+
+ /**
+ * 项目ID
+ */
+ private String projectId;
+
+ /**
+ * 操作人【xxx社区-张三】
+ */
+ private String operationName;
+
+ /**
+ * 操作时间
+ */
+ private String operationTime;
+
+ @JsonIgnore
+ private String userId;
+
+ /**
+ * 报事说明
+ */
+ private String projectDeclare;
+
+ public EventProjectInfoDTO() {
+ this.projectId = "";
+ this.operationName = "";
+ this.operationTime = "";
+ this.projectDeclare = "";
+ }
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ChooseResolveFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ChooseResolveFormDTO.java
new file mode 100644
index 0000000000..f52f9622fe
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ChooseResolveFormDTO.java
@@ -0,0 +1,42 @@
+package com.epmet.dto.form;
+
+import com.epmet.dto.result.ResiEventIdDTO;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 选择已解决,未解决??
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/3 13:53
+ */
+@Data
+public class ChooseResolveFormDTO extends ResiEventIdDTO implements Serializable {
+ private static final long serialVersionUID = 7888566055415227282L;
+
+
+ public interface AddUserInternalGroup {
+ }
+
+ /**
+ * 是否解决:已解决 resolved,未解决 un_solved
+ */
+ @NotBlank(message = "resolveStatus不能为空",groups = AddUserInternalGroup.class)
+ private String resolveStatus;
+
+
+ //以下参数从token中获取
+ /**
+ * 当前用户id
+ */
+ @NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
+ private String userId;
+
+ /**
+ * 当前客户id
+ */
+ @NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
+ private String customerId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/CloseResiEventFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/CloseResiEventFormDTO.java
new file mode 100644
index 0000000000..bf3cdcc62c
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/CloseResiEventFormDTO.java
@@ -0,0 +1,29 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 报事-办结 入参DTO
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/5 10:44
+ */
+@Data
+public class CloseResiEventFormDTO implements Serializable {
+ private static final long serialVersionUID = -3621650590714057648L;
+
+ public interface AddUserInternalGroup {
+ }
+ @NotBlank(message = "eventId不能为空", groups = AddUserInternalGroup.class)
+ private String eventId;
+
+ //以下参数从token中获取
+ /**
+ * 当前用户id
+ */
+ @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
+ private String userId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventDetailFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventDetailFormDTO.java
new file mode 100644
index 0000000000..65a4143f9d
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventDetailFormDTO.java
@@ -0,0 +1,24 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/3 1:27 下午
+ * @DESC
+ */
+@Data
+public class EventDetailFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -297495947153154171L;
+
+ public interface EventDetailForm{}
+
+ @NotBlank(message = "报事ID不能为空",groups = EventDetailForm.class)
+ private String eventId;
+
+ private String orgId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventListFormDTO.java
new file mode 100644
index 0000000000..e4632b7f33
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventListFormDTO.java
@@ -0,0 +1,32 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/3 10:43 上午
+ * @DESC
+ */
+@Data
+public class EventListFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 5882062169112022561L;
+
+ public interface EventListForm{}
+
+ /**
+ * 报事列表类型【处理中:processed 待处理:undisposed 已办结:transferred】
+ */
+ @NotBlank(message = "报事列表类型不能为空",groups = EventListForm.class)
+ private String eventType;
+
+ @NotBlank(message = "",groups = EventListForm.class)
+ private String orgId;
+
+ private Integer pageNo;
+ private Integer pageSize;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventShiftProjectDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventShiftProjectDTO.java
new file mode 100644
index 0000000000..b5ef015258
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventShiftProjectDTO.java
@@ -0,0 +1,23 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 事件立项,入参
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/5 16:15
+ */
+@Data
+public class EventShiftProjectDTO implements Serializable {
+ private static final long serialVersionUID = 5519721673862754305L;
+ //转项目的人
+ private String userId;
+ private String eventId;
+ private String projectId;
+ private Date shiftProjectTime;
+ private String userAgencyId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java
new file mode 100644
index 0000000000..560ebfe2d8
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventToProjectFormDTO.java
@@ -0,0 +1,97 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 事件-里项目
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/5 15:19
+ */
+@Data
+public class EventToProjectFormDTO implements Serializable {
+ private static final long serialVersionUID = 3392008990676159012L;
+
+ public interface AddUserInternalGroup {
+ }
+
+ public interface ApprovalCategory extends CustomerClientShowGroup {
+ }
+
+ /**
+ * 事件id
+ */
+ @NotBlank(message = "事件id不能为空", groups = AddUserInternalGroup.class)
+ private String eventId;
+
+ /**
+ * 项目方案 1000
+ */
+ @Length(min = 1, max = 1000, message = "项目方案1000字", groups = {ApprovalCategory.class})
+ private String publicReply;
+ /**
+ * 内部备注 1000
+ * 21.08.09 直接立项的内部备注是必填的,然后议题转项目和我要直报转项目的都是非必填的
+ */
+ //@Length(min = 1, max = 1000, message = "内部备注1000字", groups = {ApprovalCategory.class})
+ private String internalRemark;
+
+ /**
+ * 吹哨勾选的工作人员信息集合,不可为空
+ */
+ @Valid
+ private List staffList;
+ /**
+ * 项目所选分类集合,不可为空
+ */
+ @Valid
+ private List categoryList;
+ /**
+ * 项目所选标签集合
+ */
+ private List tagList;
+
+ @Length(min = 1, max = 20, message = "项目标题不能超过20位", groups = {ApprovalCategory.class})
+ private String title;
+
+ /**
+ * 公开答复对应文件集合
+ */
+ private List publicFile;
+ /**
+ * 内部备注对应文件集合
+ */
+ private List internalFile;
+
+ //定位地址[立项项目指的项目发生位置,议题转的项目指的话题发生位置]
+ private String locateAddress;
+ //定位经度
+ private String locateLongitude;
+ //定位纬度
+ private String locateDimension;
+
+
+
+ //以下参数从token中获取
+ /**
+ * 当前用户id
+ */
+ @NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
+ private String userId;
+
+ /**
+ * 当前客户id
+ */
+ @NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
+ private String customerId;
+
+ private String app;
+ private String client;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MentionUserFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MentionUserFormDTO.java
new file mode 100644
index 0000000000..52c37f1563
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MentionUserFormDTO.java
@@ -0,0 +1,41 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 被艾特的人
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/3 15:51
+ */
+@Data
+public class MentionUserFormDTO implements Serializable {
+
+ /**
+ * 人大代表用户id
+ */
+ private String userId;
+
+ /**
+ * 人大代表注册网格id
+ */
+ private String gridId;
+
+ /**
+ * 人大代表注册网格所属社区id
+ */
+ private String agencyId;
+
+ /**
+ * 注册网格的所有上级
+ */
+ private String pids;
+
+ /**
+ * 人大代表姓名
+ */
+ private String userShowName;
+
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportedFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportedFormDTO.java
new file mode 100644
index 0000000000..a1cdd9d389
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportedFormDTO.java
@@ -0,0 +1,42 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 我的报事列表查询
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/3 14:07
+ */
+@Data
+public class MyReportedFormDTO implements Serializable {
+ private static final long serialVersionUID = 8426911903236849796L;
+
+ public interface AddUserInternalGroup {
+ }
+
+ /**
+ * 未处理:un_read;处理中:processing;已办结:closed_case
+ */
+ @NotBlank(message = "statusCondition不能为空",groups = AddUserInternalGroup.class)
+ private String statusCondition;
+
+ private Integer pageNo;
+ private Integer pageSize;
+
+ //以下参数从token中获取
+ /**
+ * 当前用户id
+ */
+ @NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
+ private String userId;
+
+ /**
+ * 当前客户id
+ */
+ @NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
+ private String customerId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReCallEventFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReCallEventFormDTO.java
new file mode 100644
index 0000000000..a52f89d02a
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReCallEventFormDTO.java
@@ -0,0 +1,34 @@
+package com.epmet.dto.form;
+
+import com.epmet.dto.result.ResiEventIdDTO;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 撤回事件入参
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/3 11:28
+ */
+@Data
+public class ReCallEventFormDTO extends ResiEventIdDTO implements Serializable {
+ private static final long serialVersionUID = 2127663703852717437L;
+
+ public interface AddUserInternalGroup {
+ }
+
+ //以下参数从token中获取
+ /**
+ * 当前用户id
+ */
+ @NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
+ private String userId;
+
+ /**
+ * 当前客户id
+ */
+ @NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
+ private String customerId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReplyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReplyFormDTO.java
new file mode 100644
index 0000000000..a6729ff46f
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReplyFormDTO.java
@@ -0,0 +1,34 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 回复通用入参
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/4 14:16
+ */
+@Data
+public class ReplyFormDTO implements Serializable {
+ private static final long serialVersionUID = 1653042839040178697L;
+ public interface AddUserInternalGroup {
+ }
+ public interface AddUserShowGroup extends CustomerClientShowGroup {
+ }
+ @NotBlank(message = "事件id不能为空",groups = AddUserInternalGroup.class)
+ private String resiEventId;
+ @Length(min = 1, max = 200, message = "请填写回复内容,最多输入200字", groups = AddUserShowGroup.class)
+ private String content;
+
+ //以下参数从token中获取
+ /**
+ * 当前用户id
+ */
+ @NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
+ private String userId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReplyListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReplyListFormDTO.java
new file mode 100644
index 0000000000..ed9bb74e21
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReplyListFormDTO.java
@@ -0,0 +1,26 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/3 11:07 上午
+ * @DESC
+ */
+@Data
+public class ReplyListFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 3875624725235229558L;
+
+ public interface ReplyListForm{}
+
+ @NotBlank(message = "报事ID不能为空",groups = ReplyListForm.class)
+ private String resiEventId;
+
+ @NotBlank(message = "当前用户id不能为空",groups = ReplyListForm.class)
+ private String currentUserId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReportOrgFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReportOrgFormDTO.java
new file mode 100644
index 0000000000..56b6184fd2
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReportOrgFormDTO.java
@@ -0,0 +1,34 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 报给谁?
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/3 15:51
+ */
+@Data
+public class ReportOrgFormDTO implements Serializable {
+ /**
+ * 报给?: 网格:grid; 社区:community; 乡(镇、街道)级:street; 区县级: district; 市级: city; 省级:province。
+ */
+ private String orgLevel;
+
+ /**
+ * 报给的组织或者网格id
+ */
+ private String orgId;
+
+ /**
+ * org_id的上级组织id,org_id是跟组织,此列为0
+ */
+ private String orgPid;
+
+ /**
+ * org_id的所有上级组织id,org_id是跟组织,此列为0
+ */
+ private String orgPids;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java
new file mode 100644
index 0000000000..b0d1f4ff99
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java
@@ -0,0 +1,85 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.dto.form.FileCommonDTO;
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 我要报事-提交(尹)
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/3 10:46
+ */
+@Data
+public class ResiEventFormDTO implements Serializable {
+ private static final long serialVersionUID = -778643059131036832L;
+
+ public interface AddUserInternalGroup {
+ }
+ public interface AddUserShowGroup extends CustomerClientShowGroup {
+ }
+
+ /**
+ * 用户所在网格id
+ */
+ @NotBlank(message = "不能为空",groups = AddUserInternalGroup.class)
+ private String gridId;
+
+ /**
+ * 事件内容,最多1000
+ */
+ @Length(min = 1, max = 1000, message = "请填写内容,最多输入1000字", groups = AddUserShowGroup.class)
+ private String eventContent;
+
+ /**
+ * 纬度
+ */
+ private String latitude;
+
+ /**
+ * 经度
+ */
+ private String longitude;
+
+ /**
+ * 地址
+ */
+ @NotBlank(message = "地址不能为空",groups = AddUserShowGroup.class)
+ private String address;
+
+ /**
+ * 附件列表
+ */
+ private List attachmentList;
+ /**
+ * @的人
+ */
+ private List npcUserList;
+
+ /**
+ * 报给谁?
+ */
+ @NotEmpty(message = "不能为空",groups = AddUserInternalGroup.class)
+ private List orgList;
+
+
+
+ //以下参数从token中获取
+ /**
+ * 当前用户id
+ */
+ @NotBlank(message = "userId不能为空",groups =AddUserInternalGroup.class)
+ private String userId;
+
+ /**
+ * 当前客户id
+ */
+ @NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
+ private String customerId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/UpdateViewTimeFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/UpdateViewTimeFormDTO.java
new file mode 100644
index 0000000000..c397dc8d08
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/UpdateViewTimeFormDTO.java
@@ -0,0 +1,43 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/3 10:55 上午
+ * @DESC 报事-首次查看事件-两端通用
+ */
+@Data
+public class UpdateViewTimeFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 7104400078458366322L;
+ public interface AddUserInternalGroup {
+ }
+ public interface GovInternalGroup {
+ }
+
+ // 居民端:resi_user;工作端:staff
+ @NotBlank(message = "viewType不能为空", groups = AddUserInternalGroup.class)
+ private String viewType;
+ @NotBlank(message = "eventId不能为空", groups = AddUserInternalGroup.class)
+ private String eventId;
+ @NotBlank(message = "orgId不能为空", groups = GovInternalGroup.class)
+ private String orgId;
+
+ //以下参数从token中获取
+ /**
+ * 当前用户id
+ */
+ @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
+ private String userId;
+
+ /**
+ * 当前客户id
+ */
+ @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
+ private String customerId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/UserMentionFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/UserMentionFormDTO.java
new file mode 100644
index 0000000000..861abebb95
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/UserMentionFormDTO.java
@@ -0,0 +1,44 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * 我要报事-人大代表未读/已读列表入参
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/4 9:34
+ */
+@Data
+public class UserMentionFormDTO implements Serializable {
+ private static final long serialVersionUID = 7548058964554418080L;
+
+ public interface AddUserInternalGroup {
+ }
+
+ /**
+ * 未读:un_read;已读:read;
+ */
+ @NotBlank(message = "readFlag不能为空", groups = AddUserInternalGroup.class)
+ private String readFlag;
+ @NotNull(message = "pageNo不能为空", groups = AddUserInternalGroup.class)
+ private Integer pageNo;
+ @NotNull(message = "pageSize不能为空", groups = AddUserInternalGroup.class)
+ private Integer pageSize;
+
+ //以下参数从token中获取
+ /**
+ * 当前用户id
+ */
+ @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class)
+ private String userId;
+
+ /**
+ * 当前客户id
+ */
+ @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class)
+ private String customerId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventDetailResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventDetailResultDTO.java
new file mode 100644
index 0000000000..18295391c5
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventDetailResultDTO.java
@@ -0,0 +1,108 @@
+package com.epmet.dto.result;
+
+import com.epmet.dto.EventProjectInfoDTO;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/3 1:30 下午
+ * @DESC
+ */
+@Data
+public class EventDetailResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 3905105043326445613L;
+
+ /**
+ * 报事时间
+ */
+ private String eventTime;
+
+ /**
+ * 报事内容
+ */
+ private String eventContent;
+
+ /**
+ * 报事地址
+ */
+ private String eventAddress;
+
+ /**
+ * 所属网格【xx社区-xx网格】
+ */
+ private String gridName;
+
+ @JsonIgnore
+ private String gridId;
+
+ /**
+ * 是否办结【是:true,否:false】
+ */
+ private Boolean isClosed;
+
+ /**
+ * 是否解决【是:true,否:false】
+ */
+ private Boolean isResolve;
+
+ /**
+ * 是否可以撤回【true:是,false:否】
+ */
+ private Boolean isRollback;
+
+ /**
+ * 报事图片
+ */
+ private List eventImgs;
+
+ /**
+ * 报事提到的人
+ */
+ private List eventPerson;
+
+ /**
+ * 被提到的组织
+ */
+ private List eventOrg;
+
+ /**
+ * 报事人名字
+ */
+ private String eventPeopleName;
+
+ @JsonIgnore
+ private String eventUserId;
+
+ /**
+ * 项目信息
+ */
+ private EventProjectInfoDTO projectInfo;
+
+ @JsonIgnore
+ private List orgNameList;
+
+ @JsonIgnore
+ private String projectId;
+
+ @JsonIgnore
+ private Boolean isProject;
+
+ public EventDetailResultDTO() {
+ this.eventTime = "";
+ this.eventContent = "";
+ this.eventAddress = "";
+ this.gridName = "";
+ this.isClosed = false;
+ this.isResolve = false;
+ this.isRollback = false;
+ this.eventImgs = new ArrayList<>();
+ this.eventPerson = new ArrayList<>();
+ this.projectInfo = new EventProjectInfoDTO();
+ }
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventListResultDTO.java
new file mode 100644
index 0000000000..23ecd11982
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventListResultDTO.java
@@ -0,0 +1,48 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/3 10:41 上午
+ * @DESC
+ */
+@Data
+public class EventListResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -8550265282744924930L;
+
+ /**
+ * 报事标题
+ */
+ private String eventContent;
+
+ /**
+ * 报事时间
+ */
+ private String eventTime;
+
+ /**
+ * 报事ID
+ */
+ private String eventId;
+
+ /**
+ * 是否立项【true:是,false:否】
+ */
+ private Boolean isProject;
+
+ /**
+ * 红点显示【true:显示,false:不显示】
+ */
+ private Boolean redDot;
+
+ /**
+ * 报事图片
+ */
+ private List eventImgs;
+
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventToProjectResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventToProjectResultDTO.java
new file mode 100644
index 0000000000..f17f2e6f34
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventToProjectResultDTO.java
@@ -0,0 +1,17 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/5 15:36
+ */
+@Data
+public class EventToProjectResultDTO implements Serializable {
+ private static final long serialVersionUID = -7544325891712303124L;
+ private String projectId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportedResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportedResultDTO.java
new file mode 100644
index 0000000000..d2df7d7a66
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportedResultDTO.java
@@ -0,0 +1,65 @@
+package com.epmet.dto.result;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 报事列表
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/3 14:11
+ */
+@Data
+public class MyReportedResultDTO implements Serializable {
+ private static final long serialVersionUID = -7372245830000262134L;
+
+ /**
+ * 事件id
+ */
+ private String resiEventId;
+
+ /**
+ * 事件内容
+ */
+ private String eventContent;
+
+ /**
+ * 图片列表,可为空
+ */
+ private List imgList;
+
+ /**
+ * true展示;false不展示
+ */
+ private Boolean redDot;
+
+ /**
+ * 处理中:processing;已办结:closed_case
+ */
+ private String status;
+
+ /**
+ * true:已转项目;false:未立项
+ */
+ private Boolean shiftProject;
+
+ /**
+ * 列表显示时间用此列:yyyy-MM-dd HH:mm:ss;处理中:上报事件时间,处理中:最新一次处理事件;已办结:办结时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+ private Date showTime;
+
+ /**
+ * true:显示回复;false:不显示回复按钮
+ */
+ private String replyButtonFlag;
+
+ /**
+ * 事件是否被阅读过;1已读;针对报事人待处理列表
+ */
+ private Boolean readFlag;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java
new file mode 100644
index 0000000000..8035108f6a
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java
@@ -0,0 +1,34 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/5 9:51 上午
+ * @DESC
+ */
+@Data
+public class NewEventsResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 2151884734349908080L;
+
+ /**
+ * 事件内容
+ */
+ private String eventContent;
+
+ /**
+ * 事件时间
+ */
+ private String eventTime;
+
+ /**
+ * 事件图片
+ */
+ private List eventImgs;
+
+ private String eventId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/OrgNameByTypeResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/OrgNameByTypeResultDTO.java
new file mode 100644
index 0000000000..dd5aa27458
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/OrgNameByTypeResultDTO.java
@@ -0,0 +1,22 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/4 5:48 下午
+ * @DESC
+ */
+@Data
+public class OrgNameByTypeResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -6544341694748437312L;
+
+ private String orgId;
+
+ private String orgType;
+
+ private String orgName;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ReplyListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ReplyListResultDTO.java
new file mode 100644
index 0000000000..4ffa078aaf
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ReplyListResultDTO.java
@@ -0,0 +1,38 @@
+package com.epmet.dto.result;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/3 11:07 上午
+ * @DESC
+ */
+@Data
+public class ReplyListResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 4875335642497226847L;
+
+ /**
+ * 回复人的昵称,比如:南宁路社区,人大代表-李四,山东路-尹女士
+ * */
+ private String replyName;
+
+ /**
+ * 回复时间
+ * */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone="GMT+8")
+ private Date replyTime;
+
+ /**
+ * 回复的内容
+ * */
+ private String replyContent;
+
+ @JsonIgnore
+ private String replyUserId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventIdDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventIdDTO.java
new file mode 100644
index 0000000000..22282ce4ca
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventIdDTO.java
@@ -0,0 +1,24 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 事件id
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/3 10:48
+ */
+@Data
+public class ResiEventIdDTO implements Serializable {
+ private static final long serialVersionUID = 1553798655658549134L;
+ public interface ResiEventIdGroup {
+ }
+ /**
+ * 居民端报的事件id
+ */
+ @NotBlank(message = "事件id不能为空",groups = ResiEventIdGroup.class)
+ private String resiEventId;
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventManageRedDotRes.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventManageRedDotRes.java
new file mode 100644
index 0000000000..87af6124be
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventManageRedDotRes.java
@@ -0,0 +1,30 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/6 13:54
+ */
+@Data
+public class ResiEventManageRedDotRes implements Serializable {
+ /**
+ * 待处理(未读)的事件数
+ * */
+ private Integer unReadCount;
+
+ /**
+ * 已经度过,但是又有新的回复、立项、结案
+ * */
+ private Integer redDotCount;
+
+ /**
+ * 总数
+ * */
+ private Integer totalCount;
+
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UserMentionResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UserMentionResultDTO.java
new file mode 100644
index 0000000000..48bb9583ba
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UserMentionResultDTO.java
@@ -0,0 +1,61 @@
+package com.epmet.dto.result;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 我要报事-人大代表未读/已读列表返参
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/4 9:44
+ */
+@Data
+public class UserMentionResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 8171079006237395425L;
+ /**
+ * 事件id
+ */
+ private String resiEventId;
+
+ /**
+ * 事件内容
+ */
+ private String eventContent;
+
+ /**
+ * 图片列表,可为空
+ */
+ private List imgList;
+
+ /**
+ * true展示;false不展示
+ */
+ private Boolean redDot;
+
+ /**
+ * 处理中:processing;已办结:closed_case
+ */
+ private String status;
+
+ /**
+ * true:已转项目;false:未立项
+ */
+ private Boolean shiftProject;
+
+ /**
+ * 列表显示时间用此列:yyyy-MM-dd HH:mm:ss;处理中:上报事件时间,处理中:最新一次处理事件;已办结:办结时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+ private Date showTime;
+
+ /**
+ * true:显示回复;false:不显示回复按钮
+ */
+ private String replyButtonFlag;
+
+}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
index 7b0c1a7bd9..7824ba71ee 100644
--- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
@@ -6,7 +6,6 @@ import com.epmet.dto.ProjectCategoryDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
-import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback;
import com.epmet.feign.fallback.GovProjectOpenFeignClientFallbackFactory;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
import org.springframework.cloud.openfeign.FeignClient;
@@ -124,4 +123,15 @@ public interface GovProjectOpenFeignClient {
*/
@PostMapping("gov/project/project/unresolvedlist")
Result> getUnResolvedList(@RequestBody ShiftProjectListFromDTO formDTO);
+
+ /**
+ * 群众直报:当前工作人员所属的组织存在待处理(未读的)、有新的回复的(相当于处理中有红点的)记录就显示红点
+ *
+ * @param agencyId
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/6 14:07
+ */
+ @PostMapping("gov/project/resievent/queryResiEventManageRedDot/{agencyId}")
+ Result queryResiEventManageRedDot(@PathVariable("agencyId") String agencyId);
}
diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
index 44ea0d1e63..41f41664c1 100644
--- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
+++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
@@ -119,4 +119,17 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli
public Result> getUnResolvedList(ShiftProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getUnResolvedList", formDTO);
}
+
+ /**
+ * 群众直报:当前工作人员所属的组织存在待处理(未读的)、有新的回复的(相当于处理中有红点的)记录就显示红点
+ *
+ * @param agencyId
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/6 14:08
+ */
+ @Override
+ public Result queryResiEventManageRedDot(String agencyId) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "queryResiEventManageRedDot", agencyId);
+ }
}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/EventConstant.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/EventConstant.java
new file mode 100644
index 0000000000..7daf809615
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/EventConstant.java
@@ -0,0 +1,52 @@
+package com.epmet.constant;
+
+/**
+ * @Author zxc
+ * @DateTime 2021/8/3 2:45 下午
+ * @DESC
+ */
+public interface EventConstant {
+
+ /**
+ * 【处理中:processed 待处理:undisposed 已办结:transferred】
+ */
+ String EVENT_PROCESSED = "processed";
+ String EVENT_UN_DISPOSED = "undisposed";
+ String EVENT_TRANSFERRED = "transferred";
+
+
+ /**
+ * 事件状态resi_event.status:处理中:processing;已办结:closed_case
+ */
+ String EVENT_STATUS_PROCESSING="processing";
+ String EVENT_STATUS_CLOSED_CASE="closed_case";
+
+ String READ="read";
+ String UN_READ="un_read";
+
+ /**
+ * 事件@人员表,用户身份
+ * resi_event_mention.user_type
+ */
+ String NPC_USER="npc_user";
+
+ /**
+ * 操作日志表用户来源:resi_event_operation_log.userIdentity
+ * 居民端用户:resi_user;工作人员:staff;报事人:report_user
+ */
+ String RESI_USER="resi_user";
+ String STAFF="staff";
+ String REPORT_USER="report_user";
+
+ /**
+ * 事件是否解决:已解决 resolved,未解决 un_solved
+ */
+ String RESOLVED="resolved";
+ String UN_SOLVED="un_solved";
+
+ /**
+ * 小程序类型
+ */
+ String TYPE_GOV = "gov";
+ String TYPE_RESI = "resi";
+}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java
index 43c87b57b5..b5acf5b2e7 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ProjectConstant.java
@@ -14,6 +14,8 @@ public interface ProjectConstant {
* 项目来源-组织(项目立项)
*/
String AGENCY = "agency";
+
+ String RESI_EVENT="resi_event";
/**
* 状态-待处理
*/
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ResiEventAction.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ResiEventAction.java
new file mode 100644
index 0000000000..b7e1faa0ff
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/ResiEventAction.java
@@ -0,0 +1,61 @@
+package com.epmet.constant;
+
+import com.epmet.commons.tools.constant.StrConstant;
+
+/**
+ * resi_event_operation_log事件操作日志枚举类
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2021/8/3 16:38
+ */
+public enum ResiEventAction {
+ // 1、发布事件:publish;
+ // 2、撤回事件:recall;
+ // 3、复:reply;
+ // 4、立项:shift_project;
+ // 5、办结:close_case;
+ // 6、选择是否已解决:choose_resolve;
+ // 7、查看阅读事件:read:人大代表未读=>已读;工作人员待处理=>处理中;
+ PUBLISH ( "publish","发布事件"),
+ RECALL( "recall","撤回事件"),
+ REPLY ("reply","回复"),
+ SHIFIT_PROJECT ( "shift_project","立项"),
+ CLOSE_CASE ( "close_case","办结"),
+ CHOOSE_RESOLVE ( "choose_resolve","选择是否解决"),
+ READ_FIRST( "read_first","首次查看事件");
+
+
+ private String code;
+ private String desc;
+
+ ResiEventAction(String code, String desc) {
+ this.code = code;
+ this.desc = desc;
+ }
+
+ public static String getDesc(String code) {
+ ResiEventAction[] businessModeEnums = values();
+ for (ResiEventAction resiEventAction : businessModeEnums) {
+ if (resiEventAction.getCode()==code) {
+ return resiEventAction.getDesc();
+ }
+ }
+ return StrConstant.EPMETY_STR;
+ }
+
+ public String getCode(){
+ return this.code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public String getDesc(){
+ return this.desc;
+ }
+
+ public void setDesc(String desc) {
+ this.desc = desc;
+ }
+}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/EventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/EventController.java
new file mode 100644
index 0000000000..02f58c15ca
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/EventController.java
@@ -0,0 +1,30 @@
+package com.epmet.controller;
+
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.dto.form.EventListFormDTO;
+import com.epmet.dto.form.UpdateViewTimeFormDTO;
+import com.epmet.dto.result.EventListResultDTO;
+import com.epmet.service.ResiEventService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 居民报事表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@RestController
+@RequestMapping("event")
+public class EventController {
+
+ @Autowired
+ private ResiEventService resiEventService;
+
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java
index a91cc3513b..b3053bbd93 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTraceController.java
@@ -362,5 +362,23 @@ public class ProjectTraceController {
return new Result();
}
+ /**
+ * 事件-立项
+ *
+ * @param tokenDto
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/5 15:37
+ */
+ @PostMapping("eventToProject")
+ public Result eventToProject(@LoginUser TokenDto tokenDto,@RequestBody EventToProjectFormDTO formDTO){
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ formDTO.setApp(tokenDto.getApp());
+ formDTO.setClient(tokenDto.getClient());
+ ValidatorUtils.validateEntity(formDTO,EventToProjectFormDTO.ApprovalCategory.class,EventToProjectFormDTO.AddUserInternalGroup.class);
+ return new Result().ok(projectTraceService.eventToProject(formDTO));
+ }
}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java
new file mode 100644
index 0000000000..1b69e0b039
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java
@@ -0,0 +1,216 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.constant.EventConstant;
+import com.epmet.dto.form.*;
+import com.epmet.dto.result.*;
+import com.epmet.service.ResiEventService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 居民报事表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@RestController
+@RequestMapping("resievent")
+public class ResiEventController {
+
+ @Autowired
+ private ResiEventService resiEventService;
+
+ /**
+ * @Description 报事详情-两端通用
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 1:47 下午
+ */
+ @PostMapping("eventdetail")
+ public Result eventDetail(@LoginUser TokenDto tokenDto, @RequestBody EventDetailFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO);
+ return new Result().ok(resiEventService.eventDetail(formDTO, tokenDto));
+ }
+
+ /**
+ * 我要报事-提交(尹)
+ *
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/3 10:46
+ */
+ @PostMapping("report")
+ public Result report(@LoginUser TokenDto tokenDto, @RequestBody ResiEventFormDTO formDTO) {
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ ValidatorUtils.validateEntity(formDTO, ResiEventFormDTO.AddUserShowGroup.class, ResiEventFormDTO.AddUserInternalGroup.class);
+ return new Result().ok(resiEventService.report(formDTO));
+ }
+
+ /**
+ * 我要报事-撤回(尹)
+ *
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/3 10:54
+ */
+ @PostMapping("recall")
+ public Result recall(@LoginUser TokenDto tokenDto, @RequestBody ReCallEventFormDTO formDTO) {
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ ValidatorUtils.validateEntity(formDTO, ResiEventIdDTO.ResiEventIdGroup.class, ReCallEventFormDTO.AddUserInternalGroup.class);
+ resiEventService.reCall(formDTO);
+ return new Result();
+ }
+
+ /**
+ * 选择已解决,未解决
+ *
+ * @param tokenDto
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/3 13:57
+ */
+ @PostMapping("chooseresolve")
+ public Result chooseResolve(@LoginUser TokenDto tokenDto, @RequestBody ChooseResolveFormDTO formDTO) {
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ ValidatorUtils.validateEntity(formDTO, ResiEventIdDTO.ResiEventIdGroup.class, ChooseResolveFormDTO.AddUserInternalGroup.class);
+ resiEventService.chooseResolve(formDTO);
+ return new Result();
+ }
+
+
+ /**
+ * 我的报事列表查询
+ *
+ * @param tokenDto
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result>
+ * @author yinzuomei
+ * @date 2021/8/3 14:27
+ */
+ @PostMapping("myreported")
+ public Result> queryMyReported(@LoginUser TokenDto tokenDto, @RequestBody MyReportedFormDTO formDTO) {
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ ValidatorUtils.validateEntity(formDTO, MyReportedFormDTO.AddUserInternalGroup.class);
+ return new Result>().ok(resiEventService.queryMyReported(formDTO));
+ }
+
+ /**
+ * @Description 群众直报(待处理、处理中、已办结)列表
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 10:53 上午
+ */
+ @PostMapping("eventlist")
+ public Result> eventList(@RequestBody EventListFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, EventListFormDTO.EventListForm.class);
+ return new Result>().ok(resiEventService.eventList(formDTO));
+ }
+
+ /**
+ * @Description 报事-首次查看事件-两端通用
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 11:01 上午
+ */
+ @PostMapping("updateviewtime")
+ public Result updateViewTime(@LoginUser TokenDto tokenDto, @RequestBody UpdateViewTimeFormDTO formDTO) {
+ formDTO.setUserId(tokenDto.getUserId());
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ ValidatorUtils.validateEntity(formDTO, UpdateViewTimeFormDTO.AddUserInternalGroup.class);
+ if (EventConstant.STAFF.equals(formDTO.getViewType())) {
+ ValidatorUtils.validateEntity(formDTO, UpdateViewTimeFormDTO.GovInternalGroup.class);
+ }
+ resiEventService.updateViewTime(formDTO);
+ return new Result();
+ }
+
+ /**
+ * 我要报事-人大代表未读/已读列表
+ *
+ * @param tokenDto
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result>
+ * @author yinzuomei
+ * @date 2021/8/4 9:40
+ */
+ @PostMapping("mentionlist")
+ public Result> mentionList(@LoginUser TokenDto tokenDto, @RequestBody UserMentionFormDTO formDTO) {
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ ValidatorUtils.validateEntity(formDTO, UserMentionFormDTO.AddUserInternalGroup.class);
+ return new Result>().ok(resiEventService.mentionList(formDTO));
+ }
+
+ /**
+ * @Description 最新直报
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/5 9:55 上午
+ */
+ @PostMapping("newevents")
+ public Result> newEvents(@LoginUser TokenDto tokenDto) {
+ return new Result>().ok(resiEventService.newEvents(tokenDto.getUserId()));
+ }
+
+ /**
+ * 报事办结
+ *
+ * @param tokenDto
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/5 10:47
+ */
+ @PostMapping("close")
+ public Result closeResiEvent(@LoginUser TokenDto tokenDto, @RequestBody CloseResiEventFormDTO formDTO) {
+ formDTO.setUserId(tokenDto.getUserId());
+ ValidatorUtils.validateEntity(formDTO, CloseResiEventFormDTO.AddUserInternalGroup.class);
+ resiEventService.closeResiEvent(formDTO);
+ return new Result();
+ }
+
+
+ /**
+ * 工作台,最新直报是否显示红点?
+ *
+ * @param agencyId
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/6 13:57
+ */
+ @PostMapping("queryResiEventManageRedDot/{agencyId}")
+ Result queryResiEventManageRedDot(@PathVariable("agencyId") String agencyId) {
+ return new Result().ok(resiEventService.queryResiEventManageRedDot(agencyId));
+ }
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventReplyController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventReplyController.java
new file mode 100644
index 0000000000..0d7f93a2d8
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventReplyController.java
@@ -0,0 +1,113 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.dto.form.ReplyFormDTO;
+import com.epmet.dto.form.ReplyListFormDTO;
+import com.epmet.dto.result.ReplyListResultDTO;
+import com.epmet.service.ResiEventReplyService;
+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;
+
+
+/**
+ * 事件回复表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@RestController
+@RequestMapping("resieventreply")
+public class ResiEventReplyController {
+
+ @Autowired
+ private ResiEventReplyService resiEventReplyService;
+
+ /**
+ * @Description 报事详情-回复列表-两端通用
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 11:11 上午
+ */
+ @PostMapping("list")
+ public Result> replyList(@LoginUser TokenDto tokenDto, @RequestBody ReplyListFormDTO formDTO){
+ formDTO.setCurrentUserId(tokenDto.getUserId());
+ ValidatorUtils.validateEntity(formDTO, ReplyListFormDTO.ReplyListForm.class);
+ return new Result>().ok(resiEventReplyService.replyList(formDTO));
+ }
+
+ /**
+ * 报事-工作人员回复
+ *
+ * @param tokenDto
+ * @param replyFormDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/4 14:19
+ */
+ @PostMapping("govReply")
+ public Result govReply(@LoginUser TokenDto tokenDto,@RequestBody ReplyFormDTO replyFormDTO){
+ replyFormDTO.setUserId(tokenDto.getUserId());
+ ValidatorUtils.validateEntity(replyFormDTO,ReplyFormDTO.AddUserShowGroup.class,ReplyFormDTO.AddUserInternalGroup.class);
+ resiEventReplyService.govReply(replyFormDTO);
+ return new Result();
+ }
+
+ /**
+ * 报事当事人回复
+ *
+ * @param tokenDto
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/4 14:37
+ */
+ @PostMapping("selfReply")
+ public Result selfReply(@LoginUser TokenDto tokenDto,@RequestBody ReplyFormDTO formDTO){
+ formDTO.setUserId(tokenDto.getUserId());
+ ValidatorUtils.validateEntity(formDTO,ReplyFormDTO.AddUserShowGroup.class,ReplyFormDTO.AddUserInternalGroup.class);
+ resiEventReplyService.selfReply(formDTO);
+ return new Result();
+ }
+
+ /**
+ * 艾特的人回复
+ *
+ * @param tokenDto
+ * @param formDTO
+ * @return com.epmet.commons.tools.utils.Result
+ * @author yinzuomei
+ * @date 2021/8/4 15:06
+ */
+ @PostMapping("atReply")
+ public Result atReply(@LoginUser TokenDto tokenDto,@RequestBody ReplyFormDTO formDTO){
+ formDTO.setUserId(tokenDto.getUserId());
+ ValidatorUtils.validateEntity(formDTO,ReplyFormDTO.AddUserShowGroup.class,ReplyFormDTO.AddUserInternalGroup.class);
+ resiEventReplyService.atReply(formDTO);
+ return new Result();
+ }
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
index d5c2dbab5d..0040584f81 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java
@@ -18,6 +18,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.EventProjectInfoDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.ProjectStaffDTO;
import com.epmet.dto.form.LatestListFormDTO;
@@ -206,4 +207,14 @@ public interface ProjectDao extends BaseDao {
* @return java.util.List
*/
List selectUnResolvedListByGrid(@Param("gridId")String gridId);
+
+ /**
+ * @Description 查询报事转项目详情
+ * @Param projectId
+ * @author zxc
+ * @date 2021/8/4 2:43 下午
+ */
+ EventProjectInfoDTO selectEventProjectInfo(@Param("projectId")String projectId);
+
+ List selectByOriginId(String originId);
}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventAttachmentDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventAttachmentDao.java
new file mode 100644
index 0000000000..1202c3dc22
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventAttachmentDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.ResiEventAttachmentEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 事件附件表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@Mapper
+public interface ResiEventAttachmentDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventDao.java
new file mode 100644
index 0000000000..6275a0d821
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventDao.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.result.EventDetailResultDTO;
+import com.epmet.dto.result.EventListResultDTO;
+import com.epmet.dto.result.MyReportedResultDTO;
+import com.epmet.dto.result.NewEventsResultDTO;
+import com.epmet.entity.ResiEventEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 居民报事表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@Mapper
+public interface ResiEventDao extends BaseDao {
+
+ /**
+ * @Description 查询报事列表
+ * @Param orgId
+ * @Param eventType
+ * @author zxc
+ * @date 2021/8/3 4:21 下午
+ */
+ List eventUnDisposedList(@Param("orgId")String orgId,@Param("eventType")String eventType);
+
+ /**
+ * 居民端我的报事列表查询
+ *
+ * @param userId 报事人
+ * @param statusCondition 未处理:un_read;处理中:processing;已办结:closed_case
+ * @return java.util.List
+ * @author yinzuomei
+ * @date 2021/8/3 23:21
+ */
+ List queryMyReported(@Param("userId") String userId, @Param("statusCondition")String statusCondition);
+
+ /**
+ * @Description 查询报事详情
+ * @Param eventId
+ * @author zxc
+ * @date 2021/8/4 2:16 下午
+ */
+ EventDetailResultDTO selectEventDetail(@Param("eventId")String eventId);
+
+ /**
+ * @Description 更新报事人红点状态
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/4 5:30 下午
+ */
+ void updateResiEvent(@Param("userId") String userId,@Param("eventId")String eventId);
+
+ /**
+ * @Description 更新人大代表红点状态
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/4 5:32 下午
+ */
+ void updateEventMention(@Param("userId") String userId,@Param("eventId")String eventId);
+
+ /**
+ * @Description 最新直报
+ * @Param orgIds
+ * @author zxc
+ * @date 2021/8/5 10:42 上午
+ */
+ List newEvents(@Param("orgIds")List orgIds);
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventMentionDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventMentionDao.java
new file mode 100644
index 0000000000..76aaeb9162
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventMentionDao.java
@@ -0,0 +1,70 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.result.UserMentionResultDTO;
+import com.epmet.entity.ResiEventMentionEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 事件被@人表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@Mapper
+public interface ResiEventMentionDao extends BaseDao {
+
+ /**
+ * 人大代表未读、已读列表
+ *
+ * @param userId
+ * @param readFlag
+ * @return java.util.List
+ * @author yinzuomei
+ * @date 2021/8/4 9:54
+ */
+ List selectMentionList(@Param("userId")String userId, @Param("readFlag")String readFlag);
+
+ /**
+ * 人大代表从未读-》已读,首次查看事件
+ *
+ * @param eventId
+ * @param userId
+ * @return int
+ * @author yinzuomei
+ * @date 2021/8/4 16:37
+ */
+ int updateReadFlag(@Param("eventId") String eventId, @Param("userId")String userId);
+
+ /**
+ * 展示红点
+ *
+ * @param resiEventId
+ * @return int
+ * @author yinzuomei
+ * @date 2021/8/4 17:41
+ */
+ int updateRedDotShow(@Param("resiEventId") String resiEventId,@Param("excludeUserId")String excludeUserId);
+
+ ResiEventMentionEntity selectUser(@Param("eventId") String eventId, @Param("userId")String userId);
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventOperationLogDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventOperationLogDao.java
new file mode 100644
index 0000000000..d6e16450a0
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventOperationLogDao.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.ResiEventOperationLogEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 事件操作日志表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@Mapper
+public interface ResiEventOperationLogDao extends BaseDao {
+
+ /**
+ * 查询事件操作日志
+ *
+ * @param eventId
+ * @param userId
+ * @param actionCode
+ * @return com.epmet.entity.ResiEventOperationLogEntity
+ * @author yinzuomei
+ * @date 2021/8/4 16:44
+ */
+ List selectByUserAction(@Param("eventId") String eventId, @Param("userId")String userId, @Param("actionCode")String actionCode);
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventReplyDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventReplyDao.java
new file mode 100644
index 0000000000..603c1eefc9
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventReplyDao.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.result.ReplyListResultDTO;
+import com.epmet.entity.ResiEventReplyEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 事件回复表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@Mapper
+public interface ResiEventReplyDao extends BaseDao {
+
+ /**
+ * 查询事件的回复列表
+ *
+ * @param resiEventId
+ * @return java.util.List
+ * @author yinzuomei
+ * @date 2021/8/4 13:22
+ */
+ List selectReplyList(String resiEventId);
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventReportOrgDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventReportOrgDao.java
new file mode 100644
index 0000000000..0668eb78f7
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ResiEventReportOrgDao.java
@@ -0,0 +1,67 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.ResiEventReportOrgEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 事件相关组织表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@Mapper
+public interface ResiEventReportOrgDao extends BaseDao {
+
+ /**
+ * 工作人员从待处理=》处理中
+ *
+ * @param eventId
+ * @param orgId
+ * @return int
+ * @author yinzuomei
+ * @date 2021/8/4 16:40
+ */
+ int updateReadFlag(@Param("eventId") String eventId, @Param("orgId") String orgId,@Param("userId") String userId);
+
+ /**
+ * @Description 更新组织的红点显示状态
+ * @Param eventId
+ * @Param orgId
+ * @author zxc
+ * @date 2021/8/4 5:42 下午
+ */
+ void updateEventOrg(@Param("eventId") String eventId, @Param("orgId") String orgId);
+
+ /**
+ * 展示红点
+ *
+ * @param resiEventId
+ * @return int
+ * @author yinzuomei
+ * @date 2021/8/4 17:41
+ */
+ int updateRedDotShow(String resiEventId);
+
+ Integer selectUnReadCount(String agencyId);
+
+ Integer selectRedCount(String agencyId);
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventAttachmentEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventAttachmentEntity.java
new file mode 100644
index 0000000000..255c7c465c
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventAttachmentEntity.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.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-08-03
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("resi_event_attachment")
+public class ResiEventAttachmentEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 事件Id,关联resi_event的id
+ */
+ private String resiEventId;
+
+ /**
+ * 附件名
+ */
+ private String attachmentName;
+
+ /**
+ * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)
+ */
+ private String attachmentFormat;
+
+ /**
+ * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))
+ */
+ private String attachmentType;
+
+ /**
+ * 附件地址
+ */
+ private String attachmentUrl;
+
+ /**
+ * 排序字段
+ */
+ private Integer sort;
+
+}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventEntity.java
new file mode 100644
index 0000000000..f00dab5a06
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventEntity.java
@@ -0,0 +1,146 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.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-08-03
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("resi_event")
+public class ResiEventEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 居民端用户所在网格id
+ */
+ private String gridId;
+
+ /**
+ * 居民端用户所在网格的所属组织
+ */
+ private String agencyId;
+
+ /**
+ * 居民端用户所在网格的所有上级组织,包含AGENCY_ID
+ */
+ private String pids;
+
+ /**
+ * 报事的人
+ */
+ private String reportUserId;
+
+ /**
+ * 1:党员;0:不是党员;默认0
+ */
+ private Boolean isParty;
+
+ /**
+ * 事件内容
+ */
+ private String eventContent;
+
+ /**
+ * 纬度
+ */
+ private String latitude;
+
+ /**
+ * 经度
+ */
+ private String longitude;
+
+ /**
+ * 地址
+ */
+ private String address;
+
+ /**
+ * 处理中:processing;已办结:closed_case
+ */
+ private String status;
+
+ /**
+ * 办结时间
+ */
+ private Date closeCaseTime;
+
+ /**
+ * 1:已转项目;0:未转项目;默认0
+ */
+ private Boolean shiftProject;
+
+ /**
+ * 项目id;shift_project=1时,此列有值
+ */
+ private String projectId;
+
+ /**
+ * 1:已撤回;0:未撤回正常展示;默认0
+ */
+ private Boolean recallFlag;
+
+ /**
+ * 撤回时间
+ */
+ private Date recallTime;
+
+ /**
+ * 事件是否被阅读过;1已读;针对报事人待处理列表
+ */
+ private Boolean readFlag;
+
+ /**
+ * 报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/办结更新为1;
+ */
+ private Boolean redDot;
+
+ /**
+ * 最近一次操作时间(回复、立项、办结更新此列)
+ */
+ private Date latestOperatedTime;
+
+ /**
+ * 是否解决:已解决 resolved,未解决 un_solved
+ */
+ private String resolveStatus;
+
+ /**
+ * 结案说明可放这。
+ */
+ private String closeRemark;
+
+}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventMentionEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventMentionEntity.java
new file mode 100644
index 0000000000..a2c5702485
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventMentionEntity.java
@@ -0,0 +1,88 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+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 2021-08-03
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("resi_event_mention")
+public class ResiEventMentionEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 事件id
+ */
+ private String resiEventId;
+
+ /**
+ * 人大代表:npc_user
+ */
+ private String userType;
+
+ /**
+ * 人大代表目前显示姓名
+ */
+ private String userShowName;
+
+ /**
+ * 居民端用户id
+ */
+ private String userId;
+
+ /**
+ * 居民注册网格ID
+ */
+ private String gridId;
+
+ /**
+ * 居民所属社区,就是grid_id的所属组织
+ */
+ private String agencyId;
+
+ /**
+ * 居民注册网格的所有上级
+ */
+ private String pids;
+
+ /**
+ * 含义:已读read,未读:un_read;人大代表从未读=>已读,点击查看详情前更新为已读;
+ */
+ private String readFlag;
+
+ /**
+ * (1)含义:1:展示红点;0:不展示;(2)注意:发布事件插入数据时为1,(3)何时更新?:报事人回复or工作人员回复、立项、办结更新为1;
+ */
+ private Boolean redDot;
+
+}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventOperationLogEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventOperationLogEntity.java
new file mode 100644
index 0000000000..e2c34cc30e
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventOperationLogEntity.java
@@ -0,0 +1,89 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.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-08-03
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("resi_event_operation_log")
+public class ResiEventOperationLogEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 事件id
+ */
+ private String resiEventId;
+
+ /**
+ * 用户id
+ */
+ private String userId;
+
+ /**
+ * 居民端用户:resi_user;工作人员:staff;报事人:report_user
+ */
+ private String userIdentity;
+
+ /**
+ * 1、发布事件:publish;
+2、撤回事件:recall;
+3、复:reply;
+4、立项:shift_project;
+5、办结:close_case;
+6、选择是否已解决:choose_resolve;
+7、查看阅读事件:read:人大代表未读=>已读;工作人员待处理=>处理中;
+
+ */
+ private String actionCode;
+
+ /**
+ * 1、发布事件:publish;
+2、撤回事件:recall;
+3、复:reply;
+4、立项:shift_project;
+5、办结:close_case;
+6、选择是否已解决:choose_resolve;
+7、查看阅读事件:read:人大代表未读=>已读;工作人员待处理=>处理中;
+ */
+ private String actionDesc;
+
+ /**
+ * 操作时间
+ */
+ private Date operateTime;
+
+}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventReplyEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventReplyEntity.java
new file mode 100644
index 0000000000..2d597fd6e3
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventReplyEntity.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.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-08-03
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("resi_event_reply")
+public class ResiEventReplyEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 事件Id,关联resi_event的id
+ */
+ private String resiEventId;
+
+ /**
+ * 回复人用户Id
+ */
+ private String fromUserId;
+
+ /**
+ * 内容
+ */
+ private String content;
+
+ /**
+ * 报事人:xxx路尹女士;人大:人大代表-张三;组织:组织名:阜新路社区
+ */
+ private String userShowName;
+
+}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventReportOrgEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventReportOrgEntity.java
new file mode 100644
index 0000000000..20f4bfad3f
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventReportOrgEntity.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+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 2021-08-03
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("resi_event_report_org")
+public class ResiEventReportOrgEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 事件id
+ */
+ private String resiEventId;
+
+ /**
+ * 报给?:
+网格:grid;
+社区:community;
+乡(镇、街道)级:street;
+区县级: district;
+市级: city;
+省级:province。
+ */
+ private String orgType;
+
+ /**
+ * 报给的组织或者网格id
+ */
+ private String orgId;
+
+ /**
+ * org_id的上级组织id,org_id是跟组织,此列为0
+ */
+ private String orgPid;
+
+ /**
+ * org_id的所有上级组织id,org_id是跟组织,此列为0
+ */
+ private String orgPids;
+
+ /**
+ * 含义:已读read,未读:un_read;组织下的工作人员从待处理=>处理中,点击查看详情前更新为已读;
+ */
+ private String orgRead;
+
+ /**
+ * (1)含义:1:展示红点;0:不展示;(2)注意:发布事件插入数据时为1,(3)何时更新?:人大代表回复or报事人回复or工作人员回复、立项、办结更新为1;
+ */
+ private Boolean redDot;
+
+}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
index 7a5ac21888..1f0fd17a0d 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java
@@ -19,7 +19,6 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
-import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
@@ -330,4 +329,6 @@ public interface ProjectService extends BaseService {
* @return java.util.List
*/
List getUnResolvedListByGrid(ShiftProjectListFromDTO fromDTO);
+
+ List getByOriginId(String eventId);
}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java
index d3d2cc3f3b..620f9577fc 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectTraceService.java
@@ -173,4 +173,14 @@ public interface ProjectTraceService {
* @Description 项目立项
**/
void projectApproval(ProjectApprovalFormDTO formDTO);
+
+ /**
+ * 事件立项
+ *
+ * @param formDTO
+ * @return com.epmet.dto.result.EventToProjectResultDTO
+ * @author yinzuomei
+ * @date 2021/8/5 15:38
+ */
+ EventToProjectResultDTO eventToProject(EventToProjectFormDTO formDTO);
}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventReplyService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventReplyService.java
new file mode 100644
index 0000000000..4ad83c6e04
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventReplyService.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.dto.form.ReplyFormDTO;
+import com.epmet.dto.form.ReplyListFormDTO;
+import com.epmet.dto.result.ReplyListResultDTO;
+import com.epmet.entity.ResiEventReplyEntity;
+
+import java.util.List;
+
+/**
+ * 事件回复表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+public interface ResiEventReplyService extends BaseService {
+
+ /**
+ * @Description 报事详情-回复列表-两端通用
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 11:11 上午
+ */
+ List replyList(ReplyListFormDTO formDTO);
+
+ /**
+ * 报事-工作人员回复
+ *
+ * @param replyFormDTO
+ * @return void
+ * @author yinzuomei
+ * @date 2021/8/4 14:20
+ */
+ void govReply(ReplyFormDTO replyFormDTO);
+
+ /**
+ * 报事当事人回复
+ *
+ * @param formDTO
+ * @return void
+ * @author yinzuomei
+ * @date 2021/8/4 14:39
+ */
+ void selfReply(ReplyFormDTO formDTO);
+
+ /**
+ * 艾特的人回复
+ *
+ * @param formDTO
+ * @return void
+ * @author yinzuomei
+ * @date 2021/8/4 15:06
+ */
+ void atReply(ReplyFormDTO formDTO);
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java
new file mode 100644
index 0000000000..38d4916acc
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java
@@ -0,0 +1,132 @@
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.dto.form.*;
+import com.epmet.dto.result.*;
+import com.epmet.entity.ResiEventEntity;
+
+import java.util.List;
+
+/**
+ * 居民报事表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+public interface ResiEventService extends BaseService {
+
+ /**
+ * @Description 群众直报(待处理、处理中、已办结)列表
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 10:53 上午
+ */
+ List eventList(EventListFormDTO formDTO);
+
+ /**
+ * @Description 报事-首次查看事件-两端通用
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 11:01 上午
+ */
+ void updateViewTime(UpdateViewTimeFormDTO formDTO);
+
+ /**
+ * @Description 报事详情-两端通用
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 1:47 下午
+ */
+ EventDetailResultDTO eventDetail(EventDetailFormDTO formDTO, TokenDto tokenDto);
+
+ /**
+ * 我要报事-提交(尹)
+ *
+ * @param formDTO
+ * @return com.epmet.dto.result.ResiEventResultDTO
+ * @author yinzuomei
+ * @date 2021/8/3 10:51
+ */
+ ResiEventIdDTO report(ResiEventFormDTO formDTO);
+
+ /**
+ * 撤回事件
+ *
+ * @param formDTO
+ * @return void
+ * @author yinzuomei
+ * @date 2021/8/3 13:45
+ */
+ void reCall(ReCallEventFormDTO formDTO);
+
+ /**
+ * 选择已解决,未解决
+ *
+ * @param formDTO
+ * @return void
+ * @author yinzuomei
+ * @date 2021/8/3 13:58
+ */
+ void chooseResolve(ChooseResolveFormDTO formDTO);
+
+ /**
+ * 我的报事列表查询
+ *
+ * @param formDTO
+ * @return java.util.List
+ * @author yinzuomei
+ * @date 2021/8/3 14:28
+ */
+ List queryMyReported(MyReportedFormDTO formDTO);
+
+ /**
+ * 我要报事-人大代表未读/已读列表
+ *
+ * @param formDTO
+ * @return java.util.List
+ * @author yinzuomei
+ * @date 2021/8/4 9:41
+ */
+ List mentionList(UserMentionFormDTO formDTO);
+
+ /**
+ * @Description 最新直报
+ * @Param userId
+ * @author zxc
+ * @date 2021/8/5 9:55 上午
+ */
+ List newEvents(String userId);
+
+ /**
+ * 报事办结
+ *
+ * @param formDTO
+ * @return void
+ * @author yinzuomei
+ * @date 2021/8/5 10:48
+ */
+ void closeResiEvent(CloseResiEventFormDTO formDTO);
+
+ /**
+ * 事件立项:更新立项标志、增加操作日志、更新(报事人、被艾特的人)红点
+ *
+ * @param eventShiftProjectDTO
+ * @return void
+ * @author yinzuomei
+ * @date 2021/8/5 16:17
+ */
+ void shiftProject(EventShiftProjectDTO eventShiftProjectDTO);
+
+ ResiEventEntity getById(String eventId);
+
+ /**
+ * 工作台,最新直报是否显示红点?
+ *
+ * @param agencyId
+ * @return com.epmet.dto.result.ResiEventManageRedDotRes
+ * @author yinzuomei
+ * @date 2021/8/6 13:57
+ */
+ ResiEventManageRedDotRes queryResiEventManageRedDot(String agencyId);
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
index f15a2a7c24..bc6a2616c7 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
@@ -2753,4 +2753,9 @@ public class ProjectServiceImpl extends BaseServiceImpl getByOriginId(String originId) {
+ return baseDao.selectByOriginId(originId);
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java
index 0d1c537388..1e4a1b64b4 100644
--- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTraceServiceImpl.java
@@ -22,7 +22,6 @@ import com.epmet.constant.UserMessageConstant;
import com.epmet.dao.ProjectOrgRelationDao;
import com.epmet.dao.ProjectProcessAttachmentDao;
import com.epmet.dao.ProjectProcessDao;
-import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.IssueProjectCategoryDictDTO;
import com.epmet.dto.IssueProjectTagDictDTO;
import com.epmet.dto.ProjectStaffDTO;
@@ -93,6 +92,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceS
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
@Autowired
private LoginUserUtil loginUserUtil;
+ @Autowired
+ private ResiEventService resiEventService;
@Override
public List getPendProjectList(TokenDto tokenDto, ProjectListFromDTO fromDTO) {
@@ -615,5 +616,358 @@ public class ProjectTraceServiceImpl implements ProjectTraceS
return epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList);
}
+ /**
+ * 事件立项
+ *
+ * @param formDTO
+ * @return com.epmet.dto.result.EventToProjectResultDTO
+ * @author yinzuomei
+ * @date 2021/8/5 15:38
+ */
+ @Override
+ public EventToProjectResultDTO eventToProject(EventToProjectFormDTO formDTO) {
+ //事件已经立项,不能重复操作
+ ResiEventEntity resiEventEntity=resiEventService.getById(formDTO.getEventId());
+ if(null==resiEventEntity||resiEventEntity.getShiftProject()){
+ throw new RenException(EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getCode(),EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getMsg());
+ }
+ List projectEntityList = projectService.getByOriginId(formDTO.getEventId());
+ if (!CollectionUtils.isEmpty(projectEntityList)) {
+ throw new RenException(EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getCode(), EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getMsg());
+ }
+ List staffList = formDTO.getStaffList();
+ //1.文字内容安全校验
+ List list = new ArrayList<>();
+ list.add(formDTO.getTitle());list.add(formDTO.getPublicReply());list.add(formDTO.getPublicReply());list.add(formDTO.getInternalRemark());
+ safetyCheck(list);
+ //2.数据准备
+ //2-1获取当前工作人员基本信息
+ LoginUserDetailsResultDTO loginUser=queryLoginUserInfo(formDTO);
+
+ //2-2.调用gov-org服务,获取所有勾选人员以及议题数据对应的组织信息、部门信息、网格信息用于对处理部门和ORG_ID_PATH字段的赋值使用
+ AgencyDeptGridResultDTO agencyDeptGrid = getAgencyDeptGridRes(formDTO.getStaffList(),loginUser.getAgencyId());
+
+ //2-3.调用issue服务,查询分类、标签数据信息
+ CategoryTagResultDTO categoryTagResultDTO=queryCategoryTagRes(formDTO);
+ List categoryList = categoryTagResultDTO.getCategoryList();
+ List tagList = categoryTagResultDTO.getTagList();
+
+ //2-4.批量查询被勾选工作人员基础信息
+ List staffInfoList=queryStaffListRes(formDTO.getStaffList(),formDTO.getUserId());
+
+ //3.封装保存业务数据
+ //3-1.项目主表新增数据
+ ProjectEntity projectEntity = new ProjectEntity();
+ projectEntity.setCustomerId(formDTO.getCustomerId());
+ // 立项人的所属组织id
+ projectEntity.setAgencyId(loginUser.getAgencyId());
+ // 项目来源新增:resi_event
+ projectEntity.setOrigin(ProjectConstant.RESI_EVENT);
+ projectEntity.setOriginId(formDTO.getEventId());
+ projectEntity.setTitle(formDTO.getTitle());
+ projectEntity.setBackGround(formDTO.getPublicReply());
+ projectEntity.setStatus(ProjectConstant.PENDING);
+ projectEntity.setOrgIdPath(loginUser.getOrgIdPath());
+ projectEntity.setLocateAddress(null == formDTO.getLocateAddress() ? "" : formDTO.getLocateAddress());
+ projectEntity.setLocateLongitude(null == formDTO.getLocateLongitude() ? "" : formDTO.getLocateLongitude());
+ projectEntity.setLocateDimension(null == formDTO.getLocateDimension() ? "" : formDTO.getLocateDimension());
+ projectService.insert(projectEntity);
+ //3-2.项目进展表新增第一个节点数据
+ ProjectProcessEntity processEntity = new ProjectProcessEntity();
+ processEntity.setProjectId(projectEntity.getId());
+ processEntity.setCustomerId(formDTO.getCustomerId());
+ processEntity.setStaffId(formDTO.getUserId());
+ processEntity.setOperation(ProjectConstant.OPERATION_CREATED);
+ processEntity.setOperationName(ProjectConstant.OPERATION_PROJECT_APPROVAL);
+ processEntity.setPublicReply(formDTO.getPublicReply());
+ processEntity.setInternalRemark(formDTO.getInternalRemark());
+ agencyDeptGrid.getAgencyList().forEach(agency -> {
+ if (loginUser.getAgencyId().equals(agency.getId())) {
+ processEntity.setDepartmentName(agency.getOrganizationName());
+ processEntity.setAgencyId(agency.getId());
+ if(org.apache.commons.lang3.StringUtils.isBlank(agency.getPids()) || org.apache.commons.lang3.StringUtils.equals(NumConstant.ZERO_STR,agency.getPids().trim()) || "".equals(agency.getPids().trim())){
+ processEntity.setOrgIdPath(agency.getId());
+ }else{
+ processEntity.setOrgIdPath(agency.getPids().concat(":").concat(agency.getId()));
+ }
+ }
+ });
+ projectProcessService.insert(processEntity);
+
+ //3-3.项目人员表批量新增数据
+ List entityList = new ArrayList<>();
+ staffList.forEach(ts -> {
+ ProjectStaffEntity entity = ConvertUtils.sourceToTarget(ts, ProjectStaffEntity.class);
+ entity.setOrgId(ts.getAgencyId());
+ entity.setProjectId(projectEntity.getId());
+ entity.setProcessId(processEntity.getId());
+ entity.setIsHandle(ProjectConstant.UNHANDLED);
+ agencyDeptGrid.getAgencyList().forEach(agency -> {
+ if (ts.getAgencyId().equals(agency.getId())) {
+ entity.setCustomerId(agency.getCustomerId());
+ entity.setOrgIdPath(("".equals(agency.getPids()) ? "" : agency.getPids() + ":") + agency.getId());
+ entity.setDepartmentName(agency.getOrganizationName());
+ }
+ });
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(ts.getDepartmentId())) {
+ agencyDeptGrid.getDeptList().forEach(dept -> {
+ if (ts.getDepartmentId().equals(dept.getId())) {
+ entity.setDepartmentName(entity.getDepartmentName() + "-" + dept.getDepartmentName());
+ }
+ });
+ }
+ if (org.apache.commons.lang3.StringUtils.isNotBlank(ts.getGridId())) {
+ agencyDeptGrid.getGridList().forEach(grid -> {
+ if (ts.getGridId().equals(grid.getId())) {
+ entity.setDepartmentName(entity.getDepartmentName() + "-" + grid.getGridName());
+ }
+ });
+ }
+ entityList.add(entity);
+ });
+ projectStaffService.insertBatch(entityList);
+
+ //3-4.项目附件表新增数据
+ if ((null != formDTO.getPublicFile() && formDTO.getPublicFile().size() > NumConstant.ZERO)
+ || (null != formDTO.getInternalFile() && formDTO.getInternalFile().size() > NumConstant.ZERO)) {
+ projectService.saveFile(formDTO.getPublicFile(), formDTO.getInternalFile(), formDTO.getCustomerId(), projectEntity.getId(), processEntity.getId());
+ }
+
+ //3-5.项目分类表新增数据
+ if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(formDTO.getCategoryList())) {
+ List categoryEntityList = new ArrayList<>();
+ formDTO.getCategoryList().forEach(item -> {
+ categoryList.forEach(ca->{
+ if(item.getId().equals(ca.getId())){
+ ProjectCategoryEntity entity = new ProjectCategoryEntity();
+ entity.setCustomerId(formDTO.getCustomerId());
+ entity.setProjectId(projectEntity.getId());
+ entity.setCategoryId(item.getId());
+ entity.setCategoryPids(ca.getPids());
+ entity.setCategoryCode(ca.getCategoryCode());
+ categoryEntityList.add(entity);
+ }
+ });
+ });
+ projectCategoryService.insertBatch(categoryEntityList);
+ }
+
+ //3-6.项目标签表新增数据
+ if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(formDTO.getTagList())) {
+ List tagEntityList = new ArrayList<>();
+ formDTO.getTagList().forEach(item -> {
+ tagList.forEach(ta->{
+ if(item.getId().equals(ta.getId())){
+ ProjectTagsEntity entity = new ProjectTagsEntity();
+ entity.setCustomerId(formDTO.getCustomerId());
+ entity.setProjectId(projectEntity.getId());
+ entity.setTagId(item.getId());
+ entity.setTagName(ta.getTagName());
+ tagEntityList.add(entity);
+ }
+ });
+ });
+ projectTagsService.insertBatch(tagEntityList);
+ }
+
+ //3-7:初始化机关-项目时间关联数据
+ Date current = new Date();
+ List projectStaffIds = entityList.stream().map(ProjectStaffEntity::getId).distinct().collect(Collectors.toList());
+ if(!org.apache.commons.collections4.CollectionUtils.isEmpty(projectStaffIds)){
+ List container = new LinkedList<>();
+ projectStaffIds.forEach(o -> {
+ ProjectOrgRelationEntity period = new ProjectOrgRelationEntity();
+ period.setProjectStaffId(o);
+ period.setInformedDate(current);
+ period.setSourceOperation(ProjectConstant.OPERATION_CREATED);
+ period.setCreatedBy(formDTO.getUserId());
+ container.add(period);
+ });
+ relationDao.insertBatch(container);
+ }
+
+ //4.推送站内信、微信、短信消息
+ //4-1.调用epmet-message服务,给工作端勾选的工作人员发送消息
+ if (!shiftProjectMessage(formDTO.getStaffList(),formDTO.getCustomerId(),formDTO.getTitle()).success()) {
+ throw new RenException("事件转为项目,推送站内信失败");
+ }
+
+ //4-2.以及政府端调用epmet-message服务,给工作端工作人员推送微信订阅消息
+ if (!wxmpShiftProjectMessage(formDTO.getStaffList(),formDTO.getCustomerId(),formDTO.getTitle()).success()) {
+ logger.error("事件转为项目,推送微信订阅消息失败!");
+ }
+
+ //4-3.吹哨短信消息
+ List smsList = new ArrayList<>();
+ staffList.forEach(staff -> {
+ staffInfoList.forEach(st->{
+ if(staff.getStaffId().equals(st.getStaffId())){
+ ProjectSendMsgFormDTO sms = new ProjectSendMsgFormDTO();
+ sms.setCustomerId(st.getCustomerId());
+ sms.setMobile(st.getMobile());
+ sms.setAliyunTemplateCode(SmsTemplateConstant.PROJECT_TRANSFER);
+ sms.setParameterKey("send_msg");
+ smsList.add(sms);
+ }
+ });
+ });
+ Result result = epmetMessageOpenFeignClient.projectSendMsg(smsList);
+ if (!result.success()) {
+ logger.error("项目吹哨,发送手机短信失败" + JSON.toJSONString(result));
+ }
+
+ //项目实时统计消息
+ HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+ String mqMsgBrief = String.format("创建了\"%s\"的项目", formDTO.getTitle());
+ ProjectChangedMQMsg mqMsg = new ProjectChangedMQMsg(projectEntity.getCustomerId(), ProjectConstant.OPERATION_CREATED,
+ projectEntity.getId(),
+ formDTO.getUserId(),
+ new Date(),
+ mqMsgBrief,
+ IpUtils.getIpAddr(request),
+ loginUserUtil.getLoginUserApp(),
+ loginUserUtil.getLoginUserClient());
+ boolean msgResult = SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient).sendProjectChangedMqMsg(mqMsg);
+ if (!msgResult) {
+ log.error("项目实时统计消息发送失败");
+ }
+
+ // 报事人、被艾特的人显示红点
+ EventShiftProjectDTO eventShiftProjectDTO=new EventShiftProjectDTO();
+ eventShiftProjectDTO.setEventId(formDTO.getEventId());
+ eventShiftProjectDTO.setProjectId(projectEntity.getId());
+ eventShiftProjectDTO.setShiftProjectTime(projectEntity.getCreatedTime());
+ eventShiftProjectDTO.setUserId(formDTO.getUserId());
+ eventShiftProjectDTO.setUserAgencyId(projectEntity.getAgencyId());
+ resiEventService.shiftProject(eventShiftProjectDTO);
+ EventToProjectResultDTO resultDTO=new EventToProjectResultDTO();
+ resultDTO.setProjectId(projectEntity.getId());
+ return resultDTO;
+ }
+
+ private List queryStaffListRes(List staffList,String currentUserId) {
+ List staffIdList = staffList.stream().map(TickStaffFormDTO::getStaffId).collect(Collectors.toList());
+ staffIdList.add(currentUserId);
+ staffIdList = new ArrayList(new LinkedHashSet<>(staffIdList));
+ Result resultStaff = epmetUserOpenFeignClient.getCustomerStaffList(staffIdList);
+ if (!resultStaff.success() || null == resultStaff.getData()) {
+ throw new RenException("项目立项,调用user服务获取被勾选工作人员基本信息失败");
+ }
+ return resultStaff.getData().getStaffList();
+ }
+
+ private CategoryTagResultDTO queryCategoryTagRes(EventToProjectFormDTO formDTO) {
+ CategoryTagListFormDTO categoryTag = new CategoryTagListFormDTO();
+ List categoryIdList = formDTO.getCategoryList().stream().map(CategoryOrTagFormDTO::getId).collect(Collectors.toList());
+ List tagIdList = formDTO.getTagList().stream().map(CategoryOrTagFormDTO::getId).collect(Collectors.toList());
+ categoryTag.setCustomerId(formDTO.getCustomerId());
+ categoryTag.setCategoryIdList(categoryIdList);
+ categoryTag.setTagIdList(tagIdList);
+ Result resultDTOResult = govIssueOpenFeignClient.getCategoryTagList(categoryTag);
+ if (!resultDTOResult.success()) {
+ throw new RenException("项目立项,调用issue服务查询分类、标签基础信息失败");
+ }
+ return resultDTOResult.getData();
+ }
+
+ private AgencyDeptGridResultDTO getAgencyDeptGridRes(List staffList, String userAgencyId) {
+ List agencyIdList = staffList.stream().map(TickStaffFormDTO::getAgencyId).collect(Collectors.toList());
+ agencyIdList.add(userAgencyId);
+ agencyIdList = new ArrayList(new LinkedHashSet<>(agencyIdList));
+ agencyIdList.removeAll(Collections.singleton(""));
+ List deptIdList = staffList.stream().map(TickStaffFormDTO::getDepartmentId).collect(Collectors.toList());
+ deptIdList = new ArrayList(new LinkedHashSet<>(deptIdList));
+ deptIdList.removeAll(Collections.singleton(""));
+ List gridIdList = staffList.stream().map(TickStaffFormDTO::getGridId).collect(Collectors.toList());
+ gridIdList = new ArrayList(new LinkedHashSet<>(gridIdList));
+ gridIdList.removeAll(Collections.singleton(""));
+ AgencyDeptGridFormDTO agencyDeptGridFormDTO = new AgencyDeptGridFormDTO();
+ agencyDeptGridFormDTO.setAgencyIdList(agencyIdList);
+ agencyDeptGridFormDTO.setDeptIdList(deptIdList);
+ agencyDeptGridFormDTO.setGridIdList(gridIdList);
+ Result resultDTO = govOrgFeignClient.getAgencyDeptGridList(agencyDeptGridFormDTO);
+ if (!resultDTO.success() || null == resultDTO.getData()) {
+ throw new RenException(ProjectConstant.SELECT_GOV_ORG_EXCEPTION);
+ }
+ return resultDTO.getData();
+ }
+
+ /**
+ * 获取当前工作人员的基本信息
+ *
+ * @param formDTO
+ * @return com.epmet.dto.result.LoginUserDetailsResultDTO
+ * @author yinzuomei
+ * @date 2021/8/5 15:42
+ */
+ private LoginUserDetailsResultDTO queryLoginUserInfo(EventToProjectFormDTO formDTO) {
+ //2.数据准备,查询需要用到的数据
+ //2-1.获取token用户所属组织信息
+ LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO();
+ dto.setApp(formDTO.getApp());
+ dto.setClient(formDTO.getClient());
+ dto.setUserId(formDTO.getUserId());
+ Result resultDto = epmetUserOpenFeignClient.getLoginUserDetails(dto);
+ if (!resultDto.success() || StringUtils.isEmpty(resultDto.getData().getAgencyId())) {
+ throw new RenException(String.format("事件立项调用user服务查询用户数据失败,userId->", formDTO.getUserId()));
+ }
+ return resultDto.getData();
+ }
+
+ /**
+ * @Description 项目立项给勾选的工作人员推送站内信消息
+ * @author yinzuomei
+ */
+ private Result shiftProjectMessage(List staffList,String customerId,String title) {
+ List msgList = new ArrayList<>();
+ //1.创建项目工作人员消息对象
+ String projectStaffMessage = String.format(UserMessageConstant.PROJECT_RESOLVED_MSG, title);
+ //所选人员如果即在部门下又在网格下则只发一条消息
+ Map map = new HashMap<>();
+ staffList.forEach(staff->{
+ if(!map.containsKey(staff.getStaffId())){
+ UserMessageFormDTO msg = new UserMessageFormDTO();
+ msg.setCustomerId(customerId);
+ msg.setGridId("*");
+ msg.setApp(AppClientConstant.APP_GOV);
+ msg.setTitle(UserMessageConstant.PROJECT_TITLE);
+ msg.setMessageContent(projectStaffMessage);
+ msg.setReadFlag(ReadFlagConstant.UN_READ);
+ msg.setUserId(staff.getStaffId());
+ msgList.add(msg);
+ map.put(staff.getStaffId(),staff.getStaffId());
+ }
+ });
+ return epmetMessageOpenFeignClient.saveUserMessageList(msgList);
+ }
+
+
+ /**
+ * @Description 项目立项给勾选的工作人员推送微信订阅消息
+ * @author yinzuomei
+ */
+ private Result wxmpShiftProjectMessage(List staffList,String customerId,String title) {
+ List msgList = new ArrayList<>();
+ //1.创建项目工作人员消息对象
+ String projectStaffMessage = String.format(UserMessageConstant.PROJECT_RESOLVED_MSG, title);
+ //所选人员如果即在部门下又在网格下则只发一条消息
+ Map map = new HashMap<>();
+ staffList.forEach(staff->{
+ if(!map.containsKey(staff.getStaffId())){
+ WxSubscribeMessageFormDTO msg = new WxSubscribeMessageFormDTO();
+ msg.setCustomerId(customerId);
+ msg.setClientType(AppClientConstant.APP_GOV);
+ msg.setUserId(staff.getStaffId());
+ msg.setBehaviorType("项目消息");
+ msg.setMessageContent(projectStaffMessage);
+ msg.setMessageTime(new Date());
+ msg.setGridId("*");
+ msgList.add(msg);
+ map.put(staff.getStaffId(),staff.getStaffId());
+ }
+ });
+ logger.info("事件立项,推送微信订阅消息");
+ return epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList);
+ }
}
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventReplyServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventReplyServiceImpl.java
new file mode 100644
index 0000000000..0cc50a69b2
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventReplyServiceImpl.java
@@ -0,0 +1,280 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.impl;
+
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.exception.EpmetErrorCode;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.scan.param.TextScanParamDTO;
+import com.epmet.commons.tools.scan.param.TextTaskDTO;
+import com.epmet.commons.tools.scan.result.SyncScanResult;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.utils.ScanContentUtils;
+import com.epmet.constant.EventConstant;
+import com.epmet.constant.ResiEventAction;
+import com.epmet.dao.*;
+import com.epmet.dto.CustomerAgencyDTO;
+import com.epmet.dto.form.ReplyFormDTO;
+import com.epmet.dto.form.ReplyListFormDTO;
+import com.epmet.dto.result.ReplyListResultDTO;
+import com.epmet.dto.result.UserBaseInfoResultDTO;
+import com.epmet.entity.ResiEventEntity;
+import com.epmet.entity.ResiEventOperationLogEntity;
+import com.epmet.entity.ResiEventReplyEntity;
+import com.epmet.feign.EpmetUserOpenFeignClient;
+import com.epmet.feign.GovOrgOpenFeignClient;
+import com.epmet.service.ResiEventReplyService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * 事件回复表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@Service
+public class ResiEventReplyServiceImpl extends BaseServiceImpl implements ResiEventReplyService {
+ @Autowired
+ private ResiEventDao resiEventDao;
+ @Autowired
+ private ResiEventOperationLogDao resiEventOperationLogDao;
+ @Autowired
+ private ResiEventMentionDao resiEventMentionDao;
+ @Autowired
+ private ResiEventReportOrgDao resiEventReportOrgDao;
+ @Autowired
+ private GovOrgOpenFeignClient govOrgOpenFeignClient;
+ @Autowired
+ private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+
+ @Value("${openapi.scan.server.url}")
+ private String scanApiUrl;
+ @Value("${openapi.scan.method.textSyncScan}")
+ private String textSyncScanMethod;
+
+ /**
+ * @Description 报事详情-回复列表-两端通用
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 11:11 上午
+ */
+ @Override
+ public List replyList(ReplyListFormDTO formDTO) {
+ List list=baseDao.selectReplyList(formDTO.getResiEventId());
+ list.forEach(dto->{
+ if(dto.getReplyUserId().equals(formDTO.getCurrentUserId())){
+ dto.setReplyName("我");
+ }
+ });
+ return list;
+ }
+
+ /**
+ * 报事-工作人员回复:办结、立项处理后不可回复
+ *
+ * @param replyFormDTO
+ * @return void
+ * @author yinzuomei
+ * @date 2021/8/4 14:20
+ */
+ @Transactional(rollbackFor = Exception.class)
+ @Override
+ public void govReply(ReplyFormDTO replyFormDTO) {
+ ResiEventEntity eventEntity=queryResiEntity(replyFormDTO.getResiEventId());
+ // 回复内容走审核
+ scanReplyContent(replyFormDTO.getContent());
+ //查询工作人员所属组织
+ Result staffResult = govOrgOpenFeignClient.getAgencyByStaff(replyFormDTO.getUserId());
+ if (!staffResult.success() && null == staffResult.getData()) {
+ throw new RenException("查询当前工作人员信息异常");
+ }
+ // 插入回复表
+ ResiEventReplyEntity resiEventReplyEntity=new ResiEventReplyEntity();
+ resiEventReplyEntity.setCustomerId(eventEntity.getCustomerId());
+ resiEventReplyEntity.setResiEventId(replyFormDTO.getResiEventId());
+ resiEventReplyEntity.setFromUserId(replyFormDTO.getUserId());
+ resiEventReplyEntity.setContent(replyFormDTO.getContent());
+ resiEventReplyEntity.setUserShowName(staffResult.getData().getOrganizationName());
+ resiEventReplyEntity.setCreatedTime(new Date());
+ baseDao.insert(resiEventReplyEntity);
+ // 记录操作日志
+ ResiEventOperationLogEntity reCallLog=new ResiEventOperationLogEntity();
+ reCallLog.setCustomerId(eventEntity.getCustomerId());
+ reCallLog.setResiEventId(eventEntity.getId());
+ reCallLog.setUserId(replyFormDTO.getUserId());
+ reCallLog.setUserIdentity(EventConstant.STAFF);
+ reCallLog.setActionCode(ResiEventAction.REPLY.getCode());
+ reCallLog.setActionDesc(ResiEventAction.REPLY.getDesc());
+ reCallLog.setOperateTime(resiEventReplyEntity.getCreatedTime());
+ resiEventOperationLogDao.insert(reCallLog);
+ // 1、更新被@的人的红点置为显示
+ resiEventMentionDao.updateRedDotShow(replyFormDTO.getResiEventId(),null);
+ // 2、更新报事人的红点置为显示
+ eventEntity.setRedDot(true);
+ //更新事件最后一次操作时间
+ eventEntity.setLatestOperatedTime(resiEventReplyEntity.getCreatedTime());
+ resiEventDao.updateById(eventEntity);
+ // 3、组织改为不显示已经在查看详情中操作了 ,目前只有一个组织,如果后面可以报给多个组织,这里入参要增加orgId todo
+ }
+
+ private ResiEventEntity queryResiEntity(String resiEventId) {
+ ResiEventEntity eventEntity=resiEventDao.selectById(resiEventId);
+ // 办结、立项处理后不可回复
+ if(EventConstant.EVENT_STATUS_CLOSED_CASE.equals(eventEntity.getStatus())||eventEntity.getShiftProject()){
+ throw new RenException(EpmetErrorCode.CAN_NOT_REPLY_RESI_EVENT_GOV.getCode(),EpmetErrorCode.CAN_NOT_REPLY_RESI_EVENT_GOV.getMsg());
+ }
+ return eventEntity;
+ }
+
+ /**
+ * 报事当事人回复
+ *
+ * @param formDTO
+ * @return void
+ * @author yinzuomei
+ * @date 2021/8/4 14:39
+ */
+ @Transactional(rollbackFor = Exception.class)
+ @Override
+ public void selfReply(ReplyFormDTO formDTO) {
+ //查询原事件、已办结、已立项不可回复
+ ResiEventEntity eventEntity=queryResiEntity(formDTO.getResiEventId());
+ // 只有被人读过,才可以回复
+ if (!eventEntity.getReadFlag()) {
+ throw new RenException(EpmetErrorCode.CAN_NOT_REPLY_RESI_EVENT_SELF.getCode(), EpmetErrorCode.CAN_NOT_REPLY_RESI_EVENT_SELF.getMsg());
+ }
+ // 回复内容走审核
+ scanReplyContent(formDTO.getContent());
+ // 查询当前用户的显示昵称 应该是xxx街道-姓/女士or先生 如果没有街道和姓,显示的微信昵称
+ List userIdList =new ArrayList<>();
+ userIdList.add(formDTO.getUserId());
+ Result> userResult=epmetUserOpenFeignClient.queryUserBaseInfo(userIdList);
+ if(!userResult.success()|| CollectionUtils.isEmpty(userResult.getData())){
+ throw new RenException("查询当前用户信息异常");
+ }
+ // 插入回复表
+ ResiEventReplyEntity resiEventReplyEntity=new ResiEventReplyEntity();
+ resiEventReplyEntity.setCustomerId(eventEntity.getCustomerId());
+ resiEventReplyEntity.setResiEventId(formDTO.getResiEventId());
+ resiEventReplyEntity.setFromUserId(formDTO.getUserId());
+ resiEventReplyEntity.setContent(formDTO.getContent());
+ resiEventReplyEntity.setUserShowName(userResult.getData().get(0).getUserShowName());
+ resiEventReplyEntity.setCreatedTime(new Date());
+ baseDao.insert(resiEventReplyEntity);
+ //更新事件最后一次操作时间
+ eventEntity.setLatestOperatedTime(resiEventReplyEntity.getCreatedTime());
+ resiEventDao.updateById(eventEntity);
+ // 记录操作日志
+ ResiEventOperationLogEntity reCallLog=new ResiEventOperationLogEntity();
+ reCallLog.setCustomerId(eventEntity.getCustomerId());
+ reCallLog.setResiEventId(eventEntity.getId());
+ reCallLog.setUserId(formDTO.getUserId());
+ reCallLog.setUserIdentity(EventConstant.REPORT_USER);
+ reCallLog.setActionCode(ResiEventAction.REPLY.getCode());
+ reCallLog.setActionDesc(ResiEventAction.REPLY.getDesc());
+ reCallLog.setOperateTime(resiEventReplyEntity.getCreatedTime());
+ resiEventOperationLogDao.insert(reCallLog);
+ // 1、更新被@的人的红点置为显示
+ resiEventMentionDao.updateRedDotShow(formDTO.getResiEventId(),null);
+ // 2、更新报事人的红点置为不显示已经在查看详情中操作了
+ // 3、组织改为显示
+ resiEventReportOrgDao.updateRedDotShow(formDTO.getResiEventId());
+ }
+
+ /**
+ * 艾特的人回复
+ *
+ * @param replyFormDTO
+ * @return void
+ * @author yinzuomei
+ * @date 2021/8/4 15:06
+ */
+ @Override
+ public void atReply(ReplyFormDTO replyFormDTO) {
+ ResiEventEntity eventEntity=queryResiEntity(replyFormDTO.getResiEventId());
+ // 回复内容走审核
+ scanReplyContent(replyFormDTO.getContent());
+ // 查询当前用户的显示昵称
+ List userIdList =new ArrayList<>();
+ userIdList.add(replyFormDTO.getUserId());
+ Result> userResult=epmetUserOpenFeignClient.queryUserBaseInfo(userIdList);
+ if(!userResult.success()|| CollectionUtils.isEmpty(userResult.getData())){
+ throw new RenException("查询当前用户信息异常");
+ }
+ // 插入回复表
+ ResiEventReplyEntity resiEventReplyEntity=new ResiEventReplyEntity();
+ resiEventReplyEntity.setCustomerId(eventEntity.getCustomerId());
+ resiEventReplyEntity.setResiEventId(replyFormDTO.getResiEventId());
+ resiEventReplyEntity.setFromUserId(replyFormDTO.getUserId());
+ resiEventReplyEntity.setContent(replyFormDTO.getContent());
+ resiEventReplyEntity.setUserShowName("人大代表-".concat(userResult.getData().get(0).getRealName()));
+ resiEventReplyEntity.setCreatedTime(new Date());
+ baseDao.insert(resiEventReplyEntity);
+ // 记录操作日志
+ ResiEventOperationLogEntity reCallLog=new ResiEventOperationLogEntity();
+ reCallLog.setCustomerId(eventEntity.getCustomerId());
+ reCallLog.setResiEventId(eventEntity.getId());
+ reCallLog.setUserId(replyFormDTO.getUserId());
+ reCallLog.setUserIdentity(EventConstant.RESI_USER);
+ reCallLog.setActionCode(ResiEventAction.REPLY.getCode());
+ reCallLog.setActionDesc(ResiEventAction.REPLY.getDesc());
+ reCallLog.setOperateTime(resiEventReplyEntity.getCreatedTime());
+ resiEventOperationLogDao.insert(reCallLog);
+ // 1、当前被艾特的人红点不展示已经在查看详情接口操作了,其他被@的人的红点置为显示
+ resiEventMentionDao.updateRedDotShow(replyFormDTO.getResiEventId(),replyFormDTO.getUserId());
+ // 2、更新报事人的红点置为显示
+ eventEntity.setRedDot(true);
+ //更新事件最后一次操作时间
+ eventEntity.setLatestOperatedTime(resiEventReplyEntity.getCreatedTime());
+ resiEventDao.updateById(eventEntity);
+ // 3、组织改为显示
+ resiEventReportOrgDao.updateRedDotShow(replyFormDTO.getResiEventId());
+ }
+
+ private void scanReplyContent(String content) {
+ if (StringUtils.isNotBlank(content)) {
+ TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
+ TextTaskDTO taskDTO = new TextTaskDTO();
+ taskDTO.setContent(content);
+ taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
+ textScanParamDTO.getTasks().add(taskDTO);
+ Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
+ if (!textSyncScanResult.success()) {
+ throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
+ } else {
+ if (!textSyncScanResult.getData().isAllPass()) {
+ throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(), EpmetErrorCode.TEXT_SCAN_FAILED.getMsg());
+ }
+ }
+ }
+ }
+
+
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java
new file mode 100644
index 0000000000..3adca24761
--- /dev/null
+++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java
@@ -0,0 +1,643 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.constant.StrConstant;
+import com.epmet.commons.tools.dto.form.FileCommonDTO;
+import com.epmet.commons.tools.exception.EpmetErrorCode;
+import com.epmet.commons.tools.exception.RenException;
+import com.epmet.commons.tools.scan.param.ImgScanParamDTO;
+import com.epmet.commons.tools.scan.param.ImgTaskDTO;
+import com.epmet.commons.tools.scan.param.TextScanParamDTO;
+import com.epmet.commons.tools.scan.param.TextTaskDTO;
+import com.epmet.commons.tools.scan.result.SyncScanResult;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.utils.ScanContentUtils;
+import com.epmet.constant.EventConstant;
+import com.epmet.constant.ResiEventAction;
+import com.epmet.dao.*;
+import com.epmet.dto.EventProjectInfoDTO;
+import com.epmet.dto.form.*;
+import com.epmet.dto.result.*;
+import com.epmet.entity.*;
+import com.epmet.feign.EpmetUserOpenFeignClient;
+import com.epmet.feign.GovOrgOpenFeignClient;
+import com.epmet.service.ResiEventService;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * 居民报事表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2021-08-03
+ */
+@Slf4j
+@Service
+public class ResiEventServiceImpl extends BaseServiceImpl implements ResiEventService {
+ @Value("${openapi.scan.server.url}")
+ private String scanApiUrl;
+ @Value("${openapi.scan.method.textSyncScan}")
+ private String textSyncScanMethod;
+ @Value("${openapi.scan.method.imgSyncScan}")
+ private String imgSyncScanMethod;
+ @Autowired
+ private GovOrgOpenFeignClient govOrgOpenFeignClient;
+ @Autowired
+ private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
+ @Autowired
+ private ResiEventAttachmentDao resiEventAttachmentDao;
+ @Autowired
+ private ResiEventReportOrgDao resiEventReportOrgDao;
+ @Autowired
+ private ResiEventMentionDao resiEventMentionDao;
+ @Autowired
+ private ResiEventOperationLogDao resiEventOperationLogDao;
+ @Autowired
+ private ProjectDao projectDao;
+ @Autowired
+ private ResiEventReplyDao resiEventReplyDao;
+
+ /**
+ * @Description 群众直报(待处理、处理中、已办结)列表
+ * 未处理:按照创建时间正序;
+ * 处理中:按照最新操作时间由近到远排序;
+ * 已办结:按照办结时间由近到远排序;
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 10:53 上午
+ */
+ @Override
+ public List eventList(EventListFormDTO formDTO) {
+ PageHelper.startPage(formDTO.getPageNo(),formDTO.getPageSize());
+ List result = baseDao.eventUnDisposedList(formDTO.getOrgId(), formDTO.getEventType());
+ if (!CollectionUtils.isEmpty(result)){
+ return result;
+ }
+ return new ArrayList<>();
+ }
+
+ /**
+ * @Description 报事-首次查看事件-两端通用
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 11:01 上午
+ */
+ @Override
+ public void updateViewTime(UpdateViewTimeFormDTO formDTO) {
+ ResiEventEntity eventEntity=baseDao.selectById(formDTO.getEventId());
+ if (null == eventEntity) {
+ throw new RenException(String.format("没有找到事件记录,eventId:%s",formDTO.getEventId()));
+ }
+ ResiEventMentionEntity resiEventMentionEntity=resiEventMentionDao.selectUser(formDTO.getEventId(),formDTO.getUserId());
+ if (formDTO.getUserId().equals(eventEntity.getReportUserId()) && null == resiEventMentionEntity) {
+ log.warn("报事人查看详情不需要调用此接口,如果既是报事人又是人大代表,自己艾特了自己,需要更新为已读");
+ return;
+ }
+ // 这个事件已经被查看了
+ eventEntity.setReadFlag(true);
+ baseDao.updateById(eventEntity);
+ // 居民端:resi_user;工作端:staff
+ if(EventConstant.RESI_USER.equals(formDTO.getViewType())){
+ //被@的人置为已读
+ resiEventMentionDao.updateReadFlag(formDTO.getEventId(),formDTO.getUserId());
+ }else if(EventConstant.STAFF.equals(formDTO.getViewType())){
+ // 当前组织置为已读
+ resiEventReportOrgDao.updateReadFlag(formDTO.getEventId(),formDTO.getOrgId(),formDTO.getUserId());
+ }
+ // 插入首次查看日志
+ List logEntityList = resiEventOperationLogDao.selectByUserAction(formDTO.getEventId(), formDTO.getUserId(), ResiEventAction.READ_FIRST.getCode());
+ if (CollectionUtils.isEmpty(logEntityList)) {
+ ResiEventOperationLogEntity publishLog=new ResiEventOperationLogEntity();
+ publishLog.setCustomerId(formDTO.getCustomerId());
+ publishLog.setResiEventId(formDTO.getEventId());
+ publishLog.setUserId(formDTO.getUserId());
+ publishLog.setUserIdentity(formDTO.getViewType());
+ publishLog.setActionCode(ResiEventAction.READ_FIRST.getCode());
+ publishLog.setActionDesc(ResiEventAction.READ_FIRST.getDesc());
+ publishLog.setOperateTime(new Date());
+ publishLog.setCreatedTime(publishLog.getOperateTime());
+ resiEventOperationLogDao.insert(publishLog);
+ }
+ }
+
+ /**
+ * @Description 报事详情-两端通用
+ * @Param formDTO
+ * @author zxc
+ * @date 2021/8/3 1:47 下午
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public EventDetailResultDTO eventDetail(EventDetailFormDTO formDTO, TokenDto tokenDto) {
+ EventDetailResultDTO dto = baseDao.selectEventDetail(formDTO.getEventId());
+ if (null == dto){
+ return new EventDetailResultDTO();
+ }
+ // 已转项目
+ if (dto.getIsProject()){
+ // 查询项目信息
+ EventProjectInfoDTO eventProjectInfo = projectDao.selectEventProjectInfo(dto.getProjectId());
+ // 查询操作人的名字
+ Result staffName = govOrgOpenFeignClient.staffName(eventProjectInfo.getUserId());
+ if (!staffName.success()){
+ throw new RenException("查询工作人员名字失败");
+ }
+ eventProjectInfo.setOperationName(staffName.getData());
+ dto.setProjectInfo(eventProjectInfo);
+ }
+ // 查询报事人名字
+ List userIdList = new ArrayList<>();
+ userIdList.add(dto.getEventUserId());
+ Result> userResult=epmetUserOpenFeignClient.queryUserBaseInfo(userIdList);
+ if(!userResult.success()|| CollectionUtils.isEmpty(userResult.getData())){
+ throw new RenException("查询当前用户信息异常");
+ }
+ userResult.getData().forEach(u -> {
+ if (u.getUserId().equals(dto.getEventUserId())){
+ dto.setEventPeopleName(u.getUserShowName());
+ }
+ });
+ // 查询所属网格
+ Result gridNameResult = govOrgOpenFeignClient.gridName(dto.getGridId());
+ if (!gridNameResult.success()){
+ throw new RenException("查询所属网格失败");
+ }
+ dto.setGridName(gridNameResult.getData());
+ // 查询报事的org
+ List orgNameList = dto.getOrgNameList();
+ Result> orgResult = govOrgOpenFeignClient.selectOrgNameByType(orgNameList);
+ if (!orgResult.success()){
+ throw new RenException("查询组织名称失败");
+ }
+ List data = orgResult.getData();
+ dto.setEventOrg(data);
+ // 更改已读状态 报事人的红点:resi_event,艾特人的:resi_event_mention,所代表的组织的:resi_event_report_org
+ if (tokenDto.getApp().equals(EventConstant.TYPE_RESI)){
+ baseDao.updateResiEvent(tokenDto.getUserId(),formDTO.getEventId());
+ baseDao.updateEventMention(tokenDto.getUserId(),formDTO.getEventId());
+ }else if (tokenDto.getApp().equals(EventConstant.TYPE_GOV)){
+ resiEventReportOrgDao.updateEventOrg(formDTO.getEventId(), formDTO.getOrgId());
+ }
+ return dto;
+ }
+
+ /**
+ * 我要报事-提交(尹)
+ *
+ * @param formDTO
+ * @return com.epmet.dto.result.ResiEventResultDTO
+ * @author yinzuomei
+ * @date 2021/8/3 10:51
+ */
+ @Override
+ public ResiEventIdDTO report(ResiEventFormDTO formDTO) {
+ //1、事件内容审核
+ //2、图片审核
+ this.scanContent(formDTO.getEventContent(), formDTO.getAttachmentList());
+ //3、查询当前所在网格的信息
+ Result gridInfoRes=govOrgOpenFeignClient.queryGridInfo(formDTO.getGridId());
+ if(!gridInfoRes.success()||null==gridInfoRes.getData()){
+ throw new RenException("网格信息查询异常");
+ }
+
+ ResiEventEntity resiEventEntity= ConvertUtils.sourceToTarget(formDTO,ResiEventEntity.class);
+ resiEventEntity.setAgencyId(gridInfoRes.getData().getParentAgencyId());
+ resiEventEntity.setPids(gridInfoRes.getData().getPids());
+ resiEventEntity.setReportUserId(formDTO.getUserId());
+ Result partyRes=epmetUserOpenFeignClient.selectIsPartyMemberByUserId(formDTO.getUserId());
+ if(!partyRes.success()||null==partyRes.getData()){
+ throw new RenException("查询用户是否是党员异常");
+ }
+ resiEventEntity.setIsParty(partyRes.getData());
+ resiEventEntity.setStatus(EventConstant.EVENT_STATUS_PROCESSING);
+ resiEventEntity.setShiftProject(false);
+ resiEventEntity.setProjectId(StrConstant.EPMETY_STR);
+ resiEventEntity.setRecallFlag(false);
+ resiEventEntity.setReadFlag(false);
+ resiEventEntity.setRedDot(false);
+ resiEventEntity.setLatestOperatedTime(new Date());
+ resiEventEntity.setCreatedTime(resiEventEntity.getLatestOperatedTime());
+ resiEventEntity.setUpdatedTime(resiEventEntity.getLatestOperatedTime());
+ //4、插入主表resi_event
+ baseDao.insert(resiEventEntity);
+ //5、插入附件表
+ List attachmentEntityList=getAttList(formDTO.getCustomerId(),resiEventEntity.getId(),formDTO.getAttachmentList());
+ attachmentEntityList.forEach(attachmentEntity->{
+ resiEventAttachmentDao.insert(attachmentEntity);
+ });
+ //6、插入组织表
+ List orgEntityList=getOrgList(formDTO.getCustomerId(),resiEventEntity.getId(),formDTO.getOrgList());
+ orgEntityList.forEach(orgEntity->{
+ resiEventReportOrgDao.insert(orgEntity);
+ });
+ //7、插入艾特人表
+ List