From 6d3fbc65258eb81aad0fd0ab4380a357a50f0157 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 17 May 2022 16:55:58 +0800 Subject: [PATCH 001/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcEventAttachmentDTO.java | 110 ++++++++++ .../com/epmet/dto/IcEventCategoryDTO.java | 79 +++++++ .../main/java/com/epmet/dto/IcEventDTO.java | 194 ++++++++++++++++++ .../com/epmet/dto/IcEventOperationLogDTO.java | 101 +++++++++ .../java/com/epmet/dto/IcEventReplyDTO.java | 79 +++++++ .../com/epmet/dto/IcEventScanTaskDTO.java | 87 ++++++++ .../epmet/dto/form/IcEventListFormDTO.java | 82 ++++++++ .../dto/result/IcEventListResultDTO.java | 3 + .../epmet/controller/IcEventController.java | 87 ++++++++ .../com/epmet/dao/IcEventAttachmentDao.java | 16 ++ .../com/epmet/dao/IcEventCategoryDao.java | 16 ++ .../main/java/com/epmet/dao/IcEventDao.java | 16 ++ .../com/epmet/dao/IcEventOperationLogDao.java | 16 ++ .../java/com/epmet/dao/IcEventReplyDao.java | 16 ++ .../com/epmet/dao/IcEventScanTaskDao.java | 16 ++ .../epmet/entity/IcEventAttachmentEntity.java | 80 ++++++++ .../epmet/entity/IcEventCategoryEntity.java | 49 +++++ .../java/com/epmet/entity/IcEventEntity.java | 164 +++++++++++++++ .../entity/IcEventOperationLogEntity.java | 71 +++++++ .../com/epmet/entity/IcEventReplyEntity.java | 49 +++++ .../epmet/entity/IcEventScanTaskEntity.java | 57 +++++ .../java/com/epmet/excel/IcEventExcel.java | 120 +++++++++++ .../service/IcEventAttachmentService.java | 78 +++++++ .../epmet/service/IcEventCategoryService.java | 78 +++++++ .../service/IcEventOperationLogService.java | 78 +++++++ .../epmet/service/IcEventReplyService.java | 78 +++++++ .../epmet/service/IcEventScanTaskService.java | 78 +++++++ .../com/epmet/service/IcEventService.java | 69 +++++++ .../impl/IcEventAttachmentServiceImpl.java | 83 ++++++++ .../impl/IcEventCategoryServiceImpl.java | 83 ++++++++ .../impl/IcEventOperationLogServiceImpl.java | 83 ++++++++ .../service/impl/IcEventReplyServiceImpl.java | 83 ++++++++ .../impl/IcEventScanTaskServiceImpl.java | 83 ++++++++ .../service/impl/IcEventServiceImpl.java | 80 ++++++++ .../resources/mapper/IcEventAttachmentDao.xml | 27 +++ .../resources/mapper/IcEventCategoryDao.xml | 22 ++ .../src/main/resources/mapper/IcEventDao.xml | 44 ++++ .../mapper/IcEventOperationLogDao.xml | 24 +++ .../main/resources/mapper/IcEventReplyDao.xml | 22 ++ .../resources/mapper/IcEventScanTaskDao.xml | 23 +++ 40 files changed, 2624 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventAttachmentDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventCategoryDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventScanTaskDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventScanTaskDao.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventCategoryEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventReplyEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventScanTaskEntity.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventAttachmentService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventScanTaskService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventAttachmentServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventScanTaskServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventAttachmentDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventAttachmentDTO.java new file mode 100644 index 0000000000..9d1abdb1b7 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventAttachmentDTO.java @@ -0,0 +1,110 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventAttachmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 附件名 + */ + 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; + + /** + * 附件状态(审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) +现在图片是同步审核的,所以图片只有auto_passed一种状态 + */ + private String status; + + /** + * 失败原因 + */ + private String reason; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventCategoryDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventCategoryDTO.java new file mode 100644 index 0000000000..1d79e0e415 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventCategoryDTO.java @@ -0,0 +1,79 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventCategoryDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 分类id + */ + private String categoryId; + + /** + * 分类对应的所有上级,英文逗号隔开 + */ + private String categoryPids; + + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + + /** + * 删除标识 0未删除、1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java new file mode 100644 index 0000000000..7233e80a75 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java @@ -0,0 +1,194 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键,事件id + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件所属的网格Id + */ + private String gridId; + + /** + * 网格的所属组织 + */ + private String agencyId; + + /** + * 网格的所有组织Id + */ + private String gridPids; + + /** + * 报事的人【居民端/pc端居民Id】可为空 + */ + private String reportUserId; + + /** + * 报事人姓名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 反映渠道【字典表】 + */ + private String sourceType; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 纬度 + */ + private String latitude; + + /** + * 经度 + */ + private String longitude; + + /** + * 地址 + */ + private String address; + + /** + * 处理中:processing;已办结:closed_case + */ + private String status; + + /** + * 办结时间 + */ + private Date closeCaseTime; + + /** + * 0:已回复 1:已转项目 1:已转需求 + */ + private String operationType; + + /** + * 项目、需求ID + */ + private String operationId; + + /** + * 事件是否被阅读过;1已读;针对报事人待处理列表 + */ + private Integer readFlag; + + /** + * 报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; + */ + private Integer redDot; + + /** + * 最近一次操作时间(回复、立项、转需求、办结更新此列) + */ + private Date latestOperatedTime; + + /** + * 是否解决:已解决 resolved,未解决 un_solved + */ + private String resolveStatus; + + /** + * 结案说明 + */ + private String closeRemark; + + /** + * 评论人 + */ + private String commentUserId; + + /** + * 评论内容 + */ + private String satisfaction; + + /** + * 评论时间 + */ + private Date commentTime; + + /** + * 事件审核状态[涉及附件审核需要加的状态](审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) + */ + private String auditStatus; + + /** + * 审核理由 + */ + private String auditReason; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java new file mode 100644 index 0000000000..db707294fc --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java @@ -0,0 +1,101 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventOperationLogDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 事件id + */ + private String icEventId; + + /** + * 操作用户Id + */ + private String userId; + + /** + * 操作用户类型【居民端用户:resi_user;工作人员:staff;】 + */ + private String userIdentity; + + /** + * 1、发布事件:add + 2、复:reply; +3、立项:shift_project; +4、转需求:shift_demand +5、办结:close_case; + + + */ + private String actionCode; + + /** + * 1、发布事件:publish; +2、撤回事件:recall; +3、复:reply; +4、立项:shift_project; +5、办结:close_case; +6、选择是否已解决:choose_resolve; +7、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + */ + private String actionDesc; + + /** + * 操作时间 + */ + private Date operateTime; + + /** + * 删除标识 1删除;0未删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java new file mode 100644 index 0000000000..b60d6fbdf5 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java @@ -0,0 +1,79 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件回复表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventReplyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 回复人用户Id[工作人员ID] + */ + private String fromUserId; + + /** + * 内容 + */ + private String content; + + /** + * 报事人:组织-人名 + */ + private String userShowName; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventScanTaskDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventScanTaskDTO.java new file mode 100644 index 0000000000..d8433ce7a4 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventScanTaskDTO.java @@ -0,0 +1,87 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 事件附件安全校验任务表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventScanTaskDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 事件附件表主键,对应dataId + */ + private String icEventAttachmentId; + + /** + * 阿里云审核任务Id + */ + private String taskId; + + /** + * 审核状态【auditing: 审核中; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规;】 + */ + private String status; + + /** + * 附件类型(视频 - video、 语音 - voice 文件 - doc) + */ + private String attachmentType; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 操作人,API审核结果,存储为SCAN_USER或者APP_USER + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java new file mode 100644 index 0000000000..dd13a583fd --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -0,0 +1,82 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 【迁入管理】列表--接口入参 + * @Author sun + */ +@Data +public class IcEventListFormDTO implements Serializable { + private static final long serialVersionUID = 9156247659994638103L; + + /** + * 网格ID + */ + private String gridId; + /** + * 所属小区ID + */ + private String villageId; + /** + * 所属楼宇Id + */ + private String buildId; + /** + * 单元id + */ + private String unitId; + /** + * 所属家庭Id + */ + private String homeId; + /** + * 姓名 + */ + private String name; + /** + * 是否享受福利【否:0 是:1】 + */ + private String isWeifare; + /** + * 手机号 + */ + private String mobile; + /** + * 身份证号 + */ + private String idCard; + /** + * 起始迁入时间 + */ + //@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private String startTime; + /** + * 终止迁入时间 + */ + //@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private String endTime; + /** + * 页码 + */ + private Integer pageNo = 1; + /** + * 每页显示数量 + */ + private Integer pageSize = 20; + + private Boolean isPage = true; + private String customerId; + private String moveInId; + /** + * 当前登录用户id + */ + private String staffId; + /** + * 当前登录用户所属组织id + */ + private String agencyId; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java new file mode 100644 index 0000000000..47bedb0b7f --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -0,0 +1,3 @@ +package com.epmet.dto.result; + +public class IcEventListResultDTO implements Serializable { diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java new file mode 100644 index 0000000000..95df49df4c --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -0,0 +1,87 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +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; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.excel.IcEventExcel; +import com.epmet.service.IcEventService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@RestController +@RequestMapping("icEvent") +public class IcEventController { + + @Autowired + private IcEventService icEventService; + + @RequestMapping("list") + public Result> list(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + return new Result>().ok(icEventService.list(formDTO)); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcEventDTO data = icEventService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcEventDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icEventService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@RequestBody IcEventDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icEventService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icEventService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icEventService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcEventExcel.class); + } + + + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java new file mode 100644 index 0000000000..481d4d9e2d --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventAttachmentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventAttachmentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java new file mode 100644 index 0000000000..f9db23cc56 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventCategoryEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventCategoryDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java new file mode 100644 index 0000000000..f73270d115 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java new file mode 100644 index 0000000000..08fb7a82dc --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventOperationLogEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventOperationLogDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java new file mode 100644 index 0000000000..65a0b893d7 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventReplyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件回复表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventReplyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventScanTaskDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventScanTaskDao.java new file mode 100644 index 0000000000..0666a818a0 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventScanTaskDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcEventScanTaskEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 事件附件安全校验任务表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Mapper +public interface IcEventScanTaskDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java new file mode 100644 index 0000000000..3f9534982f --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java @@ -0,0 +1,80 @@ +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 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event_attachment") +public class IcEventAttachmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 附件名 + */ + 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; + + /** + * 附件状态(审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) +现在图片是同步审核的,所以图片只有auto_passed一种状态 + */ + private String status; + + /** + * 失败原因 + */ + private String reason; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventCategoryEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventCategoryEntity.java new file mode 100644 index 0000000000..7e96695161 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventCategoryEntity.java @@ -0,0 +1,49 @@ +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 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event_category") +public class IcEventCategoryEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 分类id + */ + private String categoryId; + + /** + * 分类对应的所有上级,英文逗号隔开 + */ + private String categoryPids; + + /** + * 分类编码,分类编码+customer_id唯一 + */ + private String categoryCode; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java new file mode 100644 index 0000000000..58dd68e144 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -0,0 +1,164 @@ +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 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event") +public class IcEventEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件所属的网格Id + */ + private String gridId; + + /** + * 网格的所属组织 + */ + private String agencyId; + + /** + * 网格的所有组织Id + */ + private String gridPids; + + /** + * 报事的人【居民端/pc端居民Id】可为空 + */ + private String reportUserId; + + /** + * 报事人姓名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 反映渠道【字典表】 + */ + private String sourceType; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 纬度 + */ + private String latitude; + + /** + * 经度 + */ + private String longitude; + + /** + * 地址 + */ + private String address; + + /** + * 处理中:processing;已办结:closed_case + */ + private String status; + + /** + * 办结时间 + */ + private Date closeCaseTime; + + /** + * 0:已回复 1:已转项目 1:已转需求 + */ + private String operationType; + + /** + * 项目、需求ID + */ + private String operationId; + + /** + * 事件是否被阅读过;1已读;针对报事人待处理列表 + */ + private Integer readFlag; + + /** + * 报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; + */ + private Integer redDot; + + /** + * 最近一次操作时间(回复、立项、转需求、办结更新此列) + */ + private Date latestOperatedTime; + + /** + * 是否解决:已解决 resolved,未解决 un_solved + */ + private String resolveStatus; + + /** + * 结案说明 + */ + private String closeRemark; + + /** + * 评论人 + */ + private String commentUserId; + + /** + * 评论内容 + */ + private String satisfaction; + + /** + * 评论时间 + */ + private Date commentTime; + + /** + * 事件审核状态[涉及附件审核需要加的状态](审核中:auditing; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规; +rejected:人工审核驳回; +approved:人工审核通过) + */ + private String auditStatus; + + /** + * 审核理由 + */ + private String auditReason; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java new file mode 100644 index 0000000000..a3cdf53b51 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java @@ -0,0 +1,71 @@ +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 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event_operation_log") +public class IcEventOperationLogEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 事件id + */ + private String icEventId; + + /** + * 操作用户Id + */ + private String userId; + + /** + * 操作用户类型【居民端用户:resi_user;工作人员:staff;】 + */ + private String userIdentity; + + /** + * 1、发布事件:add + 2、复:reply; +3、立项:shift_project; +4、转需求:shift_demand +5、办结:close_case; + + + */ + private String actionCode; + + /** + * 1、发布事件:publish; +2、撤回事件:recall; +3、复:reply; +4、立项:shift_project; +5、办结:close_case; +6、选择是否已解决:choose_resolve; +7、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + */ + private String actionDesc; + + /** + * 操作时间 + */ + private Date operateTime; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventReplyEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventReplyEntity.java new file mode 100644 index 0000000000..e477a9cb2a --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventReplyEntity.java @@ -0,0 +1,49 @@ +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 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event_reply") +public class IcEventReplyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 回复人用户Id[工作人员ID] + */ + private String fromUserId; + + /** + * 内容 + */ + private String content; + + /** + * 报事人:组织-人名 + */ + private String userShowName; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventScanTaskEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventScanTaskEntity.java new file mode 100644 index 0000000000..bc51c9a0df --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventScanTaskEntity.java @@ -0,0 +1,57 @@ +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 2022-05-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_event_scan_task") +public class IcEventScanTaskEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件Id + */ + private String icEventId; + + /** + * 事件附件表主键,对应dataId + */ + private String icEventAttachmentId; + + /** + * 阿里云审核任务Id + */ + private String taskId; + + /** + * 审核状态【auditing: 审核中; +auto_passed: 自动通过; +review:结果不确定,需要人工审核; +block: 结果违规;】 + */ + private String status; + + /** + * 附件类型(视频 - video、 语音 - voice 文件 - doc) + */ + private String attachmentType; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java new file mode 100644 index 0000000000..fdf4ae9a0a --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java @@ -0,0 +1,120 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Data +public class IcEventExcel { + + @Excel(name = "主键,事件id") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "事件所属的网格Id") + private String gridId; + + @Excel(name = "网格的所属组织") + private String agencyId; + + @Excel(name = "网格的所有组织Id") + private String gridPids; + + @Excel(name = "报事的人【居民端/pc端居民Id】可为空") + private String reportUserId; + + @Excel(name = "报事人姓名") + private String name; + + @Excel(name = "手机号") + private String mobile; + + @Excel(name = "身份证号") + private String idCard; + + @Excel(name = "反映渠道【字典表】") + private String sourceType; + + @Excel(name = "事件内容") + private String eventContent; + + @Excel(name = "纬度") + private String latitude; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "地址") + private String address; + + @Excel(name = "处理中:processing;已办结:closed_case") + private String status; + + @Excel(name = "办结时间") + private Date closeCaseTime; + + @Excel(name = "0:已回复 1:已转项目 1:已转需求") + private String operationType; + + @Excel(name = "项目、需求ID") + private String operationId; + + @Excel(name = "事件是否被阅读过;1已读;针对报事人待处理列表") + private Integer readFlag; + + @Excel(name = "报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; ") + private Integer redDot; + + @Excel(name = "最近一次操作时间(回复、立项、转需求、办结更新此列)") + private Date latestOperatedTime; + + @Excel(name = "是否解决:已解决 resolved,未解决 un_solved") + private String resolveStatus; + + @Excel(name = "结案说明") + private String closeRemark; + + @Excel(name = "评论人") + private String commentUserId; + + @Excel(name = "评论内容") + private String commentContent; + + @Excel(name = "评论时间") + private Date commentTime; + + @Excel(name = "事件审核状态") + private String auditStatus; + + @Excel(name = "审核理由") + private String auditReason; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventAttachmentService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventAttachmentService.java new file mode 100644 index 0000000000..2827802377 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventAttachmentService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcEventAttachmentDTO; +import com.epmet.entity.IcEventAttachmentEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventAttachmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcEventAttachmentDTO + * @author generator + * @date 2022-05-17 + */ + IcEventAttachmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventAttachmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventAttachmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java new file mode 100644 index 0000000000..182569670b --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcEventCategoryDTO; +import com.epmet.entity.IcEventCategoryEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventCategoryService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcEventCategoryDTO + * @author generator + * @date 2022-05-17 + */ + IcEventCategoryDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventCategoryDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventCategoryDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java new file mode 100644 index 0000000000..87706a7c52 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcEventOperationLogDTO; +import com.epmet.entity.IcEventOperationLogEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventOperationLogService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcEventOperationLogDTO + * @author generator + * @date 2022-05-17 + */ + IcEventOperationLogDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventOperationLogDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventOperationLogDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java new file mode 100644 index 0000000000..6f30e79285 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcEventReplyDTO; +import com.epmet.entity.IcEventReplyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件回复表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventReplyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcEventReplyDTO + * @author generator + * @date 2022-05-17 + */ + IcEventReplyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventReplyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventReplyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventScanTaskService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventScanTaskService.java new file mode 100644 index 0000000000..593e0b3438 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventScanTaskService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcEventScanTaskDTO; +import com.epmet.entity.IcEventScanTaskEntity; + +import java.util.List; +import java.util.Map; + +/** + * 事件附件安全校验任务表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventScanTaskService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-05-17 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcEventScanTaskDTO + * @author generator + * @date 2022-05-17 + */ + IcEventScanTaskDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventScanTaskDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventScanTaskDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java new file mode 100644 index 0000000000..4222b0b20c --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -0,0 +1,69 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.entity.IcEventEntity; + +import java.util.Map; + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +public interface IcEventService extends BaseService { + + /** + * 默认查询 + * + * @param formDTO + * @return java.util.List + * @author generator + * @date 2022-05-17 + */ + PageData list(IcEventListFormDTO formDTO); + + /** + * 单条查询 + * + * @param id + * @return IcEventDTO + * @author generator + * @date 2022-05-17 + */ + IcEventDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void save(IcEventDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-05-17 + */ + void update(IcEventDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-05-17 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventAttachmentServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventAttachmentServiceImpl.java new file mode 100644 index 0000000000..1b2101cc28 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventAttachmentServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventAttachmentDao; +import com.epmet.dto.IcEventAttachmentDTO; +import com.epmet.entity.IcEventAttachmentEntity; +import com.epmet.service.IcEventAttachmentService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事件附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Service +public class IcEventAttachmentServiceImpl extends BaseServiceImpl implements IcEventAttachmentService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcEventAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcEventAttachmentDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcEventAttachmentDTO get(String id) { + IcEventAttachmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventAttachmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventAttachmentDTO dto) { + IcEventAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IcEventAttachmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventAttachmentDTO dto) { + IcEventAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IcEventAttachmentEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java new file mode 100644 index 0000000000..373ba4a279 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventCategoryDao; +import com.epmet.dto.IcEventCategoryDTO; +import com.epmet.entity.IcEventCategoryEntity; +import com.epmet.service.IcEventCategoryService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事件所属分类表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Service +public class IcEventCategoryServiceImpl extends BaseServiceImpl implements IcEventCategoryService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcEventCategoryDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcEventCategoryDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcEventCategoryDTO get(String id) { + IcEventCategoryEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventCategoryDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventCategoryDTO dto) { + IcEventCategoryEntity entity = ConvertUtils.sourceToTarget(dto, IcEventCategoryEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventCategoryDTO dto) { + IcEventCategoryEntity entity = ConvertUtils.sourceToTarget(dto, IcEventCategoryEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java new file mode 100644 index 0000000000..7eea43a96e --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventOperationLogDao; +import com.epmet.dto.IcEventOperationLogDTO; +import com.epmet.entity.IcEventOperationLogEntity; +import com.epmet.service.IcEventOperationLogService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事件操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Service +public class IcEventOperationLogServiceImpl extends BaseServiceImpl implements IcEventOperationLogService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcEventOperationLogDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcEventOperationLogDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcEventOperationLogDTO get(String id) { + IcEventOperationLogEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventOperationLogDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventOperationLogDTO dto) { + IcEventOperationLogEntity entity = ConvertUtils.sourceToTarget(dto, IcEventOperationLogEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventOperationLogDTO dto) { + IcEventOperationLogEntity entity = ConvertUtils.sourceToTarget(dto, IcEventOperationLogEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java new file mode 100644 index 0000000000..86f09b900c --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventReplyDao; +import com.epmet.dto.IcEventReplyDTO; +import com.epmet.entity.IcEventReplyEntity; +import com.epmet.service.IcEventReplyService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事件回复表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Service +public class IcEventReplyServiceImpl extends BaseServiceImpl implements IcEventReplyService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcEventReplyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcEventReplyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcEventReplyDTO get(String id) { + IcEventReplyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventReplyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventReplyDTO dto) { + IcEventReplyEntity entity = ConvertUtils.sourceToTarget(dto, IcEventReplyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventReplyDTO dto) { + IcEventReplyEntity entity = ConvertUtils.sourceToTarget(dto, IcEventReplyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventScanTaskServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventScanTaskServiceImpl.java new file mode 100644 index 0000000000..43a03b4865 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventScanTaskServiceImpl.java @@ -0,0 +1,83 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventScanTaskDao; +import com.epmet.dto.IcEventScanTaskDTO; +import com.epmet.entity.IcEventScanTaskEntity; +import com.epmet.service.IcEventScanTaskService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事件附件安全校验任务表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Service +public class IcEventScanTaskServiceImpl extends BaseServiceImpl implements IcEventScanTaskService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcEventScanTaskDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcEventScanTaskDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcEventScanTaskDTO get(String id) { + IcEventScanTaskEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventScanTaskDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventScanTaskDTO dto) { + IcEventScanTaskEntity entity = ConvertUtils.sourceToTarget(dto, IcEventScanTaskEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventScanTaskDTO dto) { + IcEventScanTaskEntity entity = ConvertUtils.sourceToTarget(dto, IcEventScanTaskEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java new file mode 100644 index 0000000000..f3d8ebbcb9 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -0,0 +1,80 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcEventDao; +import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.entity.IcEventEntity; +import com.epmet.service.IcEventService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 事件管理表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-05-17 + */ +@Service +public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService { + + + @Override + public PageData list(IcEventListFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); + List list = null; + PageInfo pageInfo = new PageInfo<>(list); + if (!CollectionUtils.isEmpty(list)) {} + return new PageData<>(list, pageInfo.getTotal()); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcEventDTO get(String id) { + IcEventEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcEventDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcEventDTO dto) { + IcEventEntity entity = ConvertUtils.sourceToTarget(dto, IcEventEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcEventDTO dto) { + IcEventEntity entity = ConvertUtils.sourceToTarget(dto, IcEventEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml new file mode 100644 index 0000000000..c7479f2f96 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml new file mode 100644 index 0000000000..7198c5cfff --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml new file mode 100644 index 0000000000..85a4717acb --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml new file mode 100644 index 0000000000..2caf3ba943 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml new file mode 100644 index 0000000000..81991a3266 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml new file mode 100644 index 0000000000..ec954edfa2 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 86160bd88036a0647402538f1a490382dd724349 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 17 May 2022 16:56:45 +0800 Subject: [PATCH 002/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IcEventController.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 95df49df4c..e0c8ce8569 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -4,7 +4,6 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; 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; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -14,15 +13,10 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.excel.IcEventExcel; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Map; - /** * 事件管理表 @@ -76,11 +70,6 @@ public class IcEventController { return new Result(); } - @GetMapping("export") - public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = icEventService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, IcEventExcel.class); - } From 43203d76d1a3619fb00690344cbafa637719c3d3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 17 May 2022 17:30:12 +0800 Subject: [PATCH 003/147] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/ProjectManageListFormDTO.java | 43 ++++++++++ .../result/ProjectManageListResultDTO.java | 82 +++++++++++++++++++ .../epmet/controller/ProjectController.java | 14 ++++ .../main/java/com/epmet/dao/ProjectDao.java | 7 +- .../com/epmet/service/ProjectService.java | 8 ++ .../service/impl/ProjectServiceImpl.java | 51 ++++++++++++ .../src/main/resources/mapper/ProjectDao.xml | 25 ++++++ 7 files changed, 226 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java new file mode 100644 index 0000000000..7065f356c4 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java @@ -0,0 +1,43 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/5/17 14:14 + * @DESC + */ +@Data +public class ProjectManageListFormDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = -3317804468566708838L; + + public interface ProjectManageListForm{} + + /** + * 标题 + */ + private String title; + + /** + * 转项目开始日期,eg:20220505 + */ + private String startDate; + + /** + * 转项目结束日期,eg:20220505 + */ + private String endDate; + + /** + * all:全部,closed:已关闭,pending:待处理 + */ + @NotBlank(message = "status不能为空",groups = ProjectManageListForm.class) + private String status; + + private String userId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java new file mode 100644 index 0000000000..03d82753ec --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java @@ -0,0 +1,82 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/17 14:27 + * @DESC + */ +@Data +public class ProjectManageListResultDTO implements Serializable { + + private static final long serialVersionUID = 2374701362057175388L; + + /** + * 所顺网格 + */ + private String gridName; + private String gridId; + + /** + * 项目ID + */ + private String projectId; + + /** + * 项目标题 + */ + private String title; + + /** + * 转项目时间 + */ + private String shiftProjectTime; + + /** + * 项目方案 + */ + private String projectScheme; + + /** + * 内部备注 + */ + private String internalRemark; + + /** + * 滞留天数 + */ + private Integer detentionDays; + + /** + * 状态 + */ + private String status; + private String statusValue; + + /** + * 处理部门 + */ + private List departmentNameList; + + private Date updatedTime; + private String isHandle; + + public ProjectManageListResultDTO() { + this.gridName = ""; + this.title = ""; + this.shiftProjectTime = ""; + this.projectScheme = ""; + this.internalRemark = ""; + this.detentionDays = NumConstant.ZERO; + this.status = ""; + this.departmentNameList = new ArrayList<>(); + this.projectId = ""; + } +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 372ff5fb5c..e496dced52 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -336,4 +336,18 @@ public class ProjectController { public Result eventAuditReset(@RequestParam("gridId")String gridId){ return new Result().ok(projectService.eventAuditReset(gridId)); } + + /** + * Desc: 列表【项目管理】 + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2022/5/17 14:19 + */ + @PostMapping("project-list") + public Result projectList(@LoginUser TokenDto tokenDto,ProjectManageListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, ProjectManageListFormDTO.ProjectManageListForm.class); + formDTO.setUserId(tokenDto.getUserId()); + return new Result().ok(projectService.projectList(formDTO)); + } } \ 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 5d1a7d578e..6c5e253e06 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 @@ -21,10 +21,7 @@ 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; -import com.epmet.dto.form.PatrolProjectFormDTO; -import com.epmet.dto.form.ProjectListFromDTO; -import com.epmet.dto.form.ShiftProjectsFromDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.ProjectEntity; import org.apache.ibatis.annotations.Mapper; @@ -300,4 +297,6 @@ public interface ProjectDao extends BaseDao { */ Integer selectEventStatus(@Param("gridId") String gridId); + List getProjectManageList(ProjectManageListFormDTO formDTO); + } 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 d5f4ec3154..0f048acf8b 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 @@ -385,4 +385,12 @@ public interface ProjectService extends BaseService { */ ProjectAuditResetResultDTO eventAuditReset(String gridId); + /** + * Desc: 列表【项目管理】 + * @param formDTO + * @author zxc + * @date 2022/5/17 14:19 + */ + PageData projectList(ProjectManageListFormDTO formDTO); + } \ 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 a74ee75a3e..e107138a17 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 @@ -32,6 +32,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; @@ -3170,6 +3171,56 @@ public class ProjectServiceImpl extends BaseServiceImpl projectList(ProjectManageListFormDTO formDTO) { + PageData result = new PageData<>(new ArrayList<>(),NumConstant.ZERO); + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + List projectManageList = baseDao.getProjectManageList(formDTO); + if (CollectionUtils.isNotEmpty(projectManageList)){ + // 获取滞留天数 + Integer days = getDays(ConvertUtils.sourceToTarget(formDTO, ProjectListFromDTO.class)); + projectManageList.forEach(p -> { + // 所属网格赋值 + if (StringUtils.isNotBlank(p.getGridId())){ + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(p.getGridId()); + if (null == gridInfo){ + throw new EpmetException("未查询到网格信息"+p.getGridId()); + } + p.setGridName(gridInfo.getGridNamePath()); + } + // 获取当前处理部门 + List departmentNameList = new ArrayList<>(); + if (ProjectConstant.CLOSED.equals(p.getStatus())) { + p.setDepartmentNameList(departmentNameList); + p.setDetentionDays(NumConstant.ZERO); + } else { + ProjectDTO projectDTO = ConvertUtils.sourceToTarget(p, ProjectDTO.class); + projectDTO.setId(p.getProjectId()); + if (p.getIsHandle().equals("unhandled")){ + String detentionDays = getDetentionDays(projectDTO); + if (!ONE_DAY.equals(detentionDays) && Integer.parseInt(detentionDays) > days) { + p.setDetentionDays(Integer.valueOf(detentionDays)); + } else { + p.setDetentionDays(Integer.valueOf(detentionDays)); + } + } + departmentNameList = baseDao.selectDepartmentNameList(projectDTO); + p.setDepartmentNameList(departmentNameList); + } + }); + result.setTotal(projectManageList.size()); + result.setList(projectManageList); + } + return result; + } + /** * @Description 区间项目分类数量处理 * 查询的是时间段内的分类项目数,查询的时间 是传入一个日期,拼上时间,在进行比较大小 diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index bef089e81f..b1cc58e362 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -564,4 +564,29 @@ AND p.status = 'pending' ORDER BY psp.created_time, p.created_time ASC + + + \ No newline at end of file From 3594e0d9ed9bcdf9d1bf5730d241500b5eff21c5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 17 May 2022 17:39:30 +0800 Subject: [PATCH 004/147] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.22__add_project_and_process.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.22__add_project_and_process.sql diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.22__add_project_and_process.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.22__add_project_and_process.sql new file mode 100644 index 0000000000..aa58e9f0ae --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.22__add_project_and_process.sql @@ -0,0 +1,6 @@ + + +ALTER TABLE `project_process` ADD COLUMN `ASSISTANCE_UNIT_ID` VARCHAR(32) COMMENT '协办单位ID' AFTER `staff_id`; +ALTER TABLE `project_process` ADD COLUMN `ASSISTANCE_UNIT_TYPE` VARCHAR(1) COMMENT '协办单位类型,1社区自组织,2联建单位' AFTER `ASSISTANCE_UNIT_ID`; +ALTER TABLE `project` ADD COLUMN `GRID_ID` VARCHAR(32) DEFAULT'' COMMENT '网格ID' AFTER `AGENCY_ID`; + From da3c5a055ae2d3bd525780392b1f4d2077776881 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 17 May 2022 17:55:09 +0800 Subject: [PATCH 005/147] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=A2=9E=E5=8A=A0=E5=88=86=E7=B1=BB=EF=BC=9A=E6=96=87?= =?UTF-8?q?=E5=8C=96=E9=98=9F=E4=BC=8D=E6=A5=BC=E5=A7=94=E4=BC=9A=E8=80=81?= =?UTF-8?q?=E5=8F=8B=E4=BF=B1=E4=B9=90=E9=83=A8=E6=B2=BB=E5=AE=89=E5=B7=A1?= =?UTF-8?q?=E9=80=BB=E9=98=9F=E5=85=B6=E4=BB=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.16__self_org_category.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.16__self_org_category.sql diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.16__self_org_category.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.16__self_org_category.sql new file mode 100644 index 0000000000..4804535be7 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.16__self_org_category.sql @@ -0,0 +1,6 @@ +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526493468551626753', 'self_org_category', '社区自组织类别', '社区自组织类别:文化队伍、楼委会、老友俱乐部、治安巡逻队、其他', 1, 0, 0, '1', '2022-05-17 17:22:58', '1', '2022-05-17 17:22:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526495882432299010', 1526493468551626753, '楼委会', 'lwh', '0', '楼委会', 2, 0, 0, '1', '2022-05-17 17:32:34', '1', '2022-05-17 17:32:34'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526495969778679810', 1526493468551626753, '老友俱乐部', 'lyjlb', '0', '老友俱乐部', 3, 0, 0, '1', '2022-05-17 17:32:55', '1', '2022-05-17 17:32:55'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526496168622243842', 1526493468551626753, '其他', 'other', '0', '其他', 5, 0, 0, '1', '2022-05-17 17:33:42', '1', '2022-05-17 17:33:51'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526495766724034562', 1526493468551626753, '文化队伍', 'whdw', '0', '文化队伍', 1, 0, 0, '1', '2022-05-17 17:32:06', '1', '2022-05-17 17:32:40'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1526496054369402882', 1526493468551626753, '治安巡逻队', 'zaxld', '0', '治安巡逻队', 4, 0, 0, '1', '2022-05-17 17:33:15', '1', '2022-05-17 17:33:24'); \ No newline at end of file From eeb8afc950d634211664b1da96316d52395c2f2e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 17 May 2022 18:01:32 +0800 Subject: [PATCH 006/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventListFormDTO.java | 38 ++---- .../dto/result/IcEventListResultDTO.java | 117 ++++++++++++++++++ 2 files changed, 126 insertions(+), 29 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java index dd13a583fd..164439cb76 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -19,45 +19,32 @@ public class IcEventListFormDTO implements Serializable { /** * 所属小区ID */ - private String villageId; + private String sourceType; /** * 所属楼宇Id */ - private String buildId; + private String eventContent; /** * 单元id */ - private String unitId; - /** - * 所属家庭Id - */ - private String homeId; - /** - * 姓名 - */ private String name; /** - * 是否享受福利【否:0 是:1】 - */ - private String isWeifare; - /** - * 手机号 + * 所属家庭Id */ private String mobile; - /** - * 身份证号 - */ - private String idCard; /** * 起始迁入时间 */ - //@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private String startTime; /** * 终止迁入时间 */ - //@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private String endTime; + /** + * 手机号 + */ + private String status; + /** * 页码 */ @@ -68,15 +55,8 @@ public class IcEventListFormDTO implements Serializable { private Integer pageSize = 20; private Boolean isPage = true; + private String customerId; - private String moveInId; - /** - * 当前登录用户id - */ private String staffId; - /** - * 当前登录用户所属组织id - */ - private String agencyId; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index 47bedb0b7f..8cf25dde15 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -1,3 +1,120 @@ 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; + + +/** + * @Description 【迁入管理】列表--接口返参 + * @Author sun + */ +@Data public class IcEventListResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 迁入Id + */ + private String eventId; + /** + * 网格ID + */ + private String gridId; + /** + * 网格名称 + */ + private String gridName; + /** + * 所属小区ID + */ + private String eventContent; + /** + * 所属小区名称 + */ + private List imageList; + /** + * 所属小区名称 + */ + private List voiceList; + /** + * 所属楼宇Id + */ + private String sourceTypeName; + /** + * 所属楼宇名称 + */ + private String address; + /** + * 单元id + */ + private String name; + /** + * 单元名称 + */ + private String mobile; + /** + * 所属家庭Id + */ + private String satisfaction; + /** + * 所属家庭名称 + */ + private String isResiUser; + /** + * 所属家庭Id + */ + private String status; + /** + * 姓名 + */ + private String createdUserId; + + /** + * 迁入时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date inTime; + + /** + * 迁入原因 + */ + private String inReason; + + /** + * 来源地区编码 + */ + private String sourceAddressCode; + /** + * 来源地区编码全路径 + */ + private String sourceAddressPathCode; + /** + * 来源地区地址 + */ + private String sourceAddress; + + /** + * 迁移证号码 + */ + private String moveNumber; + + /** + * 户主姓名 + */ + private String householderName; + + /** + * 与户主关系[字典表] + */ + private String householderRelation; + + /** + * 与户主关系[字典表] + */ + private String householderRelationName; + +} From ec6d243707d1bdce52869a15ed9bf847c2800804 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 17 May 2022 18:03:19 +0800 Subject: [PATCH 007/147] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=B7=BB=E5=8A=A0=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.15__self_org_category.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql new file mode 100644 index 0000000000..4b02bfcfd2 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql @@ -0,0 +1,2 @@ +alter table ic_community_self_organization +add COLUMN CATEGORY_CODE VARCHAR(32) DEFAULT NULL COMMENT '分类,来源于字典表dictType=self_org_category;'; \ No newline at end of file From 6a3d4c9c91be1b6b91ebbc851246bfd45ef22cd8 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 17 May 2022 19:16:07 +0800 Subject: [PATCH 008/147] =?UTF-8?q?=E9=A1=B9=E7=9B=AEprocess=E5=BE=AE?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/PartyUnitListFormDTO.java | 27 ++++++++++++++++ .../dto/result/PartyUnitListResultDTO.java | 27 ++++++++++++++++ .../feign/EpmetHeartOpenFeignClient.java | 12 +++++++ .../EpmetHeartOpenFeignClientFallback.java | 8 +++++ .../controller/IcPartyUnitController.java | 31 +++++++++---------- .../java/com/epmet/dao/IcPartyUnitDao.java | 18 +++++++++++ .../com/epmet/service/IcPartyUnitService.java | 28 +++++++---------- .../service/impl/IcPartyUnitServiceImpl.java | 20 ++++++++++++ .../main/resources/mapper/IcPartyUnitDao.xml | 28 +++++++++++++++++ .../dto/result/ProcessListV2ResultDTO.java | 18 +++++++++++ .../gov-project/gov-project-server/pom.xml | 5 +++ .../service/impl/ProjectTraceServiceImpl.java | 26 ++++++++++++++++ .../resources/mapper/ProjectProcessDao.xml | 4 ++- 13 files changed, 217 insertions(+), 35 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java new file mode 100644 index 0000000000..d2b78256ff --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyUnitListFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/17 18:45 + * @DESC + */ +@Data +public class PartyUnitListFormDTO implements Serializable { + + private static final long serialVersionUID = 8059924463686783668L; + + /** + * 联建单位IDs + */ + private List partyUnitIds; + + /** + * 社区自组织IDs + */ + private List communitySelfIds; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java new file mode 100644 index 0000000000..c8244a0263 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/17 18:45 + * @DESC + */ +@Data +public class PartyUnitListResultDTO implements Serializable { + + private static final long serialVersionUID = 8059924463686783008L; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位名字 + */ + private String assistanceUnitName; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index 133cb6200c..29a60588a9 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -7,8 +7,10 @@ import com.epmet.dto.ActInfoDTO; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.IcResiDemandDictDTO; import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO; import com.epmet.feign.fallback.EpmetHeartOpenFeignClientFallbackFactory; @@ -19,6 +21,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import java.util.List; +import java.util.Map; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -107,4 +110,13 @@ public interface EpmetHeartOpenFeignClient { @PostMapping("/heart/icresidemanddict/demandoption") Result> getDemandOptions(); + + /** + * Desc: 获取联建单位名字 + * @param formDTO + * @author zxc + * @date 2022/5/17 17:53 + */ + @PostMapping("/heart/icpartyunit/getPartyUnitList") + Result> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index a0af921435..df9f67f0ff 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -8,13 +8,16 @@ import com.epmet.dto.ActInfoDTO; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.IcResiDemandDictDTO; import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO; import com.epmet.feign.EpmetHeartOpenFeignClient; import java.util.List; +import java.util.Map; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -108,4 +111,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli public Result> getDemandOptions() { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getDemandOptions", null); } + + @Override + public Result> getPartyUnitList(PartyUnitListFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getPartyUnitList", formDTO); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index 2d9ae33d75..d055a580eb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -1,20 +1,3 @@ -/** - * 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.rocketmq.messages.ServerSatisfactionCalFormDTO; @@ -36,9 +19,11 @@ import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.ImportTaskCommonFormDTO; import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.IcPartyUnitExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; @@ -57,6 +42,7 @@ import java.io.IOException; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -267,4 +253,15 @@ public class IcPartyUnitController { } } } + + /** + * Desc: 获取联建单位名字 + * @param formDTO + * @author zxc + * @date 2022/5/17 17:53 + */ + @PostMapping("/getPartyUnitList") + public Result> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO){ + return new Result>().ok(icPartyUnitService.getPartyUnitList(formDTO)); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java index faddda7644..6cc2e76293 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.tools.dto.result.OptionDataResultDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import org.apache.ibatis.annotations.Mapper; @@ -27,6 +28,7 @@ import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.List; +import java.util.Map; /** * 联建单位 @@ -66,4 +68,20 @@ public interface IcPartyUnitDao extends BaseDao { List getDistribution(@Param("agencyId")String agencyId); int updateSatisfaction(@Param("partyUnitId") String serverId, @Param("satisfaction") BigDecimal satisfaction); + + /** + * Desc: 获取联建单位名字 + * @param ids + * @author zxc + * @date 2022/5/17 17:53 + */ + List getPartyUnitList(@Param("ids") List ids); + + /** + * Desc: 获取社区自组织名字 + * @param ids + * @author zxc + * @date 2022/5/17 18:51 + */ + List getCommunitySelfList(@Param("ids") List ids); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index d8e5285297..e6d3857757 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -1,20 +1,3 @@ -/** - * 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; @@ -25,8 +8,10 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyUnitEntity; import org.springframework.web.multipart.MultipartFile; @@ -34,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; +import java.util.Map; /** * 联建单位 @@ -158,4 +144,12 @@ public interface IcPartyUnitService extends BaseService { void calPartyUnitSatisfation(ServerSatisfactionCalFormDTO formDTO); List queryListById(List partyUnitIds); + + /** + * Desc: 获取联建单位名字 + * @param formDTO + * @author zxc + * @date 2022/5/17 17:53 + */ + List getPartyUnitList(PartyUnitListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 3924261510..4c6e590798 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -51,8 +51,10 @@ import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.ImportTaskCommonFormDTO; import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.dto.form.PartyUnitFormDTO; +import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.PartyUnitDistributionResultDTO; +import com.epmet.dto.result.PartyUnitListResultDTO; import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.dto.result.demand.ServiceStatDTO; @@ -594,6 +596,24 @@ public class IcPartyUnitServiceImpl extends BaseServiceImplgetPartyUnitList(PartyUnitListFormDTO formDTO) { + List result = new ArrayList<>(); + if (CollectionUtils.isNotEmpty(formDTO.getPartyUnitIds())){ + result.addAll(baseDao.getPartyUnitList(formDTO.getPartyUnitIds())); + } + if (CollectionUtils.isNotEmpty(formDTO.getCommunitySelfIds())){ + result.addAll(baseDao.getCommunitySelfList(formDTO.getCommunitySelfIds())); + } + return result; + } + private String getServiceMatter(Map map, String matter) { List matters = Arrays.asList(matter.split(StrConstant.COLON)); List list = matters.stream().map(map::get).collect(Collectors.toList()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml index d7f02b7109..cd2dbda9ec 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -74,6 +74,34 @@ ID + + + + + + update ic_party_unit set SATISFACTION=#{satisfaction},UPDATED_TIME=NOW() diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java index cea1ce6288..22676c243a 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -53,6 +54,23 @@ public class ProcessListV2ResultDTO implements Serializable { * 内部备注 */ private String internalRemark; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + @JsonIgnore + private String assistanceUnitType; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位名字 + */ + private String assistanceUnitName; + /** * 子节点 */ diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index 5b54fd759d..a9db4bb0ad 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -24,6 +24,11 @@ epmet-third-client 2.0.0 + + com.epmet + epmet-heart-client + 2.0.0 + com.epmet epmet-commons-tools 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 7bf5b6e4df..40114f34a7 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 @@ -111,6 +111,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceS private BlockChainUploadService blockChainUploadService; @Autowired private YuShanSysApiService yuShanSysApiService; + @Autowired + private EpmetHeartOpenFeignClient heartOpenFeignClient; @Override @@ -240,6 +242,30 @@ public class ProjectTraceServiceImpl implements ProjectTraceS processList.forEach(p -> internalFiles.stream().filter(f -> p.getProcessId().equals(f.getProcessId())).forEach(f -> p.getInternalFile().add(f))); } } + // 协办单位名字赋值 协办单位类型,1社区自组织,2联建单位 + Map> groupByType = processList.stream().filter(p -> StringUtils.isNotBlank(p.getAssistanceUnitType())).collect(Collectors.groupingBy(ProcessListV2ResultDTO::getAssistanceUnitType)); + List oneType = groupByType.get(NumConstant.ONE_STR); + List twoType = groupByType.get(NumConstant.TWO_STR); + PartyUnitListFormDTO partyUnitListFormDTO = new PartyUnitListFormDTO(); + if (CollectionUtils.isNotEmpty(oneType)){ + partyUnitListFormDTO.setCommunitySelfIds(oneType.stream().map(m -> m.getAssistanceUnitId()).collect(Collectors.toList())); + } + if (CollectionUtils.isNotEmpty(twoType)){ + partyUnitListFormDTO.setPartyUnitIds(twoType.stream().map(m -> m.getAssistanceUnitId()).collect(Collectors.toList())); + } + Result> partyUnitListResult = heartOpenFeignClient.getPartyUnitList(partyUnitListFormDTO); + if (!partyUnitListResult.success()){ + throw new EpmetException("查询协办单位失败"); + } + if (CollectionUtils.isNotEmpty(partyUnitListResult.getData())){ + partyUnitListResult.getData().forEach(u -> { + processList.forEach(p -> { + if (u.getAssistanceUnitId().equals(p.getAssistanceUnitId())){ + p.setAssistanceUnitName(u.getAssistanceUnitName()); + } + }); + }); + } return processList; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml index 0e2a2e5b3d..8a774f3c21 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectProcessDao.xml @@ -95,7 +95,9 @@ DEPARTMENT_NAME, PUBLIC_REPLY, INTERNAL_REMARK, - IS_SEND + IS_SEND, + ASSISTANCE_UNIT_TYPE, + ASSISTANCE_UNIT_ID FROM project_process WHERE DEL_FLAG = '0' AND PROJECT_ID = #{projectId} From 1f1f93dbd73dd94b4fce4083f1b71cac8bc77228 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 17 May 2022 20:00:22 +0800 Subject: [PATCH 009/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/DictTypeEnum.java | 1 + .../epmet/dto/form/IcEventListFormDTO.java | 17 ++- .../dto/result/IcEventListResultDTO.java | 95 +++++++--------- .../gov-project/gov-project-server/pom.xml | 6 + .../main/java/com/epmet/dao/IcEventDao.java | 7 +- .../service/impl/IcEventServiceImpl.java | 54 ++++++++- .../resources/mapper/IcEventAttachmentDao.xml | 19 ---- .../resources/mapper/IcEventCategoryDao.xml | 14 --- .../src/main/resources/mapper/IcEventDao.xml | 106 ++++++++++++------ .../mapper/IcEventOperationLogDao.xml | 16 --- .../main/resources/mapper/IcEventReplyDao.xml | 14 --- .../resources/mapper/IcEventScanTaskDao.xml | 15 --- 12 files changed, 184 insertions(+), 180 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java index 6375462f14..da44078271 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -23,6 +23,7 @@ public enum DictTypeEnum { PATROL_WORK_TYPE("patrol_work_type", "例行工作分类", 13), GRID_TYPE("grid_type", "网格类型", 12), ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14), + IC_EVENT("ic_event","事件管理",19), ; private final String code; diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java index 164439cb76..eb00fcf44d 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -13,38 +13,37 @@ public class IcEventListFormDTO implements Serializable { private static final long serialVersionUID = 9156247659994638103L; /** - * 网格ID + * 所属网格 */ private String gridId; /** - * 所属小区ID + * 上报渠道 */ private String sourceType; /** - * 所属楼宇Id + * 事件内容 */ private String eventContent; /** - * 单元id + * 报事人 */ private String name; /** - * 所属家庭Id + * 手机号 */ private String mobile; /** - * 起始迁入时间 + * 起始上报时间yyyy-MM-dd HH:mm:ss */ private String startTime; /** - * 终止迁入时间 + * 终止上报时间yyyy-MM-dd HH:mm:ss */ private String endTime; /** - * 手机号 + * 状态【处理中:processing;已办结:closed_case】】 */ private String status; - /** * 页码 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index 8cf25dde15..3e01ff4144 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -1,10 +1,9 @@ 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; import java.util.List; @@ -17,7 +16,7 @@ public class IcEventListResultDTO implements Serializable { private static final long serialVersionUID = 1L; /** - * 迁入Id + * 事件Id */ private String eventId; /** @@ -25,96 +24,88 @@ public class IcEventListResultDTO implements Serializable { */ private String gridId; /** - * 网格名称 + * 所属网格 */ private String gridName; /** - * 所属小区ID + * 事件内容 */ private String eventContent; /** - * 所属小区名称 + * 图片[url集合] */ private List imageList; /** - * 所属小区名称 + * 音频[url集合] */ private List voiceList; /** - * 所属楼宇Id + * 上报渠道[字典表] + */ + private String sourceType; + /** + * 上报渠道 */ private String sourceTypeName; /** - * 所属楼宇名称 + * 地址 */ private String address; /** - * 单元id + * 报事人 */ private String name; /** - * 单元名称 + * 手机号 */ private String mobile; /** - * 所属家庭Id + * 群众满意度[满意度 - 不满意:bad、基本满意:good、非常满意:perfect] */ private String satisfaction; /** - * 所属家庭名称 + * 群众满意度[满意度 - 不满意:bad、基本满意:good、非常满意:perfect] */ - private String isResiUser; + private String satisfactionName; /** - * 所属家庭Id + * 上报时间 */ - private String status; + private String createdTime; /** - * 姓名 + * 状态【处理中:processing;已办结:closed_case】】 */ - private String createdUserId; - - /** - * 迁入时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") - private Date inTime; - - /** - * 迁入原因 - */ - private String inReason; - - /** - * 来源地区编码 - */ - private String sourceAddressCode; + private String status; /** - * 来源地区编码全路径 + * 状态【处理中:processing;已办结:closed_case】】 */ - private String sourceAddressPathCode; + private String statusName; /** - * 来源地区地址 + * 事件创建人 */ - private String sourceAddress; + private String createdUserId; /** - * 迁移证号码 + * 事件附件 */ - private String moveNumber; + @JsonIgnore + private List attachmentList; + @Data + public static class Attachment { + /** + * url + */ + private String url; - /** - * 户主姓名 - */ - private String householderName; + /** + * 附件类型 + */ + private String type; - /** - * 与户主关系[字典表] - */ - private String householderRelation; + /** + * 附件类型 + */ + private Integer duration; + } - /** - * 与户主关系[字典表] - */ - private String householderRelationName; } diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index a9db4bb0ad..6ded692a78 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -137,6 +137,12 @@ 2.0.0 compile + + com.epmet + epmet-admin-client + 2.0.0 + compile + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index f73270d115..1b3532ead4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -1,9 +1,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.entity.IcEventEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 事件管理表 * @@ -12,5 +16,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventDao extends BaseDao { - + + List icEventList(IcEventListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index f3d8ebbcb9..49a3d61286 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -3,24 +3,32 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.dto.form.FileCommonDTO; +import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcEventDao; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.AllGridsByUserIdResultDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcMoveInListResultDTO; import com.epmet.entity.IcEventEntity; +import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcEventService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; /** * 事件管理表 @@ -30,14 +38,50 @@ import java.util.Map; */ @Service public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService { + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private EpmetAdminOpenFeignClient adminOpenFeignClient; @Override public PageData list(IcEventListFormDTO formDTO) { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); - List list = null; + List list = baseDao.icEventList(formDTO); PageInfo pageInfo = new PageInfo<>(list); - if (!CollectionUtils.isEmpty(list)) {} + if (!CollectionUtils.isEmpty(list)) { + //查询网格名称(组织-网格) + List gridIds = list.stream().map(IcEventListResultDTO::getGridId).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList()); + Result> gridInfoRes = govOrgOpenFeignClient.getGridListByGridIds(gridIds); + List gridInfoList = gridInfoRes.success() && !org.apache.commons.collections4.CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); + Map gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName, (key1, key2) -> key2)); + + //与户主关系字典表数据 + Result> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT.getCode()); + Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); + + //封装数据 + for (IcEventListResultDTO dto : list) { + if (gridInfoMap.containsKey(dto.getGridId())) { + dto.setGridName(gridInfoMap.get(dto.getGridId())); + } + if (StringUtils.isNotBlank(dto.getSourceType())) { + dto.setSourceTypeName(statusMap.get(dto.getSourceType())); + } + //每个事件对应的图片数据 + List imageList = new ArrayList<>(); + List voiceList = new ArrayList<>(); + dto.getAttachmentList().forEach(file -> { + if ("image".equals(file.getType())) { + imageList.add(file.getUrl()); + } else if ("voice".equals(file.getType())) { + voiceList.add(file.getUrl()); + } + }); + dto.setImageList(imageList); + dto.setVoiceList(voiceList); + } + } return new PageData<>(list, pageInfo.getTotal()); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml index c7479f2f96..23437af527 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml @@ -3,25 +3,6 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml index 7198c5cfff..3e2471e5f9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml @@ -3,20 +3,6 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 85a4717acb..dfd598e067 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -3,42 +3,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml index 2caf3ba943..259d73aa3e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml @@ -3,22 +3,6 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml index 81991a3266..11d5ebf740 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml @@ -3,20 +3,6 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml index ec954edfa2..8e73ee8fee 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventScanTaskDao.xml @@ -3,21 +3,6 @@ - - - - - - - - - - - - - - - \ No newline at end of file From 74b68302edf39bac28e5f3787c7f9c9efcba68cf Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 17 May 2022 20:18:06 +0800 Subject: [PATCH 010/147] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AB=8B=E9=A1=B9+?= =?UTF-8?q?=E6=8A=A5=E4=BA=8B-=E7=AB=8B=E9=A1=B9=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=BD=91=E6=A0=BCID=EF=BC=8C=E5=8D=8F=E5=8A=9E=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=EF=BC=8C=20=E6=8A=A5=E4=BA=8B-=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E6=9C=89=E4=B8=AATODO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dataaggre/dto/govproject/ProjectDTO.java | 2 ++ .../dataaggre/dto/govproject/ProjectProcessDTO.java | 10 ++++++++++ .../com/epmet/dto/form/EventToProjectFormDTO.java | 10 ++++++++++ .../com/epmet/dto/form/ProjectApprovalFormDTO.java | 12 +++++++++++- .../com/epmet/dto/result/ProcessListV2ResultDTO.java | 2 ++ .../main/java/com/epmet/entity/ProjectEntity.java | 2 ++ .../java/com/epmet/entity/ProjectProcessEntity.java | 10 ++++++++++ .../epmet/service/impl/ProjectTraceServiceImpl.java | 8 ++++++++ 8 files changed, 55 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java index 1a7f37a932..7eae78be1d 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectDTO.java @@ -50,6 +50,8 @@ public class ProjectDTO implements Serializable { */ private String agencyId; + private String gridId; + /** * 来源:议题issue */ diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java index 8d566b72ef..1b8f73993b 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ProjectProcessDTO.java @@ -109,6 +109,16 @@ public class ProjectProcessDTO implements Serializable { */ private String costWorkdays; + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; + /** * 删除标识:0.未删除 1.已删除 */ 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 index 560ebfe2d8..ecc93498b7 100644 --- 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 @@ -94,4 +94,14 @@ public class EventToProjectFormDTO implements Serializable { private String app; private String client; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java index 0ce775f1ad..69676d8e14 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java @@ -73,7 +73,17 @@ public class ProjectApprovalFormDTO implements Serializable { /** * 网格ID */ - @NotBlank(message = "网格ID不能为空",groups = {AddGroup.class}) + @NotBlank(message = "网格ID不能为空",groups = {AddGroup.class,ProjectApprovalFormDTO.ApprovalCategory.class}) private String gridId; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java index 22676c243a..25d9dcebf7 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessListV2ResultDTO.java @@ -94,6 +94,8 @@ public class ProcessListV2ResultDTO implements Serializable { this.departmentName = ""; this.publicReply = ""; this.internalRemark = ""; + this.assistanceUnitName = ""; + this.assistanceUnitId = ""; this.publicFile = new ArrayList<>(); this.internalFile = new ArrayList<>(); this.subProcess = new ArrayList<>(); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java index 64ea885f2c..b5199a8392 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectEntity.java @@ -45,6 +45,8 @@ public class ProjectEntity extends BaseEpmetEntity { */ private String agencyId; + private String gridId; + /** * 来源:议题issue 项目立项:agency */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java index a67f6b7eee..78599eb5bf 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ProjectProcessEntity.java @@ -112,4 +112,14 @@ public class ProjectProcessEntity extends BaseEpmetEntity { */ private Integer isSend; + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; + } 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 40114f34a7..d597fedeff 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 @@ -408,6 +408,7 @@ public class ProjectTraceServiceImpl implements ProjectTraceS ProjectEntity projectEntity = new ProjectEntity(); projectEntity.setCustomerId(formDTO.getCustomerId()); projectEntity.setAgencyId(loginUser.getAgencyId()); + projectEntity.setGridId(formDTO.getGridId()); if (ProjectConstant.WORK_EVENT.equals(formDTO.getType())) { projectEntity.setOrigin(ProjectConstant.WORK_EVENT); projectEntity.setOriginId(formDTO.getGridId()); @@ -433,6 +434,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceS processEntity.setOperationName(ProjectConstant.OPERATION_PROJECT_APPROVAL); processEntity.setPublicReply(formDTO.getPublicReply()); processEntity.setInternalRemark(formDTO.getInternalRemark()); + processEntity.setAssistanceUnitType(formDTO.getAssistanceUnitType()); + processEntity.setAssistanceUnitId(formDTO.getAssistanceUnitId()); agencyDeptGrid.getAgencyList().forEach(agency -> { if (loginUser.getAgencyId().equals(agency.getId())) { processEntity.setDepartmentName(agency.getOrganizationName()); @@ -701,6 +704,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceS public EventToProjectResultDTO eventToProject(EventToProjectFormDTO formDTO) { //事件已经立项,不能重复操作 ResiEventEntity resiEventEntity=resiEventService.getById(formDTO.getEventId()); + //TODO 兼容新事件表 + String gridId = ""; if(null==resiEventEntity||resiEventEntity.getShiftProject()){ throw new RenException(EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getCode(),EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getMsg()); } @@ -745,6 +750,7 @@ public class ProjectTraceServiceImpl implements ProjectTraceS projectEntity.setOriginId(formDTO.getEventId()); projectEntity.setTitle(formDTO.getTitle()); projectEntity.setBackGround(formDTO.getPublicReply()); + projectEntity.setGridId(gridId); projectEntity.setStatus(ProjectConstant.PENDING); projectEntity.setOrgIdPath(loginUser.getOrgIdPath()); projectEntity.setLocateAddress(null == formDTO.getLocateAddress() ? "" : formDTO.getLocateAddress()); @@ -761,6 +767,8 @@ public class ProjectTraceServiceImpl implements ProjectTraceS processEntity.setOperationName(ProjectConstant.OPERATION_PROJECT_APPROVAL); processEntity.setPublicReply(formDTO.getPublicReply()); processEntity.setInternalRemark(formDTO.getInternalRemark()); + processEntity.setAssistanceUnitId(formDTO.getAssistanceUnitId()); + processEntity.setAssistanceUnitType(formDTO.getAssistanceUnitType()); agencyDeptGrid.getAgencyList().forEach(agency -> { if (loginUser.getAgencyId().equals(agency.getId())) { processEntity.setDepartmentName(agency.getOrganizationName()); From 68a27f1c68c26b27f79d8aaefaad6f694e1652ba Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Tue, 17 May 2022 20:34:12 +0800 Subject: [PATCH 011/147] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=A4=84=E7=90=86=E5=88=86=E6=9E=90-=E5=A4=84?= =?UTF-8?q?=E7=90=86=E7=8A=B6=E6=80=81=E6=AF=94=E4=BE=8B=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EventProcessAnalysisCommonFormDTO.java | 50 ++++++++++ .../dto/result/IcEventListResultDTO.java | 4 + .../result/ProcessStatusRatioResultDTO.java | 11 +++ .../epmet/controller/IcEventController.java | 22 +++++ .../main/java/com/epmet/dao/IcEventDao.java | 21 ++++- .../com/epmet/service/IcEventService.java | 4 + .../service/impl/IcEventServiceImpl.java | 91 ++++++++++++++++++- .../src/main/resources/mapper/IcEventDao.xml | 10 ++ 8 files changed, 211 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java new file mode 100644 index 0000000000..ca2bf433c2 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java @@ -0,0 +1,50 @@ +package com.epmet.dto.form; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.Date; + +/** + * 事件处理分析通用 + */ +@Data +public class EventProcessAnalysisCommonFormDTO { + + /** + * 处理状态比例查询 + */ + public interface ProcessStatusRatioQuery {} + + /** + * 要查询的组织ID + */ + @NotBlank(message = "组织ID为必填项", groups = { ProcessStatusRatioQuery.class }) + private String orgId; + + /** + * 组织类型。grid,agency + */ + @NotBlank(message = "组织类型为必填项", groups = { ProcessStatusRatioQuery.class }) + private String orgType; + + /** + * 查询起始时间 yyyy-MM-dd + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class }) + private Date queryStartTime; + + /** + * 查询截止时间 yyyy-MM-dd + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class }) + private Date queryEndTime; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index 47bedb0b7f..a262e832fc 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -1,3 +1,7 @@ package com.epmet.dto.result; +import java.io.Serializable; + public class IcEventListResultDTO implements Serializable { + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java new file mode 100644 index 0000000000..b166788691 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java @@ -0,0 +1,11 @@ +package com.epmet.dto.result; + +import lombok.Data; + +@Data +public class ProcessStatusRatioResultDTO { + private Long processingCount; + private Long closedCount; + private Double processingRatio; + private Double closedRatio; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index e0c8ce8569..008796b4c3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -11,12 +11,16 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.Date; + /** * 事件管理表 @@ -70,6 +74,24 @@ public class IcEventController { return new Result(); } + /** + * 处理状态比例查询 + * @param formDTO + * @return + */ + @PostMapping("processAnalysis/processStatusRatio") + public Result getProcessStatusRatio(@RequestBody EventProcessAnalysisCommonFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, EventProcessAnalysisCommonFormDTO.ProcessStatusRatioQuery.class); + + String orgId = formDTO.getOrgId(); + String orgType = formDTO.getOrgType(); + Date queryStartTime = formDTO.getQueryStartTime(); + Date queryEndTime = formDTO.getQueryEndTime(); + + ProcessStatusRatioResultDTO r = icEventService.getProcessStatusRatio(orgId, orgType, queryStartTime, queryEndTime); + return new Result().ok(r); + } + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index f73270d115..b9236e1aa5 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -1,8 +1,15 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; +import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; +import java.util.Map; /** * 事件管理表 @@ -12,5 +19,17 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventDao extends BaseDao { - + + /** + * 查询事件处理状态比例 + * @param gridPids + * @param queryStartTime + * @param queryEndTime + * @return List[Map<状态key:事件数量>] + */ + @MapKey("status") + List> getProcessStatusRatio(@Param("customerId") String customerId, + @Param("gridPids") String gridPids, + @Param("queryStartTime") Date queryStartTime, + @Param("queryEndTime") Date queryEndTime); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 4222b0b20c..ba68529bf1 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -5,8 +5,10 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; +import java.util.Date; import java.util.Map; /** @@ -66,4 +68,6 @@ public interface IcEventService extends BaseService { * @date 2022-05-17 */ void delete(String[] ids); + + ProcessStatusRatioResultDTO getProcessStatusRatio(String orgId, String orgType, Date queryStartTime, Date queryEndTime); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index f3d8ebbcb9..acfa82c3f6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -2,23 +2,40 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.EpmetRequestHolder; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcEventDao; +import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.AgencyInfoFormDTO; import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.AgencyInfoResultDTO; +import com.epmet.dto.result.GridInfoResultDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; +import com.epmet.feign.GovOrgFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcEventService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; import java.util.Arrays; +import java.util.Date; import java.util.List; import java.util.Map; @@ -29,8 +46,10 @@ import java.util.Map; * @since v1.0.0 2022-05-17 */ @Service -public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService { +public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService, ResultDataResolver { + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; @Override public PageData list(IcEventListFormDTO formDTO) { @@ -77,4 +96,74 @@ public class IcEventServiceImpl extends BaseServiceImpl> m = baseDao.getProcessStatusRatio(EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), gridPids, queryStartTime, queryEndTime); + + ProcessStatusRatioResultDTO r = new ProcessStatusRatioResultDTO(); + + BigDecimal processingCount = null; + BigDecimal closedCount = null; + BigDecimal processingRatio = null; + BigDecimal closedRatio = null; + + for (Map entry : m) { + if ("processing".equals(entry.get("status"))) { + processingCount = new BigDecimal(entry.get("eventCount")); + } else if ("closed_case".equals(entry.get("status"))) { + closedCount = new BigDecimal(entry.get("eventCount")); + } + } + + // 根据个数,计算比例 + BigDecimal total = processingCount.add(closedCount); + processingRatio = processingCount.divide(total, 2, BigDecimal.ROUND_HALF_UP); + closedRatio = new BigDecimal(1).subtract(processingRatio); + + r.setProcessingCount(processingCount.longValue()); + r.setClosedCount(closedCount.longValue()); + r.setProcessingRatio(processingRatio.doubleValue()); + r.setClosedRatio(closedRatio.doubleValue()); + + return r; + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 85a4717acb..6c46172fec 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -39,6 +39,16 @@ + \ No newline at end of file From a53c16f9188d2ce4ea1aa1fa07b6da987fd0faf3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 09:05:49 +0800 Subject: [PATCH 012/147] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=85=B3=E9=97=AD?= =?UTF-8?q?=EF=BC=8C=E6=B5=81=E8=BD=AC=EF=BC=8C=E5=93=8D=E5=BA=94=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8D=8F=E5=8A=9E=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/ProjectClosedFromDTO.java | 10 ++++++++++ .../com/epmet/dto/form/ProjectResponseFormDTO.java | 10 ++++++++++ .../main/java/com/epmet/dto/form/TransferFormDTO.java | 10 ++++++++++ .../epmet/service/impl/ProjectProcessServiceImpl.java | 2 ++ .../com/epmet/service/impl/ProjectServiceImpl.java | 4 ++++ 5 files changed, 36 insertions(+) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java index 75cf13e64e..28e6177189 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java @@ -55,4 +55,14 @@ public class ProjectClosedFromDTO implements Serializable { * 内部备注对应文件集合 */ private List internalFile; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectResponseFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectResponseFormDTO.java index 3f7f2a1c13..1562997afa 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectResponseFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectResponseFormDTO.java @@ -55,4 +55,14 @@ public class ProjectResponseFormDTO implements Serializable { */ private List internalFile; + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; + } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/TransferFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/TransferFormDTO.java index 4b9718122c..da8e7b8f3d 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/TransferFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/TransferFormDTO.java @@ -40,5 +40,15 @@ public class TransferFormDTO implements Serializable { * 内部备注对应文件集合 */ private List internalFile; + + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java index 902fb92e6f..2b51ec32ce 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java @@ -646,6 +646,8 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl NumConstant.ZERO) 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 e107138a17..d7ae034b35 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 @@ -709,6 +709,8 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Wed, 18 May 2022 09:41:37 +0800 Subject: [PATCH 013/147] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=B7=BB=E5=8A=A0=E5=88=86=E7=B1=BB,=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=AF=BC=E5=87=BA=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B7=B2=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/DictTypeEnum.java | 1 + .../AddCommunitySelfOrganizationFormDTO.java | 3 +++ .../EditCommunitySelfOrganizationFormDTO.java | 6 +++++ .../CommunitySelfOrganizationListDTO.java | 9 ++++++++ .../IcCommunitySelfOrganizationEntity.java | 5 +++++ .../ExportCommunitySelfOrganizationExcel.java | 3 +++ .../ImportCommunitySelfOrganization.java | 4 ++++ ...cCommunitySelfOrganizationServiceImpl.java | 21 ++++++++++++++++-- .../mapper/IcCommunitySelfOrganizationDao.xml | 1 + .../templates/self_org_import_template.xlsx | Bin 8929 -> 8959 bytes 10 files changed, 51 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java index 6375462f14..aa3ee12c48 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -23,6 +23,7 @@ public enum DictTypeEnum { PATROL_WORK_TYPE("patrol_work_type", "例行工作分类", 13), GRID_TYPE("grid_type", "网格类型", 12), ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14), + SELF_ORG_CATEGORY("self_org_category","社区自组织分类",15), ; private final String code; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java index 3a931390b8..c88f3a6192 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java @@ -26,6 +26,9 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { @NotBlank(message = "organizationName不能为空",groups = AddCommunitySelfOrganizationForm.class) private String organizationName; + @NotBlank(message = "分类不能为空", groups = AddCommunitySelfOrganizationForm.class) + private String categoryCode; + /** * 组织人数 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java index 32556b2c27..6c8eb94baa 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/EditCommunitySelfOrganizationFormDTO.java @@ -26,6 +26,12 @@ public class EditCommunitySelfOrganizationFormDTO implements Serializable { @NotBlank(message = "organizationName不能为空",groups = EditCommunitySelfOrganizationForm.class) private String organizationName; + /** + * 分类编码 + */ + @NotBlank(message = "categoryCode不能为空",groups = EditCommunitySelfOrganizationForm.class) + private String categoryCode; + /** * 组织人数 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java index b7a7627030..6ca4a94d25 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java @@ -33,6 +33,15 @@ public class CommunitySelfOrganizationListDTO implements Serializable { */ private String organizationName; + /** + * 分类,来源于字典表dictType=self_org_category; + */ + private String categoryCode; + /** + * 分类名称 + */ + private String categoryName; + /** * 服务事项 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java index 01db2e7108..0268a247fb 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcCommunitySelfOrganizationEntity.java @@ -67,6 +67,11 @@ public class IcCommunitySelfOrganizationEntity extends BaseEpmetEntity { */ private String organizationName; + /** + * 分类,来源于字典表dictType=self_org_category; + */ + private String categoryCode; + /** * 组织人数 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java index 140d821022..73e0747958 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ExportCommunitySelfOrganizationExcel.java @@ -15,6 +15,9 @@ public class ExportCommunitySelfOrganizationExcel { @Excel(name = "组织名称", width = 40, needMerge = true) private String organizationName; + @Excel(name = "分类", width = 40, needMerge = true) + private String categoryName; + @Excel(name = "组织人数", width = 20, needMerge = true) private Integer organizationPersonCount; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java index 10a10f21ad..a0e4133890 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/ImportCommunitySelfOrganization.java @@ -20,6 +20,10 @@ public class ImportCommunitySelfOrganization extends ExcelVerifyInfo { @NotBlank(message = "不能为空") private String organizationName; + @Excel(name = "分类", needMerge = true) + @NotBlank(message = "不能为空") + private String categoryCode; + @Excel(name = "组织人数", needMerge = true) //@NotNull(message = "不能为空") private Integer organizationPersonCount; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 1443592a16..d7e53e3483 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -12,6 +12,7 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; @@ -43,6 +44,7 @@ import com.epmet.entity.IcCommunitySelfOrganizationEntity; import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; import com.epmet.excel.CommunitySelfOrgImportExcel; import com.epmet.excel.ImportCommunitySelfOrganization; +import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.OssFeignClient; import com.epmet.service.IcCommunitySelfOrganizationPersonnelService; @@ -51,6 +53,7 @@ import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory; @@ -93,6 +96,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl page(Map params) { @@ -328,11 +333,16 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl resultDTOs = baseDao.selectCommunitySelfOrganizationList(formDTO); if (CollectionUtils.isNotEmpty(resultDTOs)){ + //获取分类名称字典 + Result> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + Map dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); result.setTotal(resultDTOs.size()); AtomicReference sort = new AtomicReference<>(NumConstant.ONE); for (CommunitySelfOrganizationListDTO r : resultDTOs) { r.setSort(sort.getAndSet(sort.get() + NumConstant.ONE)); r.setScore(null == pointMap.get(r.getOrgId()) ? NumConstant.ZERO : pointMap.get(r.getOrgId())); + //赋值分类名称 + r.setCategoryName(dictMap.get(r.getCategoryCode())); } result.setList(resultDTOs); } @@ -538,7 +548,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + Map categoryMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); list.forEach(l -> { IcCommunitySelfOrganizationEntity e = ConvertUtils.sourceToTarget(l, IcCommunitySelfOrganizationEntity.class); e.setCustomerId(tokenDto.getCustomerId()); @@ -547,7 +558,13 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl persons = new ArrayList<>(); AtomicReference bl = new AtomicReference<>(false); StringBuffer msg = new StringBuffer(""); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index 0903571a1a..872f404c8e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -46,6 +46,7 @@ \ No newline at end of file From 38f985fda787ba01df7f81328842313994894635 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 10:20:48 +0800 Subject: [PATCH 015/147] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=B7=BB=E5=8A=A0=E5=88=86=E7=B1=BB,=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=AF=BC=E5=87=BA=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B7=B2=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AddCommunitySelfOrganizationFormDTO.java | 16 ++++++++++------ .../IcCommunitySelfOrganizationServiceImpl.java | 10 +++++++--- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java index c88f3a6192..29a338232f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/AddCommunitySelfOrganizationFormDTO.java @@ -1,7 +1,9 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import com.epmet.dto.IcCommunitySelfOrganizationPersonnelDTO; import lombok.Data; +import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; @@ -18,12 +20,13 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { private static final long serialVersionUID = -4996925380900678065L; - public interface AddCommunitySelfOrganizationForm{} + public interface AddCommunitySelfOrganizationForm extends CustomerClientShowGroup {} /** * 组织名称 */ - @NotBlank(message = "organizationName不能为空",groups = AddCommunitySelfOrganizationForm.class) + @NotBlank(message = "组织名称不能为空",groups = AddCommunitySelfOrganizationForm.class) + @Length(max = 50,message = "组织名称最多输入50字",groups = AddCommunitySelfOrganizationForm.class) private String organizationName; @NotBlank(message = "分类不能为空", groups = AddCommunitySelfOrganizationForm.class) @@ -32,25 +35,25 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { /** * 组织人数 */ - @NotNull(message = "organizationPersonCount不能为空",groups = AddCommunitySelfOrganizationForm.class) + @NotNull(message = "组织人数不能为空",groups = AddCommunitySelfOrganizationForm.class) private Integer organizationPersonCount; /** * 负责人姓名 */ - @NotBlank(message = "principalName不能为空",groups = AddCommunitySelfOrganizationForm.class) + @NotBlank(message = "负责人不能为空",groups = AddCommunitySelfOrganizationForm.class) private String principalName; /** * 负责人电话 */ - @NotBlank(message = "principalPhone不能为空",groups = AddCommunitySelfOrganizationForm.class) + @NotBlank(message = "联系电话",groups = AddCommunitySelfOrganizationForm.class) private String principalPhone; /** * 服务事项 */ - @NotBlank(message = "serviceItem不能为空",groups = AddCommunitySelfOrganizationForm.class) + @NotBlank(message = "服务事项不能为空",groups = AddCommunitySelfOrganizationForm.class) private String serviceItem; /** @@ -66,6 +69,7 @@ public class AddCommunitySelfOrganizationFormDTO implements Serializable { /** * 经度 */ + @NotBlank(message = "位置坐标不能为空",groups = AddCommunitySelfOrganizationForm.class) private String longitude; /** diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index d7e53e3483..6e51228e0f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -318,6 +318,11 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + Map dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); + if (formDTO.getIsPage()){ PageInfo objectPageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectCommunitySelfOrganizationList(formDTO)); result.setTotal(Integer.valueOf(String.valueOf(objectPageInfo.getTotal()))); @@ -326,6 +331,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl resultDTOs = baseDao.selectCommunitySelfOrganizationList(formDTO); if (CollectionUtils.isNotEmpty(resultDTOs)){ - //获取分类名称字典 - Result> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); - Map dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); result.setTotal(resultDTOs.size()); AtomicReference sort = new AtomicReference<>(NumConstant.ONE); for (CommunitySelfOrganizationListDTO r : resultDTOs) { From 7ea5371a5bc81c7e971538a0e1bf4044b9911bc3 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 18 May 2022 10:30:29 +0800 Subject: [PATCH 016/147] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=A4=84=E7=90=86=E5=88=86=E6=9E=90-=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=88=97=E8=A1=A8=20=E4=BF=AE=E6=94=B9=EF=BC=9A?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=A4=84=E7=90=86=E5=88=86=E6=9E=90-?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E9=A5=BC=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/ProcessAnalysisEventListFormDTO.java | 47 +++++++ .../epmet/dto/result/IcEventResultDTO.java | 18 +++ .../epmet/enums/EcEventProcessStatusEnum.java | 40 ++++++ .../gov-project/gov-project-server/pom.xml | 5 + .../epmet/controller/IcEventController.java | 24 +++- .../main/java/com/epmet/dao/IcEventDao.java | 22 +++ .../com/epmet/service/IcEventService.java | 4 + .../service/impl/IcEventServiceImpl.java | 128 ++++++++++++------ .../src/main/resources/mapper/IcEventDao.xml | 40 +++++- 9 files changed, 285 insertions(+), 43 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventResultDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/enums/EcEventProcessStatusEnum.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java new file mode 100644 index 0000000000..c7b9026a65 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dto.form; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.Date; + +@Data +public class ProcessAnalysisEventListFormDTO { + + /** + * 组织id + */ + @NotBlank(message = "组织ID为必填项") + private String orgId; + /** + * 组织类型grid,agency + */ + @NotBlank(message = "组织类型为必填项") + private String orgType; + /** + * 查询起始时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项") + private Date queryStartTime; + + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项") + private Date queryEndTime; + + /** + * 处理状态processing, closed_case + */ + private String processStatus; + /** + * 事件分类code + */ + private String categoryCode; + private Integer pageNo; + private Integer pageSize; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventResultDTO.java new file mode 100644 index 0000000000..74ee36b9d4 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result; + +import lombok.Data; + +@Data +public class IcEventResultDTO { + private String eventId; + private String eventContent; + private String gridId; + private String gridName; + private String sourceType; + private String sourceTypeName; + private String processStatus; + private String processStatusName; + private String reportUserId; + private String reportUserName; + private String mobile; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/enums/EcEventProcessStatusEnum.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/enums/EcEventProcessStatusEnum.java new file mode 100644 index 0000000000..b0878ded9c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/enums/EcEventProcessStatusEnum.java @@ -0,0 +1,40 @@ +package com.epmet.enums; + +/** + * ic事件状态枚举 + */ +public enum EcEventProcessStatusEnum { + + PROCESSING("processing", "处理中"), + CLOSED_CASE("closed_case", "已完成"); + + private String processStatus; + private String processStatusName; + + EcEventProcessStatusEnum(String processStatus, String processStatusName) { + this.processStatus = processStatus; + this.processStatusName = processStatusName; + } + + /** + * 根据sourceType查询对应的枚举对象 + * @param processStatus + * @return + */ + public static EcEventProcessStatusEnum getObjectBySourceType(String processStatus) { + for (EcEventProcessStatusEnum e : EcEventProcessStatusEnum.values()) { + if (e.getProcessStatus().equals(processStatus)) { + return e; + } + } + return null; + } + + public String getProcessStatus() { + return processStatus; + } + + public String getProcessStatusName() { + return processStatusName; + } +} diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index a9db4bb0ad..375daa8dd2 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -137,6 +137,11 @@ 2.0.0 compile + + com.epmet + epmet-admin-client + 2.0.0 + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 008796b4c3..9d94d20e38 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -13,7 +13,9 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; @@ -75,7 +77,7 @@ public class IcEventController { } /** - * 处理状态比例查询 + * 事件分类分析-处理状态比例查询 * @param formDTO * @return */ @@ -92,6 +94,26 @@ public class IcEventController { return new Result().ok(r); } + /** + * 事件分类分析-事件列表 + * @param input + * @return + */ + @PostMapping("processAnalysis/eventList") + public Result> listProcessAnalysisEvents(@RequestBody ProcessAnalysisEventListFormDTO input) { + ValidatorUtils.validateEntity(input); + String orgId = input.getOrgId(); + String orgType = input.getOrgType(); + String categoryCode = input.getCategoryCode(); + Date queryStartTime = input.getQueryStartTime(); + Date queryEndTime = input.getQueryEndTime(); + Integer pageNo = input.getPageNo(); + Integer pageSize = input.getPageSize(); + String processStatus = input.getProcessStatus(); + PageData page = icEventService.listProcessAnalysisEvents(orgId, orgType, categoryCode, processStatus, queryStartTime, queryEndTime, pageNo, pageSize); + return new Result>().ok(page); + } + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index b9236e1aa5..f9cdf7beff 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -1,6 +1,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; import org.apache.ibatis.annotations.MapKey; @@ -29,7 +30,28 @@ public interface IcEventDao extends BaseDao { */ @MapKey("status") List> getProcessStatusRatio(@Param("customerId") String customerId, + @Param("orgType") String orgType, + @Param("orgId") String orgId, @Param("gridPids") String gridPids, @Param("queryStartTime") Date queryStartTime, @Param("queryEndTime") Date queryEndTime); + + /** + * 事件处理分析-时间列表 + * @param customerId + * @param gridPids + * @param categoryCode + * @param processStatus + * @param queryStartTime 包含 + * @param queryEndTime 包含 + * @return + */ + List listProcessAnalysisEvents(@Param("customerId") String customerId, + @Param("orgType") String orgType, + @Param("orgId") String orgId, + @Param("gridPids") String gridPids, + @Param("categoryCode") String categoryCode, + @Param("processStatus") String processStatus, + @Param("queryStartTime") Date queryStartTime, + @Param("queryEndTime") Date queryEndTime); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index ba68529bf1..e3ad6ba353 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; @@ -70,4 +71,7 @@ public interface IcEventService extends BaseService { void delete(String[] ids); ProcessStatusRatioResultDTO getProcessStatusRatio(String orgId, String orgType, Date queryStartTime, Date queryEndTime); + + PageData listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, Date queryStartTime, + Date queryEndTime, Integer pageNo, Integer pageSize); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index acfa82c3f6..5f7beffe5b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -9,20 +9,19 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.EpmetRequestHolder; -import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcEventDao; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.AgencyInfoFormDTO; import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.result.AgencyInfoResultDTO; -import com.epmet.dto.result.GridInfoResultDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; -import com.epmet.feign.GovOrgFeignClient; +import com.epmet.enums.EcEventProcessStatusEnum; +import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.IcEventService; import com.github.pagehelper.PageHelper; @@ -51,6 +50,9 @@ public class IcEventServiceImpl extends BaseServiceImpl list(IcEventListFormDTO formDTO) { PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); @@ -96,53 +98,51 @@ public class IcEventServiceImpl extends BaseServiceImpl> m = baseDao.getProcessStatusRatio(EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), gridPids, queryStartTime, queryEndTime); + List> m = baseDao.getProcessStatusRatio( + EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, queryStartTime, queryEndTime); ProcessStatusRatioResultDTO r = new ProcessStatusRatioResultDTO(); - BigDecimal processingCount = null; - BigDecimal closedCount = null; + BigDecimal processingCount = new BigDecimal(0); + BigDecimal closedCount = new BigDecimal(0);; BigDecimal processingRatio = null; BigDecimal closedRatio = null; @@ -166,4 +166,52 @@ public class IcEventServiceImpl extends BaseServiceImpl listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, + Date queryStartTime, Date queryEndTime, Integer pageNo, + Integer pageSize) { + + // 1.分类字典 + Map eventSourceTypeDict = getResultDataOrThrowsException(adminOpenFeignClient.dictMap("ic_event_source_type"), + ServiceConstant.EPMET_ADMIN_SERVER, + EpmetErrorCode.SERVER_ERROR.getCode(), + "【IC事件分析】查询上报渠道字典失败", + "【IC事件分析】查询上报渠道字典失败"); + + String gridPids = null; + if ("agency".equals(orgType)) { + gridPids = getEventGridPids(orgId); + } + + // 2.分页查询 + PageHelper.startPage(pageNo, pageSize); + List list = baseDao.listProcessAnalysisEvents( + EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, categoryCode, processStatus, queryStartTime + ,queryEndTime); + + // 3.补充数据 + for (IcEventResultDTO event : list) { + // 网格信息 + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(event.getGridId()); + if (gridInfo != null) { + event.setGridName(gridInfo.getGridName()); + } else { + logger.error("【IC事件分析】网格ID[{}]查询网格信息失败", event.getGridId()); + } + + // 上报渠道 + event.setSourceTypeName(eventSourceTypeDict.get(event.getSourceType())); + + // 状态 + EcEventProcessStatusEnum sourceTypeEnum = EcEventProcessStatusEnum.getObjectBySourceType(event.getProcessStatus()); + if (sourceTypeEnum != null) { + event.setProcessStatusName(sourceTypeEnum.getProcessStatusName()); + } + } + + PageInfo pageInfo = new PageInfo<>(list); + + return new PageData<>(list, pageInfo.getTotal()); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 6c46172fec..76202bb3fa 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -42,13 +42,49 @@ + + \ No newline at end of file From f2195b56c01a67b753b1b65b0c254852d73d7776 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 10:33:22 +0800 Subject: [PATCH 017/147] =?UTF-8?q?=E6=BB=A1=E6=84=8F=E5=BA=A6=E8=AF=84?= =?UTF-8?q?=E4=BB=B7=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SatisfactionEvaluationListFormDTO.java | 23 ++++++++++++ .../SatisfactionEvaluationListResultDTO.java | 35 +++++++++++++++++++ .../epmet/controller/ProjectController.java | 12 +++++++ .../dao/ProjectSatisfactionDetailDao.java | 13 ++++--- .../com/epmet/service/ProjectService.java | 25 +++++-------- .../service/impl/ProjectServiceImpl.java | 28 +++++++++++++-- .../mapper/ProjectSatisfactionDetailDao.xml | 12 +++++++ 7 files changed, 124 insertions(+), 24 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SatisfactionEvaluationListFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SatisfactionEvaluationListResultDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SatisfactionEvaluationListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SatisfactionEvaluationListFormDTO.java new file mode 100644 index 0000000000..3309a89426 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/SatisfactionEvaluationListFormDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/5/18 09:57 + * @DESC + */ +@Data +public class SatisfactionEvaluationListFormDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = 1790517675681175478L; + + public interface SatisfactionEvaluationListForm{} + + @NotBlank(message = "projectId不能为空",groups = SatisfactionEvaluationListForm.class) + private String projectId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SatisfactionEvaluationListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SatisfactionEvaluationListResultDTO.java new file mode 100644 index 0000000000..613449a6cf --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/SatisfactionEvaluationListResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/5/18 09:58 + * @DESC + */ +@Data +public class SatisfactionEvaluationListResultDTO implements Serializable { + + private static final long serialVersionUID = 4086193179665858119L; + + /** + * 评价人 + */ + private String evaluationUser; + + @JsonIgnore + private String userId; + + /** + * 评价时间 + */ + private String time; + + /** + * 评价内容 + */ + private String content; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index e1744afd2b..f76ac99242 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -351,4 +351,16 @@ public class ProjectController { formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(projectService.projectList(formDTO)); } + + /** + * Desc: 满意度评价列表 + * @param formDTO + * @author zxc + * @date 2022/5/18 10:03 + */ + @PostMapping("satisfaction-evaluation-list") + public Result> satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, SatisfactionEvaluationListFormDTO.SatisfactionEvaluationListForm.class); + return new Result>().ok(projectService.satisfactionEvaluationList(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionDetailDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionDetailDao.java index ca0c2a492e..a8f03be57e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionDetailDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectSatisfactionDetailDao.java @@ -20,10 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.ProjectEvaluationListFormDTO; import com.epmet.dto.form.ProjectInitEvaluationFormDTO; -import com.epmet.dto.result.EvaluationListResultDTO; -import com.epmet.dto.result.ProjectEvaluateDetailResultDTO; -import com.epmet.dto.result.ProjectEvaluateInfoResultDTO; -import com.epmet.dto.result.ProjectEvaluationListResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.ProjectSatisfactionDetailEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -69,4 +66,12 @@ public interface ProjectSatisfactionDetailDao extends BaseDao selectProjectEvaluateDetail(@Param("projectIds")List projectIds); + /** + * Desc: 满意度评价列表 + * @param projectId + * @author zxc + * @date 2022/5/18 10:03 + */ + List satisfactionEvaluationList(@Param("projectId")String projectId); + } 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 0f048acf8b..9b6dc38247 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 @@ -1,20 +1,3 @@ -/** - * 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; @@ -393,4 +376,12 @@ public interface ProjectService extends BaseService { */ PageData projectList(ProjectManageListFormDTO formDTO); + /** + * Desc: 满意度评价列表 + * @param formDTO + * @author zxc + * @date 2022/5/18 10:03 + */ + List satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); + } \ 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 5fbd58c5c1..32e62465a6 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 @@ -42,6 +42,7 @@ import com.epmet.commons.tools.utils.*; import com.epmet.constant.*; import com.epmet.dao.ProjectDao; import com.epmet.dao.ProjectOrgRelationDao; +import com.epmet.dao.ProjectSatisfactionDetailDao; import com.epmet.dao.ProjectSatisfactionStatisticsDao; import com.epmet.dto.*; import com.epmet.dto.form.*; @@ -96,8 +97,7 @@ import java.util.stream.Collectors; @Slf4j public class ProjectServiceImpl extends BaseServiceImpl implements ProjectService { private Logger logger = LogManager.getLogger(ProjectServiceImpl.class); - @Autowired - private ProjectRedis projectRedis; + @Autowired private CustomerProjectParameterService parameterService; @Autowired @@ -150,6 +150,8 @@ public class ProjectServiceImpl extends BaseServiceImpl satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) { + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> satisfactionDetailDao.satisfactionEvaluationList(formDTO.getProjectId())); + List result = pageInfo.getList(); + if (CollectionUtils.isNotEmpty(result)){ + Result> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(result.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList())); + if (!listResult.success()){ + throw new EpmetException("查询user信息失败..."); + } + listResult.getData().forEach(u -> result.stream().filter(r -> r.getUserId().equals(u.getUserId())).forEach(r -> r.setEvaluationUser(u.getRealName()))); + } + return result; + } + + /** * @Description 区间项目分类数量处理 * 查询的是时间段内的分类项目数,查询的时间 是传入一个日期,拼上时间,在进行比较大小 * @param categories diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionDetailDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionDetailDao.xml index 595060968d..7bfae0a648 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionDetailDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectSatisfactionDetailDao.xml @@ -75,4 +75,16 @@ ) + + + \ No newline at end of file From 28e317b39fd413517560482d6bf0463d1dffe1e1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 10:58:28 +0800 Subject: [PATCH 018/147] =?UTF-8?q?=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/ProjectController.java | 4 ++-- .../src/main/java/com/epmet/service/ProjectService.java | 2 +- .../java/com/epmet/service/impl/ProjectServiceImpl.java | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index f76ac99242..2f862559de 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -359,8 +359,8 @@ public class ProjectController { * @date 2022/5/18 10:03 */ @PostMapping("satisfaction-evaluation-list") - public Result> satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){ + public Result satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, SatisfactionEvaluationListFormDTO.SatisfactionEvaluationListForm.class); - return new Result>().ok(projectService.satisfactionEvaluationList(formDTO)); + return new Result().ok(projectService.satisfactionEvaluationList(formDTO)); } } \ No newline at end of file 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 9b6dc38247..7e86778fd0 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 @@ -382,6 +382,6 @@ public interface ProjectService extends BaseService { * @author zxc * @date 2022/5/18 10:03 */ - List satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); + PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); } \ 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 32e62465a6..6214f00200 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 @@ -3239,7 +3239,8 @@ public class ProjectServiceImpl extends BaseServiceImpl satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) { + public PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) { + PageData data = new PageData<>(new ArrayList<>(),NumConstant.ZERO); PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> satisfactionDetailDao.satisfactionEvaluationList(formDTO.getProjectId())); List result = pageInfo.getList(); if (CollectionUtils.isNotEmpty(result)){ @@ -3248,8 +3249,10 @@ public class ProjectServiceImpl extends BaseServiceImpl result.stream().filter(r -> r.getUserId().equals(u.getUserId())).forEach(r -> r.setEvaluationUser(u.getRealName()))); + data.setList(result); + data.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); } - return result; + return data; } /** From b6e8ec88b5575b662fce827029f5588a8805276d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 11:56:30 +0800 Subject: [PATCH 019/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/DictTypeEnum.java | 2 +- .../feign/EpmetHeartOpenFeignClient.java | 9 +- .../EpmetHeartOpenFeignClientFallback.java | 8 +- .../controller/ResiDemandController.java | 15 + .../main/java/com/epmet/dto/IcEventDTO.java | 5 + .../com/epmet/dto/IcEventOperationLogDTO.java | 23 +- .../com/epmet/dto/form/IcDemandFormDTO.java | 112 ++++++++ .../epmet/dto/form/IcEventAddEditFormDTO.java | 107 ++++++++ .../epmet/controller/IcEventController.java | 14 +- .../epmet/entity/IcEventAttachmentEntity.java | 12 +- .../java/com/epmet/entity/IcEventEntity.java | 5 + .../entity/IcEventOperationLogEntity.java | 23 +- .../com/epmet/service/IcEventService.java | 4 +- .../service/impl/IcEventServiceImpl.java | 257 ++++++++++++++++-- 14 files changed, 533 insertions(+), 63 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java index dd332d4b13..a813af8152 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java @@ -24,7 +24,7 @@ public enum DictTypeEnum { GRID_TYPE("grid_type", "网格类型", 12), ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14), SELF_ORG_CATEGORY("self_org_category","社区自组织分类",15), - IC_EVENT("ic_event","事件管理",19), + IC_EVENT_SOURCE_TYPE("ic_event_source_type","事件管理",19), ; private final String code; diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index 29a60588a9..a444c32e5b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -7,7 +7,9 @@ import com.epmet.dto.ActInfoDTO; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.IcDemandFormDTO; import com.epmet.dto.form.PartyUnitListFormDTO; +import com.epmet.dto.form.demand.DemandRecId; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; import com.epmet.dto.result.PartyUnitListResultDTO; @@ -21,7 +23,6 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import java.util.List; -import java.util.Map; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -119,4 +120,10 @@ public interface EpmetHeartOpenFeignClient { */ @PostMapping("/heart/icpartyunit/getPartyUnitList") Result> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO); + + /** + * @description 事件管理-转需求 + **/ + @PostMapping("/heart/residemand/iceventtodemand") + Result icEventToDemand(@RequestBody IcDemandFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index df9f67f0ff..4ffce2041b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -8,7 +8,9 @@ import com.epmet.dto.ActInfoDTO; import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.CommonCustomerFormDTO; +import com.epmet.dto.form.IcDemandFormDTO; import com.epmet.dto.form.PartyUnitListFormDTO; +import com.epmet.dto.form.demand.DemandRecId; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; import com.epmet.dto.result.PartyUnitListResultDTO; @@ -17,7 +19,6 @@ import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO; import com.epmet.feign.EpmetHeartOpenFeignClient; import java.util.List; -import java.util.Map; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -116,4 +117,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli public Result> getPartyUnitList(PartyUnitListFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getPartyUnitList", formDTO); } + + @Override + public Result queryUserVolunteerInfo(IcDemandFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventToDemand", formDTO); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java index b798d0fe0c..f152dd140f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java @@ -11,11 +11,14 @@ import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.enums.EventEnum; 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.validator.ValidatorUtils; import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserDemandConstant; +import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; +import com.epmet.dto.form.IcDemandFormDTO; import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.*; @@ -267,4 +270,16 @@ public class ResiDemandController { demandSatisfactionService.evaluateDemandAuto(formDTO); return new Result(); } + + /** + * 事件管理-转需求 + * + * @return + */ + @PostMapping("iceventtodemand") + public Result icEventToDemand(@RequestBody IcDemandFormDTO formDTO) { + ReportDemandFormDTO dto = ConvertUtils.sourceToTarget(formDTO, ReportDemandFormDTO.class); + return new Result().ok(icUserDemandRecService.saveOrUpdateDemand(dto)); + } + } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java index 7233e80a75..fb86222967 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java @@ -66,6 +66,11 @@ public class IcEventDTO implements Serializable { */ private String sourceType; + /** + * 发生时间 + */ + private Date happenTime; + /** * 事件内容 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java index db707294fc..ebe242b7ff 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java @@ -43,23 +43,22 @@ public class IcEventOperationLogDTO implements Serializable { /** * 1、发布事件:add - 2、复:reply; -3、立项:shift_project; -4、转需求:shift_demand -5、办结:close_case; - - + * 2、复:reply; + * 3、立项:shift_project; + * 4、转需求:shift_demand + * 5、办结:close_case; */ private String actionCode; /** * 1、发布事件:publish; -2、撤回事件:recall; -3、复:reply; -4、立项:shift_project; -5、办结:close_case; -6、选择是否已解决:choose_resolve; -7、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + * 2、撤回事件:recall; + * 3、复:reply; + * 4、立项:shift_project; + * 5、转需求: shift_demand; + * 6、办结:close_case; + * 7、选择是否已解决:choose_resolve; + * 8、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; */ private String actionDesc; diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java new file mode 100644 index 0000000000..657bea778f --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java @@ -0,0 +1,112 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; + + +/** + * 居民端-上报需求,或者修改需求 + */ +@Data +public class IcDemandFormDTO implements Serializable { + private static final long serialVersionUID = -2931148629441558468L; + + public interface Add extends CustomerClientShowGroup { + } + + public interface AddInternalGroup { + } + + public interface Update extends CustomerClientShowGroup { + } + + public interface UpdateInternalGroup { + } + + @NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class) + private String demandRecId; + + @NotBlank(message = "customerId不能为空", groups = {AddInternalGroup.class, UpdateInternalGroup.class}) + private String customerId; + + /** + * 网格id + */ + @NotBlank(message = "所属网格不能为空",groups = {AddInternalGroup.class}) + private String gridId; + + /** + * 需求内容1000字 + */ + @NotBlank(message = "需求内容不能为空", groups = {Add.class, Update.class}) + @Length(max = 1000, message = "需求内容至多输入1000字", groups = {Add.class, Update.class}) + private String content; + + /** + * 二级需求分类编码 + */ + @NotBlank(message = "需求类别不能为空",groups = Add.class) + private String categoryCode; + + /** + * 父级需求分类编码 + */ + @NotBlank(message = "父级分类不能为空",groups = Add.class) + private String parentCode; + + + /** + * 希望服务时间 + */ + @NotNull(message = "服务时间不能为空",groups = {Add.class, Update.class}) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date wantServiceTime; + + /** + * 需求人:user.id或者ic_resi_user.id + */ + @NotBlank(message = "需求人不能为空",groups ={AddInternalGroup.class, UpdateInternalGroup.class}) + private String demandUserId; + + /** + * 需求人联系姓名 + */ + @NotBlank(message = "联系人不能为空",groups = {Add.class, Update.class}) + private String demandUserName; + + /** + * 需求人联系电话 + */ + @NotBlank(message = "联系电话不能为空",groups = {Add.class, Update.class}) + private String demandUserMobile; + + /** + * 服务地点,工作端指派默认居民居住房屋地址,居民端地图选择 + */ + @NotBlank(message = "服务地点不能为空",groups = {Add.class, Update.class}) + private String serviceLocation; + + /** + * 门牌号详细地址 + */ + @Length(max = 200, message = "门牌号至多输入200字", groups = {Add.class, Update.class}) + private String locationDetail; + + /** + * 经度,需求人是ic的居民时,取所住楼栋的中心点位 + */ + private String longitude; + + /** + * 纬度,需求人是ic的居民时,取所住楼栋的中心点位 + */ + private String latitude; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java new file mode 100644 index 0000000000..b3fd086a1c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java @@ -0,0 +1,107 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.AddGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Description 事件管理新增 + * @Author sun + */ +@Data +public class IcEventAddEditFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 网格ID + */ + @NotBlank(message = "网格ID不能为空", groups = {AddGroup.class}) + private String gridId; + /** + * 报事人Id + */ + private String reportUserId; + /** + * 报事人姓名 + */ + @NotBlank(message = "报事人不能为空", groups = {AddGroup.class}) + private String name; + /** + * 手机号 + */ + @Length(max = 11, message = "手机号位数不能超过11位", groups = AddGroup.class) + private String mobile; + /** + * 身份证号 + */ + @NotBlank(message = "身份证号不能为空", groups = {AddGroup.class}) + @Length(min = 15, max = 18, message = "身份证号位数不正确", groups = AddGroup.class) + private String idCard; + /** + * 反映渠道 + */ + @NotBlank(message = "反映渠道不能为空", groups = {AddGroup.class}) + private String sourceType; + /** + * 事件内容 + */ + @NotBlank(message = "事件内容不能为空", groups = {AddGroup.class}) + private String eventContent; + /** + * 图片集合 + */ + private List imageList; + /** + * 二类分类Id + */ + private List categoryList; + /** + * 事件地址 + */ + //@NotBlank(message = "事件地址不能为空", groups = {AddGroup.class}) + private String address; + /** + * 经度 + */ + private String latitude; + /** + * 维度 + */ + private String longitude; + /** + * 处理方式[0:已回复 1:已转项目 1:已转需求] + */ + private String operationType; + /** + * 项目、需求ID + */ + private String operationId; + /** + * 回复内容 + */ + private String content; + /** + * 处理中:processing;已办结:closed_case + */ + private String status; + /** + * 立项接口入参对象 + */ + private EventToProjectFormDTO project; + /** + * 转需求接口入参对象 + */ + private IcDemandFormDTO demand; + + + private String customerId; + private String userId; + private String app; + private String client; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 9d94d20e38..e1bdaca91a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -12,6 +12,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; +import com.epmet.dto.form.IcEventAddEditFormDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; @@ -51,11 +52,14 @@ public class IcEventController { } @NoRepeatSubmit - @PostMapping("save") - public Result save(@RequestBody IcEventDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icEventService.save(dto); + @PostMapping("add") + public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcEventAddEditFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, AddGroup.class, DefaultGroup.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setApp(tokenDto.getApp()); + formDTO.setClient(tokenDto.getClient()); + icEventService.save(formDTO); return new Result(); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java index 3f9534982f..a5efd1f853 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventAttachmentEntity.java @@ -58,12 +58,12 @@ public class IcEventAttachmentEntity extends BaseEpmetEntity { /** * 附件状态(审核中:auditing; -auto_passed: 自动通过; -review:结果不确定,需要人工审核; -block: 结果违规; -rejected:人工审核驳回; -approved:人工审核通过) -现在图片是同步审核的,所以图片只有auto_passed一种状态 + auto_passed: 自动通过; + review:结果不确定,需要人工审核; + block: 结果违规; + rejected:人工审核驳回; + approved:人工审核通过) + 现在图片是同步审核的,所以图片只有auto_passed一种状态 */ private String status; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java index 58dd68e144..e33765e233 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -66,6 +66,11 @@ public class IcEventEntity extends BaseEpmetEntity { */ private String sourceType; + /** + * 发生时间 + */ + private Date happenTime; + /** * 事件内容 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java index a3cdf53b51..c9c08f1951 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java @@ -43,23 +43,22 @@ public class IcEventOperationLogEntity extends BaseEpmetEntity { /** * 1、发布事件:add - 2、复:reply; -3、立项:shift_project; -4、转需求:shift_demand -5、办结:close_case; - - + * 2、复:reply; + * 3、立项:shift_project; + * 4、转需求:shift_demand + * 5、办结:close_case; */ private String actionCode; /** * 1、发布事件:publish; -2、撤回事件:recall; -3、复:reply; -4、立项:shift_project; -5、办结:close_case; -6、选择是否已解决:choose_resolve; -7、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + * 2、撤回事件:recall; + * 3、复:reply; + * 4、立项:shift_project; + * 5、转需求: shift_demand; + * 6、办结:close_case; + * 7、选择是否已解决:choose_resolve; + * 8、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; */ private String actionDesc; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index e3ad6ba353..ae4550c76e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -3,6 +3,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; +import com.epmet.dto.form.IcEventAddEditFormDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventResultDTO; @@ -10,7 +11,6 @@ import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; import java.util.Date; -import java.util.Map; /** * 事件管理表 @@ -48,7 +48,7 @@ public interface IcEventService extends BaseService { * @author generator * @date 2022-05-17 */ - void save(IcEventDTO dto); + void save(IcEventAddEditFormDTO dto); /** * 默认更新 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index d081e4322e..9f28ccdded 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -4,49 +4,54 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; -import com.epmet.commons.tools.dto.form.FileCommonDTO; -import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; +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.utils.ConvertUtils; import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.dao.IcEventDao; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.AgencyInfoFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.form.demand.DemandRecId; import com.epmet.dto.result.*; -import com.epmet.dto.result.AllGridsByUserIdResultDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcMoveInListResultDTO; -import com.epmet.entity.IcEventEntity; +import com.epmet.entity.*; import com.epmet.enums.EcEventProcessStatusEnum; import com.epmet.feign.EpmetAdminOpenFeignClient; +import com.epmet.feign.EpmetHeartOpenFeignClient; +import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; -import com.epmet.feign.EpmetAdminOpenFeignClient; -import com.epmet.feign.GovOrgOpenFeignClient; -import com.epmet.service.IcEventService; +import com.epmet.resi.group.constant.TopicConstant; +import com.epmet.service.*; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.collections4.MapUtils; 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.math.BigDecimal; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; import java.util.*; +import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; /** @@ -58,11 +63,31 @@ import java.util.stream.Collectors; @Service public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService, ResultDataResolver { + @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 EpmetAdminOpenFeignClient adminOpenFeignClient; + @Autowired + private ProjectTraceService projectTraceService; + @Autowired + private EpmetHeartOpenFeignClient epmetHeartOpenFeignClient; + @Autowired + private GovIssueOpenFeignClient govIssueOpenFeignClient; + @Autowired + private IcEventAttachmentService icEventAttachmentService; + @Autowired + private IcEventCategoryService icEventCategoryService; + @Autowired + private IcEventReplyService icEventReplyService; + @Autowired + private IcEventOperationLogService icEventOperationLogService; + @Override public PageData list(IcEventListFormDTO formDTO) { @@ -77,7 +102,7 @@ public class IcEventServiceImpl extends BaseServiceImpl gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName, (key1, key2) -> key2)); //与户主关系字典表数据 - Result> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT.getCode()); + Result> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT_SOURCE_TYPE.getCode()); Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); //封装数据 @@ -105,8 +130,8 @@ public class IcEventServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); @@ -122,9 +147,193 @@ public class IcEventServiceImpl extends BaseServiceImpl 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()); + } + } + } + //图片内容 + if (!CollectionUtils.isEmpty(formDTO.getImageList())) { + ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); + formDTO.getImageList().forEach(imgUrl -> { + ImgTaskDTO task = new ImgTaskDTO(); + task.setDataId(UUID.randomUUID().toString().replace("-", "")); + task.setUrl(imgUrl); + imgScanParamDTO.getTasks().add(task); + }); + Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); + if (!imgScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!imgScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode(), EpmetErrorCode.IMG_SCAN_FAILED.getMsg()); + } + } + } + + //2.判断是否立项或转需求 + //2-1.项目立项 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "1".equals(formDTO.getOperationType())) { + EventToProjectResultDTO project = projectTraceService.eventToProject(formDTO.getProject()); + formDTO.setOperationId(project.getProjectId()); + } + //2-2.转需求 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "2".equals(formDTO.getOperationType())) { + IcDemandFormDTO dto = formDTO.getDemand(); + //需求人默认是当前用户id + dto.setDemandUserId(formDTO.getUserId()); + dto.setCustomerId(formDTO.getCustomerId()); + Result recIdResult = epmetHeartOpenFeignClient.icEventToDemand(dto); + if (!recIdResult.success() || recIdResult.getData() == null) { + throw new RenException(recIdResult.getCode(), recIdResult.getMsg()); + } + formDTO.setOperationId(recIdResult.getData().getDemandRecId()); + } + + //3.新增事件数据、附件数据、分类数据、回复数据、操作记录数据 + //3-1.事件数据保存 + IcEventEntity entity = ConvertUtils.sourceToTarget(formDTO, IcEventEntity.class); + entity.setAgencyId(gridInfo.getPid()); + entity.setGridPids(gridInfo.getPids()); insert(entity); + //3-2.附件数据保存 + List imageEntityList = new ArrayList<>(); + if (!CollectionUtils.isEmpty(formDTO.getImageList())) { + int sort = 0; + for (String url : formDTO.getImageList()) { + IcEventAttachmentEntity attachment = new IcEventAttachmentEntity(); + attachment.setCustomerId(formDTO.getCustomerId()); + attachment.setAttachmentUrl(url); + attachment.setIcEventId(entity.getId()); + attachment.setCreatedBy(formDTO.getUserId()); + attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); + attachment.setSort(sort++); + attachment.setAttachmentType("image"); + attachment.setStatus(TopicConstant.AUTO_PASSED); + imageEntityList.add(attachment); + } + icEventAttachmentService.insertBatch(imageEntityList); + } + + //3-3.分类数据保存 + if (!CollectionUtils.isEmpty(formDTO.getCategoryList())) { + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), formDTO.getCategoryList()); + AtomicReference categoryEntity = null; + category.getCategoryList().forEach(ca -> { + if (ca.getId().equals(formDTO.getCategoryList().get(0))) { + categoryEntity.set(new IcEventCategoryEntity()); + categoryEntity.get().setCustomerId(formDTO.getCustomerId()); + categoryEntity.get().setIcEventId(entity.getId()); + categoryEntity.get().setCategoryId(ca.getId()); + categoryEntity.get().setCategoryPids(ca.getPids()); + categoryEntity.get().setCategoryCode(ca.getCategoryCode()); + } + }); + if (categoryEntity.get() != null) { + icEventCategoryService.insert(categoryEntity.get()); + } + + } + //3-4.操作记录数据保存 + List logList = new ArrayList<>(); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), new Date(), "add", "publish")); + + Date date = new Date(); + //3-5.回复数据保存 + if (StringUtils.isNotBlank(formDTO.getContent())) { + IcEventReplyEntity replyEntity = new IcEventReplyEntity(); + replyEntity.setCustomerId(formDTO.getCustomerId()); + replyEntity.setIcEventId(entity.getId()); + replyEntity.setFromUserId(formDTO.getUserId()); + replyEntity.setContent(formDTO.getContent()); + replyEntity.setUserShowName(staffInfo.getAgencyName() + "-" + staffInfo.getRealName()); + icEventReplyService.insert(replyEntity); + //回复对应的操作记录 + date.setTime(date.getTime() + 6000 * 1); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "reply", "reply")); + } + //立项对应的操作记录 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "1".equals(formDTO.getOperationType())) { + date.setTime(date.getTime() + 6000 * 1); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "shift_project", "shift_project")); + } + //转需求对应的操作记录 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "2".equals(formDTO.getOperationType())) { + date.setTime(date.getTime() + 6000 * 1); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "shift_demand", "shift_demand")); + } + //选择了已完成 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())) { + date.setTime(date.getTime() + 6000 * 1); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "close_case", "close_case")); + } + icEventOperationLogService.insertBatch(logList); + } + + /** + * 根据分类Id集合查询对应数据信息 + * + * @return + */ + private CategoryTagResultDTO queryCategory(String customerId, List categoryIdList) { + CategoryTagListFormDTO categoryTag = new CategoryTagListFormDTO(); + categoryTag.setCustomerId(customerId); + categoryTag.setCategoryIdList(categoryIdList); + Result resultDTOResult = govIssueOpenFeignClient.getCategoryTagList(categoryTag); + if (!resultDTOResult.success()) { + throw new RenException("项目立项,调用issue服务查询分类、标签基础信息失败"); + } + return resultDTOResult.getData(); + } + + /** + * 事件管理操作日志记录 + * + * @return + */ + private IcEventOperationLogEntity logEntity(String customerId, String icEventId, String userId, Date date, String actionCode, String actionDesc) { + IcEventOperationLogEntity logEntity = new IcEventOperationLogEntity(); + logEntity.setCustomerId(customerId); + logEntity.setIcEventId(icEventId); + logEntity.setUserId(userId); + logEntity.setUserIdentity("staff"); + logEntity.setActionCode(actionCode); + logEntity.setActionDesc(actionDesc); + logEntity.setOperateTime(date); + return logEntity; } @Override @@ -143,6 +352,7 @@ public class IcEventServiceImpl extends BaseServiceImpl list = baseDao.listProcessAnalysisEvents( EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, categoryCode, processStatus, queryStartTime - ,queryEndTime); + , queryEndTime); // 3.补充数据 for (IcEventResultDTO event : list) { From a73101fe1b5f8b3e866570cf6fc2c1a30eaf5037 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 13:14:43 +0800 Subject: [PATCH 020/147] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...CommunitySelfOrganizationPersonnelDTO.java | 8 +++ .../dto/form/CategorySelfOrgFormDTO.java | 33 +++++++++ .../CommunitySelfOrganizationListFormDTO.java | 2 + .../result/SelfOrgCategoryTotalResDTO.java | 20 ++++++ ...IcCommunitySelfOrganizationController.java | 43 ++++++++++++ .../dao/IcCommunitySelfOrganizationDao.java | 8 +++ .../IcCommunitySelfOrganizationService.java | 29 ++++++-- ...cCommunitySelfOrganizationServiceImpl.java | 70 +++++++++++++++++-- .../mapper/IcCommunitySelfOrganizationDao.xml | 62 +++++++++++++++- 9 files changed, 266 insertions(+), 9 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java index f74f2697e9..95ad773777 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcCommunitySelfOrganizationPersonnelDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -42,6 +43,7 @@ public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable { /** * 客户ID */ + @JsonIgnore private String customerId; /** @@ -62,31 +64,37 @@ public class IcCommunitySelfOrganizationPersonnelDTO implements Serializable { /** * */ + @JsonIgnore private Integer delFlag; /** * 乐观锁 */ + @JsonIgnore private String revision; /** * 创建人 */ + @JsonIgnore private String createdBy; /** * 创建时间 */ + @JsonIgnore private Date createdTime; /** * 更新人 */ + @JsonIgnore private String updatedBy; /** * 更新时间 */ + @JsonIgnore private Date updatedTime; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java new file mode 100644 index 0000000000..bdfa1825f6 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CategorySelfOrgFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +@Data +public class CategorySelfOrgFormDTO extends PageFormDTO implements Serializable { + /** + * 默认展示全部,此列可空 + */ + private String categoryCode; + + /** + * token中获取 + */ + @NotBlank(message = "customerId不能为空",groups = PageFormDTO.AddUserInternalGroup.class) + private String customerId; + /** + * token中获取 + */ + @NotBlank(message = "staffId不能为空",groups = PageFormDTO.AddUserInternalGroup.class) + private String staffId; + + /** + * 当前登录用户所属组织id + */ + private String agencyId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java index 5d634afaa3..7a8fba0899 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java @@ -48,4 +48,6 @@ public class CommunitySelfOrganizationListFormDTO implements Serializable { private Integer ranking; private String remark; + + private String categoryCode; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java new file mode 100644 index 0000000000..b79436c9d0 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 多元主体分析-社区自组织饼图 + */ +@Data +public class SelfOrgCategoryTotalResDTO implements Serializable { + + private String categoryCode; + private String categoryName; + /** + * 当前分类下的社区自组织数量 + */ + private Integer total; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index 9df5db60c2..399e9c7e81 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -34,8 +34,10 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; +import com.epmet.dto.result.SelfOrgCategoryTotalResDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.ExportCommunitySelfOrganizationExcel; import com.epmet.excel.IcCommunitySelfOrganizationExcel; @@ -281,4 +283,45 @@ public class IcCommunitySelfOrganizationController { ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.AddUserInternalGroup.class); return new Result>().ok(icCommunitySelfOrganizationService.queryServiceList(formDTO)); } + + /** + * 多元主体分析-各分类下的社区自组织数量饼图 + * + * @param tokenDto + * @return + */ + @PostMapping("/total-pie") + public Result> totalPie(@LoginUser TokenDto tokenDto) { + return new Result>().ok(icCommunitySelfOrganizationService.querySelfOrgCategoryTotal(tokenDto.getCustomerId(), tokenDto.getUserId())); + } + + /** + * 多元主体分析-分类下的社区自组织列表 + * + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("/category-list") + public Result> queryCategoryList(@LoginUser TokenDto tokenDto, @RequestBody CategorySelfOrgFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + formDTO.setIsPage(true); + return new Result>().ok(icCommunitySelfOrganizationService.queryCategoryList(formDTO)); + } + + /** + * 003、多元主题分析-地图(详情信息已包含) + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("/coordinate-list") + public Result> queryCoordinateList(@LoginUser TokenDto tokenDto, @RequestBody CategorySelfOrgFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + formDTO.setIsPage(false); + return new Result>().ok(icCommunitySelfOrganizationService.queryCoordinateList(formDTO)); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java index e8fc375773..5899abc96f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcCommunitySelfOrganizationDao.java @@ -19,8 +19,10 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.dto.form.CategorySelfOrgFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListDTO; +import com.epmet.dto.result.SelfOrgCategoryTotalResDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import org.apache.ibatis.annotations.Mapper; @@ -65,4 +67,10 @@ public interface IcCommunitySelfOrganizationDao extends BaseDao selectOrgByOrgName(@Param("names")List names, @Param("customerId") String customerId); List selectOrgByCustomerId(@Param("customerId") String customerId); + + List selectCountGroupByCategory(@Param("customerId") String customerId,@Param("agencyId") String agencyId); + + List queryCategoryList(CategorySelfOrgFormDTO formDTO); + + List queryCoordinateList(CategorySelfOrgFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 6a61e4a199..14008a7ce2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -21,12 +21,11 @@ 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.IcCommunitySelfOrganizationDTO; -import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; -import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; -import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; -import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; +import com.epmet.dto.result.CommunitySelfOrganizationListDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; +import com.epmet.dto.result.SelfOrgCategoryTotalResDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; @@ -160,4 +159,26 @@ public interface IcCommunitySelfOrganizationService extends BaseService queryListById(List communityOrgIds); + + /** + * 多元主体分析-各分类下的社区自组织数量饼图 + * @param customerId + * @param userId + * @return + */ + List querySelfOrgCategoryTotal(String customerId, String userId); + + /** + * 多元主体分析-分类下的社区自组织列表 + * @param formDTO + * @return + */ + PageData queryCategoryList(CategorySelfOrgFormDTO formDTO); + + /** + * 多元主体分析-地图坐标,及详情 + * @param formDTO + * @return + */ + PageData queryCoordinateList(CategorySelfOrgFormDTO formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 6e51228e0f..11bfd15d36 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -35,10 +35,7 @@ import com.epmet.dao.IcUserDemandRecDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; -import com.epmet.dto.result.CommunitySelfOrganizationListDTO; -import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; -import com.epmet.dto.result.ServicePointDTO; -import com.epmet.dto.result.UploadImgResultDTO; +import com.epmet.dto.result.*; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; import com.epmet.entity.IcCommunitySelfOrganizationPersonnelEntity; @@ -709,4 +706,69 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl querySelfOrgCategoryTotal(String customerId, String staffId) { + Result> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + if (!dictMapRes.success() || MapUtils.isEmpty(dictMapRes.getData())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区自组织分类查询异常"); + } + CustomerStaffInfoCacheResult staffInfo=getStaffInfo(customerId,staffId); + List list = baseDao.selectCountGroupByCategory(customerId, staffInfo.getAgencyId()); + Map map = list.stream().collect(Collectors.toMap(SelfOrgCategoryTotalResDTO::getCategoryCode, SelfOrgCategoryTotalResDTO::getTotal, (key1, key2) -> key2)); + List resultList = new ArrayList<>(); + for (String key : dictMapRes.getData().keySet()) { + SelfOrgCategoryTotalResDTO resDTO = new SelfOrgCategoryTotalResDTO(); + resDTO.setCategoryCode(key); + resDTO.setCategoryName(dictMapRes.getData().get(key)); + resDTO.setTotal(map.containsKey(key) ? map.get(key) : NumConstant.ZERO); + resultList.add(resDTO); + } + return resultList; + } + + private CustomerStaffInfoCacheResult getStaffInfo(String customerId, String staffId) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, staffId); + if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "查询当前工作人员信息异常"); + } + return staffInfo; + } + + /** + * 多元主体分析-分类下的社区自组织列表 + * + * @param formDTO + * @return + */ + @Override + public PageData queryCategoryList(CategorySelfOrgFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfo=getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId()); + formDTO.setAgencyId(staffInfo.getAgencyId()); + PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCategoryList(formDTO)); + return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); + } + + /** + * 多元主体分析-地图坐标,及详情 + * + * @param formDTO + * @return + */ + @Override + public PageData queryCoordinateList(CategorySelfOrgFormDTO formDTO) { + CustomerStaffInfoCacheResult staffInfo=getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId()); + formDTO.setAgencyId(staffInfo.getAgencyId()); + PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCoordinateList(formDTO)); + return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); + } + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index 872f404c8e..2ad8ac92b9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -38,7 +38,10 @@ + + + + + \ No newline at end of file From 03590577ece7c3dc134909a0d2b47dec450e15ad Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 13:25:45 +0800 Subject: [PATCH 021/147] =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/ProjectManageListResultDTO.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java index ba56db5c44..c0bce880b1 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java @@ -69,7 +69,6 @@ public class ProjectManageListResultDTO implements Serializable { @JsonIgnore private Date updatedTime; - @JsonIgnore private String isHandle; public ProjectManageListResultDTO() { From 3115775f6249b4cd2542640dcf74e4000765a951 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 13:50:54 +0800 Subject: [PATCH 022/147] =?UTF-8?q?=E5=8D=8F=E5=8A=9E=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/PartyUnitListResultDTO.java | 5 ++++ .../controller/IcPartyUnitController.java | 12 ++++++++++ .../java/com/epmet/dao/IcPartyUnitDao.java | 8 +++++++ .../com/epmet/service/IcPartyUnitService.java | 9 ++++++++ .../service/impl/IcPartyUnitServiceImpl.java | 15 ++++++++++++ .../main/resources/mapper/IcPartyUnitDao.xml | 23 +++++++++++++++++++ 6 files changed, 72 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java index c8244a0263..e6aabc3d85 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyUnitListResultDTO.java @@ -24,4 +24,9 @@ public class PartyUnitListResultDTO implements Serializable { * 协办单位名字 */ private String assistanceUnitName; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java index d055a580eb..e4e507ee25 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java @@ -264,4 +264,16 @@ public class IcPartyUnitController { public Result> getPartyUnitList(@RequestBody PartyUnitListFormDTO formDTO){ return new Result>().ok(icPartyUnitService.getPartyUnitList(formDTO)); } + + /** + * Desc: 协办单位列表 + * @param tokenDto + * @author zxc + * @date 2022/5/18 13:37 + */ + @PostMapping("assistanceUnitList") + public Result> getAssistanceUnitList(@LoginUser TokenDto tokenDto){ + return new Result>().ok(icPartyUnitService.getAssistanceUnitList(tokenDto)); + } + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java index 6cc2e76293..a144e3f69d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyUnitDao.java @@ -84,4 +84,12 @@ public interface IcPartyUnitDao extends BaseDao { * @date 2022/5/17 18:51 */ List getCommunitySelfList(@Param("ids") List ids); + + /** + * Desc: 协办单位列表 + * @param agencyId + * @author zxc + * @date 2022/5/18 13:48 + */ + List getAssistanceUnitList(@Param("agencyId")String agencyId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java index e6d3857757..0507b31209 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java @@ -152,4 +152,13 @@ public interface IcPartyUnitService extends BaseService { * @date 2022/5/17 17:53 */ List getPartyUnitList(PartyUnitListFormDTO formDTO); + + /** + * Desc: 协办单位列表 + * @param tokenDto + * @author zxc + * @date 2022/5/18 13:37 + */ + List getAssistanceUnitList(TokenDto tokenDto); + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 4c6e590798..c878b8f14d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -614,6 +614,21 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl getAssistanceUnitList(TokenDto tokenDto) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + if (null == staffInfo){ + throw new EpmetException("未查询到此工作人员信息"+tokenDto.getUserId()); + } + return baseDao.getAssistanceUnitList(staffInfo.getAgencyId()); + } + private String getServiceMatter(Map map, String matter) { List matters = Arrays.asList(matter.split(StrConstant.COLON)); List list = matters.stream().map(map::get).collect(Collectors.toList()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml index cd2dbda9ec..646eaedb99 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -102,6 +102,29 @@ ) + + + update ic_party_unit set SATISFACTION=#{satisfaction},UPDATED_TIME=NOW() From abea2ee464a526b163b9b576c1161cd5961357af Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 13:55:32 +0800 Subject: [PATCH 023/147] duoyuan --- .../controller/ResiDemandController.java | 16 ++++++++++++- .../com/epmet/dao/IcUserDemandRecDao.java | 3 +++ .../epmet/service/IcUserDemandRecService.java | 8 +++++++ .../impl/IcUserDemandRecServiceImpl.java | 15 ++++++++++++ .../resources/mapper/IcUserDemandRecDao.xml | 16 +++++++++++++ .../epmet/dto/form/ServiceListFormDTO.java | 23 +++++++++++++++++++ 6 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java index f152dd140f..be82347461 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java @@ -10,15 +10,16 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.enums.EventEnum; +import com.epmet.commons.tools.page.PageData; 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.validator.ValidatorUtils; import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserDemandConstant; -import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.IcDemandFormDTO; +import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.*; @@ -282,4 +283,17 @@ public class ResiDemandController { return new Result().ok(icUserDemandRecService.saveOrUpdateDemand(dto)); } + /** + * 根据服务方id查询,服务过的需求列表 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("service-list") + public Result> queryServiceList(@LoginUser TokenDto tokenDto, @RequestBody ServiceListFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result>().ok(icUserDemandRecService.queryServiceList(formDTO)); + } + + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index f3781ceea6..0a97c3eba4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PointRecordFormDTO; +import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.demand.IcResiUserDemandFromDTO; import com.epmet.dto.form.demand.PageListAnalysisFormDTO; import com.epmet.dto.form.demand.UserDemandPageFormDTO; @@ -140,4 +141,6 @@ public interface IcUserDemandRecDao extends BaseDao { * @Date 2022/1/21 15:53 */ List getServicePoint(@Param("customerId")String customerId, @Param("serviceType")String serviceType); + + List queryServiceList(ServiceListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index 5e86b438ed..0c0ec70167 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PointRecordFormDTO; +import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.PointRecordResultDTO; import com.epmet.dto.result.demand.*; @@ -247,4 +248,11 @@ public interface IcUserDemandRecService extends BaseService getServicePoint(String customerId, String serviceType); + + /** + * 根据服务方id查询,服务过的需求列表 + * @param formDTO + * @return + */ + PageData queryServiceList(ServiceListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 433f118f42..fd5552644f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -1704,5 +1704,20 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl queryServiceList(ServiceListFormDTO formDTO) { + PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.queryServiceList(formDTO)); + return new PageData<>(pageInfo.getList(),pageInfo.getTotal()); + } + + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 02432b91c5..1d62e01ac6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -641,4 +641,20 @@ GROUP BY b.SERVER_ID + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java new file mode 100644 index 0000000000..7695b79710 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +@Data +public class ServiceListFormDTO extends PageFormDTO implements Serializable { + @NotBlank(message = "type不能为空:志愿者:volunteer;社区自组织:community_org", groups = PageFormDTO.AddUserInternalGroup.class) + private String type; + + /** + * 服务方id , + * 可能是来源于多元主题分析里的社区自组织,也可能是来源于志愿者 + */ + @NotBlank(message = "serverId不能为空", groups = PageFormDTO.AddUserInternalGroup.class) + private String serverId; + + private String customerId; +} From 06d0d73ad1e8dacfb7bc1a2f72622c7fe9fb4987 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 13:57:40 +0800 Subject: [PATCH 024/147] duoyuan --- .../src/main/java/com/epmet/controller/ResiDemandController.java | 1 - .../src/main/java/com/epmet/dao/IcUserDemandRecDao.java | 1 - .../src/main/java/com/epmet/service/IcUserDemandRecService.java | 1 - 3 files changed, 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java index be82347461..1bb797aa61 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java @@ -19,7 +19,6 @@ import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserDemandConstant; import com.epmet.dto.form.AutoEvaluateDemandFormDTO; import com.epmet.dto.form.IcDemandFormDTO; -import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.demand.*; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index 0a97c3eba4..f0db70eba6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -20,7 +20,6 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PointRecordFormDTO; -import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.demand.IcResiUserDemandFromDTO; import com.epmet.dto.form.demand.PageListAnalysisFormDTO; import com.epmet.dto.form.demand.UserDemandPageFormDTO; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index 0c0ec70167..58885f0d18 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -21,7 +21,6 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PointRecordFormDTO; -import com.epmet.dto.form.ServiceListFormDTO; import com.epmet.dto.form.demand.*; import com.epmet.dto.result.PointRecordResultDTO; import com.epmet.dto.result.demand.*; From d6b1f0e7e7030521f781fe9fe1db20f2997b2d74 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 13:57:42 +0800 Subject: [PATCH 025/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index 4ffce2041b..6ebee201a1 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -119,7 +119,7 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli } @Override - public Result queryUserVolunteerInfo(IcDemandFormDTO formDTO) { + public Result icEventToDemand(IcDemandFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventToDemand", formDTO); } } From 11914ecb2c43daca5596991409d3b22b9e919c47 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 13:58:46 +0800 Subject: [PATCH 026/147] duoyuan --- .../java/com/epmet/dto/form/demand}/ServiceListFormDTO.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename epmet-module/{gov-project/gov-project-client/src/main/java/com/epmet/dto/form => epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand}/ServiceListFormDTO.java (95%) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java similarity index 95% rename from epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java rename to epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java index 7695b79710..3985df6fe0 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ServiceListFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceListFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.dto.form; +package com.epmet.dto.form.demand; import com.epmet.commons.tools.dto.form.PageFormDTO; import lombok.Data; @@ -6,7 +6,6 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; - @Data public class ServiceListFormDTO extends PageFormDTO implements Serializable { @NotBlank(message = "type不能为空:志愿者:volunteer;社区自组织:community_org", groups = PageFormDTO.AddUserInternalGroup.class) @@ -21,3 +20,4 @@ public class ServiceListFormDTO extends PageFormDTO implements Serializable { private String customerId; } + From 18fda9352bc46814001a8f8067e2523299b4686a Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Wed, 18 May 2022 13:59:54 +0800 Subject: [PATCH 027/147] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=A4=84=E7=90=86=E5=88=86=E6=9E=90-=E6=9C=88?= =?UTF-8?q?=E5=A2=9E=E9=87=8F=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EventProcessAnalysisCommonFormDTO.java | 13 +++-- .../result/IcEventMonthlyCountResultDTO.java | 15 ++++++ .../IcEventMonthlyIncrementResultDTO.java | 18 +++++++ .../epmet/controller/IcEventController.java | 29 ++++++++++- .../main/java/com/epmet/dao/IcEventDao.java | 18 +++++++ .../com/epmet/service/IcEventService.java | 24 +++++++++ .../service/impl/IcEventServiceImpl.java | 49 +++++++++++++++++-- .../src/main/resources/mapper/IcEventDao.xml | 19 +++++++ 8 files changed, 175 insertions(+), 10 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyCountResultDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyIncrementResultDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java index ca2bf433c2..51d626d39b 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventProcessAnalysisCommonFormDTO.java @@ -19,16 +19,21 @@ public class EventProcessAnalysisCommonFormDTO { */ public interface ProcessStatusRatioQuery {} + /** + * 月度新增 + */ + public interface MonthlyIncrementAnalysis {} + /** * 要查询的组织ID */ - @NotBlank(message = "组织ID为必填项", groups = { ProcessStatusRatioQuery.class }) + @NotBlank(message = "组织ID为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class }) private String orgId; /** * 组织类型。grid,agency */ - @NotBlank(message = "组织类型为必填项", groups = { ProcessStatusRatioQuery.class }) + @NotBlank(message = "组织类型为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class }) private String orgType; /** @@ -36,7 +41,7 @@ public class EventProcessAnalysisCommonFormDTO { */ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class }) + @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class }) private Date queryStartTime; /** @@ -44,7 +49,7 @@ public class EventProcessAnalysisCommonFormDTO { */ @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") - @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class }) + @NotNull(message = "查询时间为必填项", groups = { ProcessStatusRatioQuery.class, MonthlyIncrementAnalysis.class }) private Date queryEndTime; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyCountResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyCountResultDTO.java new file mode 100644 index 0000000000..724a39a79b --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyCountResultDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result; + +import jdk.nashorn.internal.ir.debug.PrintVisitor; +import lombok.Data; + +import java.util.Date; + +@Data +public class IcEventMonthlyCountResultDTO { + + private String monthName; + + private Integer eventCount; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyIncrementResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyIncrementResultDTO.java new file mode 100644 index 0000000000..18cebe0622 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventMonthlyIncrementResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * 事件阅读增量dto + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class IcEventMonthlyIncrementResultDTO { + private String monthName; + private Integer increment; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 9d94d20e38..108ad78f78 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -2,6 +2,8 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -15,6 +17,7 @@ import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.service.IcEventService; @@ -22,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Date; +import java.util.List; /** @@ -77,7 +81,7 @@ public class IcEventController { } /** - * 事件分类分析-处理状态比例查询 + * 事件处理分析-处理状态比例查询 * @param formDTO * @return */ @@ -95,7 +99,7 @@ public class IcEventController { } /** - * 事件分类分析-事件列表 + * 事件处理分析-事件列表 * @param input * @return */ @@ -114,6 +118,27 @@ public class IcEventController { return new Result>().ok(page); } + /** + * 时间处理分析-阅读增量查询 + * @param input + * @return + */ + @PostMapping("processAnalysis/monthlyIncrement") + public Result> listMonthlyIncrement(@RequestBody EventProcessAnalysisCommonFormDTO input) { + ValidatorUtils.validateEntity(input, EventProcessAnalysisCommonFormDTO.MonthlyIncrementAnalysis.class); + String orgId = input.getOrgId(); + String orgType = input.getOrgType(); + Date queryStartTime = input.getQueryStartTime(); + Date queryEndTime = input.getQueryEndTime(); + + if (queryStartTime.after(queryEndTime)) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "日期范围错误", "日期范围错误"); + } + + List page = icEventService.listMonthlyIncrement(orgType, orgId, queryStartTime, queryEndTime); + return new Result>().ok(page); + } + diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index f9cdf7beff..f044348e41 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -1,6 +1,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcEventMonthlyCountResultDTO; +import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; @@ -54,4 +56,20 @@ public interface IcEventDao extends BaseDao { @Param("processStatus") String processStatus, @Param("queryStartTime") Date queryStartTime, @Param("queryEndTime") Date queryEndTime); + + /** + * 月度事件数统计查询 + * @param orgType + * @param orgId + * @param gridPids + * @param queryStartTime + * @param queryEndTime + * @return + */ + List listMonthlyEventCount( + @Param("orgType") String orgType, + @Param("orgId") String orgId, + @Param("gridPids") String gridPids, + @Param("queryStartTime") Date queryStartTime, + @Param("queryEndTime") Date queryEndTime); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index e3ad6ba353..a0e1f8bd3c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -5,11 +5,13 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; import java.util.Date; +import java.util.List; import java.util.Map; /** @@ -72,6 +74,28 @@ public interface IcEventService extends BaseService { ProcessStatusRatioResultDTO getProcessStatusRatio(String orgId, String orgType, Date queryStartTime, Date queryEndTime); + /** + * 事件列表 + * @param orgId + * @param orgType + * @param categoryCode + * @param processStatus + * @param queryStartTime + * @param queryEndTime + * @param pageNo + * @param pageSize + * @return + */ PageData listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, Date queryStartTime, Date queryEndTime, Integer pageNo, Integer pageSize); + + /** + * 月度增量查询 + * @param orgType + * @param orgId + * @param queryStartTime + * @param queryEndTime + * @return + */ + List listMonthlyIncrement(String orgType, String orgId, Date queryStartTime, Date queryEndTime); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 5f7beffe5b..6639b44380 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -12,6 +12,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.dao.IcEventDao; import com.epmet.dto.CustomerAgencyDTO; @@ -33,10 +34,8 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; /** * 事件管理表 @@ -214,4 +213,46 @@ public class IcEventServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } + + @Override + public List listMonthlyIncrement(String orgType, String orgId, Date queryStartTime, Date queryEndTime) { + List resultList = new ArrayList<>(); + + String gridPids = null; + if ("agency".equals(orgType)) { + gridPids = getEventGridPids(orgId); + } + + // 从输入开始月份上一个月的开始查 + queryEndTime = DateUtils.addDateMonths(queryEndTime, 1); + + // 查询分组统计后的结果,此时月份数据不全,如果数量是0的月份不会在这里面 + List eventCountDataList = baseDao.listMonthlyEventCount(orgType, orgId, gridPids, queryStartTime, queryEndTime); + Map monthAndCount = eventCountDataList.stream().collect(Collectors.toMap((e) -> e.getMonthName(), (e) -> e.getEventCount())); + + Date tempMonth = DateUtils.integrate(queryStartTime, DateUtils.DATE_PATTERN_YYYY_MM); + Date endMonth = DateUtils.integrate(queryEndTime, DateUtils.DATE_PATTERN_YYYY_MM); + + // 按照开始和结束时间,对比数据库查出来的,没有数据的填0 + while (true) { + Integer increment = 0; + + if (tempMonth.equals(endMonth)) { + break; + } + + String tempMonthString = DateUtils.format(tempMonth, DateUtils.DATE_PATTERN_YYYY_MM); + Integer eventCountOfMonth = monthAndCount.get(tempMonthString); + if (eventCountOfMonth != null) { + increment = eventCountOfMonth; + } + + tempMonth = DateUtils.addDateMonths(tempMonth, 1); + + resultList.add(new IcEventMonthlyIncrementResultDTO(tempMonthString, increment)); + } + + + return resultList; + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 76202bb3fa..bbd9a1d933 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -85,6 +85,25 @@ + \ No newline at end of file From 8eb0ed5dd96980243572bb1d5e629800a99afe4a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 14:20:38 +0800 Subject: [PATCH 028/147] =?UTF-8?q?=E5=BC=95=E5=8C=85=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dao/IcUserDemandRecDao.java | 4 +--- .../src/main/resources/mapper/IcUserDemandRecDao.xml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index f0db70eba6..01ab0ad96d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -20,9 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcUserDemandRecDTO; import com.epmet.dto.form.PointRecordFormDTO; -import com.epmet.dto.form.demand.IcResiUserDemandFromDTO; -import com.epmet.dto.form.demand.PageListAnalysisFormDTO; -import com.epmet.dto.form.demand.UserDemandPageFormDTO; +import com.epmet.dto.form.demand.*; import com.epmet.dto.result.PointRecordDTO; import com.epmet.dto.result.ServicePointDTO; import com.epmet.dto.result.demand.*; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 1d62e01ac6..bb32dfe95f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -643,7 +643,7 @@ - SELECT r.ID as demandRecId, r.CONTENT, From f632735c773f6cdd55e392a04f2245ad8f91da1e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 14:20:42 +0800 Subject: [PATCH 029/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventReplyFormDTO.java | 43 ++++++++++++ .../epmet/controller/IcEventController.java | 17 +++-- .../com/epmet/dao/IcEventCategoryDao.java | 5 +- .../java/com/epmet/entity/IcEventEntity.java | 10 +-- .../epmet/service/IcEventCategoryService.java | 2 + .../com/epmet/service/IcEventService.java | 7 ++ .../impl/IcEventCategoryServiceImpl.java | 5 ++ .../service/impl/IcEventServiceImpl.java | 70 +++++++++++++++++++ .../resources/mapper/IcEventCategoryDao.xml | 15 +++- 9 files changed, 163 insertions(+), 11 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java new file mode 100644 index 0000000000..f4e7b57ab0 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java @@ -0,0 +1,43 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.UpdateGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 事件管理_回复 + * @Author sun + */ +@Data +public class IcEventReplyFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 事件ID + */ + @NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class}) + private String icEventId; + /** + * 二类分类Id + */ + private String categoryId; + /** + * 回复内容 + */ + private String content; + /** + * 处理方式[0:已回复 1:已转项目 1:已转需求] + */ + private String operationType; + /** + * 处理中:processing;已办结:closed_case + */ + private String status; + + private String customerId; + private String userId; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index e1bdaca91a..9fb4070cf3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -11,10 +11,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventResultDTO; import com.epmet.dto.result.ProcessStatusRatioResultDTO; @@ -118,6 +115,18 @@ public class IcEventController { return new Result>().ok(page); } + /** + * @Author sun + * @Description 事件管理-回复 + **/ + @PostMapping("reply") + public Result reply(@LoginUser TokenDto tokenDto, @RequestBody IcEventReplyFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + icEventService.reply(formDTO); + return new Result(); + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java index f9db23cc56..e8829fda7a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventCategoryDao.java @@ -3,6 +3,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.IcEventCategoryEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 事件所属分类表 @@ -12,5 +13,7 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventCategoryDao extends BaseDao { - + + IcEventCategoryEntity selectByEventId(@Param("icEventId") String icEventId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java index e33765e233..ca36746d3c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -153,11 +153,11 @@ public class IcEventEntity extends BaseEpmetEntity { /** * 事件审核状态[涉及附件审核需要加的状态](审核中:auditing; -auto_passed: 自动通过; -review:结果不确定,需要人工审核; -block: 结果违规; -rejected:人工审核驳回; -approved:人工审核通过) + auto_passed: 自动通过; + review:结果不确定,需要人工审核; + block: 结果违规; + rejected:人工审核驳回; + approved:人工审核通过) */ private String auditStatus; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java index 182569670b..fe7eb78be7 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventCategoryService.java @@ -75,4 +75,6 @@ public interface IcEventCategoryService extends BaseService { PageData listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, Date queryStartTime, Date queryEndTime, Integer pageNo, Integer pageSize); + + /** + * @Author sun + * @Description 事件管理-回复 + **/ + void reply(IcEventReplyFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java index 373ba4a279..25a308fa6d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventCategoryServiceImpl.java @@ -80,4 +80,9 @@ public class IcEventCategoryServiceImpl extends BaseServiceImpl imageEntityList = new ArrayList<>(); @@ -468,4 +471,71 @@ public class IcEventServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } + + /** + * @Author sun + * @Description 事件管理-回复 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void reply(IcEventReplyFormDTO formDTO) { + //1.查询事件数据 判断是否允许回复 + IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId()); + if (null == entity || "1".equals(entity.getOperationType()) || "2".equals(entity.getOperationType())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前事件不允许回复"); + } + //2.修改事件数据 + if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())){ + entity.setStatus(formDTO.getStatus()); + entity.setCloseCaseTime(new Date()); + } + entity.setLatestOperatedTime(new Date()); + baseDao.updateById(entity); + + //3.新增回复数据 + //获取当前工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); + } + IcEventReplyEntity replyEntity = new IcEventReplyEntity(); + replyEntity.setCustomerId(formDTO.getCustomerId()); + replyEntity.setIcEventId(formDTO.getIcEventId()); + replyEntity.setFromUserId(formDTO.getUserId()); + replyEntity.setContent(formDTO.getContent()); + replyEntity.setUserShowName(staffInfo.getAgencyName() + "-" + staffInfo.getRealName()); + icEventReplyService.insert(replyEntity); + + //4.判断新增或修改分类数据 + if (StringUtils.isNotBlank(formDTO.getOperationType())) { + //查询分类信息 + List categoryList = new ArrayList<>(); + categoryList.add(formDTO.getCategoryId()); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + AtomicReference categoryEntity = null; + category.getCategoryList().forEach(ca -> { + if (ca.getId().equals(formDTO.getCategoryId())) { + categoryEntity.set(new IcEventCategoryEntity()); + categoryEntity.get().setCustomerId(formDTO.getCustomerId()); + categoryEntity.get().setIcEventId(entity.getId()); + categoryEntity.get().setCategoryId(ca.getId()); + categoryEntity.get().setCategoryPids(ca.getPids()); + categoryEntity.get().setCategoryCode(ca.getCategoryCode()); + } + }); + IcEventCategoryEntity icEventCategory = icEventCategoryService.getByEventId(formDTO.getIcEventId()); + if (null == category) { + icEventCategoryService.insert(categoryEntity.get()); + } else { + categoryEntity.get().setId(icEventCategory.getId()); + icEventCategoryService.updateById(categoryEntity.get()); + } + } + + //5.新增操作记录数据 + IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), new Date(), "reply", "reply"); + icEventOperationLogService.insert(logEntity); + + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml index 3e2471e5f9..afb3965750 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventCategoryDao.xml @@ -3,6 +3,19 @@ - + \ No newline at end of file From 5e47e6b3158c92281749b41182ad20a39042705e Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 18 May 2022 14:24:08 +0800 Subject: [PATCH 030/147] bug --- .../src/main/resources/mapper/IcUserDemandRecDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 1d62e01ac6..eaf557b72b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -643,7 +643,7 @@ - SELECT r.ID as demandRecId, r.CONTENT, @@ -657,4 +657,4 @@ and s.SERVER_ID=#{serverId} order by r.REPORT_TIME desc - \ No newline at end of file + From 943ffcff81c4189535a096834cf6baa34bdc52e7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 14:44:46 +0800 Subject: [PATCH 031/147] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/ProjectManageListFormDTO.java | 5 +---- .../main/java/com/epmet/controller/ProjectController.java | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java index e0e7eacecc..54d327354c 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectManageListFormDTO.java @@ -16,8 +16,6 @@ public class ProjectManageListFormDTO extends PageFormDTO implements Serializabl private static final long serialVersionUID = -3317804468566708838L; - public interface ProjectManageListForm{} - /** * 标题 */ @@ -34,9 +32,8 @@ public class ProjectManageListFormDTO extends PageFormDTO implements Serializabl private String endDate; /** - * all:全部,closed:已关闭,pending:待处理 + * null就是全部,closed:已关闭,pending:待处理 */ - @NotBlank(message = "status不能为空",groups = ProjectManageListForm.class) private String status; private String userId; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 2f862559de..4e09cbf193 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -346,7 +346,6 @@ public class ProjectController { */ @PostMapping("project-list") public Result projectList(@LoginUser TokenDto tokenDto,@RequestBody ProjectManageListFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO, ProjectManageListFormDTO.ProjectManageListForm.class); formDTO.setUserId(tokenDto.getUserId()); formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(projectService.projectList(formDTO)); From 334e69b3612d22f20ec552e3e095bb516849f316 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 14:51:04 +0800 Subject: [PATCH 032/147] =?UTF-8?q?=E5=8D=8F=E5=8A=9E=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcPartyUnitDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml index 646eaedb99..c3e86c3964 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyUnitDao.xml @@ -121,7 +121,7 @@ CREATED_TIME FROM ic_community_self_organization WHERE DEL_FLAG = '0' - AND CONCAT(PIDS,':',AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%') + AND CONCAT(PIDS,':',ORG_ID) LIKE CONCAT('%',#{agencyId},'%') ) t ORDER BY CREATED_TIME desc From 148e77e61809d788dae879690574549465d5501c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 14:55:16 +0800 Subject: [PATCH 033/147] =?UTF-8?q?=E6=8A=A5=E4=BA=8B-=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E7=BD=91=E6=A0=BCID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/EventToProjectFormDTO.java | 5 +++++ .../java/com/epmet/service/impl/ProjectTraceServiceImpl.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 index ecc93498b7..39e4f6f06e 100644 --- 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 @@ -104,4 +104,9 @@ public class EventToProjectFormDTO implements Serializable { * 协办单位类型,1社区自组织,2联建单位 */ private String assistanceUnitType; + + /** + * 网格ID + */ + private String gridId; } 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 d597fedeff..273bfc29a4 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 @@ -705,7 +705,7 @@ public class ProjectTraceServiceImpl implements ProjectTraceS //事件已经立项,不能重复操作 ResiEventEntity resiEventEntity=resiEventService.getById(formDTO.getEventId()); //TODO 兼容新事件表 - String gridId = ""; + String gridId = formDTO.getGridId(); if(null==resiEventEntity||resiEventEntity.getShiftProject()){ throw new RenException(EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getCode(),EpmetErrorCode.RESI_EVENT_SHIFT_PROJECT.getMsg()); } From e083ad76c47ac4fefae45d1264ed8e8bca787f94 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 15:01:09 +0800 Subject: [PATCH 034/147] =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/ProjectDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index 2befd8ed97..f453fa9fd9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -598,7 +598,7 @@ AND DATE_FORMAT(p.CREATED_TIME,'%Y%m%d') #{endDate} - + AND p.`STATUS` = #{status} GROUP BY t.PROJECT_ID From 820f558278ced9ba1594c362d576003a21489a2d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 15:23:32 +0800 Subject: [PATCH 035/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E7=AB=8B=E9=A1=B9=E3=80=81=E8=BD=AC=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/IcDemandFormDTO.java | 3 + .../epmet/dto/form/IcEventAddEditFormDTO.java | 2 +- .../dto/form/IcEventToProjectFormDTO.java | 110 +++++++++ .../epmet/controller/IcEventController.java | 29 +++ .../com/epmet/service/IcEventService.java | 16 +- .../epmet/service/ProjectTraceService.java | 6 + .../service/impl/IcEventServiceImpl.java | 58 ++++- .../service/impl/ProjectTraceServiceImpl.java | 230 ++++++++++++++++++ 8 files changed, 449 insertions(+), 5 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToProjectFormDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java index 657bea778f..78c5c7becc 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java @@ -30,6 +30,9 @@ public class IcDemandFormDTO implements Serializable { public interface UpdateInternalGroup { } + @NotBlank(message = "事件id不能为空",groups = AddInternalGroup.class) + private String icEventId; + @NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class) private String demandRecId; diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java index b3fd086a1c..caa87021bb 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java @@ -92,7 +92,7 @@ public class IcEventAddEditFormDTO implements Serializable { /** * 立项接口入参对象 */ - private EventToProjectFormDTO project; + private IcEventToProjectFormDTO project; /** * 转需求接口入参对象 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToProjectFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToProjectFormDTO.java new file mode 100644 index 0000000000..7c5bf3fc6c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToProjectFormDTO.java @@ -0,0 +1,110 @@ +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 sun + */ +@Data +public class IcEventToProjectFormDTO 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 icEventId; + /** + * 项目方案 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; + + /** + * 网格id + */ + @NotBlank(message = "网格id不能为空", groups = AddUserInternalGroup.class) + private String gridId; + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 1b9674f7da..c03e541af8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -14,6 +14,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.*; +import com.epmet.dto.form.demand.ReportDemandFormDTO; import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventResultDTO; @@ -153,6 +154,34 @@ public class IcEventController { return new Result(); } + /** + * @Author sun + * @Description 事件管理-立项 + **/ + @PostMapping("icEventToProject") + public Result icEventToProject(@LoginUser TokenDto tokenDto, @RequestBody IcEventToProjectFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setApp(tokenDto.getApp()); + formDTO.setClient(tokenDto.getClient()); + ValidatorUtils.validateEntity(formDTO,IcEventToProjectFormDTO.ApprovalCategory.class,IcEventToProjectFormDTO.AddUserInternalGroup.class); + icEventService.icEventToProject(formDTO); + return new Result(); + } + + /** + * @Author sun + * @Description 事件管理-转需求 + **/ + @PostMapping("icEventToDemand") + public Result icEventToDemand(@LoginUser TokenDto tokenDto, @RequestBody IcDemandFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setDemandUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, IcDemandFormDTO.Add.class,IcDemandFormDTO.AddInternalGroup.class); + icEventService.icEventToDemand(formDTO); + return new Result(); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 9921fb6b85..eb146d45a4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -3,9 +3,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.form.IcEventReplyFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.IcEventListResultDTO; import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; import com.epmet.dto.result.IcEventResultDTO; @@ -106,4 +104,16 @@ public interface IcEventService extends BaseService { * @Description 事件管理-回复 **/ void reply(IcEventReplyFormDTO formDTO); + + /** + * @Author sun + * @Description 事件管理-立项 + **/ + void icEventToProject(IcEventToProjectFormDTO formDTO); + + /** + * @Author sun + * @Description 事件管理-转需求 + **/ + void icEventToDemand(IcDemandFormDTO formDTO); } \ 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 133711aea9..2b8d2a88e1 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 @@ -205,4 +205,10 @@ public interface ProjectTraceService { * @Date 2022/1/4 15:33 */ void approvaledListExport(HttpServletResponse response, ApprovaledListFromDTO formDTO); + + /** + * 事件管理-事件立项 + * @author sun + */ + EventToProjectResultDTO icEventToProject(IcEventToProjectFormDTO formDTO); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 2a12250265..29582535e0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -208,7 +208,7 @@ public class IcEventServiceImpl extends BaseServiceImpl recIdResult = epmetHeartOpenFeignClient.icEventToDemand(formDTO); + if (!recIdResult.success() || recIdResult.getData() == null) { + throw new RenException(recIdResult.getCode(), recIdResult.getMsg()); + } + + //3.更新事件数据 + entity.setOperationType("2"); + entity.setOperationId(recIdResult.getData().getDemandRecId()); + entity.setLatestOperatedTime(new Date()); + baseDao.updateById(entity); + + //4.新增操作记录 + IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getDemandUserId(), new Date(), "shift_demand", "shift_demand"); + icEventOperationLogService.insert(logEntity); + + } + + } \ 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 273bfc29a4..4046d89bf6 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 @@ -1225,4 +1225,234 @@ public class ProjectTraceServiceImpl implements ProjectTraceS epmetMessageOpenFeignClient.saveUserMessage(userMessage); } + + /** + * 事件管理-事件立项【赶时间没空兼容】 + * @author sun + */ + @Override + public EventToProjectResultDTO icEventToProject(IcEventToProjectFormDTO formDTO) { + //判断是否存在已立项 + List projectEntityList = projectService.getByOriginId(formDTO.getIcEventId()); + 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获取当前工作人员基本信息 + EventToProjectFormDTO eventToProjectFormDTO = ConvertUtils.sourceToTarget(formDTO, EventToProjectFormDTO.class); + LoginUserDetailsResultDTO loginUser = queryLoginUserInfo(eventToProjectFormDTO); + + //2-2.调用gov-org服务,获取所有勾选人员以及议题数据对应的组织信息、部门信息、网格信息用于对处理部门和ORG_ID_PATH字段的赋值使用 + AgencyDeptGridResultDTO agencyDeptGrid = getAgencyDeptGridRes(formDTO.getStaffList(), loginUser.getAgencyId()); + + //2-3.调用issue服务,查询分类、标签数据信息 + CategoryTagResultDTO categoryTagResultDTO = queryCategoryTagRes(eventToProjectFormDTO); + 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()); + projectEntity.setOrigin("ic_event"); + projectEntity.setOriginId(formDTO.getIcEventId()); + projectEntity.setTitle(formDTO.getTitle()); + projectEntity.setBackGround(formDTO.getPublicReply()); + projectEntity.setGridId(formDTO.getGridId()); + 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()); + processEntity.setAssistanceUnitId(formDTO.getAssistanceUnitId()); + processEntity.setAssistanceUnitType(formDTO.getAssistanceUnitType()); + 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()); + entity.setGridId(formDTO.getGridId()); + 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(), projectEntity.getId()).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)); + } + + //5.项目实时统计消息 + 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("项目实时统计消息发送失败"); + } + // 数据上链 + try { + blockChainUploadService.send2BlockChain(projectEntity, processEntity, entityList, null); + } catch (Exception e) { + String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); + log.error("【项目流转】上链失败,错误信息:{}", errorMsg); + } + + EventToProjectResultDTO resultDTO = new EventToProjectResultDTO(); + resultDTO.setProjectId(projectEntity.getId()); + return resultDTO; + } + + } From 429c677f65770fd58958297032ef8ff0a37496c5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 15:39:16 +0800 Subject: [PATCH 036/147] =?UTF-8?q?xiangmu=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ProjectManageListResultDTO.java | 4 ++-- .../com/epmet/service/impl/ProjectServiceImpl.java | 13 ++++++------- .../src/main/resources/mapper/ProjectDao.xml | 1 - 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java index c0bce880b1..4cb79ebdf7 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java @@ -53,7 +53,7 @@ public class ProjectManageListResultDTO implements Serializable { /** * 滞留天数 */ - private Integer detentionDays; + private String detentionDays; /** * 状态 @@ -77,7 +77,7 @@ public class ProjectManageListResultDTO implements Serializable { this.shiftProjectTime = ""; this.projectScheme = ""; this.internalRemark = ""; - this.detentionDays = NumConstant.ZERO; + this.detentionDays = NumConstant.ZERO_STR; this.status = ""; this.departmentNameList = new ArrayList<>(); this.projectId = ""; 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 6214f00200..76a3149704 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 @@ -3191,9 +3191,8 @@ public class ProjectServiceImpl extends BaseServiceImpl result = new PageData<>(new ArrayList<>(),NumConstant.ZERO); - int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); - formDTO.setPageNo(pageIndex); - List projectManageList = baseDao.getProjectManageList(formDTO); + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getProjectManageList(formDTO)); + List projectManageList = pageInfo.getList(); if (CollectionUtils.isNotEmpty(projectManageList)){ // 获取滞留天数 Integer days = getDays(ConvertUtils.sourceToTarget(formDTO, ProjectListFromDTO.class)); @@ -3210,23 +3209,23 @@ public class ProjectServiceImpl extends BaseServiceImpl departmentNameList = new ArrayList<>(); if (ProjectConstant.CLOSED.equals(p.getStatus())) { p.setDepartmentNameList(departmentNameList); - p.setDetentionDays(NumConstant.ZERO); + p.setDetentionDays(NumConstant.ZERO_STR); } else { ProjectDTO projectDTO = ConvertUtils.sourceToTarget(p, ProjectDTO.class); projectDTO.setId(p.getProjectId()); if (p.getIsHandle().equals("unhandled")){ String detentionDays = getDetentionDays(projectDTO); if (!ONE_DAY.equals(detentionDays) && Integer.parseInt(detentionDays) > days) { - p.setDetentionDays(Integer.valueOf(detentionDays)); + p.setDetentionDays(detentionDays); } else { - p.setDetentionDays(Integer.valueOf(detentionDays)); + p.setDetentionDays(detentionDays); } } departmentNameList = baseDao.selectDepartmentNameList(projectDTO); p.setDepartmentNameList(departmentNameList); } }); - result.setTotal(projectManageList.size()); + result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); result.setList(projectManageList); } return result; diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index f453fa9fd9..e01a45275c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -603,6 +603,5 @@ GROUP BY t.PROJECT_ID ORDER BY p.CREATED_TIME DESC - LIMIT #{pageNo}, #{pageSize} \ No newline at end of file From 5a182abf8a1de5979aa9943e08a8ad8ca0c94e99 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 15:40:18 +0800 Subject: [PATCH 037/147] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A5=BC1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/GovIssueOpenFeignClient.java | 3 + .../GovIssueOpenFeignClientFallBack.java | 7 ++ .../IssueProjectCategoryDictController.java | 7 ++ .../IssueProjectCategoryDictService.java | 2 + .../IssueProjectCategoryDictServiceImpl.java | 9 +++ .../form/IcEventCategoryAnalysisFormDTO.java | 68 +++++++++++++++++++ .../result/IcEventCategoryAnalysisResDTO.java | 21 ++++++ .../epmet/controller/IcEventController.java | 20 ++++-- .../main/java/com/epmet/dao/IcEventDao.java | 15 ++-- .../com/epmet/service/IcEventService.java | 13 ++-- .../service/impl/IcEventServiceImpl.java | 37 ++++++++-- .../src/main/resources/mapper/IcEventDao.xml | 24 ++++++- 12 files changed, 207 insertions(+), 19 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventCategoryAnalysisResDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index 221a23af53..bc14e5764d 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -385,4 +385,7 @@ public interface GovIssueOpenFeignClient { */ @PostMapping("/gov/issue/issue/audit-reset") Result issueAuditReset(@RequestParam("gridId")String gridId); + + @PostMapping(value = "/gov/issue/issueprojectcategorydict/first/{customerId}") + Result> queryFirstCategory(@PathVariable("customerId") String customerId); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index b9db284194..bb6426080e 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -321,4 +321,11 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result issueAuditReset(String gridId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "issueAuditReset", gridId); } + + @Override + public Result> queryFirstCategory(String customerId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryFirstCategory", customerId); + } + + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java index 51b04c93f3..1af7dc4d7c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProjectCategoryDictController.java @@ -299,5 +299,12 @@ public class IssueProjectCategoryDictController { return new Result>().ok(issueProjectCategoryDictService.getCategoryMap(customerId)); } + @PostMapping("first/{customerId}") + public Result> queryFirstCategory(@PathVariable("customerId") String customerId) { + List list = issueProjectCategoryDictService.queryFirstCategory(customerId); + return new Result>().ok(list); + } + + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java index 204fba3743..1cc9c7b98e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProjectCategoryDictService.java @@ -231,4 +231,6 @@ public interface IssueProjectCategoryDictService extends BaseService getCategoryMap(String customerId); + + List queryFirstCategory(String customerId); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java index 08adcb5860..390da9e43b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProjectCategoryDictServiceImpl.java @@ -540,4 +540,13 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl queryFirstCategory(String customerId) { + List list=baseDao.selectCategoryOneLevelListByCustomerId(customerId); + if(CollectionUtils.isEmpty(list)){ + return new ArrayList<>(); + } + return ConvertUtils.sourceToTarget(list,IssueProjectCategoryDictDTO.class); + } } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java new file mode 100644 index 0000000000..99fa7579ea --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java @@ -0,0 +1,68 @@ +package com.epmet.dto.form; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.Date; + +/** + * 社区治理可视化分析 + * 事件分类分析-饼1入参 + */ +@Data +public class IcEventCategoryAnalysisFormDTO { + + /** + * 处理状态比例查询 + */ + public interface TotalPie { + } + + /** + * 要查询的组织ID + */ + @NotBlank(message = "组织ID为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + private String orgId; + + /** + * 组织类型。grid,agency + */ + @NotBlank(message = "组织类型为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + private String orgType; + + /** + * 查询起始时间 yyyy-MM-dd + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + private Date queryStartTime; + + /** + * 查询截止时间 yyyy-MM-dd + */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @NotNull(message = "查询时间为必填项", groups = {IcEventCategoryAnalysisFormDTO.TotalPie.class}) + private Date queryEndTime; + + /** + * 一级分类 code长度 + */ + private Integer categoryOneLength; + + //以下参数从token中获取 + /** + * 当前登录用户 + */ + private String staffId; + + /** + * 当前客户id + */ + private String customerId; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventCategoryAnalysisResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventCategoryAnalysisResDTO.java new file mode 100644 index 0000000000..62609af451 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventCategoryAnalysisResDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 社区治理可视化分析 + * 事件分类分析-饼1 + */ +@Data +public class IcEventCategoryAnalysisResDTO implements Serializable { + //一级分类Code + private String categoryCode; + //一级分类名称 + private String categoryName; + //一级分类颜色 + private String color = ""; + //分类下项目总数 + private Integer total = 0; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 1b9674f7da..2e1705a04d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -14,10 +14,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; -import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; +import com.epmet.dto.result.*; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -153,6 +150,21 @@ public class IcEventController { return new Result(); } + /** + * 事件分类分析-一级分类下事件数量 + * + * @param formDTO + * @return + */ + @PostMapping("category-analysis/total") + public Result> categoryAnalysisTotal(@LoginUser TokenDto tokenDto, @RequestBody IcEventCategoryAnalysisFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + List list = icEventService.categoryAnalysisTotal(formDTO); + return new Result>().ok(list); + } + + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index 3a82df048c..bdd23f869f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -1,12 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.result.IcEventMonthlyCountResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; +import com.epmet.dto.form.IcEventCategoryAnalysisFormDTO; import com.epmet.dto.form.IcEventListFormDTO; +import com.epmet.dto.result.IcEventCategoryAnalysisResDTO; import com.epmet.dto.result.IcEventListResultDTO; +import com.epmet.dto.result.IcEventMonthlyCountResultDTO; import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.entity.IcEventEntity; import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Mapper; @@ -16,8 +16,6 @@ import java.util.Date; import java.util.List; import java.util.Map; -import java.util.List; - /** * 事件管理表 * @@ -78,4 +76,11 @@ public interface IcEventDao extends BaseDao { @Param("gridPids") String gridPids, @Param("queryStartTime") Date queryStartTime, @Param("queryEndTime") Date queryEndTime); + + /** + * + * @param formDTO + * @return + */ + List selectFirstCategoryTotal(IcEventCategoryAnalysisFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 9921fb6b85..f35275d840 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -4,12 +4,10 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.IcEventAddEditFormDTO; +import com.epmet.dto.form.IcEventCategoryAnalysisFormDTO; import com.epmet.dto.form.IcEventListFormDTO; import com.epmet.dto.form.IcEventReplyFormDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; -import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; import java.util.Date; @@ -106,4 +104,11 @@ public interface IcEventService extends BaseService { * @Description 事件管理-回复 **/ void reply(IcEventReplyFormDTO formDTO); + + /** + * 事件分类分析-一级分类下事件数量 + * @param formDTO + * @return + */ + List categoryAnalysisTotal(IcEventCategoryAnalysisFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 2a12250265..8a3ed9fbd8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -21,14 +21,11 @@ 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.utils.ConvertUtils; -import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.commons.tools.utils.EpmetRequestHolder; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.utils.ScanContentUtils; +import com.epmet.commons.tools.utils.*; import com.epmet.dao.IcEventDao; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcEventDTO; +import com.epmet.dto.IssueProjectCategoryDictDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.DemandRecId; import com.epmet.dto.result.*; @@ -42,6 +39,7 @@ import com.epmet.resi.group.constant.TopicConstant; import com.epmet.service.*; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -53,6 +51,7 @@ import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.*; import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Function; import java.util.stream.Collectors; /** @@ -61,6 +60,7 @@ import java.util.stream.Collectors; * @author generator generator@elink-cn.com * @since v1.0.0 2022-05-17 */ +@Slf4j @Service public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService, ResultDataResolver { @@ -581,4 +581,31 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryAnalysisTotal(IcEventCategoryAnalysisFormDTO formDTO) { + //1.查询客户下一级分类信息 + Result> res = govIssueOpenFeignClient.queryFirstCategory(formDTO.getCustomerId()); + if (!res.success() || CollectionUtils.isEmpty(res.getData())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前客户下未配置事件分类"); + } + int length = res.getData().get(NumConstant.ZERO).getCategoryCode().length(); + formDTO.setCategoryOneLength(length); + + List resList = baseDao.selectFirstCategoryTotal(formDTO); + Map resMap = resList.stream().collect(Collectors.toMap(IcEventCategoryAnalysisResDTO::getCategoryCode, Function.identity())); + List result = new ArrayList<>(); + for (IssueProjectCategoryDictDTO dict : res.getData()) { + IcEventCategoryAnalysisResDTO resultDto = ConvertUtils.sourceToTarget(dict, IcEventCategoryAnalysisResDTO.class); + resultDto.setTotal(MapUtils.isNotEmpty(resMap) && resMap.containsKey(dict.getCategoryCode()) ? resMap.get(dict.getCategoryCode()).getTotal() : NumConstant.ZERO); + result.add(resultDto); + } + return result; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index e1bd36f12f..abab8e75ed 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -141,5 +141,27 @@ order by ie.latest_operated_time desc, rea.sort asc - + \ No newline at end of file From 2395fb7af2282660dfd80edb15a384055b58cd9b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 15:49:14 +0800 Subject: [PATCH 038/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E8=AF=84=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventAddEditFormDTO.java | 8 +++++ .../epmet/dto/form/IcEventReplyFormDTO.java | 11 ++++++- .../epmet/controller/IcEventController.java | 17 +++++++---- .../com/epmet/service/IcEventService.java | 15 ++++------ .../service/impl/IcEventServiceImpl.java | 29 +++++++++++++++++-- 5 files changed, 63 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java index caa87021bb..76d50cd35a 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java @@ -1,10 +1,12 @@ package com.epmet.dto.form; import com.epmet.commons.tools.validator.group.AddGroup; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.List; @@ -47,6 +49,12 @@ public class IcEventAddEditFormDTO implements Serializable { */ @NotBlank(message = "反映渠道不能为空", groups = {AddGroup.class}) private String sourceType; + /** + * 发生时间 + */ + @NotNull(message = "发生时间不能为空", groups = {AddGroup.class}) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String happenTime; /** * 事件内容 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java index f4e7b57ab0..1060909db2 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import lombok.Data; @@ -14,11 +15,13 @@ import java.io.Serializable; public class IcEventReplyFormDTO implements Serializable { private static final long serialVersionUID = 1L; + public interface Comment extends CustomerClientShowGroup { + } /** * 事件ID */ - @NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class}) + @NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class, Comment.class}) private String icEventId; /** * 二类分类Id @@ -37,6 +40,12 @@ public class IcEventReplyFormDTO implements Serializable { */ private String status; + /** + * 满意度 - 不满意:bad、基本满意:good、非常满意:perfect + */ + @NotBlank(message = "满意度不能为空", groups = {Comment.class}) + private String satisfaction; + private String customerId; private String userId; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 48406f1407..2469aa4e82 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -15,11 +15,6 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.dto.form.demand.ReportDemandFormDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; -import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -197,6 +192,18 @@ public class IcEventController { return new Result>().ok(list); } + /** + * @Author sun + * @Description 事件管理-评价 + **/ + @PostMapping("comment") + public Result comment(@LoginUser TokenDto tokenDto, @RequestBody IcEventReplyFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcEventReplyFormDTO.Comment.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + icEventService.comment(formDTO); + return new Result(); + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 593ce9605e..9fdbb15729 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -4,20 +4,11 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; -import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventCategoryAnalysisFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.form.IcEventReplyFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; import java.util.Date; import java.util.List; -import java.util.Map; /** * 事件管理表 @@ -128,4 +119,10 @@ public interface IcEventService extends BaseService { * @return */ List categoryAnalysisTotal(IcEventCategoryAnalysisFormDTO formDTO); + + /** + * @Author sun + * @Description 事件管理-评价 + **/ + void comment(IcEventReplyFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 0d911480c6..54c1ea27af 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -229,7 +229,6 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 18 May 2022 15:56:35 +0800 Subject: [PATCH 039/147] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A5=BC1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java | 2 +- .../main/java/com/epmet/controller/IcEventController.java | 6 +----- .../java/com/epmet/service/impl/IcEventServiceImpl.java | 4 +++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java index 99fa7579ea..9e3747a9cf 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventCategoryAnalysisFormDTO.java @@ -53,7 +53,7 @@ public class IcEventCategoryAnalysisFormDTO { * 一级分类 code长度 */ private Integer categoryOneLength; - + private String gridPids; //以下参数从token中获取 /** * 当前登录用户 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 48406f1407..77ab683550 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -15,11 +15,6 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.dto.form.demand.ReportDemandFormDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyIncrementResultDTO; -import com.epmet.dto.result.IcEventResultDTO; -import com.epmet.dto.result.ProcessStatusRatioResultDTO; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -193,6 +188,7 @@ public class IcEventController { public Result> categoryAnalysisTotal(@LoginUser TokenDto tokenDto, @RequestBody IcEventCategoryAnalysisFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,IcEventCategoryAnalysisFormDTO.TotalPie.class); List list = icEventService.categoryAnalysisTotal(formDTO); return new Result>().ok(list); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 0d911480c6..3a1b4e28ce 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -645,13 +645,15 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryAnalysisTotal(IcEventCategoryAnalysisFormDTO formDTO) { - //1.查询客户下一级分类信息 Result> res = govIssueOpenFeignClient.queryFirstCategory(formDTO.getCustomerId()); if (!res.success() || CollectionUtils.isEmpty(res.getData())) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前客户下未配置事件分类"); } int length = res.getData().get(NumConstant.ZERO).getCategoryCode().length(); formDTO.setCategoryOneLength(length); + if ("agency".equals(formDTO.getOrgType())) { + formDTO.setGridPids(getEventGridPids(formDTO.getOrgId())); + } List resList = baseDao.selectFirstCategoryTotal(formDTO); Map resMap = resList.stream().collect(Collectors.toMap(IcEventCategoryAnalysisResDTO::getCategoryCode, Function.identity())); From d8158f08bf592cc81c9dd736b585b17d7870820e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 16:13:53 +0800 Subject: [PATCH 040/147] color --- .../src/main/java/com/epmet/service/impl/IcEventServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 681fa25d76..43e74723e6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -659,6 +659,7 @@ public class IcEventServiceImpl extends BaseServiceImpl result = new ArrayList<>(); for (IssueProjectCategoryDictDTO dict : res.getData()) { IcEventCategoryAnalysisResDTO resultDto = ConvertUtils.sourceToTarget(dict, IcEventCategoryAnalysisResDTO.class); + resultDto.setColor(dict.getColour()); resultDto.setTotal(MapUtils.isNotEmpty(resMap) && resMap.containsKey(dict.getCategoryCode()) ? resMap.get(dict.getCategoryCode()).getTotal() : NumConstant.ZERO); result.add(resultDto); } From f54b3ec42d643b02c5171c5d49d3d4a0c1df74df Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 16:27:34 +0800 Subject: [PATCH 041/147] color --- .../main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java | 5 ++++- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java index b89917e0d7..fd18bc5569 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueProjectCategoryDictDTO.java @@ -118,5 +118,8 @@ public class IssueProjectCategoryDictDTO implements Serializable { * 颜色 */ private String colour; - + /** + * 颜色 + */ + private String color; } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 43e74723e6..681fa25d76 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -659,7 +659,6 @@ public class IcEventServiceImpl extends BaseServiceImpl result = new ArrayList<>(); for (IssueProjectCategoryDictDTO dict : res.getData()) { IcEventCategoryAnalysisResDTO resultDto = ConvertUtils.sourceToTarget(dict, IcEventCategoryAnalysisResDTO.class); - resultDto.setColor(dict.getColour()); resultDto.setTotal(MapUtils.isNotEmpty(resMap) && resMap.containsKey(dict.getCategoryCode()) ? resMap.get(dict.getCategoryCode()).getTotal() : NumConstant.ZERO); result.add(resultDto); } From 14b492e2b13706af7c13a77c5e47968666972f64 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 16:28:48 +0800 Subject: [PATCH 042/147] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=BD=AC=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=20+=20gridId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java | 2 ++ .../src/main/java/com/epmet/service/impl/IssueServiceImpl.java | 1 + .../main/java/com/epmet/service/impl/ProjectServiceImpl.java | 1 + 3 files changed, 4 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java index adb4ed7409..49d2afd9de 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java @@ -57,5 +57,7 @@ public class ShiftProjectFormDTO implements Serializable { */ private String customerId; + private String gridId; + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index fd4f54a866..8722a0c027 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -1014,6 +1014,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp //3:调用gov-project服务,新增项目各业务表初始数据 formDTO.setCategoryList(categoryList); + formDTO.setGridId(entity.getGridId()); List tagList = issueTagsService.getTagsByIssue(formDTO.getIssueId()); formDTO.setTagList(tagList); Result resultDTO = govProjectFeignClient.issueShiftProject(formDTO); 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 76a3149704..e0c7df913d 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 @@ -1162,6 +1162,7 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Wed, 18 May 2022 16:48:06 +0800 Subject: [PATCH 043/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86=5F?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventListFormDTO.java | 11 ++++ .../dto/result/IcEventListResultDTO.java | 20 ++++++- .../epmet/controller/IcEventController.java | 10 ++++ .../com/epmet/service/IcEventService.java | 7 +++ .../service/impl/IcEventServiceImpl.java | 59 ++++++++++++++++++- .../src/main/resources/mapper/IcEventDao.xml | 50 ++++++++-------- 6 files changed, 131 insertions(+), 26 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java index eb00fcf44d..207988f1fa 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -1,7 +1,10 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -12,6 +15,14 @@ import java.io.Serializable; public class IcEventListFormDTO implements Serializable { private static final long serialVersionUID = 9156247659994638103L; + public interface Detail extends CustomerClientShowGroup { + } + + /** + * 事件ID + */ + @NotBlank(message = "事件ID不能为空", groups = Detail.class) + private String icEventId; /** * 所属网格 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index 3e01ff4144..e5e6680ea8 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -1,9 +1,11 @@ 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; import java.util.List; @@ -18,7 +20,7 @@ public class IcEventListResultDTO implements Serializable { /** * 事件Id */ - private String eventId; + private String icEventId; /** * 网格ID */ @@ -39,10 +41,23 @@ public class IcEventListResultDTO implements Serializable { * 音频[url集合] */ private List voiceList; + /** + * 分类Id + */ + private String categoryId; + /** + * 分类名称(医疗-二类名) + */ + private String categoryName; /** * 上报渠道[字典表] */ private String sourceType; + /** + * 发生时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date happenTime; /** * 上报渠道 */ @@ -70,7 +85,8 @@ public class IcEventListResultDTO implements Serializable { /** * 上报时间 */ - private String createdTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdTime; /** * 状态【处理中:processing;已办结:closed_case】】 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 748155e3f2..cd04510c43 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -206,6 +206,16 @@ public class IcEventController { return new Result(); } + /** + * @Author sun + * @Description 事件管理-评价 + **/ + @PostMapping("detail") + public Result detail(@RequestBody IcEventListFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.Detail.class); + return new Result().ok(icEventService.detail(formDTO)); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 9fdbb15729..0021dc6bc7 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -125,4 +125,11 @@ public interface IcEventService extends BaseService { * @Description 事件管理-评价 **/ void comment(IcEventReplyFormDTO formDTO); + + /** + * @Author sun + * @Description 事件管理-评价 + **/ + IcEventListResultDTO detail(IcEventListFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 681fa25d76..e2ad6eef57 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -102,7 +102,7 @@ public class IcEventServiceImpl extends BaseServiceImpl gridInfoList = gridInfoRes.success() && !org.apache.commons.collections4.CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); Map gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName, (key1, key2) -> key2)); - //与户主关系字典表数据 + //事件管理字典表数据 Result> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT_SOURCE_TYPE.getCode()); Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); @@ -690,5 +690,62 @@ public class IcEventServiceImpl extends BaseServiceImpl list = baseDao.icEventList(formDTO); + if (!CollectionUtils.isEmpty(list)) { + resultDTO = list.get(0); + //查询网格名称(组织-网格) + List gridIds = list.stream().map(IcEventListResultDTO::getGridId).collect(Collectors.toList()).stream().distinct().collect(Collectors.toList()); + Result> gridInfoRes = govOrgOpenFeignClient.getGridListByGridIds(gridIds); + List gridInfoList = gridInfoRes.success() && !org.apache.commons.collections4.CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); + Map gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName, (key1, key2) -> key2)); + + //事件管理字典表数据 + Result> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.IC_EVENT_SOURCE_TYPE.getCode()); + Map statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); + + //封装数据 + if (gridInfoMap.containsKey(resultDTO.getGridId())) { + resultDTO.setGridName(gridInfoMap.get(resultDTO.getGridId())); + } + if (StringUtils.isNotBlank(resultDTO.getSourceType())) { + resultDTO.setSourceTypeName(statusMap.get(resultDTO.getSourceType())); + } + //每个事件对应的图片数据 + List imageList = new ArrayList<>(); + List voiceList = new ArrayList<>(); + resultDTO.getAttachmentList().forEach(file -> { + if ("image".equals(file.getType())) { + imageList.add(file.getUrl()); + } else if ("voice".equals(file.getType())) { + voiceList.add(file.getUrl()); + } + }); + resultDTO.setImageList(imageList); + resultDTO.setVoiceList(voiceList); + + //分类信息 + if(StringUtils.isNotBlank(resultDTO.getCategoryId())){ + List categoryList = new ArrayList<>(); + categoryList.add(resultDTO.getCategoryId()); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ + if (ca.getId().equals(resultDTO.getCategoryId())) { + resultDTO.setCategoryName(ca.getParentCategoryName()+"-"+ca.getCategoryName()); + } + } + } + } + + return resultDTO; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index abab8e75ed..695333d2cb 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -3,27 +3,6 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + select STATUS status, count(1) eventCount from ic_event e @@ -168,4 +183,15 @@ ORDER BY total DESC + + + \ No newline at end of file From adde2eee217564a8804a55765e5e790e49018260 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 17:48:53 +0800 Subject: [PATCH 046/147] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=BD=AC=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=B7=BB=E5=8A=A0=E5=8D=8F=E5=8A=9E=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/form/ShiftProjectFormDTO.java | 10 ++++++++++ .../com/epmet/service/impl/ProjectServiceImpl.java | 2 ++ 2 files changed, 12 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java index 49d2afd9de..e136ff04fa 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/ShiftProjectFormDTO.java @@ -59,5 +59,15 @@ public class ShiftProjectFormDTO implements Serializable { private String gridId; + /** + * 协办单位ID + */ + private String assistanceUnitId; + + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + private String assistanceUnitType; + } 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 e0c7df913d..ad8d3ebbda 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 @@ -1177,6 +1177,8 @@ public class ProjectServiceImpl extends BaseServiceImpl { if (issueDTO.getOrgId().equals(agency.getId())) { processEntity.setDepartmentName(agency.getOrganizationName()); From 500c24baefd60c554f5a35e58d3152b503401a3b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 17:56:23 +0800 Subject: [PATCH 047/147] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/task/AutoEvaluationTask.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java new file mode 100644 index 0000000000..348d37bbad --- /dev/null +++ b/epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/task/AutoEvaluationTask.java @@ -0,0 +1,31 @@ +package com.epmet.task; + +import com.alibaba.fastjson.JSON; +import com.epmet.dto.form.AutoEvaluationFormDTO; +import com.epmet.feign.GovProjectOpenFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @Author zxc + * @DateTime 2022/5/18 17:53 + * @DESC + */ +@Slf4j +@Component("autoEvaluationTask") +public class AutoEvaluationTask implements ITask{ + + @Autowired + private GovProjectOpenFeignClient projectOpenFeignClient; + + @Override + public void run(String params) { + AutoEvaluationFormDTO formDTO = new AutoEvaluationFormDTO(); + if (StringUtils.isNotBlank(params)) { + formDTO = JSON.parseObject(params, AutoEvaluationFormDTO.class); + } + projectOpenFeignClient.autoEvaluation(formDTO); + } +} From 5a0f3c1845eeab4b9014a558bb8248c22aa092fd Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 18:12:46 +0800 Subject: [PATCH 048/147] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A5=BC2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/SubOrgResDTO.java | 20 ++++++++++++++++ .../epmet/feign/GovOrgOpenFeignClient.java | 8 +++++++ .../GovOrgOpenFeignClientFallback.java | 11 +++++++++ .../controller/CustomerAgencyController.java | 12 ++++++++++ .../java/com/epmet/dao/CustomerAgencyDao.java | 1 + .../epmet/service/CustomerAgencyService.java | 7 ++++++ .../impl/CustomerAgencyServiceImpl.java | 11 +++++++++ .../resources/mapper/CustomerAgencyDao.xml | 22 +++++++++++++++++ .../dto/result/IcEventAnalysisOrgResDTO.java | 1 + .../main/java/com/epmet/dao/IcEventDao.java | 10 ++++++++ .../service/impl/IcEventServiceImpl.java | 24 +++++++++++++++++-- .../src/main/resources/mapper/IcEventDao.xml | 24 +++++++++++++++++++ 12 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java new file mode 100644 index 0000000000..220c5c5bbf --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 当前组织的直属下级(下级组织+直属网格) + */ +@Data +public class SubOrgResDTO implements Serializable { + private String orgId; + /** + * agency + * grid + */ + private String orgType; + private String orgName; +} 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 e2c0ae2359..7e21d51a83 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 @@ -624,4 +624,12 @@ public interface GovOrgOpenFeignClient { */ @PostMapping("/gov/org/house/houseupdate") Result houseUpdate(@RequestBody IcHouseAddFormDTO formDTO); + + /** + * 直属网格+下一级组织 + * @param agencyId + * @return + */ + @GetMapping("/gov/org/customeragency/subOrgList/{agencyId}") + Result> subOrgList(@PathVariable("agencyId")String agencyId); } 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 595fd11928..adac11545a 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 @@ -403,4 +403,15 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { public Result houseUpdate( IcHouseAddFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "houseUpdate",formDTO); } + + /** + * 直属网格+下一级组织 + * + * @param agencyId + * @return + */ + @Override + public Result> subOrgList(String agencyId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "subOrgList",agencyId); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index e097d3b38d..0cd507876d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -415,4 +415,16 @@ public class CustomerAgencyController { return new Result().ok(customerAgencyService.rootAgencyGridTree(formDTO.getAgencyId())); } + /** + * 当前agencyId的下一级组织+直属网格 + * @param agencyId + * @return + */ + @GetMapping("subOrgList/{agencyId}") + public Result> subOrgList(@PathVariable("agencyId") String agencyId) { + List list = customerAgencyService.subOrgList(agencyId); + return new Result>().ok(list); + } + + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index 5e7cd8713a..d81fcd8367 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -316,5 +316,6 @@ public interface CustomerAgencyDao extends BaseDao { */ List getCommunityList(@Param("customerId")String customerId, @Param("agencyId")String agencyId); + List selectSubOrg(String agencyId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index 855fae6038..a8c661d76b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -288,4 +288,11 @@ public interface CustomerAgencyService extends BaseService * @author sun **/ AgencyTreeResultDTO rootAgencyGridTree(String agencyId); + + /** + * 当前agencyId的下一级组织+直属网格 + * @param agencyId + * @return + */ + List subOrgList(String agencyId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index ceb47e21f9..3206792b9b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -1442,4 +1442,15 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl subOrgList(String agencyId) { + return baseDao.selectSubOrg(agencyId); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index d8314ee8b5..b53781ea0e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -756,4 +756,26 @@ AND CUSTOMER_ID = #{customerId} AND pids LIKE concat('%',#{agencyId}, '%' ) + + diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java index 14210200d4..cc6d31f72c 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventAnalysisOrgResDTO.java @@ -5,6 +5,7 @@ import lombok.Data; import java.io.Serializable; + @Data public class IcEventAnalysisOrgResDTO implements Serializable { private String orgId; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index bdd23f869f..4fb2e23858 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -83,4 +83,14 @@ public interface IcEventDao extends BaseDao { * @return */ List selectFirstCategoryTotal(IcEventCategoryAnalysisFormDTO formDTO); + + Integer selectGridTotal(String gridId); + + /** + * + * @param orgId + * @param orgType + * @return + */ + Integer selectOrgTotal(@Param("orgId") String orgId, @Param("orgType") String orgType); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 837943cae4..a2095b5cf8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -755,8 +755,28 @@ public class IcEventServiceImpl extends BaseServiceImpl analysisOrgTotal(IcEventCategoryAnalysisFormDTO formDTO) { - //todo - return null; + List list = new ArrayList<>(); + if ("grid".equals(formDTO.getOrgType())) { + GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(formDTO.getOrgId()); + if (null == gridInfoCache) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "网格信息查询异常"); + } + IcEventAnalysisOrgResDTO grid = ConvertUtils.sourceToTarget(formDTO,IcEventAnalysisOrgResDTO.class); + grid.setOrgName(gridInfoCache.getGridName()); + grid.setTotal(baseDao.selectGridTotal(formDTO.getOrgId())); + list.add(grid); + return list; + } + Result> subOrgListRes = govOrgOpenFeignClient.subOrgList(formDTO.getOrgId()); + if (!subOrgListRes.success() || CollectionUtils.isEmpty(subOrgListRes.getData())) { + return list; + } + for (SubOrgResDTO org : subOrgListRes.getData()) { + IcEventAnalysisOrgResDTO resultDto = ConvertUtils.sourceToTarget(org, IcEventAnalysisOrgResDTO.class); + resultDto.setTotal(baseDao.selectOrgTotal(org.getOrgId(), org.getOrgType())); + list.add(resultDto); + } + return list; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 695333d2cb..468c4cb01c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -168,4 +168,28 @@ ORDER BY total DESC + + + \ No newline at end of file From 26a46ad355d074c7e1733886129f69a61ee21346 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 18:13:44 +0800 Subject: [PATCH 049/147] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/IcEventDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index fc4b500258..d926893b75 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -191,6 +191,7 @@ WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} AND `STATUS` = 'closed_case' + AND SATISFACTION = null AND UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(CLOSE_CASE_TIME) > 60*60*24*7 LIMIT #{no},#{size} From da701740221fc7ced66deb73d2e67dc9a754a54b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 18 May 2022 18:28:22 +0800 Subject: [PATCH 050/147] =?UTF-8?q?=E5=9E=83=E5=9C=BE=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcEventOperationLogDTO.java | 19 +++++++-- .../epmet/dto/form/IcEventReplyFormDTO.java | 4 +- .../epmet/controller/IcEventController.java | 10 +++++ .../com/epmet/dao/IcEventOperationLogDao.java | 8 +++- .../java/com/epmet/dao/IcEventReplyDao.java | 8 +++- .../entity/IcEventOperationLogEntity.java | 14 ++++++- .../service/IcEventOperationLogService.java | 4 ++ .../epmet/service/IcEventReplyService.java | 4 ++ .../com/epmet/service/IcEventService.java | 6 +++ .../impl/IcEventOperationLogServiceImpl.java | 7 ++++ .../service/impl/IcEventReplyServiceImpl.java | 7 ++++ .../service/impl/IcEventServiceImpl.java | 40 +++++++++++++++++-- .../mapper/IcEventOperationLogDao.xml | 18 ++++++++- .../main/resources/mapper/IcEventReplyDao.xml | 16 +++++++- 14 files changed, 151 insertions(+), 14 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java index ebe242b7ff..a70e211c41 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventOperationLogDTO.java @@ -47,8 +47,9 @@ public class IcEventOperationLogDTO implements Serializable { * 3、立项:shift_project; * 4、转需求:shift_demand * 5、办结:close_case; + * 6、需求办结:close_demand */ - private String actionCode; + private String actionCode; /** * 1、发布事件:publish; @@ -57,16 +58,26 @@ public class IcEventOperationLogDTO implements Serializable { * 4、立项:shift_project; * 5、转需求: shift_demand; * 6、办结:close_case; - * 7、选择是否已解决:choose_resolve; - * 8、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + * 7、需求办结:close_demand; + * 8、选择是否已解决:choose_resolve; + * 9、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; */ - private String actionDesc; + private String actionDesc; /** * 操作时间 */ private Date operateTime; + /** + * 服务方【事件被转需求,需求在办结时的服务方名称】 + */ + private String serviceParty; + /** + * 实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】 + */ + private String actualServiceTime; + /** * 删除标识 1删除;0未删除 */ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java index 1060909db2..bdcb68045c 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java @@ -17,11 +17,13 @@ public class IcEventReplyFormDTO implements Serializable { private static final long serialVersionUID = 1L; public interface Comment extends CustomerClientShowGroup { } + public interface Process extends CustomerClientShowGroup { + } /** * 事件ID */ - @NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class, Comment.class}) + @NotBlank(message = "事件ID不能为空", groups = {UpdateGroup.class, Comment.class, Process.class}) private String icEventId; /** * 二类分类Id diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index e7bd4256db..ff20f0ab60 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Date; +import java.util.LinkedList; import java.util.List; /** @@ -229,6 +230,15 @@ public class IcEventController { List list = icEventService.analysisOrgTotal(formDTO); return new Result>().ok(list); } + /** + * @Author sun + * @Description 事件管理-处理进展 + **/ + @PostMapping("process") + public Result> process(@RequestBody IcEventReplyFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcEventReplyFormDTO.Process.class); + return new Result>().ok(icEventService.process(formDTO)); + } /** * Desc: 定时任务自动评价 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java index 08fb7a82dc..50f87e388b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventOperationLogDao.java @@ -1,8 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventOperationLogEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.LinkedList; /** * 事件操作日志表 @@ -12,5 +16,7 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventOperationLogDao extends BaseDao { - + + LinkedList selectByEventId(@Param("icEventId") String icEventId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java index 65a0b893d7..3476a57639 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java @@ -1,8 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventReplyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.LinkedList; /** * 事件回复表 @@ -12,5 +16,7 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventReplyDao extends BaseDao { - + + LinkedList selectByEventId(@Param("icEventId") String icEventId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java index c9c08f1951..209d70d4f3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventOperationLogEntity.java @@ -47,6 +47,7 @@ public class IcEventOperationLogEntity extends BaseEpmetEntity { * 3、立项:shift_project; * 4、转需求:shift_demand * 5、办结:close_case; + * 6、需求办结:close_demand */ private String actionCode; @@ -57,8 +58,9 @@ public class IcEventOperationLogEntity extends BaseEpmetEntity { * 4、立项:shift_project; * 5、转需求: shift_demand; * 6、办结:close_case; - * 7、选择是否已解决:choose_resolve; - * 8、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; + * 7、需求办结:close_demand; + * 8、选择是否已解决:choose_resolve; + * 9、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中; */ private String actionDesc; @@ -66,5 +68,13 @@ public class IcEventOperationLogEntity extends BaseEpmetEntity { * 操作时间 */ private Date operateTime; + /** + * 服务方【事件被转需求,需求在办结时的服务方名称】 + */ + private String serviceParty; + /** + * 实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】 + */ + private String actualServiceTime; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java index 87706a7c52..9b811b09cd 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventOperationLogService.java @@ -3,8 +3,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventOperationLogDTO; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventOperationLogEntity; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -75,4 +77,6 @@ public interface IcEventOperationLogService extends BaseService getByEventId(String icEventId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java index 6f30e79285..2be7f4127c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java @@ -3,8 +3,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventReplyDTO; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventReplyEntity; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -75,4 +77,6 @@ public interface IcEventReplyService extends BaseService { * @date 2022-05-17 */ void delete(String[] ids); + + LinkedList getByEventId(String icEventId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 7e9e082aae..e2fc9bf574 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -8,6 +8,7 @@ import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; import java.util.Date; +import java.util.LinkedList; import java.util.List; /** @@ -140,6 +141,11 @@ public interface IcEventService extends BaseService { **/ IcEventListResultDTO detail(IcEventListFormDTO formDTO); + /** + * @Author sun + * @Description 事件管理-处理进展 + **/ + LinkedList process(IcEventReplyFormDTO formDTO); /** * 事件分类分析- 饼图2,直属下级 事件数量 * @param formDTO diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java index 7eea43a96e..4ac89f9c94 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventOperationLogServiceImpl.java @@ -8,6 +8,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IcEventOperationLogDao; import com.epmet.dto.IcEventOperationLogDTO; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventOperationLogEntity; import com.epmet.service.IcEventOperationLogService; import org.apache.commons.lang3.StringUtils; @@ -15,6 +16,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -80,4 +82,9 @@ public class IcEventOperationLogServiceImpl extends BaseServiceImpl getByEventId(String icEventId) { + return baseDao.selectByEventId(icEventId); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java index 86f09b900c..a5e6eabb4d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java @@ -8,6 +8,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IcEventReplyDao; import com.epmet.dto.IcEventReplyDTO; +import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventReplyEntity; import com.epmet.service.IcEventReplyService; import org.apache.commons.lang3.StringUtils; @@ -15,6 +16,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -80,4 +82,9 @@ public class IcEventReplyServiceImpl extends BaseServiceImpl getByEventId(String icEventId) { + return baseDao.selectByEventId(icEventId); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 4e65f71162..ef1b45375b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -47,7 +47,6 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.time.LocalDate; import java.util.*; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; @@ -61,6 +60,7 @@ import java.util.stream.Collectors; */ @Slf4j @Service + public class IcEventServiceImpl extends BaseServiceImpl implements IcEventService, ResultDataResolver { @Value("${openapi.scan.server.url}") @@ -296,8 +296,7 @@ public class IcEventServiceImpl extends BaseServiceImpl process(IcEventReplyFormDTO formDTO) { + LinkedList resultList = new LinkedList(); + //1.查询事件基础信息 + IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId()); + if (null == entity) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件不存在"); + } + + //2.查询事件回复信息 + LinkedList event = icEventReplyService.getByEventId(formDTO.getIcEventId()); + + + //3.判断查询事件项目进展或需求进展信息 + //项目进展 + if ("1".equals(entity.getOperationType())) { + ProcessListV2FormDTO processListV2FormDTO = new ProcessListV2FormDTO(); + processListV2FormDTO.setProjectId(entity.getOperationId()); + List project = projectTraceService.processListV2(processListV2FormDTO); + resultList.addAll(ConvertUtils.sourceToTarget(project, IcEventProcessListResultDTO.class)); + } + //需求进展 + if ("2".equals(entity.getOperationType())) { + LinkedList demand = icEventOperationLogService.getByEventId(formDTO.getIcEventId()); + resultList.addAll(demand); + } + resultList.addAll(event); + + return resultList; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml index 259d73aa3e..76994c7fc8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventOperationLogDao.xml @@ -3,6 +3,22 @@ - + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml index 11d5ebf740..a6e7111674 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml @@ -3,6 +3,20 @@ - + \ No newline at end of file From ee27343a21f5204050090e76981eae0fbf06cf67 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 18 May 2022 18:40:41 +0800 Subject: [PATCH 051/147] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A5=BC2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/IcEventDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 85f85ad2a8..c19e06f6b6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -206,7 +206,7 @@ @@ -54,8 +54,8 @@ inner join ic_event_category c on (e.ID = c.IC_EVENT_ID) e.CUSTOMER_ID = #{customerId} - and e.CREATED_TIME >= #{queryStartTime} - and e.CREATED_TIME #{queryEndTime} + and e.HAPPEN_TIME >= #{queryStartTime} + and e.HAPPEN_TIME #{queryEndTime} and e.GRID_PIDS like CONCAT(#{gridPids},'%') @@ -69,6 +69,7 @@ and c.CATEGORY_CODE = #{categoryCode} + order by CREATE_TIME desc + + \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index f97eb6f53d..17f94a25c0 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -748,4 +748,20 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/icresiuser/getResiUserGroupHomeId") Result> getHouseMemberList(@RequestBody RentTenantDataFormDTO formDTO); + + /** + * 使用身份证号查询家属信息 + * @param idCard + * @return + */ + @GetMapping("/epmetuser/icresiuser/findFamilyMemByIdCard/{id-card}") + Result findFamilyMemByIdCard(@PathVariable("id-card") String idCard); + + /** + * 身份证号查询居民信息 + * @param idCard + * @return + */ + @PostMapping("/epmetuser/icresiuser/getByResiIdCard/{idcard}") + Result getByResiIdCard(@PathVariable("idcard") String idCard); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 1389394e78..91c1769eeb 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -548,4 +548,13 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getHouseMemberList", formDTO); } + @Override + public Result findFamilyMemByIdCard(String idCard) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "findFamilyMemByIdCard", idCard); + } + + @Override + public Result getByResiIdCard(String idCard) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getByResiIdCard", idCard); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 30c9a10bc2..61d75723b7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -52,6 +52,7 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.entity.IcResiUserEntity; import com.epmet.enums.IcResiUserTableEnum; import com.epmet.excel.PartyMemberAgeExportExcel; import com.epmet.excel.PartyMemberEducationExportExcel; @@ -1037,4 +1038,26 @@ public class IcResiUserController implements ResultDataResolver { Result> getResiUserGroupHomeId(@RequestBody RentTenantDataFormDTO formDTO) { return new Result().ok(icResiUserService.getResiUserGroupHomeId(formDTO)); } + + /** + * 使用身份证号查询家属信息 + * @param idCard + * @return + */ + @GetMapping("findFamilyMemByIdCard/{id-card}") + public Result findFamilyMemByIdCard(@PathVariable("id-card") String idCard) { + IcResiUserBriefDTO r = icResiUserService.findFamilyMemByIdCard(idCard); + return new Result().ok(r); + } + + /** + * 身份证号查询居民信息 + * @param idCard + * @return + */ + @PostMapping("getByResiIdCard/{idcard}") + public Result getByResiIdCard(@PathVariable("idcard") String idCard) { + IcResiUserDTO resi = icResiUserService.getByResiId(idCard); + return new Result().ok(resi); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index b9a9592509..7743f6594c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -334,4 +334,8 @@ public interface IcResiUserService extends BaseService { * @return */ List getResiUserGroupHomeId(RentTenantDataFormDTO formDTO); + + IcResiUserBriefDTO findFamilyMemByIdCard(String idCard); + + IcResiUserDTO getByResiId(String idCard); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index bc6582d1e0..d8c1157794 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -41,10 +41,7 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.utils.SpringContextUtils; +import com.epmet.commons.tools.utils.*; import com.epmet.constant.IcPlatformConstant; import com.epmet.constant.IcResiUserConstant; import com.epmet.constant.UserConstant; @@ -1929,4 +1926,18 @@ public class IcResiUserServiceImpl extends BaseServiceImpl o1)); } + @Override + public IcResiUserBriefDTO findFamilyMemByIdCard(String idCard) { + IcResiUserDTO resi = baseDao.getResiUserByIdCard(idCard, EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID)); + if (resi == null) { + return null; + } + + return baseDao.selectIcResuUser(resi.getId()); + } + + @Override + public IcResiUserDTO getByResiId(String idCard) { + return baseDao.getResiUserByIdCard(idCard, EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID)); + } } From 04b7c2c4f3cbf5afa050f943301d71755a4e8af2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 19 May 2022 08:58:49 +0800 Subject: [PATCH 053/147] =?UTF-8?q?=E5=A4=9A=E5=85=83=E9=A5=BC=E5=92=8C?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=88=86=E7=B1=BB=E9=A2=9C=E8=89=B2=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/enums/SelfOrgCategoryEnum.java | 59 +++++++++++++++++++ .../CommunitySelfOrganizationListDTO.java | 5 ++ .../result/SelfOrgCategoryTotalResDTO.java | 1 + ...cCommunitySelfOrganizationServiceImpl.java | 8 ++- 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java new file mode 100644 index 0000000000..e08af03017 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java @@ -0,0 +1,59 @@ +package com.epmet.commons.tools.enums; + +/** + * 社区自组织增加分类:文化队伍、楼委会、老友俱乐部、治安巡逻队、其他 + */ +public enum SelfOrgCategoryEnum { + + /** + * 环境变量枚举 + */ + + WHDW("whdw", "文化队伍", "#0091ed", 1), + LWH("lwh", "楼委会", "#0091ed", 2), + LYJLB("lyjlb", "老友俱乐部", "#0091ed", 3), + ZAXLD("zaxld", "治安巡逻队", "#0091ed", 4), + OTHER("other", "其他", "#0091ed", 5), + ; + + private final String code; + private final String name; + private final String color; + private final Integer sort; + + + SelfOrgCategoryEnum(String code, String name, String color, Integer sort) { + this.code = code; + this.name = name; + this.color = color; + this.sort = sort; + } + + public static SelfOrgCategoryEnum getEnum(String code) { + SelfOrgCategoryEnum[] values = SelfOrgCategoryEnum.values(); + for (SelfOrgCategoryEnum value : values) { + if (value.getCode().equals(code)) { + return value; + } + } + return SelfOrgCategoryEnum.OTHER; + + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public String getColor() { + return color; + } + + public Integer getSort() { + return sort; + } + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java index 6ca4a94d25..563ccf0928 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java @@ -42,6 +42,11 @@ public class CommunitySelfOrganizationListDTO implements Serializable { */ private String categoryName; + /** + * 分类的颜色 用于多元数据分析-地图 + */ + private String color; + /** * 服务事项 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java index b79436c9d0..c99e723d0f 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SelfOrgCategoryTotalResDTO.java @@ -17,4 +17,5 @@ public class SelfOrgCategoryTotalResDTO implements Serializable { * 当前分类下的社区自组织数量 */ private Integer total; + private String color; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 11bfd15d36..7a70df7777 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -13,6 +13,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.DictTypeEnum; +import com.epmet.commons.tools.enums.SelfOrgCategoryEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; @@ -728,6 +729,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl pageInfo= PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCoordinateList(formDTO)); - return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); + List list=pageInfo.getList(); + for(CommunitySelfOrganizationListDTO dto:list){ + dto.setColor(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getColor()); + } + return new PageData<>(list, pageInfo.getTotal()); } } From 70a604390eb86e5b969a643ed83b6cb05a1356dc Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 19 May 2022 09:03:33 +0800 Subject: [PATCH 054/147] =?UTF-8?q?=E6=BC=8F=E6=8F=90=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/IcEventProcessListResultDTO.java | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventProcessListResultDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventProcessListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventProcessListResultDTO.java new file mode 100644 index 0000000000..65d28e6501 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventProcessListResultDTO.java @@ -0,0 +1,72 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/12/21 下午3:31 + */ +@Data +public class IcEventProcessListResultDTO implements Serializable { + + private static final long serialVersionUID = 5762152044573235897L; + + /** + * 进展Id + */ + private String processId; + + /** + * 处理进展名称 + */ + private String processName; + + /** + * 处理进展时间 + */ + private Long processTime; + + /** + * 处理部门 + */ + private String departmentName; + /** + * 公开答复 + */ + private String publicReply; + /** + * 协办单位类型,1社区自组织,2联建单位 + */ + @JsonIgnore + private String assistanceUnitType; + /** + * 协办单位ID + */ + private String assistanceUnitId; + /** + * 协办单位名字 + */ + private String assistanceUnitName; + /** + * 回复event 项目project 需求demand + */ + private String type; + /** + * 服务方【事件被转需求,需求在办结时的服务方名称】 + */ + private String serviceParty; + /** + * 服务时间 + */ + private String serviceTime; + /** + * 实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】 + */ + private String actualServiceTime; + +} From 07ec1735c64f312f94b1bf8e20c10a1723952e40 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 19 May 2022 09:19:56 +0800 Subject: [PATCH 055/147] =?UTF-8?q?=E8=89=B2=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/enums/SelfOrgCategoryEnum.java | 15 ++++++++++----- .../IcCommunitySelfOrganizationServiceImpl.java | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java index e08af03017..9be9765927 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/SelfOrgCategoryEnum.java @@ -4,16 +4,21 @@ package com.epmet.commons.tools.enums; * 社区自组织增加分类:文化队伍、楼委会、老友俱乐部、治安巡逻队、其他 */ public enum SelfOrgCategoryEnum { + // 文化队伍: #e70014 + // 楼委会: #f59701 + // 老友俱乐部: #8fc41e + // 治安巡逻队: #00a1be + // 其他: #0067b6 /** * 环境变量枚举 */ - WHDW("whdw", "文化队伍", "#0091ed", 1), - LWH("lwh", "楼委会", "#0091ed", 2), - LYJLB("lyjlb", "老友俱乐部", "#0091ed", 3), - ZAXLD("zaxld", "治安巡逻队", "#0091ed", 4), - OTHER("other", "其他", "#0091ed", 5), + WHDW("whdw", "文化队伍", "#e70014", 1), + LWH("lwh", "楼委会", "#f59701", 2), + LYJLB("lyjlb", "老友俱乐部", "#8fc41e", 3), + ZAXLD("zaxld", "治安巡逻队", "#00a1be", 4), + OTHER("other", "其他", "#0067b6", 5), ; private final String code; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 7a70df7777..98c63a60c4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -771,7 +771,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl pageInfo= PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.queryCoordinateList(formDTO)); List list=pageInfo.getList(); - for(CommunitySelfOrganizationListDTO dto:list){ + for (CommunitySelfOrganizationListDTO dto : list) { dto.setColor(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getColor()); } return new PageData<>(list, pageInfo.getTotal()); From b546f7afbb6216bd9f2e79891f01b9af41340f5b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 19 May 2022 09:23:26 +0800 Subject: [PATCH 056/147] import --- .../main/java/com/epmet/controller/IcEventController.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index a5d7ac3a93..380adb33c4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -13,10 +13,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; @@ -256,7 +253,7 @@ public class IcEventController { public Result> analysisOrgTotal(@LoginUser TokenDto tokenDto, @RequestBody IcEventCategoryAnalysisFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setStaffId(tokenDto.getUserId()); - ValidatorUtils.validateEntity(formDTO,IcEventCategoryAnalysisFormDTO.OrgTotalPie.class); + ValidatorUtils.validateEntity(formDTO, IcEventCategoryAnalysisFormDTO.OrgTotalPie.class); List list = icEventService.analysisOrgTotal(formDTO); return new Result>().ok(list); } From 02bc885118e8e2a6ca964d82f88a3dc67713d40f Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 19 May 2022 09:29:11 +0800 Subject: [PATCH 057/147] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E7=A0=94=E5=88=A4=E5=88=86=E6=9E=90+=E5=90=8C?= =?UTF-8?q?=E7=B1=BB=E4=BA=8B=E4=BB=B6=E5=88=97=E8=A1=A8=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/IcEventController.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index a5d7ac3a93..ddb1f44035 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -13,10 +13,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.EventProcessAnalysisCommonFormDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.form.ProcessAnalysisEventListFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; From 09d680ec7171b495044274fed0a7e6585a85b4c2 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 19 May 2022 10:36:47 +0800 Subject: [PATCH 058/147] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=93=E6=A1=88?= =?UTF-8?q?=E3=80=81=E9=9C=80=E6=B1=82=E5=AE=8C=E6=88=90=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IcUserDemandRecDTO.java | 9 ++ .../epmet/entity/IcUserDemandRecEntity.java | 8 ++ .../impl/IcUserDemandRecServiceImpl.java | 29 +++++- .../dto/form/ColseProjectOrDemandFormDTO.java | 25 +++++ .../com/epmet/dto/form/IcDemandFormDTO.java | 94 ++++++++++++------- .../epmet/dto/form/ProjectClosedFromDTO.java | 2 + .../feign/GovProjectOpenFeignClient.java | 9 ++ .../GovProjectOpenFeignClientFallback.java | 5 + .../epmet/controller/IcEventController.java | 13 ++- .../com/epmet/service/IcEventService.java | 6 ++ .../service/impl/IcEventServiceImpl.java | 37 ++++++++ .../service/impl/ProjectServiceImpl.java | 14 +++ .../service/impl/ProjectTraceServiceImpl.java | 1 + 13 files changed, 211 insertions(+), 41 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java index 30b24a8498..79168ae29e 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java @@ -150,6 +150,15 @@ public class IcUserDemandRecDTO implements Serializable { */ private Integer awardPoint; + /** + * 来源[需求录入:demand 事件管理:ic_event] + */ + private String origin; + /** + * 来源Id[目前只有来源事件管理的有值] + */ + private String originId; + /** * 删除标识:0.未删除 1.已删除 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java index 0d54cd6184..84d9de8e64 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java @@ -171,4 +171,12 @@ public class IcUserDemandRecEntity extends BaseEpmetEntity { * 需求人是ic的居民时,记录下住的房屋id */ private String demandUserHouseId; + /** + * 来源[需求录入:demand 事件管理:ic_event] + */ + private String origin; + /** + * 来源Id[目前只有来源事件管理的有值] + */ + private String originId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index fd5552644f..af160a4303 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -36,6 +36,7 @@ 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.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.constant.ReadFlagConstant; @@ -51,10 +52,7 @@ import com.epmet.dto.form.demand.*; import com.epmet.dto.result.*; import com.epmet.dto.result.demand.*; import com.epmet.entity.*; -import com.epmet.feign.EpmetAdminOpenFeignClient; -import com.epmet.feign.EpmetMessageOpenFeignClient; -import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.feign.*; import com.epmet.service.*; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -108,6 +106,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl> serviceTypeRes=adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_SERVICE_TYPE.getCode()); + Map serviceTypeMap=serviceTypeRes.success()&& MapUtils.isNotEmpty(serviceTypeRes.getData())?serviceTypeRes.getData():new HashMap<>(); + //服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + String str = serviceTypeMap.containsKey(serviceEntity.getServiceType())?serviceEntity.getServerName().concat("(").concat(serviceTypeMap.get(serviceEntity.getServiceType())).concat(")"):StrConstant.EPMETY_STR; + + ColseProjectOrDemandFormDTO dto = new ColseProjectOrDemandFormDTO(); + dto.setCustomerId(formDTO.getCustomerId()); + dto.setUserId(formDTO.getUserId()); + dto.setIcEventId(entity.getOriginId()); + dto.setType("demand"); + dto.setServiceParty(str); + dto.setActualServiceTime(DateUtils.format(formDTO.getServiceStartTime(), DateUtils.DATE_TIME_PATTERN)+"至"+DateUtils.format(formDTO.getServiceEndTime(), DateUtils.DATE_TIME_PATTERN)); + Result result = govProjectOpenFeignClient.closeProjectOrDemand(dto); + if (!result.success()) { + throw new RenException("需求完成,修改事件管理数据失败..."); + } + } + //2022-5-19 sun end return finishResultDTO; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java new file mode 100644 index 0000000000..19e7d38344 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 需求完成/项目结案时 修改事件数据 + */ +@Data +public class ColseProjectOrDemandFormDTO implements Serializable { + private static final long serialVersionUID = -590440160577071133L; + //事件管理Id + private String icEventId; + //类型 需求:demand 项目:project + private String type; + //服务方【事件被转需求,需求在办结时的服务方名称】 + private String serviceParty; + //实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】 + private String actualServiceTime; + + private String customerId; + private String userId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java index 78c5c7becc..a856cb938e 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java @@ -16,100 +16,122 @@ import java.util.Date; */ @Data public class IcDemandFormDTO implements Serializable { - private static final long serialVersionUID = -2931148629441558468L; - public interface Add extends CustomerClientShowGroup { - } + private static final long serialVersionUID = 1589287946950749226L; - public interface AddInternalGroup { + public interface AddUserInternalGroup { } - public interface Update extends CustomerClientShowGroup { + public interface AddUserShowGroup extends CustomerClientShowGroup { } - public interface UpdateInternalGroup { } - @NotBlank(message = "事件id不能为空",groups = AddInternalGroup.class) + @NotBlank(message = "事件id不能为空",groups = AddUserInternalGroup.class) private String icEventId; @NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class) private String demandRecId; - @NotBlank(message = "customerId不能为空", groups = {AddInternalGroup.class, UpdateInternalGroup.class}) private String customerId; + private String currentUserId; + /** * 网格id */ - @NotBlank(message = "所属网格不能为空",groups = {AddInternalGroup.class}) + @NotBlank(message = "所属网格不能为空",groups = AddUserShowGroup.class) private String gridId; /** - * 需求内容1000字 + * 组织id */ - @NotBlank(message = "需求内容不能为空", groups = {Add.class, Update.class}) - @Length(max = 1000, message = "需求内容至多输入1000字", groups = {Add.class, Update.class}) - private String content; + private String agencyId; + + /** + * 网格的所有上级id + */ + private String gridPids; + + + /** * 二级需求分类编码 */ - @NotBlank(message = "需求类别不能为空",groups = Add.class) + @NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class) private String categoryCode; /** * 父级需求分类编码 */ - @NotBlank(message = "父级分类不能为空",groups = Add.class) + @NotBlank(message = "需求类别不能为空",groups = AddUserShowGroup.class) private String parentCode; + /** + * 需求内容1000字 + */ + @NotBlank(message = "需求内容不能为空",groups = AddUserShowGroup.class) + @Length(max = 1000,message = "需求内容至多输入1000字",groups = AddUserShowGroup.class) + private String content; /** - * 希望服务时间 + * 社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help */ - @NotNull(message = "服务时间不能为空",groups = {Add.class, Update.class}) + @NotBlank(message = "上报类型不能为空",groups = AddUserShowGroup.class) + private String reportType; + + /** + * 上报人姓名 + */ + @NotBlank(message = "上报人不能为空",groups = AddUserShowGroup.class) + private String reportUserName; + + /** + * 上报人联系方式。自身上报时存储注册居民的手机号 + */ + @NotBlank(message = "上报人联系方式不能为空",groups = AddUserShowGroup.class) + private String reportUserMobile; + + /** + * 上报时间 + */ + @NotNull(message = "上报时间不能为空",groups = AddUserShowGroup.class) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date wantServiceTime; + private Date reportTime; /** * 需求人:user.id或者ic_resi_user.id */ - @NotBlank(message = "需求人不能为空",groups ={AddInternalGroup.class, UpdateInternalGroup.class}) + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) private String demandUserId; /** - * 需求人联系姓名 + * 需求人姓名 */ - @NotBlank(message = "联系人不能为空",groups = {Add.class, Update.class}) + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) private String demandUserName; /** * 需求人联系电话 */ - @NotBlank(message = "联系电话不能为空",groups = {Add.class, Update.class}) + @NotNull(message = "需求人不能为空",groups = AddUserShowGroup.class) private String demandUserMobile; /** - * 服务地点,工作端指派默认居民居住房屋地址,居民端地图选择 - */ - @NotBlank(message = "服务地点不能为空",groups = {Add.class, Update.class}) - private String serviceLocation; - - /** - * 门牌号详细地址 + * 希望服务时间 */ - @Length(max = 200, message = "门牌号至多输入200字", groups = {Add.class, Update.class}) - private String locationDetail; + @NotNull(message = "服务时间不能为空",groups = AddUserShowGroup.class) + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date wantServiceTime; /** - * 经度,需求人是ic的居民时,取所住楼栋的中心点位 + * 来源[需求录入:demand 事件管理:ic_event] */ - private String longitude; - + private String origin; /** - * 纬度,需求人是ic的居民时,取所住楼栋的中心点位 + * 来源Id[目前只有来源事件管理的有值] */ - private String latitude; + private String originId; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java index 28e6177189..0bcd5405fb 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectClosedFromDTO.java @@ -65,4 +65,6 @@ public class ProjectClosedFromDTO implements Serializable { * 协办单位类型,1社区自组织,2联建单位 */ private String assistanceUnitType; + + private String customerId; } 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 c82c3f879b..1242d3064b 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 @@ -167,4 +167,13 @@ public interface GovProjectOpenFeignClient { */ @PostMapping("gov/project/icEvent/auto-evaluation") Result autoEvaluation(@RequestBody AutoEvaluationFormDTO formDTO); + + /** + * Desc: 需求完成/项目结案时 修改事件数据 + * @author sun + */ + @PostMapping("gov/project/icEvent/closeprojectordemand") + Result closeProjectOrDemand(@RequestBody ColseProjectOrDemandFormDTO formDTO); + + } 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 158569077b..49a969f91e 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 @@ -164,4 +164,9 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli public Result autoEvaluation(AutoEvaluationFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "autoEvaluation",formDTO); } + + @Override + public Result closeProjectOrDemand(ColseProjectOrDemandFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "closeProjectOrDemand",formDTO); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 380adb33c4..1540339644 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -200,7 +200,7 @@ public class IcEventController { public Result icEventToDemand(@LoginUser TokenDto tokenDto, @RequestBody IcDemandFormDTO formDTO){ formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setDemandUserId(tokenDto.getUserId()); - ValidatorUtils.validateEntity(formDTO, IcDemandFormDTO.Add.class,IcDemandFormDTO.AddInternalGroup.class); + ValidatorUtils.validateEntity(formDTO, IcDemandFormDTO.AddUserShowGroup.class, IcDemandFormDTO.AddUserInternalGroup.class); icEventService.icEventToDemand(formDTO); return new Result(); } @@ -257,6 +257,7 @@ public class IcEventController { List list = icEventService.analysisOrgTotal(formDTO); return new Result>().ok(list); } + /** * @Author sun * @Description 事件管理-处理进展 @@ -279,4 +280,14 @@ public class IcEventController { return new Result(); } + /** + * @Author sun + * @Description 需求完成/项目结案时 修改事件数据 + **/ + @PostMapping("closeprojectordemand") + public Result closeProjectOrDemand(@RequestBody ColseProjectOrDemandFormDTO formDTO) { + icEventService.closeProjectOrDemand(formDTO); + return new Result(); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 490acabd2a..11a1f63c4d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -171,4 +171,10 @@ public interface IcEventService extends BaseService { * @return */ List analysisOrgTotal(IcEventCategoryAnalysisFormDTO formDTO); + + /** + * @Author sun + * @Description 需求完成/项目结案时 修改事件数据 + **/ + void closeProjectOrDemand(ColseProjectOrDemandFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index df980f089c..5b8b5f69db 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -715,6 +715,8 @@ public class IcEventServiceImpl extends BaseServiceImpl recIdResult = epmetHeartOpenFeignClient.icEventToDemand(formDTO); if (!recIdResult.success() || recIdResult.getData() == null) { throw new RenException(recIdResult.getCode(), recIdResult.getMsg()); @@ -954,5 +956,40 @@ public class IcEventServiceImpl extends BaseServiceImpl%s", formDTO.getIcEventId())); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件不存在或已办结不允许修改"); + } + + //2.修改事件数据 + entity.setStatus("closed_case"); + entity.setCloseCaseTime(new Date()); + entity.setLatestOperatedTime(new Date()); + baseDao.updateById(entity); + + //3.判断新增操作记录 + if ("demand".equals(formDTO.getType())) { + IcEventOperationLogEntity logEntity = new IcEventOperationLogEntity(); + logEntity.setIcEventId(formDTO.getIcEventId()); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setUserId(formDTO.getUserId()); + logEntity.setUserIdentity("staff"); + logEntity.setActionCode("close_demand"); + logEntity.setActionDesc("close_demand"); + logEntity.setOperateTime(new Date()); + logEntity.setServiceParty(formDTO.getServiceParty()); + logEntity.setActualServiceTime(formDTO.getActualServiceTime()); + icEventOperationLogService.insert(logEntity); + } + } + } \ 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 ad8d3ebbda..cd4c7df3ab 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 @@ -152,6 +152,8 @@ public class ProjectServiceImpl extends BaseServiceImpl implements ProjectTraceS @Override public void closedV2(TokenDto tokenDto, ProjectClosedFromDTO fromDTO) { fromDTO.setUserId(tokenDto.getUserId()); + fromDTO.setCustomerId(tokenDto.getCustomerId()); projectService.closedV2(fromDTO); } From 47ffb5c28c2819cfd46d3d8cf5e84e745cbbeb02 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 19 May 2022 10:48:39 +0800 Subject: [PATCH 059/147] =?UTF-8?q?=E8=AF=A6=E6=83=85=E8=BF=94=E5=8F=82?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/IcEventListResultDTO.java | 34 ++++++++++++++----- .../epmet/controller/IcEventController.java | 2 +- .../service/impl/IcEventServiceImpl.java | 6 ++++ 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index e5e6680ea8..feae9034b9 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -41,14 +41,6 @@ public class IcEventListResultDTO implements Serializable { * 音频[url集合] */ private List voiceList; - /** - * 分类Id - */ - private String categoryId; - /** - * 分类名称(医疗-二类名) - */ - private String categoryName; /** * 上报渠道[字典表] */ @@ -100,6 +92,32 @@ public class IcEventListResultDTO implements Serializable { */ private String createdUserId; + /** + * 上级分类ID 顶级此列存储0 + */ + private String parentCategoryId; + /** + * 分类Id + */ + private String categoryId; + /** + * 上级分类编码 + */ + private String parentCategoryCode; + + /** + * 分类编码 + */ + private String categoryCode; + /** + * 上级分类名称 + */ + private String parentCategoryName; + /** + * 分类名称 + */ + private String categoryName; + /** * 事件附件 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 1540339644..2080575caf 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -235,7 +235,7 @@ public class IcEventController { /** * @Author sun - * @Description 事件管理-评价 + * @Description 事件管理-详情 **/ @PostMapping("detail") public Result detail(@RequestBody IcEventListFormDTO formDTO) { diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 5b8b5f69db..bcfb158e51 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -836,6 +836,12 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Thu, 19 May 2022 10:58:38 +0800 Subject: [PATCH 060/147] =?UTF-8?q?=E3=80=90=E4=BA=8B=E4=BB=B6=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=88=86=E6=9E=90=E3=80=91=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/ProcessStatusRatioResultDTO.java | 8 ++++---- .../java/com/epmet/service/impl/IcEventServiceImpl.java | 7 +++++++ .../src/main/resources/mapper/IcEventDao.xml | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java index b166788691..2028c30671 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProcessStatusRatioResultDTO.java @@ -4,8 +4,8 @@ import lombok.Data; @Data public class ProcessStatusRatioResultDTO { - private Long processingCount; - private Long closedCount; - private Double processingRatio; - private Double closedRatio; + private Long processingCount = 0l; + private Long closedCount = 0l; + private Double processingRatio = 0d; + private Double closedRatio = 0d; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index bcfb158e51..b8f983cd31 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -402,6 +402,10 @@ public class IcEventServiceImpl extends BaseServiceImpl dependents = new ArrayList<>(); + if (CollectionUtils.isEmpty(dependents)) { + return dependents; + } for (HouseUserDTO u : familyInfo.getHouseUserList()) { dependents.add(new IcEventYpAnalysisResultDTO.Dependent(u.getIcResiUserId(), u.getIcUserName())); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 100f641659..50c9bbdf6f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -63,7 +63,7 @@ and c.CATEGORY_CODE = #{categoryCode} - order by CREATE_TIME desc + order by e.CREATED_TIME desc - SELECT - ie.id icEventId, - ie.grid_id gridId, - ie.event_content eventContent, - ie.source_type sourceType, - ie.address address, - ie.`name` name, - ie.mobile mobile, - ie.satisfaction satisfaction, - IF(ie.satisfaction = 'bad','不满意',IF (ie.satisfaction = 'good','基本满意',IF (ie.satisfaction = 'perfect','非常满意',''))) satisfactionName, - ie.created_time createdTime, - ie.`status` status, - ie.created_by createdUserId, - rea.attachment_url as img_url, - rea.id AS iceventattachmentid, + + - + @@ -121,7 +121,7 @@ From 4eb71d6a7d2d055950ceb0a49cd249db444c3c49 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 09:12:41 +0800 Subject: [PATCH 075/147] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=85=9A=E5=BB=BA?= =?UTF-8?q?=E5=B9=B3=E9=9D=A2=E5=9B=BE=E6=9C=8D=E5=8A=A1=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcUserDemandRecServiceImpl.java | 21 ++++++++++++------- .../epmet/feign/EpmetUserOpenFeignClient.java | 9 ++++++++ .../EpmetUserOpenFeignClientFallback.java | 12 +++++++++++ .../controller/IcResiUserController.java | 13 +++++++++++- .../java/com/epmet/dao/IcResiUserDao.java | 2 ++ .../com/epmet/service/IcResiUserService.java | 2 ++ .../service/impl/IcResiUserServiceImpl.java | 5 +++++ .../main/resources/mapper/IcResiUserDao.xml | 19 +++++++++++++++++ 8 files changed, 75 insertions(+), 8 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index f680e038e5..ac44e6559a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -1734,16 +1734,23 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl queryServiceList(ServiceListFormDTO formDTO) { - List serverIds=new ArrayList<>(); - if("community_org".equals(formDTO.getType())){ + List serverIds = new ArrayList<>(); + if ("community_org".equals(formDTO.getType())) { serverIds.add(formDTO.getServerId()); - }else if("volunteer".equals(formDTO.getType())){ - // 根据身份证号查询ic_resi_user.id+epmetUserId - // todo + } else if ("volunteer".equals(formDTO.getType())) { + // 根据身份证号查询ic_resi_user.id+epmetUserId + Result> userIdRes = epmetUserOpenFeignClient.getAllUserIds(formDTO.getIdCard(), formDTO.getCustomerId()); + if (!userIdRes.success()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "根据身份证号查询用户id异常", EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg()); + } + if (CollectionUtils.isNotEmpty(userIdRes.getData())) { + serverIds.addAll(userIdRes.getData()); + } } - PageInfo pageInfo= PageHelper.startPage(formDTO.getPageNo(), + formDTO.setServerIds(serverIds); + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.queryServiceList(formDTO)); - return new PageData<>(pageInfo.getList(),pageInfo.getTotal()); + return new PageData<>(pageInfo.getList(), pageInfo.getTotal()); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 17f94a25c0..0417195dbc 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -764,4 +764,13 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/icresiuser/getByResiIdCard/{idcard}") Result getByResiIdCard(@PathVariable("idcard") String idCard); + + /** + * 根据身份证号查询ic_resi_user.id+居民端用户id + * + * @param idCard + * @return + */ + @PostMapping("/epmetuser/icresiuser/getAllUserIds") + Result> getAllUserIds(@RequestParam("idcard") String idCard, @RequestParam("customerId") String customerId); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 91c1769eeb..94b8493076 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -557,4 +557,16 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result getByResiIdCard(String idCard) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getByResiIdCard", idCard); } + + /** + * 根据身份证号查询ic_resi_user.id+居民端用户id + * + * @param idCard + * @param customerId + * @return + */ + @Override + public Result> getAllUserIds(String idCard, String customerId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getAllUserIds", idCard,customerId); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 1ab72df8b4..9a5f69cfed 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -52,7 +52,6 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.entity.IcResiUserEntity; import com.epmet.enums.IcResiUserTableEnum; import com.epmet.excel.PartyMemberAgeExportExcel; import com.epmet.excel.PartyMemberEducationExportExcel; @@ -1062,4 +1061,16 @@ public class IcResiUserController implements ResultDataResolver { IcResiUserDTO resi = icResiUserService.getByResiId(idCard); return new Result().ok(resi); } + + /** + * 根据身份证号查询ic_resi_user.id+居民端用户id + * + * @param idCard + * @return + */ + @PostMapping("getAllUserIds") + public Result> getAllUserIds(@RequestParam("idcard") String idCard, @RequestParam("customerId") String customerId) { + List list = icResiUserService.getAllUserIds(idCard, customerId); + return new Result>().ok(list); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index 41903388f5..ef4241dfd3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -309,4 +309,6 @@ public interface IcResiUserDao extends BaseDao { * @return */ List getResiUserGroupHomeId(RentTenantDataFormDTO formDTO); + + List getAllUserIds(@Param("idCard") String idCard, @Param("customerId")String customerId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index 7743f6594c..80f09261aa 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -338,4 +338,6 @@ public interface IcResiUserService extends BaseService { IcResiUserBriefDTO findFamilyMemByIdCard(String idCard); IcResiUserDTO getByResiId(String idCard); + + List getAllUserIds(String idCard, String customerId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 854e7850bc..ad34c86e9a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -1948,4 +1948,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getAllUserIds(String idCard, String customerId) { + return baseDao.getAllUserIds(idCard, customerId); + } } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 8bf937a7e5..2001d71a0a 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -974,4 +974,23 @@ + From 92ef450c57d1a10b86491893178ee9e09ad16d16 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 09:27:14 +0800 Subject: [PATCH 076/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=BD=93=E5=89=8D=E7=BB=84=E7=BB=87=E4=B8=8B?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/IcEventListFormDTO.java | 4 ++++ .../main/java/com/epmet/controller/IcEventController.java | 4 +++- .../java/com/epmet/service/impl/IcEventServiceImpl.java | 8 ++++++++ .../src/main/resources/mapper/IcEventDao.xml | 5 ++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java index 207988f1fa..ad88c1ce36 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventListFormDTO.java @@ -23,6 +23,10 @@ public class IcEventListFormDTO implements Serializable { */ @NotBlank(message = "事件ID不能为空", groups = Detail.class) private String icEventId; + /** + * 所属组织 + */ + private String agencyId; /** * 所属网格 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 01eb9d9cca..7455392679 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -237,7 +237,9 @@ public class IcEventController { * @Description 事件管理-详情 **/ @PostMapping("detail") - public Result detail(@RequestBody IcEventListFormDTO formDTO) { + public Result detail(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.Detail.class); return new Result().ok(icEventService.detail(formDTO)); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 95de4e4bba..9ce3a4a9e4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -95,6 +95,14 @@ public class IcEventServiceImpl extends BaseServiceImpl list(IcEventListFormDTO formDTO) { + //获取当前工作人员缓存信息 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if (null == staffInfo) { + throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getStaffId())); + } + formDTO.setAgencyId(staffInfo.getAgencyId()); + + //分页查询当前组织下网格内事件数据 PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); List list = baseDao.icEventList(formDTO); PageInfo pageInfo = new PageInfo<>(list); diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index b9ba5d91a1..5caf918df0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -178,6 +178,9 @@ AND ie.grid_id = #{gridId} + + AND ie.agency_id = #{agencyId} + AND ie.source_type = #{sourceType} @@ -199,7 +202,7 @@ AND ie.`status` = #{status} - order by ie.latest_operated_time desc + order by ie.created_time desc, ie.latest_operated_time desc SELECT m.ID AS icResiUserId, - m.`NAME` AS icUserName + m.`NAME` AS icUserName, + m.AGENCY_ID AS agencyId, + m.GRID_ID AS gridId FROM ic_resi_user m WHERE From 7f24fa932f0d4d5734a8e39cdcf29ea4d757e12b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 10:19:55 +0800 Subject: [PATCH 081/147] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java | 2 ++ .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java index bdcb68045c..6c9bacafa8 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java @@ -32,10 +32,12 @@ public class IcEventReplyFormDTO implements Serializable { /** * 回复内容 */ + @NotBlank(message = "回复内容不能为空", groups = {UpdateGroup.class}) private String content; /** * 处理方式[0:已回复 1:已转项目 1:已转需求] */ + @NotBlank(message = "处理方式不能为空", groups = {UpdateGroup.class}) private String operationType; /** * 处理中:processing;已办结:closed_case diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 537fe8217b..7dd6306315 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -660,7 +660,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Fri, 20 May 2022 10:29:18 +0800 Subject: [PATCH 082/147] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.17__add_dict.sql | 9 +++++++++ .../db/migration/V0.0.15__self_org_category.sql | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.17__add_dict.sql diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.17__add_dict.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.17__add_dict.sql new file mode 100644 index 0000000000..5d0ab88047 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.17__add_dict.sql @@ -0,0 +1,9 @@ + +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000013', 'ic_event', '事件管理', '', '13', '0', '0', '', '2022-05-17 18:23:27', '', '2022-05-17 18:23:27'); + +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000004', '1000000000000000013', '网格员手持终端', '4', '0', '', '4', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000003', '1000000000000000013', '12345', '3', '0', '', '3', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000002', '1000000000000000013', '社区电话', '2', '0', '', '2', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000001', '1000000000000000013', '多媒体反映', '1', '0', '', '1', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3000000000000000000', '1000000000000000013', '随手拍/随时讲', '0', '0', '', '0', '0', '0', '', '2022-05-17 18:39:18', '', '2022-05-17 18:39:18'); + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql index 4b02bfcfd2..928b038945 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.15__self_org_category.sql @@ -1,2 +1,8 @@ alter table ic_community_self_organization -add COLUMN CATEGORY_CODE VARCHAR(32) DEFAULT NULL COMMENT '分类,来源于字典表dictType=self_org_category;'; \ No newline at end of file +add COLUMN CATEGORY_CODE VARCHAR(32) DEFAULT NULL COMMENT '分类,来源于字典表dictType=self_org_category;'; + + + +ALTER TABLE `ic_user_demand_rec` +ADD COLUMN `ORIGIN` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'demand' COMMENT '来源[需求录入:demand 事件管理:ic_event]' AFTER `DEMAND_USER_HOUSE_ID`, +ADD COLUMN `ORIGIN_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '来源Id[目前只有来源事件管理的有值]' AFTER `ORIGIN`; From 69adb3db93bb062642d1835ba8adf1c2e64eeb7a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 20 May 2022 10:40:23 +0800 Subject: [PATCH 083/147] =?UTF-8?q?url=20=E7=AB=99=E5=86=85=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constant/UserMessageTypeConstant.java | 5 ++ .../service/impl/IcEventServiceImpl.java | 53 +++++++++++++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 4 +- 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java index 57ac759211..08991d8a8b 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/UserMessageTypeConstant.java @@ -207,4 +207,9 @@ public interface UserMessageTypeConstant { * ic_user_demand_rec.id */ String DEMAND="demand"; + + /** + * ic_event,新事件 + */ + String IC_EVENT="ic_event"; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 1857fa17f4..53e5d5ab45 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -24,6 +24,8 @@ 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.*; +import com.epmet.constant.ReadFlagConstant; +import com.epmet.constant.UserMessageTypeConstant; import com.epmet.dao.IcEventDao; import com.epmet.dto.*; import com.epmet.dto.form.*; @@ -47,6 +49,7 @@ import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.*; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import java.util.stream.Collectors; @@ -91,6 +94,8 @@ public class IcEventServiceImpl extends BaseServiceImpl userShowName = new AtomicReference<>(""); userResult.getData().forEach(u -> { if (u.getUserId().equals(formDTO.getUserId())){ entity.setName(u.getRealName()); entity.setMobile(u.getMobile()); entity.setIdCard(u.getIdNum()); + userShowName.set(u.getUserShowName()); } }); // 0代表 随手拍和随时讲 @@ -1106,9 +1113,55 @@ public class IcEventServiceImpl extends BaseServiceImpl> agencyStaffsResult = govOrgOpenFeignClient.getAgencyStaffs(formDTO); + if (!agencyStaffsResult.success()){ + throw new EpmetException("查询组织下工作人员失败..."); + } + if (!CollectionUtils.isEmpty(agencyStaffsResult.getData())){ + List msgList = new ArrayList<>(); + agencyStaffsResult.getData().forEach(u -> { + UserMessageFormDTO msg = new UserMessageFormDTO(); + msg.setUserId(u); + msg.setCustomerId(customerId); + msg.setTargetId(icEventId); + msg.setGridId("*"); + msg.setApp(AppClientConstant.APP_GOV); + msg.setMessageType(UserMessageTypeConstant.IC_EVENT); + msg.setReadFlag(ReadFlagConstant.UN_READ); + msg.setTitle("您有一条事件消息"); + msg.setMessageContent(showName+"上报一条事件,请查看。"); + msgList.add(msg); + }); + messageOpenFeignClient.saveUserMessageList(msgList); + } } + /** + * Desc: 附件处理 + * @param list + * @param attachmentEntityList + * @param id + * @param customerId + * @param userId + * @author zxc + * @date 2022/5/20 09:50 + */ public void disposeAttachment(List list,List attachmentEntityList,String id,String customerId,String userId){ int sort = NumConstant.ZERO; for (FileCommonDTO a : list) { diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 96b9f9e2b2..0417195dbc 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -23,8 +23,8 @@ import java.util.Set; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:09 */ -@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") -//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) +//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class, url = "localhost:8087") +@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallbackFactory = EpmetUserOpenFeignClientFallbackFactory.class) public interface EpmetUserOpenFeignClient { /** From 192cb1d6a067550c178f46f041c998d6a6b02548 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 10:53:06 +0800 Subject: [PATCH 084/147] =?UTF-8?q?=E8=BF=9B=E5=B1=95=E8=BF=94=E5=8F=82?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 53e5d5ab45..4b99805fe0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -998,14 +998,15 @@ public class IcEventServiceImpl extends BaseServiceImpl event = icEventReplyService.getByEventId(formDTO.getIcEventId()); - //3.判断查询事件项目进展或需求进展信息 //项目进展 if ("1".equals(entity.getOperationType())) { ProcessListV2FormDTO processListV2FormDTO = new ProcessListV2FormDTO(); processListV2FormDTO.setProjectId(entity.getOperationId()); List project = projectTraceService.processListV2(processListV2FormDTO); - resultList.addAll(ConvertUtils.sourceToTarget(project, IcEventProcessListResultDTO.class)); + List projectList = ConvertUtils.sourceToTarget(project, IcEventProcessListResultDTO.class); + projectList.forEach(p->p.setType("project")); + resultList.addAll(projectList); } //需求进展 if ("2".equals(entity.getOperationType())) { From 445a0ea0b7440fe539572457e0e590647727f347 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 12:29:17 +0800 Subject: [PATCH 085/147] =?UTF-8?q?=E6=88=91=E4=B8=8A=E6=8A=A5=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/IcEventReplyDTO.java | 5 +- .../epmet/dto/form/MyReportIcEvFormDTO.java | 35 ++++++++ .../dto/form/ResiReplyIcEventFormDTO.java | 36 ++++++++ .../epmet/dto/result/MyReportIcEvResDTO.java | 88 +++++++++++++++++++ .../epmet/controller/IcEventController.java | 64 ++++++++++++++ .../com/epmet/dao/IcEventAttachmentDao.java | 6 +- .../main/java/com/epmet/dao/IcEventDao.java | 16 +++- .../java/com/epmet/dao/IcEventReplyDao.java | 3 + .../epmet/service/IcEventReplyService.java | 8 ++ .../com/epmet/service/IcEventService.java | 28 +++++- .../service/impl/IcEventReplyServiceImpl.java | 12 +++ .../service/impl/IcEventServiceImpl.java | 60 +++++++++++++ .../resources/mapper/IcEventAttachmentDao.xml | 11 ++- .../src/main/resources/mapper/IcEventDao.xml | 54 ++++++++++++ .../main/resources/mapper/IcEventReplyDao.xml | 15 ++++ 15 files changed, 431 insertions(+), 10 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiReplyIcEventFormDTO.java create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java index b60d6fbdf5..9830330fc6 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventReplyDTO.java @@ -1,8 +1,10 @@ package com.epmet.dto; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -64,6 +66,7 @@ public class IcEventReplyDTO implements Serializable { /** * 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createdTime; /** diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java new file mode 100644 index 0000000000..87805ee893 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 居民端小程序,我上报的事件 列表入参 + */ +@Data +public class MyReportIcEvFormDTO extends PageFormDTO implements Serializable { + //以下参数前端传入 + @NotBlank(message = "处理中:processing;已办结:closed_case", groups = PageFormDTO.AddUserInternalGroup.class) + private String status; + /** + * 暂时两端不打通,先不要求传身份证了 + */ + // private String idCard; + + //以下参数从token中获取 + @NotBlank(message = "customerId不能为空", groups = PageFormDTO.AddUserInternalGroup.class) + private String customerId; + @NotBlank(message = "userId不能为空", groups = PageFormDTO.AddUserInternalGroup.class) + private String userId; + private String icEventId; + + public interface ReplyListGroup { + } + public interface RemoveRedGroup { + } + @NotBlank(message = "事件id不能为空", groups = {ReplyListGroup.class,RemoveRedGroup.class}) + private String icEventId; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiReplyIcEventFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiReplyIcEventFormDTO.java new file mode 100644 index 0000000000..0e4b423f0c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiReplyIcEventFormDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +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; + +/** + * 居民端我上报的事件回复 + * ic_event + */ +@Data +public class ResiReplyIcEventFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "事件id不能为空", groups = {AddUserInternalGroup.class}) + private String icEventId; + + @NotBlank(message = "内容不能为空", groups = AddUserShowGroup.class) + @Length(max = 200, message = "内容最多输入200字", groups = AddUserShowGroup.class) + private String content; + + + //以下参数从token中获取 + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; + @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/result/MyReportIcEvResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java new file mode 100644 index 0000000000..9e5954fe9c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java @@ -0,0 +1,88 @@ +package com.epmet.dto.result; + +import com.epmet.dto.IcEventAttachmentDTO; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 居民端我上报的事件列表+详情 + */ +@Data +public class MyReportIcEvResDTO implements Serializable { + /** + * 事件Id + */ + private String icEventId; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 发生时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date happenTime; + + /** + * 图片[url集合] + */ + private List imageList; + /** + * 音频[url集合] + */ + private List voiceList; + + /** + * 地址 + */ + private String address; + + /** + * 报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; + */ + private Boolean redDot; + + /** + * true:可以回复 + * false:不可以回复 + * todo + */ + private Boolean replyFlag; + + /** + * 状态【处理中:processing;已办结:closed_case】】 + */ + private String status; + /** + * 状态【处理中:processing;已办结:closed_case】】 + */ + private String statusName; + /** + * 0:已回复 1:已转项目 1:已转需求 + */ + private String operationType; + /** + * 项目、需求ID + */ + private String operationId; + + /** + * 最近一次操作时间(回复、立项、转需求、办结更新此列) + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date latestOperatedTime; + + /** + * 事件附件 + */ + @JsonIgnore + private List attachmentList; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 7455392679..edca0f5cc2 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -2,6 +2,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; @@ -13,8 +14,10 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcEventDTO; +import com.epmet.dto.IcEventReplyDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.service.IcEventReplyService; import com.epmet.service.IcEventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -35,6 +38,8 @@ public class IcEventController { @Autowired private IcEventService icEventService; + @Autowired + private IcEventReplyService icEventReplyService; @RequestMapping("list") public Result> list(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { @@ -307,4 +312,63 @@ public class IcEventController { return new Result(); } + /** + * 居民端小程序我上报的事件-列表+详情 + * yapi: http://yapi.elinkservice.cn/project/102/interface/api/7781 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("myreport") + public Result> myReport(@LoginUser TokenDto tokenDto, @RequestBody MyReportIcEvFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); + return new Result>().ok(icEventService.myReport(formDTO)); + } + + /** + * 居民端小程序我上报的事件详情页面-回复列表 + * http://yapi.elinkservice.cn/project/102/interface/api/7783 + * @param formDTO + * @return + */ + @PostMapping("reply-list") + public Result> replyList(@LoginUser TokenDto tokenDto,@RequestBody MyReportIcEvFormDTO formDTO) { + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, MyReportIcEvFormDTO.ReplyListGroup.class); + return new Result>().ok(icEventReplyService.replyList(formDTO.getIcEventId(),formDTO.getUserId())); + } + + /** + * 居民端小程序我上报的事件-处理中 + * 点击事件进入详情页时调用此接口,消除红点 + * yapi:http://yapi.elinkservice.cn/project/102/interface/api/7790 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("remove-red") + public Result removeRed(@LoginUser TokenDto tokenDto, @RequestBody MyReportIcEvFormDTO formDTO) { + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, MyReportIcEvFormDTO.RemoveRedGroup.class); + icEventService.removeRed(formDTO.getUserId(), formDTO.getIcEventId()); + return new Result(); + } + + /** + * 居民端我上报的事件-回复 + * http://yapi.elinkservice.cn/project/102/interface/api/7789 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("resi-reply") + public Result resiReply(@LoginUser TokenDto tokenDto, @RequestBody ResiReplyIcEventFormDTO formDTO){ + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, ResiReplyIcEventFormDTO.AddUserShowGroup.class,ResiReplyIcEventFormDTO.AddUserInternalGroup.class); + icEventService.resiReply(formDTO); + return new Result(); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java index 481d4d9e2d..2da1ab32f9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventAttachmentDao.java @@ -1,8 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IcEventAttachmentDTO; import com.epmet.entity.IcEventAttachmentEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 事件附件表 @@ -12,5 +16,5 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcEventAttachmentDao extends BaseDao { - + List selectByIcEventId(@Param("icEventId") String icEventId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index d9b9d90f89..5ee5947514 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -3,10 +3,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.IcEventCategoryAnalysisFormDTO; import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.result.IcEventCategoryAnalysisResDTO; -import com.epmet.dto.result.IcEventListResultDTO; -import com.epmet.dto.result.IcEventMonthlyCountResultDTO; -import com.epmet.dto.result.IcEventResultDTO; +import com.epmet.dto.form.MyReportIcEvFormDTO; +import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Mapper; @@ -123,4 +121,14 @@ public interface IcEventDao extends BaseDao { * @return */ Integer selectOrgTotal(@Param("orgId") String orgId, @Param("orgType") String orgType); + + /** + * 居民端小程序我上报的事件-列表+详情 + * + * @param formDTO + * @return + */ + List selectMyReport(MyReportIcEvFormDTO formDTO); + + int updateRedDot(@Param("userId") String userId, @Param("icEventId")String icEventId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java index 3476a57639..efdc25830a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventReplyDao.java @@ -1,12 +1,14 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IcEventReplyDTO; import com.epmet.dto.result.IcEventProcessListResultDTO; import com.epmet.entity.IcEventReplyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.LinkedList; +import java.util.List; /** * 事件回复表 @@ -19,4 +21,5 @@ public interface IcEventReplyDao extends BaseDao { LinkedList selectByEventId(@Param("icEventId") String icEventId); + List selectReplyList(@Param("icEventId") String icEventId, @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/service/IcEventReplyService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java index 2be7f4127c..c2b3da8830 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventReplyService.java @@ -79,4 +79,12 @@ public interface IcEventReplyService extends BaseService { void delete(String[] ids); LinkedList getByEventId(String icEventId); + + /** + * 居民端小程序我上报的事件详情页面-回复列表 + * + * @param icEventId + * @return + */ + List replyList(String icEventId,String userId); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index 24500f057b..cd926cf332 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -3,9 +3,6 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcEventDTO; -import com.epmet.dto.form.IcEventAddEditFormDTO; -import com.epmet.dto.form.IcEventListFormDTO; -import com.epmet.dto.result.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.IcEventEntity; @@ -186,4 +183,29 @@ public interface IcEventService extends BaseService { */ void addEventFromResi(AddEventFromResiFormDTO formDTO); + /** + * 居民端小程序我上报的事件-列表+详情 + * yapi: http://yapi.elinkservice.cn/project/102/interface/api/7781 + * + * @param formDTO + * @param formDTO + * @return + */ + PageData myReport(MyReportIcEvFormDTO formDTO); + + /** + * 居民端小程序我上报的事件-处理中 + * 点击事件进入详情页时调用此接口,消除红点 + * + * @param userId + * @param icEventId + * @return + */ + void removeRed(String userId, String icEventId); + + /** + * 居民端我上报的事件-回复 + * @param formDTO + */ + void resiReply(ResiReplyIcEventFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java index a5e6eabb4d..c3fe7d9106 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventReplyServiceImpl.java @@ -87,4 +87,16 @@ public class IcEventReplyServiceImpl extends BaseServiceImpl replyList(String icEventId, String userId) { + List list = baseDao.selectReplyList(icEventId, userId); + return list; + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 307febd0f3..461486ae2b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1124,4 +1124,64 @@ public class IcEventServiceImpl extends BaseServiceImpl myReport(MyReportIcEvFormDTO formDTO) { + // 1.分页查询 + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), + formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectMyReport(formDTO)); + List list = pageInfo.getList(); + if (!CollectionUtils.isEmpty(list)) { + //封装数据 + for (MyReportIcEvResDTO dto : list) { + //每个事件对应的图片数据 + if (!CollectionUtils.isEmpty(dto.getAttachmentList())) { + List imageList = new ArrayList<>(); + List voiceList = new ArrayList<>(); + for (IcEventAttachmentDTO file : dto.getAttachmentList()) { + if ("image".equals(file.getAttachmentType())) { + imageList.add(file.getAttachmentUrl()); + } else if ("voice".equals(file.getAttachmentType())) { + voiceList.add(file.getAttachmentUrl()); + } + } + dto.setImageList(imageList); + dto.setVoiceList(voiceList); + } + } + } + return new PageData<>(list, pageInfo.getTotal()); + } + + /** + * 居民端小程序我上报的事件-处理中 + * 点击事件进入详情页时调用此接口,消除红点 + * + * @param userId + * @param icEventId + * @return + */ + @Override + public void removeRed(String userId, String icEventId) { + baseDao.updateRedDot(userId,icEventId); + } + + /** + * 居民端我上报的事件-回复 + * + * @param formDTO + */ + @Override + public void resiReply(ResiReplyIcEventFormDTO formDTO) { + // todo + } + + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml index 23437af527..4900fb16e8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml @@ -3,6 +3,15 @@ - + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 5caf918df0..e4e5316014 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -280,4 +280,58 @@ and ie.GRID_ID=#{orgId} + + + + + + + + + + + + + + + + + + + UPDATE ic_event + SET UPDATED_BY = #{userId}, + UPDATED_TIME = NOW(), + RED_DOT = '0' + WHERE + id = #{icEventId} + AND DEL_FLAG = '0' + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml index a6e7111674..60dadc46aa 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventReplyDao.xml @@ -19,4 +19,19 @@ ORDER BY created_time DESC + \ No newline at end of file From 5047c5ffdbb4f031eb1f94d7dc42b68b5ab8248a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 12:41:36 +0800 Subject: [PATCH 086/147] =?UTF-8?q?=E6=88=91=E4=B8=8A=E6=8A=A5=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java index 87805ee893..28f124a4fd 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java @@ -24,7 +24,6 @@ public class MyReportIcEvFormDTO extends PageFormDTO implements Serializable { private String customerId; @NotBlank(message = "userId不能为空", groups = PageFormDTO.AddUserInternalGroup.class) private String userId; - private String icEventId; public interface ReplyListGroup { } From b36a16fe646a33aeb78b12625d2ff5fbe9272254 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 12:55:42 +0800 Subject: [PATCH 087/147] =?UTF-8?q?/heart/userdemand/pagelist=E5=85=A5?= =?UTF-8?q?=E5=8F=82=E5=A2=9E=E5=8A=A0demandRecId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/demand/UserDemandPageFormDTO.java | 7 +++++++ .../src/main/resources/mapper/IcUserDemandRecDao.xml | 3 +++ 2 files changed, 10 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java index bfeb9203e2..e4aa06f5e3 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java @@ -79,4 +79,11 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { * 搜索关键词 */ private String keyword; + + + /** + * 需求id + */ + private String demandRecId; + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 5221f5309b..dd7cf16d8a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -129,6 +129,9 @@ AND DATE_FORMAT(r.WANT_SERVICE_TIME,'%Y-%m-%d') #{wantServiceEndTime} + + and r.id = #{demandRecId} + order by r.WANT_SERVICE_TIME desc,r.CREATED_TIME asc From 69b6bb024e542e229ac52a05944eedeeb8da19ba Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 13:18:22 +0800 Subject: [PATCH 088/147] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/entity/IcEventEntity.java | 2 +- .../service/impl/IcEventServiceImpl.java | 53 +++++++++++++++++-- 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java index ca36746d3c..db3fc54536 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java @@ -102,7 +102,7 @@ public class IcEventEntity extends BaseEpmetEntity { private Date closeCaseTime; /** - * 0:已回复 1:已转项目 1:已转需求 + * 0:已回复 1:已转项目 2:已转需求 */ private String operationType; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index b736dfcc5b..6b81909bb6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -24,7 +24,9 @@ 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.*; +import com.epmet.constant.EventConstant; import com.epmet.constant.ReadFlagConstant; +import com.epmet.constant.ResiEventAction; import com.epmet.constant.UserMessageTypeConstant; import com.epmet.dao.IcEventDao; import com.epmet.dto.*; @@ -265,6 +267,8 @@ public class IcEventServiceImpl extends BaseServiceImpl logList = new ArrayList<>(); - logList.add(logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), date, "reply", "reply")); + logList.add(logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), date, ResiEventAction.REPLY.getCode(), ResiEventAction.REPLY.getDesc())); //回复时选择了已完成 - if (StringUtils.isNotBlank(formDTO.getOperationType()) && "closed_case".equals(formDTO.getStatus())) { + if (StringUtils.isNotBlank(formDTO.getOperationType()) && ResiEventAction.CLOSE_CASE.getCode().equals(formDTO.getStatus())) { date.setTime(date.getTime() + 6000 * 1); - logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "close_case", "close_case")); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, ResiEventAction.CLOSE_CASE.getCode(), ResiEventAction.CLOSE_CASE.getDesc())); } icEventOperationLogService.insertBatch(logList); @@ -1235,7 +1240,47 @@ public class IcEventServiceImpl extends BaseServiceImpl userIdList =new ArrayList<>(); + userIdList.add(formDTO.getUserId()); + Result> userResult=userOpenFeignClient.queryUserBaseInfo(userIdList); + if (!userResult.success() || CollectionUtils.isEmpty(userResult.getData())) { + throw new RenException("查询当前用户信息异常"); + } + replyEntity.setUserShowName(userResult.getData().get(NumConstant.ZERO).getUserShowName()); + icEventReplyService.insert(replyEntity); + + //3.新增操作记录数据 + IcEventOperationLogEntity logEntity =ConvertUtils.sourceToTarget(formDTO,IcEventOperationLogEntity.class); + logEntity.setUserIdentity(EventConstant.RESI_USER); + logEntity.setActionCode(ResiEventAction.REPLY.getCode()); + logEntity.setActionDesc(ResiEventAction.REPLY.getDesc()); + logEntity.setOperateTime(new Date()); + icEventOperationLogService.insert(logEntity); + } + + private IcEventEntity checkReply(String icEventId) { + //:0:已回复 1:已转项目 1:已转需求 + IcEventEntity entity = baseDao.selectById(icEventId); + if (null == entity || NumConstant.ONE_STR.equals(entity.getOperationType())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前事件不允许回复", "事件已转项目"); + } + if (null == entity || NumConstant.TWO_STR.equals(entity.getOperationType())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前事件不允许回复", "事件已转需求"); + } + return entity; } From 32518f0f1cd95eb27bf983ddee08a2d904b8ee6e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 13:29:15 +0800 Subject: [PATCH 089/147] douhao --- .../src/main/resources/mapper/IcEventAttachmentDao.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml index 4900fb16e8..42b0c0dd12 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventAttachmentDao.xml @@ -5,13 +5,13 @@ \ No newline at end of file From 36b21fdfbdb65f8a9df5c0b7ec2a0cebde8072c9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 13:47:53 +0800 Subject: [PATCH 090/147] =?UTF-8?q?=E5=B7=B2=E5=AE=8C=E6=88=90=E7=9A=84?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E8=AF=84=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/MyReportIcEvResDTO.java | 8 ++++++++ .../src/main/resources/mapper/IcEventDao.xml | 17 ++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java index 9e5954fe9c..7fb327037e 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java @@ -80,6 +80,14 @@ public class MyReportIcEvResDTO implements Serializable { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date latestOperatedTime; + /** + * 群众满意度[满意度 - 不满意:bad、基本满意:good、非常满意:perfect] + */ + private String satisfaction; + /** + * 群众满意度[满意度 - 不满意:bad、基本满意:good、非常满意:perfect] + */ + private String satisfactionName; /** * 事件附件 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index a596aef481..fb0099a172 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -292,6 +292,8 @@ + + @@ -304,10 +306,19 @@ ie.address, ie.`status`, IF(ie.status = 'processing','处理中',IF (ie.status = 'closed_case','已办结','')) statusName, - ie.operation_type, - ie.operation_id, + IFNULL(ie.operation_type,'') AS operation_type, + IFNULL(ie.operation_id,'') AS operation_id, ie.red_dot, - ie.latest_operated_time + ie.latest_operated_time, + IFNULL(ie.satisfaction,'') as satisfaction, + ( + case when satisfaction is null or satisfaction='' then '' + when satisfaction='bad' then '不满意' + when satisfaction='good' then '基本满意' + when satisfaction='perfect' then '非常满意' + else '' + end + ) as satisfactionName FROM ic_event ie WHERE From fe82ff2d56fc076ecc2e8b7fd072d68463d3db6c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 14:00:11 +0800 Subject: [PATCH 091/147] =?UTF-8?q?=E5=B7=B2=E8=BD=AC=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=88=96=E8=80=85=E6=9C=8D=E5=8A=A1=E7=9A=84=E6=97=B6=E9=97=B4?= =?UTF-8?q?=EF=BC=8C=E5=B1=85=E6=B0=91=E7=AB=AF=E4=B8=8D=E5=8F=AF=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=EF=BC=8C=E5=B7=A5=E4=BD=9C=E7=AB=AF=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=92=8Cpc=E5=9B=9E=E5=A4=8D=E4=BA=86=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E7=AB=AF=E6=89=8D=E5=8F=AF=E4=BB=A5=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcEventDao.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index fb0099a172..4100a73ffb 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -291,6 +291,7 @@ + @@ -318,7 +319,12 @@ when satisfaction='perfect' then '非常满意' else '' end - ) as satisfactionName + ) as satisfactionName, + ( + case when ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 + else '0' + end + )as read_flag FROM ic_event ie WHERE From f9480c92c1dae7f38dceae34cf3ce6440292f701 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 14:00:47 +0800 Subject: [PATCH 092/147] reply_flag --- .../src/main/resources/mapper/IcEventDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 4100a73ffb..523eac4560 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -291,7 +291,7 @@ - + @@ -324,7 +324,7 @@ case when ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 else '0' end - )as read_flag + )as reply_flag FROM ic_event ie WHERE From 0cff7c12ddbd7d3ffe85188434230015c58c5d44 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 14:03:16 +0800 Subject: [PATCH 093/147] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=AD=E6=89=8D?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcEventDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 523eac4560..648177b3f9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -321,8 +321,8 @@ end ) as satisfactionName, ( - case when ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 - else '0' + case when ie.status='processing' and ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 + else 0 end )as reply_flag FROM From 94d7ca6d945ebd71d317fcd77d4cdb680964d15e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 14:33:27 +0800 Subject: [PATCH 094/147] parentCategoryName --- .../mapper/IssueProjectCategoryDictDao.xml | 18 ++++++++++----- .../epmet/dto/result/MyReportIcEvResDTO.java | 13 +++++++++++ .../service/impl/IcEventServiceImpl.java | 23 +++++++++++++++---- .../src/main/resources/mapper/IcEventDao.xml | 7 +++++- 4 files changed, 50 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index f67db1aaa1..80ede5083f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -215,19 +215,25 @@ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java index 7fb327037e..80a846cb4b 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java @@ -88,6 +88,19 @@ public class MyReportIcEvResDTO implements Serializable { * 群众满意度[满意度 - 不满意:bad、基本满意:good、非常满意:perfect] */ private String satisfactionName; + + /** + * 分类Id + */ + // @JsonIgnore + private String categoryId; + + /** + * 分类名称 + */ + private String categoryName; + + /** * 事件附件 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 6b81909bb6..3cd05b27d0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -3,10 +3,7 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.AppClientConstant; -import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.constant.*; import com.epmet.commons.tools.dto.form.FileCommonDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.DictTypeEnum; @@ -1215,6 +1212,24 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryList = new ArrayList<>(); + categoryList.add(dto.getCategoryId()); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ + if (ca.getId().equals(dto.getCategoryId())) { + if(StringUtils.isNotBlank(ca.getParentCategoryName())){ + //大类-子类 + dto.setCategoryName(ca.getParentCategoryName().concat(StrConstant.HYPHEN).concat(ca.getCategoryName())); + }else{ + dto.setCategoryName(ca.getCategoryName()); + } + } + } + } + } } return new PageData<>(list, pageInfo.getTotal()); diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 648177b3f9..72a5c10d19 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -295,6 +295,7 @@ + @@ -324,9 +325,13 @@ case when ie.status='processing' and ie.OPERATION_TYPE is not null and ie.OPERATION_TYPE ='0' then 1 else 0 end - )as reply_flag + )as reply_flag, + IFNULL(iec.category_id,'') AS category_id FROM ic_event ie + LEFT JOIN ic_event_category iec + ON(ie.id = iec.ic_event_id + AND iec.del_flag = '0') WHERE ie.del_flag = '0' and ie.customer_id = #{customerId} From 494e0451f7f551769749720d59f27fa5b32c3f0a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 14:44:10 +0800 Subject: [PATCH 095/147] =?UTF-8?q?=E4=BB=A3=E4=B9=B0=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=81sql=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcEventServiceImpl.java | 102 ++++++++++-- .../db/migration/V0.0.23__add_ic_event.sql | 153 ++++++++++++++++++ 2 files changed, 240 insertions(+), 15 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 3cd05b27d0..0785d59d01 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -21,8 +21,10 @@ 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.*; +import com.epmet.constant.ProjectConstant; import com.epmet.constant.EventConstant; import com.epmet.constant.ReadFlagConstant; +import com.epmet.constant.UserMessageConstant; import com.epmet.constant.ResiEventAction; import com.epmet.constant.UserMessageTypeConstant; import com.epmet.dao.IcEventDao; @@ -184,7 +186,7 @@ public class IcEventServiceImpl extends BaseServiceImpl msgList = new ArrayList<>(); + UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); + messageFormDTO.setCustomerId(formDTO.getCustomerId()); + messageFormDTO.setApp(ProjectConstant.RESI); + messageFormDTO.setGridId(entity.getGridId()); + messageFormDTO.setUserId(entity.getCreatedBy()); + messageFormDTO.setTitle(UserMessageConstant.EVENT_TITILE); + messageFormDTO.setMessageContent(String.format("您上报的事件【%s】已经被转成项目,请查看")); + messageFormDTO.setReadFlag(Constant.UNREAD); + messageFormDTO.setMessageType(UserMessageTypeConstant.IC_EVENT); + messageFormDTO.setTargetId(entity.getId()); + msgList.add(messageFormDTO); //5.新增操作记录数据 Date date = new Date(); @@ -725,8 +745,18 @@ public class IcEventServiceImpl extends BaseServiceImpl%s", entity.getId())); + } + } @@ -746,7 +776,7 @@ public class IcEventServiceImpl extends BaseServiceImpl msgList = new ArrayList<>(); + UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); + messageFormDTO.setCustomerId(formDTO.getCustomerId()); + messageFormDTO.setApp(ProjectConstant.RESI); + messageFormDTO.setGridId(entity.getGridId()); + messageFormDTO.setUserId(entity.getCreatedBy()); + messageFormDTO.setTitle(UserMessageConstant.EVENT_TITILE); + messageFormDTO.setMessageContent(String.format("您上报的事件【%s】已经被转成项目,请查看")); + messageFormDTO.setReadFlag(Constant.UNREAD); + messageFormDTO.setMessageType(UserMessageTypeConstant.IC_EVENT); + messageFormDTO.setTargetId(entity.getId()); + msgList.add(messageFormDTO); + Result sendMessageRes = messageOpenFeignClient.saveUserMessageList(msgList); + if (!sendMessageRes.success()) { + log.warn(String.format("事件立项,给居民端用户发送站内信异常,事件Id->%s", entity.getId())); + } + } } /** @@ -777,7 +828,7 @@ public class IcEventServiceImpl extends BaseServiceImpl msgList = new ArrayList<>(); + UserMessageFormDTO messageFormDTO = new UserMessageFormDTO(); + messageFormDTO.setCustomerId(formDTO.getCustomerId()); + messageFormDTO.setApp(ProjectConstant.RESI); + messageFormDTO.setGridId(entity.getGridId()); + messageFormDTO.setUserId(entity.getCreatedBy()); + messageFormDTO.setTitle(UserMessageConstant.EVENT_TITILE); + messageFormDTO.setMessageContent(String.format("您上报的事件【%s】已经被转成服务,请查看")); + messageFormDTO.setReadFlag(Constant.UNREAD); + messageFormDTO.setMessageType(UserMessageTypeConstant.IC_EVENT); + messageFormDTO.setTargetId(entity.getId()); + msgList.add(messageFormDTO); + Result sendMessageRes = messageOpenFeignClient.saveUserMessageList(msgList); + if (!sendMessageRes.success()) { + log.warn(String.format("事件转需求,给居民端用户发送站内信异常,事件Id->%s", entity.getId())); + } + } + } /** diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql new file mode 100644 index 0000000000..a2cc8bed1d --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql @@ -0,0 +1,153 @@ + +CREATE TABLE `ic_event` ( + `ID` varchar(64) NOT NULL COMMENT '主键,事件id', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `GRID_ID` varchar(64) NOT NULL COMMENT '事件所属的网格Id。不包含网格的id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格的所属组织', + `GRID_PIDS` varchar(255) NOT NULL COMMENT '网格的所有组织Id', + `REPORT_USER_ID` varchar(64) NOT NULL COMMENT '报事的人【居民端/pc端居民Id】可为空', + `NAME` varchar(64) DEFAULT NULL COMMENT '报事人姓名', + `MOBILE` varchar(11) NOT NULL COMMENT '手机号', + `ID_CARD` varchar(18) DEFAULT NULL COMMENT '身份证号', + `SOURCE_TYPE` char(1) DEFAULT NULL COMMENT '反映渠道【字典表】', + `HAPPEN_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '发生时间', + `EVENT_CONTENT` varchar(1024) NOT NULL COMMENT '事件内容', + `LATITUDE` varchar(32) DEFAULT NULL COMMENT '纬度', + `LONGITUDE` varchar(32) DEFAULT NULL COMMENT '经度', + `ADDRESS` varchar(255) NOT NULL COMMENT '地址', + `STATUS` varchar(32) NOT NULL DEFAULT 'processing' COMMENT '处理中:processing;已办结:closed_case', + `CLOSE_CASE_TIME` datetime DEFAULT NULL COMMENT '办结时间', + `OPERATION_TYPE` char(1) DEFAULT NULL COMMENT '0:已回复 1:已转项目 1:已转需求', + `OPERATION_ID` varchar(32) DEFAULT NULL COMMENT '项目、需求ID', + `READ_FLAG` tinyint(1) NOT NULL DEFAULT '0' COMMENT '事件是否被阅读过;1已读;针对报事人待处理列表', + `RED_DOT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '报事人的红点:展示1;不展示:0;【工作人员回复/立项/转需求/办结更新为1】', + `LATEST_OPERATED_TIME` datetime NOT NULL COMMENT '最近一次操作时间(回复、立项、转需求、办结更新此列)', + `RESOLVE_STATUS` varchar(32) DEFAULT 'resolved' COMMENT '是否解决:已解决 resolved,未解决 un_solved', + `CLOSE_REMARK` varchar(255) DEFAULT NULL COMMENT '结案说明', + `COMMENT_USER_ID` varchar(32) DEFAULT NULL COMMENT '评价人', + `SATISFACTION` varchar(300) DEFAULT NULL COMMENT '满意度 - 不满意:bad、基本满意:good、非常满意:perfect', + `COMMENT_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '满意度评价时间', + `AUDIT_STATUS` varchar(32) NOT NULL DEFAULT 'auto_passed' COMMENT '事件审核状态[涉及附件审核需要加的状态](审核中:auditing; \r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;\r\nrejected:人工审核驳回;\r\napproved:人工审核通过)', + `AUDIT_REASON` varchar(128) DEFAULT NULL COMMENT '审核理由', + `DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_gid` (`GRID_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='事件管理表'; + +-- ---------------------------- +-- Table structure for ic_event_attachment +-- ---------------------------- + +CREATE TABLE `ic_event_attachment` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `IC_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id', + `ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名', + `ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', + `ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', + `ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', + `SORT` int(1) NOT NULL COMMENT '排序字段', + `STATUS` varchar(32) NOT NULL DEFAULT 'auto_passed' COMMENT '附件状态(审核中:auditing; \r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;\r\nrejected:人工审核驳回;\r\napproved:人工审核通过)\r\n现在图片是同步审核的,所以图片只有auto_passed一种状态', + `REASON` varchar(255) DEFAULT NULL COMMENT '失败原因', + `DURATION` int(11) DEFAULT NULL COMMENT '语音或视频时长,秒', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_eid` (`IC_EVENT_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='事件附件表'; + +-- ---------------------------- +-- Table structure for ic_event_category +-- ---------------------------- + +CREATE TABLE `ic_event_category` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `IC_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id', + `CATEGORY_ID` varchar(64) NOT NULL COMMENT '分类id', + `CATEGORY_PIDS` varchar(512) NOT NULL COMMENT '分类对应的所有上级,英文逗号隔开', + `CATEGORY_CODE` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '分类编码,分类编码+customer_id唯一', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_pid` (`IC_EVENT_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='事件所属分类表'; + +-- ---------------------------- +-- Table structure for ic_event_operation_log +-- ---------------------------- + +CREATE TABLE `ic_event_operation_log` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `IC_EVENT_ID` varchar(64) NOT NULL COMMENT '事件id', + `USER_ID` varchar(64) NOT NULL COMMENT '操作用户Id', + `USER_IDENTITY` varchar(32) NOT NULL COMMENT ' 操作用户类型【居民端用户:resi_user;工作人员:staff;】', + `ACTION_CODE` varchar(32) NOT NULL COMMENT '1、发布事件:add\r\n2、复:reply;\r\n3、立项:shift_project;\r\n4、转需求:shift_demand\r\n5、办结:close_case;\r\n6、需求办结:close_demand\r\n\r\n', + `ACTION_DESC` varchar(32) NOT NULL COMMENT '1、发布事件:publish;\r\n2、撤回事件:recall;\r\n3、复:reply;\r\n4、立项:shift_project;\r\n5、转需求: shift_demand;\r\n6、办结:close_case;\r\n7、需求办结:close_demand;\r\n8、选择是否已解决:choose_resolve;\r\n9、首次查看阅读事件:read_first:人大代表未读=>已读;工作人员待处理=>处理中;', + `OPERATE_TIME` datetime NOT NULL COMMENT '操作时间', + `SERVICE_PARTY` varchar(64) DEFAULT NULL COMMENT '服务方【事件被转需求,需求在办结时的服务方名称】', + `ACTUAL_SERVICE_TIME` varchar(64) DEFAULT NULL COMMENT '实际服务时间【事件被转需求,需求在办结时填写的实际服务时间 xx至xx】', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 1删除;0未删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='事件操作日志表'; + +-- ---------------------------- +-- Table structure for ic_event_reply +-- ---------------------------- + +CREATE TABLE `ic_event_reply` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `IC_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id', + `FROM_USER_ID` varchar(64) NOT NULL COMMENT '回复人用户Id[工作人员ID]', + `CONTENT` varchar(255) NOT NULL COMMENT '内容', + `USER_SHOW_NAME` varchar(64) NOT NULL COMMENT '报事人:组织-人名', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + KEY `idx_eid` (`IC_EVENT_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='事件回复表'; + +-- ---------------------------- +-- Table structure for ic_event_scan_task +-- ---------------------------- + +CREATE TABLE `ic_event_scan_task` ( + `ID` varchar(64) NOT NULL COMMENT '唯一标识', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `IC_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id', + `IC_EVENT_ATTACHMENT_ID` varchar(64) NOT NULL COMMENT '事件附件表主键,对应dataId', + `TASK_ID` varchar(64) NOT NULL COMMENT '阿里云审核任务Id', + `STATUS` varchar(32) NOT NULL COMMENT '审核状态【auditing: 审核中;\r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;】', + `ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型(视频 - video、 语音 - voice 文件 - doc)', + `DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '操作人,API审核结果,存储为SCAN_USER或者APP_USER', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件附件安全校验任务表'; From 119b0db8790f490cd4ae59deea4ea311e538e75f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 14:58:16 +0800 Subject: [PATCH 096/147] on --- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 2 +- .../src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 80ede5083f..f128b4a17f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -223,7 +223,7 @@ )as parentCategoryName FROM issue_project_category_dict c - left join issue_project_category_dict p (c.PID=p.id) + left join issue_project_category_dict p on (c.PID=p.id) WHERE c.del_flag = '0' AND c.customer_id = #{customerId} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java index 28f124a4fd..032a0c5b65 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportIcEvFormDTO.java @@ -12,7 +12,7 @@ import java.io.Serializable; @Data public class MyReportIcEvFormDTO extends PageFormDTO implements Serializable { //以下参数前端传入 - @NotBlank(message = "处理中:processing;已办结:closed_case", groups = PageFormDTO.AddUserInternalGroup.class) + // @NotBlank(message = "处理中:processing;已办结:closed_case", groups = PageFormDTO.AddUserInternalGroup.class) private String status; /** * 暂时两端不打通,先不要求传身份证了 From 2ce578e0ebdc61f27e635bc2adb63dfc3fc93265 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 15:06:06 +0800 Subject: [PATCH 097/147] pppppppppp --- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index f128b4a17f..7602170e27 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -217,7 +217,7 @@ SELECT c.*, ( - case when p.CATEGORY_NAME is not null and p.CATEGORY_NAME !='' then CATEGORY_NAME + case when p.CATEGORY_NAME is not null and p.CATEGORY_NAME !='' then p.CATEGORY_NAME else '' end )as parentCategoryName From fdbd1f1f762493396c743957298abd7eae4c9699 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 20 May 2022 15:31:49 +0800 Subject: [PATCH 098/147] customerId --- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index 7602170e27..e2c93a5a98 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -223,7 +223,7 @@ )as parentCategoryName FROM issue_project_category_dict c - left join issue_project_category_dict p on (c.PID=p.id) + left join issue_project_category_dict p on (c.PID=p.id and AND p.customer_id = #{customerId}) WHERE c.del_flag = '0' AND c.customer_id = #{customerId} From d997a38b0376d844d702114a202f922f737caff7 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 15:33:38 +0800 Subject: [PATCH 099/147] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 0785d59d01..caeed38231 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -716,7 +716,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Fri, 20 May 2022 15:37:50 +0800 Subject: [PATCH 100/147] customerId --- .../src/main/resources/mapper/IssueProjectCategoryDictDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml index e2c93a5a98..c1d52f8ea5 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProjectCategoryDictDao.xml @@ -223,7 +223,7 @@ )as parentCategoryName FROM issue_project_category_dict c - left join issue_project_category_dict p on (c.PID=p.id and AND p.customer_id = #{customerId}) + left join issue_project_category_dict p on (c.PID=p.id and p.customer_id = #{customerId}) WHERE c.del_flag = '0' AND c.customer_id = #{customerId} From 8617d1c2b9afbc520742c4d457fa7bf5c2d5105d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 16:00:22 +0800 Subject: [PATCH 101/147] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index caeed38231..d1050e7f47 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -716,7 +716,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Fri, 20 May 2022 16:24:38 +0800 Subject: [PATCH 102/147] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcEventServiceImpl.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index d1050e7f47..f7a35fd0ae 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -731,7 +731,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Fri, 20 May 2022 16:55:17 +0800 Subject: [PATCH 103/147] =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=BD=91=E6=A0=BCID=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java index 69676d8e14..3b2fe63a12 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProjectApprovalFormDTO.java @@ -73,7 +73,7 @@ public class ProjectApprovalFormDTO implements Serializable { /** * 网格ID */ - @NotBlank(message = "网格ID不能为空",groups = {AddGroup.class,ProjectApprovalFormDTO.ApprovalCategory.class}) + @NotBlank(message = "网格ID不能为空",groups = {AddGroup.class}) private String gridId; /** From 41861190d4c1be917e8612e44eb5a1806eee7773 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 20 May 2022 16:55:18 +0800 Subject: [PATCH 104/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E8=BD=AC=E9=9C=80?= =?UTF-8?q?=E6=B1=82=20=E5=A2=9E=E5=8A=A0=E6=8C=87=E6=B4=BE=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcUserDemandRecServiceImpl.java | 16 ++++++++++++++++ .../java/com/epmet/dto/form/IcDemandFormDTO.java | 12 ++++++++++++ .../db/migration/V0.0.23__add_ic_event.sql | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index ac44e6559a..003485d8d9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -1396,6 +1396,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl Date: Fri, 20 May 2022 17:36:23 +0800 Subject: [PATCH 105/147] .. --- .../dto/form/demand/ReportDemandFormDTO.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java index 025297f1de..34b457ffe2 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java @@ -118,4 +118,19 @@ public class ReportDemandFormDTO implements Serializable { */ private String originId; + /** + * 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + */ + private String serviceType; + + /** + * 志愿者:居民端爱心互助的志愿者userId; + */ + private String serverId; + + /** + * 服务方姓名 + */ + private String serverName; + } From 07121b17766edbd9a38ed92c720385113083039b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 09:09:13 +0800 Subject: [PATCH 106/147] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?=E8=87=AA=E7=BB=84=E7=BB=87=E9=BB=98=E8=AE=A4=E5=85=B6=E4=BB=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcCommunitySelfOrganizationServiceImpl.java | 4 ++++ .../db/migration/V0.0.16__self_org_categorydefaultother.sql | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 98c63a60c4..f1de7d88c2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -773,6 +773,10 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl list=pageInfo.getList(); for (CommunitySelfOrganizationListDTO dto : list) { dto.setColor(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getColor()); + if (StringUtils.isNotBlank(dto.getCategoryCode())) { + dto.setCategoryName(SelfOrgCategoryEnum.getEnum(dto.getCategoryCode()).getName()); + } + } return new PageData<>(list, pageInfo.getTotal()); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql new file mode 100644 index 0000000000..64a82e8c86 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.16__self_org_categorydefaultother.sql @@ -0,0 +1,4 @@ +update ic_community_self_organization set CATEGORY_CODE='other' +where DEL_FLAG='0' +and CATEGORY_CODE is not null +and CATEGORY_CODE !=''; \ No newline at end of file From 7ce392f40c829ab8035100eeb8709973dd6ae759 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 09:26:55 +0800 Subject: [PATCH 107/147] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E6=98=AF=E5=90=A6=E9=80=80?= =?UTF-8?q?=E5=9B=9E=E6=A0=87=E5=BF=97=E5=92=8C=E5=A4=84=E7=90=86=E6=A0=87?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/ProjectManageListResultDTO.java | 5 +++ .../service/impl/ProjectServiceImpl.java | 40 +++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java index 4cb79ebdf7..7c9bb481e8 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java @@ -69,8 +69,13 @@ public class ProjectManageListResultDTO implements Serializable { @JsonIgnore private Date updatedTime; + @JsonIgnore private String isHandle; + private Boolean processable; + + private Boolean returnable; + public ProjectManageListResultDTO() { this.gridName = ""; this.title = ""; 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 cd4c7df3ab..ab30428219 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 @@ -3227,6 +3227,8 @@ public class ProjectServiceImpl extends BaseServiceImpl departmentList = projectStaffService.getDepartmentNameList(projectStaffDTO); + if (null != departmentList && departmentList.size() > NumConstant.ZERO) { + //TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录, + // 如果没有记录或者INTERNAL_STATUS是closed,processable的值为true + CustomerProjectParameterDTO customerProjectParameterDTO = new CustomerProjectParameterDTO(); + customerProjectParameterDTO.setCustomerId(formDTO.getCustomerId()); + customerProjectParameterDTO.setParameterKey(ProjectConstant.EXTERNAL_SYSTEM); + String parameterValue = parameterService.getParameterValueByKey(customerProjectParameterDTO); + if (StringUtils.isNotEmpty(parameterValue)){ + if (parameterValue.equals(NumConstant.ONE_STR)) { + List projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); + // 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录 + ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.selectSubProcess(projectStaffIds); + if (null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) { + p.setProcessable(true); + } else { + p.setProcessable(false); + } + } else { + p.setProcessable(true); + } + } else { + p.setProcessable(true); + } + } else { + p.setProcessable(false); + } + ReturnListFromDTO returnListFromDTO = new ReturnListFromDTO(); + returnListFromDTO.setProjectId(p.getProjectId()); + List returnableList = projectProcessService.getReturnableList(returnListFromDTO); + if (null != returnableList && returnableList.size() > NumConstant.ZERO) { + p.setReturnable(true); + } else { + p.setReturnable(false); + } } }); result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); From 205f38827854159eb5b89be1e9273e24d1091b6a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 09:27:39 +0800 Subject: [PATCH 108/147] updateCommunitySelfOrganization --- .../main/resources/mapper/IcCommunitySelfOrganizationDao.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index 2ad8ac92b9..b8374a921e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -16,7 +16,8 @@ ORGANIZATION_CREATED_TIME = #{organizationCreatedTime}, REMARK = #{remark}, UPDATED_TIME = NOW(), - UPDATED_BY = #{updatedBy} + UPDATED_BY = #{updatedBy}, + CATEGORY_CODE =#{categoryCode} WHERE DEL_FLAG = 0 AND ID = #{orgId} From 317b7f09ce21fdaf65c850c180ab2869e3601694 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Mon, 23 May 2022 09:40:53 +0800 Subject: [PATCH 109/147] =?UTF-8?q?=E3=80=90=E4=BA=8B=E4=BB=B6=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=88=86=E6=9E=90=E3=80=91=E7=A0=94=E5=88=A4=E5=88=86?= =?UTF-8?q?=E6=9E=90=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=B1=85=E6=B0=91=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E4=BA=8B=E4=BB=B6=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/IcEventYpAnalysisResultDTO.java | 4 ++++ .../src/main/java/com/epmet/dao/IcEventDao.java | 7 +++++++ .../java/com/epmet/service/impl/IcEventServiceImpl.java | 4 ++++ .../src/main/resources/mapper/IcEventDao.xml | 7 +++++++ 4 files changed, 22 insertions(+) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventYpAnalysisResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventYpAnalysisResultDTO.java index 1bf3e0ce99..934833d09c 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventYpAnalysisResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventYpAnalysisResultDTO.java @@ -60,6 +60,10 @@ public class IcEventYpAnalysisResultDTO { */ private String categoryPids; + /** + * 居民上报的事件的总和 + */ + private Integer resiReportEventCount; /** * 家属 */ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index 5ee5947514..2c7812b93c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -131,4 +131,11 @@ public interface IcEventDao extends BaseDao { List selectMyReport(MyReportIcEvFormDTO formDTO); int updateRedDot(@Param("userId") String userId, @Param("icEventId")String icEventId); + + /** + * 查询居民上报的时间数量 + * @param reportorIdCard 上报人的身份证号 + * @return + */ + Integer getResiReportEventCount(@Param("reportorIdCard") String reportorIdCard); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index f7a35fd0ae..6ad0222007 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -611,6 +611,9 @@ public class IcEventServiceImpl extends BaseServiceImpl + + \ No newline at end of file From 75e9b91de0d19853411750a6cd0f1ad357afe40c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 10:03:22 +0800 Subject: [PATCH 110/147] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E5=88=86=E7=B1=BB=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/EpmetAdminOpenFeignClient.java | 4 ++++ .../EpmetAdminOpenFeignClientFallback.java | 6 ++++++ .../epmet/controller/SysDictDataController.java | 5 +++++ .../main/java/com/epmet/dao/SysDictDataDao.java | 3 +++ .../com/epmet/service/SysDictDataService.java | 2 ++ .../service/impl/SysDictDataServiceImpl.java | 5 +++++ .../main/resources/mapper/SysDictDataDao.xml | 11 +++++++++++ .../IcCommunitySelfOrganizationServiceImpl.java | 17 +++++++++-------- .../mapper/IcCommunitySelfOrganizationDao.xml | 2 +- 9 files changed, 46 insertions(+), 9 deletions(-) diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java index 9068180318..59eb1e1e40 100644 --- a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java +++ b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/EpmetAdminOpenFeignClient.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.DictTreeResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.SysDictDataDTO; import com.epmet.dto.result.CorsConfigResultDTO; import com.epmet.feign.fallback.EpmetAdminOpenFeignClientFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; @@ -101,4 +102,7 @@ public interface EpmetAdminOpenFeignClient { @PostMapping("/sys/dict/data/dictlist") Result> dictList(@RequestBody DictListFormDTO formDTO); + + @PostMapping("/sys/dict/data/dictDataList/{dictType}") + Result> dictDataList(@PathVariable("dictType") String dictType); } diff --git a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java index 110ba490e3..98e7e7f0f0 100644 --- a/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java +++ b/epmet-admin/epmet-admin-client/src/main/java/com/epmet/feign/fallback/EpmetAdminOpenFeignClientFallback.java @@ -7,6 +7,7 @@ import com.epmet.commons.tools.dto.result.DictTreeResultDTO; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.SysDictDataDTO; import com.epmet.dto.result.CorsConfigResultDTO; import com.epmet.feign.EpmetAdminOpenFeignClient; @@ -59,4 +60,9 @@ public class EpmetAdminOpenFeignClientFallback implements EpmetAdminOpenFeignCli public Result> dictList(DictListFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictList", formDTO); } + + @Override + public Result> dictDataList(String dictType) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_ADMIN_SERVER, "dictDataList", dictType); + } } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java index 3c3ac4d344..ce18026bf8 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/controller/SysDictDataController.java @@ -172,4 +172,9 @@ public class SysDictDataController { return new Result>().ok(sysDictDataService.dictMap(dictType)); } + @PostMapping("dictDataList/{dictType}") + public Result> dictDataList(@PathVariable("dictType") String dictType){ + List list=sysDictDataService.getDictDataList(dictType); + return new Result>().ok(list); + } } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java index 7ba543b6af..8c437ee27e 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/SysDictDataDao.java @@ -11,6 +11,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.tools.dto.result.DictListResultDTO; import com.epmet.commons.tools.dto.result.DictTreeResultDTO; +import com.epmet.dto.SysDictDataDTO; import com.epmet.entity.DictData; import com.epmet.entity.SysDictDataEntity; import org.apache.ibatis.annotations.Mapper; @@ -33,4 +34,6 @@ public interface SysDictDataDao extends BaseDao { List selectDictList(String dictType); List selectDictData(String dictType); + + List selectDictDataList(String dictType); } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java index b49e51fbdc..6277ab6d2f 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/SysDictDataService.java @@ -90,4 +90,6 @@ public interface SysDictDataService extends BaseService { Map dictMap(String dictType); List dictListTree(String dictType); + + List getDictDataList(String dictType); } diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java index bd042379dd..a7b6bff903 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java @@ -225,4 +225,9 @@ public class SysDictDataServiceImpl extends BaseServiceImpl getDictDataList(String dictType) { + return baseDao.selectDictDataList(dictType); + } + } diff --git a/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml b/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml index d7ea8fa27b..9330c7d779 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml +++ b/epmet-admin/epmet-admin-server/src/main/resources/mapper/SysDictDataDao.xml @@ -33,4 +33,15 @@ a.sort asc + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index f1de7d88c2..833f93d900 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -34,6 +34,7 @@ import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcCommunitySelfOrganizationDao; import com.epmet.dao.IcUserDemandRecDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; +import com.epmet.dto.SysDictDataDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; import com.epmet.dto.result.*; @@ -716,20 +717,20 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl querySelfOrgCategoryTotal(String customerId, String staffId) { - Result> dictMapRes = adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); - if (!dictMapRes.success() || MapUtils.isEmpty(dictMapRes.getData())) { + Result> dictDataListRes = adminOpenFeignClient.dictDataList(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + if (!dictDataListRes.success() || CollectionUtils.isEmpty(dictDataListRes.getData())) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区自组织分类查询异常"); } - CustomerStaffInfoCacheResult staffInfo=getStaffInfo(customerId,staffId); + CustomerStaffInfoCacheResult staffInfo = getStaffInfo(customerId, staffId); List list = baseDao.selectCountGroupByCategory(customerId, staffInfo.getAgencyId()); Map map = list.stream().collect(Collectors.toMap(SelfOrgCategoryTotalResDTO::getCategoryCode, SelfOrgCategoryTotalResDTO::getTotal, (key1, key2) -> key2)); List resultList = new ArrayList<>(); - for (String key : dictMapRes.getData().keySet()) { + for (SysDictDataDTO dict : dictDataListRes.getData()) { SelfOrgCategoryTotalResDTO resDTO = new SelfOrgCategoryTotalResDTO(); - resDTO.setCategoryCode(key); - resDTO.setCategoryName(dictMapRes.getData().get(key)); - resDTO.setTotal(map.containsKey(key) ? map.get(key) : NumConstant.ZERO); - resDTO.setColor(SelfOrgCategoryEnum.getEnum(key).getColor()); + resDTO.setCategoryCode(dict.getDictValue()); + resDTO.setCategoryName(dict.getDictLabel()); + resDTO.setTotal(map.containsKey(dict.getDictValue()) ? map.get(dict.getDictValue()) : NumConstant.ZERO); + resDTO.setColor(SelfOrgCategoryEnum.getEnum(dict.getDictValue()).getColor()); resultList.add(resDTO); } return resultList; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index b8374a921e..4293f65f43 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -166,7 +166,7 @@ so.LONGITUDE AS longitude, so.LATITUDE AS latitude, so.ID as orgId, - so.remark + IFNULL(so.remark,'')AS remark FROM ic_community_self_organization so WHERE so.DEL_FLAG = 0 AND so.CATEGORY_CODE IS NOT NULL From aece644a632066c669512ae8696d4b1555bd0939 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 23 May 2022 10:12:57 +0800 Subject: [PATCH 111/147] .. --- .../src/main/resources/db/migration/V0.0.23__add_ic_event.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql index b5720f74b9..6ccf4c6343 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.23__add_ic_event.sql @@ -17,7 +17,7 @@ CREATE TABLE `ic_event` ( `ADDRESS` varchar(255) NOT NULL COMMENT '地址', `STATUS` varchar(32) NOT NULL DEFAULT 'processing' COMMENT '处理中:processing;已办结:closed_case', `CLOSE_CASE_TIME` datetime DEFAULT NULL COMMENT '办结时间', - `OPERATION_TYPE` char(1) DEFAULT NULL COMMENT '0:已回复 1:已转项目 1:已转需求', + `OPERATION_TYPE` char(1) DEFAULT NULL COMMENT '0:已回复 1:已转项目 2:已转需求', `OPERATION_ID` varchar(32) DEFAULT NULL COMMENT '项目、需求ID', `READ_FLAG` tinyint(1) NOT NULL DEFAULT '0' COMMENT '事件是否被阅读过;1已读;针对报事人待处理列表', `RED_DOT` tinyint(1) NOT NULL DEFAULT '0' COMMENT '报事人的红点:展示1;不展示:0;【工作人员回复/立项/转需求/办结更新为1】', From 529f049057ef8d5009ff3eef3c6f712e64b4c7d7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 11:22:29 +0800 Subject: [PATCH 112/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=88=86=E6=9E=90=E9=A5=BC22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/SubOrgResDTO.java | 2 ++ .../resources/mapper/CustomerAgencyDao.xml | 8 +++++-- .../main/java/com/epmet/dao/IcEventDao.java | 7 ++---- .../service/impl/IcEventServiceImpl.java | 10 ++++++-- .../src/main/resources/mapper/IcEventDao.xml | 24 +++++++++---------- 5 files changed, 30 insertions(+), 21 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java index 220c5c5bbf..8bc06550a1 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java @@ -17,4 +17,6 @@ public class SubOrgResDTO implements Serializable { */ private String orgType; private String orgName; + private String pid; + private String pids; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index b53781ea0e..50fbf27003 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -761,7 +761,9 @@ SELECT ca.ID AS orgId, ca.ORGANIZATION_NAME AS orgName, - 'agency' AS orgType + 'agency' AS orgType, + ca.PID, + ca.PIDS FROM customer_agency ca WHERE @@ -771,7 +773,9 @@ SELECT cg.ID AS orgId, cg.GRID_NAME AS orgName, - 'grid' AS orgType + 'grid' AS orgType, + cg.PID, + cg.PIDS FROM customer_grid cg WHERE diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index 2c7812b93c..52196ff764 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -112,15 +112,12 @@ public interface IcEventDao extends BaseDao { */ void updateAutoEvaluation(@Param("ids")List ids); - Integer selectGridTotal(String gridId); - /** * - * @param orgId - * @param orgType + * @param formDTO * @return */ - Integer selectOrgTotal(@Param("orgId") String orgId, @Param("orgType") String orgType); + Integer selectOrgTotal(IcEventCategoryAnalysisFormDTO formDTO); /** * 居民端小程序我上报的事件-列表+详情 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 6ad0222007..faf39035ee 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1007,7 +1007,7 @@ public class IcEventServiceImpl extends BaseServiceImpl 60*60*24*7 LIMIT #{no},#{size} - - SELECT count( ie.id ) as total FROM ic_event ie + inner join ic_event_category ic + on(ie.ID=ic.IC_EVENT_ID and ic.DEL_FLAG='0') WHERE ie.DEL_FLAG = '0' + AND ie.CUSTOMER_ID = #{customerId} + and ie.HAPPEN_TIME >= #{queryStartTime} + and ie.HAPPEN_TIME #{queryEndTime} - and ie.GRID_PIDS like CONCAT('%',#{orgId},'%') + and e.GRID_PIDS like CONCAT(#{gridPids},'%') - and ie.GRID_ID=#{orgId} + AND ie.GRID_ID = #{orgId} + + + and ic.CATEGORY_CODE like concat(#{categoryCode},'%') From 33fdecc39449ab849d9ee241793794d9d187d992 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 11:33:13 +0800 Subject: [PATCH 113/147] i --- .../gov-project-server/src/main/resources/mapper/IcEventDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 98a5ed5057..d8958fd4a3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -271,7 +271,7 @@ and ie.HAPPEN_TIME >= #{queryStartTime} and ie.HAPPEN_TIME #{queryEndTime} - and e.GRID_PIDS like CONCAT(#{gridPids},'%') + and ie.GRID_PIDS like CONCAT(#{gridPids},'%') AND ie.GRID_ID = #{orgId} From b0c2f6ab6d5b7df69bea90f23c637c9be7121c90 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 11:42:20 +0800 Subject: [PATCH 114/147] bugfix --- .../com/epmet/service/impl/IcEventServiceImpl.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index faf39035ee..3e07d15b32 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1017,11 +1017,15 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 13:37:41 +0800 Subject: [PATCH 115/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/IcEventListResultDTO.java | 8 ++ .../epmet/controller/IcEventController.java | 62 +++++++++ .../java/com/epmet/excel/IcEventExcel.java | 121 +++++------------- .../src/main/resources/mapper/IcEventDao.xml | 2 + 4 files changed, 105 insertions(+), 88 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java index c4dd90f6be..19bb9b55df 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java @@ -120,6 +120,10 @@ public class IcEventListResultDTO implements Serializable { * 0:已回复 1:已转项目 1:已转需求 */ private String operationType; + /** + * 0:已回复 1:已转项目 1:已转需求 + */ + private String operationTypeName; /** * 项目、需求ID */ @@ -179,6 +183,10 @@ public class IcEventListResultDTO implements Serializable { * 分类名称 */ private String categoryName; + /** + * 第一章图片url + */ + private String imageUrl; /** * 事件附件 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index edca0f5cc2..62c48a83f4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -1,13 +1,22 @@ package com.epmet.controller; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.write.metadata.WriteSheet; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; @@ -17,11 +26,17 @@ import com.epmet.dto.IcEventDTO; import com.epmet.dto.IcEventReplyDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.excel.IcEventExcel; import com.epmet.service.IcEventReplyService; import com.epmet.service.IcEventService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; import java.util.Date; import java.util.LinkedList; import java.util.List; @@ -34,6 +49,7 @@ import java.util.List; */ @RestController @RequestMapping("icEvent") +@Slf4j public class IcEventController { @Autowired @@ -371,4 +387,50 @@ public class IcEventController { icEventService.resiReply(formDTO); return new Result(); } + + /** + * @Author sun + * @Description 数字平台-事件导出 + **/ + @PostMapping("export") + public void export(@RequestBody IcEventListFormDTO formDTO, HttpServletResponse response) throws IOException { + formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); + formDTO.setStaffId("d8dfc6c1fa2538976059f3900036d419"); + formDTO.setIsPage(false); + ExcelWriter excelWriter = null; + formDTO.setPageSize(NumConstant.TEN_THOUSAND); + try { + String fileName = "事件管理" + DateUtils.format(new Date()) + ".xlsx"; + excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), IcEventExcel.class).build(); + WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build(); + PageData data = null; + List list = null; + do { + data = icEventService.list(formDTO); + data.getList().forEach(d->{ + if(!org.springframework.util.CollectionUtils.isEmpty(d.getImageList())){ + d.setImageUrl(d.getImageList().get(NumConstant.ZERO)); + } + }); + list = ConvertUtils.sourceToTarget(data.getList(), IcEventExcel.class); + formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE); + excelWriter.write(list, writeSheet); + } while (CollectionUtils.isNotEmpty(list) && list.size() == formDTO.getPageSize()); + } catch (EpmetException e) { + response.reset(); + response.setCharacterEncoding("UTF-8"); + response.setHeader("content-type", "application/json; charset=UTF-8"); + PrintWriter printWriter = response.getWriter(); + Result result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),e.getMsg()); + printWriter.write(JSON.toJSONString(result)); + printWriter.close(); + } catch (Exception e) { + log.error("export exception", e); + } finally { + if (excelWriter != null) { + excelWriter.finish(); + } + } + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java index fdf4ae9a0a..5bfc88d274 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/IcEventExcel.java @@ -1,6 +1,8 @@ package com.epmet.excel; -import cn.afterturn.easypoi.excel.annotation.Excel; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.format.DateTimeFormat; +import com.alibaba.excel.annotation.write.style.ColumnWidth; import lombok.Data; import java.util.Date; @@ -14,107 +16,50 @@ import java.util.Date; @Data public class IcEventExcel { - @Excel(name = "主键,事件id") - private String id; + @ExcelProperty(value = "所属网格") + @ColumnWidth(20) + private String gridName; - @Excel(name = "客户ID") - private String customerId; - - @Excel(name = "事件所属的网格Id") - private String gridId; - - @Excel(name = "网格的所属组织") - private String agencyId; - - @Excel(name = "网格的所有组织Id") - private String gridPids; - - @Excel(name = "报事的人【居民端/pc端居民Id】可为空") - private String reportUserId; - - @Excel(name = "报事人姓名") - private String name; - - @Excel(name = "手机号") - private String mobile; - - @Excel(name = "身份证号") - private String idCard; - - @Excel(name = "反映渠道【字典表】") - private String sourceType; - - @Excel(name = "事件内容") + @ExcelProperty(value = "事件内容") + @ColumnWidth(25) private String eventContent; - @Excel(name = "纬度") - private String latitude; + @ExcelProperty(value = "图片") + @ColumnWidth(25) + private String imageUrl; - @Excel(name = "经度") - private String longitude; + @ExcelProperty(value = "上报渠道") + @ColumnWidth(20) + private String sourceTypeName; - @Excel(name = "地址") + @ExcelProperty(value = "地址") + @ColumnWidth(25) private String address; - @Excel(name = "处理中:processing;已办结:closed_case") - private String status; - - @Excel(name = "办结时间") - private Date closeCaseTime; - - @Excel(name = "0:已回复 1:已转项目 1:已转需求") - private String operationType; - - @Excel(name = "项目、需求ID") - private String operationId; - - @Excel(name = "事件是否被阅读过;1已读;针对报事人待处理列表") - private Integer readFlag; - - @Excel(name = "报事人的红点:展示1;不展示:0;人大代表回复,工作人员回复/立项/转需求/办结更新为1; ") - private Integer redDot; - - @Excel(name = "最近一次操作时间(回复、立项、转需求、办结更新此列)") - private Date latestOperatedTime; - - @Excel(name = "是否解决:已解决 resolved,未解决 un_solved") - private String resolveStatus; - - @Excel(name = "结案说明") - private String closeRemark; + @ExcelProperty(value = "报事人") + @ColumnWidth(20) + private String name; - @Excel(name = "评论人") - private String commentUserId; + @ExcelProperty(value = "手机号") + @ColumnWidth(20) + private String mobile; - @Excel(name = "评论内容") + @ExcelProperty(value = "满意度") + @ColumnWidth(20) private String commentContent; - @Excel(name = "评论时间") - private Date commentTime; - - @Excel(name = "事件审核状态") - private String auditStatus; - - @Excel(name = "审核理由") - private String auditReason; - - @Excel(name = "删除标识:0.未删除 1.已删除") - private String delFlag; - - @Excel(name = "乐观锁") - private Integer revision; - - @Excel(name = "创建人") - private String createdBy; - - @Excel(name = "展示红点:visible;隐藏:invisible;人大回复、工作人员回复/立项更新为visible; 插入数据默认不展示") + @ExcelProperty(value = "上报时间") + @ColumnWidth(20) + @DateTimeFormat("yyyy-MM-dd HH:mm:ss") private Date createdTime; - @Excel(name = "更新人") - private String updatedBy; + @ExcelProperty(value = "结点") + @ColumnWidth(20) + private String operationTypeName; - @Excel(name = "更新时间") - private Date updatedTime; + @ExcelProperty(value = "状态") + @ColumnWidth(20) + private String statusName; } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index d8958fd4a3..1e5f89095c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -105,6 +105,7 @@ + @@ -156,6 +157,7 @@ ie.satisfaction, IF(ie.satisfaction = 'bad','不满意',IF (ie.satisfaction = 'good','基本满意',IF (ie.satisfaction = 'perfect','非常满意',''))) satisfactionName, ie.operation_type, + IF(ie.operation_type = '0','已回复',IF (ie.operation_type = '1','已转项目',IF (ie.operation_type = '2','已转需求',''))) operationTypeName, ie.operation_id, ie.read_flag, ie.red_dot, From 234c79fd3dc51b7e900109fee44eb0ec50126bbd Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 14:09:43 +0800 Subject: [PATCH 116/147] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E6=8B=8D=E5=AE=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcEventServiceImpl.java | 9 +++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 9 +++++++++ .../EpmetUserOpenFeignClientFallback.java | 5 +++++ .../controller/UserResiInfoController.java | 11 +++++++++++ .../com/epmet/service/UserResiInfoService.java | 8 ++++++++ .../service/impl/UserResiInfoServiceImpl.java | 17 ++++++++++++++++- 6 files changed, 58 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 3e07d15b32..3fde323af5 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1159,6 +1159,15 @@ public class IcEventServiceImpl extends BaseServiceImpl isResiFlag = userOpenFeignClient.getIsResiFlag(formDTO.getUserId()); + if (!isResiFlag.success()){ + throw new EpmetException("查询是否注册居民失败..."); + } + // todo 未注册居民不允许随手拍、随时讲 + if (!isResiFlag.getData()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),""); + } if(StringUtils.isBlank(formDTO.getContent()) && CollectionUtils.isEmpty(formDTO.getVoiceList())) { //话题内容和语音不能同时为空 log.error("事件内容和语音不能同时为空"); diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 0417195dbc..2e5ec4bcd5 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -773,4 +773,13 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/icresiuser/getAllUserIds") Result> getAllUserIds(@RequestParam("idcard") String idCard, @RequestParam("customerId") String customerId); + + /** + * Desc: 获取是否注册居民标志,true:已注册,false:未注册 + * @param userId + * @author zxc + * @date 2022/5/23 13:52 + */ + @PostMapping("/epmetuser/userresiinfo/isResiFlag") + Result getIsResiFlag(@RequestParam("userId") String userId); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 94b8493076..49dd6a0a66 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -569,4 +569,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result> getAllUserIds(String idCard, String customerId) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getAllUserIds", idCard,customerId); } + + @Override + public Result getIsResiFlag(String userId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getIsResiFlag", userId); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java index 820f310a40..3ac5a09d81 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java @@ -219,4 +219,15 @@ public class UserResiInfoController { userResiInfoService.submitInLink(param); return new Result(); } + + /** + * Desc: 获取是否注册居民标志,true:已注册,false:未注册 + * @param userId + * @author zxc + * @date 2022/5/23 13:52 + */ + @PostMapping("isResiFlag") + public Result getIsResiFlag(@RequestParam("userId") String userId){ + return new Result().ok(userResiInfoService.getIsResiFlag(userId)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java index 1334034ebd..d28605f95d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java @@ -195,4 +195,12 @@ public interface UserResiInfoService extends BaseService { * @date 2020.12.18 16:34 */ void submitInLink(AfterRegisterResidentInSharableLinkFormDTO param); + + /** + * Desc: 获取是否注册居民标志,true:已注册,false:未注册 + * @param userId + * @author zxc + * @date 2022/5/23 13:52 + */ + Boolean getIsResiFlag(String userId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index ee80c0809d..3e2d368486 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -499,8 +499,23 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 14:22:47 +0800 Subject: [PATCH 117/147] =?UTF-8?q?=E7=AB=8B=E9=A1=B9=E3=80=81=E8=BD=AC?= =?UTF-8?q?=E9=9C=80=E6=B1=82=20=E5=88=86=E7=B1=BB=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/IcDemandFormDTO.java | 5 ++ .../service/impl/IcEventServiceImpl.java | 75 +++++++++++++++---- 2 files changed, 67 insertions(+), 13 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java index 50d659f799..0e2bc16a97 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcDemandFormDTO.java @@ -165,5 +165,10 @@ public class IcDemandFormDTO implements Serializable { * 服务方名称 */ private String serverName; + /** + * 二级分类Id + */ + @NotBlank(message = "分类id不能为空",groups = AddUserInternalGroup.class) + private String categoryId; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 3fde323af5..f1561debbe 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -21,12 +21,7 @@ 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.*; -import com.epmet.constant.ProjectConstant; -import com.epmet.constant.EventConstant; -import com.epmet.constant.ReadFlagConstant; -import com.epmet.constant.UserMessageConstant; -import com.epmet.constant.ResiEventAction; -import com.epmet.constant.UserMessageTypeConstant; +import com.epmet.constant.*; import com.epmet.dao.IcEventDao; import com.epmet.dto.*; import com.epmet.dto.form.*; @@ -744,12 +739,11 @@ public class IcEventServiceImpl extends BaseServiceImpl logList = new ArrayList<>(); - logList.add(logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), date, ResiEventAction.REPLY.getCode(), ResiEventAction.REPLY.getDesc())); + logList.add(logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), date, ResiEventAction.REPLY.getCode(), ResiEventAction.REPLY.getCode())); //回复时选择了已完成 if (StringUtils.isNotBlank(formDTO.getOperationType()) && ResiEventAction.CLOSE_CASE.getCode().equals(formDTO.getStatus())) { date.setTime(date.getTime() + 6000 * 1); - logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, ResiEventAction.CLOSE_CASE.getCode(), ResiEventAction.CLOSE_CASE.getDesc())); - logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, "close_case", "close_case")); + logList.add(logEntity(formDTO.getCustomerId(), entity.getId(), formDTO.getUserId(), date, ResiEventAction.CLOSE_CASE.getCode(), ResiEventAction.CLOSE_CASE.getCode())); UserMessageFormDTO close = ConvertUtils.sourceToTarget(messageFormDTO, UserMessageFormDTO.class); close.setMessageContent(String.format("您上报的事件已完成,请查看。")); @@ -785,11 +779,39 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryList = new ArrayList<>(); + categoryList.add(categoryId); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + IcEventCategoryEntity categoryEntity = null; + for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ + if (ca.getId().equals(categoryId)) { + categoryEntity = new IcEventCategoryEntity(); + categoryEntity.setCustomerId(formDTO.getCustomerId()); + categoryEntity.setIcEventId(entity.getId()); + categoryEntity.setCategoryId(ca.getId()); + categoryEntity.setCategoryPids(ca.getPids()); + categoryEntity.setCategoryCode(ca.getCategoryCode()); + } + } + + IcEventCategoryEntity icEventCategory = icEventCategoryService.getByEventId(formDTO.getIcEventId()); + if (null == icEventCategory || StringUtils.isEmpty(icEventCategory.getId())) { + icEventCategoryService.insert(categoryEntity); + } else { + categoryEntity.setId(icEventCategory.getId()); + icEventCategoryService.updateById(categoryEntity); + } + } + + //5.新增操作记录 IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getUserId(), new Date(), "shift_project", "shift_project"); icEventOperationLogService.insert(logEntity); - //5.判断来源居民端的事件,转了项目给居民推送站内信 + //6.判断来源居民端的事件,转了项目给居民推送站内信 if ("0".equals(entity.getSourceType())) { //通知 List msgList = new ArrayList<>(); @@ -842,11 +864,38 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryList = new ArrayList<>(); + categoryList.add(formDTO.getCategoryId()); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryList); + IcEventCategoryEntity categoryEntity = null; + for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ + if (ca.getId().equals(formDTO.getCategoryId())) { + categoryEntity = new IcEventCategoryEntity(); + categoryEntity.setCustomerId(formDTO.getCustomerId()); + categoryEntity.setIcEventId(entity.getId()); + categoryEntity.setCategoryId(ca.getId()); + categoryEntity.setCategoryPids(ca.getPids()); + categoryEntity.setCategoryCode(ca.getCategoryCode()); + } + } + + IcEventCategoryEntity icEventCategory = icEventCategoryService.getByEventId(formDTO.getIcEventId()); + if (null == icEventCategory || StringUtils.isEmpty(icEventCategory.getId())) { + icEventCategoryService.insert(categoryEntity); + } else { + categoryEntity.setId(icEventCategory.getId()); + icEventCategoryService.updateById(categoryEntity); + } + } + + //5.新增操作记录 IcEventOperationLogEntity logEntity = logEntity(formDTO.getCustomerId(), formDTO.getIcEventId(), formDTO.getDemandUserId(), new Date(), "shift_demand", "shift_demand"); icEventOperationLogService.insert(logEntity); - //5.判断来源居民端的事件,转了项目给居民推送站内信 + //6.判断来源居民端的事件,转了项目给居民推送站内信 if ("0".equals(entity.getSourceType())) { //通知 List msgList = new ArrayList<>(); From f07a7290b97a9e63d3a9e31b3cc57424de7f0612 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 23 May 2022 14:29:14 +0800 Subject: [PATCH 118/147] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E6=8B=8D=E5=AE=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index f1561debbe..842c358de1 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1215,7 +1215,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 14:35:31 +0800 Subject: [PATCH 119/147] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E6=8B=8D=E5=AE=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 1 + .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 8140096f7d..ed274b2c28 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -255,6 +255,7 @@ public enum EpmetErrorCode { IC_NAT(8924,"平台已存在记录,请去修改原有记录"), RESI_IC_NAT(8925,"已存在记录,请联系社区工作人员修改"), IC_MOVE_IN(8926,"居民信息中房屋信息与当前选择房屋不一致,是否更新?"), + NOT_REGEIST_RESI(8927,"未注册居民"), //通用错误码 start diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 842c358de1..b420f9542d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1215,7 +1215,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 14:38:44 +0800 Subject: [PATCH 120/147] =?UTF-8?q?=E9=9A=8F=E6=89=8B=E6=8B=8D=E5=AE=B6?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/IcEventServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index b420f9542d..075b5a6ea9 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1213,7 +1213,6 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 15:02:25 +0800 Subject: [PATCH 121/147] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=B6=E7=AB=8B?= =?UTF-8?q?=E9=A1=B9=E3=80=81=E8=BD=AC=E9=9C=80=E6=B1=82=E3=80=81=E5=B7=B2?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=97=B6=20=E5=88=86=E7=B1=BB=E5=BF=85?= =?UTF-8?q?=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 075b5a6ea9..a6b126c9f6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -176,7 +176,9 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 15:46:01 +0800 Subject: [PATCH 122/147] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E6=B6=89=E5=8F=8A=E5=88=B0=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectLogDailyDao.xml | 10 +++++----- .../src/main/resources/mapper/project/ProjectDao.xml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) 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 83158a9711..cdf8395fd2 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 @@ -141,7 +141,7 @@ WHERE 1 = 1 - AND f.ORIGIN = 'issue' + AND f.ORIGIN IN('issue', 'ic_event') AND f.PROJECT_STATUS = 'closed' AND f.CUSTOMER_ID = #{customerId} ) a @@ -468,7 +468,7 @@ AND fm.MONTH_ID = #{monthId} AND fm.PROJECT_STATUS = 'closed' AND fm.GRID_ID != '' - AND fm.ORIGIN = 'issue' + AND fm.ORIGIN IN('issue', 'ic_event') ) a GROUP BY GRID_ID @@ -490,7 +490,7 @@ WHERE fm.CUSTOMER_ID = #{customerId} AND fm.MONTH_ID = #{monthId} AND fm.PROJECT_STATUS = 'closed' - AND fm.ORIGIN = 'issue' + AND fm.ORIGIN IN('issue', 'ic_event') ) a GROUP BY AGENCY_ID @@ -680,7 +680,7 @@ fm.CUSTOMER_ID = #{customerId} AND fm.PROJECT_STATUS = 'closed' AND fm.GRID_ID != '' - AND fm.ORIGIN = 'issue' + AND fm.ORIGIN IN('issue', 'ic_event') ) a GROUP BY GRID_ID @@ -701,7 +701,7 @@ INNER JOIN fact_origin_project_main_daily fm ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' ) WHERE fm.CUSTOMER_ID = #{customerId} AND fm.PROJECT_STATUS = 'closed' - AND fm.ORIGIN = 'issue' + AND fm.ORIGIN IN('issue', 'ic_event') ) a GROUP BY AGENCY_ID 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 f309d79bf4..2949e36b6f 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 @@ -58,7 +58,7 @@ FROM project WHERE DEL_FLAG = '0' - AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event') + AND ORIGIN IN('issue', 'resi_event', 'ic_event') AND STATUS = 'closed' AND CUSTOMER_ID = #{customerId} AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') #{date} @@ -72,7 +72,7 @@ FROM project WHERE DEL_FLAG = '0' - AND (ORIGIN = 'issue' OR ORIGIN = 'resi_event') + AND ORIGIN IN('issue', 'resi_event', 'ic_event') AND STATUS = 'closed' AND CUSTOMER_ID = #{customerId} AND DATE_FORMAT(UPDATED_TIME, '%Y-%m-%d') = #{date} From ad05dae5b77ccf932c4199011fb8bf88ac389bb9 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 23 May 2022 16:37:07 +0800 Subject: [PATCH 123/147] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E6=B6=89=E5=8F=8A=E5=88=B0=E7=9A=84=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E3=80=81=E7=BB=84=E7=BB=87=E7=9A=84=E6=B2=BB=E7=90=86?= =?UTF-8?q?=E6=8C=87=E6=95=B0=E8=A1=A8=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=8F=8A=E6=9F=A5=E8=AF=A2=E7=9A=84=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactAgencyGovernDailyEntity.java | 8 ++++++ .../datastats/impl/DataStatsServiceImpl.java | 5 +++- .../mapper/datastats/DatsStatsDao.xml | 10 +++++-- .../dto/extract/FactAgencyGovernDailyDTO.java | 10 +++++++ .../dto/extract/FactGridGovernDailyDTO.java | 10 +++++++ .../com/epmet/constant/ProjectConstant.java | 2 ++ .../extract/FactAgencyGovernDailyEntity.java | 10 +++++++ .../extract/FactGridGovernDailyEntity.java | 10 +++++++ .../FactAgencyGovernDailyServiceImpl.java | 28 +++++++++++++++++++ .../impl/FactGridGovernDailyServiceImpl.java | 16 ++++++++++- 10 files changed, 104 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java index a0dc4073d4..0f7a9e2cb7 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java @@ -187,5 +187,13 @@ public class FactAgencyGovernDailyEntity extends BaseEpmetEntity { * 18、当前组织内:来源于工作人员上报事件的项目:结案无需解决数 */ private Integer workEventUnResolvedCount; + /** + * 19、当前组织内:来源于事件管理的项目:结案已解决数 + */ + private Integer icEventResolvedCount; + /** + * 20、当前组织内:来源于事件管理的项目:结案无需解决数 + */ + private Integer icEventUnResolvedCount; } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java index cd77750bee..8682ec5876 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java @@ -1201,9 +1201,12 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve Integer eventUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getEventUnResolvedCount).sum(); Integer workEventResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getWorkEventResolvedCount).sum(); Integer workEventUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getWorkEventUnResolvedCount).sum(); + Integer icEventResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getIcEventResolvedCount).sum(); + Integer icEventUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getIcEventUnResolvedCount).sum(); Integer closedProjectTotal = issueResolvedCount + issueUnResolvedCount+projectResolvedCount + projectUnResolvedCount + eventResolvedCount + eventUnResolvedCount - + workEventResolvedCount + workEventUnResolvedCount; + + workEventResolvedCount + workEventUnResolvedCount + +icEventResolvedCount + icEventUnResolvedCount; resultDTO.setProblemResolvedCount(closedProjectTotal); resultDTO.setGroupSelfGovernRatio(getPercentage(inGroupTopicResolvedCount + inGroupTopicUnResolvedCount, problemResolvedCount)); resultDTO.setGridSelfGovernRatio(getPercentage(gridSelfGovernProjectTotal, closedProjectTotal)); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml index 051bffb00c..330f564b25 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml @@ -631,7 +631,8 @@ ISSUE_PROJECT_RESOLVED_COUNT+ISSUE_PROJECT_UN_RESOLVED_COUNT +APPROVAL_PROJECT_RESOLVED_COUNT+APPROVAL_PROJECT_UN_RESOLVED_COUNT +EVENT_RESOLVED_COUNT+EVENT_UN_RESOLVED_COUNT - +WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount, + +WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT + +IC_EVENT_RESOLVED_COUNT+IC_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount, concat(ROUND(group_self_govern_ratio*100, 1),'%') AS groupSelfGovernRatio, concat(ROUND(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio, concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio, @@ -654,7 +655,8 @@ ISSUE_PROJECT_RESOLVED_COUNT+ISSUE_PROJECT_UN_RESOLVED_COUNT +APPROVAL_PROJECT_RESOLVED_COUNT+APPROVAL_PROJECT_UN_RESOLVED_COUNT +EVENT_RESOLVED_COUNT+EVENT_UN_RESOLVED_COUNT - +WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount, + +WORK_EVENT_RESOLVED_COUNT+WORK_EVENT_UN_RESOLVED_COUNT + +IC_EVENT_RESOLVED_COUNT+IC_EVENT_UN_RESOLVED_COUNT AS problemResolvedCount, concat(ROUND(group_self_govern_ratio*100, 1),'%') AS groupSelfGovernRatio, concat(ROUND(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio, concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio, @@ -693,7 +695,9 @@ EVENT_RESOLVED_COUNT, EVENT_UN_RESOLVED_COUNT, WORK_EVENT_RESOLVED_COUNT, - WORK_EVENT_UN_RESOLVED_COUNT + WORK_EVENT_UN_RESOLVED_COUNT, + IC_EVENT_RESOLVED_COUNT, + IC_EVENT_UN_RESOLVED_COUNT FROM fact_agency_govern_daily WHERE diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java index 5767491aa3..2f438b7bb8 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java @@ -147,6 +147,16 @@ public class FactAgencyGovernDailyDTO implements Serializable { */ private Integer workEventUnResolvedCount; + /** + * 19、当前组织内:来源于事件管理的项目:结案已解决数 + */ + private Integer icEventResolvedCount; + + /** + * 20、当前组织内:来源于事件管理的项目:结案无需解决数 + */ + private Integer icEventUnResolvedCount; + /** * 未出当前网格的,结案项目数 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java index e1122d933b..55dad7ab07 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java @@ -158,6 +158,16 @@ public class FactGridGovernDailyDTO implements Serializable { */ private Integer workEventUnResolvedCount; + /** + * 19、当前组织内:来源于事件管理的项目:结案已解决数 + */ + private Integer icEventResolvedCount; + + /** + * 20、当前组织内:来源于事件管理的项目:结案无需解决数 + */ + private Integer icEventUnResolvedCount; + /** * 15、未出当前网格的,结案项目数=11+12+13+14 */ 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 07cb835339..93e0966db2 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 @@ -85,6 +85,8 @@ public interface ProjectConstant { String PROJECT_ORIGIN_EVENT="resi_event"; String PROJECT_ORIGIN_WORK_EVENT="work_event"; + + String IC_EVENT="ic_event"; /** * 自办 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java index 523f482902..7e0c4ad338 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java @@ -186,4 +186,14 @@ public class FactAgencyGovernDailyEntity extends BaseEpmetEntity { */ private Integer districtDeptClosedCount; + /** + * 19、当前组织内:来源于事件管理的项目:结案已解决数 + */ + private Integer icEventResolvedCount; + /** + * 20、当前组织内:来源于事件管理的项目:结案无需解决数 + */ + private Integer icEventUnResolvedCount; + + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java index 204a3591ff..4120ed76c5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java @@ -186,6 +186,16 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity { */ private Integer workEventUnResolvedCount; + /** + * 19、当前组织内:来源于事件管理的项目:结案已解决数 + */ + private Integer icEventResolvedCount; + + /** + * 20、当前组织内:来源于事件管理的项目:结案无需解决数 + */ + private Integer icEventUnResolvedCount; + /** * 当前网格内出来的项目:由社区结案(已解决+未解决)的项目总数 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 ccf0ee8597..75fd5d4d4f 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 @@ -285,6 +285,32 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl icEventProjectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId, + dateId, ProjectConstant.RESOLVED, + ProjectConstant.IC_EVENT); + if (!icEventProjectResolvedTotal.isEmpty()) { + agencyGovernDailyList.forEach(item -> { + OrgStatisticsResultDTO dto = icEventProjectResolvedTotal.get(item.getAgencyId()); + if (null != dto) { + item.setIcEventResolvedCount(dto.getSum()); + } + }); + } + //2022-5-23 当前组织内:来源于事件管理的项目:结案无需解决数 + Map icEventProjectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId, + dateId, ProjectConstant.UNRESOLVED, + ProjectConstant.IC_EVENT); + if (!icEventProjectUnResolvedTotal.isEmpty()) { + agencyGovernDailyList.forEach(item -> { + OrgStatisticsResultDTO dto = icEventProjectUnResolvedTotal.get(item.getAgencyId()); + if (null != dto) { + item.setIcEventUnResolvedCount(dto.getSum()); + } + }); + } + + // 2.党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的) agencyGovernDailyList.forEach(item -> { int count = item.getInGroupTopicResolvedCount() + item.getInGroupTopicUnResolvedCount(); @@ -423,6 +449,8 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl eventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_EVENT,DimObjectStatusConstant.UNRESOLVED); Map workEventProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_WORK_EVENT,DimObjectStatusConstant.RESOLVED); Map workEventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.PROJECT_ORIGIN_WORK_EVENT,DimObjectStatusConstant.UNRESOLVED); + Map icEventProjectResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.IC_EVENT,DimObjectStatusConstant.RESOLVED); + Map icEventProjectUnResolvedMap=getGridProjectMap(customerId,null,ProjectConstant.CLOSED,ProjectConstant.IC_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); @@ -182,6 +184,16 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl Date: Mon, 23 May 2022 16:38:48 +0800 Subject: [PATCH 124/147] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8E=AA=E6=96=BD?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=BF=94=E5=9B=9Eorigin\originId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/demand/DemandRecResultDTO.java | 9 +++++++++ .../src/main/resources/mapper/IcUserDemandRecDao.xml | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java index c235915430..bbf2c8f3ff 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandRecResultDTO.java @@ -139,4 +139,13 @@ public class DemandRecResultDTO implements Serializable { private String longitude; // 纬度,需求人是ic的居民时,取所住楼栋的中心点位 private String latitude; + + /** + * 来源[需求录入:demand 事件管理:ic_event] + */ + private String origin; + /** + * 来源Id[目前只有来源事件管理的有值] + */ + private String originId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index dd7cf16d8a..4d215c16d9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -85,7 +85,9 @@ CASE WHEN R.DEMAND_USER_TYPE='mini_resi' THEN R.DEMAND_USER_ID ELSE '' END - ) as epmetUserId + ) as epmetUserId, + r.ORIGIN AS origin, + r.ORIGIN_ID AS originId FROM ic_user_demand_rec r left JOIN ic_user_demand_service s ON ( r.id = s.DEMAND_REC_ID AND s.DEL_FLAG = '0' ) From f233a46d6c53c78da43f34202c3117baa1be68b4 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 23 May 2022 16:44:55 +0800 Subject: [PATCH 125/147] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E6=B6=89=E5=8F=8A=E5=88=B0=E7=9A=84=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E3=80=81=E7=BB=84=E7=BB=87=E7=9A=84=E6=B2=BB=E7=90=86?= =?UTF-8?q?=E6=8C=87=E6=95=B0=E8=A1=A8=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=8F=8A=E6=9F=A5=E8=AF=A2=E7=9A=84=E5=8F=98=E5=8C=96=20=20?= =?UTF-8?q?=E6=BC=8F=E6=8F=90=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V0.0.31__alter_govern.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql new file mode 100644 index 0000000000..53d0a39910 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.31__alter_govern.sql @@ -0,0 +1,11 @@ + +ALTER TABLE `fact_agency_govern_daily` +ADD COLUMN `IC_EVENT_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '19、当前组织内:来源于事件管理的项目:结案已解决数' AFTER `WORK_EVENT_UN_RESOLVED_COUNT`, +ADD COLUMN `IC_EVENT_UN_RESOLVED_COUNT` int(11) NOT NULL DEFAULT 0 COMMENT '20、当前组织内:来源于事件管理的项目:结案无需解决数' AFTER `IC_EVENT_RESOLVED_COUNT`; + + +ALTER TABLE `epmet_data_statistical`.`fact_grid_govern_daily` + ADD COLUMN `IC_EVENT_RESOLVED_COUNT` int(11) NULL DEFAULT 0 COMMENT '19、当前组织内:来源于事件管理的项目:结案已解决数' AFTER `WORK_EVENT_UN_RESOLVED_COUNT`, + ADD COLUMN `IC_EVENT_UN_RESOLVED_COUNT` int(11) NULL DEFAULT 0 COMMENT '20、当前组织内:来源于事件管理的项目:结案无需解决数' AFTER `IC_EVENT_RESOLVED_COUNT`; + + From 24275d5f2fd61230f5ad58b45ae36e64ace3a107 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 24 May 2022 09:59:59 +0800 Subject: [PATCH 126/147] =?UTF-8?q?myreport=E8=BF=94=E5=9B=9Elist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/IcEventController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 62c48a83f4..31edd65710 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -336,11 +336,11 @@ public class IcEventController { * @return */ @PostMapping("myreport") - public Result> myReport(@LoginUser TokenDto tokenDto, @RequestBody MyReportIcEvFormDTO formDTO) { + public Result> myReport(@LoginUser TokenDto tokenDto, @RequestBody MyReportIcEvFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); - return new Result>().ok(icEventService.myReport(formDTO)); + return new Result>().ok(icEventService.myReport(formDTO).getList()); } /** From 00376eecd987aec0b4b09e46e420d9bedc014ff7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 24 May 2022 10:34:11 +0800 Subject: [PATCH 127/147] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/ProjectDao.xml | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index e01a45275c..19e082d341 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -578,14 +578,30 @@ t.* FROM (SELECT - DISTINCT pp.PROJECT_ID, - pp.INTERNAL_REMARK, - pp.PUBLIC_REPLY AS projectScheme - FROM project_process pp - WHERE DEL_FLAG = '0' - AND pp.STAFF_ID = #{userId} - AND pp.ORG_ID_PATH LIKE CONCAT('%',#{agencyId}) - ORDER BY pp.CREATED_TIME DESC) t + DISTINCT t.PROJECT_ID, + t.INTERNAL_REMARK, + t.projectScheme + FROM ( + (SELECT + DISTINCT pp.PROJECT_ID, + pp.INTERNAL_REMARK, + pp.PUBLIC_REPLY AS projectScheme + FROM project_process pp + WHERE DEL_FLAG = '0' + AND pp.STAFF_ID = #{userId} + AND pp.ORG_ID_PATH LIKE CONCAT('%',#{agencyId}) + ORDER BY pp.CREATED_TIME DESC) + UNION ALL + (SELECT + DISTINCT ps.PROJECT_ID , + pp.INTERNAL_REMARK, + pp.PUBLIC_REPLY AS projectScheme + FROM project_staff ps + INNER JOIN project_process pp ON pp.PROJECT_ID = ps.PROJECT_ID AND pp.DEL_FLAG = '0' + WHERE ps.DEL_FLAG = '0' + AND ps.ORG_ID_PATH LIKE CONCAT('%',#{agencyId}) + AND ps.STAFF_ID = #{userId} + ORDER BY pp.CREATED_TIME DESC) )t)t INNER JOIN project p ON p.ID = t.PROJECT_ID AND p.DEL_FLAG = '0' LEFT JOIN project_staff ps ON ps.PROJECT_ID = t.PROJECT_ID AND ps.DEL_FLAG = '0' WHERE 1=1 From 8460527dc10131eb927855ecdc62dcee94d53f0b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 24 May 2022 10:51:02 +0800 Subject: [PATCH 128/147] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/ProjectDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index 19e082d341..493f8bbf72 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -606,7 +606,7 @@ LEFT JOIN project_staff ps ON ps.PROJECT_ID = t.PROJECT_ID AND ps.DEL_FLAG = '0' WHERE 1=1 - AND p.TITLE LIKE CONCAT('',#{title},'') + AND p.TITLE LIKE CONCAT('%',#{title},'%') AND DATE_FORMAT(p.CREATED_TIME,'%Y%m%d') >= #{startDate} From cb6fbb6f991a2dfbf06b3c53deba0ec1d67c56ac Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 24 May 2022 13:24:32 +0800 Subject: [PATCH 129/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E8=AF=84=E4=BB=B7?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=A1=B9=E7=9B=AE=E3=80=81=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E8=AF=84=E4=BB=B7=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demand/IcEventCommentToDemandFromDTO.java | 20 +++++++++ .../feign/EpmetHeartOpenFeignClient.java | 8 ++++ .../EpmetHeartOpenFeignClientFallback.java | 6 +++ .../controller/IcUserDemandRecController.java | 10 +++++ .../epmet/service/IcUserDemandRecService.java | 6 +++ .../impl/IcUserDemandRecServiceImpl.java | 41 +++++++++++++++++++ .../ProjectSatisfactionDetailService.java | 6 +++ .../service/impl/IcEventServiceImpl.java | 21 ++++++++++ .../ProjectSatisfactionDetailServiceImpl.java | 25 +++++++++++ 9 files changed, 143 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java new file mode 100644 index 0000000000..21161a301b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/IcEventCommentToDemandFromDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form.demand; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class IcEventCommentToDemandFromDTO implements Serializable { + private static final long serialVersionUID = 591380873862126679L; + + //客户Id + private String customerId; + //需求Id + private String demandRecId; + //评价满意度【 不满意:bad、基本满意:good、非常满意:perfect 】 + private String satisfaction; + //当前操作工作人员Id + private String staffId; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index a444c32e5b..8c9c514a47 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -10,6 +10,7 @@ import com.epmet.dto.form.CommonCustomerFormDTO; import com.epmet.dto.form.IcDemandFormDTO; import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.DemandRecId; +import com.epmet.dto.form.demand.IcEventCommentToDemandFromDTO; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; import com.epmet.dto.result.PartyUnitListResultDTO; @@ -126,4 +127,11 @@ public interface EpmetHeartOpenFeignClient { **/ @PostMapping("/heart/residemand/iceventtodemand") Result icEventToDemand(@RequestBody IcDemandFormDTO formDTO); + + /** + * @description 事件评价时同步=评价结果到需求 + **/ + @PostMapping("/heart/userdemand/iceventcomment") + Result icEventComment(@RequestBody IcEventCommentToDemandFromDTO formDTO); + } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index 6ebee201a1..de7669bba9 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -11,6 +11,7 @@ import com.epmet.dto.form.CommonCustomerFormDTO; import com.epmet.dto.form.IcDemandFormDTO; import com.epmet.dto.form.PartyUnitListFormDTO; import com.epmet.dto.form.demand.DemandRecId; +import com.epmet.dto.form.demand.IcEventCommentToDemandFromDTO; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.form.resi.VolunteerCommonFormDTO; import com.epmet.dto.result.PartyUnitListResultDTO; @@ -122,4 +123,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli public Result icEventToDemand(IcDemandFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventToDemand", formDTO); } + + @Override + public Result icEventComment(IcEventCommentToDemandFromDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "icEventComment", formDTO); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index 1d14501080..9c53742254 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -380,5 +380,15 @@ public class IcUserDemandRecController implements ResultDataResolver { return new Result().ok(result); } + /** + * @Author sun + * @Description 事件评价时同步=评价结果到需求 + **/ + @PostMapping("iceventcomment") + public Result icEventComment(@RequestBody IcEventCommentToDemandFromDTO formDTO) { + icUserDemandRecService.icEventComment(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index 58885f0d18..eb5f2f89fc 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -254,4 +254,10 @@ public interface IcUserDemandRecService extends BaseService queryServiceList(ServiceListFormDTO formDTO); + + /** + * @Author sun + * @Description 事件评价时同步=评价结果到需求 + **/ + void icEventComment(IcEventCommentToDemandFromDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 003485d8d9..b552251007 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -65,6 +65,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.math.BigDecimal; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -1769,6 +1770,46 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl(pageInfo.getList(), pageInfo.getTotal()); } + /** + * @Author sun + * @Description 事件评价时同步=评价结果到需求 + **/ + @Override + public void icEventComment(IcEventCommentToDemandFromDTO formDTO) { + //1.校验需求是否存在且是否已评价 + IcUserDemandRecEntity entity = baseDao.selectById(formDTO.getDemandRecId()); + if (null == entity || NumConstant.ONE_STR.equals(entity.getEvaluateFlag())) { + log.warn(String.format("需求不存在或已完成评价,需求Id->%s", formDTO.getDemandRecId())); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "需求不存在或评价"); + } + + //2.新增评价记录 + IcUserDemandSatisfactionEntity satisfactionEntity = new IcUserDemandSatisfactionEntity(); + satisfactionEntity.setCustomerId(formDTO.getCustomerId()); + satisfactionEntity.setDemandRecId(formDTO.getDemandRecId()); + satisfactionEntity.setUserType("staff"); + satisfactionEntity.setUserId(formDTO.getStaffId()); + satisfactionEntity.setEvaluateTime(new Date()); + satisfactionEntity.setScore(("perfect".equals(formDTO.getSatisfaction()) ? new BigDecimal(5) : ("good".equals(formDTO.getSatisfaction()) ? new BigDecimal(3) : ("bad".equals(formDTO.getSatisfaction()) ? BigDecimal.ONE : BigDecimal.ZERO)))); + demandSatisfactionDao.insert(satisfactionEntity); + + //3.新增操作日志记录 + IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity(); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setDemandRecId(formDTO.getDemandRecId()); + logEntity.setUserType("staff"); + logEntity.setUserId(formDTO.getStaffId()); + logEntity.setActionCode(""); + logEntity.setOperateTime(new Date()); + operateLogDao.insert(logEntity); + + //4.更新需求主表数据状态 + entity.setStatus("finished"); + entity.setFinishResult("resolved"); + entity.setEvaluateFlag(true); + baseDao.updateById(entity); + } + } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSatisfactionDetailService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSatisfactionDetailService.java index 2b138c7890..ba5b78ab6d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSatisfactionDetailService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectSatisfactionDetailService.java @@ -136,4 +136,10 @@ public interface ProjectSatisfactionDetailService extends BaseService Date: Tue, 24 May 2022 13:55:38 +0800 Subject: [PATCH 130/147] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V0.0.18__alter_dict.sql | 1 + .../src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.18__alter_dict.sql diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.18__alter_dict.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.18__alter_dict.sql new file mode 100644 index 0000000000..4e778ee121 --- /dev/null +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.18__alter_dict.sql @@ -0,0 +1 @@ +UPDATE `epmet_admin`.`sys_dict_type` SET `id`='1000000000000000013', `dict_type`='ic_event_source_type', `dict_name`='事件管理', `remark`='', `sort`='13', `DEL_FLAG`='0', `REVISION`='0', `CREATED_BY`='', `CREATED_TIME`='2022-05-17 18:23:27', `UPDATED_BY`='', `UPDATED_TIME`='2022-05-17 18:23:27' WHERE (`id`='1000000000000000013'); diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java index db08fd78d5..7ce5e3fc5d 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java @@ -43,7 +43,7 @@ public class IcEventAddEditFormDTO implements Serializable { * 身份证号 */ // @NotBlank(message = "身份证号不能为空", groups = {AddGroup.class}) - @Length(min = 15, max = 18, message = "身份证号位数不正确", groups = AddGroup.class) + @Length(max = 18, message = "身份证号位数不正确", groups = AddGroup.class) private String idCard; /** * 反映渠道 From 61095855a6cab77f370d338657ec8c611d855ead Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 24 May 2022 15:55:13 +0800 Subject: [PATCH 131/147] daochu --- .../epmet/controller/ProjectController.java | 17 +++++++ .../epmet/excel/ProjectListExportExcel.java | 42 ++++++++++++++++++ .../com/epmet/service/ProjectService.java | 11 +++++ .../service/impl/ProjectServiceImpl.java | 23 +++++++++- .../resources/excel/project_list_export.xlsx | Bin 0 -> 11369 bytes 5 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/excel/project_list_export.xlsx diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 4e09cbf193..03bb218bd1 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -38,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -351,6 +352,22 @@ public class ProjectController { return new Result().ok(projectService.projectList(formDTO)); } + /** + * Desc: 项目管理导出 + * @param response + * @param tokenDto + * @param formDTO + * @author zxc + * @date 2022/5/24 15:22 + */ + @PostMapping("project-list-export") + public void projectListExport(HttpServletResponse response,@LoginUser TokenDto tokenDto,@RequestBody ProjectManageListFormDTO formDTO) throws IOException { + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setIsPage(false); + projectService.projectListExport(response,formDTO); + } + /** * Desc: 满意度评价列表 * @param formDTO diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java new file mode 100644 index 0000000000..0afc9cd28b --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java @@ -0,0 +1,42 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import cn.afterturn.easypoi.excel.annotation.ExcelCollection; +import com.epmet.commons.tools.utils.ExcelVerifyInfo; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/5/24 15:24 + * @DESC + */ +@Data +public class ProjectListExportExcel extends ExcelVerifyInfo implements Serializable { + + @Excel(name = "所属网格",needMerge = true) + private String gridName = ""; + + @Excel(name = "项目标题",needMerge = true) + private String title = ""; + + @Excel(name = "转项目时间",needMerge = true) + private String shiftProjectTime; + + @Excel(name = "项目方案",needMerge = true) + private String projectScheme = ""; + + @Excel(name = "内部备注",needMerge = true) + private String internalRemark = ""; + + @Excel(name = "滞留工作日",needMerge = true) + private String detentionDays = ""; + +// @ExcelCollection(name = "当前处理部门") +// private List departmentNameList; + +} 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 7e86778fd0..82a88d3a5b 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 @@ -9,6 +9,8 @@ import com.epmet.dto.result.*; import com.epmet.entity.ProjectEntity; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -384,4 +386,13 @@ public interface ProjectService extends BaseService { */ PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); + /** + * Desc: 项目管理导出 + * @param response + * @param formDTO + * @author zxc + * @date 2022/5/24 15:22 + */ + void projectListExport(HttpServletResponse response,ProjectManageListFormDTO formDTO) throws IOException; + } \ 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 ab30428219..74ea937511 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 @@ -17,6 +17,7 @@ package com.epmet.service.impl; +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -48,6 +49,7 @@ import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.*; +import com.epmet.excel.ProjectListExportExcel; import com.epmet.feign.*; import com.epmet.redis.ProjectRedis; import com.epmet.resi.group.constant.TopicConstant; @@ -80,6 +82,8 @@ import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; @@ -3208,7 +3212,7 @@ public class ProjectServiceImpl extends BaseServiceImpl result = new PageData<>(new ArrayList<>(),NumConstant.ZERO); - PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getProjectManageList(formDTO)); + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(),formDTO.getIsPage()).doSelectPageInfo(() -> baseDao.getProjectManageList(formDTO)); List projectManageList = pageInfo.getList(); if (CollectionUtils.isNotEmpty(projectManageList)){ // 获取滞留天数 @@ -3312,6 +3316,23 @@ public class ProjectServiceImpl extends BaseServiceImpl list = this.projectList(formDTO).getList(); + List projectListExportExcels = ConvertUtils.sourceToTarget(list, ProjectListExportExcel.class); + TemplateExportParams templatePath = new TemplateExportParams("excel/project_list_export.xlsx"); + Map map = new HashMap<>(); + map.put("maplist",projectListExportExcels); + ExcelPoiUtils.exportExcel(templatePath ,map,"项目管理导出表",response); + } + + /** * @Description 区间项目分类数量处理 * 查询的是时间段内的分类项目数,查询的时间 是传入一个日期,拼上时间,在进行比较大小 * @param categories diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/excel/project_list_export.xlsx b/epmet-module/gov-project/gov-project-server/src/main/resources/excel/project_list_export.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..28448471086e9b942f5846fbc1b2e967c6b3acf5 GIT binary patch literal 11369 zcmeHtWmKHY)+X-m5?q42y9aj&E)9*lJHaKm1&82H2$tY30fGe&65J)Yg=v!So}6&c zoHg@v)|&c3_iDDh^*mL3*IRol%RxdRfIW^d#Z{5V&;JZ~&=*sC6J;lR2WMtwkQf%| z2e_YN*NC1E{NP|<_7GrTXnz+oc5q~)8MF++jn?bnJH95K`IP>^Cr_89_i{wNb)Nl8t@oS&4{87s>1%8p=Qi^1YGlgQxtbnmwuD&| zAv!7op@j}WOO8xFU&A0OR$`P`s0w%+@ZJu4L{FbdVq z4B0p8%sp(d=o=s1iO&QNwp0^8$_}&0mr==2?$y?D{{)(-eIi&B1hfeVX!O4WZDQ{P zd_>weVO+MG1uOIjdim{oo5H-ExcEZArz$Kc`bc*&-i1g7orGaK)U~V`gKJq3&hvKl z;^-a-SM!-T+Nq!cK?5u3c zmZFvkhw^fQI>ruoTk&KN! zT00dwYIV7%lR6rx$4?p-Sut6098~8X@P)~4M2-qDx1n!#Q%^8o=|R@oYUJL@*TkH0 zTj_I#vt)C4=cYquIvenM`id!qX(t({(zS4jV(JodEg4X|GC>~b7(8oJf#Gn|6@X~( zTIVn67MXQ0Z0DVxX_xKSrDVXoKL%W>%mZqu$di>OV!-gw7-3M$g_}glh<>7;`*PHg z@p%Nw<2|5Dk&Mn~cH=I;74ukeOAeVQM$NuR|`w7+ch}3B3z1~3_QdPn*1`p(%FGLG_BBQh~Sb9`#%;B zKh+vLhUNCD=B%%#!st<^D=XeiEmQi zEqTv}O~5c1_{Fd2p&pIPJ+OFTKp0s!=h!|7D+z|J+VNJf$qz|4>|_y$&XW?f{6jqU z+`#0hFq~*~j@aXbxFI&OBjOnn%Ej8E-54)YPP62SDM~0wu10bKDCRK&NWDKx)T=dGed*RPpdLPVeqm z*)|K<=x;QpdJMRf9{yz+p!{Ob-QLOC*#Zc3dCGJuseN_}h-DiXFfhFTlKrXjlkI2? zefta+EZ>~E2czp&pMq-~<$9S(h4})j#c6X`rp~g?VJ?|w!*=VhW6Er$o}`;MS6{tj zV-;M^^$^~}7JjS%5O{%8DHpP>O)(X<``IyVCRucsMZs%}${UJImam@{Z<9_XGJzq9 zhRXKWu@o8Hv?(Ieq+OUIV}D*(O&(q;pTBO>?0D~{LVKrzCV!uB63G`@cmo$U?3~@D zQ=|Z&>_~|K#je%PRiQBP^3x1HVS zGCaFsm;@ikuaPavPQQVOu(q)qg63wnZRUv3fj>&lk-&d}zrTbI?I~Z~y|EY$Xpy|z zbQpVX0+_u3hbn+!`)Vz_Pi$A{^S+}R4}rlQ@m&-Hrw=MU8brhkiy&d97a1K#Y?R{* zSE;s>hc~U{`0EwuW>mctqw?sJDk}>8`PZg6P0t0z{06#lSDL$wfb90N5jIgP*gipm zaG5rULeXUA^2H5v>Im{tN~%uQ09o0KsE5g+YrKp*Lx8OT6d%Di%lv2tLwY2}!Xusq z>Y3qpl&arF##F+mIcxn;->@gq*LPYI_Ab$M?s7_9%Aj3)%biAkz$fn#0&q%1-GrZ` zInKTKih{l-1YnntzX@+91I&~8sJ~6@(gDzfME9M2mx$DEY{A~^BXcn4tJ(DJu?p8Z zL*FAK_bI+Qz#rfr$oV{X+?uK=|^YrHZ-okX)` za|tkAB(S7Mp06Up@nD7EqdlfJWd}V2+T1)T+^5J!i!OAz4 zXVv`|no*XF$tqEV);4b}CY>;-ud2M(i#!Ci8`|$ntXU#e!=Jncx>(wSw#Ijj-1l z=GHx!!6oC#Y)Wjj9aFOwGs)k#x;IyAvEq}glSE+)eFA9g%VJ3)Aw%`|!KGO`dsQza ze())nECy+?ilW9)Fv66F$G(-zN6k%V9ZWw{OJP(kuS>-I#@7-SU|VjjWzyQXVi5?% z5~=0CUmweU@X-^u8h*E<{5enCDj)Ek_; zghVwIbr(E|VNC2*+0cmx^cuJx>xU>d(;(H|X{0bz7r?1~av?p-WbDO>7>h9*y@e9k zV)*!}cF2cSSdLal!i)dRYguq?39(ur*!w>0WyTa>tVLsuEqTHuH&C8~LnM z-|7vz`$tk*{wD0f8j*lJ%W=7YB`=zJ80l9A6NYPCk{J-!h(t~==~eTr`Ul7u0fv-^ z8Q<21kC8t%Ih`AewVDh=8(a2Q>zCaSD?;KVaO_^WzX*zDy3LNGK}HAC9$q;!+?6+z z_&Goy4B$PVg}hbY&y69GOFK}fBY$N~$y9?>d~DO@5lHE?p+dF34RuFd_gRTRU+uVLUE+^eE&B1{hQNspy~ zI`m6aHXP5OX@7e**(|zTb+zH$)lDz^(fRA*;@IpQp_`4fleNhg!dq<&-H=IAMc>Mg z+OKXGlv>-feJ^(hU)r^>oU}ij&Dpp6?Z9*i>9BcSpHB*B3;SM=Z2A8iuOC#0uUWE0^?Ze^FEW}bK#ctPu3BSiBk90VqhwVkj zDqqyKJVyU8_i7IWF{{)izB|lHX!=n2u|qMdX~?aAd9CN8CyHi|7v`Zb&A1?koW02`_8#MIt62L>iwFPev5brF3o{#qSV6Mo z-9~<^(_2TTYbV}fG(?|xd&9(XI-ogn9l(MoilZsNG&`Loi`8By^_wzZsqeLYHG9= zyIC%Gn{JS@)FRsbIUNT?Le%(QVw9ijN>F%QV@qe-U%jT0>kHW@L*D|Q$xAF36{FlF zrjqG@ImA3EqE< z1;ZTDgkV%RroFuR9ZDdEb)6O6D>C%s$l{b2?3Blv@3Gzk?<+Zq#N0+^0-Hj=J4)2z zVH5RYoj$87Y$?cZPiAFl!?q56MLmA0>YfjIgDe|5%rV*4Jxy!Qk23(y+CqQ1mi0d9N9fK`WKMRjgzyQ^R%$XLDd23$5?S7Nhg>5< z5(u{CF~$(mSwU=)->y zGJ1gQG`d9_PPxj%ElR1?;tBv?R3@cW&Siwq$+LmL+KE>;vd4>K9BHYS4j{Lk#DSi! zKYow;y3w_pz(wI^R3h@u@}VocnIhJGB0d2#B9DTUns({*ySLxvSLc>|t}5aS{hbt| z;FzO&Q(!BdT*J&sb4=q*f?>OH6(^83ilN&2W1D&7It71HwcU?nSVCi$_4%1gTmA%* zVBCiFdm6qEs-?kMzRmU_dp`mWI=Kafw{_7oVZ4)%N#9l4g%g}FM(R{f)B6sctdAhu zk8$6s(74_O;MSXF86*sF3-5JF>ZgR)H7rA`*~tq3*yxBgxL&?|zP|F_W#{=DCXJc$ zsf-EwK>KB#p@(c~Z3_P?gI+N|FSP{v2;U0UU7x;n9r7Ou>=eszwiDs-a7=QTLWVJ{ z8Iv+p;zA9P2(hDV2UR`ei(j{|4G2s%LTK{oGYG#`7wD!S-l?(9YA#c6bx&Sq3x15P za=oY|g{q2Q;2_d3kL$xE$MR`Dx(UGAKWH$W{Bj~}@EzHD`AFAUW(iv3i-?pLlmIM& zRm+M`qT^P0)*gR0Np2teeK@D_;u3>Hne@8cPA3LVVVF3o$y8^JHi}nf1GN|+ZC;`x zoYy>E<0=eE3o8x|3>cdMzN*Sjl z>|K0vf0MV_Bas;qKd_;wpcJ&RWE@J-#OBsNFjb~-B4evM0G-!5BFXuW<$2;)*9c$0 zDi?Yvw^I1iueag5A3;yY=dET68wQQJXED78RFA|QD%ZR~q1!IsOE<=g)~VE1L(+JO zWIAN$Q@iGRAWlek$49$|_k5F+M_gFm0OOu>%-%vFzluPiFj8N)?ML8O4$XaPrn*Rx zM5$WvP8+&&vs%mT^gzp6pZjyH&E$6Jg5%Gw#Eu zTTTLl!IlSABre8`vXO5BlIY}V2kS?WXAULfnjy{YN$#WXAd?2~X};e&jJZ|_F4yYu zR8TS|w3kpZ06M)ik( z?ahU8k?w{%g~wZqOQ#l)qmD2(5R4FspVOtg8BR6_K&IlH8V_=$V#*cudir7or7ZKB zH>6!Sn_&hNvoEY)6QB~YV7S`Mw8n%+aeKM&OdxODh6$SCg6*e>l#g1tL+}L`SDldI zdkqY3hHmhA8!TTKUC*PC7YC&@@jF<-recJ(+SJ4~VAdcEt7(5saCKNAz6Xpg*F$0+ zz3DB-aTOJHu;C0&P1cA+1z=0q?^S}OMLlO?49Ua@l7 zu^x3j#wIE62@^xxJIf$e1czZ(DV8#`B5;xibg}qED@F3`bcICu)^CN(T<|N;Bc}*KrET@aZW9d~RhcPmRD1!*XElFCyoK zoot2T`Ygtiw$N3nF>*UKk%EduID}Llv)|&8NI;$3ZKaU*y&y)u+2d7S={IOONO@mB z6olhaS71bWT@b%ofF7E98ZG+eHpcKMen(`qz-^241^|_MOUqJ>T85;DvGEna$;#3^ zMZQ9g|2sQR%7rH(0SB{K)6DqUyO$tvHfo)?)(0en!0AhEliuhW znx8q2sui8ZrxP%(DKkp*f4Vzad&UyHr`yt4Af=O8o!MY%=qPy+*aolz&q$3XzT-mu zBnaQyzL*deOA<@c*4^XozVhMN4&NAapDx`-x%!8+PGab?FaMAJtnvQ-?iZ+^+wOes z`m3pE-oV)y@lh0nHo_{%s?-*Uq)@1$k*TV!&<1wk1Yp+*61b#Zc#KXKV6PQlhPf+Y zMALK@F|Objh~#Gjxl1VA@*^3N^S;@(Cwj5B7ON^B3`&#P-#yoLUmc5nxOcd^YK$;Y zS1D#Z{=6wu5AmTyEa}7KrjGdf-KkOz%ER&P__DCPOP;6HJlqjf_Lnpn+;Dq&+%H6` zv;<24;YPey{5ai{inwCbBBb>}=FeJu=)(Pr_;Uptf}RsIlxDs_Dr8O{Wi9E@L<~qh z*~!Vt5z0;X-0h6P5yb?DDBTg*Ga{fxb8x$LA0-yf>TX=a|p&CMDeKvJ4 zo}(CgDMYZ;%6_xTKc7;JVWWxe5#cm@(pU$tMEFi~%=E1HWbRFlG%b>VqmjPOn8n?3 zdF`6}i$)T$2@>BQ++}fF@(LCv)Zi9dka}8LgGbczT?7jXw{T0+DWS0~K7w=Mri0w& z_G+&^58)sa(l$%&S{RadL&M%f42NDG3V1uAI&IFGlTh!Td5#;gx zF~`65@Kvz+!R71+Jaz}W?5qsDY8~__g$D-xJI+ZU0R5+*r?1gC-lP-)4V+%%9plObb3 zsaNyhOtk5%U9!tv)IKf zNwkjxp_Y0Sti4I4W)8I>xtm1WZ3cHvMo*gA(ekgVW-@jCf+g$L&#pAiP%va3E{xBt z;FwW54K2}l7_Vpeb&*ZH`_*UCrz$totLExC^Bd}0H76Hz7Z!?CG|CT_MPfyT)7>|e z$BX@Vs*hYCgwMRkyi-y%fVeL;#qZtW_7!=&(794Zl!+ z*n|p24?l@ig|I zKjWze7CC(!CWGxToN~3~4K_|Y@#(^*^$IjrE~43)z=c|vAcIORXEv)H;_FVL82OIE zQ_>_iz(L80%(B+!csBnm_@(3C!dNHA*<1gf1ULWVV~ob#!Abq}`_NI7XFimj-UP98 zw!(Hf#oFrpa*AFm#l-FB6AVABQ0xx#M-P>*@L(4?V!HN99MN4BVc&2T#zSF3B!AM2 zuVCA6R<}iBqY^z(7?#$7XA|knT1`P=>`FPl2#1E|V;m>x%=-4D7)}{Q!eQU8d@uZd zu!#%2OLWm6`OOB$z6rQ|2-3omvYLANgG$p4cH-#{i$L7M8-XX_3$EohJ&8zV(NU#KM(=Y~(CV zTlJR*bTXM0Z_(`lx-5023|w84;bA@XaCt7Auk2kC3U}BngV}tHw7&WC*l5tg$7;GE z;|a%+T6~jfE7#cbsHsW{y@yX@qJ zU5c3ityCg^0ojK|`t8MQfvAd?MRoUxCE^FPT^j;&-HYp}Lg_``HEfvJts$gENp>Z= zUP)ehv{nwfijdvVe78YGeiAP#aV_5SIH?KenXBmQ#Z%JOeI-MricB5F#RrmA#uJf; z+=*mlqNex>w_g2A2@6!20yA_1+B_{?dGolnJb?bU3?c;aFBzss$;yOLP;C;e?{Qmf zwkfz{qtCf8lkY2-`o2n)e;A|2Owc}PYZX;t_|gO$n|8gKvFu~oOt?sDz*-d366mTD zC}Kb0)~0goA>yHsBev9f|d?-E_OcQcG5Pe{wPy?xo<=M}-UeDP6s`gQgA zELWR2?5H50{MmN2b4eH&-ccu4p`jyp*|3UAGe%@dy^vJ3$gdlE?T!p-{d$TdkyN=O z*CLaXTV0*;Gd3z6(Z2dj!DV{={hSE;o8Oz-t7w*4ahW-9P6NjuoOI`9Z?c*~O(k0AqF_9WH7Z z=Ba}n8m4LBoQJnZb=%K*pv~4b=*w{KK`n=r!HM7I%cB-OfZ1OtnUEsSCC9Q8Z9GAh zy57g~CiQHe*{uD4kL>@H$^TYp{U?x1GS9*4LEut>0tv-0kpD~LchU7H+99!>2wf~_ z5}-y1vKPL6weZ4aD`(y1CRd`IFu8iykOY3X zV{U=yr_0b~)lYW}B~7Y^8@o?>Zd#8N^Zh_G&H`=a$94~0aeF%#pq-1Mx+mzRSN}15 z)+a02fo2(Und}udun>t?qOO4*An6Y(eeHnjd6S|?*m}YsG#>ScP@zGqZd0oOMsJr| zRNAQKo8t)2d8Q?c7)2{Zj#2f6CroY;6Sa4V6moqArtPkD3%r>epqoNu`^lNp( z$d!l}sN$Ngkf%8s5~BwcJK2q(6xLH0=;2=)8F;i96N(*DeW7oMoOZQ;ra*&4DUQ9Z zp2d?Ksd%|I6ury2_raKkb0}t&RWBKbNrN>0XFN{Y2I^<< z{x^j`Q3@pgTeN@rpik4nqoZFamHu7rzmmjLJ5NuuzwPi5|8)OfXWOS1p5D;@won2J zDxh@r`@Z(y=KgDuJ}N(g75xjWzq+9QTp~~Vpnkio|3mM0SJc0G{u6aq&@J;{1;?jz zeOj6P?Kt!AYQO80PYpaht^PJJNb=L~-wFG-hkk4z`ZXTmat3W?&_n+%XZ@S*V@~`v z9(BKh65gM>|H+Vlg8no|K3e#-;!r66*}{{I`4o$%Jx;$3=KR-mew%t~ Date: Tue, 24 May 2022 15:57:20 +0800 Subject: [PATCH 132/147] =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/IcEventController.java | 8 +++++--- .../src/main/resources/mapper/IcEventDao.xml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 31edd65710..21117b94b0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -8,9 +8,11 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; @@ -393,9 +395,9 @@ public class IcEventController { * @Description 数字平台-事件导出 **/ @PostMapping("export") - public void export(@RequestBody IcEventListFormDTO formDTO, HttpServletResponse response) throws IOException { - formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); - formDTO.setStaffId("d8dfc6c1fa2538976059f3900036d419"); + public void export(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO, HttpServletResponse response) throws IOException { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); formDTO.setIsPage(false); ExcelWriter excelWriter = null; formDTO.setPageSize(NumConstant.TEN_THOUSAND); diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 1e5f89095c..6ae905f668 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -181,7 +181,7 @@ AND ie.grid_id = #{gridId} - AND ie.agency_id = #{agencyId} + AND ie.grid_pids LIKE CONCAT('%', #{agencyId}, '%') AND ie.source_type = #{sourceType} From e1d704cf00d64115c15de9dccc8c73b32e2aca5d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 24 May 2022 16:07:05 +0800 Subject: [PATCH 133/147] daochu --- .../main/java/com/epmet/excel/ProjectListExportExcel.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java index 0afc9cd28b..5edd25b643 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/excel/ProjectListExportExcel.java @@ -3,11 +3,9 @@ package com.epmet.excel; import cn.afterturn.easypoi.excel.annotation.Excel; import cn.afterturn.easypoi.excel.annotation.ExcelCollection; import com.epmet.commons.tools.utils.ExcelVerifyInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; -import java.util.Date; import java.util.List; /** @@ -36,7 +34,7 @@ public class ProjectListExportExcel extends ExcelVerifyInfo implements Serializa @Excel(name = "滞留工作日",needMerge = true) private String detentionDays = ""; -// @ExcelCollection(name = "当前处理部门") -// private List departmentNameList; + @ExcelCollection(name = "当前处理部门") + private List departmentNameList; } From ef00aefd5debaf624fc1e2e94304e3b18ffd3f1c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 24 May 2022 17:36:23 +0800 Subject: [PATCH 134/147] null --- .../java/com/epmet/service/impl/ResiEventServiceImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 index 8228fb19df..eb336fe63e 100644 --- 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 @@ -502,9 +502,11 @@ public class ResiEventServiceImpl extends BaseServiceImpl imgList=new ArrayList<>(); - for(FileCommonDTO fileCommonDTO:attachmentList){ - if("image".equals(fileCommonDTO.getType())){ - imgList.add(fileCommonDTO.getUrl()); + if(!CollectionUtils.isEmpty(attachmentList)){ + for(FileCommonDTO fileCommonDTO:attachmentList){ + if("image".equals(fileCommonDTO.getType())){ + imgList.add(fileCommonDTO.getUrl()); + } } } //事件图片 From bdad70428ef6caa7ce7a1e0f649587cd0f4018bf Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 25 May 2022 09:27:18 +0800 Subject: [PATCH 135/147] =?UTF-8?q?=E8=AF=84=E4=BB=B7=E4=BA=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ProjectServiceImpl.java | 2 +- .../dto/result/StaffAndResiResultDTO.java | 40 +++++++++++++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 9 +++++ .../EpmetUserOpenFeignClientFallback.java | 5 +++ .../controller/UserResiInfoController.java | 13 ++++++ .../java/com/epmet/dao/UserResiInfoDao.java | 9 +++++ .../epmet/service/UserResiInfoService.java | 10 +++++ .../service/impl/UserResiInfoServiceImpl.java | 20 ++++++++-- .../main/resources/mapper/UserResiInfoDao.xml | 34 ++++++++++++++++ 9 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffAndResiResultDTO.java 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 74ea937511..a9f4ca0093 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 @@ -3304,7 +3304,7 @@ public class ProjectServiceImpl extends BaseServiceImpl pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> satisfactionDetailDao.satisfactionEvaluationList(formDTO.getProjectId())); List result = pageInfo.getList(); if (CollectionUtils.isNotEmpty(result)){ - Result> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(result.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList())); + Result> listResult = epmetUserOpenFeignClient.getStaffAndResi(result.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList())); if (!listResult.success()){ throw new EpmetException("查询user信息失败..."); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffAndResiResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffAndResiResultDTO.java new file mode 100644 index 0000000000..2ae73db285 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffAndResiResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/5/25 09:06 + * @DESC + */ +@Data +public class StaffAndResiResultDTO implements Serializable { + + private static final long serialVersionUID = 5546194837482246174L; + + /** + * staff工作人员,resi居民 + */ + private String type; + + private String userId; + + /** + * 手机号(注册手机号) + */ + private String mobile; + + /** + * 姓名 + */ + private String realName; + + /** + * 性别(1男2女0未知) + */ + private String gender; + + private String address; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 2e5ec4bcd5..c6ca38a94c 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -782,4 +782,13 @@ public interface EpmetUserOpenFeignClient { */ @PostMapping("/epmetuser/userresiinfo/isResiFlag") Result getIsResiFlag(@RequestParam("userId") String userId); + + /** + * Desc: 在不确定userId是工作人员还是居民时,使用此接口查询信息 + * @param userIds + * @author zxc + * @date 2022/5/25 09:17 + */ + @PostMapping("/epmetuser/userresiinfo/getStaffAndResi") + Result> getStaffAndResi(@RequestBody List userIds); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 49dd6a0a66..bafe8aa8d7 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -574,4 +574,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result getIsResiFlag(String userId) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getIsResiFlag", userId); } + + @Override + public Result> getStaffAndResi(List userIds) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffAndResi", userIds); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java index 3ac5a09d81..5f8a5ca171 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java @@ -30,6 +30,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.IssueInitiatorResultDTO; +import com.epmet.dto.result.StaffAndResiResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.excel.UserResiInfoExcel; import com.epmet.service.UserResiInfoService; @@ -230,4 +231,16 @@ public class UserResiInfoController { public Result getIsResiFlag(@RequestParam("userId") String userId){ return new Result().ok(userResiInfoService.getIsResiFlag(userId)); } + + /** + * Desc: 在不确定userId是工作人员还是居民时,使用此接口查询信息 + * @param userIds + * @author zxc + * @date 2022/5/25 09:17 + */ + @PostMapping("getStaffAndResi") + public Result> getStaffAndResi(@RequestBody List userIds){ + return new Result>().ok(userResiInfoService.getStaffAndResi(userIds)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java index 1fddb41280..925e62f61a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java @@ -22,6 +22,7 @@ import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.form.IssueInitiatorFormDTO; import com.epmet.dto.form.UserResiInfoFormDTO; import com.epmet.dto.result.IssueInitiatorResultDTO; +import com.epmet.dto.result.StaffAndResiResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.entity.UserResiInfoEntity; import org.apache.ibatis.annotations.Mapper; @@ -109,4 +110,12 @@ public interface UserResiInfoDao extends BaseDao { List selectCommonIdNumUser(@Param("customerId") String customerId, @Param("idNum")String idNum); + + /** + * Desc: 在不确定userId是工作人员还是居民时,使用此接口查询信息 + * @param userIds + * @author zxc + * @date 2022/5/25 09:17 + */ + List getStaffAndResi(@Param("userIds") List userIds); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java index d28605f95d..9e3a9f86fe 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.IssueInitiatorResultDTO; +import com.epmet.dto.result.StaffAndResiResultDTO; import com.epmet.dto.result.UserResiInfoResultDTO; import com.epmet.entity.UserResiInfoEntity; @@ -203,4 +204,13 @@ public interface UserResiInfoService extends BaseService { * @date 2022/5/23 13:52 */ Boolean getIsResiFlag(String userId); + + /** + * Desc: 在不确定userId是工作人员还是居民时,使用此接口查询信息 + * @param userIds + * @author zxc + * @date 2022/5/25 09:17 + */ + List getStaffAndResi(List userIds); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index 3e2d368486..a0012e8a45 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -42,10 +42,7 @@ import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.UserResiRegisterVisitDTO; import com.epmet.dto.UserRoleDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.IssueInitiatorResultDTO; -import com.epmet.dto.result.SendVerificationCodeResultDTO; -import com.epmet.dto.result.UserBaseInfoResultDTO; -import com.epmet.dto.result.UserResiInfoResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.UserBaseInfoEntity; import com.epmet.entity.UserResiInfoEntity; import com.epmet.entity.UserResiRegisterVisitEntity; @@ -57,6 +54,7 @@ import com.epmet.resi.group.dto.topic.form.SharableTopicAndInviteeFormDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.epmet.service.*; import com.epmet.util.ModuleConstant; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -514,6 +512,20 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl getStaffAndResi(List userIds) { + if (CollectionUtils.isEmpty(userIds)){ + return new ArrayList<>(); + } + return baseDao.getStaffAndResi(userIds); + } + /** * 自动认证居民:志愿者注册,自动认证居民 diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml index df1d830567..d308058d06 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml @@ -231,4 +231,38 @@ and uri.customer_id=#{customerId} AND uri.id_num = #{idNum} + + + From e0a62150198546ed0495cdd660dad44e12427289 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 25 May 2022 10:29:05 +0800 Subject: [PATCH 136/147] =?UTF-8?q?type=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 81736f9aa3..28166485f0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1348,7 +1348,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 25 May 2022 12:23:13 +0800 Subject: [PATCH 137/147] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E6=9E=90-?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=97=E8=A1=A8=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?biz=E5=8F=82=E6=95=B0=EF=BC=8C=E5=89=8D=E7=AB=AF=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E4=B8=9A=E5=8A=A1=E7=B1=BB=E5=9E=8B=EF=BC=8C=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=B8=8D=E5=90=8C=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/ProcessAnalysisEventListFormDTO.java | 7 +++++++ .../epmet/controller/IcEventController.java | 19 ++++++++++--------- .../main/java/com/epmet/dao/IcEventDao.java | 3 ++- .../com/epmet/service/IcEventService.java | 2 +- .../service/impl/IcEventServiceImpl.java | 4 ++-- .../src/main/resources/mapper/IcEventDao.xml | 10 +++++++++- 6 files changed, 31 insertions(+), 14 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java index 45e3cf5d21..5a4b1800ef 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ProcessAnalysisEventListFormDTO.java @@ -44,4 +44,11 @@ public class ProcessAnalysisEventListFormDTO { private String categoryCode; private Integer pageNo; private Integer pageSize; + + /** + * 业务: + * 1.eventProcessAnalysis 事件处理分析 + * 2.eventCategoryAnalysis 事件分类分析 + */ + private String biz; } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 21117b94b0..d86e13474e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -126,15 +126,16 @@ public class IcEventController { @PostMapping("processAnalysis/eventList") public Result> listProcessAnalysisEvents(@RequestBody ProcessAnalysisEventListFormDTO input) { ValidatorUtils.validateEntity(input); - String orgId = input.getOrgId(); - String orgType = input.getOrgType(); - String categoryCode = input.getCategoryCode(); - Date queryStartTime = input.getQueryStartTime(); - Date queryEndTime = input.getQueryEndTime(); - Integer pageNo = input.getPageNo(); - Integer pageSize = input.getPageSize(); - String processStatus = input.getProcessStatus(); - PageData page = icEventService.listProcessAnalysisEvents(orgId, orgType, categoryCode, processStatus, queryStartTime, queryEndTime, pageNo, pageSize); + PageData page = icEventService.listProcessAnalysisEvents( + input.getOrgId(), + input.getOrgType(), + input.getCategoryCode(), + input.getProcessStatus(), + input.getQueryStartTime(), + input.getQueryEndTime(), + input.getPageNo(), + input.getPageSize(), + input.getBiz()); return new Result>().ok(page); } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index 52196ff764..386225e922 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -57,7 +57,8 @@ public interface IcEventDao extends BaseDao { @Param("categoryCode") String categoryCode, @Param("processStatus") String processStatus, @Param("queryStartTime") Date queryStartTime, - @Param("queryEndTime") Date queryEndTime); + @Param("queryEndTime") Date queryEndTime, + @Param("biz") String biz); /** * 月度事件数统计查询 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java index cd926cf332..acffa5765c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java @@ -84,7 +84,7 @@ public interface IcEventService extends BaseService { * @return */ PageData listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, Date queryStartTime, - Date queryEndTime, Integer pageNo, Integer pageSize); + Date queryEndTime, Integer pageNo, Integer pageSize, String biz); /** * 月度增量查询 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 28166485f0..35616c6511 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -479,7 +479,7 @@ public class IcEventServiceImpl extends BaseServiceImpl listProcessAnalysisEvents(String orgId, String orgType, String categoryCode, String processStatus, Date queryStartTime, Date queryEndTime, Integer pageNo, - Integer pageSize) { + Integer pageSize, String biz) { // 1.分类字典 Map eventSourceTypeDict = getResultDataOrThrowsException(adminOpenFeignClient.dictMap("ic_event_source_type"), @@ -497,7 +497,7 @@ public class IcEventServiceImpl extends BaseServiceImpl list = baseDao.listProcessAnalysisEvents( EpmetRequestHolder.getHeader(AppClientConstant.CUSTOMER_ID), orgType, orgId, gridPids, categoryCode, processStatus, queryStartTime - , queryEndTime); + , queryEndTime, biz); // 3.补充数据 for (IcEventResultDTO event : list) { diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml index 6ae905f668..d2035f274a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml @@ -45,7 +45,15 @@ e.MOBILE mobile, e.STATUS processStatus from ic_event e - inner join ic_event_category c on (e.ID = c.IC_EVENT_ID) + + + + inner join ic_event_category c on (e.ID = c.IC_EVENT_ID) + + + left join ic_event_category c on (e.ID = c.IC_EVENT_ID) + + e.CUSTOMER_ID = #{customerId} and e.HAPPEN_TIME >= #{queryStartTime} From e19245a42e4a7062c80d7f4179a233a1ff654c36 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 25 May 2022 13:38:17 +0800 Subject: [PATCH 138/147] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E8=BD=AC=E6=9C=8D=E5=8A=A1reddot=3D1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/IcEventServiceImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 35616c6511..21ca0d9b46 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -685,6 +685,8 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 25 May 2022 13:39:39 +0800 Subject: [PATCH 139/147] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E8=BD=AC=E6=9C=8D=E5=8A=A1reddot=3D1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 21ca0d9b46..39a80c39ca 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -771,8 +771,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 25 May 2022 15:27:57 +0800 Subject: [PATCH 140/147] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=A4=84=E7=90=86=E5=88=86=E6=9E=90=EF=BC=8C=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=B2=A1=E6=9C=89=E5=88=86=E7=B1=BB=E6=97=B6=E5=80=99?= =?UTF-8?q?=E5=8F=91=E7=94=9F=E7=9A=84=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcEventServiceImpl.java | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 39a80c39ca..463fc759ba 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -583,15 +583,6 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 25 May 2022 15:36:27 +0800 Subject: [PATCH 141/147] =?UTF-8?q?type=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IcEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 463fc759ba..8bf21d6b4f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1357,7 +1357,7 @@ public class IcEventServiceImpl extends BaseServiceImpl Date: Wed, 25 May 2022 16:47:55 +0800 Subject: [PATCH 142/147] =?UTF-8?q?=E5=A2=9E=E5=8A=A0flyway=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=EF=BC=9A=E9=9A=90=E8=97=8F=E6=97=A7=E7=9A=84event?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6footbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.26__hide_old_event_footbar.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.26__hide_old_event_footbar.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.26__hide_old_event_footbar.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.26__hide_old_event_footbar.sql new file mode 100644 index 0000000000..5bb2273861 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.26__hide_old_event_footbar.sql @@ -0,0 +1,4 @@ +-- 隐藏旧的事件footbar +update customer_foot_bar +set DISPLAY='0' +where BAR_NAME = '事件' \ No newline at end of file From 7573835b2b9328269cacab4e1e34c148730c7269 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 26 May 2022 09:46:35 +0800 Subject: [PATCH 143/147] =?UTF-8?q?=E6=94=AF=E6=8F=B4=E8=80=85=E7=B1=BB?= =?UTF-8?q?=E5=88=AB=E6=B2=BB=E5=AE=89=E5=B7=A1=E9=80=BB=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.27__modify_zhianxunluoyuan.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.27__modify_zhianxunluoyuan.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.27__modify_zhianxunluoyuan.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.27__modify_zhianxunluoyuan.sql new file mode 100644 index 0000000000..33a8111fb3 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.27__modify_zhianxunluoyuan.sql @@ -0,0 +1,5 @@ + +update ic_form_item_options set OPTION_LABEL='治安巡逻员' +where DEL_FLAG='0' +and OPTION_LABEL like '%治安巡逻%' +and ITEM_ID like '%1074'; \ No newline at end of file From 10513cdeb2db4aeffb626ca79a83067932f28005 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 26 May 2022 15:29:28 +0800 Subject: [PATCH 144/147] =?UTF-8?q?voice=EF=BC=9Aduration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventAddEditFormDTO.java | 2 +- .../epmet/dto/result/MyReportIcEvResDTO.java | 2 +- .../service/impl/IcEventServiceImpl.java | 46 ++++++------------- 3 files changed, 17 insertions(+), 33 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java index 7ce5e3fc5d..6774329890 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java @@ -83,7 +83,7 @@ public class IcEventAddEditFormDTO implements Serializable { */ private String longitude; /** - * 处理方式[0:已回复 1:已转项目 1:已转需求] + * 处理方式[0:已回复 1:已转项目 2:已转需求] */ private String operationType; /** diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java index 80a846cb4b..d2652ce3a3 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java @@ -38,7 +38,7 @@ public class MyReportIcEvResDTO implements Serializable { /** * 音频[url集合] */ - private List voiceList; + private List voiceList; /** * 地址 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 8bf21d6b4f..a05d3d731d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1,6 +1,5 @@ package com.epmet.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.*; @@ -96,14 +95,18 @@ public class IcEventServiceImpl extends BaseServiceImpl list(IcEventListFormDTO formDTO) { //获取当前工作人员缓存信息 - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); - if (null == staffInfo) { - throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getStaffId())); - } + CustomerStaffInfoCacheResult staffInfo = getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); formDTO.setAgencyId(staffInfo.getAgencyId()); //分页查询当前组织下网格内事件数据 @@ -149,14 +152,6 @@ public class IcEventServiceImpl extends BaseServiceImpl(list, pageInfo.getTotal()); } - private QueryWrapper getWrapper(Map params) { - String id = (String) params.get(FieldConstant.ID_HUMP); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - - return wrapper; - } @Override public IcEventDTO get(String id) { @@ -168,10 +163,7 @@ public class IcEventServiceImpl extends BaseServiceImpl imageList = new ArrayList<>(); - List voiceList = new ArrayList<>(); + List voiceList = new ArrayList<>(); for (IcEventAttachmentDTO file : dto.getAttachmentList()) { if ("image".equals(file.getAttachmentType())) { imageList.add(file.getAttachmentUrl()); } else if ("voice".equals(file.getAttachmentType())) { - voiceList.add(file.getAttachmentUrl()); + voiceList.add(file); } } dto.setImageList(imageList); From bc39b28708805a7996b661c9a256819ebcd45346 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 26 May 2022 17:24:44 +0800 Subject: [PATCH 145/147] =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/IcEventController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index d86e13474e..24e4fc16f4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -401,6 +401,7 @@ public class IcEventController { formDTO.setStaffId(tokenDto.getUserId()); formDTO.setIsPage(false); ExcelWriter excelWriter = null; + formDTO.setPageNo(NumConstant.ONE); formDTO.setPageSize(NumConstant.TEN_THOUSAND); try { String fileName = "事件管理" + DateUtils.format(new Date()) + ".xlsx"; From e72df9975f4078f59bd39d33193b62eee3a35007 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 27 May 2022 09:15:36 +0800 Subject: [PATCH 146/147] =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IcMoveInRecordController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java index d35d1dbdaf..e9937cdd99 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java @@ -95,12 +95,12 @@ public class IcMoveInRecordController { return new Result(); } - @NoRepeatSubmit @PostMapping("export") public void export(@LoginUser TokenDto tokenDto, @RequestBody IcMoveInListFormDTO formDTO, HttpServletResponse response) throws IOException { formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setIsPage(false); ExcelWriter excelWriter = null; + formDTO.setPageNo(NumConstant.ONE); formDTO.setPageSize(NumConstant.TEN_THOUSAND); try { String fileName = "迁入管理" + DateUtils.format(new Date()) + ".xlsx"; From 08bcfbfc08de636f3021b519e13fcaf1eaa2a9c9 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 27 May 2022 09:45:53 +0800 Subject: [PATCH 147/147] =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/IcMoveInRecordController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java index e9937cdd99..18c40e286e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcMoveInRecordController.java @@ -95,9 +95,11 @@ public class IcMoveInRecordController { return new Result(); } + @NoRepeatSubmit @PostMapping("export") public void export(@LoginUser TokenDto tokenDto, @RequestBody IcMoveInListFormDTO formDTO, HttpServletResponse response) throws IOException { formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); formDTO.setIsPage(false); ExcelWriter excelWriter = null; formDTO.setPageNo(NumConstant.ONE);