From 313f8e3e047634522c5b09127d553a99e437399f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 30 Sep 2022 08:21:20 +0800 Subject: [PATCH 001/125] =?UTF-8?q?=E4=BF=AE=E6=94=B9issue=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V0.0.18__alter_issue_type.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.18__alter_issue_type.sql diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.18__alter_issue_type.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.18__alter_issue_type.sql new file mode 100644 index 0000000000..ea9a1f3eb1 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.18__alter_issue_type.sql @@ -0,0 +1,2 @@ +ALTER TABLE issue MODIFY COLUMN SOURCE_ID varchar(32) NULL COMMENT '来源ID eg:2223232(当SOURCE_TYPE为"resi_topic"时,这里指话题的ID),issue时为空' AFTER SOURCE_TYPE; +ALTER TABLE issue MODIFY COLUMN SOURCE_TYPE varchar(32) NULL COMMENT '来源类型 话题:resi_topic;直接立议题:issue;' AFTER ISSUE_STATUS; From 96065a076081af65d73e96e1f75249714e4f2f2d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 30 Sep 2022 14:03:52 +0800 Subject: [PATCH 002/125] =?UTF-8?q?/resi/hall/issue/votinglist=E8=BF=94?= =?UTF-8?q?=E5=9B=9EissueImgs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/VotingIssueListResultDTO.java | 11 ++++++ .../epmet/service/impl/IssueServiceImpl.java | 3 +- .../src/main/resources/mapper/IssueDao.xml | 37 +++++++++++++------ .../dto/result/VotingIssueListResultDTO.java | 10 +++++ 4 files changed, 49 insertions(+), 12 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java index 2ac18595ea..6725684610 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * @Description 政府端/居民段查看表决中议题列表返参 @@ -38,4 +39,14 @@ public class VotingIssueListResultDTO implements Serializable { * 来源话题的id */ private String sourceId; + + /** + * 来源类型 话题:resi_topic;直接立议题:issue; + */ + private String sourceType; + + /** + * 发布议题的图片 + */ + private List issueImgs; } 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 8722a0c027..30054255d2 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 @@ -606,7 +606,8 @@ public class IssueServiceImpl extends BaseServiceImpl imp @Override public List votingList(CommonIssueListFormDTO issueListForm) { PageHelper.startPage(issueListForm.getPageNo(), issueListForm.getPageSize(), issueListForm.getIsPage()); - return baseDao.selectVotingList(issueListForm); + List resultList=baseDao.selectVotingList(issueListForm); + return resultList; } /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index 4dbcbb2e9a..acd64f9758 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -202,22 +202,37 @@ + + + + + + + + + + + - SELECT - ID AS issueId, - IFNULL(ISSUE_TITLE,'') AS issueTitle, - IFNULL(SUGGESTION,'')AS suggestion, - UNIX_TIMESTAMP( created_time ) AS issuePublishTime, - SOURCE_ID AS sourceId + i.ID AS issueId, + IFNULL(i.ISSUE_TITLE,'') AS issueTitle, + IFNULL(i.SUGGESTION,'')AS suggestion, + UNIX_TIMESTAMP( i.created_time ) AS issuePublishTime, + i.SOURCE_ID AS sourceId, + i.SOURCE_TYPE as sourceType, + ia.url FROM - issue + issue i + left join issue_attachment ia + on(i.id=ia.BUSINESS_ID) WHERE - DEL_FLAG = '0' - AND GRID_ID = #{gridId} - AND ISSUE_STATUS = 'voting' + i.DEL_FLAG = '0' + AND i.GRID_ID = #{gridId} + AND i.ISSUE_STATUS = 'voting' ORDER BY - created_time DESC + i.created_time DESC,ia.SORT asc diff --git a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java index 3b9bee2505..4209446f79 100644 --- a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java +++ b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java @@ -40,11 +40,21 @@ public class VotingIssueListResultDTO implements Serializable { */ private String sourceId; + /** + * 来源类型 话题:resi_topic;直接立议题:issue; + */ + private String sourceType; + /** * 话题图片列表 */ private List topicImgs; + /** + * 发布议题的图片 + */ + private List issueImgs; + /** * 话题语音 */ From 0ae7ee65678ea53e94f97e96d0b38d4129e1fbd0 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 30 Sep 2022 14:21:25 +0800 Subject: [PATCH 003/125] =?UTF-8?q?=E6=9A=82=E6=8F=90=E4=B8=80=E6=B3=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/IssueAttachmentDTO.java | 116 ++++++++++++++++++ .../src/main/java/com/epmet/dto/IssueDTO.java | 32 ++++- .../com/epmet/controller/IssueController.java | 8 ++ .../com/epmet/dao/IssueAttachmentDao.java | 16 +++ .../epmet/entity/IssueAttachmentEntity.java | 82 +++++++++++++ .../java/com/epmet/entity/IssueEntity.java | 15 +++ .../epmet/service/IssueAttachmentService.java | 78 ++++++++++++ .../java/com/epmet/service/IssueService.java | 2 + .../impl/IssueAttachmentServiceImpl.java | 82 +++++++++++++ .../epmet/service/impl/IssueServiceImpl.java | 91 +++++++++++++- .../java/com/epmet/utils/ModuleConstants.java | 4 + .../migration/V0.0.18__alter_issue_type.sql | 30 +++++ .../resources/mapper/IssueAttachmentDao.xml | 6 + 13 files changed, 556 insertions(+), 6 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueAttachmentDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueAttachmentDao.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueAttachmentEntity.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueAttachmentService.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueAttachmentServiceImpl.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueAttachmentDao.xml diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueAttachmentDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueAttachmentDTO.java new file mode 100644 index 0000000000..d9d7f2b723 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueAttachmentDTO.java @@ -0,0 +1,116 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * issue库附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-09-30 + */ +@Data +public class IssueAttachmentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 业务id + */ + private String businessId; + + /** + * 议题:issue + */ + private String attachTo; + + /** + * 附件名 + */ + private String name; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String format; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String type; + + /** + * 附件地址 + */ + private String url; + + /** + * 排序字段 + */ + 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-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java index 5e7a6c8fdb..fd86c07eb7 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java @@ -19,8 +19,10 @@ package com.epmet.dto; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.Date; +import java.util.List; /** @@ -34,6 +36,8 @@ public class IssueDTO implements Serializable { private static final long serialVersionUID = 1L; + public interface IssueForm{} + /** * 议题ID */ @@ -67,12 +71,14 @@ public class IssueDTO implements Serializable { /** * 议题名称 最多20字 */ - private String issueTitle; + @NotBlank(message = "issueTitle不能为空",groups = IssueForm.class) + private String issueTitle; /** * 建议 最多1000字 */ - private String suggestion; + @NotBlank(message = "suggestion不能为空",groups = IssueForm.class) + private String suggestion; /** * 客户ID @@ -82,7 +88,8 @@ public class IssueDTO implements Serializable { /** * 网格ID 居民端议题对应一个网格Id */ - private String gridId; + @NotBlank(message = "gridId不能为空",groups = IssueForm.class) + private String gridId; /** * 所属机关 【数据权限-非必填】11:22:33(agencyId)数据权限控制 @@ -160,4 +167,23 @@ public class IssueDTO implements Serializable { private String projectId; private String issueId; + + /** + * 地址 + */ + @NotBlank(message = "address不能为空",groups = IssueForm.class) + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + private String userId; + + private List attachmentList; } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index ec49c3bb81..aebbd3789e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -333,5 +333,13 @@ public class IssueController { return new Result().ok(issueService.issueAuditReset(gridId)); } + @PostMapping("createIssue") + public Result createIssue(@LoginUser TokenDto tokenDto,@RequestBody IssueDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + issueService.createIssue(formDTO); + return new Result(); + } + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueAttachmentDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueAttachmentDao.java new file mode 100644 index 0000000000..828bea698e --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueAttachmentDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IssueAttachmentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * issue库附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-09-30 + */ +@Mapper +public interface IssueAttachmentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueAttachmentEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueAttachmentEntity.java new file mode 100644 index 0000000000..b7016bd587 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueAttachmentEntity.java @@ -0,0 +1,82 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * issue库附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-09-30 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("issue_attachment") +public class IssueAttachmentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 业务id + */ + private String businessId; + + /** + * 议题:issue + */ + private String attachTo; + + /** + * 附件名 + */ + private String name; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String format; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String type; + + /** + * 附件地址 + */ + private String url; + + /** + * 排序字段 + */ + 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-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java index fa33418bc6..825e16cbbc 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java @@ -112,4 +112,19 @@ public class IssueEntity extends BaseEpmetEntity { */ private Date closedTime; + /** + * 地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueAttachmentService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueAttachmentService.java new file mode 100644 index 0000000000..1ca53e2103 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueAttachmentService.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.IssueAttachmentDTO; +import com.epmet.entity.IssueAttachmentEntity; + +import java.util.List; +import java.util.Map; + +/** + * issue库附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-09-30 + */ +public interface IssueAttachmentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-09-30 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-09-30 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IssueAttachmentDTO + * @author generator + * @date 2022-09-30 + */ + IssueAttachmentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-09-30 + */ + void save(IssueAttachmentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-09-30 + */ + void update(IssueAttachmentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-09-30 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index 1296374261..8ac38fb970 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -384,4 +384,6 @@ public interface IssueService extends BaseService { */ Boolean issueAuditReset(String gridId); + void createIssue(IssueDTO issueDTO); + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueAttachmentServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueAttachmentServiceImpl.java new file mode 100644 index 0000000000..e9d0c69b54 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueAttachmentServiceImpl.java @@ -0,0 +1,82 @@ +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.IssueAttachmentDao; +import com.epmet.dto.IssueAttachmentDTO; +import com.epmet.entity.IssueAttachmentEntity; +import com.epmet.service.IssueAttachmentService; +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; + +/** + * issue库附件表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-09-30 + */ +@Service +public class IssueAttachmentServiceImpl extends BaseServiceImpl implements IssueAttachmentService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IssueAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IssueAttachmentDTO.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 IssueAttachmentDTO get(String id) { + IssueAttachmentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IssueAttachmentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IssueAttachmentDTO dto) { + IssueAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IssueAttachmentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IssueAttachmentDTO dto) { + IssueAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IssueAttachmentEntity.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-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 30054255d2..a4ca334de5 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 @@ -17,7 +17,9 @@ 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.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.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; @@ -39,9 +41,7 @@ import com.epmet.dto.form.IssueAuditionFormDTO; import com.epmet.dto.form.IssueShiftedFromTopicFormDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.entity.IssueEntity; -import com.epmet.entity.IssueProcessEntity; -import com.epmet.entity.IssueProjectRelationEntity; +import com.epmet.entity.*; import com.epmet.feign.*; import com.epmet.redis.GovIssueRedis; import com.epmet.redis.IssueVoteDetailRedis; @@ -140,12 +140,16 @@ public class IssueServiceImpl extends BaseServiceImpl imp private IssueVoteDetailService issueVoteDetailService; @Autowired private DistributedLock distributedLock; + @Autowired + private IssueAttachmentService issueAttachmentService; @Value("${openapi.scan.server.url}") private String scanApiUrl; @Value("${openapi.scan.method.textSyncScan}") private String textSyncScanMethod; + @Value("${openapi.scan.method.imgSyncScan}") + private String imgSyncScanMethod; @Override public PageData page(Map params) { @@ -1767,5 +1771,86 @@ public class IssueServiceImpl extends BaseServiceImpl imp return false; } + @Override + public void createIssue(IssueDTO issueDTO) { + // 先审核 + /*if (org.apache.commons.lang3.StringUtils.isNotBlank(issueDTO.getIssueTitle()) || org.apache.commons.lang3.StringUtils.isNotBlank(issueDTO.getSuggestion())) { + TextScanParamDTO textScan = new TextScanParamDTO(); + //标题 + TextTaskDTO taskTitle = new TextTaskDTO(); + taskTitle.setContent(issueDTO.getIssueTitle()); + taskTitle.setDataId(IdWorker.getIdStr()); + textScan.getTasks().add(taskTitle); + //建议 + TextTaskDTO taskSuggestion = new TextTaskDTO(); + taskSuggestion.setDataId(IdWorker.getIdStr()); + taskSuggestion.setContent(issueDTO.getSuggestion()); + textScan.getTasks().add(taskSuggestion); + Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScan); + if (!textSyncScanResult.success()) { + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + logger.error(String.format(TopicConstant.SHIFT_ISSUE, issueDTO.getIssueTitle(), issueDTO.getSuggestion())); + throw new EpmetException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + } + if (CollectionUtils.isNotEmpty(issueDTO.getAttachmentList())){ + ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); + issueDTO.getAttachmentList().forEach(url -> { + ImgTaskDTO task = new ImgTaskDTO(); + task.setDataId(IdWorker.getIdStr()); + task.setUrl(url.getUrl()); + imgScanParamDTO.getTasks().add(task); + }); + Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); + if (!imgScanResult.success()){ + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!imgScanResult.getData().isAllPass()) { + throw new EpmetException(EpmetErrorCode.IMG_SCAN_FAILED.getCode()); + } + } + }*/ + + // 是否开启 + String openStatus = configurationParameterService.checkIssueAuditSwitchIfOpen(issueDTO.getCustomerId()); + if (ModuleConstants.AUDIT_SWITCH_OPEN.equals(openStatus)){ + // 审核表 历史表 + IssueApplicationEntity iae = ConvertUtils.sourceToTarget(issueDTO, IssueApplicationEntity.class); + iae.setApplyStatus(ModuleConstants.UNDER_AUDITING); + applicationService.insert(iae); + IssueApplicationHistoryEntity iahe = new IssueApplicationHistoryEntity(); + iahe.setCustomerId(issueDTO.getCustomerId()); + iahe.setIssueApplicationId(iae.getId()); + iahe.setActionType(ModuleConstants.UNDER_AUDITING); + historyService.insert(iahe); + insertAtt(issueDTO.getAttachmentList(),iae.getId(),ModuleConstants.ISSUE_APPLICATION,issueDTO.getCustomerId()); + }else { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(issueDTO.getGridId()); + if(null == gridInfo){ + throw new EpmetException("查询网格信息失败"+issueDTO.getGridId()); + } + issueDTO.setOrgId(gridInfo.getPid()); + issueDTO.setOrgIdPath(gridInfo.getPids()); + } + + } + private void insertAtt(Collection sourceList,String businessId,String attachTo,String customerId){ + if (CollectionUtils.isNotEmpty(sourceList)){ + List list = ConvertUtils.sourceToTarget(sourceList, IssueAttachmentEntity.class); + Integer sort = NumConstant.ZERO; + for (IssueAttachmentEntity e : list) { + e.setCustomerId(customerId); + e.setBusinessId(businessId); + e.setAttachTo(attachTo); + e.setStatus(ModuleConstants.AUDITION_TYPE_AUTO_PASSED); + e.setSort(sort); + sort++; + } + issueAttachmentService.insertBatch(list); + } + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java index b6a7f4cd49..1a7f4dbffd 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java @@ -178,4 +178,8 @@ public interface ModuleConstants { * 是否禁用 disable:禁用 */ String IS_DISABLE = "disable"; + + String UNDER_AUDITING = "under_auditing"; + + String ISSUE_APPLICATION = "issue_application"; } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.18__alter_issue_type.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.18__alter_issue_type.sql index ea9a1f3eb1..446d74a28f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.18__alter_issue_type.sql +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.18__alter_issue_type.sql @@ -1,2 +1,32 @@ ALTER TABLE issue MODIFY COLUMN SOURCE_ID varchar(32) NULL COMMENT '来源ID eg:2223232(当SOURCE_TYPE为"resi_topic"时,这里指话题的ID),issue时为空' AFTER SOURCE_TYPE; ALTER TABLE issue MODIFY COLUMN SOURCE_TYPE varchar(32) NULL COMMENT '来源类型 话题:resi_topic;直接立议题:issue;' AFTER ISSUE_STATUS; + +ALTER TABLE issue_application MODIFY COLUMN GROUP_ID varchar(64) NULL COMMENT '小组id' AFTER TOPIC_ID; +ALTER TABLE issue_application MODIFY COLUMN TOPIC_ID varchar(32) NULL COMMENT '话题id' AFTER APPLY_STATUS; + + +alter table issue add column ADDRESS VARCHAR(255) DEFAULT '' COMMENT '地址' AFTER `SUGGESTION`; +alter table issue add COLUMN LONGITUDE VARCHAR(64) DEFAULT'' COMMENT '经度' AFTER ADDRESS; +alter table issue add COLUMN LATITUDE VARCHAR(64) DEFAULT'' COMMENT '纬度' AFTER LONGITUDE; + +CREATE TABLE `issue_attachment` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `BUSINESS_ID` varchar(64) NOT NULL COMMENT '业务id', + `ATTACH_TO` varchar(32) DEFAULT NULL COMMENT '议题:issue', + `NAME` varchar(64) DEFAULT NULL COMMENT '附件名', + `FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', + `TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', + `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 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='issue库附件表'; \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueAttachmentDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueAttachmentDao.xml new file mode 100644 index 0000000000..02e8513b09 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueAttachmentDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 7d9b15185b5675c0dc4e4464f8048a319b3f8458 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 30 Sep 2022 14:31:44 +0800 Subject: [PATCH 004/125] =?UTF-8?q?/resi/hall/issue/closedlist=E8=BF=94?= =?UTF-8?q?=E5=9B=9EissueImgs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ClosedIssueListResultDTO.java | 12 ++++++ .../epmet/service/impl/IssueServiceImpl.java | 3 +- .../src/main/resources/mapper/IssueDao.xml | 41 +++++++++++++------ .../com/epmet/controller/IssueController.java | 5 +-- .../epmet/service/impl/IssueServiceImpl.java | 2 +- 5 files changed, 44 insertions(+), 19 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java index 08bfdca9e6..68b2b4367e 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * @Description @@ -38,4 +39,15 @@ public class ClosedIssueListResultDTO implements Serializable { * 话题id */ private String sourceId; + + /** + * 来源类型 话题:resi_topic;直接立议题:issue; + */ + private String sourceType; + + /** + * 发布议题的图片 + */ + private List issueImgs; + } 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 30054255d2..4761577b1c 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 @@ -620,7 +620,8 @@ public class IssueServiceImpl extends BaseServiceImpl imp @Override public List closedList(CommonIssueListFormDTO issueListForm) { PageHelper.startPage(issueListForm.getPageNo(), issueListForm.getPageSize(), issueListForm.getIsPage()); - return baseDao.selectClosedList(issueListForm); + List resultDTOList=baseDao.selectClosedList(issueListForm); + return resultDTOList; } /** diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index acd64f9758..a1e3a4acd1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -226,7 +226,7 @@ FROM issue i left join issue_attachment ia - on(i.id=ia.BUSINESS_ID) + on(i.id=ia.BUSINESS_ID and ia.del_flag='0') WHERE i.DEL_FLAG = '0' AND i.GRID_ID = #{gridId} @@ -235,23 +235,38 @@ i.created_time DESC,ia.SORT asc + + + + + + + + + + + - SELECT - ID AS issueId, - IFNULL(ISSUE_TITLE,'') AS issueTitle, - IFNULL(CLOSE_REASON,'') AS solution, - UNIX_TIMESTAMP( created_time ) AS issueClosedTime, - SOURCE_ID AS sourceId + i.ID AS issueId, + IFNULL(i.ISSUE_TITLE,'') AS issueTitle, + IFNULL(i.CLOSE_REASON,'') AS solution, + UNIX_TIMESTAMP( i.created_time ) AS issueClosedTime, + i.SOURCE_ID AS sourceId, + i.SOURCE_TYPE, + ia.URL FROM - issue + issue i + left join issue_attachment ia + on(i.id=ia.BUSINESS_ID and ia.del_flag='0') WHERE - DEL_FLAG = '0' - AND GRID_ID = #{gridId} - AND ISSUE_STATUS = 'closed' - AND RESOLVE_TYPE = 'resolved' + i.DEL_FLAG = '0' + AND i.GRID_ID = #{gridId} + AND i.ISSUE_STATUS = 'closed' + AND i.RESOLVE_TYPE = 'resolved' ORDER BY - created_time DESC + i.created_time DESC,ia.sort asc + + SELECT + COUNT(DISTINCT USER_ID) + FROM register_relation + WHERE DEL_FLAG = 0 + AND FIRST_REGISTER = '1' + AND CUSTOMER_ID = #{gridId} + + From b9fab93c9d59b99a8f2d10127e501b88fb82bfc8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 8 Oct 2022 13:32:10 +0800 Subject: [PATCH 013/125] =?UTF-8?q?=E8=AE=AE=E4=BA=8B=E5=8E=85-=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=B8=AD=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/IssueProfileDTO.java | 19 +++++ .../epmet/feign/GovIssueOpenFeignClient.java | 8 +++ .../GovIssueOpenFeignClientFallBack.java | 11 +++ .../com/epmet/controller/IssueController.java | 13 ++++ .../src/main/java/com/epmet/dao/IssueDao.java | 6 ++ .../java/com/epmet/service/IssueService.java | 6 ++ .../epmet/service/impl/IssueServiceImpl.java | 21 ++++-- .../src/main/resources/mapper/IssueDao.xml | 14 ++++ .../epmet/dto/result/PendingResultDTO.java | 35 +++++++++- .../main/java/com/epmet/dao/ProjectDao.java | 8 +++ .../service/impl/ProjectServiceImpl.java | 4 +- .../src/main/resources/mapper/ProjectDao.xml | 25 +++++++ .../result/ResiTopicDetailResultDTO.java | 2 +- .../service/impl/ResiTopicServiceImpl.java | 1 + .../com/epmet/controller/IssueController.java | 3 +- .../java/com/epmet/service/IssueService.java | 3 +- .../epmet/service/impl/IssueServiceImpl.java | 69 +++++++++++++------ 17 files changed, 214 insertions(+), 34 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProfileDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProfileDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProfileDTO.java new file mode 100644 index 0000000000..1fb3b336e7 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProfileDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +/** + * @Description + * @Author yzm + * @Date 2022/10/8 12:58 + */ +@Data +public class IssueProfileDTO { + private String issueId; + private String sourceId; + /** + * 来源类型 话题:resi_topic;直接立议题:issue; + */ + private String sourceType; +} + 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 2392e4d2fa..5b79e535ac 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 @@ -395,4 +395,12 @@ public interface GovIssueOpenFeignClient { @PostMapping(value = "/gov/issue/issueprojectcategorydict/first/{customerId}") Result> queryFirstCategory(@PathVariable("customerId") String customerId); + + /** + * 根据议题ids查询议题简要信息 + * @param issueIds + * @return + */ + @PostMapping("/gov/issue/issue/getIssueProfile") + Result> getIssueProfile(@RequestBody List issueIds); } 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 be2f187945..5f81cd7501 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 @@ -332,5 +332,16 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryFirstCategory", customerId); } + /** + * 根据议题ids查询议题简要信息 + * + * @param issueIds + * @return + */ + @Override + public Result> getIssueProfile(List issueIds) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getIssueProfile", issueIds); + } + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index aebbd3789e..c074d16352 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -13,6 +13,7 @@ import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; import com.epmet.service.IssueService; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -341,5 +342,17 @@ public class IssueController { return new Result(); } + /** + * 根据议题ids查询议题简要信息 + * @param issueIds + * @return + */ + @PostMapping("getIssueProfile") + public Result> getIssueProfile(@RequestBody List issueIds) { + if (CollectionUtils.isEmpty(issueIds)) { + return new Result<>(); + } + return new Result>().ok(issueService.getIssueProfile(issueIds)); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java index 1c5ae213ee..24811e442e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java @@ -308,4 +308,10 @@ public interface IssueDao extends BaseDao { */ Integer selectAuditIssue(@Param("gridId")String gridId); + /** + * 根据议题ids查询议题简要信息 + * @param issueIds + * @return + */ + List selectIssueProfile(@Param("issueIds") List issueIds); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index 8ac38fb970..3ccc105c94 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -386,4 +386,10 @@ public interface IssueService extends BaseService { void createIssue(IssueDTO issueDTO); + /** + * 根据议题ids查询议题简要信息 + * @param issueIds + * @return + */ + List getIssueProfile(List issueIds); } 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 561a5dcd35..2e9a377e79 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 @@ -217,13 +217,6 @@ public class IssueServiceImpl extends BaseServiceImpl imp //议题信息 IssueResultDTO issueResult = issueDao.issueDetail(issueDetail); if (null != issueResult && StringUtils.isNotBlank(issueResult.getGridId())) { - /*BelongGridNameFormDTO formDTO = new BelongGridNameFormDTO(); - formDTO.setGridId(issueResult.getGridId()); - Result result = govOrgOpenFeignClient.getGridNameByGridId(formDTO); - logger.info("根据网格id查询网格名称接口返参:" + JSON.toJSONString(result)); - if (result.success() && null != result.getData()) { - issueResult.setGridName(result.getData().getBelongsGridName()); - }*/ GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(issueResult.getGridId()); issueResult.setGridName(null != gridInfoCache ? gridInfoCache.getGridNamePath() : StrConstant.EPMETY_STR); } @@ -1895,4 +1888,18 @@ public class IssueServiceImpl extends BaseServiceImpl imp issueAttachmentService.insertBatch(list); } } + + /** + * 根据议题ids查询议题简要信息 + * + * @param issueIds + * @return + */ + @Override + public List getIssueProfile(List issueIds) { + if(CollectionUtils.isEmpty(issueIds)){ + return new ArrayList<>(); + } + return baseDao.selectIssueProfile(issueIds); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index 080f01afe6..762876ad3e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -819,4 +819,18 @@ AND APPLY_STATUS = 'under_auditing' AND GRID_ID = #{gridId} + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java index ed9f0d8d16..5d50dccb33 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java @@ -1,6 +1,5 @@ package com.epmet.dto.result; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import lombok.NoArgsConstructor; @@ -20,14 +19,46 @@ public class PendingResultDTO implements Serializable { private static final long serialVersionUID = 2545519820222637112L; private String issueId; private String issueTitle; + /** + * 议题转成项目时间 + */ private Long issueShiftedTime; + /** + * 话题内容 + */ private String topicContent; + /** + * 当前处理部门名称数组 + */ private List currentHandleDepartMent; + /** + * 话题语音url列表 + */ private List topicVoices; + /** + * 话题内容 + */ private List topicImgs; + /** + * 项目的来源Id(话题或议题Id) + * sourceId=议题id + */ private String sourceId; - @JsonIgnore + // @JsonIgnore private String projectId; private String longitude; private String latitude; + /** + * 项目来源: + * 来源议题 issue + * 项目立项 agency + * 旧版事件上报 resi_event + * 工作人员上报(巡查) work_event + * 新版事件上报 ic_event + */ + private String projectOrigin; + /** + * 话题id + */ + private String topicId; } 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 316fbc8de6..07786f5585 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 @@ -189,6 +189,14 @@ public interface ProjectDao extends BaseDao { */ List selectPendingListByGrid(@Param("gridId")String gridId); + /** + * 居民端议事厅-处理中列表 + * 查询的是已经转项目的议题,这里是查询来源于议题的项目 + * @param gridId + * @return + */ + List selectPendingListByGridV2(@Param("gridId")String gridId); + /** * 获取党建声音已结案列表 * @author zhaoqifeng 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 9e679c824b..dd36dd7694 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 @@ -2883,8 +2883,10 @@ public class ProjectServiceImpl extends BaseServiceImpl getPendingList(ShiftProjectListFromDTO fromDTO) { + // PageInfo result = + // PageHelper.startPage(fromDTO.getPageNo(), fromDTO.getPageSize(), fromDTO.getIsPage()).doSelectPageInfo(() -> baseDao.selectPendingListByGrid(fromDTO.getGridId())); PageInfo result = - PageHelper.startPage(fromDTO.getPageNo(), fromDTO.getPageSize(), fromDTO.getIsPage()).doSelectPageInfo(() -> baseDao.selectPendingListByGrid(fromDTO.getGridId())); + PageHelper.startPage(fromDTO.getPageNo(), fromDTO.getPageSize(), fromDTO.getIsPage()).doSelectPageInfo(() -> baseDao.selectPendingListByGridV2(fromDTO.getGridId())); if (CollectionUtils.isNotEmpty(result.getList())) { result.getList().forEach(item -> { ProjectDTO dto = new ProjectDTO(); 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 73c2f11384..73291bb680 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 @@ -336,6 +336,31 @@ AND a.ORIGIN = 'issue' ORDER BY a.CREATED_TIME DESC + + + + + - SELECT i.id AS issueId, - i.SOURCE_TYPE AS sourceType, - IFNULL( i.SOURCE_ID, '' ) AS sourceId + i.SOURCE_TYPE AS issueSourceType, + IFNULL( i.SOURCE_ID, '' ) AS sourceId, + ia.url FROM issue i + left join issue_attachment ia + on(i.id=ia.BUSINESS_ID and ia.del_flag='0') WHERE i.DEL_FLAG = '0' diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java index 5d50dccb33..f4b76f8b96 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java @@ -61,4 +61,13 @@ public class PendingResultDTO implements Serializable { * 话题id */ private String topicId; + + /** + * 来源类型 话题:resi_topic;直接立议题:issue; + */ + private String issueSourceType; + /** + * 发布议题的图片 + */ + private List issueImgs; } diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 89528c9f4b..0c7d9ded4c 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -2,6 +2,8 @@ package com.epmet.service.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +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.security.dto.TokenDto; import com.epmet.commons.tools.security.user.LoginUserUtil; @@ -28,6 +30,7 @@ import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -499,40 +502,53 @@ public class IssueServiceImpl implements IssueService { @Override public List getProcessing(ShiftProjectListFromDTO formDTO) { //1、查询由议题转的项目,且正在处理中的 - List resultList = govProjectOpenFeignClient.getPendingList(formDTO).getData(); + Result> projectRes=govProjectOpenFeignClient.getPendingList(formDTO); + if(!projectRes.success()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg()); + } + List resultList =projectRes.getData(); if (org.apache.commons.collections4.CollectionUtils.isEmpty(resultList)) { return new ArrayList<>(); } + // 话题信息 + HashMap rtm=new HashMap<>(); + // 议题信息 //2、根据议题id查询话题id List issueIds = resultList.stream().map(PendingResultDTO::getIssueId).collect(Collectors.toList()); - if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(issueIds)){ - //根据议题id查询话题id - Result> issueRes=govIssueOpenFeignClient.getIssueProfile(issueIds); - if (issueRes.success() && !CollectionUtils.isEmpty(issueRes.getData())) { - // 3、如果存在议题来源于话题 - List topicIds = issueRes.getData().stream().filter(t->t.getSourceType().equals("resi_topic")).map(IssueProfileDTO::getSourceId).collect(Collectors.toList()); - if(!CollectionUtils.isEmpty(topicIds)){ - //3.1 查询话题详情 - TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO(); - form.setTopicIdList(topicIds); - Result> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form); - if (topicDetailsResult.success() && !CollectionUtils.isEmpty(topicDetailsResult.getData())) { - List topicDetails = topicDetailsResult.getData(); - HashMap rtm = convertTopicDetailList2MapV2(topicDetails); - resultList.forEach(vi -> { - ResiTopicDetailResultDTO rr = rtm.get(vi.getIssueId()); - vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs()); - vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs()); - vi.setTopicContent(rr == null ? "" : rr.getTopicContent()); - vi.setLongitude(rr == null ? "" : rr.getLongitude()); - vi.setLatitude(rr == null ? "" : rr.getLatitude()); - vi.setTopicId(null == rr ? "" : rr.getTopicId()); - }); - } + // 根据议题id查询话题id + Result> issueRes = govIssueOpenFeignClient.getIssueProfile(issueIds); + + if (issueRes.success() && !CollectionUtils.isEmpty(issueRes.getData())) { + // 3、如果存在议题来源于话题 + List topicIds = issueRes.getData().stream().filter(t -> t.getIssueSourceType().equals("resi_topic")).map(IssueProfileDTO::getSourceId).collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(topicIds)) { + // 3.1 查询话题详情 + TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO(); + form.setTopicIdList(topicIds); + Result> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form); + if (topicDetailsResult.success() && !CollectionUtils.isEmpty(topicDetailsResult.getData())) { + List topicDetails = topicDetailsResult.getData(); + topicDetails.stream().forEach(t -> { + if(StringUtils.isNotBlank(t.getIssueId())){ + rtm.put(t.getIssueId(), t); + } + }); } - } - + Map issueMap=issueRes.getData().stream().collect(Collectors.toMap(IssueProfileDTO::getIssueId, o -> o, (o1, o2) -> o1)); + // 赋值话题信息、议题来源、议题图片 + resultList.forEach(vi -> { + ResiTopicDetailResultDTO rr = rtm.get(vi.getIssueId()); + vi.setTopicImgs(rr == null ? new ArrayList<>() : rr.getTopicImgs()); + vi.setTopicVoices(rr == null ? new ArrayList<>() : rr.getTopicImgs()); + vi.setTopicContent(rr == null ? StrConstant.EPMETY_STR : rr.getTopicContent()); + vi.setLongitude(rr == null ? StrConstant.EPMETY_STR : rr.getLongitude()); + vi.setLatitude(rr == null ? StrConstant.EPMETY_STR : rr.getLatitude()); + vi.setTopicId(null == rr ? StrConstant.EPMETY_STR : rr.getTopicId()); + IssueProfileDTO issue = issueMap.get(vi.getIssueId()); + vi.setIssueSourceType(null != issue ? issue.getIssueSourceType() : StrConstant.EPMETY_STR); + vi.setIssueImgs(null != issue ? issue.getIssueImgs() : new ArrayList<>()); + }); } return resultList; } From cc3a3fa3b010427328a77c9233498deda1e9b5f3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 8 Oct 2022 14:23:04 +0800 Subject: [PATCH 015/125] ClosedIssueListResultDTO --- .../com/epmet/dto/result/ClosedIssueListResultDTO.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java index da7574183f..74483df1b1 100644 --- a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java +++ b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java @@ -56,4 +56,13 @@ public class ClosedIssueListResultDTO implements Serializable { private String topicContent; private String longitude; private String latitude; + /** + * 来源类型 话题:resi_topic;直接立议题:issue; + */ + private String sourceType; + + /** + * 发布议题的图片 + */ + private List issueImgs; } From bb6b615d79f351f6a258dc776ebeb52909e8a094 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 8 Oct 2022 14:51:41 +0800 Subject: [PATCH 016/125] =?UTF-8?q?/issue/closedproject=E5=B7=B2=E5=A4=84?= =?UTF-8?q?=E7=90=86-=E5=B7=B2=E7=BB=93=E6=A1=88=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/ResolvedResultDTO.java | 22 ++++++++ .../src/main/resources/mapper/ProjectDao.xml | 7 ++- .../epmet/service/impl/IssueServiceImpl.java | 56 ++++++++++++++----- 3 files changed, 68 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java index 14187406e3..3c676185b9 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java @@ -13,6 +13,7 @@ import java.util.List; @Data public class ResolvedResultDTO implements Serializable { private static final long serialVersionUID = -6670213622289052352L; + private String projectId; /** * 议题Id */ @@ -53,4 +54,25 @@ public class ResolvedResultDTO implements Serializable { private String longitude; private String latitude; + /** + * 项目来源: + * 来源议题 issue + * 项目立项 agency + * 旧版事件上报 resi_event + * 工作人员上报(巡查) work_event + * 新版事件上报 ic_event + */ + private String projectOrigin; + /** + * 话题id + */ + private String topicId; + /** + * 来源类型 话题:resi_topic;直接立议题:issue; + */ + private String issueSourceType; + /** + * 发布议题的图片 + */ + private List issueImgs; } 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 73291bb680..8c3f58f3f5 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 @@ -361,17 +361,20 @@ ORDER BY a.CREATED_TIME DESC + - SELECT - ID AS issueId, - IFNULL(ISSUE_TITLE,'') AS issueTitle, - IFNULL(CLOSE_REASON,'') AS solution, - UNIX_TIMESTAMP( CLOSED_TIME ) AS closedTime, - SOURCE_ID AS sourceId + i.ID AS issueId, + IFNULL(i.ISSUE_TITLE,'') AS issueTitle, + IFNULL(i.CLOSE_REASON,'') AS solution, + UNIX_TIMESTAMP( i.CLOSED_TIME ) AS closedTime, + i.SOURCE_ID AS sourceId, + i.SOURCE_TYPE as issueSourceType, + i.LONGITUDE, + i.LATITUDE, + i.SOURCE_ID as topicId, + ia.url FROM - issue + issue i + left join issue_attachment ia + on(i.id=ia.BUSINESS_ID and ia.del_flag='0') WHERE - DEL_FLAG = '0' - AND GRID_ID = #{gridId} - AND ISSUE_STATUS = 'closed' - AND RESOLVE_TYPE = 'unresolved' + i.DEL_FLAG = '0' + AND i.GRID_ID = #{gridId} + AND i.ISSUE_STATUS = 'closed' + AND i.RESOLVE_TYPE = 'unresolved' @@ -824,6 +847,8 @@ + + @@ -834,6 +859,8 @@ i.id AS issueId, i.SOURCE_TYPE AS issueSourceType, IFNULL( i.SOURCE_ID, '' ) AS sourceId, + i.LONGITUDE, + i.LATITUDE, ia.url FROM issue i diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java index 53f183c389..cd3e689745 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java @@ -52,4 +52,27 @@ public class UnResolvedResultDTO implements Serializable { private String topicContent; private String longitude; private String latitude; + + /** + * 项目来源: + * 来源议题 issue + * 项目立项 agency + * 旧版事件上报 resi_event + * 工作人员上报(巡查) work_event + * 新版事件上报 ic_event + */ + private String projectOrigin; + /** + * 话题id + */ + private String topicId; + /** + * 来源类型 话题:resi_topic;直接立议题:issue; + */ + private String issueSourceType; + /** + * 发布议题的图片 + */ + private List issueImgs; + private String projectId; } 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 8c3f58f3f5..ba340a2464 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 @@ -373,9 +373,10 @@ a.ORIGIN as projectOrigin FROM project a - INNER JOIN project_related_personnel b ON a.ID = b.PROJECT_ID - AND b.SOURCE_TYPE = 'issue' - AND b.GRID_ID = #{gridId} + INNER JOIN project_related_personnel b ON (a.ID = b.PROJECT_ID + AND b.SOURCE_TYPE = 'issue' + AND b.GRID_ID = #{gridId} + ) LEFT JOIN project_process c ON a.ID = c.PROJECT_ID AND c.OPERATION = 'close' WHERE @@ -385,20 +386,28 @@ AND a.CLOSED_STATUS = 'resolved' ORDER BY a.UPDATED_TIME DESC + From 8d05a101874d93d7b10f88517edd5ccf74feab99 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 8 Oct 2022 15:51:30 +0800 Subject: [PATCH 020/125] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ProjectServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) 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 dd36dd7694..42f3b122a5 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 @@ -649,6 +649,7 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Sat, 8 Oct 2022 15:55:08 +0800 Subject: [PATCH 021/125] url --- .../src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5e7348b757..50861d9f3f 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 @@ -931,6 +931,6 @@ public interface EpmetUserOpenFeignClient { * @author zxc * @date 2022/10/8 10:41 */ - @PostMapping("/epmetuser/resirelation/getAllResiByGrid") + @PostMapping("/epmetuser/registerrelation/getAllResiByGrid") Result getAllResiByGrid(@RequestBody AllResiByGridFormDTO formDTO); } From 5fe1e05166a9980c9fd8386734af7956b134b4d2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 8 Oct 2022 16:31:39 +0800 Subject: [PATCH 022/125] =?UTF-8?q?=E5=8F=91=E8=B5=B7=E8=AE=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IssueProcessDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProcessDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProcessDao.xml index 00122cfade..2df1c162ba 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProcessDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProcessDao.xml @@ -102,7 +102,7 @@ SELECT - '转议题' AS processName, + '发起议题' AS processName, UNIX_TIMESTAMP( created_time ) AS processTime, operation_explain AS progressDesc, org_name AS departmentName, From ad62f03d10f518fbbe3144bf22616090a0f2d06a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sat, 8 Oct 2022 16:43:14 +0800 Subject: [PATCH 023/125] =?UTF-8?q?=E6=A0=87=E9=A2=98=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E4=B8=8D=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/IssueController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index 4befb7b97b..f27113c3e8 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -348,6 +348,7 @@ public class IssueController { public Result createIssue(@LoginUser TokenDto tokenDto,@RequestBody IssueDTO formDTO){ formDTO.setUserId(tokenDto.getUserId()); formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,IssueDTO.IssueForm.class); issueService.createIssue(formDTO); return new Result(); } From 04564196b52d62098d8a6a6ba862a0e63414d6f9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 9 Oct 2022 10:14:31 +0800 Subject: [PATCH 024/125] =?UTF-8?q?=E5=8F=91=E5=B8=83=E7=9A=84=E8=AE=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E8=AE=AE=E9=A2=98=E8=BD=AC=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IssueDTO.java | 2 +- .../epmet/constant/UserMessageConstant.java | 5 + .../java/com/epmet/entity/IssueEntity.java | 2 +- .../epmet/service/impl/IssueServiceImpl.java | 115 ++++++++++++------ .../service/impl/ProjectServiceImpl.java | 55 ++++++--- 5 files changed, 120 insertions(+), 59 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java index fd86c07eb7..93d5602612 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java @@ -49,7 +49,7 @@ public class IssueDTO implements Serializable { private String issueStatus; /** - * 来源类型 eg:resi_topic + * 来源类型 话题:resi_topic;直接立议题:issue; */ private String sourceType; diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java index 2a0cf7b35f..8cb2d2d0da 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java @@ -36,4 +36,9 @@ public interface UserMessageConstant { */ String PROJECT_RESOLVED_MSG = "您收到一条【%s】的新信息,请您尽快处理。"; + /** + * 议题转项目消息模板 + */ + String PUB_ISSUE_SHIFT_PROJECT_MSG = "您发表的议题\"%s\"的问题,已由%s部门处理,请查看。"; + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java index 825e16cbbc..90a04596fb 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java @@ -43,7 +43,7 @@ public class IssueEntity extends BaseEpmetEntity { private String issueStatus; /** - * 来源类型 eg:resi_topic + * 来源类型 话题:resi_topic;直接立议题:issue; */ private String sourceType; 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 80b36d2c33..4aac38aee6 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 @@ -1025,18 +1025,21 @@ public class IssueServiceImpl extends BaseServiceImpl imp //因需要保证议题表中的转项目时间与创建项目时间一致 因此先新增项目数据再更新议题数据 //2:调用resi-group查询话题创建人数据(目前议题来源只有来自话题),为了到项目服务初始数据以及发送消息使用 - Result resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId()); - if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),IssueConstant.SELECT_TOPIC_EXCEPTION,IssueConstant.SELECT_TOPIC_EXCEPTION); + if("resi_topic".equals(entity.getSourceType())){ + Result resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId()); + if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),IssueConstant.SELECT_TOPIC_EXCEPTION,IssueConstant.SELECT_TOPIC_EXCEPTION); + } + ResiTopicDTO topicDTO = resultTopicDTO.getData(); + formDTO.setTopicDTO(topicDTO); } - ResiTopicDTO topicDTO = resultTopicDTO.getData(); - formDTO.setTopicDTO(topicDTO); //3:调用gov-project服务,新增项目各业务表初始数据 formDTO.setCategoryList(categoryList); formDTO.setGridId(entity.getGridId()); List tagList = issueTagsService.getTagsByIssue(formDTO.getIssueId()); formDTO.setTagList(tagList); + // 议题转项目!!!!!!!!!!!!在这步 Result resultDTO = govProjectFeignClient.issueShiftProject(formDTO); if (!resultDTO.success() || null == resultDTO.getData()) { logger.error(resultDTO.getInternalMsg()); @@ -1124,32 +1127,50 @@ public class IssueServiceImpl extends BaseServiceImpl imp List msgList = new ArrayList<>(); //1:创建话题发起人、议题发表人消息对象 - UserMessageFormDTO msgDTO = new UserMessageFormDTO(); - msgDTO.setCustomerId(entity.getCustomerId()); - msgDTO.setGridId(entity.getGridId()); - msgDTO.setApp(AppClientConstant.APP_RESI); - msgDTO.setTitle(UserMessageConstant.ISSUE_TITLE); - String topicIssueMessage = String.format(UserMessageConstant.ISSUE_SHIFT_PROJECT_MSG, formDTO.getTopicDTO().getTopicContent(), issueProjectResultDTO.getOrgName()); - msgDTO.setMessageContent(topicIssueMessage); - msgDTO.setReadFlag(ReadFlagConstant.UN_READ); - msgDTO.setUserId(formDTO.getTopicDTO().getCreatedBy()); + if ("resi_topic".equals(entity.getSourceType()) && null != formDTO.getTopicDTO()) { + UserMessageFormDTO msgDTO = new UserMessageFormDTO(); + msgDTO.setCustomerId(entity.getCustomerId()); + msgDTO.setGridId(entity.getGridId()); + msgDTO.setApp(AppClientConstant.APP_RESI); + msgDTO.setTitle(UserMessageConstant.ISSUE_TITLE); + String topicIssueMessage = String.format(UserMessageConstant.ISSUE_SHIFT_PROJECT_MSG, formDTO.getTopicDTO().getTopicContent(), issueProjectResultDTO.getOrgName()); + msgDTO.setMessageContent(topicIssueMessage); + msgDTO.setReadFlag(ReadFlagConstant.UN_READ); + msgDTO.setUserId(formDTO.getTopicDTO().getCreatedBy()); - //21.09.10:记录消息类型和对应的业务id - msgDTO.setMessageType(UserMessageTypeConstant.ISSUE_SHIFT_PROJECT); - msgDTO.setTargetId(entity.getId()); + //21.09.10:记录消息类型和对应的业务id + msgDTO.setMessageType(UserMessageTypeConstant.ISSUE_SHIFT_PROJECT); + msgDTO.setTargetId(entity.getId()); - msgList.add(msgDTO); - //话题人和议题人是同一个人时则只发送一条居民消息 - if (!formDTO.getTopicDTO().getCreatedBy().equals(entity.getCreatedBy())) { - UserMessageFormDTO msgIssue = ConvertUtils.sourceToTarget(msgDTO, UserMessageFormDTO.class); - msgIssue.setUserId(entity.getCreatedBy()); + msgList.add(msgDTO); - //21.09.10:记录消息类型和对应的业务id - msgIssue.setMessageType(UserMessageTypeConstant.ISSUE_SHIFT_PROJECT); - msgIssue.setTargetId(entity.getId()); + //话题人和议题人是同一个人时则只发送一条居民消息 + if (!formDTO.getTopicDTO().getCreatedBy().equals(entity.getCreatedBy())) { + UserMessageFormDTO msgIssue = ConvertUtils.sourceToTarget(msgDTO, UserMessageFormDTO.class); + msgIssue.setUserId(entity.getCreatedBy()); - msgList.add(msgIssue); + //21.09.10:记录消息类型和对应的业务id + msgIssue.setMessageType(UserMessageTypeConstant.ISSUE_SHIFT_PROJECT); + msgIssue.setTargetId(entity.getId()); + + msgList.add(msgIssue); + } + }else{ + //居民端发布的议题,只给议题发布人发送消息 + UserMessageFormDTO msgDTO = new UserMessageFormDTO(); + msgDTO.setCustomerId(entity.getCustomerId()); + msgDTO.setGridId(entity.getGridId()); + msgDTO.setApp(AppClientConstant.APP_RESI); + msgDTO.setTitle(UserMessageConstant.ISSUE_TITLE); + String issueMessage = String.format(UserMessageConstant.PUB_ISSUE_SHIFT_PROJECT_MSG, entity.getIssueTitle(), issueProjectResultDTO.getOrgName()); + msgDTO.setMessageContent(issueMessage); + msgDTO.setReadFlag(ReadFlagConstant.UN_READ); + msgDTO.setUserId(entity.getCreatedBy()); + msgDTO.setMessageType(UserMessageTypeConstant.ISSUE_SHIFT_PROJECT); + msgDTO.setTargetId(entity.getId()); + msgList.add(msgDTO); } + //2:创建项目工作人员消息对象 String projectStaffMessage = String.format(UserMessageConstant.PROJECT_RESOLVED_MSG, entity.getIssueTitle()); //所选人员如果即在部门下又在网格下则只发一条消息 @@ -1181,20 +1202,34 @@ public class IssueServiceImpl extends BaseServiceImpl imp */ private Result wxmpShiftProjectMessage(IssueProjectResultDTO issueProjectResultDTO, ShiftProjectFormDTO formDTO, IssueEntity entity) { List msgList = new ArrayList<>(); - //1:创建话题发起人、议题发表人消息对象 - WxSubscribeMessageFormDTO msgDTO = new WxSubscribeMessageFormDTO(); - msgDTO.setCustomerId(entity.getCustomerId()); - msgDTO.setClientType(AppClientConstant.APP_RESI); - msgDTO.setUserId(formDTO.getTopicDTO().getCreatedBy()); - msgDTO.setBehaviorType(UserMessageConstant.WXMP_ISSUE_TITLE); - String topicIssueMessage = String.format(UserMessageConstant.ISSUE_SHIFT_PROJECT_MSG, formDTO.getTopicDTO().getTopicContent(), issueProjectResultDTO.getOrgName()); - msgDTO.setMessageContent(topicIssueMessage); - msgDTO.setMessageTime(new Date()); - msgDTO.setGridId(entity.getGridId()); - msgList.add(msgDTO); - //话题人和议题人是同一个人时则只发送一条居民消息 - if (!formDTO.getTopicDTO().getCreatedBy().equals(entity.getCreatedBy())) { - WxSubscribeMessageFormDTO msgIssue = ConvertUtils.sourceToTarget(msgDTO, WxSubscribeMessageFormDTO.class); + if ("resi_topic".equals(entity.getSourceType()) && null != formDTO.getTopicDTO()) { + //1:创建话题发起人、议题发表人消息对象 + WxSubscribeMessageFormDTO msgDTO = new WxSubscribeMessageFormDTO(); + msgDTO.setCustomerId(entity.getCustomerId()); + msgDTO.setClientType(AppClientConstant.APP_RESI); + msgDTO.setUserId(formDTO.getTopicDTO().getCreatedBy()); + msgDTO.setBehaviorType(UserMessageConstant.WXMP_ISSUE_TITLE); + String topicIssueMessage = String.format(UserMessageConstant.ISSUE_SHIFT_PROJECT_MSG, formDTO.getTopicDTO().getTopicContent(), issueProjectResultDTO.getOrgName()); + msgDTO.setMessageContent(topicIssueMessage); + msgDTO.setMessageTime(new Date()); + msgDTO.setGridId(entity.getGridId()); + msgList.add(msgDTO); + //话题人和议题人是同一个人时则只发送一条居民消息 + if (!formDTO.getTopicDTO().getCreatedBy().equals(entity.getCreatedBy())) { + WxSubscribeMessageFormDTO msgIssue = ConvertUtils.sourceToTarget(msgDTO, WxSubscribeMessageFormDTO.class); + msgIssue.setUserId(entity.getCreatedBy()); + msgList.add(msgIssue); + } + }else{ + //只给议题发布人发送微信消息 + WxSubscribeMessageFormDTO msgIssue = new WxSubscribeMessageFormDTO(); + msgIssue.setCustomerId(entity.getCustomerId()); + msgIssue.setClientType(AppClientConstant.APP_RESI); + msgIssue.setBehaviorType(UserMessageConstant.WXMP_ISSUE_TITLE); + String topicIssueMessage = String.format(UserMessageConstant.PUB_ISSUE_SHIFT_PROJECT_MSG, entity.getIssueTitle(), issueProjectResultDTO.getOrgName()); + msgIssue.setMessageContent(topicIssueMessage); + msgIssue.setMessageTime(new Date()); + msgIssue.setGridId(entity.getGridId()); msgIssue.setUserId(entity.getCreatedBy()); msgList.add(msgIssue); } 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 42f3b122a5..f4b8aa9907 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 @@ -1186,9 +1186,15 @@ public class ProjectServiceImpl extends BaseServiceImpl list = new ArrayList<>(); - ProjectRelatedPersonnelEntity entity1 = new ProjectRelatedPersonnelEntity(); - entity1.setCustomerId(issueDTO.getCustomerId()); - entity1.setProjectId(projectEntity.getId()); - entity1.setApp(AppClientConstant.APP_RESI); - entity1.setGridId(issueDTO.getGridId()); - entity1.setUserId(formDTO.getTopicDTO().getCreatedBy()); - entity1.setSourceType(AppClientConstant.TOPIC); - entity1.setSourceId(formDTO.getTopicDTO().getId()); - ProjectRelatedPersonnelEntity entity2 = ConvertUtils.sourceToTarget(entity1,ProjectRelatedPersonnelEntity.class); - entity2.setUserId(issueDTO.getCreatedBy()); - entity2.setSourceType(AppClientConstant.ISSUE); - entity2.setSourceId(issueDTO.getId()); - list.add(entity1); - list.add(entity2); + if("resi_topic".equals(formDTO.getIssueDTO().getSourceType())){ + //话题 + ProjectRelatedPersonnelEntity topic = new ProjectRelatedPersonnelEntity(); + topic.setCustomerId(issueDTO.getCustomerId()); + topic.setProjectId(projectEntity.getId()); + topic.setApp(AppClientConstant.APP_RESI); + topic.setGridId(issueDTO.getGridId()); + topic.setUserId(formDTO.getTopicDTO().getCreatedBy()); + topic.setSourceType(AppClientConstant.TOPIC); + topic.setSourceId(formDTO.getTopicDTO().getId()); + list.add(topic); + //议题 + ProjectRelatedPersonnelEntity issue = ConvertUtils.sourceToTarget(topic,ProjectRelatedPersonnelEntity.class); + issue.setUserId(issueDTO.getCreatedBy()); + issue.setSourceType(AppClientConstant.ISSUE); + issue.setSourceId(issueDTO.getId()); + list.add(issue); + }else{ + //只插入议题 + ProjectRelatedPersonnelEntity issue = new ProjectRelatedPersonnelEntity(); + issue.setCustomerId(issueDTO.getCustomerId()); + issue.setProjectId(projectEntity.getId()); + issue.setApp(AppClientConstant.APP_RESI); + issue.setGridId(issueDTO.getGridId()); + issue.setUserId(formDTO.getIssueDTO().getCreatedBy()); + issue.setSourceType(AppClientConstant.ISSUE); + issue.setSourceId(formDTO.getIssueDTO().getId()); + list.add(issue); + } projectRelatedPersonnelService.insertBatch(list); //项目分类和标签表初始数据 From c692768a8fc7d7d8439f257d676e8f9001f9cf8b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 9 Oct 2022 10:37:22 +0800 Subject: [PATCH 025/125] =?UTF-8?q?=E5=8F=91=E5=B8=83=E7=9A=84=E8=AE=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E8=AE=AE=E9=A2=98=E8=BD=AC=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/IssueVoteStatisticalService.java | 5 +-- .../epmet/service/impl/IssueServiceImpl.java | 4 +- .../impl/IssueVoteStatisticalServiceImpl.java | 37 +++++++++++++------ 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueVoteStatisticalService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueVoteStatisticalService.java index 165bbc2c38..d9f8c8c7dc 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueVoteStatisticalService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueVoteStatisticalService.java @@ -28,6 +28,7 @@ import com.epmet.dto.result.EvaluationListResultDTO; import com.epmet.dto.result.MyPartIssuesResultDTO; import com.epmet.dto.result.VoteResultDTO; import com.epmet.dto.result.VotingTrendResultDTO; +import com.epmet.entity.IssueEntity; import com.epmet.entity.IssueVoteStatisticalEntity; import java.util.List; @@ -153,14 +154,12 @@ public interface IssueVoteStatisticalService extends BaseService imp } try{ - issueVoteStatisticalService.syncVotingCacheToDbByParams(formDTO.getIssueId(),entity.getGridId(),null); + issueVoteStatisticalService.syncVotingCacheToDbByParams(entity,null); }catch(RenException e){ logger.error(e.getInternalMsg()); } @@ -1088,7 +1088,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp //6:缓存中网格下表决中的议题总数减1 govIssueRedis.subtractWorkGrassrootsIssueRedDotValue(entity.getGridId()); try{ - issueVoteStatisticalService.syncVotingCacheToDbByParams(formDTO.getIssueId(),entity.getGridId(),null); + issueVoteStatisticalService.syncVotingCacheToDbByParams(entity,null); }catch(RenException e){ logger.error(e.getInternalMsg()); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java index 05963e6baa..8312ee3c6d 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java @@ -607,36 +607,49 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl votableCount = - resiGroupFeignClient.votableCount(gridParam); - if(votableCount.success() && null != votableCount.getData()){ + if ("resi_topic".equals(issueEntity.getSourceType())) { + CommonGridIdFormDTO gridParam = new CommonGridIdFormDTO(); + gridParam.setGridId(issueEntity.getGridId()); + Result votableCount = + resiGroupFeignClient.votableCount(gridParam); + if (votableCount.success() && null != votableCount.getData()) { toUpd.setVotableCount(votableCount.getData()); - } + }else{ + //先默认赋值0吧 + toUpd.setVotableCount(NumConstant.ZERO); + } + } else { + AllResiByGridFormDTO allResiByGridFormDTO=new AllResiByGridFormDTO(); + allResiByGridFormDTO.setGridId(issueEntity.getGridId()); + Result allResiByGrid=epmetUserOpenFeignClient.getAllResiByGrid(allResiByGridFormDTO); + if(allResiByGrid.success()){ + toUpd.setVotableCount(allResiByGrid.getData()); + }else{ + //先默认赋值0吧 + toUpd.setVotableCount(NumConstant.ZERO); + } + } if(StringUtils.isNotBlank(statisticalId)){ toUpd.setId(statisticalId); update(toUpd); }else{ - IssueVoteStatisticalDTO existedStatistical = getByIssueId(issueId); + IssueVoteStatisticalDTO existedStatistical = getByIssueId(issueEntity.getId()); if(null != existedStatistical && StringUtils.isNotBlank(existedStatistical.getId())){ toUpd.setId(existedStatistical.getId()); update(toUpd); From b386eebfa8e09949566731509916ef37dae71ccd Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 9 Oct 2022 10:48:13 +0800 Subject: [PATCH 026/125] issue_vote_statistical.issue_id --- .../src/main/java/com/epmet/service/impl/IssueServiceImpl.java | 2 +- .../com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 8fc490774f..2e8a14304a 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 @@ -1090,7 +1090,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp try{ issueVoteStatisticalService.syncVotingCacheToDbByParams(entity,null); }catch(RenException e){ - logger.error(e.getInternalMsg()); + logger.error("subtractWorkGrassrootsIssueRedDotValue报错:"+e.getInternalMsg()); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java index 8312ee3c6d..d1d0856063 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java @@ -622,6 +622,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl Date: Sun, 9 Oct 2022 11:02:21 +0800 Subject: [PATCH 027/125] canEvaluateProjectCount --- .../com/epmet/service/impl/IssueServiceImpl.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 2e8a14304a..53f86de42b 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 @@ -1555,12 +1555,14 @@ public class IssueServiceImpl extends BaseServiceImpl imp if (!CollectionUtils.isEmpty(votedCount)){ userIds.addAll(votedCount); } - // 话题创建者 - Result topicCreatedUser = resiGroupOpenFeignClient.topicCreatedUser(issueEntity.getSourceId()); - if (!topicCreatedUser.success()){ - throw new RenException("【查询话题创建者失败】["+topicCreatedUser.getMsg()+"]"); + if("resi_topic".equals(issueEntity.getSourceType())){ + // 话题创建者 + Result topicCreatedUser = resiGroupOpenFeignClient.topicCreatedUser(issueEntity.getSourceId()); + if (!topicCreatedUser.success()){ + throw new RenException("【查询话题创建者失败】["+topicCreatedUser.getMsg()+"]"); + } + userIds.add(topicCreatedUser.getData()); } - userIds.add(topicCreatedUser.getData()); // 去重 return userIds.stream().distinct().collect(Collectors.toList()); } From 9be438913dc37cf10d3d5a9aa90ab25411a619a7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 9 Oct 2022 11:04:07 +0800 Subject: [PATCH 028/125] warn --- .../java/com/epmet/service/impl/ProjectServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 f4b8aa9907..c3c4976c79 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 @@ -730,7 +730,7 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Sun, 9 Oct 2022 11:14:09 +0800 Subject: [PATCH 029/125] =?UTF-8?q?=E4=B8=8A=E9=93=BE=E5=A4=B1=E8=B4=A5war?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/ProjectServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 c3c4976c79..ffb61404ea 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 @@ -2385,7 +2385,7 @@ public class ProjectServiceImpl extends BaseServiceImpl(), null); } catch (Exception e) { String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); - log.error("【项目流转】上链失败,错误信息:{}", errorMsg); + log.warn("【项目流转】上链失败,错误信息:{}", errorMsg); } } From c2c445beb4bc58d2c9a76ce7a9f78c1bf147ce41 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 9 Oct 2022 11:22:36 +0800 Subject: [PATCH 030/125] transferV2 --- .../epmet/service/impl/ProjectProcessServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 b8b01aa5b9..4ab41b17a6 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 @@ -725,7 +725,8 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl Date: Sun, 9 Oct 2022 12:08:59 +0800 Subject: [PATCH 031/125] /trace/return-v2 warn --- .../java/com/epmet/service/impl/ProjectServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ffb61404ea..ede20937fc 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 @@ -2241,7 +2241,7 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Sun, 9 Oct 2022 16:16:35 +0800 Subject: [PATCH 032/125] =?UTF-8?q?OPERATION=5FTYPE,OPERATION=5Fid,?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IcEventDTO.java | 4 ++-- .../src/main/java/com/epmet/entity/IcEventEntity.java | 4 ++-- .../main/resources/db/migration/V0.0.27__icevent_to_issue.sql | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.27__icevent_to_issue.sql 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 3b14fc3266..3be3954934 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 @@ -103,12 +103,12 @@ public class IcEventDTO implements Serializable { private Date closeCaseTime; /** - * 0:已回复 1:已转项目 1:已转需求 + * 0:已回复 1:已转项目 2:已转需求3:转议题 */ private String operationType; /** - * 项目、需求ID + * 项目、需求ID、议题id */ private String operationId; 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 ce8d9bdd6a..db740ced18 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,12 +102,12 @@ public class IcEventEntity extends BaseEpmetEntity { private Date closeCaseTime; /** - * 0:已回复 1:已转项目 2:已转需求 + * 0:已回复 1:已转项目 2:已转需求3:转议题 */ private String operationType; /** - * 项目、需求ID + * 项目、需求ID、议题id */ private String operationId; diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.27__icevent_to_issue.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.27__icevent_to_issue.sql new file mode 100644 index 0000000000..2d539f2729 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.27__icevent_to_issue.sql @@ -0,0 +1,2 @@ +ALTER TABLE ic_event MODIFY COLUMN `OPERATION_TYPE` CHAR ( 1 ) DEFAULT NULL COMMENT '0:已回复 1:已转项目 2:已转需求3:转议题'; +ALTER TABLE ic_event MODIFY COLUMN `OPERATION_ID` VARCHAR ( 32 ) DEFAULT NULL COMMENT '项目、需求ID、议题id'; \ No newline at end of file From 5bb22c85217aec7188148af6edc9fd1dd64d0fe7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 9 Oct 2022 17:30:38 +0800 Subject: [PATCH 033/125] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E8=BD=AC=E8=AE=AE?= =?UTF-8?q?=E9=A2=98=E5=8D=95=E7=8B=AC=E7=9A=84api=EF=BC=8C=E6=9C=AA?= =?UTF-8?q?=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/IcEventToIssueFormDTO.java | 58 ++++++++++++++++++ .../epmet/controller/IcEventController.java | 15 +++++ .../com/epmet/dao/IcEventCategoryDao.java | 1 + .../java/com/epmet/entity/IcEventEntity.java | 6 +- .../entity/IcEventOperationLogEntity.java | 1 + .../epmet/service/IcEventCategoryService.java | 2 + .../com/epmet/service/IcEventService.java | 5 ++ .../impl/IcEventCategoryServiceImpl.java | 8 ++- .../service/impl/IcEventServiceImpl.java | 60 ++++++++++++++++++- .../resources/mapper/IcEventCategoryDao.xml | 4 +- 10 files changed, 153 insertions(+), 7 deletions(-) create mode 100644 epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToIssueFormDTO.java diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToIssueFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToIssueFormDTO.java new file mode 100644 index 0000000000..2bfbce4810 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToIssueFormDTO.java @@ -0,0 +1,58 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author yzm + * @Date 2022/10/9 16:46 + */ +@Data +public class IcEventToIssueFormDTO implements Serializable { + private static final long serialVersionUID = -7227815962561508949L; + + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + /** + * 转议题默认传3即可;0:已回复 1:已转项目 2:已转需求3:转议题 + */ + @NotBlank(message = "处理方式不能为空", groups = {IcEventToIssueFormDTO.AddUserInternalGroup.class}) + private String operationType; + + @NotBlank(message = "事件id不能为空", groups = IcEventToIssueFormDTO.AddUserInternalGroup.class) + private String icEventId; + + // /** + // * 二类分类Id + // */ + // private String categoryId; + + /** + * 项目所选分类集合,不可为空 + */ + @Valid + @NotEmpty(message = "事件分类不能为空", groups = IcEventToIssueFormDTO.AddUserShowGroup.class) + private List categoryList; + + @NotBlank(message = "议题标题不能为空", groups = IcEventToIssueFormDTO.AddUserShowGroup.class) + private String issueTitle; + @NotBlank(message = "处理建议不能为空", groups = IcEventToIssueFormDTO.AddUserShowGroup.class) + private String suggestion; + + @NotBlank(message = "customerId不能为空", groups = {IcEventToIssueFormDTO.AddUserInternalGroup.class}) + private String customerId; + @NotBlank(message = "currentUserId不能为空", groups = {IcEventToIssueFormDTO.AddUserInternalGroup.class}) + private String currentUserId; +} + 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 5105ca27bf..3b667b222c 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 @@ -242,6 +242,21 @@ public class IcEventController { return new Result(); } + /** + * 事件转议题 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping("icEventToIssue") + public Result icEventToIssue(@LoginUser TokenDto tokenDto, @RequestBody IcEventToIssueFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setCurrentUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, IcEventToIssueFormDTO.AddUserShowGroup.class, IcEventToIssueFormDTO.AddUserInternalGroup.class); + icEventService.icEventToIssue(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 e8829fda7a..6c96758c64 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 @@ -16,4 +16,5 @@ public interface IcEventCategoryDao extends BaseDao { IcEventCategoryEntity selectByEventId(@Param("icEventId") String icEventId); + int deleteByIcEventId(@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 db740ced18..81c5635aaf 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 @@ -61,9 +61,9 @@ public class IcEventEntity extends BaseEpmetEntity { */ private String idCard; - /** - * 反映渠道【字典表】 - */ + /** + * 反映渠道【字典表】dictTypeKey:ic_event_source_type;随手拍随时讲0、多媒体反应1、社区电话2、12345:3、网格员手持终端:4 + */ private String sourceType; /** 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 209d70d4f3..d41ff83514 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 @@ -48,6 +48,7 @@ public class IcEventOperationLogEntity extends BaseEpmetEntity { * 4、转需求:shift_demand * 5、办结:close_case; * 6、需求办结:close_demand + * 转议题:shift_to_issue */ private String actionCode; 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 90c9fd9524..4ebabf00b8 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 @@ -82,4 +82,6 @@ public interface IcEventCategoryService extends BaseService categoryEntities); } \ 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 40a9f2e55d..ede1854804 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 @@ -225,4 +225,9 @@ public interface IcEventService extends BaseService { PageData icEventPageUserReported(PageUserReportEventFormDTO formDTO); + /** + * 事件转议题 + * @param formDTO + */ + void icEventToIssue(IcEventToIssueFormDTO formDTO); } 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 c1d4d6fac9..bc12413641 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 @@ -1,6 +1,5 @@ package com.epmet.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -86,4 +85,11 @@ public class IcEventCategoryServiceImpl extends BaseServiceImpl categoryEntities) { + baseDao.deleteByIcEventId(icEventId); + this.insertBatch(categoryEntities); + } + } \ 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 dda3a90647..d032ddc0fe 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 @@ -379,8 +379,8 @@ public class IcEventServiceImpl extends BaseServiceImpl resultDTOResult = govIssueOpenFeignClient.getCategoryTagList(categoryTag); - if (!resultDTOResult.success()) { - throw new RenException("项目立项,调用issue服务查询分类、标签基础信息失败"); + if (!resultDTOResult.success() || CollectionUtils.isEmpty(resultDTOResult.getData().getCategoryList())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "调用issue服务查询分类基础信息失败", "分类信息查询异常"); } return resultDTOResult.getData(); } @@ -1672,4 +1672,60 @@ public class IcEventServiceImpl extends BaseServiceImpl(pageInfo.getList(), pageInfo.getTotal()); } + /** + * 事件转议题 + * + * @param formDTO + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void icEventToIssue(IcEventToIssueFormDTO formDTO) { + //校验下数据 + IcEventEntity icEventEntity=baseDao.selectById(formDTO.getIcEventId()); + if (null == icEventEntity || !"processing".equals(icEventEntity.getStatus())) { + log.error(String.format("事件不存在icEventId:%s",formDTO.getIcEventId())); + return; + } + //查询分类信息 + List categoryIdList = formDTO.getCategoryList().stream().map(CategoryOrTagFormDTO::getId).collect(Collectors.toList()); + CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryIdList); + Date nowTime = new Date(); + //转议题 + // todo + //校验通过之后..... + //1、修改事件 + icEventEntity.setOperationType(formDTO.getOperationType()); + icEventEntity.setOperationId("xxxxxtodo"); + if("0".equals(icEventEntity.getSourceType())){ + //来源于随手拍的,居民端需要显示红点 + icEventEntity.setRedDot(NumConstant.ONE); + } + icEventEntity.setLatestOperatedTime(nowTime); + icEventEntity.setUpdatedTime(nowTime); + baseDao.updateById(icEventEntity); + //2、ic_event_category + //分类全删全增吧 + List categoryEntities=new ArrayList<>(); + for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ + IcEventCategoryEntity icEventCategoryEntity=new IcEventCategoryEntity(); + icEventCategoryEntity.setCustomerId(formDTO.getCustomerId()); + icEventCategoryEntity.setIcEventId(formDTO.getIcEventId()); + icEventCategoryEntity.setCategoryId(ca.getId()); + icEventCategoryEntity.setCategoryPids(ca.getPids()); + icEventCategoryEntity.setCategoryCode(ca.getCategoryCode()); + categoryEntities.add(icEventCategoryEntity); + } + icEventCategoryService.delInsert(formDTO.getIcEventId(),categoryEntities); + //3、ic_event_operation_log + IcEventOperationLogEntity logEntity = new IcEventOperationLogEntity(); + logEntity.setCustomerId(formDTO.getCustomerId()); + logEntity.setIcEventId(formDTO.getIcEventId()); + logEntity.setUserId(formDTO.getCurrentUserId()); + logEntity.setUserIdentity("staff"); + logEntity.setActionCode("shift_to_issue"); + logEntity.setActionDesc("转议题"); + logEntity.setOperateTime(nowTime); + icEventOperationLogService.insert(logEntity); + } + } 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 afb3965750..62ac857408 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 @@ -17,5 +17,7 @@ del_flag = '0' AND ic_event_id = #{icEventId} - + + delete from ic_event_category where ic_event_id = #{icEventId} + \ No newline at end of file From 66ee7a5d501484447055ed70814ac50d6bfbd664 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 10 Oct 2022 09:21:38 +0800 Subject: [PATCH 034/125] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E6=9A=82=E6=8F=90?= =?UTF-8?q?=E4=B8=80=E6=B3=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/AllIssueListFormDTO.java | 26 +++++++++ .../com/epmet/dto/form/AuditListFormDTO.java | 31 +++++++++++ .../dto/result/AllIssueListResultDTO.java | 55 +++++++++++++++++++ .../epmet/dto/result/AuditListResultDTO.java | 39 +++++++++++++ .../controller/IssueAuditController.java | 22 ++++++-- .../com/epmet/controller/IssueController.java | 17 ++++++ .../src/main/java/com/epmet/dao/IssueDao.java | 2 + .../service/IssueApplicationService.java | 4 ++ .../java/com/epmet/service/IssueService.java | 9 +++ .../impl/IssueApplicationServiceImpl.java | 7 +++ .../epmet/service/impl/IssueServiceImpl.java | 29 ++++++++++ .../src/main/resources/mapper/IssueDao.xml | 39 +++++++++++++ 12 files changed, 276 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AllIssueListFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AuditListFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AllIssueListFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AllIssueListFormDTO.java new file mode 100644 index 0000000000..619ae8baad --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AllIssueListFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/10/9 16:52 + * @DESC + */ +@Data +public class AllIssueListFormDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = -9150357859854770833L; + + private String startTime; + private String endTime; + private String issueStatus; + private String issueTitle; + private String orgId; + private String orgType; + private String customerId; + private String userId; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AuditListFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AuditListFormDTO.java new file mode 100644 index 0000000000..0fefeb06d2 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AuditListFormDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/10/9 17:07 + * @DESC + */ +@Data +public class AuditListFormDTO extends PageFormDTO implements Serializable { + + private static final long serialVersionUID = 5924913199706972596L; + + private String startTime; + private String endTime; + private String issueTitle; + private String orgId; + private String orgType; + + /** + * under_auditing:待审核;rejected:驳回; + */ + private String applyStatus; + + private String customerId; + private String userId; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java new file mode 100644 index 0000000000..7c01ab375a --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java @@ -0,0 +1,55 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/10/9 16:49 + * @DESC + */ +@Data +public class AllIssueListResultDTO implements Serializable { + + private static final long serialVersionUID = -3447913619727610107L; + + /** + * 所属网格 + */ + private String gridName; + private String gridId; + private String orgId; + + /** + * 议题标题 + */ + private String issueTitle; + + /** + * 议题建议 + */ + private String suggestion; + + /** + * 议题创建时间 + */ + private String createdTime; + + /** + * 支持数 + */ + private Integer supportCount; + + /** + * 反对数 + */ + private Integer oppositionCount; + + /** + * 议题状态 + */ + private String issueStatus; + private String issueStatusName; + private String issueId; +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java new file mode 100644 index 0000000000..26a3ac0edd --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java @@ -0,0 +1,39 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/10/9 17:04 + * @DESC + */ +@Data +public class AuditListResultDTO implements Serializable { + + private static final long serialVersionUID = -9143726703244316997L; + + + /** + * 所属网格 + */ + private String gridName; + + /** + * 议题标题 + */ + private String issueTitle; + + /** + * 议题建议 + */ + private String suggestion; + + private String applyStatus; + private String applyStatusName; + + private String applyTime; + + private String issueApplicationId; +} diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java index 8317eb8ab0..adde0e0bd4 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java @@ -2,16 +2,15 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.RequirePermission; +import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.enums.RequirePermissionEnum; +import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.IssueConstant; import com.epmet.dto.form.*; -import com.epmet.dto.result.ApplicationDetailWorkResultDTO; -import com.epmet.dto.result.ApplicationHistoryResDTO; -import com.epmet.dto.result.ApplicationHistoryWorkResultDTO; -import com.epmet.dto.result.IssueApplicationResDTO; +import com.epmet.dto.result.*; import com.epmet.service.IssueApplicationHistoryService; import com.epmet.service.IssueApplicationService; import com.epmet.service.IssueService; @@ -130,4 +129,19 @@ public class IssueAuditController { public Result audit(@LoginUser TokenDto token, @RequestBody IssueAuditionFormDTO param){ return new Result().ok(issueService.audit(token,param)); } + + /** + * Desc: 审核列表 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2022/10/9 17:11 + */ + @PostMapping("auditList") + public Result> auditList(@RequestBody AuditListFormDTO formDTO, @LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + return new Result>().ok(issueApplicationService.auditList(formDTO)); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index f27113c3e8..96946b1223 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -1,6 +1,8 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -365,5 +367,20 @@ public class IssueController { } return new Result>().ok(issueService.getIssueProfile(issueIds)); } + + /** + * Desc: 查询所有议题 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2022/10/9 16:59 + */ + @PostMapping("allIssueList") + public Result> allIssueList(@RequestBody AllIssueListFormDTO formDTO, @LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + return new Result>().ok(issueService.allIssueList(formDTO)); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java index 24811e442e..ce3dc28a1c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java @@ -314,4 +314,6 @@ public interface IssueDao extends BaseDao { * @return */ List selectIssueProfile(@Param("issueIds") List issueIds); + + List allIssueList(AllIssueListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java index aecc10b0b5..e51bec4d6b 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java @@ -20,8 +20,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IssueApplicationDTO; +import com.epmet.dto.form.AuditListFormDTO; import com.epmet.dto.form.IssueAppQueryFormDTO; import com.epmet.dto.form.UserPubAuditingIssueFormDTO; +import com.epmet.dto.result.AuditListResultDTO; import com.epmet.dto.result.IssueApplicationResDTO; import com.epmet.dto.result.UserPubAuditingIssueResDTO; import com.epmet.entity.IssueApplicationEntity; @@ -150,4 +152,6 @@ public interface IssueApplicationService extends BaseService notIssueToTopicIds(List topicIdList); + + PageData auditList(AuditListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index 39ffbca330..b2fbe9a227 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -13,6 +13,7 @@ import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; +import com.github.pagehelper.Page; import java.util.List; import java.util.Map; @@ -399,4 +400,12 @@ public interface IssueService extends BaseService { * @return */ List getIssueProfile(List issueIds); + + /** + * Desc: 查询所有议题 + * @param formDTO + * @author zxc + * @date 2022/10/9 16:58 + */ + PageData allIssueList(AllIssueListFormDTO formDTO); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java index 074b7bcd39..e69bbba811 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java @@ -25,8 +25,10 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IssueApplicationDao; import com.epmet.dto.IssueApplicationDTO; +import com.epmet.dto.form.AuditListFormDTO; import com.epmet.dto.form.IssueAppQueryFormDTO; import com.epmet.dto.form.UserPubAuditingIssueFormDTO; +import com.epmet.dto.result.AuditListResultDTO; import com.epmet.dto.result.IssueApplicationResDTO; import com.epmet.dto.result.UserPubAuditingIssueResDTO; import com.epmet.entity.IssueApplicationEntity; @@ -186,4 +188,9 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl auditList(AuditListFormDTO formDTO) { + return null; + } + } 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 53f86de42b..9bc48a612d 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 @@ -1955,4 +1955,33 @@ public class IssueServiceImpl extends BaseServiceImpl imp } return baseDao.selectIssueProfile(issueIds); } + + /** + * Desc: 查询所有议题 + * @param formDTO + * @author zxc + * @date 2022/10/9 16:58 + */ + @Override + public PageData allIssueList(AllIssueListFormDTO formDTO) { + if (org.apache.commons.lang3.StringUtils.isBlank(formDTO.getOrgId())){ + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo){ + throw new EpmetException("查询工作人员信息失败:"+formDTO.getUserId()); + } + formDTO.setOrgId(staffInfo.getAgencyId()); + formDTO.setOrgType(ModuleConstants.ISSUE_PROCESS_ORG_TYPE_AGENCY); + } + PageData result = new PageData<>(new ArrayList(),NumConstant.ZERO_L); + if (formDTO.getIsPage()){ + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.allIssueList(formDTO)); + result.setList(pageInfo.getList()); + result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); + }else { + List allIssueListResultDTOS = baseDao.allIssueList(formDTO); + result.setList(allIssueListResultDTOS); + result.setTotal(allIssueListResultDTOS.size()); + } + return result; + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index 8f9c25afe3..c802a6244a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -872,4 +872,43 @@ i.ID = #{issueId} + + + \ No newline at end of file From a8e09f7cbbcadbc323f0e29ba2cd7d059e2ade58 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 10 Oct 2022 09:36:44 +0800 Subject: [PATCH 035/125] ai --- .../src/main/resources/mapper/IssueDao.xml | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index c802a6244a..06f323277a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -876,18 +876,22 @@ \ No newline at end of file From 8ffec63243c0880689a887b98edfd727509bdff6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 10 Oct 2022 10:38:09 +0800 Subject: [PATCH 037/125] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E8=BD=AC=E8=AE=AE?= =?UTF-8?q?=E9=A2=981?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/IssueDTO.java | 2 +- .../epmet/dto/form/PublishIssueFormDTO.java | 122 ++++++++++++++++++ .../epmet/feign/GovIssueOpenFeignClient.java | 8 ++ .../GovIssueOpenFeignClientFallBack.java | 11 +- .../com/epmet/controller/IssueController.java | 11 ++ .../java/com/epmet/entity/IssueEntity.java | 2 +- .../java/com/epmet/service/IssueService.java | 8 ++ .../epmet/service/impl/IssueServiceImpl.java | 45 +++++++ .../db/migration/V0.0.19__issue_source.sql | 1 + .../service/impl/IcEventServiceImpl.java | 34 ++++- .../migration/V0.0.27__icevent_to_issue.sql | 6 +- 11 files changed, 240 insertions(+), 10 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/PublishIssueFormDTO.java create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.19__issue_source.sql diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java index 93d5602612..487ca68aee 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java @@ -49,7 +49,7 @@ public class IssueDTO implements Serializable { private String issueStatus; /** - * 来源类型 话题:resi_topic;直接立议题:issue; + * 来源类型 话题:resi_topic;直接立议题:issue;事件:ic_event */ private String sourceType; diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/PublishIssueFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/PublishIssueFormDTO.java new file mode 100644 index 0000000000..36fd0866d3 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/PublishIssueFormDTO.java @@ -0,0 +1,122 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; + +/** + * @Description + * @Author yzm + * @Date 2022/10/10 9:32 + */ +@Data +public class PublishIssueFormDTO implements Serializable { + private static final long serialVersionUID = 1713711343683095564L; + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + /** + * 议题状态 表决中:voting 已转项目:shift_project 已关闭:closed + */ + @NotBlank(message = "议题状态不能为空", groups = AddUserShowGroup.class) + private String issueStatus; + + /** + * 来源类型 话题:resi_topic;直接立议题:issue;事件:ic_event + */ + @NotBlank(message = "议题来源不能为空", groups = AddUserShowGroup.class) + private String sourceType; + + /** + * 来源ID eg:2223232(当SOURCE_TYPE为"resi_topic"时,这里指话题的ID) + */ + private String sourceId; + + /** + * 议题名称 最多20字 + */ + @NotBlank(message = "issueTitle不能为空", groups = AddUserShowGroup.class) + private String issueTitle; + + /** + * 建议 最多1000字 + */ + @NotBlank(message = "suggestion不能为空", groups = AddUserShowGroup.class) + private String suggestion; + + /** + * 客户ID + */ + @NotBlank(message = "customerId不能为空", groups = AddUserShowGroup.class) + private String customerId; + + /** + * 网格ID 居民端议题对应一个网格Id + */ + @NotBlank(message = "gridId不能为空", groups = AddUserShowGroup.class) + private String gridId; + + /** + * 所属机关 【数据权限-非必填】11:22:33(agencyId)数据权限控制 + */ + @NotBlank(message = "", groups = AddUserShowGroup.class) + private String orgIdPath; + + /** + * 组织ID 【数据权限-非必填】agencyId + */ + @NotBlank(message = "", groups = AddUserShowGroup.class) + private String orgId; + + /** + * 表决发起日期(转议题日期) + */ + @NotBlank(message = "表决发起日期(转议题日期)不能为空", groups = AddUserShowGroup.class) + private Date decidedTime; + + /** + * 地址 + */ + @NotBlank(message = "address不能为空", groups = AddUserShowGroup.class) + private String address; + + /** + * 经度 + */ + @NotBlank(message = "经度不能为空", groups = AddUserShowGroup.class) + private String longitude; + + /** + * 纬度 + */ + @NotBlank(message = "纬度不能为空", groups = AddUserShowGroup.class) + private String latitude; + + /** + * 创建人 + */ + @NotBlank(message = "议题发起人(createdBy)不能为空", groups = AddUserShowGroup.class) + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + private String eventReportUserName; +} + 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 5b79e535ac..c0310ac6a0 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 @@ -403,4 +403,12 @@ public interface GovIssueOpenFeignClient { */ @PostMapping("/gov/issue/issue/getIssueProfile") Result> getIssueProfile(@RequestBody List issueIds); + + /** + * 事件转议题 + * @param issueFormDTO + * @return + */ + @PostMapping("/gov/issue/issue/publishIssue") + Result publishIssue(@RequestBody PublishIssueFormDTO issueFormDTO); } 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 5f81cd7501..8037939a4c 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 @@ -343,5 +343,14 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getIssueProfile", issueIds); } - + /** + * 事件转议题 + * + * @param issueFormDTO + * @return + */ + @Override + public Result publishIssue(PublishIssueFormDTO issueFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "publishIssue", issueFormDTO); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index f27113c3e8..e9d7d0dca3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -365,5 +365,16 @@ public class IssueController { } return new Result>().ok(issueService.getIssueProfile(issueIds)); } + /** + * 发布议题 + * 事件转议题 + * @param issueFormDTO + * @return + */ + @PostMapping("publishIssue") + public Result publishIssue(@RequestBody PublishIssueFormDTO issueFormDTO) { + ValidatorUtils.validateEntity(issueFormDTO, PublishIssueFormDTO.AddUserShowGroup.class); + return new Result().ok(issueService.publishIssue(issueFormDTO)); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java index 90a04596fb..7f47f3cfa1 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java @@ -43,7 +43,7 @@ public class IssueEntity extends BaseEpmetEntity { private String issueStatus; /** - * 来源类型 话题:resi_topic;直接立议题:issue; + * 来源类型 话题:resi_topic;直接立议题:issue;事件:ic_event */ private String sourceType; diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index 39ffbca330..57b6414dab 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -399,4 +399,12 @@ public interface IssueService extends BaseService { * @return */ List getIssueProfile(List issueIds); + + /** + * 发布议题 + * 事件转议题 + * @param issueFormDTO + * @return + */ + IssueDTO publishIssue(PublishIssueFormDTO issueFormDTO); } 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 53f86de42b..5dbdcff32c 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 @@ -1955,4 +1955,49 @@ public class IssueServiceImpl extends BaseServiceImpl imp } return baseDao.selectIssueProfile(issueIds); } + + /** + * 发布议题 + * 事件转议题 + * + * @param issueFormDTO + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public IssueDTO publishIssue(PublishIssueFormDTO issueFormDTO) { + // 事件转议题,是由工作端无需审核 + IssueEntity issueEntity = ConvertUtils.sourceToTarget(issueFormDTO, IssueEntity.class); + baseDao.insert(issueEntity); + + IssueProcessEntity issueProcessEntity = new IssueProcessEntity(); + issueProcessEntity.setIssueId(issueEntity.getId()); + issueProcessEntity.setIssueStatus(issueEntity.getIssueStatus()); + issueProcessEntity.setOrgType(ModuleConstants.ISSUE_PROCESS_ORG_TYPE_AGENCY); + CustomerStaffInfoCacheResult staffInfo=CustomerStaffRedis.getStaffInfo(issueFormDTO.getCustomerId(),issueFormDTO.getCreatedBy()); + issueProcessEntity.setOrgId(staffInfo.getAgencyId()); + issueProcessEntity.setOperationExplain(String.format("【%s】发表的事件被【%s】转为议题", issueFormDTO.getEventReportUserName(), staffInfo.getAgencyName())); + issueProcessEntity.setOrgName(staffInfo.getAgencyName()); + issueProcessEntity.setCustomerId(issueFormDTO.getCustomerId()); + issueProcessService.insert(issueProcessEntity); + + //查询网格的所属居民数 + AllResiByGridFormDTO allResiByGridFormDTO=new AllResiByGridFormDTO(); + allResiByGridFormDTO.setGridId(issueEntity.getGridId()); + Result regUserTotalRes=userOpenFeignClient.getAllResiByGrid(allResiByGridFormDTO); + //3.新增议题表决统计表 + IssueVoteStatisticalDTO voteStatistical = new IssueVoteStatisticalDTO(); + voteStatistical.setIssueId(issueEntity.getId()); + //应表决数,该网格下所有的居民 + voteStatistical.setVotableCount(regUserTotalRes.success() ? regUserTotalRes.getData() : NumConstant.ZERO); + issueVoteStatisticalService.save(voteStatistical); + VoteRedisFormDTO voteInitCache = new VoteRedisFormDTO(); + voteInitCache.setIssueId(issueEntity.getId()); + voteInitCache.setShouldVoteCount(regUserTotalRes.success() ? regUserTotalRes.getData() : NumConstant.ZERO); + issueVoteDetailRedis.set(voteInitCache); + + IssueDTO issueDTO = ConvertUtils.sourceToTarget(issueEntity, IssueDTO.class); + issueDTO.setIssueId(issueEntity.getId()); + return issueDTO; + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.19__issue_source.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.19__issue_source.sql new file mode 100644 index 0000000000..ac49a686de --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.19__issue_source.sql @@ -0,0 +1 @@ +alter table issue MODIFY COLUMN `SOURCE_TYPE` varchar(32) DEFAULT NULL COMMENT '来源类型 话题:resi_topic;直接立议题:issue;事件: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 d032ddc0fe..8ca9e087dd 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,5 +1,6 @@ package com.epmet.service.impl; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -1690,12 +1691,33 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryIdList = formDTO.getCategoryList().stream().map(CategoryOrTagFormDTO::getId).collect(Collectors.toList()); CategoryTagResultDTO category = queryCategory(formDTO.getCustomerId(), categoryIdList); Date nowTime = new Date(); - //转议题 - // todo + //调用issue服务转议题 + PublishIssueFormDTO issueFormDTO=new PublishIssueFormDTO(); + issueFormDTO.setIssueStatus("voting"); + issueFormDTO.setAddress(icEventEntity.getAddress()); + issueFormDTO.setLatitude(icEventEntity.getLatitude()); + issueFormDTO.setLongitude(icEventEntity.getLongitude()); + issueFormDTO.setIssueTitle(formDTO.getIssueTitle()); + issueFormDTO.setSuggestion(formDTO.getSuggestion()); + issueFormDTO.setGridId(icEventEntity.getGridId()); + issueFormDTO.setOrgId(icEventEntity.getAgencyId()); + issueFormDTO.setOrgIdPath(icEventEntity.getGridPids()); + issueFormDTO.setSourceType("ic_event"); + issueFormDTO.setSourceId(icEventEntity.getId()); + issueFormDTO.setCreatedBy(formDTO.getCurrentUserId()); + issueFormDTO.setUpdatedBy(formDTO.getCurrentUserId()); + issueFormDTO.setCreatedTime(nowTime); + issueFormDTO.setUpdatedTime(nowTime); + issueFormDTO.setDecidedTime(nowTime); + issueFormDTO.setEventReportUserName(icEventEntity.getName()); + Result issueRes=govIssueOpenFeignClient.publishIssue(issueFormDTO); + if (!issueRes.success() || null == issueRes.getData()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件转议题异常,返参:" + JSON.toJSONString(issueRes), "事件转议题异常"); + } //校验通过之后..... - //1、修改事件 + //1、修改事件相关信息 icEventEntity.setOperationType(formDTO.getOperationType()); - icEventEntity.setOperationId("xxxxxtodo"); + icEventEntity.setOperationId(issueRes.getData().getIssueId()); if("0".equals(icEventEntity.getSourceType())){ //来源于随手拍的,居民端需要显示红点 icEventEntity.setRedDot(NumConstant.ONE); @@ -1703,7 +1725,7 @@ public class IcEventServiceImpl extends BaseServiceImpl categoryEntities=new ArrayList<>(); for (IssueProjectCategoryDictDTO ca : category.getCategoryList()){ @@ -1716,7 +1738,7 @@ public class IcEventServiceImpl extends BaseServiceImpl已读;工作人员待处理=>处理中;转议题:shift_to_issue'; From 76302314de4d0ff497432df837720fe225bb165b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 10 Oct 2022 10:47:43 +0800 Subject: [PATCH 038/125] =?UTF-8?q?=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/govissue/IssueApplicationDTO.java | 2 + .../govissue/IssueApplicationEntity.java | 3 ++ .../com/epmet/dto/IssueApplicationDTO.java | 2 + .../com/epmet/dao/IssueApplicationDao.java | 4 ++ .../epmet/entity/IssueApplicationEntity.java | 3 ++ .../epmet/service/impl/IssueServiceImpl.java | 9 +++- .../V0.0.19__alter_issue_application.sql | 2 + .../resources/mapper/IssueApplicationDao.xml | 41 +++++++++++++++++++ 8 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.19__alter_issue_application.sql diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueApplicationDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueApplicationDTO.java index 4565baf59c..a6a7f8f18c 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueApplicationDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueApplicationDTO.java @@ -73,6 +73,8 @@ public class IssueApplicationDTO implements Serializable { * 网格ID 居民端议题对应一个网格Id */ private String gridId; + private String orgId; + private String orgIdPath; /** * 审核通过后对应的 议题id diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govissue/IssueApplicationEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govissue/IssueApplicationEntity.java index 1e6671bfa7..ff45b8a88c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govissue/IssueApplicationEntity.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govissue/IssueApplicationEntity.java @@ -70,6 +70,9 @@ public class IssueApplicationEntity extends BaseEpmetEntity { */ private String gridId; + private String orgId; + private String orgIdPath; + /** * 审核通过后对应的 议题id */ diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueApplicationDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueApplicationDTO.java index 69185b4280..1138c33c7b 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueApplicationDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueApplicationDTO.java @@ -73,6 +73,8 @@ public class IssueApplicationDTO implements Serializable { * 网格ID 居民端议题对应一个网格Id */ private String gridId; + private String orgId; + private String orgIdPath; /** * 审核通过后对应的 议题id diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java index 33296076b6..5218d9a1e3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java @@ -19,8 +19,10 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IssueApplicationDTO; +import com.epmet.dto.form.AuditListFormDTO; import com.epmet.dto.form.IssueAppQueryFormDTO; import com.epmet.dto.form.UserPubAuditingIssueFormDTO; +import com.epmet.dto.result.AuditListResultDTO; import com.epmet.dto.result.IssueApplicationResDTO; import com.epmet.dto.result.UserPubAuditingIssueResDTO; import com.epmet.entity.IssueApplicationEntity; @@ -74,4 +76,6 @@ public interface IssueApplicationDao extends BaseDao { */ List selectTopicIdList(@Param("topicIdList") List topicIdList); + List auditList(AuditListFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueApplicationEntity.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueApplicationEntity.java index fb2d141926..f61f5e6917 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueApplicationEntity.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueApplicationEntity.java @@ -70,6 +70,9 @@ public class IssueApplicationEntity extends BaseEpmetEntity { */ private String gridId; + private String orgId; + private String orgIdPath; + /** * 审核通过后对应的 议题id */ 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 89a9a04222..315894265d 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 @@ -379,8 +379,11 @@ public class IssueServiceImpl extends BaseServiceImpl imp result.setAuditSwitch(ifOpen ? ModuleConstants.AUDIT_SWITCH_OPEN : ModuleConstants.AUDIT_SWITCH_CLOSE); //2.居民端组长提交议题审核 - - //默认打开 + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(param.getGridId()); + if (null == gridInfo){ + throw new EpmetException("查询网格信息失败:"+param.getGridId()); + } + //默认打开 //2.1查询是否存在application记录 Map applicationParam = new HashMap<>(); applicationParam.put(ModuleConstants.FIELD_JAVA_TOPIC_ID, param.getTopicId()); @@ -393,6 +396,8 @@ public class IssueServiceImpl extends BaseServiceImpl imp if(ifOpen) { //首次提交 新增application IssueApplicationDTO newApplication = ConvertUtils.sourceToTarget(param, IssueApplicationDTO.class); + newApplication.setOrgId(gridInfo.getPid()); + newApplication.setOrgIdPath(gridInfo.getPids()); newApplication.setApplyStatus(defaultStatusUnderAuditing); newApplication.setId(UUID.randomUUID().toString().replace("-", "")); applicationService.save(newApplication); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.19__alter_issue_application.sql b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.19__alter_issue_application.sql new file mode 100644 index 0000000000..256b0ab6b6 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.19__alter_issue_application.sql @@ -0,0 +1,2 @@ +alter table issue_application add COLUMN ORG_ID VARCHAR(64) DEFAULT'' COMMENT '组织ID' AFTER GRID_ID; +alter table issue_application add COLUMN ORG_ID_PATH VARCHAR(1024) DEFAULT'' COMMENT '组织ID全路径,包括ORG_ID' AFTER ORG_ID; \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml index 2820a43019..dca932e4e0 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml @@ -86,4 +86,45 @@ + + + \ No newline at end of file From 3338d6544cdff96ea78f77ef9bc5ebf3ec12ea20 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 10 Oct 2022 10:47:58 +0800 Subject: [PATCH 039/125] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/result/IcEventListResultDTO.java | 6 +++--- .../src/main/resources/mapper/IcEventDao.xml | 9 ++++++++- 2 files changed, 11 insertions(+), 4 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 beac1277a0..349db1d45c 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 @@ -117,15 +117,15 @@ public class IcEventListResultDTO implements Serializable { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date closeCaseTime; /** - * 0:已回复 1:已转项目 1:已转需求 + * 0:已回复 1:已转项目 2:已转需求3:转议题 */ private String operationType; /** - * 0:已回复 1:已转项目 1:已转需求 + * 0:已回复 1:已转项目 2:已转需求3:转议题 */ private String operationTypeName; /** - * 项目、需求ID + * 项目、需求ID、议题id */ private String operationId; /** 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 dd94828eb2..f1602eb237 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 @@ -169,7 +169,14 @@ 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, + ( + case when ie.operation_type = '0' then '已回复' + when ie.operation_type = '1' then '已转项目' + when ie.operation_type = '2' then '已转需求' + when ie.operation_type = '3' then '已转议题' + else '' + end + )as operationTypeName ie.operation_id, ie.read_flag, ie.red_dot, From 5b2ffda7e6166102f89629e205447da0ea63883c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 10 Oct 2022 11:05:54 +0800 Subject: [PATCH 040/125] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E5=A4=84=E7=90=86?= =?UTF-8?q?=E8=BF=9B=E5=B1=95=E8=B0=83=E6=95=B4=EF=BC=9B=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=A4=84=E7=90=86=E8=BF=9B=E5=B1=95=E6=9C=AA=E5=AE=8C=E5=BE=85?= =?UTF-8?q?=E7=BB=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/feign/GovIssueOpenFeignClient.java | 8 +++++ .../GovIssueOpenFeignClientFallBack.java | 11 +++++++ .../controller/IssueManageController.java | 1 + .../service/impl/IssueProcessServiceImpl.java | 14 ++++----- .../service/impl/IcEventServiceImpl.java | 31 ++++++++++++------- 5 files changed, 46 insertions(+), 19 deletions(-) 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 c0310ac6a0..2d65ee9126 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 @@ -411,4 +411,12 @@ public interface GovIssueOpenFeignClient { */ @PostMapping("/gov/issue/issue/publishIssue") Result publishIssue(@RequestBody PublishIssueFormDTO issueFormDTO); + + /** + * 议题处理进展,这个接口小程序也在用,服务之间也在用 + * @param issueId + * @return + */ + @PostMapping("/gov/issue/manage/progress") + Result> queryIssueProcess(@RequestBody IssueIdFormDTO issueId); } 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 8037939a4c..fee75badad 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 @@ -353,4 +353,15 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result publishIssue(PublishIssueFormDTO issueFormDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "publishIssue", issueFormDTO); } + + /** + * 议题处理进展,这个接口小程序也在用,服务之间也在用 + * + * @param formDTO + * @return + */ + @Override + public Result> queryIssueProcess(IssueIdFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "processList", formDTO); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java index aa9c671e6d..3d0ca597c0 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java @@ -201,6 +201,7 @@ public class IssueManageController { @PostMapping("progress") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) public Result> processList(@RequestBody IssueIdFormDTO issueId){ + ValidatorUtils.validateEntity(issueId); return new Result>().ok(issueProcessService.processList(issueId)); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java index 5e47cc5a4a..6d33f38258 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java @@ -155,16 +155,14 @@ public class IssueProcessServiceImpl extends BaseServiceImpl(); + } + //转议题信息 + ProcessListResultDTO issueProcessResultDTO = issueProcessDao.issueBeginInfo(issueId); + if (null != issueProcessResultDTO) { + listResult.add(issueProcessResultDTO); } return listResult; } 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 8ca9e087dd..bcf82b4bf9 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 @@ -1202,29 +1202,38 @@ public class IcEventServiceImpl extends BaseServiceImpl event = icEventReplyService.getByEventId(formDTO.getIcEventId()); - + // operationType 0:已回复 1:已转项目 2:已转需求3:转议题 //3.判断查询事件项目进展或需求进展信息 - //项目进展 if ("1".equals(entity.getOperationType())) { + // 项目进展 ProcessListV2FormDTO processListV2FormDTO = new ProcessListV2FormDTO(); processListV2FormDTO.setProjectId(entity.getOperationId()); List project = projectTraceService.processListV2(processListV2FormDTO); List projectList = ConvertUtils.sourceToTarget(project, IcEventProcessListResultDTO.class); - projectList.forEach(p->p.setType("project")); + projectList.forEach(p -> p.setType("project")); resultList.addAll(projectList); - } - //需求进展 - if ("2".equals(entity.getOperationType())) { + } else if ("2".equals(entity.getOperationType())) { + // 需求进展 LinkedList demand = icEventOperationLogService.getByEventId(formDTO.getIcEventId()); resultList.addAll(demand); + } else if ("3".equals(entity.getOperationType())) { + // 议题处理进展 + IssueIdFormDTO issueIdFormDTO = new IssueIdFormDTO(); + issueIdFormDTO.setIssueId(entity.getOperationId()); + Result> issueProcessRes = govIssueOpenFeignClient.queryIssueProcess(issueIdFormDTO); + if(!issueProcessRes.success()||CollectionUtils.isEmpty(issueProcessRes.getData())){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件已转议题,议题处理进展查询异常", "事件已转议题,议题处理进展查询异常"); + } + // todo + + } + //最后拼上回复的 + //2.查询事件回复信息 + LinkedList event = icEventReplyService.getByEventId(formDTO.getIcEventId()); resultList.addAll(event); - return resultList; } From 4e0b7d4373f98634680d860e30915045398026d5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 10 Oct 2022 11:13:40 +0800 Subject: [PATCH 041/125] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=A1=A5=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IssueAuditController.java | 11 ++++++ .../com/epmet/dao/IssueApplicationDao.java | 4 +++ .../service/IssueApplicationService.java | 2 ++ .../impl/IssueApplicationServiceImpl.java | 34 +++++++++++++++++++ .../resources/mapper/IssueApplicationDao.xml | 26 ++++++++++++++ 5 files changed, 77 insertions(+) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java index adde0e0bd4..0a9d0a4304 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java @@ -144,4 +144,15 @@ public class IssueAuditController { formDTO.setUserId(tokenDto.getUserId()); return new Result>().ok(issueApplicationService.auditList(formDTO)); } + + /** + * Desc: 补全议题审核表历史数据 + * @param + * @author zxc + * @date 2022/10/10 10:55 + */ + public Result initIssueApplicationHistoryData(){ + issueApplicationService.initIssueApplicationHistoryData(); + return new Result(); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java index 5218d9a1e3..a1d2c89468 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java @@ -78,4 +78,8 @@ public interface IssueApplicationDao extends BaseDao { List auditList(AuditListFormDTO formDTO); + List initIssueApplicationHistoryData(); + + void updateIssueApplication(List list); + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java index e51bec4d6b..023bb20a0e 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java @@ -154,4 +154,6 @@ public interface IssueApplicationService extends BaseService notIssueToTopicIds(List topicIdList); PageData auditList(AuditListFormDTO formDTO); + + void initIssueApplicationHistoryData(); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java index e69bbba811..24806fd924 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java @@ -21,7 +21,11 @@ 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.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetException; 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.dao.IssueApplicationDao; import com.epmet.dto.IssueApplicationDTO; @@ -41,6 +45,8 @@ import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO; import com.epmet.service.IssueApplicationService; import com.epmet.utils.ModuleConstants; import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -193,4 +199,32 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl pageInfo = PageHelper.startPage(no, NumConstant.ONE_HUNDRED).doSelectPageInfo(() -> baseDao.initIssueApplicationHistoryData()); + List list = pageInfo.getList(); + size = list.size(); + if (CollectionUtils.isNotEmpty(list)){ + list.forEach(l -> { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(l.getGridId()); + if (null == gridInfo){ + throw new EpmetException("查询网格信息失败:"+l.getGridId()); + } + l.setOrgId(gridInfo.getPid()); + l.setOrgIdPath(gridInfo.getPids()); + }); + updateIssueApplication(list); + } + no++; + }while (size.compareTo(NumConstant.ONE_HUNDRED) == NumConstant.ZERO); + } + + @Transactional(rollbackFor = Exception.class) + public void updateIssueApplication(List list){ + baseDao.updateIssueApplication(list); + } + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml index dca932e4e0..c205c2004f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml @@ -2,6 +2,28 @@ + + UPDATE issue_application + + + + when ID = #{i.ID} then #{orgId} + + + + + when ID = #{i.ID} then #{ORG_ID_PATH} + + + updated_time = now() + where 1=1 + + + ID = #{i.ID} + + + + + + \ No newline at end of file From c80419517b3b22cc3abf423f4eeb206bf726081d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 10 Oct 2022 11:22:05 +0800 Subject: [PATCH 042/125] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=90=86?= =?UTF-8?q?=E8=BF=9B=E5=B1=95=E8=B0=83=E6=95=B4=EF=BC=9A=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?+=E4=BA=8B=E4=BB=B6=E5=9B=9E=E5=A4=8D=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E8=BF=9B=E5=B1=95+=E4=BA=8B=E4=BB=B6=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E3=80=81=E8=AE=AE=E9=A2=98=E8=BF=9B=E5=B1=95=EF=BC=88?= =?UTF-8?q?=E5=90=AB=E9=A1=B9=E7=9B=AE=EF=BC=89+=E4=BA=8B=E4=BB=B6?= =?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/service/impl/IcEventServiceImpl.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 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 bcf82b4bf9..189811df46 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 @@ -1205,7 +1205,7 @@ public class IcEventServiceImpl extends BaseServiceImpl event = icEventReplyService.getByEventId(formDTO.getIcEventId()); resultList.addAll(event); return resultList; From fe09f4c88ebe61c325954fc5bf71dcefb11236a4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 10 Oct 2022 13:11:47 +0800 Subject: [PATCH 043/125] =?UTF-8?q?=E3=80=90%s=E3=80=91=E5=8F=91=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E4=BA=8B=E4=BB=B6=E8=A2=AB=E3=80=90%s=E3=80=91?= =?UTF-8?q?=E8=BD=AC=E4=B8=BA=E8=AE=AE=E9=A2=98=E3=80=90%s=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/IssueServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 315894265d..1e39c91726 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 @@ -2019,7 +2019,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp issueProcessEntity.setOrgType(ModuleConstants.ISSUE_PROCESS_ORG_TYPE_AGENCY); CustomerStaffInfoCacheResult staffInfo=CustomerStaffRedis.getStaffInfo(issueFormDTO.getCustomerId(),issueFormDTO.getCreatedBy()); issueProcessEntity.setOrgId(staffInfo.getAgencyId()); - issueProcessEntity.setOperationExplain(String.format("【%s】发表的事件被【%s】转为议题", issueFormDTO.getEventReportUserName(), staffInfo.getAgencyName())); + issueProcessEntity.setOperationExplain(String.format("【%s】发表的事件被【%s】转为议题【%s】", issueFormDTO.getEventReportUserName(), staffInfo.getAgencyName(), issueEntity.getIssueTitle())); issueProcessEntity.setOrgName(staffInfo.getAgencyName()); issueProcessEntity.setCustomerId(issueFormDTO.getCustomerId()); issueProcessService.insert(issueProcessEntity); From 32238d6977615bbb57af68cfcea3372ec28b7db4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 10 Oct 2022 13:18:35 +0800 Subject: [PATCH 044/125] operationTypeName, --- .../java/com/epmet/controller/IcEventController.java | 12 ++++++++++++ .../src/main/resources/mapper/IcEventDao.xml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) 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 3b667b222c..f905215a44 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 @@ -59,6 +59,12 @@ public class IcEventController { @Autowired private IcEventReplyService icEventReplyService; + /** + * 事件管理-列表 + * @param tokenDto + * @param formDTO + * @return + */ @RequestMapping("list") public Result> list(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); @@ -83,6 +89,12 @@ public class IcEventController { return new Result().ok(data); } + /** + * 事件管理-新增 + * @param tokenDto + * @param formDTO + * @return + */ @NoRepeatSubmit @PostMapping("add") public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcEventAddEditFormDTO formDTO){ 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 f1602eb237..8f2e8049ba 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 @@ -176,7 +176,7 @@ when ie.operation_type = '3' then '已转议题' else '' end - )as operationTypeName + )as operationTypeName, ie.operation_id, ie.read_flag, ie.red_dot, From c88865c88d6f5343a5401c55cb9316912a29676b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 10 Oct 2022 13:21:40 +0800 Subject: [PATCH 045/125] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=A1=A5=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/IssueAuditController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java index 0a9d0a4304..87dfa6027c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java @@ -151,6 +151,7 @@ public class IssueAuditController { * @author zxc * @date 2022/10/10 10:55 */ + @PostMapping("initIssueApplicationHistoryData") public Result initIssueApplicationHistoryData(){ issueApplicationService.initIssueApplicationHistoryData(); return new Result(); From 2dfb87e3ada412309fc8e09b77e4607d1b34a311 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 10 Oct 2022 13:41:55 +0800 Subject: [PATCH 046/125] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=A1=A5=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IssueApplicationServiceImpl.java | 9 ++++++--- .../src/main/resources/mapper/IssueApplicationDao.xml | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java index 24806fd924..1dc8212e67 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java @@ -46,6 +46,7 @@ import com.epmet.service.IssueApplicationService; import com.epmet.utils.ModuleConstants; 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.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -62,6 +63,7 @@ import java.util.Map; * @since v1.0.0 2020-11-17 */ @Service +@Slf4j public class IssueApplicationServiceImpl extends BaseServiceImpl implements IssueApplicationService { @Override @@ -208,14 +210,15 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl list = pageInfo.getList(); size = list.size(); if (CollectionUtils.isNotEmpty(list)){ - list.forEach(l -> { + for (IssueApplicationDTO l : list) { GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(l.getGridId()); if (null == gridInfo){ - throw new EpmetException("查询网格信息失败:"+l.getGridId()); + log.warn("查询网格信息失败:"+l.getGridId()); + continue; } l.setOrgId(gridInfo.getPid()); l.setOrgIdPath(gridInfo.getPids()); - }); + } updateIssueApplication(list); } no++; diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml index c205c2004f..293d28f383 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml @@ -7,19 +7,19 @@ - when ID = #{i.ID} then #{orgId} + when ID = #{i.id} then #{i.orgId} - when ID = #{i.ID} then #{ORG_ID_PATH} + when ID = #{i.id} then #{i.orgIdPath} updated_time = now() where 1=1 - ID = #{i.ID} + ID = #{i.id} From af0653a296c33224a6e849a4fdd4a7ec2096a854 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 10 Oct 2022 14:08:37 +0800 Subject: [PATCH 047/125] =?UTF-8?q?=E5=BE=85=E5=AE=A1=E6=A0=B8=20=E9=A9=B3?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/AuditListResultDTO.java | 2 ++ .../com/epmet/dao/IssueApplicationDao.java | 18 ++++++++++ .../impl/IssueApplicationServiceImpl.java | 33 ++++++++++++++++++- .../resources/mapper/IssueApplicationDao.xml | 19 ++++++----- 4 files changed, 63 insertions(+), 9 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java index 26a3ac0edd..5878ca9864 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java @@ -19,6 +19,8 @@ public class AuditListResultDTO implements Serializable { * 所属网格 */ private String gridName; + private String gridId; + private String orgId; /** * 议题标题 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java index a1d2c89468..4f2ede6325 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java @@ -76,10 +76,28 @@ public interface IssueApplicationDao extends BaseDao { */ List selectTopicIdList(@Param("topicIdList") List topicIdList); + /** + * Desc: 待审核,驳回列表 + * @param formDTO + * @author zxc + * @date 2022/10/10 13:42 + */ List auditList(AuditListFormDTO formDTO); + /** + * Desc: 补全数据 + * @param + * @author zxc + * @date 2022/10/10 13:42 + */ List initIssueApplicationHistoryData(); + /** + * Desc: 批量更新议题审核组织信息 + * @param list + * @author zxc + * @date 2022/10/10 13:42 + */ void updateIssueApplication(List list); } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java index 1dc8212e67..a37a1aad89 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java @@ -22,9 +22,11 @@ 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.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetException; 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.utils.ConvertUtils; import com.epmet.dao.IssueApplicationDao; @@ -32,6 +34,7 @@ import com.epmet.dto.IssueApplicationDTO; import com.epmet.dto.form.AuditListFormDTO; import com.epmet.dto.form.IssueAppQueryFormDTO; import com.epmet.dto.form.UserPubAuditingIssueFormDTO; +import com.epmet.dto.result.AllIssueListResultDTO; import com.epmet.dto.result.AuditListResultDTO; import com.epmet.dto.result.IssueApplicationResDTO; import com.epmet.dto.result.UserPubAuditingIssueResDTO; @@ -52,6 +55,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -198,7 +202,34 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl auditList(AuditListFormDTO formDTO) { - return null; + if (StringUtils.isBlank(formDTO.getOrgId())){ + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); + if (null == staffInfo){ + throw new EpmetException("查询工作人员信息失败:"+formDTO.getUserId()); + } + formDTO.setOrgId(staffInfo.getAgencyId()); + formDTO.setOrgType(ModuleConstants.ISSUE_PROCESS_ORG_TYPE_AGENCY); + } + PageData result = new PageData<>(new ArrayList(),NumConstant.ZERO_L); + if (formDTO.getIsPage()){ + PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.auditList(formDTO)); + result.setList(pageInfo.getList()); + result.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); + }else { + List auditListResultDTOS = baseDao.auditList(formDTO); + result.setList(auditListResultDTOS); + result.setTotal(auditListResultDTOS.size()); + } + if (CollectionUtils.isNotEmpty(result.getList())){ + result.getList().forEach(l -> { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(l.getGridId()); + if(null == gridInfo){ + throw new EpmetException("查询网格信息失败:"+l.getGridId()); + } + l.setGridName(gridInfo.getGridNamePath()); + }); + } + return result; } @Override diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml index 293d28f383..64541d95c6 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml @@ -112,31 +112,34 @@ SELECT i.id as issueId, - i.source_id AS topicId, + ( + case when i.SOURCE_TYPE='resi_topic'then i.source_id + else '' + end + )as topicId, + i.source_id, i.issue_title AS issueTitle, i.issue_status AS issueStatus, i.suggestion AS issueSuggestion, 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 abddc4c099..3fba9bf715 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 @@ -472,7 +472,7 @@ public class IcEventServiceImpl extends BaseServiceImpl wrapper = new QueryWrapper<>(); wrapper.eq(FieldConstant.DEL_FLAG,NumConstant.ZERO_STR); diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 1b46ac9e40..0a3f0af97f 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -94,7 +94,7 @@ public class IssueServiceImpl implements IssueService { TopicInfoFormDTO topicInfoFormDTO = new TopicInfoFormDTO(); topicInfoFormDTO.setTopicId(issueResult.getTopicId()); TopicInfoDTO topicInfoDTOResult = new TopicInfoDTO(); - if (!StringUtils.isBlank(issueResult.getTopicId())) { + if (!StringUtils.isBlank(issueResult.getTopicId())&&"resi_topic".equals(issueResult.getSourceType())) { topicInfoDTOResult = resiGroupFeignClient.selectDetail(topicInfoFormDTO).getData(); issueDetailResult.setTopicInfo(topicInfoDTOResult == null ? new TopicInfoDTO() : topicInfoDTOResult); } From 19bbd97c6520d49d7197c831c3c7218b6737f552 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 12 Oct 2022 13:05:00 +0800 Subject: [PATCH 096/125] =?UTF-8?q?/gov/issue/issuesharelink/createurl?= =?UTF-8?q?=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IssueShareLinkRecordServiceImpl.java | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueShareLinkRecordServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueShareLinkRecordServiceImpl.java index 687ce57e47..2c02be5f3c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueShareLinkRecordServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueShareLinkRecordServiceImpl.java @@ -9,10 +9,11 @@ import com.epmet.commons.tools.exception.RenException; 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.utils.SpringContextUtils; import com.epmet.constant.IssueShareConstant; import com.epmet.dao.IssueShareLinkRecordDao; import com.epmet.dao.IssueShareLinkVisitRecordDao; +import com.epmet.dto.IssueDTO; import com.epmet.dto.IssueShareLinkRecordDTO; import com.epmet.dto.form.IssueCreateUrlFormDTO; import com.epmet.dto.form.IssueVisitFormDTO; @@ -20,9 +21,8 @@ import com.epmet.dto.result.IssueCreateUrlResultDTO; import com.epmet.dto.result.IssueVisitResultDTO; import com.epmet.entity.IssueShareLinkRecordEntity; import com.epmet.entity.IssueShareLinkVisitRecordEntity; -import com.epmet.resi.group.dto.topic.form.TopicBelongGroupFormDTO; -import com.epmet.resi.group.dto.topic.result.TopicBelongGroupResultDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; +import com.epmet.service.IssueService; import com.epmet.service.IssueShareLinkRecordService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -118,19 +118,24 @@ public class IssueShareLinkRecordServiceImpl extends BaseServiceImpl topicInfo = resiGroupOpenFeignClient.selectTopicBelongGroup(topicBelongGroupFormDTO); - if (!topicInfo.success()){ - throw new RenException(IssueShareConstant.TOPIC_BELONG_GROUP_FAILURE); - } + IssueDTO issueEntity= SpringContextUtils.getBean(IssueService.class).get(formDTO.getIssueId()); + //并改成兼容,发现不需要查询话题的网格id, 索性注释了吧 + /*if("resi_topic".equals(issueEntity.getSourceType())){ + TopicBelongGroupFormDTO topicBelongGroupFormDTO = new TopicBelongGroupFormDTO(); + topicBelongGroupFormDTO.setTopicId(issueInfo.getTopicId()); + // 查询议题来源所属小组【话题所属小组】 + Result topicInfo = resiGroupOpenFeignClient.selectTopicBelongGroup(topicBelongGroupFormDTO); + if (!topicInfo.success()){ + throw new RenException(IssueShareConstant.TOPIC_BELONG_GROUP_FAILURE); + } + if (StringUtils.isBlank(topicInfo.getData().getGridId())){ + throw new RenException(IssueShareConstant.TOPIC_BELONG_GROUP_NULL); + } + }*/ IssueShareLinkRecordEntity entity = new IssueShareLinkRecordEntity(); entity.setCustomerId(issueInfo.getCustomerId()); - if (StringUtils.isBlank(topicInfo.getData().getGridId())){ - throw new RenException(IssueShareConstant.TOPIC_BELONG_GROUP_NULL); - } - entity.setGridId(topicInfo.getData().getGridId()); + // entity.setGridId(topicInfo.getData().getGridId());//注释原因同上 + entity.setGridId(issueEntity.getGridId()); entity.setIssueId(formDTO.getIssueId()); entity.setShareUserId(tokenDto.getUserId()); entity.setInviteContent(null); From fddde233d68d7e686f3fae26c5452b430768e735 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 12 Oct 2022 13:17:35 +0800 Subject: [PATCH 097/125] =?UTF-8?q?/resi/hall/issue/detail=E8=BF=98?= =?UTF-8?q?=E5=BE=97=E8=BF=94=E5=9B=9EtopicInfo=EF=BC=8C=E5=90=A6=E5=88=99?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=8A=A0=E8=BD=BD=E4=B8=8D=E5=87=BA?= =?UTF-8?q?=E6=9D=A5=E8=AF=A6=E6=83=85=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/IssueServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 0a3f0af97f..6c61788c10 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -96,8 +96,8 @@ public class IssueServiceImpl implements IssueService { TopicInfoDTO topicInfoDTOResult = new TopicInfoDTO(); if (!StringUtils.isBlank(issueResult.getTopicId())&&"resi_topic".equals(issueResult.getSourceType())) { topicInfoDTOResult = resiGroupFeignClient.selectDetail(topicInfoFormDTO).getData(); - issueDetailResult.setTopicInfo(topicInfoDTOResult == null ? new TopicInfoDTO() : topicInfoDTOResult); } + issueDetailResult.setTopicInfo(topicInfoDTOResult == null ? new TopicInfoDTO() : topicInfoDTOResult); if (null != topicInfoDTOResult && "branch".equals(topicInfoDTOResult.getGroupType())) {//支部小组话题发起人显示真实姓名 List userIdList = new ArrayList<>(); From 053cde14fd4fb3106a0fd0b9acd4c446e30af1af Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 12 Oct 2022 13:23:57 +0800 Subject: [PATCH 098/125] /resi/group/topic/topicattachmentlist --- .../epmet/modules/topic/controller/ResiTopicController.java | 2 +- .../epmet/modules/topic/service/impl/ResiTopicServiceImpl.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java index fb2ef52238..f1b5c1d79a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java @@ -419,7 +419,7 @@ public class ResiTopicController { **/ @PostMapping(value = "topicattachmentlist") public Result topicAttachmentList(@RequestBody TopicAttachmentFormDTO formDTO){ - ValidatorUtils.validateEntity(formDTO, TopicAttachmentFormDTO.TopicForm.class); + // ValidatorUtils.validateEntity(formDTO, TopicAttachmentFormDTO.TopicForm.class);//暂时不校验了,service里判断 return new Result().ok(topicService.topicAttachmentList(formDTO)); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index 65d7082753..ff564c7f01 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -2439,6 +2439,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl list = resiTopicAttachmentDao.selectTopicAttachmentList(formDTO.getTopicId()); From 775a8ab4058cb0ec20668bf14332c31c1b93f9ed Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 12 Oct 2022 13:30:33 +0800 Subject: [PATCH 099/125] /gov/issue/issuecategory/categorytaglist --- .../com/epmet/dto/form/IssueCategoryTagListFormDTO.java | 3 ++- .../java/com/epmet/controller/IssueCategoryController.java | 3 ++- .../src/main/java/com/epmet/dao/IssueCategoryDao.java | 2 +- .../com/epmet/service/impl/IssueCategoryServiceImpl.java | 2 +- .../src/main/resources/mapper/IssueCategoryDao.xml | 7 ++++++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueCategoryTagListFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueCategoryTagListFormDTO.java index d9339a0e97..3c2caa5909 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueCategoryTagListFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueCategoryTagListFormDTO.java @@ -15,7 +15,8 @@ public class IssueCategoryTagListFormDTO implements Serializable { private static final long serialVersionUID = 2599592072265715951L; @NotBlank(message = "议题ID不能为空",groups = {ProjectCategoryTagListFormDTO.CategoryTag.class}) private String issueId; - + @NotBlank(message = "customerId不能为空",groups = {ProjectCategoryTagListFormDTO.CategoryTag.class}) + private String customerId; public interface CategoryTag{} } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java index 6f459a71ad..6df8e177c3 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java @@ -106,7 +106,8 @@ public class IssueCategoryController { * @Author sun **/ @PostMapping("categorytaglist") - public Result categoryTagList(@RequestBody IssueCategoryTagListFormDTO formDTO) { + public Result categoryTagList(@LoginUser TokenDto tokenDto,@RequestBody IssueCategoryTagListFormDTO formDTO) { + formDTO.setCustomerId(tokenDto.getCustomerId()); ValidatorUtils.validateEntity(formDTO, IssueCategoryTagListFormDTO.CategoryTag.class); return new Result().ok(issueCategoryService.categoryTagList(formDTO)); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java index 650e4ac227..42fb7ca9bf 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java @@ -42,7 +42,7 @@ public interface IssueCategoryDao extends BaseDao { * @Description 查询议题绑定的分类名称,按排序升序 * @Author sun **/ - List selectIssueCategoryList(@Param("issueId") String issueId); + List selectIssueCategoryList(@Param("customerId")String customerId,@Param("issueId") String issueId); /** * @param formDTO diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java index 6953874ade..2fda58fd28 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java @@ -128,7 +128,7 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl categoryList = baseDao.selectIssueCategoryList(formDTO.getIssueId()); + List categoryList = baseDao.selectIssueCategoryList(formDTO.getCustomerId(),formDTO.getIssueId()); if (categoryList.size() > NumConstant.ZERO) { resultDTO.setCategoryList(categoryList); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml index 078661e2a1..4a8deef951 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml @@ -16,7 +16,12 @@ a.sort AS "sort", CONCAT(b.category_name, '-', a.category_name) AS "category_name" FROM issue_project_category_dict a - INNER JOIN issue_project_category_dict b ON a.pid = b.id + INNER JOIN issue_project_category_dict b + ON (a.pid = b.id + and a.CUSTOMER_ID = #{customerId} + and b.CUSTOMER_ID = #{customerId} + and a.CUSTOMER_ID=b.CUSTOMER_ID + ) ) ip ON ic.category_id = ip.idd AND ic.customer_id = ip.customer_id WHERE From 7ad46b3a6e9593776669d47eb295c1e1fc03e9ea Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 12 Oct 2022 13:37:56 +0800 Subject: [PATCH 100/125] selectDetail --- .../modules/topic/service/impl/ResiTopicServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index ff564c7f01..c6b009199c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -1533,8 +1533,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl wrapper = new QueryWrapper<>(); From a75494313118488ece1ad912c3f15ea9a6584c3b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 12 Oct 2022 13:46:26 +0800 Subject: [PATCH 101/125] =?UTF-8?q?/resi/group/topic/topicattachmentlist?= =?UTF-8?q?=E8=BF=94=E5=9B=9Enull=E4=B8=8D=E8=A1=8C=EF=BC=8C=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E4=B8=8D=E5=87=BA=E6=9D=A5=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/modules/topic/service/impl/ResiTopicServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index c6b009199c..024681d256 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -2440,7 +2440,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl Date: Wed, 12 Oct 2022 14:25:19 +0800 Subject: [PATCH 102/125] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=A1=A8=E5=86=B3=E4=B8=AD=E7=9A=84=E8=AE=AE=E9=A2=98=E8=A1=A8?= =?UTF-8?q?=E5=86=B3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/result/AllIssueListResultDTO.java | 4 ++++ .../com/epmet/service/impl/IssueServiceImpl.java | 14 ++++++++++++++ .../src/main/resources/mapper/IssueDao.xml | 6 ++++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java index 843b1e7a8b..0efcb2566a 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.Date; /** * @Author zxc @@ -57,4 +58,7 @@ public class AllIssueListResultDTO implements Serializable { * 来源类型 话题:resi_topic;直接立议题:issue;事件:ic_event */ private String sourceType; + + private Date decidedTime; + private Date votingDeadline; } 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 312f76cab2..43ca008b2f 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 @@ -83,10 +83,13 @@ import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; +import java.time.LocalDate; import java.util.*; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; +import static com.epmet.commons.tools.utils.DateUtils.DATE_PATTERN; + /** * @Author zxc * @CreateTime 2020/5/11 9:46 @@ -2068,6 +2071,17 @@ public class IssueServiceImpl extends BaseServiceImpl imp } if (CollectionUtils.isNotEmpty(result.getList())){ for (AllIssueListResultDTO l : result.getList()) { + if (l.getIssueStatus().equals(ModuleConstants.ISSUE_STATUS_VOTING)){ + String endDate = null == l.getVotingDeadline() ? + DateUtils.format(new Date(),DATE_PATTERN) : + DateUtils.format(l.getVotingDeadline(),DATE_PATTERN); + String today = LocalDate.now().toString(); + if (today.equals(endDate)){ + PolyLineDTO polyLineDTO = issueVoteDetailDao.polyLineData(l.getIssueId(), endDate); + l.setSupportCount(l.getSupportCount() + polyLineDTO.getSupportIncrement()); + l.setOppositionCount(l.getOppositionCount() + polyLineDTO.getOppositionIncrement()); + } + } GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(l.getGridId()); if(null == gridInfo){ logger.warn("查询网格信息失败:"+l.getGridId()); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index fb7e943e3a..8b572cfdb7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -894,8 +894,10 @@ i.ORG_ID, i.CREATED_TIME, i.suggestion, - vs.support_count, - vs.OPPOSITION_COUNT + ifnull(vs.support_count,0) AS supportCount, + ifnull(vs.OPPOSITION_COUNT,0) AS oppositionCount, + i.VOTING_DEADLINE, + i.DECIDED_TIME FROM issue i LEFT JOIN issue_vote_statistical vs ON vs.ISSUE_ID = i.ID AND vs.DEL_FLAG = '0' WHERE i.DEL_FLAG = '0' From 44e3362f56dc4ba03e02187e54e9b3f1439d0805 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 12 Oct 2022 14:40:36 +0800 Subject: [PATCH 103/125] =?UTF-8?q?return=E4=BA=86=E5=B0=B1=E4=B8=8D?= =?UTF-8?q?=E6=89=93=E5=8D=B0error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/topic/service/impl/ResiTopicServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index 024681d256..e3ebc257d2 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -2484,13 +2484,13 @@ public class ResiTopicServiceImpl extends BaseServiceImpl Date: Wed, 12 Oct 2022 15:03:56 +0800 Subject: [PATCH 104/125] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=93=E6=A1=88?= =?UTF-8?q?=EF=BC=8C=E6=9D=A5=E6=BA=90=E4=BA=8E=E4=BA=8B=E4=BB=B6-?= =?UTF-8?q?=E8=AE=AE=E9=A2=98-=E9=A1=B9=E7=9B=AE=E7=9A=84=EF=BC=8C?= =?UTF-8?q?=E5=9B=9E=E5=86=99=E4=BA=8B=E4=BB=B6=EF=BC=8Cbugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/entity/ProjectEntity.java | 7 +++++- .../service/impl/ProjectServiceImpl.java | 23 +++++++++++-------- 2 files changed, 20 insertions(+), 10 deletions(-) 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 b5199a8392..4d8163c9ae 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 @@ -48,7 +48,12 @@ public class ProjectEntity extends BaseEpmetEntity { private String gridId; /** - * 来源:议题issue 项目立项:agency + * 项目来源: + * 来源议题 issue + * 项目立项 agency + * 旧版事件上报 resi_event + * 工作人员上报(巡查) work_event + * 新版事件上报 ic_event */ private String origin; 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 80d682cdff..6f58da119d 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 @@ -879,22 +879,27 @@ public class ProjectServiceImpl extends BaseServiceImpl issueIds =new ArrayList<>(); + boolean icEventFlag = false; + String icEventId = ""; + if ("issue".equals(projectEntity.getOrigin())) { + List issueIds = new ArrayList<>(); issueIds.add(projectEntity.getOrigin()); - Result> issueRes=govIssueOpenFeignClient.getIssueProfile(issueIds); - if(issueRes.success()&&CollectionUtils.isNotEmpty(issueRes.getData())){ - if("ic_event".equals(issueRes.getData().get(NumConstant.ZERO).getIssueSourceType())){ - icEventFlag=true; + Result> issueRes = govIssueOpenFeignClient.getIssueProfile(issueIds); + if (issueRes.success() && CollectionUtils.isNotEmpty(issueRes.getData())) { + IssueProfileDTO issueProfileDTO = issueRes.getData().get(NumConstant.ZERO); + if ("ic_event".equals(issueProfileDTO.getIssueSourceType())) { + icEventFlag = true; + icEventId = issueProfileDTO.getSourceId(); } } + } else if ("ic_event".equals(projectEntity.getOrigin())) { + icEventId = projectEntity.getOriginId(); } - if ("ic_event".equals(projectEntity.getOrigin())||icEventFlag) { + if ("ic_event".equals(projectEntity.getOrigin()) || icEventFlag) { ColseProjectOrDemandFormDTO dto = new ColseProjectOrDemandFormDTO(); dto.setCustomerId(projectEntity.getCustomerId()); dto.setUserId(projectEntity.getUpdatedBy()); - dto.setIcEventId(projectEntity.getOriginId()); + dto.setIcEventId(icEventId); dto.setType("project"); dto.setCloseCaseTime(closeCaseTime); icEventService.closeProjectOrDemand(dto); From 02b03545dc9aabcef0543e86a57e23a382b8131e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 12 Oct 2022 16:03:42 +0800 Subject: [PATCH 105/125] =?UTF-8?q?api/resi/hall/issue/detail=E8=BF=94?= =?UTF-8?q?=E5=9B=9EsourceId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/ProjectController.java | 5 +++++ .../com/epmet/service/ProjectService.java | 3 +++ .../service/impl/ProjectServiceImpl.java | 19 ++++++++++--------- .../dto/result/IssueDetailResultDTO.java | 2 ++ .../com/epmet/dto/result/IssueResultDTO.java | 2 ++ 5 files changed, 22 insertions(+), 9 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 6968e62398..4330ea21a7 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 @@ -451,4 +451,9 @@ public class ProjectController { } } + @PostMapping("test-close/{projectId}") + public Result testClose(@LoginUser TokenDto tokenDto,@PathVariable("projectId")String projectId){ + projectService.modifyIcEvent(null,tokenDto.getUserId(),new Date(),projectId); + return new Result(); + } } \ 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 33a42bb28f..f588edc374 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 @@ -11,6 +11,7 @@ import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.Date; import java.util.List; import java.util.Map; @@ -405,4 +406,6 @@ public interface ProjectService extends BaseService { * @return */ Integer deleteByOriginId(String originId, String origin); + + void modifyIcEvent(ProjectEntity projectEntity, String userId, Date closeCaseTime, String 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 6f58da119d..82f79d586f 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 @@ -864,7 +864,7 @@ public class ProjectServiceImpl extends BaseServiceImpl issueIds = new ArrayList<>(); - issueIds.add(projectEntity.getOrigin()); + issueIds.add(projectEntity1.getOrigin()); Result> issueRes = govIssueOpenFeignClient.getIssueProfile(issueIds); if (issueRes.success() && CollectionUtils.isNotEmpty(issueRes.getData())) { IssueProfileDTO issueProfileDTO = issueRes.getData().get(NumConstant.ZERO); @@ -892,13 +893,13 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Wed, 12 Oct 2022 16:30:10 +0800 Subject: [PATCH 106/125] =?UTF-8?q?=E7=9C=BC=E7=9E=8E=E4=BA=86=E3=80=82ori?= =?UTF-8?q?ginId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/ProjectController.java | 7 +++++++ .../java/com/epmet/service/impl/ProjectServiceImpl.java | 6 ++++-- 2 files changed, 11 insertions(+), 2 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 4330ea21a7..101a735cfe 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 @@ -451,6 +451,13 @@ public class ProjectController { } } + /** + * 纯属为了测试.... + * 如果项目结案了,事件没有回写可以调用此方法 + * @param tokenDto + * @param projectId + * @return + */ @PostMapping("test-close/{projectId}") public Result testClose(@LoginUser TokenDto tokenDto,@PathVariable("projectId")String projectId){ projectService.modifyIcEvent(null,tokenDto.getUserId(),new Date(),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 82f79d586f..3b99956e6a 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 @@ -879,12 +879,14 @@ public class ProjectServiceImpl extends BaseServiceImpl issueIds = new ArrayList<>(); - issueIds.add(projectEntity1.getOrigin()); + issueIds.add(projectEntity1.getOriginId()); Result> issueRes = govIssueOpenFeignClient.getIssueProfile(issueIds); if (issueRes.success() && CollectionUtils.isNotEmpty(issueRes.getData())) { IssueProfileDTO issueProfileDTO = issueRes.getData().get(NumConstant.ZERO); From a727a1128265485ca64ddaa1b4d5bf0d932eecb0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 12 Oct 2022 16:33:03 +0800 Subject: [PATCH 107/125] projectEntity --- .../com/epmet/service/impl/ProjectServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 3b99956e6a..d4065a4be0 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 @@ -884,9 +884,9 @@ public class ProjectServiceImpl extends BaseServiceImpl issueIds = new ArrayList<>(); - issueIds.add(projectEntity1.getOriginId()); + issueIds.add(projectEntity.getOriginId()); Result> issueRes = govIssueOpenFeignClient.getIssueProfile(issueIds); if (issueRes.success() && CollectionUtils.isNotEmpty(issueRes.getData())) { IssueProfileDTO issueProfileDTO = issueRes.getData().get(NumConstant.ZERO); @@ -895,12 +895,12 @@ public class ProjectServiceImpl extends BaseServiceImpl Date: Wed, 12 Oct 2022 17:37:24 +0800 Subject: [PATCH 108/125] ai --- .../result/MyPubIssuesAuditingResultDTO.java | 2 + .../epmet/service/impl/IssueServiceImpl.java | 2 +- .../src/main/resources/mapper/IssueDao.xml | 1 + .../result/MyPubIssuesClosedResultDTO.java | 6 ++- .../MyPubIssuesShiftProjectResultDTO.java | 2 + .../person/service/impl/IssueServiceImpl.java | 40 ++++++++++++++----- 6 files changed, 41 insertions(+), 12 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPubIssuesAuditingResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPubIssuesAuditingResultDTO.java index 4af11fb3f2..e666b9b9cb 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPubIssuesAuditingResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPubIssuesAuditingResultDTO.java @@ -50,4 +50,6 @@ public class MyPubIssuesAuditingResultDTO implements Serializable { @JsonIgnore private String topicId; + private String sourceType; + } 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 43ca008b2f..22520d45be 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 @@ -1456,7 +1456,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp throw new RenException("查询议题来源网格名称失败......"); } list.forEach(l -> gridNameList.getData().stream().filter(o -> l.getGridId().equals(o.getGridId())).forEach(o -> l.setTopicReleaseGridName(o.getGridName()))); - Result> groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(list.stream().map(m -> m.getTopicId()).collect(Collectors.toList()))); + Result> groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(list.stream().filter(l -> l.getSourceType().equals(ModuleConstants.ISSUE_FROM_TOPIC)).map(m -> m.getTopicId()).collect(Collectors.toList()))); if (!groupNameList.success()){ throw new RenException("查询议题来源小组名称失败......"); } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index 8b572cfdb7..306a5c0204 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -514,6 +514,7 @@ i.SUGGESTION, i.ISSUE_TITLE, i.SOURCE_ID AS topicId, + i.SOURCE_TYPE AS sourceType, i.GRID_ID AS gridId, UNIX_TIMESTAMP(i.CREATED_TIME) AS shiftIssueTime FROM issue i diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesClosedResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesClosedResultDTO.java index 46c2c9ff02..71378156e9 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesClosedResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesClosedResultDTO.java @@ -17,6 +17,8 @@ public class MyPubIssuesClosedResultDTO implements Serializable { * 议题id */ private String issueId; + private String sourceId; + private String sourceType; /** * 议题标题 @@ -36,11 +38,11 @@ public class MyPubIssuesClosedResultDTO implements Serializable { /** * 话题发表于哪个组 */ - private String topicReleaseGroupName; + private String topicReleaseGroupName = ""; /** * 话题发表于哪个网格 */ - private String topicReleaseGridName; + private String topicReleaseGridName = ""; } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java index 8397d64b69..7931067f86 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java @@ -45,4 +45,6 @@ public class MyPubIssuesShiftProjectResultDTO implements Serializable { private String topicReleaseGroupName; private String issueId; + private String sourceId; + private String sourceType; } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java index f4fbf8f8ce..515c9a7b6b 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java @@ -188,11 +188,17 @@ public class IssueServiceImpl implements IssueService { } //查询话题来源小组名称 Result> groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(topicIds)); + if (!CollectionUtils.isEmpty(topicIds)){ + groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(topicIds)); + } if (!groupNameList.success()){ logger.error("查询议题来源小组名称失败......"); } //查询项目基本信息 - Result> projectRes=govProjectOpenFeignClient.queryProjectInfoByIds(projectIds); + Result> projectRes = new Result<>(); + if (!CollectionUtils.isEmpty(projectIds)){ + projectRes = govProjectOpenFeignClient.queryProjectInfoByIds(projectIds); + } if(!projectRes.success()){ logger.error("查询项目信息失败......"); } @@ -201,14 +207,21 @@ public class IssueServiceImpl implements IssueService { MyPubIssuesShiftProjectResultDTO resultDTO=new MyPubIssuesShiftProjectResultDTO(); resultDTO.setIssueId(issueDTO.getId()); resultDTO.setProjectId(issueDTO.getProjectId()); - gridNameList.getData().stream().filter(o -> issueDTO.getGridId().equals(o.getGridId())).forEach(o -> resultDTO.setTopicReleaseGridName(o.getGridName())); - groupNameList.getData().stream().filter(g -> issueDTO.getSourceId().equals(g.getTopicId())).forEach(g -> resultDTO.setTopicReleaseGroupName(g.getTopicGroupName())); + resultDTO.setSourceId(issueDTO.getSourceId()); + resultDTO.setSourceType(issueDTO.getSourceType()); + if (!CollectionUtils.isEmpty(gridNameList.getData())){ + gridNameList.getData().stream().filter(o -> issueDTO.getGridId().equals(o.getGridId())).forEach(o -> resultDTO.setTopicReleaseGridName(o.getGridName())); + } + if (!CollectionUtils.isEmpty(groupNameList.getData())){ + groupNameList.getData().stream().filter(g -> issueDTO.getSourceId().equals(g.getTopicId())).forEach(g -> resultDTO.setTopicReleaseGroupName(g.getTopicGroupName())); + } resultDTO.setShiftProjectTime(issueDTO.getShiftedTimeStamp()); - - projectRes.getData().stream().filter(p->issueDTO.getProjectId().equals(p.getId())).forEach(projectDTO -> resultDTO.setProjectTitle(projectDTO.getTitle())); - //当前处理部门名称列表 - projectRes.getData().stream().filter(p->issueDTO.getProjectId().equals(p.getId())).forEach(projectDTO -> resultDTO.setDepartmentNameList(projectDTO.getCurrentDepartmentNameList())); + if (!CollectionUtils.isEmpty(projectRes.getData())){ + projectRes.getData().stream().filter(p->issueDTO.getProjectId().equals(p.getId())).forEach(projectDTO -> resultDTO.setProjectTitle(projectDTO.getTitle())); + //当前处理部门名称列表 + projectRes.getData().stream().filter(p->issueDTO.getProjectId().equals(p.getId())).forEach(projectDTO -> resultDTO.setDepartmentNameList(projectDTO.getCurrentDepartmentNameList())); + } list.add(resultDTO); } return list; @@ -244,6 +257,9 @@ public class IssueServiceImpl implements IssueService { } //查询话题来源小组名称 Result> groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(topicIds)); + if (!CollectionUtils.isEmpty(topicIds)){ + groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(topicIds)); + } if (!groupNameList.success()){ logger.error("查询议题来源小组名称失败......"); } @@ -254,8 +270,14 @@ public class IssueServiceImpl implements IssueService { resultDTO.setIssueTitle(issueDTO.getIssueTitle()); resultDTO.setSuggestion(issueDTO.getSuggestion()); resultDTO.setClosedTime(issueDTO.getClosedTimeStamp()); - gridNameList.getData().stream().filter(o -> issueDTO.getGridId().equals(o.getGridId())).forEach(o -> resultDTO.setTopicReleaseGridName(o.getGridName())); - groupNameList.getData().stream().filter(g -> issueDTO.getSourceId().equals(g.getTopicId())).forEach(g -> resultDTO.setTopicReleaseGroupName(g.getTopicGroupName())); + resultDTO.setSourceId(issueDTO.getSourceId()); + resultDTO.setSourceType(issueDTO.getSourceType()); + if (!CollectionUtils.isEmpty(gridNameList.getData())){ + gridNameList.getData().stream().filter(o -> issueDTO.getGridId().equals(o.getGridId())).forEach(o -> resultDTO.setTopicReleaseGridName(o.getGridName())); + } + if (!CollectionUtils.isEmpty(groupNameList.getData())){ + groupNameList.getData().stream().filter(g -> issueDTO.getSourceId().equals(g.getTopicId())).forEach(g -> resultDTO.setTopicReleaseGroupName(g.getTopicGroupName())); + } resultDTOList.add(resultDTO); } return resultDTOList; From 14e8a8751872965a9d6f2228c7e44b40dce1f7a9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 12 Oct 2022 18:08:52 +0800 Subject: [PATCH 109/125] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=AB=AF=E6=88=91?= =?UTF-8?q?=E5=8F=91=E8=B5=B7=E7=9A=84=E8=AE=AE=E9=A2=98=EF=BC=9A/resi/gro?= =?UTF-8?q?up/groupissue/applicationdetail=20=E5=AE=A1=E6=A0=B8=E4=B8=AD?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=B0=B1=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/group/service/impl/GroupIssueServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java index 7d2b5fe87c..3ff103a039 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/GroupIssueServiceImpl.java @@ -73,7 +73,8 @@ public class GroupIssueServiceImpl implements GroupIssueService { List userIds = new ArrayList<>(); ApplicationDetailResultDTO data = result.getData(); userIds.add(data.getUserId()); - if (!applicationDetailFormDTO.getTopicIdIsNull()){ + //如果来源于话题 + if (StringUtils.isNotBlank(data.getTopicId())){ TopicInfoResultDTO topicInfoResultDTO = resiGroupDao.selectTopicInfo(data.getTopicId()); userIds.add(topicInfoResultDTO.getTopicUserId()); // 查询小组类别 From 2b271a638a3ced6340193f3f3a3408b708822f1d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 13 Oct 2022 09:04:22 +0800 Subject: [PATCH 110/125] =?UTF-8?q?=E8=A1=A8=E5=86=B3=E4=B8=AD=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/IssueServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 22520d45be..8be5461c75 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 @@ -1460,7 +1460,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp if (!groupNameList.success()){ throw new RenException("查询议题来源小组名称失败......"); } - list.forEach(l -> groupNameList.getData().stream().filter(g -> l.getTopicId().equals(g.getTopicId())).forEach(g -> l.setTopicReleaseGroupName(g.getTopicGroupName()))); + list.forEach(l -> groupNameList.getData().stream().filter(g -> org.apache.commons.lang3.StringUtils.isNotBlank(l.getTopicId()) && l.getTopicId().equals(g.getTopicId())).forEach(g -> l.setTopicReleaseGroupName(g.getTopicGroupName()))); } return list; } From b57e2dba80002f19ceb039fbaeb9e0da8a64370f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 13 Oct 2022 09:46:40 +0800 Subject: [PATCH 111/125] =?UTF-8?q?/resi/group/group/groupinfo+/resi/mine/?= =?UTF-8?q?issue/my-pub-issues/closed=E6=88=91=E5=8F=91=E8=B5=B7=E7=9A=84?= =?UTF-8?q?=E8=AE=AE=E9=A2=98=EF=BC=8C=E5=B7=B2=E5=85=B3=E9=97=AD=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/service/impl/ResiGroupServiceImpl.java | 3 +++ .../person/service/impl/IssueServiceImpl.java | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 493d176a07..72fbd03444 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -1272,6 +1272,9 @@ public class ResiGroupServiceImpl extends BaseServiceImpl selectGroupInfo(GroupInfoFormDTO groupInfoFormDTO) { + if(CollectionUtils.isEmpty(groupInfoFormDTO.getTopicIds())){ + return new ArrayList<>(); + } return baseDao.selectGroupInfo(groupInfoFormDTO.getTopicIds()); } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java index 515c9a7b6b..7dd49f2afc 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java @@ -256,12 +256,12 @@ public class IssueServiceImpl implements IssueService { logger.error("查询议题来源网格名称失败......"); } //查询话题来源小组名称 - Result> groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(topicIds)); + List groupInfoResultDTOS=new ArrayList<>(); if (!CollectionUtils.isEmpty(topicIds)){ - groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(topicIds)); - } - if (!groupNameList.success()){ - logger.error("查询议题来源小组名称失败......"); + Result> groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(topicIds)); + if (groupNameList.success()&&!CollectionUtils.isEmpty(groupNameList.getData())){ + groupInfoResultDTOS=groupNameList.getData(); + } } List resultDTOList=new ArrayList<>(); for(IssueDTO issueDTO:issueResult.getData()){ @@ -275,8 +275,8 @@ public class IssueServiceImpl implements IssueService { if (!CollectionUtils.isEmpty(gridNameList.getData())){ gridNameList.getData().stream().filter(o -> issueDTO.getGridId().equals(o.getGridId())).forEach(o -> resultDTO.setTopicReleaseGridName(o.getGridName())); } - if (!CollectionUtils.isEmpty(groupNameList.getData())){ - groupNameList.getData().stream().filter(g -> issueDTO.getSourceId().equals(g.getTopicId())).forEach(g -> resultDTO.setTopicReleaseGroupName(g.getTopicGroupName())); + if (!CollectionUtils.isEmpty(groupInfoResultDTOS)){ + groupInfoResultDTOS.stream().filter(g -> issueDTO.getSourceId().equals(g.getTopicId())).forEach(g -> resultDTO.setTopicReleaseGroupName(g.getTopicGroupName())); } resultDTOList.add(resultDTO); } From 4f8015ff473a0cbd406eab6399a6f29a47c11281 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 13 Oct 2022 16:58:46 +0800 Subject: [PATCH 112/125] /gov/issue/issue/unresolvedlist --- .../src/main/java/com/epmet/service/impl/IssueServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8be5461c75..63efe318c7 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 @@ -1724,7 +1724,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp } //重新查询一下所有议题的来源类型, 且来源于事件的议题,赋值icEventInfo List issueIds=resultList.stream().map(i -> i.getIssueId()).collect(Collectors.toList()); - List issueEntityList=baseDao.selectBatchIds(issueIds); + List issueEntityList = CollectionUtils.isEmpty(issueIds) ? new ArrayList<>() : baseDao.selectBatchIds(issueIds); if(CollectionUtils.isNotEmpty(issueEntityList)){ Map eventMap=new HashMap<>(); // 来源于事件的 From 0b434d28735cefaf7daf36811eac2cee8c03706c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 14 Oct 2022 13:29:32 +0800 Subject: [PATCH 113/125] =?UTF-8?q?/resi/group/topic/fetchtopicinfowhenaud?= =?UTF-8?q?itissue=E3=80=81/gov/issue/issueaudit/audit=E8=AF=9D=E9=A2=98?= =?UTF-8?q?=E5=B7=B2=E8=BD=AC=E8=AE=AE=E9=A2=98=EF=BC=8C=E8=AF=B7=E5=8B=BF?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=93=8D=E4=BD=9C=E4=B8=8D=E5=8F=91=E9=80=81?= =?UTF-8?q?=E9=92=89=E9=92=89=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/dto/result/YtHsjcResDTO.java | 2 +- .../java/com/epmet/service/impl/IssueServiceImpl.java | 4 +--- .../modules/topic/service/impl/ResiTopicServiceImpl.java | 8 +++++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/YtHsjcResDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/YtHsjcResDTO.java index 4dcf8869a1..001c7fe0ae 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/YtHsjcResDTO.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/YtHsjcResDTO.java @@ -6,7 +6,7 @@ import java.util.List; /** - * @Description + * @Description 核酸结果查询 * @Author yzm * @Date 2022/9/26 17:04 */ 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 63efe318c7..b576a0f1ca 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 @@ -577,8 +577,6 @@ public class IssueServiceImpl extends BaseServiceImpl imp app2update.setIssueId(issueResult.getIssueId()); } - }else { - throw new RenException(topicInfo.getInternalMsg()); } @@ -610,7 +608,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp boolean flag = SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient) .sendGroupAchievementMqMsg(new GroupAchievementMQMsg(application.getCustomerId(), application.getGroupId(), AchievementTypeEnum.TOISSUE.getCode())); if (!flag) { - logger.error("发送(小组成就)系统消息到message服务失败"); + logger.warn("发送(小组成就)系统消息到message服务失败"); } return app2update.getIssueId(); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index e3ebc257d2..1592aa0fe7 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -34,6 +34,7 @@ import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.enums.AchievementTypeEnum; import com.epmet.commons.tools.enums.EventEnum; 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.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; @@ -1716,7 +1717,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl Date: Fri, 14 Oct 2022 14:24:22 +0800 Subject: [PATCH 114/125] =?UTF-8?q?/gov/project/icEvent/myreport-detail?= =?UTF-8?q?=E4=B8=8D=E9=99=90=E5=88=B6userId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/IcEventController.java | 2 +- .../java/com/epmet/service/impl/IcEventServiceImpl.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 a139371cb2..c7bd63814f 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 @@ -413,7 +413,7 @@ public class IcEventController { @PostMapping("myreport-detail") public Result myReportDetail(@LoginUser TokenDto tokenDto, @RequestBody MyReportIcEvFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); - formDTO.setUserId(tokenDto.getUserId()); + // formDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO, MyReportIcEvFormDTO.DetailGroup.class); return new Result().ok(icEventService.myReportDetail(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 3fba9bf715..b37344a620 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 @@ -1682,7 +1682,13 @@ public class IcEventServiceImpl extends BaseServiceImpl + // AND ie.REPORT_USER_ID = #{userId} + // List list=baseDao.selectMyReport(formDTO); + if(CollectionUtils.isEmpty(list)){ + return null; + } if (!CollectionUtils.isEmpty(list)) { //封装数据 for (MyReportIcEvResDTO dto : list) { From ae2008d288d3a08a230b1179808d02d48391ce63 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 18 Oct 2022 13:36:47 +0800 Subject: [PATCH 115/125] vote --- .../com/epmet/dto/form/IssueIdFormDTO.java | 2 +- .../com/epmet/dto/result/VoteResultDTO.java | 2 +- .../epmet/service/impl/IssueServiceImpl.java | 36 ++++++++++--------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/IssueIdFormDTO.java b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/IssueIdFormDTO.java index ce1b760bb3..58d12671de 100644 --- a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/IssueIdFormDTO.java +++ b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/form/IssueIdFormDTO.java @@ -19,7 +19,7 @@ public class IssueIdFormDTO implements Serializable { /** * 当 sourceType = issue 时,是直接创建议题,无需加入小组即可表决 */ - private String sourceType; + private String sourceType = "resi_topic"; } diff --git a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java index 7f81035bf1..dfa73fe47e 100644 --- a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java +++ b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java @@ -31,7 +31,7 @@ public class VoteResultDTO implements Serializable { /** * 是否加入小组 已加入:true,未加入:false */ - private Boolean voteAuthorization; + private Boolean voteAuthorization = false; /** * 支持:support 反对:oppose diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 6c61788c10..2eddf62d6a 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -22,6 +22,7 @@ import com.epmet.resi.group.dto.topic.form.TopicDetailBatchFormDTO; import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.epmet.service.IssueService; +import com.epmet.util.ModuleConstant; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -217,25 +218,26 @@ public class IssueServiceImpl implements IssueService { GridIdFormDTO gridIdFormDTO = new GridIdFormDTO(); gridIdFormDTO.setGridId(gridId.getGridId()); gridIdFormDTO.setUserId(tokenDto.getUserId()); - Result checkJoinTeam = resiGroupFeignClient.checkjointeam(gridIdFormDTO); - if (!checkJoinTeam.success()){ - throw new RenException("查询校验用户是否加入小组失败"); - } - CheckJoinTeamResultDTO check = checkJoinTeam.getData(); - //未加入小组 - if (check.getVoteAuthorization()==false){ - voteResultDTOResult.setVoteFlag(false); - voteResultDTOResult.setVoteAuthorization(check.getVoteAuthorization()); - voteResultDTOResult.setOppositionCount(NumConstant.ZERO); - voteResultDTOResult.setSupportCount(NumConstant.ZERO); - }else { - Result voteResult = govIssueFeignClient.voteCount(issueId); - if (!voteResult.success()){ - throw new RenException("查询表决中议题详情——支持、反对数失败"); + if (issueId.getSourceType().equals("resi_topic")){ + Result checkJoinTeam = resiGroupFeignClient.checkjointeam(gridIdFormDTO); + if (!checkJoinTeam.success()){ + throw new RenException("查询校验用户是否加入小组失败"); + } + CheckJoinTeamResultDTO check = checkJoinTeam.getData(); + //未加入小组 + if (check.getVoteAuthorization()==false){ + voteResultDTOResult.setVoteFlag(false); + voteResultDTOResult.setVoteAuthorization(check.getVoteAuthorization()); + voteResultDTOResult.setOppositionCount(NumConstant.ZERO); + voteResultDTOResult.setSupportCount(NumConstant.ZERO); } - voteResultDTOResult = voteResult.getData(); - voteResultDTOResult.setVoteAuthorization(check.getVoteAuthorization()); + return voteResultDTOResult; + } + Result voteResult = govIssueFeignClient.voteCount(issueId); + if (!voteResult.success()){ + throw new RenException("查询表决中议题详情——支持、反对数失败"); } + voteResultDTOResult = voteResult.getData(); return voteResultDTOResult; } From dfcf11438097181415801c44ba10eee7cba6cc71 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 18 Oct 2022 14:19:18 +0800 Subject: [PATCH 116/125] vote --- .../src/main/java/com/epmet/service/impl/IssueServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 2eddf62d6a..f13aff5a82 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -231,7 +231,6 @@ public class IssueServiceImpl implements IssueService { voteResultDTOResult.setOppositionCount(NumConstant.ZERO); voteResultDTOResult.setSupportCount(NumConstant.ZERO); } - return voteResultDTOResult; } Result voteResult = govIssueFeignClient.voteCount(issueId); if (!voteResult.success()){ From 09160e9a8a5519c0ff79ea4b701c4c4a52949d00 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 18 Oct 2022 14:25:04 +0800 Subject: [PATCH 117/125] vote --- .../src/main/java/com/epmet/dto/result/VoteResultDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java index dfa73fe47e..33207f51f8 100644 --- a/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java +++ b/epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java @@ -31,7 +31,7 @@ public class VoteResultDTO implements Serializable { /** * 是否加入小组 已加入:true,未加入:false */ - private Boolean voteAuthorization = false; + private Boolean voteAuthorization = true; /** * 支持:support 反对:oppose From 5b0624ebe2f70df5d7232cc26bb1ed4b0accc604 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Oct 2022 10:08:46 +0800 Subject: [PATCH 118/125] =?UTF-8?q?gov-issue=E5=86=85=E5=AE=B9=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E8=B5=B0=E7=94=9F=E4=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-module/gov-issue/gov-issue-server/pom.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/pom.xml b/epmet-module/gov-issue/gov-issue-server/pom.xml index 7741561d9f..db38938089 100644 --- a/epmet-module/gov-issue/gov-issue-server/pom.xml +++ b/epmet-module/gov-issue/gov-issue-server/pom.xml @@ -179,7 +179,9 @@ callerRunsPolicy false - https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + https://epmet-open.elinkservice.cn/api/epmetscan/api https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4 From 50a3ca1dae488726ef2e1493df48309adbe7b1c7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Oct 2022 10:25:37 +0800 Subject: [PATCH 119/125] =?UTF-8?q?/gov/issue/issuesuggestion/save=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8B=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IssueSuggestionServiceImpl.java | 10 +++++----- .../java/com/epmet/service/impl/IssueServiceImpl.java | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSuggestionServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSuggestionServiceImpl.java index 20e2d01e6e..1b303c85e9 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSuggestionServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSuggestionServiceImpl.java @@ -20,6 +20,7 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.StrConstant; 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.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; @@ -96,7 +97,7 @@ public class IssueSuggestionServiceImpl extends BaseServiceImpl textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); if (!textSyncScanResult.success()) { - log.warn("居民端用户对议题发表建议,内容审核服务返回失败"); - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + throw new EpmetException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(),EpmetErrorCode.TEXT_SCAN_FAILED.getMsg(),EpmetErrorCode.TEXT_SCAN_FAILED.getMsg()); } else { if (!textSyncScanResult.getData().isAllPass()) { - throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + throw new EpmetException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(),EpmetErrorCode.TEXT_SCAN_FAILED.getMsg(),EpmetErrorCode.TEXT_SCAN_FAILED.getMsg()); } } //赋值网格id IssueDTO issueDTO = issueService.get(dto.getIssueId()); if (null == issueDTO) { - throw new RenException(String.format("根据议题id%s,没有找到议题信息", dto.getIssueId())); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),String.format("根据议题id%s,没有找到议题信息", dto.getIssueId()),"议题不存在"); } dto.setGridId(issueDTO.getGridId()); dto.setCustomerId(issueDTO.getCustomerId()); diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index f13aff5a82..573da12cb7 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -393,10 +393,10 @@ public class IssueServiceImpl implements IssueService { issueSuggestionDTO.setPublicFlag(formDTO.getPublicFlag() == true ? NumConstant.ONE : NumConstant.ZERO); issueSuggestionDTO.setCreatedBy(loginUserUtil.getLoginUserId()); Result result = govIssueOpenFeignClient.saveIssueSuggestion(issueSuggestionDTO); - if (result.success() && null != result.getData()) { - return new PublishSuggestionResultDTO(result.getData().getIssueId(), result.getData().getSuggestionId()); + if(result.success()||null==result.getData()||StringUtils.isBlank(result.getData().getSuggestionId())){ + throw new EpmetException(result.getCode(),result.getInternalMsg(),result.getMsg()); } - throw new RenException(result.getCode()); + return new PublishSuggestionResultDTO(result.getData().getIssueId(), result.getData().getSuggestionId()); } /** From 8e1cd9dd6e378a6eb24b1bcadea9e05124f0b473 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Oct 2022 11:30:52 +0800 Subject: [PATCH 120/125] =?UTF-8?q?gov-project=E5=86=85=E5=AE=B9=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E8=B5=B0=E7=94=9F=E4=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-module/gov-project/gov-project-server/pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index 375daa8dd2..abb978b7ce 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -219,8 +219,9 @@ callerRunsPolicy false - https://epmet-dev.elinkservice.cn/api/epmetscan/api - + + + https://epmet-open.elinkservice.cn/api/epmetscan/api https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4 From e2f209c669c1e26b5ed2b89a112447756f6f75b9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 21 Oct 2022 09:20:57 +0800 Subject: [PATCH 121/125] =?UTF-8?q?=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/IssueServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 573da12cb7..8db95668b7 100644 --- a/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -22,7 +22,6 @@ import com.epmet.resi.group.dto.topic.form.TopicDetailBatchFormDTO; import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; import com.epmet.service.IssueService; -import com.epmet.util.ModuleConstant; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -393,8 +392,8 @@ public class IssueServiceImpl implements IssueService { issueSuggestionDTO.setPublicFlag(formDTO.getPublicFlag() == true ? NumConstant.ONE : NumConstant.ZERO); issueSuggestionDTO.setCreatedBy(loginUserUtil.getLoginUserId()); Result result = govIssueOpenFeignClient.saveIssueSuggestion(issueSuggestionDTO); - if(result.success()||null==result.getData()||StringUtils.isBlank(result.getData().getSuggestionId())){ - throw new EpmetException(result.getCode(),result.getInternalMsg(),result.getMsg()); + if(!result.success()||null==result.getData()||StringUtils.isBlank(result.getData().getSuggestionId())){ + throw new EpmetException(result.getCode(),"gov-issue saveIssueSuggestion error:"+result.getInternalMsg(),result.getMsg()); } return new PublishSuggestionResultDTO(result.getData().getIssueId(), result.getData().getSuggestionId()); } From 74b61e313ac206a25ea8eb81e0b402adbb79eaa9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 21 Oct 2022 10:32:07 +0800 Subject: [PATCH 122/125] =?UTF-8?q?=E6=94=B9=E4=B8=8B=E8=AF=95=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/utils/ScanContentUtils.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java index 6427301a18..728263e229 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java @@ -3,6 +3,7 @@ package com.epmet.commons.tools.utils; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.scan.param.*; @@ -16,6 +17,7 @@ import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * 扫描内容工具类 @@ -31,6 +33,15 @@ public class ScanContentUtils { * @return */ public static Result imgSyncScan(String url, ImgScanParamDTO param) { + //start 测试环境停机了,先这样改试试 + EnvEnum currentEnv = EnvEnum.getCurrentEnv(); + if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())){ + SyncScanResult syncScanResult=new SyncScanResult(); + syncScanResult.setSuccessDataIds(param.getTasks().stream().map(c -> c.getDataId()).collect(Collectors.toList())); + syncScanResult.setAllPass(true); + return new Result().ok(syncScanResult); + }//end + log.debug("imgSyncScan param:{}", JSON.toJSONString(param)); if (StringUtils.isBlank(url) || param == null) { throw new RenException("参数错误"); @@ -57,6 +68,15 @@ public class ScanContentUtils { * @return */ public static Result textSyncScan(String url, TextScanParamDTO param) { + //start 测试环境停机了,先这样改试试 + EnvEnum currentEnv = EnvEnum.getCurrentEnv(); + if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())){ + SyncScanResult syncScanResult=new SyncScanResult(); + syncScanResult.setSuccessDataIds(param.getTasks().stream().map(c -> c.getDataId()).collect(Collectors.toList())); + syncScanResult.setAllPass(true); + return new Result().ok(syncScanResult); + }//end + log.debug("textSyncScan param:{}", JSON.toJSONString(param)); if (StringUtils.isBlank(url) || param == null) { throw new RenException("参数错误"); From 1bd9d050ab402f5470d6ff50009a82f0df79f82c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 21 Oct 2022 10:42:18 +0800 Subject: [PATCH 123/125] =?UTF-8?q?ScanContentUtils.imgSyncScan+textSyncSc?= =?UTF-8?q?an=E6=9C=AC=E6=9C=BAor=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=BF=94=E5=9B=9E=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/utils/ScanContentUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java index 728263e229..e04227d5dc 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java @@ -35,7 +35,7 @@ public class ScanContentUtils { public static Result imgSyncScan(String url, ImgScanParamDTO param) { //start 测试环境停机了,先这样改试试 EnvEnum currentEnv = EnvEnum.getCurrentEnv(); - if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())){ + if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())||EnvEnum.DEV.getCode().equals(currentEnv.getCode())){ SyncScanResult syncScanResult=new SyncScanResult(); syncScanResult.setSuccessDataIds(param.getTasks().stream().map(c -> c.getDataId()).collect(Collectors.toList())); syncScanResult.setAllPass(true); @@ -70,7 +70,7 @@ public class ScanContentUtils { public static Result textSyncScan(String url, TextScanParamDTO param) { //start 测试环境停机了,先这样改试试 EnvEnum currentEnv = EnvEnum.getCurrentEnv(); - if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())){ + if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())||EnvEnum.DEV.getCode().equals(currentEnv.getCode())){ SyncScanResult syncScanResult=new SyncScanResult(); syncScanResult.setSuccessDataIds(param.getTasks().stream().map(c -> c.getDataId()).collect(Collectors.toList())); syncScanResult.setAllPass(true); From 1508d1fdf6a732ea8716113d845eb4d62be4b057 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 21 Oct 2022 12:03:32 +0800 Subject: [PATCH 124/125] @PostMapping("/epmetuser/dataSyncConfig/natInfoScanTask") --- .../src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java | 1 - 1 file changed, 1 deletion(-) 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 368ed8720b..21347f6b23 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 @@ -924,7 +924,6 @@ public interface EpmetUserOpenFeignClient { @PostMapping("/epmetuser/dataSyncConfig/natInfoScanTask") Result natInfoScanTask(@RequestBody DataSyncTaskParam formDTO); - Result natInfoScanTask(@RequestBody NatInfoScanTaskFormDTO formDTO); /** * Desc: 根据网格ID查询所有注册居民 From f34870dec4fa04b5c352d9e45f456a76456a6f5a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 21 Oct 2022 16:05:21 +0800 Subject: [PATCH 125/125] =?UTF-8?q?=E8=A1=A8=E5=86=B3=E4=B8=AD=E8=AE=AE?= =?UTF-8?q?=E9=A2=98=E5=8F=91=E5=B8=83=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/VotingIssueListResultDTO.java | 5 ++++- .../src/main/resources/mapper/IssueDao.xml | 8 +++++--- .../com/epmet/dto/result/VotingIssueListResultDTO.java | 4 ++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java index 6725684610..038d40a90d 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java @@ -19,7 +19,10 @@ public class VotingIssueListResultDTO implements Serializable { * 议题发布时间 * */ private Long issuePublishTime; - + /** + * 议题发布时间 + */ + private String issuePublishTimeStr; /** * 议题Id * */ diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index 306a5c0204..77e9db60da 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -232,6 +232,7 @@ + @@ -247,7 +248,8 @@ UNIX_TIMESTAMP( i.created_time ) AS issuePublishTime, i.SOURCE_ID AS sourceId, i.SOURCE_TYPE as sourceType, - ia.url + ia.url, + DATE_FORMAT(i.created_time,'%Y-%m-%d %H:%i') as created_time FROM issue i left join issue_attachment ia @@ -257,7 +259,7 @@ AND i.GRID_ID = #{gridId} AND i.ISSUE_STATUS = 'voting' ORDER BY - i.created_time DESC,ia.SORT asc + i.created_time DESC @@ -291,7 +293,7 @@ AND i.ISSUE_STATUS = 'closed' AND i.RESOLVE_TYPE = 'resolved' ORDER BY - i.created_time DESC,ia.sort asc + i.created_time DESC