Browse Source

Merge remote-tracking branch 'origin/dev_dingV1'

dev
yinzuomei 3 years ago
parent
commit
e83c2b5eca
  1. 38
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/commondto/IcEventComDTO.java
  2. 65
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/commondto/TopicInfoComDTO.java
  3. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/YtHsjcResDTO.java
  4. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java
  5. 20
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java
  6. 2
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/IssueApplicationDTO.java
  7. 6
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueListResultDTO.java
  8. 3
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govissue/IssueApplicationEntity.java
  9. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueApplicationDao.xml
  10. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml
  11. 1
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
  12. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
  13. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  14. 66
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  15. 14
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueApplicationDTO.java
  16. 116
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueAttachmentDTO.java
  17. 34
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueDTO.java
  18. 26
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AllIssueListFormDTO.java
  19. 31
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/AuditListFormDTO.java
  20. 6
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CloseIssueFormDTO.java
  21. 25
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/DelIssueFormDTO.java
  22. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueCategoryTagListFormDTO.java
  23. 123
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/PublishIssueFormDTO.java
  24. 5
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SelectIssueVotingDetailFormDTO.java
  25. 6
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/VoteFormDTO.java
  26. 64
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java
  27. 41
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java
  28. 12
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java
  29. 14
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GovIssueDetailResultDTO.java
  30. 13
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GovTopicOfIssueInfoResultDTO.java
  31. 21
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueAdvanceResDTO.java
  32. 27
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProfileDTO.java
  33. 15
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java
  34. 2
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MyPubIssuesAuditingResultDTO.java
  35. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java
  36. 39
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ProcessListResultDTOBak.java
  37. 16
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VotingIssueListResultDTO.java
  38. 41
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  39. 43
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  40. 4
      epmet-module/gov-issue/gov-issue-server/pom.xml
  41. 5
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/constant/UserMessageConstant.java
  42. 43
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueAuditController.java
  43. 3
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCategoryController.java
  44. 84
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  45. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java
  46. 10
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProcessController.java
  47. 26
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueApplicationDao.java
  48. 16
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueAttachmentDao.java
  49. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java
  50. 8
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
  51. 15
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueApplicationEntity.java
  52. 82
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueAttachmentEntity.java
  53. 17
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueEntity.java
  54. 42
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/AllIssueListExportExcel.java
  55. 34
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/AuditListExportExcel.java
  56. 8
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java
  57. 7
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java
  58. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueApplicationService.java
  59. 78
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueAttachmentService.java
  60. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java
  61. 8
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProcessService.java
  62. 42
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
  63. 3
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java
  64. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueVoteStatisticalService.java
  65. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationHistoryServiceImpl.java
  66. 125
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java
  67. 82
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueAttachmentServiceImpl.java
  68. 17
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java
  69. 57
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java
  70. 5
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSatisfactionDetailServiceImpl.java
  71. 688
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  72. 33
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueShareLinkRecordServiceImpl.java
  73. 10
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSuggestionServiceImpl.java
  74. 11
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java
  75. 48
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java
  76. 86
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java
  77. 6
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java
  78. 36
      epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.18__alter_issue_type.sql
  79. 2
      epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.19__alter_issue_application.sql
  80. 1
      epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.20__issue_source.sql
  81. 70
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml
  82. 6
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueAttachmentDao.xml
  83. 7
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueCategoryDao.xml
  84. 250
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  85. 6
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProcessDao.xml
  86. 4
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java
  87. 10
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java
  88. 9
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java
  89. 64
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToIssueFormDTO.java
  90. 6
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java
  91. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventProcessListResultDTO.java
  92. 6
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesClosedResultDTO.java
  93. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java
  94. 55
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java
  95. 11
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java
  96. 33
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java
  97. 34
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java
  98. 18
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  99. 19
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  100. 5
      epmet-module/gov-project/gov-project-server/pom.xml

38
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/commondto/IcEventComDTO.java

@ -0,0 +1,38 @@
package com.epmet.commons.tools.dto.commondto;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author yzm
* @Date 2022/10/11 13:08
*/
@Data
public class IcEventComDTO implements Serializable {
private static final long serialVersionUID = -5166489408303997740L;
/**
* 事件Id
*/
private String icEventId;
/**
* 事件内容
*/
private String eventContent;
/**
* 处理中processing已办结closed_case
*/
private String status;
/**
* 0:已回复 1:已转项目 2:已转需求3:转议题
*/
private String operationType;
/**
* 项目需求ID议题id
*/
private String operationId;
}

65
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/commondto/TopicInfoComDTO.java

@ -0,0 +1,65 @@
package com.epmet.commons.tools.dto.commondto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author yzm
* @Date 2022/10/11 13:06
*/
@Data
public class TopicInfoComDTO implements Serializable {
private static final long serialVersionUID = 4242861917113716511L;
/**
* 话题id
*/
private String topicId;
/**
* 话题内容
*/
private String topicContent;
/**
* 图片列表
*/
private List<String> topicImgs;
/**
* 话题语音-2022.10.10
*/
private List<String> topicVoices;
/**
* 话题发表人山东路168-尹女士
*/
private String publishedUser;
/**
* 话题发表时间 (时间戳 毫秒级)
*/
private Long publishedTime;
private String releaseTime;
/**
* 小组类型(ordinary:楼院小组 branch:支部小组)
*/
private String groupType;
/**
* 话题所属小组id
*/
private String groupId;
/**
* 话题所属小组名称
*/
private String groupName;
}

2
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
*/

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java

@ -57,7 +57,6 @@ public class CustomerOrgRedis {
public static GridInfoCache getGridInfo(String gridId){
String key = RedisKeys.getGridInfoKey(gridId);
Map<String, Object> grid = customerOrgRedis.redisUtils.hGetAll(key);
log.info("grid is {}", JSON.toJSONString(grid));
if (!CollectionUtils.isEmpty(grid)) {
return ConvertUtils.mapToEntity(grid, GridInfoCache.class);
}

20
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<SyncScanResult> imgSyncScan(String url, ImgScanParamDTO param) {
//start 测试环境停机了,先这样改试试
EnvEnum currentEnv = EnvEnum.getCurrentEnv();
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);
return new Result<SyncScanResult>().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<SyncScanResult> textSyncScan(String url, TextScanParamDTO param) {
//start 测试环境停机了,先这样改试试
EnvEnum currentEnv = EnvEnum.getCurrentEnv();
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);
return new Result<SyncScanResult>().ok(syncScanResult);
}//end
log.debug("textSyncScan param:{}", JSON.toJSONString(param));
if (StringUtils.isBlank(url) || param == null) {
throw new RenException("参数错误");

2
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

6
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govissue/result/IssueListResultDTO.java

@ -108,7 +108,10 @@ public class IssueListResultDTO implements Serializable {
@JsonIgnore
private String applyStatus;
/**
* 来源类型 话题resi_topic直接立议题issue事件ic_event
*/
private String sourceType;
public IssueListResultDTO() {
this.issueId = "";
this.issueTitle = "";
@ -129,5 +132,6 @@ public class IssueListResultDTO implements Serializable {
this.projectId = "";
this.issueClosedTime = 0L;
this.issueApplicationId = "";
this.sourceType="";
}
}

3
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
*/

14
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueApplicationDao.xml

@ -12,7 +12,12 @@
ia.TOPIC_ID,
iah.REASON AS rejectedReason,
ia.grid_id,
ia.apply_status
ia.apply_status,
(
case when ia.TOPIC_ID is not null then 'resi_topic'
else ''
end
) as sourceType
FROM issue_application_history iah
LEFT JOIN issue_application ia ON iah.ISSUE_APPLICATION_ID = ia.ID AND ia.APPLY_STATUS = 'rejected'
WHERE ia.DEL_FLAG = 0
@ -31,7 +36,12 @@
ISSUE_TITLE,
UNIX_TIMESTAMP(CREATED_TIME) AS auditingTime,
TOPIC_ID,
grid_id
grid_id,
(
case when TOPIC_ID is not null then 'resi_topic'
else ''
end
) as sourceType
FROM issue_application
WHERE DEL_FLAG = 0
AND (

6
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govissue/IssueDao.xml

@ -12,7 +12,8 @@
ISSUE_TITLE AS issueTitle ,
UNIX_TIMESTAMP(CREATED_TIME) AS createTime,
SUGGESTION,
grid_id
grid_id,
SOURCE_TYPE as sourceType
FROM issue
WHERE DEL_FLAG = '0'
AND ISSUE_STATUS = #{issueStatus}
@ -30,7 +31,8 @@
SUGGESTION ,
UNIX_TIMESTAMP(SHIFTED_TIME) AS shiftProjectTime,
grid_id,
issue_title
issue_title,
SOURCE_TYPE as sourceType
FROM issue
WHERE DEL_FLAG = '0'
AND ISSUE_STATUS = 'shift_project'

1
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java

@ -173,6 +173,7 @@ public interface EpmetHeartOpenFeignClient {
/**
* desc:根据来源id 删除需求 只删主表
* 服务需求相关表都删除ic_user_demand_recic_user_demand_serviceic_user_demand_satisfactionic_user_demand_operate_log
* @param originId
* @param origin
* @return

1
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java

@ -398,6 +398,7 @@ public class IcUserDemandRecController implements ResultDataResolver {
/**
* desc:根据来源id 删除需求 只删主表
* 2022.10.12:删除服务需求ic_user_demand_recic_user_demand_serviceic_user_demand_satisfactionic_user_demand_operate_log
* @param originId
* @param origin
* @return

1
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java

@ -268,6 +268,7 @@ public interface IcUserDemandRecService extends BaseService<IcUserDemandRecEntit
/**
* desc:根据来源id 删除需求 只删主表
* 2022.10.12:删除服务需求ic_user_demand_recic_user_demand_serviceic_user_demand_satisfactionic_user_demand_operate_log
* @param originId
* @param origin
* @return

66
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -18,6 +18,7 @@
package com.epmet.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
@ -520,18 +521,66 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
return serverInfoDTO;
}
/**
* 此方法是删除事件时调用如果事件被转了服务服务记录也要删除
* @param originId
* @param origin
* @return
*/
@Override
public Integer deleteByOriginId(String originId, String origin) {
if(StringUtils.isBlank(originId) || StringUtils.isBlank(origin)){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"参数错误","参数错误");
}
LambdaUpdateWrapper<IcUserDemandRecEntity> wrapper = new LambdaUpdateWrapper();
wrapper.eq(IcUserDemandRecEntity::getOriginId, originId)
.eq(IcUserDemandRecEntity::getOrigin,origin)
.set(IcUserDemandRecEntity::getUpdatedTime,new Date())
.set(IcUserDemandRecEntity::getCreatedBy,loginUserUtil.getLoginUserId())
.set(IcUserDemandRecEntity::getDelFlag,NumConstant.ONE_STR);
return baseDao.update(null, wrapper);
LambdaQueryWrapper<IcUserDemandRecEntity> queryWrapper = new LambdaQueryWrapper();
queryWrapper.eq(IcUserDemandRecEntity::getOrigin,origin).eq(IcUserDemandRecEntity::getOriginId,originId);
IcUserDemandRecEntity recEntity = baseDao.selectOne(queryWrapper);
if (null == recEntity) {
return 0;
}
//删除服务需求
deleteUserDemand(Arrays.asList(recEntity.getId()));
return 1;
}
/**
* 删除服务需求
* ic_user_demand_recic_user_demand_serviceic_user_demand_satisfactionic_user_demand_operate_log
* @param ids
*/
@Transactional(rollbackFor = Exception.class)
public void deleteUserDemand(List<String> ids) {
Date nowTime = new Date();
String currentUserId = loginUserUtil.getLoginUserId();
for (String id : ids) {
LambdaUpdateWrapper<IcUserDemandRecEntity> wrapper = new LambdaUpdateWrapper();
wrapper.eq(IcUserDemandRecEntity::getId, id)
.set(IcUserDemandRecEntity::getUpdatedTime, nowTime)
.set(IcUserDemandRecEntity::getUpdatedBy, currentUserId)
.set(IcUserDemandRecEntity::getDelFlag, NumConstant.ONE_STR);
baseDao.update(null, wrapper);
LambdaUpdateWrapper<IcUserDemandServiceEntity> serviceWrapper = new LambdaUpdateWrapper();
serviceWrapper.eq(IcUserDemandServiceEntity::getDemandRecId, id)
.set(IcUserDemandServiceEntity::getUpdatedTime, nowTime)
.set(IcUserDemandServiceEntity::getUpdatedBy, currentUserId)
.set(IcUserDemandServiceEntity::getDelFlag, NumConstant.ONE_STR);
demandServiceDao.update(null, serviceWrapper);
LambdaUpdateWrapper<IcUserDemandSatisfactionEntity> statWrapper = new LambdaUpdateWrapper();
statWrapper.eq(IcUserDemandSatisfactionEntity::getDemandRecId, id)
.set(IcUserDemandSatisfactionEntity::getUpdatedTime, nowTime)
.set(IcUserDemandSatisfactionEntity::getUpdatedBy, currentUserId)
.set(IcUserDemandSatisfactionEntity::getDelFlag, NumConstant.ONE_STR);
demandSatisfactionDao.update(null, statWrapper);
LambdaUpdateWrapper<IcUserDemandOperateLogEntity> logWrapper = new LambdaUpdateWrapper();
logWrapper.eq(IcUserDemandOperateLogEntity::getDemandRecId, id)
.set(IcUserDemandOperateLogEntity::getUpdatedTime, nowTime)
.set(IcUserDemandOperateLogEntity::getUpdatedBy, currentUserId)
.set(IcUserDemandOperateLogEntity::getDelFlag, NumConstant.ONE_STR);
operateLogDao.update(null, logWrapper);
}
}
/**
@ -563,6 +612,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
//1.2、更新服务记录,记录实际开始,实际结束时间
serviceEntity.setServiceStartTime(formDTO.getServiceStartTime());
serviceEntity.setServiceEndTime(formDTO.getServiceEndTime());
serviceEntity.setUpdatedTime(nowDate);
demandServiceDao.updateById(serviceEntity);
//1.3、修改主表状态为已完成
entity.setStatus(UserDemandConstant.FINISHED);
@ -604,6 +654,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
finishResultDTO.setRemark(String.format(UserDemandConstant.GRANT_POINT_REMARK,entity.getDemandUserName(),content));
finishResultDTO.setFinishResult(StringUtils.isNotBlank(formDTO.getFinishResult())?formDTO.getFinishResult():UserDemandConstant.UN_RESOLVED);
}
entity.setUpdatedTime(nowDate);
baseDao.updateById(entity);
// 5、如果是居民端用户提出的需求,发消息:您提出的需求已完成,请进行服务评价。
@ -623,6 +674,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
dto.setType("demand");
dto.setServiceParty(str);
dto.setActualServiceTime(DateUtils.format(formDTO.getServiceStartTime(), DateUtils.DATE_TIME_PATTERN)+"至"+DateUtils.format(formDTO.getServiceEndTime(), DateUtils.DATE_TIME_PATTERN));
dto.setCloseCaseTime(nowDate);
Result result = govProjectOpenFeignClient.closeProjectOrDemand(dto);
if (!result.success()) {
throw new RenException("需求完成,修改事件管理数据失败...");

14
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
@ -130,4 +132,16 @@ public class IssueApplicationDTO implements Serializable {
*/
private Long latestTime;
private String address;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
}

116
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;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
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;
}

34
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
*/
@ -45,7 +49,7 @@ public class IssueDTO implements Serializable {
private String issueStatus;
/**
* 来源类型 eg:resi_topic
* 来源类型 话题resi_topic直接立议题issue事件ic_event
*/
private String sourceType;
@ -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<IssueAttachmentDTO> attachmentList;
}

26
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;
}

31
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;
}

6
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/CloseIssueFormDTO.java

@ -17,11 +17,17 @@ public class CloseIssueFormDTO implements Serializable {
@NotBlank(message = "议题Id不能为空")
private String issueId;
/**
* resolved已解决
* unresolved未解决
*/
@NotBlank(message = "解决状态不能为空")
private String resolveType;
@NotBlank(message = "关闭理由不能为空")
@Length(max=1000,message = "手机号不能超过1000位")
private String closeReason;
private String currentUserId;
}

25
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/DelIssueFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* @Description
* @Author yzm
* @Date 2022/10/12 11:00
*/
@Data
public class DelIssueFormDTO {
@NotBlank(message = "customerId不能为空")
private String customerId;
@NotBlank(message = "userId不能为空")
private String userId;
@Valid
@NotEmpty(message = "issueIds不能为空")
private List<String> issueIds;
}

3
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{}
}

123
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/PublishIssueFormDTO.java

@ -0,0 +1,123 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
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 = "orgIdPath不能为空", groups = AddUserShowGroup.class)
private String orgIdPath;
/**
* 组织ID 数据权限-非必填agencyId
*/
@NotBlank(message = "orgId不能为空", groups = AddUserShowGroup.class)
private String orgId;
/**
* 表决发起日期转议题日期
*/
@NotNull(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;
}

5
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SelectIssueVotingDetailFormDTO.java

@ -17,4 +17,9 @@ public class SelectIssueVotingDetailFormDTO implements Serializable {
private String issueId;
private String gridId;
/**
* 来源类型 不为空的时候根据类型处理
*/
private String sourceType;
}

6
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/VoteFormDTO.java

@ -28,5 +28,11 @@ public class VoteFormDTO implements Serializable {
*/
private String createdBy;
/**
* sourceType = issue 是直接创建议题无需加入小组即可表决
* 默认为resi_topic
*/
private String sourceType = "resi_topic";
}

64
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AllIssueListResultDTO.java

@ -0,0 +1,64 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @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;
/**
* 来源类型 话题resi_topic直接立议题issue事件ic_event
*/
private String sourceType;
private Date decidedTime;
private Date votingDeadline;
}

41
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/AuditListResultDTO.java

@ -0,0 +1,41 @@
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 gridId;
private String orgId;
/**
* 议题标题
*/
private String issueTitle;
/**
* 议题建议
*/
private String suggestion;
private String applyStatus;
private String applyStatusName;
private String applyTime;
private String issueApplicationId;
}

12
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<String> issueImgs;
}

14
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GovIssueDetailResultDTO.java

@ -1,5 +1,6 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
@ -53,6 +54,7 @@ public class GovIssueDetailResultDTO implements Serializable {
* 议题来源 例如 resi_topic
* */
private String sourceType;
private String sourceId;
/**
* 当议题没有转成详情时此项为""
@ -64,4 +66,16 @@ public class GovIssueDetailResultDTO implements Serializable {
* */
private Long votingDeadline;
public GovIssueDetailResultDTO() {
this.issueTitle = "";
this.issueStatus = "";
this.topicInfo = new GovTopicOfIssueInfoResultDTO();
this.issuePublisherMobile = "";
this.issueSuggestion = "";
this.belongsGridName = "";
this.issueInitiator = "";
this.sourceType = "";
this.projectId = "";
this.votingDeadline = NumConstant.ZERO_L;
}
}

13
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/GovTopicOfIssueInfoResultDTO.java

@ -1,8 +1,10 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
@ -53,4 +55,15 @@ public class GovTopicOfIssueInfoResultDTO implements Serializable {
* 话题所属小组名称
*/
private String groupName;
public GovTopicOfIssueInfoResultDTO() {
this.topicId = "";
this.topicContent = "";
this.photoList = new ArrayList<>();
this.topicPublisher = "";
this.topicPublishTime = NumConstant.ZERO_L;
this.topicPublisherMobile = "";
this.groupId = "";
this.groupName = "";
}
}

21
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueAdvanceResDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.result;
import lombok.Data;
import java.util.List;
/**
* @Description 议题的处理进展包含转项目后的进展内部服务之间调用
* @Author yzm
* @Date 2022/10/11 9:43
*/
@Data
public class IssueAdvanceResDTO {
private String issueId;
/**
* 议题状态(voting 已转项目shift_project 已关闭closed)
*/
private String issueStatus;
private List<ProcessListResultDTOBak> processList;
}

27
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueProfileDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.result;
import lombok.Data;
import java.util.List;
/**
* @Description
* @Author yzm
* @Date 2022/10/8 12:58
*/
@Data
public class IssueProfileDTO {
private String issueId;
private String sourceId;
private String longitude;
private String latitude;
/**
* 来源类型 话题resi_topic直接立议题issue事件ic_event
*/
private String issueSourceType;
/**
* 发布议题的图片
*/
private List<String> issueImgs;
}

15
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueResultDTO.java

@ -5,6 +5,7 @@ import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Author zxc
@ -15,7 +16,7 @@ import java.util.Date;
public class IssueResultDTO implements Serializable {
private static final long serialVersionUID = -1L;
private String issueId;
/**
* 议题标题
*/
@ -53,4 +54,16 @@ public class IssueResultDTO implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date shiftIssueTime;
/**
* 来源类型 话题resi_topic直接立议题issue
*/
private String sourceType;
private String sourceId;
/**
* 发布议题的图片
*/
private List<String> issueImgs;
}

2
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;
}

3
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ProcessListResultDTO.java

@ -5,7 +5,7 @@ import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @Author zxc 就是他issue
* 议题处理进展
*/
@Data
@ -37,5 +37,6 @@ public class ProcessListResultDTO implements Serializable {
* 进展id操作记录表id
*/
private String processId;
private String type;
}

39
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/ProcessListResultDTOBak.java

@ -0,0 +1,39 @@
package com.epmet.dto.result;
import lombok.Data;
/**
* @Description
* @Author yzm
* @Date 2022/10/11 11:13
*/
@Data
public class ProcessListResultDTOBak {
/**
* 处理进展名称(表决中转项目流转中已结案已关闭)
*/
private String processName;
/**
* 已转项目进展记录时间
*/
private Long processTime;
/**
* 处理部门处理人所属的机关单位名称
*/
private String departmentName;
/**
* 进展说明
*/
private String progressDesc;
/**
* 进展id操作记录表id
*/
private String processId;
private String type;
}

16
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 政府端/居民段查看表决中议题列表返参
@ -18,7 +19,10 @@ public class VotingIssueListResultDTO implements Serializable {
* 议题发布时间
* */
private Long issuePublishTime;
/**
* 议题发布时间
*/
private String issuePublishTimeStr;
/**
* 议题Id
* */
@ -38,4 +42,14 @@ public class VotingIssueListResultDTO implements Serializable {
* 来源话题的id
*/
private String sourceId;
/**
* 来源类型 话题resi_topic直接立议题issue
*/
private String sourceType;
/**
* 发布议题的图片
*/
private List<String> issueImgs;
}

41
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java

@ -34,7 +34,7 @@ import java.util.Map;
* @date 2020/6/4 13:37
*/
@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallbackFactory = GovIssueOpenFeignClientFallBackFactory.class)
//@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallbackFactory = GovIssueOpenFeignClientFallBackFactory.class,url = "localhost:8101")
// @FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallbackFactory = GovIssueOpenFeignClientFallBackFactory.class,url = "localhost:8101")
public interface GovIssueOpenFeignClient {
/**
@ -336,7 +336,11 @@ public interface GovIssueOpenFeignClient {
@PostMapping(value = "/gov/issue/issueprojectcategorydict/getprojectcategory")
Result<List<ProjectCategoryDisPoseResultDTO>> getProjectCategory(@RequestBody List<ProjectCategoryDisPoseResultDTO> list);
/**
* 调用此方法建议分页
* @param formDTO
* @return
*/
@PostMapping("/gov/issue/issue/unresolvedlist")
Result<List<UnResolvedResultDTO>> getUnresolvedList(@RequestBody ShiftProjectListFromDTO formDTO);
@ -395,4 +399,37 @@ public interface GovIssueOpenFeignClient {
@PostMapping(value = "/gov/issue/issueprojectcategorydict/first/{customerId}")
Result<List<IssueProjectCategoryDictDTO>> queryFirstCategory(@PathVariable("customerId") String customerId);
/**
* 根据议题ids查询议题简要信息
* @param issueIds
* @return
*/
@PostMapping("/gov/issue/issue/getIssueProfile")
Result<List<IssueProfileDTO>> getIssueProfile(@RequestBody List<String> issueIds);
/**
* 事件转议题
* @param issueFormDTO
* @return
*/
@PostMapping("/gov/issue/issue/publishIssue")
Result<IssueDTO> publishIssue(@RequestBody PublishIssueFormDTO issueFormDTO);
/**
* 议题处理进展:(只包含发起议题关闭议题)
* @param formDTO
* @return
*/
@PostMapping("/gov/issue/issueprocess/issueprocess")
Result<IssueAdvanceResDTO> queryIssueProcess(@RequestBody IssueIdFormDTO formDTO);
/**
* 删除事件时事件转了议题调用此方法删除议题
* 批量删除议题议题如果转了项目此方法不删除项目
* @param delIssueFormDTO
* @return 删除的议题中转为了项目返回议题id上层再单独去删除项目
*/
@PostMapping("/gov/issue/issue/deleteIssueInternal")
Result<List<String>> deleteIssueInternal(@RequestBody DelIssueFormDTO delIssueFormDTO);
}

43
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java

@ -332,5 +332,48 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryFirstCategory", customerId);
}
/**
* 根据议题ids查询议题简要信息
*
* @param issueIds
* @return
*/
@Override
public Result<List<IssueProfileDTO>> getIssueProfile(List<String> issueIds) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getIssueProfile", issueIds);
}
/**
* 事件转议题
*
* @param issueFormDTO
* @return
*/
@Override
public Result<IssueDTO> publishIssue(PublishIssueFormDTO issueFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "publishIssue", issueFormDTO);
}
/**
* 议题处理进展(只包含发起议题关闭议题)
*
* @param formDTO
* @return
*/
@Override
public Result<IssueAdvanceResDTO> queryIssueProcess(IssueIdFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryIssueProcess", formDTO);
}
/**
* 删除事件时事件转了议题调用此方法删除议题
* 批量删除议题议题如果转了项目此方法不删除项目
*
* @param delIssueFormDTO
* @return 删除的议题中转为了项目返回项目id上层再单独去删除项目
*/
@Override
public Result<List<String>> deleteIssueInternal(DelIssueFormDTO delIssueFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "deleteIssueInternal", delIssueFormDTO);
}
}

4
epmet-module/gov-issue/gov-issue-server/pom.xml

@ -179,7 +179,9 @@
<thread.threadPool.rejected-execution-handler>callerRunsPolicy</thread.threadPool.rejected-execution-handler>
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!-- <openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>-->
<!-- 测试环境停机,改用生产 -->
<openapi.scan.server.url>https://epmet-open.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4</dingTalk.robot.webHook>

5
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部门处理,请查看。";
}

43
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;
@ -21,6 +20,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
@ -130,4 +131,38 @@ public class IssueAuditController {
public Result<String> audit(@LoginUser TokenDto token, @RequestBody IssueAuditionFormDTO param){
return new Result<String>().ok(issueService.audit(token,param));
}
/**
* Desc: 审核列表
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2022/10/9 17:11
*/
@PostMapping("auditList")
public Result<PageData<AuditListResultDTO>> auditList(@RequestBody AuditListFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<PageData<AuditListResultDTO>>().ok(issueApplicationService.auditList(formDTO));
}
@PostMapping("auditListExport")
public void auditListExport(@RequestBody AuditListFormDTO formDTO, @LoginUser TokenDto tokenDto, HttpServletResponse response) throws IOException {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
issueApplicationService.auditListExport(formDTO,response);
}
/**
* Desc: 补全议题审核表历史数据
* @param
* @author zxc
* @date 2022/10/10 10:55
*/
@PostMapping("initIssueApplicationHistoryData")
public Result initIssueApplicationHistoryData(){
issueApplicationService.initIssueApplicationHistoryData();
return new Result();
}
}

3
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<IssueCategoryTagListResultDTO> categoryTagList(@RequestBody IssueCategoryTagListFormDTO formDTO) {
public Result<IssueCategoryTagListResultDTO> categoryTagList(@LoginUser TokenDto tokenDto,@RequestBody IssueCategoryTagListFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO, IssueCategoryTagListFormDTO.CategoryTag.class);
return new Result<IssueCategoryTagListResultDTO>().ok(issueCategoryService.categoryTagList(formDTO));
}

84
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;
@ -13,9 +15,12 @@ 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.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
@ -280,7 +285,11 @@ public class IssueController {
return new Result<List<CanEvaluateProjectCountBatchResultDTO>>().ok(issueService.canEvaluateProjectCountBatch(issueIds));
}
/**
* 无需解决结案选择无需解决的项目关闭选择无需解决的议题
* @param formDTO
* @return
*/
@PostMapping("unresolvedlist")
public Result<List<UnResolvedResultDTO>> getUnresolvedList(@RequestBody ShiftProjectListFromDTO formDTO){
return new Result<List<UnResolvedResultDTO>>().ok(issueService.getUnResolvedList(formDTO));
@ -333,5 +342,78 @@ public class IssueController {
return new Result<Boolean>().ok(issueService.issueAuditReset(gridId));
}
/**
* Desc: 创建议题直接创建
* @param formDTO
* @author zxc
* @date 2022/10/8 09:03
*/
@PostMapping("createIssue")
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();
}
/**
* 根据议题ids查询议题简要信息
* @param issueIds
* @return
*/
@PostMapping("getIssueProfile")
public Result<List<IssueProfileDTO>> getIssueProfile(@RequestBody List<String> issueIds) {
if (CollectionUtils.isEmpty(issueIds)) {
return new Result<>();
}
return new Result<List<IssueProfileDTO>>().ok(issueService.getIssueProfile(issueIds));
}
/**
* Desc: 查询所有议题
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2022/10/9 16:59
*/
@PostMapping("allIssueList")
public Result<PageData<AllIssueListResultDTO>> allIssueList(@RequestBody AllIssueListFormDTO formDTO, @LoginUser TokenDto tokenDto){
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
return new Result<PageData<AllIssueListResultDTO>>().ok(issueService.allIssueList(formDTO));
}
@PostMapping("allIssueListExport")
public void allIssueListExport(@RequestBody AllIssueListFormDTO formDTO, @LoginUser TokenDto tokenDto, HttpServletResponse response) throws IOException {
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
issueService.allIssueListExport(formDTO,response);
}
/**
* 发布议题
* 事件转议题
* @param issueFormDTO
* @return
*/
@PostMapping("publishIssue")
public Result<IssueDTO> publishIssue(@RequestBody PublishIssueFormDTO issueFormDTO) {
ValidatorUtils.validateEntity(issueFormDTO, PublishIssueFormDTO.AddUserShowGroup.class);
return new Result<IssueDTO>().ok(issueService.publishIssue(issueFormDTO));
}
/**
* 删除事件时事件转了议题调用此方法删除议题
* 批量删除议题议题如果转了项目此方法不删除项目
* @param delIssueFormDTO
* @return 删除的议题中转为了项目返回项目id上层再单独去删除项目
*/
@PostMapping("deleteIssueInternal")
public Result<List<String>> deleteIssueInternal(@RequestBody DelIssueFormDTO delIssueFormDTO){
ValidatorUtils.validateEntity(delIssueFormDTO);
return new Result<List<String>>().ok(issueService.deleteIssueInternal(delIssueFormDTO));
}
}

9
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java

@ -43,8 +43,9 @@ public class IssueManageController {
* @Description 议题管理-关闭议题
**/
@PostMapping("closeissue")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_CLOSE)
// @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_CLOSE)
public Result closeIssue(@LoginUser TokenDto tokenDTO, @RequestBody CloseIssueFormDTO formDTO) {
formDTO.setCurrentUserId(tokenDTO.getUserId());
ValidatorUtils.validateEntity(formDTO);
issueService.closeIssue(formDTO);
return new Result();
@ -88,6 +89,11 @@ public class IssueManageController {
return new Result<VotingTrendResultDTO>().ok(issueVoteStatisticalService.votingTrend(issueId));
}
@PostMapping("votingTrendV2")
public Result<VotingTrendResultDTO> votingTrendV2(@RequestBody IssueIdFormDTO issueId){
return new Result<VotingTrendResultDTO>().ok(issueVoteStatisticalService.votingTrendV2(issueId));
}
/**
* @Description 满意度评价列表已关闭
* @param formDTO
@ -196,6 +202,7 @@ public class IssueManageController {
@PostMapping("progress")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<List<ProcessListResultDTO>> processList(@RequestBody IssueIdFormDTO issueId){
ValidatorUtils.validateEntity(issueId);
return new Result<List<ProcessListResultDTO>>().ok(issueProcessService.processList(issueId));
}

10
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueProcessController.java

@ -27,6 +27,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IssueProcessDTO;
import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.result.IssueAdvanceResDTO;
import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.excel.IssueProcessExcel;
import com.epmet.service.IssueProcessService;
@ -103,4 +104,13 @@ public class IssueProcessController {
return new Result<List<ProcessListResultDTO>>().ok(issueProcessService.processList(issueId));
}
/**
* 议题的处理进展(只包含发起议题关闭议题)
* @param issueId
* @return
*/
@PostMapping("issueprocess")
public Result<IssueAdvanceResDTO> queryIssueProcess(@RequestBody IssueIdFormDTO issueId){
return new Result<IssueAdvanceResDTO>().ok(issueProcessService.queryIssueProcess(issueId));
}
}

26
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,28 @@ public interface IssueApplicationDao extends BaseDao<IssueApplicationEntity> {
*/
List<String> selectTopicIdList(@Param("topicIdList") List<String> topicIdList);
/**
* Desc: 待审核驳回列表
* @param formDTO
* @author zxc
* @date 2022/10/10 13:42
*/
List<AuditListResultDTO> auditList(AuditListFormDTO formDTO);
/**
* Desc: 补全数据
* @param
* @author zxc
* @date 2022/10/10 13:42
*/
List<IssueApplicationDTO> initIssueApplicationHistoryData();
/**
* Desc: 批量更新议题审核组织信息
* @param list
* @author zxc
* @date 2022/10/10 13:42
*/
void updateIssueApplication(List<IssueApplicationDTO> list);
}

16
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<IssueAttachmentEntity> {
}

2
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueCategoryDao.java

@ -42,7 +42,7 @@ public interface IssueCategoryDao extends BaseDao<IssueCategoryEntity> {
* @Description 查询议题绑定的分类名称按排序升序
* @Author sun
**/
List<IssueCategoryTagResultDTO> selectIssueCategoryList(@Param("issueId") String issueId);
List<IssueCategoryTagResultDTO> selectIssueCategoryList(@Param("customerId")String customerId,@Param("issueId") String issueId);
/**
* @param formDTO

8
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java

@ -308,4 +308,12 @@ public interface IssueDao extends BaseDao<IssueEntity> {
*/
Integer selectAuditIssue(@Param("gridId")String gridId);
/**
* 根据议题ids查询议题简要信息
* @param issueIds
* @return
*/
List<IssueProfileDTO> selectIssueProfile(@Param("issueIds") List<String> issueIds);
List<AllIssueListResultDTO> allIssueList(AllIssueListFormDTO formDTO);
}

15
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
*/
@ -85,4 +88,16 @@ public class IssueApplicationEntity extends BaseEpmetEntity {
*/
private String approveStaffId;
private String address;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
}

82
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;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
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;
}

17
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事件ic_event
*/
private String sourceType;
@ -112,4 +112,19 @@ public class IssueEntity extends BaseEpmetEntity {
*/
private Date closedTime;
/**
* 地址
*/
private String address;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
}

42
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/AllIssueListExportExcel.java

@ -0,0 +1,42 @@
package com.epmet.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
/**
* @Author zxc
* @DateTime 2022/10/11 16:30
* @DESC
*/
@Data
public class AllIssueListExportExcel {
@ExcelProperty(value = "所属网格")
@ColumnWidth(20)
private String gridName;
@ExcelProperty(value = "议题标题")
@ColumnWidth(20)
private String issueTitle;
@ExcelProperty(value = "议题建议")
@ColumnWidth(20)
private String suggestion;
@ExcelProperty(value = "议题创建时间")
@ColumnWidth(20)
private String createdTime;
@ExcelProperty(value = "支持数")
@ColumnWidth(20)
private Integer supportCount;
@ExcelProperty(value = "反对数")
@ColumnWidth(20)
private Integer oppositionCount;
@ExcelProperty(value = "议题状态")
@ColumnWidth(20)
private String issueStatusName;
}

34
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/excel/AuditListExportExcel.java

@ -0,0 +1,34 @@
package com.epmet.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
/**
* @Author zxc
* @DateTime 2022/10/11 16:45
* @DESC
*/
@Data
public class AuditListExportExcel {
@ExcelProperty(value = "所属网格")
@ColumnWidth(20)
private String gridName;
@ExcelProperty(value = "议题标题")
@ColumnWidth(20)
private String issueTitle;
@ExcelProperty(value = "议题建议")
@ColumnWidth(20)
private String suggestion;
@ExcelProperty(value = "状态")
@ColumnWidth(20)
private String applyStatusName;
@ExcelProperty(value = "提交审核时间")
@ColumnWidth(20)
private String applyTime;
}

8
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/GovProjectFeignClient.java

@ -2,11 +2,9 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.ProcessProjectIdFormDTO;
import com.epmet.dto.form.ShiftProjectFormDTO;
import com.epmet.dto.form.ShiftProjectsFromDTO;
import com.epmet.dto.result.IssueProjectResultDTO;
import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.dto.result.ShiftProjectResultDTO;
import com.epmet.feign.fallback.GovProjectFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
@ -43,9 +41,9 @@ public interface GovProjectFeignClient {
/**
* @Description 议题处理进展已转项目
* @param formDTO
* @param formDTO 该方法已经放到了GovProjectOpenFeignClient
* @author zxc
*/
*//*
@PostMapping("/gov/project/projectprocess/projectprocesslist")
Result<List<ProcessListResultDTO>> projectProcessList(@RequestBody ProcessProjectIdFormDTO formDTO);
Result<List<ProcessListResultDTO>> projectProcessList(@RequestBody ProcessProjectIdFormDTO formDTO);*/
}

7
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/feign/fallback/GovProjectFeignClientFallBack.java

@ -3,11 +3,9 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.ProcessProjectIdFormDTO;
import com.epmet.dto.form.ShiftProjectFormDTO;
import com.epmet.dto.form.ShiftProjectsFromDTO;
import com.epmet.dto.result.IssueProjectResultDTO;
import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.dto.result.ShiftProjectResultDTO;
import com.epmet.feign.GovProjectFeignClient;
import org.springframework.stereotype.Component;
@ -26,10 +24,11 @@ public class GovProjectFeignClientFallBack implements GovProjectFeignClient {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getProjectByIssue", fromDTO);
}
@Override
//该方法已经放到了GovProjectOpenFeignClient
/*@Override
public Result<List<ProcessListResultDTO>> projectProcessList(ProcessProjectIdFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "projectProcessList", formDTO);
}
}*/
@Override
public Result<IssueProjectResultDTO> issueShiftProject(ShiftProjectFormDTO formDTO) {

9
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;
@ -32,6 +34,8 @@ import com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationHistoryResultDTO;
import com.epmet.resi.group.dto.group.result.ApplicationListResultDTO;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@ -150,4 +154,9 @@ public interface IssueApplicationService extends BaseService<IssueApplicationEnt
* @author sun
*/
List<String> notIssueToTopicIds(List<String> topicIdList);
PageData<AuditListResultDTO> auditList(AuditListFormDTO formDTO);
void auditListExport(AuditListFormDTO formDTO, HttpServletResponse response) throws IOException;
void initIssueApplicationHistoryData();
}

78
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<IssueAttachmentEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IssueAttachmentDTO>
* @author generator
* @date 2022-09-30
*/
PageData<IssueAttachmentDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IssueAttachmentDTO>
* @author generator
* @date 2022-09-30
*/
List<IssueAttachmentDTO> list(Map<String, Object> 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);
}

2
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueCategoryService.java

@ -27,6 +27,7 @@ import com.epmet.dto.result.IssueCategoryTagListResultDTO;
import com.epmet.dto.result.ProjectCategoryTagResultDTO;
import com.epmet.entity.IssueCategoryEntity;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -132,4 +133,5 @@ public interface IssueCategoryService extends BaseService<IssueCategoryEntity> {
**/
void saveCategory(IssueSaveCategoryFormDTO formDTO);
void delByIssueId(String issueId, String userId, Date delTime);
}

8
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueProcessService.java

@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IssueProcessDTO;
import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.result.IssueAdvanceResDTO;
import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.entity.IssueProcessEntity;
@ -109,4 +110,11 @@ public interface IssueProcessService extends BaseService<IssueProcessEntity> {
* @date 2020.05.13 16:42
**/
int insertOne(IssueProcessDTO issueProcessDTO);
/**
* 议题的处理进展(只包含发起议题关闭议题)
* @param issueId
* @return
*/
IssueAdvanceResDTO queryIssueProcess(IssueIdFormDTO issueId);
}

42
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java

@ -14,6 +14,8 @@ 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 javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -343,6 +345,7 @@ public interface IssueService extends BaseService<IssueEntity> {
/**
* 无需解决解决列表
* 无需解决结案选择无需解决的项目关闭选择无需解决的议题
* @author zhaoqifeng
* @date 2021/7/27 16:58
* @param fromDTO
@ -384,4 +387,43 @@ public interface IssueService extends BaseService<IssueEntity> {
*/
Boolean issueAuditReset(String gridId);
/**
* Desc: 创建议题直接创建
* @param issueDTO
* @author zxc
* @date 2022/10/8 09:03
*/
void createIssue(IssueDTO issueDTO);
/**
* 根据议题ids查询议题简要信息
* @param issueIds
* @return
*/
List<IssueProfileDTO> getIssueProfile(List<String> issueIds);
/**
* Desc: 查询所有议题
* @param formDTO
* @author zxc
* @date 2022/10/9 16:58
*/
PageData<AllIssueListResultDTO> allIssueList(AllIssueListFormDTO formDTO);
void allIssueListExport(AllIssueListFormDTO formDTO, HttpServletResponse response) throws IOException;
/**
* 发布议题
* 事件转议题
* @param issueFormDTO
* @return
*/
IssueDTO publishIssue(PublishIssueFormDTO issueFormDTO);
/**
* 删除事件时事件转了议题调用此方法删除议题
* 批量删除议题议题如果转了项目此方法不删除项目
* @param delIssueFormDTO
* @return 删除的议题中转为了项目返回议题id上层再单独去删除项目
*/
List<String> deleteIssueInternal(DelIssueFormDTO delIssueFormDTO);
}

3
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueTagsService.java

@ -26,6 +26,7 @@ import com.epmet.dto.form.IssueTagsSaveFormDTO;
import com.epmet.dto.result.AddTagResultDTO;
import com.epmet.entity.IssueTagsEntity;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -122,4 +123,6 @@ public interface IssueTagsService extends BaseService<IssueTagsEntity> {
* @date 2020/12/10 上午9:37
*/
void issueTagSave(IssueTagsSaveFormDTO form, TokenDto tokenDto);
void delByIssueId(String issueId, String userId, Date delTime);
}

6
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;
@ -115,6 +116,7 @@ public interface IssueVoteStatisticalService extends BaseService<IssueVoteStatis
* @author zxc
*/
VotingTrendResultDTO votingTrend(IssueIdFormDTO issueId);
VotingTrendResultDTO votingTrendV2(IssueIdFormDTO issueId);
/**
* @Description 满意度评价列表已关闭
@ -152,14 +154,12 @@ public interface IssueVoteStatisticalService extends BaseService<IssueVoteStatis
/**
* @Description 对指定的issueId的议题表决统计数缓存与Db同步
* @param issueId
* @param gridId
* @parma statisticalId
* @return
* @author wangc
* @date 2020.05.21 09:09
**/
void syncVotingCacheToDbByParams(String issueId,String gridId,String statisticalId);
void syncVotingCacheToDbByParams(IssueEntity issueEntity, String statisticalId);
/**
* @Description 个人中心-我参与的议题列表

6
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationHistoryServiceImpl.java

@ -26,6 +26,7 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IssueApplicationHistoryDao;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.IssueApplicationHistoryDTO;
import com.epmet.dto.form.ApplicationDetailWorkFormDTO;
import com.epmet.dto.form.ApplicationHistoryWorkFormDTO;
@ -37,6 +38,7 @@ import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.result.ApplicationDetailCopyResultDTO;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.service.IssueApplicationHistoryService;
import com.epmet.service.IssueApplicationService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -62,6 +64,8 @@ public class IssueApplicationHistoryServiceImpl extends BaseServiceImpl<IssueApp
private ResiGroupOpenFeignClient resiGroupOpenFeignClient;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private IssueApplicationService issueApplicationService;
@Override
public PageData<IssueApplicationHistoryDTO> page(Map<String, Object> params) {
@ -136,6 +140,8 @@ public class IssueApplicationHistoryServiceImpl extends BaseServiceImpl<IssueApp
public ApplicationDetailWorkResultDTO applicationDetailWork(ApplicationDetailWorkFormDTO applicationDetailWorkFormDTO) {
ApplicationDetailFormDTO formDTO = new ApplicationDetailFormDTO();
formDTO.setIssueApplicationId(applicationDetailWorkFormDTO.getIssueApplicationId());
IssueApplicationDTO issueApplicationDTO = issueApplicationService.get(applicationDetailWorkFormDTO.getIssueApplicationId());
formDTO.setTopicIdIsNull(StringUtils.isBlank(issueApplicationDTO.getTopicId()));
Result<ApplicationDetailCopyResultDTO> result = resiGroupOpenFeignClient.applicationDetail(formDTO);
if (!result.success()){
throw new RenException("工作端查询待审核||已驳回 申请详情失败......");

125
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueApplicationServiceImpl.java

@ -17,19 +17,39 @@
package com.epmet.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
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.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.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.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
import com.epmet.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.AllIssueListResultDTO;
import com.epmet.dto.result.AuditListResultDTO;
import com.epmet.dto.result.IssueApplicationResDTO;
import com.epmet.dto.result.UserPubAuditingIssueResDTO;
import com.epmet.entity.IssueApplicationEntity;
import com.epmet.excel.AllIssueListExportExcel;
import com.epmet.excel.AuditListExportExcel;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationHistoryFormDTO;
import com.epmet.resi.group.dto.group.form.ApplicationListFormDTO;
@ -39,13 +59,17 @@ 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 lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
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;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
/**
* 话题转议题申请表
@ -54,6 +78,7 @@ import java.util.Map;
* @since v1.0.0 2020-11-17
*/
@Service
@Slf4j
public class IssueApplicationServiceImpl extends BaseServiceImpl<IssueApplicationDao, IssueApplicationEntity> implements IssueApplicationService {
@Override
@ -186,4 +211,98 @@ public class IssueApplicationServiceImpl extends BaseServiceImpl<IssueApplicatio
return idList;
}
@Override
public PageData<AuditListResultDTO> auditList(AuditListFormDTO formDTO) {
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<AuditListResultDTO> result = new PageData<>(new ArrayList(),NumConstant.ZERO_L);
if (formDTO.getIsPage()){
PageInfo<AuditListResultDTO> 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<AuditListResultDTO> 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
public void auditListExport(AuditListFormDTO formDTO, HttpServletResponse response) throws IOException {
ExcelWriter excelWriter = null;
formDTO.setPageNo(NumConstant.ONE);
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
try {
String fileName = "议题审核列表" + DateUtils.format(new Date()) + ".xlsx";
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), AuditListExportExcel.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build();
List<AuditListExportExcel> list = null;
do {
PageData<AuditListResultDTO> data = auditList(formDTO);
list = ConvertUtils.sourceToTarget(data.getList(), AuditListExportExcel.class);
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE);
excelWriter.write(list, writeSheet);
} while (CollectionUtils.isNotEmpty(list) && list.size() == formDTO.getPageSize());
} catch (EpmetException e) {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setHeader("content-type", "application/json; charset=UTF-8");
PrintWriter printWriter = response.getWriter();
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),e.getMsg());
printWriter.write(JSON.toJSONString(result));
printWriter.close();
} catch (Exception e) {
log.error("export exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
@Override
public void initIssueApplicationHistoryData() {
Integer no = NumConstant.ONE;
Integer size;
do {
PageInfo<IssueApplicationDTO> pageInfo = PageHelper.startPage(no, NumConstant.ONE_HUNDRED).doSelectPageInfo(() -> baseDao.initIssueApplicationHistoryData());
List<IssueApplicationDTO> list = pageInfo.getList();
size = list.size();
if (CollectionUtils.isNotEmpty(list)){
for (IssueApplicationDTO l : list) {
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(l.getGridId());
if (null == gridInfo){
log.warn("查询网格信息失败:"+l.getGridId());
continue;
}
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<IssueApplicationDTO> list){
baseDao.updateIssueApplication(list);
}
}

82
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<IssueAttachmentDao, IssueAttachmentEntity> implements IssueAttachmentService {
@Override
public PageData<IssueAttachmentDTO> page(Map<String, Object> params) {
IPage<IssueAttachmentEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IssueAttachmentDTO.class);
}
@Override
public List<IssueAttachmentDTO> list(Map<String, Object> params) {
List<IssueAttachmentEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IssueAttachmentDTO.class);
}
private QueryWrapper<IssueAttachmentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IssueAttachmentEntity> 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));
}
}

17
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueCategoryServiceImpl.java

@ -18,6 +18,7 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
@ -44,10 +45,7 @@ import org.springframework.beans.factory.annotation.Autowired;
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;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -130,7 +128,7 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl<IssueCategoryDao,
public IssueCategoryTagListResultDTO categoryTagList(IssueCategoryTagListFormDTO formDTO) {
IssueCategoryTagListResultDTO resultDTO = new IssueCategoryTagListResultDTO();
//1.查询议题绑定的分类名称,按排序升序
List<IssueCategoryTagResultDTO> categoryList = baseDao.selectIssueCategoryList(formDTO.getIssueId());
List<IssueCategoryTagResultDTO> categoryList = baseDao.selectIssueCategoryList(formDTO.getCustomerId(),formDTO.getIssueId());
if (categoryList.size() > NumConstant.ZERO) {
resultDTO.setCategoryList(categoryList);
}
@ -224,4 +222,13 @@ public class IssueCategoryServiceImpl extends BaseServiceImpl<IssueCategoryDao,
}
@Override
public void delByIssueId(String issueId, String userId, Date delTime) {
LambdaUpdateWrapper<IssueCategoryEntity> wrapper = new LambdaUpdateWrapper();
wrapper.eq(IssueCategoryEntity::getIssueId, issueId)
.set(IssueCategoryEntity::getUpdatedTime, delTime)
.set(IssueCategoryEntity::getUpdatedBy, userId)
.set(IssueCategoryEntity::getDelFlag, NumConstant.ONE_STR);
baseDao.update(null, wrapper);
}
}

57
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java

@ -21,6 +21,8 @@ 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.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.utils.ConvertUtils;
@ -32,9 +34,12 @@ import com.epmet.dto.IssueDTO;
import com.epmet.dto.IssueProcessDTO;
import com.epmet.dto.form.IssueIdFormDTO;
import com.epmet.dto.form.ProcessProjectIdFormDTO;
import com.epmet.dto.result.IssueAdvanceResDTO;
import com.epmet.dto.result.ProcessListResultDTO;
import com.epmet.dto.result.ProcessListResultDTOBak;
import com.epmet.dto.result.ProjectProcessListResultDTO;
import com.epmet.entity.IssueProcessEntity;
import com.epmet.feign.GovProjectFeignClient;
import com.epmet.feign.GovProjectOpenFeignClient;
import com.epmet.service.IssueProcessService;
import com.epmet.service.IssueService;
import org.apache.commons.lang3.StringUtils;
@ -60,11 +65,11 @@ public class IssueProcessServiceImpl extends BaseServiceImpl<IssueProcessDao, Is
@Autowired
private IssueService issueService;
@Autowired
private GovProjectFeignClient govProjectFeignClient;
@Autowired
private IssueProjectRelationDao issueProjectRelationDao;
@Autowired
private IssueProcessDao issueProcessDao;
@Autowired
private GovProjectOpenFeignClient govProjectOpenFeignClient;
@Override
public PageData<IssueProcessDTO> page(Map<String, Object> params) {
@ -140,33 +145,61 @@ public class IssueProcessServiceImpl extends BaseServiceImpl<IssueProcessDao, Is
public List<ProcessListResultDTO> processList(IssueIdFormDTO issueId) {
List<ProcessListResultDTO> listResult = new ArrayList<ProcessListResultDTO>();
IssueDTO issueDTO = issueService.get(issueId.getIssueId());
if(null==issueDTO){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"议题不存在","议题不存在");
}
String issueStatus = issueDTO.getIssueStatus();
if (issueStatus.equals(IssueConstant.ISSUE_CLOSED)){
//已关闭——处理进展
listResult = baseDao.issueProcess(issueId);
return listResult;
}else if (issueStatus.equals(IssueConstant.ISSUE_SHIFT_PROJECT)){
//已转项目——处理进展
String projectId = issueProjectRelationDao.selectProjectIdByIssueId(issueId.getIssueId());
if (!StringUtils.isBlank(projectId)) {
ProcessProjectIdFormDTO formDTO = new ProcessProjectIdFormDTO();
formDTO.setProjectId(projectId);
Result<List<ProcessListResultDTO>> resultDTO = govProjectFeignClient.projectProcessList(formDTO);
Result<List<ProjectProcessListResultDTO>> resultDTO = govProjectOpenFeignClient.projectProcessList(formDTO);
if (!resultDTO.success()){
throw new RenException(IssueConstant.PROJECT_PROCESS_LIST_FAILURE);
}
if (!CollectionUtils.isEmpty(resultDTO.getData())){
listResult = resultDTO.getData();
}
//转议题信息
ProcessListResultDTO issueProcessResultDTO = issueProcessDao.issueBeginInfo(issueId);
if (null != issueProcessResultDTO) {
listResult.add(issueProcessResultDTO);
listResult.addAll(ConvertUtils.sourceToTarget(resultDTO.getData(),ProcessListResultDTO.class));
}
}
}else {
return new ArrayList<>();
}
//转议题信息
ProcessListResultDTO issueProcessResultDTO = issueProcessDao.issueBeginInfo(issueId);
if (null != issueProcessResultDTO) {
listResult.add(issueProcessResultDTO);
}
return listResult;
}
/**
* 议题处理进展(只包含发起议题关闭议题)
*
* @param issueId
* @return
*/
@Override
public IssueAdvanceResDTO queryIssueProcess(IssueIdFormDTO issueId) {
IssueDTO issueDTO = issueService.get(issueId.getIssueId());
List<ProcessListResultDTO> processList=new ArrayList<>();
if (issueDTO.getIssueStatus().equals(IssueConstant.ISSUE_CLOSED)){
//已关闭——处理进展
processList = baseDao.issueProcess(issueId);
}else{
//转议题信息
ProcessListResultDTO issueProcessResultDTO = issueProcessDao.issueBeginInfo(issueId);
if (null != issueProcessResultDTO) {
processList.add(issueProcessResultDTO);
}
}
IssueAdvanceResDTO issueAdvanceResDTO=new IssueAdvanceResDTO();
issueAdvanceResDTO.setIssueId(issueDTO.getId());
issueAdvanceResDTO.setIssueStatus(issueDTO.getIssueStatus());
issueAdvanceResDTO.setProcessList(ConvertUtils.sourceToTarget(processList, ProcessListResultDTOBak.class));
return issueAdvanceResDTO;
}
}

5
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSatisfactionDetailServiceImpl.java

@ -178,10 +178,9 @@ public class IssueSatisfactionDetailServiceImpl extends BaseServiceImpl<IssueSat
InitEvaluationFormDTO initEvaluation = new InitEvaluationFormDTO();
BeanUtils.copyProperties(formDTO,initEvaluation);
EvaluateInfoDTO evaluateInfoDTO = baseDao.checkSatisfaction(initEvaluation);
if (evaluateInfoDTO!=null){
throw new RenException(EpmetErrorCode.ALREADY_EVALUATE.getCode());
if (null == evaluateInfoDTO) {
baseDao.insert(entity);
}
baseDao.insert(entity);
}
/**

688
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -1,15 +1,21 @@
package com.epmet.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.alibaba.nacos.client.utils.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.rocketmq.messages.GroupAchievementMQMsg;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.distributedlock.DistributedLock;
import com.epmet.commons.tools.dto.commondto.IcEventComDTO;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.AchievementTypeEnum;
import com.epmet.commons.tools.enums.EventEnum;
@ -17,14 +23,17 @@ 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.ImgScanParamDTO;
import com.epmet.commons.tools.scan.param.ImgTaskDTO;
import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.IssueConstant;
import com.epmet.constant.ReadFlagConstant;
@ -39,12 +48,12 @@ 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.excel.AllIssueListExportExcel;
import com.epmet.feign.*;
import com.epmet.redis.GovIssueRedis;
import com.epmet.redis.IssueVoteDetailRedis;
import com.epmet.resi.group.constant.TopicConstant;
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO;
import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO;
@ -71,10 +80,16 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
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
@ -140,12 +155,16 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> 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<IssueDTO> page(Map<String, Object> params) {
@ -209,13 +228,8 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
//议题信息
IssueResultDTO issueResult = issueDao.issueDetail(issueDetail);
if (null != issueResult && StringUtils.isNotBlank(issueResult.getGridId())) {
BelongGridNameFormDTO formDTO = new BelongGridNameFormDTO();
formDTO.setGridId(issueResult.getGridId());
Result<BelongGridNameResultDTO> 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);
}
return issueResult;
}
@ -376,8 +390,11 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> 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<String, Object> applicationParam = new HashMap<>();
applicationParam.put(ModuleConstants.FIELD_JAVA_TOPIC_ID, param.getTopicId());
@ -390,6 +407,8 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> 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);
@ -558,8 +577,6 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
app2update.setIssueId(issueResult.getIssueId());
}
}else {
throw new RenException(topicInfo.getInternalMsg());
}
@ -591,7 +608,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> 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();
}
@ -606,7 +623,8 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
@Override
public List<VotingIssueListResultDTO> votingList(CommonIssueListFormDTO issueListForm) {
PageHelper.startPage(issueListForm.getPageNo(), issueListForm.getPageSize(), issueListForm.getIsPage());
return baseDao.selectVotingList(issueListForm);
List<VotingIssueListResultDTO> resultList=baseDao.selectVotingList(issueListForm);
return resultList;
}
/**
@ -619,7 +637,8 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
@Override
public List<ClosedIssueListResultDTO> closedList(CommonIssueListFormDTO issueListForm) {
PageHelper.startPage(issueListForm.getPageNo(), issueListForm.getPageSize(), issueListForm.getIsPage());
return baseDao.selectClosedList(issueListForm);
List<ClosedIssueListResultDTO> resultDTOList=baseDao.selectClosedList(issueListForm);
return resultDTOList;
}
/**
@ -633,7 +652,11 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
public GovIssueDetailResultDTO issueDetailGov(IssueDetailFormDTO issueParam) {
//1.得到议题信息
IssueEntity issueDetail = selectById(issueParam.getIssueId());
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(issueDetail.getGridId());
if(null == gridInfo){
throw new EpmetException("查询网格信息失败"+issueDetail.getGridId());
}
GovIssueDetailResultDTO issueInfo = new GovIssueDetailResultDTO();
//2.1如果此条议题来源自话题
if(StringUtils.equals(ModuleConstants.ISSUE_FROM_TOPIC,issueDetail.getSourceType())){
GovTopicIssueInfoFormDTO topicParam = new GovTopicIssueInfoFormDTO();
@ -645,10 +668,11 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
resiGroupFeignClient.topicInfoForIssueDetailGov(topicParam);
if(topicResult.success() && null != topicResult.getData()){
GovTopicOfIssueInfoResultDTO topicInfo = ConvertUtils.sourceToTarget(topicResult.getData(),GovTopicOfIssueInfoResultDTO.class);
GovIssueDetailResultDTO issueInfo = ConvertUtils.sourceToTarget(topicResult.getData(),GovIssueDetailResultDTO.class);
issueInfo = ConvertUtils.sourceToTarget(topicResult.getData(),GovIssueDetailResultDTO.class);
issueInfo.setIssueStatus(issueDetail.getIssueStatus());
issueInfo.setIssueSuggestion(issueDetail.getSuggestion());
issueInfo.setIssueTitle(issueDetail.getIssueTitle());
issueInfo.setSourceId(issueDetail.getSourceId());
issueInfo.setVotingDeadline(null == issueDetail.getVotingDeadline()
? NumConstant.ZERO_L : issueDetail.getVotingDeadline().getTime()/NumConstant.ONE_THOUSAND);
issueInfo.setTopicInfo(topicInfo);
@ -660,6 +684,29 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return issueInfo;
}
//查询话题失败异常
}else if (ModuleConstants.ISSUE.equals(issueDetail.getSourceType())){
issueInfo = ConvertUtils.sourceToTarget(issueDetail,GovIssueDetailResultDTO.class);
issueInfo.setIssueSuggestion(issueDetail.getSuggestion());
Result<List<UserBaseInfoResultDTO>> userResult = userOpenFeignClient.queryUserBaseInfo(Arrays.asList(issueDetail.getCreatedBy()));
if (!userResult.success() || CollectionUtils.isEmpty(userResult.getData())){
throw new EpmetException("查询居民信息失败");
}
UserBaseInfoResultDTO user = userResult.getData().get(NumConstant.ZERO);
issueInfo.setIssueInitiator(user.getShowName());
issueInfo.setIssuePublisherMobile(user.getMobile());
issueInfo.setBelongsGridName(gridInfo.getGridNamePath());
return issueInfo;
}else {
issueInfo = ConvertUtils.sourceToTarget(issueDetail,GovIssueDetailResultDTO.class);
issueInfo.setIssueSuggestion(issueDetail.getSuggestion());
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(issueDetail.getCustomerId(), issueDetail.getCreatedBy());
if (null == staffInfo){
throw new EpmetException("查询工作人员信息失败:"+issueDetail.getCreatedBy());
}
issueInfo.setIssueInitiator(staffInfo.getRealName());
issueInfo.setIssuePublisherMobile(staffInfo.getMobile());
issueInfo.setBelongsGridName(gridInfo.getGridNamePath());
return issueInfo;
}
return null;
@ -675,50 +722,37 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
@Transactional(rollbackFor = Exception.class)
public void closeIssue(CloseIssueFormDTO formDTO) {
//公开回复内容审核
if (StringUtils.isNotBlank(formDTO.getCloseReason())) {
TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
TextTaskDTO taskDTO = new TextTaskDTO();
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
taskDTO.setContent(formDTO.getCloseReason());
textScanParamDTO.getTasks().add(taskDTO);
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
if (!textSyncScanResult.success()){
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
}
}
checkCloseReason(formDTO.getCloseReason());
Date date = new Date();
Date nowTime = new Date();
//1:更新议题详情表数据
IssueEntity entity = baseDao.selectById(formDTO.getIssueId());
if (null == entity) {
throw new RenException(IssueConstant.SELECT_EXCEPTION);
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),IssueConstant.SELECT_EXCEPTION,"议题不存在");
}
if (IssueConstant.ISSUE_CLOSED.equals(entity.getIssueStatus())) {
throw new RenException(IssueConstant.OPERATION_EXCEPTION);
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),IssueConstant.OPERATION_EXCEPTION,"议题不存在");
}
entity.setIssueStatus(IssueConstant.ISSUE_CLOSED);
entity.setCloseReason(formDTO.getCloseReason());
entity.setResolveType(formDTO.getResolveType());
entity.setVotingDeadline(date);
entity.setClosedTime(date);
entity.setVotingDeadline(nowTime);
entity.setClosedTime(nowTime);
if (baseDao.updateById(entity) < NumConstant.ONE) {
throw new RenException(IssueConstant.UPPDATE_EXCEPTION);
}
//2:调用gov-org服务,查询组织网格名称
AgencyGridResultDTO agencyGridResultDTO = new AgencyGridResultDTO();
/*AgencyGridResultDTO agencyGridResultDTO = new AgencyGridResultDTO();
agencyGridResultDTO.setAgencyId(entity.getOrgId());
agencyGridResultDTO.setGridId(entity.getGridId());
Result<AgencyGridResultDTO> resultDTO = govOrgFeignClient.getAgencyAndGrid(agencyGridResultDTO);
if (!resultDTO.success() || null == resultDTO.getData()) {
throw new RenException(IssueConstant.SELECT_GOV_ORG_EXCEPTION);
}
agencyGridResultDTO = resultDTO.getData();
agencyGridResultDTO = resultDTO.getData();*/
//上面代码注释,改用缓存
GridInfoCache gridInfoCache=CustomerOrgRedis.getGridInfo(entity.getGridId());
//3:议题进展记录表新增数据
IssueProcessEntity processEntity = new IssueProcessEntity();
processEntity.setIssueId(formDTO.getIssueId());
@ -726,30 +760,28 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
processEntity.setOrgType(IssueConstant.ISSUE_GRID);
processEntity.setOrgId(entity.getGridId());
processEntity.setOperationExplain(formDTO.getCloseReason());
processEntity.setOrgName(agencyGridResultDTO.getAgencyName() + "-" + agencyGridResultDTO.getGridName());
// processEntity.setOrgName(agencyGridResultDTO.getAgencyName() + "-" + agencyGridResultDTO.getGridName());
processEntity.setOrgName(gridInfoCache.getGridNamePath());
processEntity.setCreatedTime(nowTime);
processEntity.setUpdatedTime(nowTime);
processEntity.setCustomerId(entity.getCustomerId());
issueProcessDao.insert(processEntity);
//4:调用epmet-message服务,给居民端话题创建人和议题发起人发送消息
//4.1:调用resi-group查询话题创建人数据(目前议题来源只有来自话题)
Result<ResiTopicDTO> resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId());
if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) {
throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION);
}
ResiTopicDTO topicDTO = resultTopicDTO.getData();
//4.2:创建消息模板
String messageContent = "";
if (IssueConstant.ISSUE_RESOLVED.equals(formDTO.getResolveType())) {
messageContent = String.format(UserMessageConstant.ISSUE_RESOLVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason());
} else if (IssueConstant.ISSUE_UNRESOLVED.equals(formDTO.getResolveType())) {
messageContent = String.format(UserMessageConstant.ISSUE_UNRESOLVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason());
}
//4.3:调用服务,发送消息
if (!saveUserMessageList(topicDTO, messageContent, entity).success()) {
throw new RenException(IssueConstant.SAVE_MSG_EXCEPTION);
}
//4.4:2020.10.26 添加推送微信订阅消息功能 sun
if (!saveWxmpMessageList(topicDTO, messageContent, entity).success()) {
logger.error("议题关闭,推送微信订阅消息失败!");
if (entity.getSourceType().equals(ModuleConstants.ISSUE_FROM_TOPIC)){
//4.1:调用resi-group查询话题创建人数据(目前议题来源只有来自话题)
sendToTopicAndShiftIssueResiUser(entity.getSourceId(),formDTO.getResolveType(),entity,formDTO.getCloseReason());
}else if(entity.getSourceType().equals("ic_event")){
ColseProjectOrDemandFormDTO colseProjectOrDemandFormDTO=new ColseProjectOrDemandFormDTO();
colseProjectOrDemandFormDTO.setCustomerId(entity.getCustomerId());
colseProjectOrDemandFormDTO.setIcEventId(entity.getSourceId());
colseProjectOrDemandFormDTO.setType("issue");
colseProjectOrDemandFormDTO.setUserId(formDTO.getCurrentUserId());
colseProjectOrDemandFormDTO.setCloseCaseTime(nowTime);
Result result = govProjectOpenFeignClient.closeProjectOrDemand(colseProjectOrDemandFormDTO);
if (!result.success()) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"议题关闭异常,该议题来源于事件,回写事件信息失败","议题关闭异常:事件办结异常");
}
}
try {
@ -757,12 +789,57 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
SelectIssueVotingDetailFormDTO dto = new SelectIssueVotingDetailFormDTO();
dto.setGridId(entity.getGridId());
dto.setIssueId(formDTO.getIssueId());
dto.setSourceType(entity.getSourceType());
issueVoteDetailService.updateVote(dto);
}catch (RenException e){
logger.error(e.getInternalMsg());
}
}
/**
* 议题关闭时填写的关闭理由走内容审核
* @param closeReason
*/
private void checkCloseReason(String closeReason) {
if (StringUtils.isNotBlank(closeReason)) {
TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
TextTaskDTO taskDTO = new TextTaskDTO();
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
taskDTO.setContent(closeReason);
textScanParamDTO.getTasks().add(taskDTO);
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
if (!textSyncScanResult.success()) {
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
}
}
}
private void sendToTopicAndShiftIssueResiUser(String topicId,String resolveType,IssueEntity issueEntity,String closeReason) {
Result<ResiTopicDTO> resultTopicDTO = resiGroupFeignClient.getTopicById(topicId);
if (resultTopicDTO.success() &&null != resultTopicDTO.getData()) {
ResiTopicDTO topicDTO = resultTopicDTO.getData();
//4.2:创建消息模板
String messageContent = "";
if (IssueConstant.ISSUE_RESOLVED.equals(resolveType)) {
messageContent = String.format(UserMessageConstant.ISSUE_RESOLVED_MSG, topicDTO.getTopicContent(), closeReason);
} else if (IssueConstant.ISSUE_UNRESOLVED.equals(resolveType)) {
messageContent = String.format(UserMessageConstant.ISSUE_UNRESOLVED_MSG, topicDTO.getTopicContent(), closeReason);
}
//4.3:调用服务,发送消息
if (!saveUserMessageList(topicDTO, messageContent, issueEntity).success()) {
throw new RenException(IssueConstant.SAVE_MSG_EXCEPTION);
}
//4.4:2020.10.26 添加推送微信订阅消息功能 sun
if (!saveWxmpMessageList(topicDTO, messageContent, issueEntity).success()) {
logger.warn("议题关闭,推送微信订阅消息失败!");
}
}
}
/**
* @Description 关闭议题时给话题创建人和议题发起人发送消息
* @author sun
@ -938,7 +1015,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
}
try{
issueVoteStatisticalService.syncVotingCacheToDbByParams(formDTO.getIssueId(),entity.getGridId(),null);
issueVoteStatisticalService.syncVotingCacheToDbByParams(entity,null);
}catch(RenException e){
logger.error(e.getInternalMsg());
}
@ -1005,18 +1082,21 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
//因需要保证议题表中的转项目时间与创建项目时间一致 因此先新增项目数据再更新议题数据
//2:调用resi-group查询话题创建人数据(目前议题来源只有来自话题),为了到项目服务初始数据以及发送消息使用
Result<ResiTopicDTO> 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<ResiTopicDTO> 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<IssueTagsDTO> tagList = issueTagsService.getTagsByIssue(formDTO.getIssueId());
formDTO.setTagList(tagList);
// 议题转项目!!!!!!!!!!!!在这步
Result<IssueProjectResultDTO> resultDTO = govProjectFeignClient.issueShiftProject(formDTO);
if (!resultDTO.success() || null == resultDTO.getData()) {
logger.error(resultDTO.getInternalMsg());
@ -1065,9 +1145,9 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> 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());
logger.error("subtractWorkGrassrootsIssueRedDotValue报错:"+e.getInternalMsg());
}
@ -1104,32 +1184,50 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
List<UserMessageFormDTO> 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());
//所选人员如果即在部门下又在网格下则只发一条消息
@ -1161,20 +1259,34 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
*/
private Result wxmpShiftProjectMessage(IssueProjectResultDTO issueProjectResultDTO, ShiftProjectFormDTO formDTO, IssueEntity entity) {
List<WxSubscribeMessageFormDTO> 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);
}
@ -1342,11 +1454,11 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
throw new RenException("查询议题来源网格名称失败......");
}
list.forEach(l -> gridNameList.getData().stream().filter(o -> l.getGridId().equals(o.getGridId())).forEach(o -> l.setTopicReleaseGridName(o.getGridName())));
Result<List<GroupInfoResultDTO>> groupNameList = resiGroupOpenFeignClient.selectGroupInfo(new GroupInfoFormDTO(list.stream().map(m -> m.getTopicId()).collect(Collectors.toList())));
Result<List<GroupInfoResultDTO>> 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("查询议题来源小组名称失败......");
}
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;
}
@ -1500,12 +1612,14 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
if (!CollectionUtils.isEmpty(votedCount)){
userIds.addAll(votedCount);
}
// 话题创建者
Result<String> topicCreatedUser = resiGroupOpenFeignClient.topicCreatedUser(issueEntity.getSourceId());
if (!topicCreatedUser.success()){
throw new RenException("【查询话题创建者失败】["+topicCreatedUser.getMsg()+"]");
if("resi_topic".equals(issueEntity.getSourceType())){
// 话题创建者
Result<String> 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());
}
@ -1572,7 +1686,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
/**
* 无需解决解决列表
*
* 无需解决结案选择无需解决的项目关闭选择无需解决的议题
* @param fromDTO
* @return java.util.List<com.epmet.dto.result.UnResolvedResultDTO>
* @author zhaoqifeng
@ -1581,28 +1695,56 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
@Override
public List<UnResolvedResultDTO> getUnResolvedList(ShiftProjectListFromDTO fromDTO) {
List<UnResolvedResultDTO> resultList = new ArrayList<>();
List<UnResolvedResultDTO> allList = new ArrayList<>();
//1、该网格下已关闭且无需解决的议题
List<UnResolvedResultDTO> issueList = baseDao.selectUnResolvedList(fromDTO.getGridId());
if (CollectionUtils.isNotEmpty(issueList)) {
resultList.addAll(issueList);
allList.addAll(issueList);
}
//2、来源于议题的项目,结案无需解决的项目
List<UnResolvedResultDTO> projectList = govProjectOpenFeignClient.getUnResolvedList(fromDTO).getData();
if (CollectionUtils.isNotEmpty(projectList)) {
resultList.addAll(projectList);
allList.addAll(projectList);
}
if (CollectionUtils.isNotEmpty(resultList)) {
resultList = resultList.stream().sorted(Comparator.comparing(UnResolvedResultDTO::getClosedTime).reversed()).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(allList)) {
allList = allList.stream().sorted(Comparator.comparing(UnResolvedResultDTO::getClosedTime).reversed()).collect(Collectors.toList());
if (fromDTO.getIsPage()) {
int fromIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize();
int toIndex = fromDTO.getPageNo() * fromDTO.getPageSize();
if (fromIndex >= resultList.size()) {
if (fromIndex >= allList.size()) {
return new ArrayList<>();
}
if (toIndex > resultList.size()) {
toIndex = resultList.size();
if (toIndex > allList.size()) {
toIndex = allList.size();
}
resultList = resultList.subList(fromIndex, toIndex);
resultList = allList.subList(fromIndex, toIndex);
}
}
//重新查询一下所有议题的来源类型, 且来源于事件的议题,赋值icEventInfo
List<String> issueIds=resultList.stream().map(i -> i.getIssueId()).collect(Collectors.toList());
List<IssueEntity> issueEntityList = CollectionUtils.isEmpty(issueIds) ? new ArrayList<>() : baseDao.selectBatchIds(issueIds);
if(CollectionUtils.isNotEmpty(issueEntityList)){
Map<String, IcEventDTO> eventMap=new HashMap<>();
// 来源于事件的
List<String> icEventIds = issueEntityList.stream().filter(t -> t.getSourceType().equals("ic_event")).map(i -> i.getSourceId()).collect(Collectors.toList());
if (!org.springframework.util.CollectionUtils.isEmpty(icEventIds)) {
Result<List<IcEventDTO>> eventInfoRes = govProjectOpenFeignClient.batchSelectById(icEventIds);
if (eventInfoRes.success() && !org.springframework.util.CollectionUtils.isEmpty(eventInfoRes.getData())) {
eventMap = eventInfoRes.getData().stream().collect(Collectors.toMap(IcEventDTO::getId, o -> o, (o1, o2) -> o1));
}
}
Map<String,IssueEntity> issueMap=issueEntityList.stream().collect(Collectors.toMap(IssueEntity::getId, o -> o, (o1, o2) -> o1));
Map<String, IcEventDTO> finalEventMap = eventMap;
resultList.forEach(vi -> {
vi.setIssueSourceType(null != issueMap.get(vi.getIssueId()) ? issueMap.get(vi.getIssueId()).getSourceType() : StrConstant.EPMETY_STR);
IcEventDTO event = finalEventMap.get(vi.getSourceId());
if (null != event) {
IcEventComDTO eventComDTO = ConvertUtils.sourceToTarget(event, IcEventComDTO.class);
eventComDTO.setIcEventId(event.getId());
vi.setIcEventInfo(eventComDTO);
}
});
}
return resultList;
}
@ -1766,5 +1908,299 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return false;
}
/**
* Desc: 创建议题直接创建
* @param issueDTO
* @author zxc
* @date 2022/10/8 09:03
*/
@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<SyncScanResult> 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<SyncScanResult> 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());
}
Result<List<UserBaseInfoResultDTO>> userResult = userOpenFeignClient.queryUserBaseInfo(Arrays.asList(issueDTO.getUserId()));
if (!userResult.success() || CollectionUtils.isEmpty(userResult.getData())){
throw new EpmetException("查询居民信息失败:"+issueDTO.getUserId());
}
// 议题 议题进程
issueDTO.setOrgId(gridInfo.getPid());
issueDTO.setOrgIdPath(gridInfo.getPids());
IssueEntity e = ConvertUtils.sourceToTarget(issueDTO, IssueEntity.class);
e.setIssueStatus(ModuleConstants.ISSUE_STATUS_VOTING);
e.setSourceType(ModuleConstants.ISSUE);
e.setDecidedTime(new Date());
baseDao.insert(e);
IssueProcessEntity issueProcessEntity = new IssueProcessEntity();
issueProcessEntity.setIssueId(e.getId());
issueProcessEntity.setIssueStatus(ModuleConstants.ISSUE_STATUS_VOTING);
issueProcessEntity.setOrgType(ModuleConstants.ISSUE_PROCESS_ORG_TYPE_GRID);
issueProcessEntity.setOrgId(issueDTO.getGridId());
UserBaseInfoResultDTO user = userResult.getData().get(NumConstant.ZERO);
issueProcessEntity.setOperationExplain(user.getShowName() + "发表议题【"+issueDTO.getSuggestion()+"】");
issueProcessEntity.setOrgName(gridInfo.getGridNamePath());
issueProcessEntity.setCustomerId(issueDTO.getCustomerId());
issueProcessService.insert(issueProcessEntity);
insertAtt(issueDTO.getAttachmentList(),e.getId(),ModuleConstants.ISSUE,issueDTO.getCustomerId());
}
}
/**
* Desc: 附件插入
* @param sourceList 附件集合
* @param businessId 业务ID
* @param attachTo
* @param customerId
* @author zxc
* @date 2022/10/8 09:01
*/
private void insertAtt(Collection<?> sourceList,String businessId,String attachTo,String customerId){
if (CollectionUtils.isNotEmpty(sourceList)){
List<IssueAttachmentEntity> 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);
}
}
/**
* 根据议题ids查询议题简要信息
*
* @param issueIds
* @return
*/
@Override
public List<IssueProfileDTO> getIssueProfile(List<String> issueIds) {
if(CollectionUtils.isEmpty(issueIds)){
return new ArrayList<>();
}
return baseDao.selectIssueProfile(issueIds);
}
/**
* Desc: 查询所有议题
* @param formDTO
* @author zxc
* @date 2022/10/9 16:58
*/
@Override
public PageData<AllIssueListResultDTO> 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<AllIssueListResultDTO> result = new PageData<>(new ArrayList(),NumConstant.ZERO_L);
if (formDTO.getIsPage()){
PageInfo<AllIssueListResultDTO> 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<AllIssueListResultDTO> allIssueListResultDTOS = baseDao.allIssueList(formDTO);
result.setList(allIssueListResultDTOS);
result.setTotal(allIssueListResultDTOS.size());
}
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());
continue;
}
l.setGridName(gridInfo.getGridNamePath());
}
}
return result;
}
@Override
public void allIssueListExport(AllIssueListFormDTO formDTO, HttpServletResponse response) throws IOException {
ExcelWriter excelWriter = null;
formDTO.setPageNo(NumConstant.ONE);
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
try {
String fileName = "议题管理" + DateUtils.format(new Date()) + ".xlsx";
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), AllIssueListExportExcel.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build();
List<AllIssueListExportExcel> list = null;
do {
PageData<AllIssueListResultDTO> data = allIssueList(formDTO);
list = ConvertUtils.sourceToTarget(data.getList(), AllIssueListExportExcel.class);
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE);
excelWriter.write(list, writeSheet);
} while (CollectionUtils.isNotEmpty(list) && list.size() == formDTO.getPageSize());
} catch (EpmetException e) {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setHeader("content-type", "application/json; charset=UTF-8");
PrintWriter printWriter = response.getWriter();
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),e.getMsg());
printWriter.write(JSON.toJSONString(result));
printWriter.close();
} catch (Exception e) {
logger.error("export exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
/**
* 发布议题
* 事件转议题
*
* @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】转为议题【%s】", issueFormDTO.getEventReportUserName(), staffInfo.getAgencyName(), issueEntity.getIssueTitle()));
issueProcessEntity.setOrgName(staffInfo.getAgencyName());
issueProcessEntity.setCustomerId(issueFormDTO.getCustomerId());
issueProcessService.insert(issueProcessEntity);
//查询网格的所属居民数
AllResiByGridFormDTO allResiByGridFormDTO=new AllResiByGridFormDTO();
allResiByGridFormDTO.setGridId(issueEntity.getGridId());
Result<Integer> 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;
}
/**
* 删除事件时事件转了议题调用此方法删除议题
* 批量删除议题议题如果转了项目此方法不删除项目
* 删除issueissue_categoryissue_tags
* @param delIssueFormDTO
* @return 删除的议题中转为了项目返回议题id上层再单独去删除项目
*/
@Transactional(rollbackFor = Exception.class)
@Override
public List<String> deleteIssueInternal(DelIssueFormDTO delIssueFormDTO) {
List<String> shiftProjectIssueIds = new ArrayList<>();
Date nowTime = new Date();
for (String issueId : delIssueFormDTO.getIssueIds()) {
IssueEntity issueEntity = baseDao.selectById(issueId);
if (null == issueEntity) {
continue;
}
// 删除议题主表
LambdaUpdateWrapper<IssueEntity> wrapper = new LambdaUpdateWrapper();
wrapper.eq(IssueEntity::getId, issueId)
.set(IssueEntity::getUpdatedTime, nowTime)
.set(IssueEntity::getUpdatedBy, delIssueFormDTO.getUserId())
.set(IssueEntity::getDelFlag, NumConstant.ONE_STR);
baseDao.update(null, wrapper);
// 删除议题分类关系表
issueCategoryService.delByIssueId(issueId, delIssueFormDTO.getUserId(), nowTime);
// 删除议题标签关系表
issueTagsService.delByIssueId(issueId, delIssueFormDTO.getUserId(), nowTime);
if ("shift_project".equals(issueEntity.getIssueStatus())) {
shiftProjectIssueIds.add(issueEntity.getId());
}
}
return shiftProjectIssueIds;
}
}

33
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<IssueShareL
if (null == issueInfo){
throw new RenException(IssueShareConstant.NOT_EXIST_ISSUE_INFO);
}
TopicBelongGroupFormDTO topicBelongGroupFormDTO = new TopicBelongGroupFormDTO();
topicBelongGroupFormDTO.setTopicId(issueInfo.getTopicId());
// 查询议题来源所属小组【话题所属小组】
Result<TopicBelongGroupResultDTO> 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<TopicBelongGroupResultDTO> 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);

10
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<IssueSuggestionD
//是否表决过
IssueVoteDetailDTO issueVoteDetailDTO = issueVoteDetailDao.selectUserIssueDet(dto.getCreatedBy(), dto.getIssueId());
if(null==issueVoteDetailDTO){
throw new RenException(EpmetErrorCode.VOTE_ISSUE_PLEASE.getCode());
throw new EpmetException(EpmetErrorCode.VOTE_ISSUE_PLEASE.getCode(), EpmetErrorCode.VOTE_ISSUE_PLEASE.getMsg(), EpmetErrorCode.VOTE_ISSUE_PLEASE.getMsg());
}
//校验建议内容
TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
@ -106,17 +107,16 @@ public class IssueSuggestionServiceImpl extends BaseServiceImpl<IssueSuggestionD
textScanParamDTO.getTasks().add(taskDTO);
Result<SyncScanResult> 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());

11
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueTagsServiceImpl.java

@ -18,6 +18,7 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
@ -49,6 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -244,4 +246,13 @@ public class IssueTagsServiceImpl extends BaseServiceImpl<IssueTagsDao, IssueTag
}
}
@Override
public void delByIssueId(String issueId, String userId, Date delTime) {
LambdaUpdateWrapper<IssueTagsEntity> wrapper = new LambdaUpdateWrapper();
wrapper.eq(IssueTagsEntity::getIssueId, issueId)
.set(IssueTagsEntity::getUpdatedTime, delTime)
.set(IssueTagsEntity::getUpdatedBy, userId)
.set(IssueTagsEntity::getDelFlag, NumConstant.ONE_STR);
baseDao.update(null, wrapper);
}
}

48
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java

@ -40,10 +40,12 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.CheckTopicPublisherResultDTO;
import com.epmet.dto.result.JoinVoteResultDTO;
import com.epmet.entity.IssueVoteDetailEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.ResiGroupFeignClient;
import com.epmet.redis.IssueVoteDetailRedis;
import com.epmet.service.IssueService;
import com.epmet.service.IssueVoteDetailService;
import com.epmet.utils.ModuleConstants;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -73,6 +75,8 @@ public class IssueVoteDetailServiceImpl extends BaseServiceImpl<IssueVoteDetailD
private IssueDao issueDao;
@Autowired
private IssueVoteStatisticalDao issueVoteStatisticalDao;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override
public PageData<IssueVoteDetailDTO> page(Map<String, Object> params) {
@ -140,7 +144,7 @@ public class IssueVoteDetailServiceImpl extends BaseServiceImpl<IssueVoteDetailD
if (redisData==null){
VoteRedisFormDTO voteRedisFormDTO = new VoteRedisFormDTO();
voteRedisFormDTO.setIssueId(formDTO.getIssueId());
issueVoteDetailRedis.set(voteRedisFormDTO);
// issueVoteDetailRedis.set(voteRedisFormDTO);
redisData = voteRedisFormDTO;
}
redisData.setIssueId(formDTO.getIssueId());
@ -150,17 +154,24 @@ public class IssueVoteDetailServiceImpl extends BaseServiceImpl<IssueVoteDetailD
redisData.setOppositionAmount(redisData.getOppositionAmount()+1);
}
IssueDTO issueDTO = issueService.get(formDTO.getIssueId());
// ShouldVoteCountFormDTO shouldVoteCount = new ShouldVoteCountFormDTO();
// shouldVoteCount.setGridId(issueDTO.getGridId());
// shouldVoteCount.setIssueCreatedTime(issueDTO.getCreatedTime().getTime()/1000);
// ShouldVoteCountResultDTO data = resiGroupFeignClient.shouldVoteCount(shouldVoteCount).getData();
CommonGridIdFormDTO dto = new CommonGridIdFormDTO();
dto.setGridId(issueDTO.getGridId());
Result<Integer> integerResult = resiGroupFeignClient.votableCount(dto);
if (!integerResult.success()){
throw new EpmetException("查询应表决人数失败...");
/**
* 直接创建议题的应表决数为网格下的注册居民数
*/
if (formDTO.getSourceType().equals(ModuleConstants.ISSUE_FROM_TOPIC)){
Result<Integer> integerResult = resiGroupFeignClient.votableCount(dto);
if (!integerResult.success()){
throw new EpmetException("查询应表决人数失败...");
}
redisData.setShouldVoteCount(integerResult.getData());
}else {
Result<Integer> allResi = epmetUserOpenFeignClient.getAllResiByGrid(new AllResiByGridFormDTO(issueDTO.getGridId()));
if (!allResi.success()){
throw new EpmetException("查询网格下的注册居民失败:"+issueDTO.getGridId());
}
redisData.setShouldVoteCount(allResi.getData());
}
redisData.setShouldVoteCount(integerResult.getData());
issueVoteDetailRedis.set(redisData);
Integer checkoutVoteCount = baseDao.checkoutVote(formDTO);
if (checkoutVoteCount==0){
@ -239,12 +250,21 @@ public class IssueVoteDetailServiceImpl extends BaseServiceImpl<IssueVoteDetailD
}
CommonGridIdFormDTO gridId = new CommonGridIdFormDTO();
gridId.setGridId(formDTO.getGridId());
Result<Integer> votableCount = resiGroupFeignClient.votableCount(gridId);
if(votableCount.success() && null != votableCount.getData()){
voteCache.setShouldVoteCount(votableCount.getData());
}else{
voteCache.setShouldVoteCount(NumConstant.ZERO);
if (StringUtils.isBlank(formDTO.getSourceType())){
Result<Integer> votableCount = resiGroupFeignClient.votableCount(gridId);
if(votableCount.success() && null != votableCount.getData()){
voteCache.setShouldVoteCount(votableCount.getData());
}else{
voteCache.setShouldVoteCount(NumConstant.ZERO);
}
}else {
Result<Integer> allResi = epmetUserOpenFeignClient.getAllResiByGrid(new AllResiByGridFormDTO(formDTO.getGridId()));
if (!allResi.success()){
throw new EpmetException("查询网格下的注册居民失败:"+formDTO.getGridId());
}
voteCache.setShouldVoteCount(allResi.getData());
}
return voteCache;
}

86
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java

@ -23,6 +23,7 @@ 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.constant.StrConstant;
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.security.dto.TokenDto;
@ -42,6 +43,7 @@ import com.epmet.dto.result.*;
import com.epmet.entity.IssueEntity;
import com.epmet.entity.IssueVoteStatisticalEntity;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.feign.ResiGroupFeignClient;
import com.epmet.redis.IssueVoteDetailRedis;
@ -98,6 +100,8 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private ResiGroupOpenFeignClient resiGroupOpenFeignClient;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override
public PageData<IssueVoteStatisticalDTO> page(Map<String, Object> params) {
@ -259,6 +263,50 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
return votingTrendResultDTO;
}
@Override
public VotingTrendResultDTO votingTrendV2(IssueIdFormDTO issueId) {
IssueEntity issueEntity = issueDao.selectById(issueId.getIssueId());
//缓存获取议题表决详情
VoteRedisFormDTO voteRedisFormDTO = issueVoteDetailRedis.getVoteStatistical(issueId.getIssueId());
if (!issueEntity.getSourceType().equals(ModuleConstants.ISSUE_FROM_TOPIC)){
Result<Integer> allResiByGrid = epmetUserOpenFeignClient.getAllResiByGrid(new AllResiByGridFormDTO(issueEntity.getGridId()));
if (!allResiByGrid.success()){
throw new EpmetException("查询网格下注册居民失败:"+issueEntity.getGridId());
}
voteRedisFormDTO.setShouldVoteCount(allResiByGrid.getData());
}
VotingTrendResultDTO votingTrendResultDTO = new VotingTrendResultDTO();
BeanUtils.copyProperties(voteRedisFormDTO, votingTrendResultDTO);
votingTrendResultDTO.setRealityVoteCount(voteRedisFormDTO.getSupportAmount() + voteRedisFormDTO.getOppositionAmount());
//DB获取表决 日统计详情
List<PolyLineDTO> polyLineDTOS = issueVoteStatisticalDao.polyLineData(issueId);
String startDate = DateUtils.format(issueEntity.getDecidedTime(),DATE_PATTERN);
String endDate = null == issueEntity.getVotingDeadline() ?
DateUtils.format(new Date(),DATE_PATTERN) :
DateUtils.format(issueEntity.getVotingDeadline(),DATE_PATTERN);
List<PolyLineDTO> polyLine = getPolyLine(startDate, endDate);
String today = LocalDate.now().toString();
if (today.equals(endDate)){
PolyLineDTO polyLineDTO = issueVoteDetailDao.polyLineData(issueId.getIssueId(), endDate);
polyLine.get(polyLine.size() - NumConstant.ONE).setSupportIncrement(polyLineDTO.getSupportIncrement());
polyLine.get(polyLine.size() - NumConstant.ONE).setOppositionIncrement(polyLineDTO.getOppositionIncrement());
}
if (CollectionUtils.isEmpty(polyLineDTOS)){
votingTrendResultDTO.setPolyLine(polyLine);
return votingTrendResultDTO;
}
polyLineDTOS.forEach(pd -> {
polyLine.forEach(p -> {
if (pd.getVoteDate().equals(p.getVoteDate())){
p.setOppositionIncrement(pd.getOppositionIncrement());
p.setSupportIncrement(pd.getSupportIncrement());
}
});
});
votingTrendResultDTO.setPolyLine(polyLine);
return votingTrendResultDTO;
}
public List<PolyLineDTO> getPolyLine(String startTime, String endTime){
List<PolyLineDTO> result = new ArrayList<>();
Date start = DateUtils.parse(startTime, DATE_PATTERN);
@ -561,36 +609,50 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
/**
* @Description 对指定的issueId的议题表决统计数缓存与Db同步,对于前项操作已经查询过的数据不再重复查询
* @param issueId
* @param gridId
* @parma statisticalId
* @return
* @author wangc
* @date 2020.05.21 09:09
**/
@Override
public void syncVotingCacheToDbByParams(String issueId, String gridId, String statisticalId) {
VoteRedisFormDTO vote = issueVoteDetailRedis.getVoteStatistical(issueId);
public void syncVotingCacheToDbByParams(IssueEntity issueEntity, String statisticalId) {
VoteRedisFormDTO vote = issueVoteDetailRedis.getVoteStatistical(issueEntity.getId());
if(null == vote) {
throw new RenException(String.format(ModuleConstants.ISSUE_NOT_FOUND_EXCEPTION_TEMPLATE,issueId));
throw new RenException(String.format(ModuleConstants.ISSUE_NOT_FOUND_EXCEPTION_TEMPLATE,issueEntity.getId()));
}
IssueVoteStatisticalDTO toUpd = new IssueVoteStatisticalDTO();
toUpd.setOppositionCount(vote.getOppositionAmount());
toUpd.setSupportCount(vote.getSupportAmount());
toUpd.setVotableCount(vote.getShouldVoteCount());
CommonGridIdFormDTO gridParam = new CommonGridIdFormDTO();
gridParam.setGridId(gridId);
Result<Integer> votableCount =
resiGroupFeignClient.votableCount(gridParam);
if(votableCount.success() && null != votableCount.getData()){
toUpd.setIssueId(issueEntity.getId());
if ("resi_topic".equals(issueEntity.getSourceType())) {
CommonGridIdFormDTO gridParam = new CommonGridIdFormDTO();
gridParam.setGridId(issueEntity.getGridId());
Result<Integer> 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<Integer> 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);

6
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/utils/ModuleConstants.java

@ -178,4 +178,10 @@ public interface ModuleConstants {
* 是否禁用 disable:禁用
*/
String IS_DISABLE = "disable";
String UNDER_AUDITING = "under_auditing";
String ISSUE_APPLICATION = "issue_application";
String ISSUE = "issue";
}

36
epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.18__alter_issue_type.sql

@ -0,0 +1,36 @@
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;
alter table issue_application add column ADDRESS VARCHAR(255) DEFAULT '' COMMENT '地址' AFTER `SUGGESTION`;
alter table issue_application add COLUMN LONGITUDE VARCHAR(64) DEFAULT'' COMMENT '经度' AFTER ADDRESS;
alter table issue_application 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库附件表';

2
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;

1
epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.20__issue_source.sql

@ -0,0 +1 @@
alter table issue MODIFY COLUMN `SOURCE_TYPE` varchar(32) DEFAULT NULL COMMENT '来源类型 话题:resi_topic;直接立议题:issue;事件:ic_event';

70
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueApplicationDao.xml

@ -2,6 +2,28 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IssueApplicationDao">
<update id="updateIssueApplication">
UPDATE issue_application
<trim prefix="set" suffixOverrides=",">
<trim prefix="ORG_ID = (case" suffix="end),">
<foreach collection="list" item="i" index="index">
when ID = #{i.id} then #{i.orgId}
</foreach>
</trim>
<trim prefix="ORG_ID_PATH = (case" suffix="end),">
<foreach collection="list" item="i" index="index">
when ID = #{i.id} then #{i.orgIdPath}
</foreach>
</trim>
updated_time = now()
where 1=1
<trim prefix="AND ( " suffix=" )">
<foreach collection="list" separator="or" item="i" index="index" >
ID = #{i.id}
</foreach>
</trim>
</trim>
</update>
<select id="applicationDetail" resultType="com.epmet.resi.group.dto.group.result.ApplicationDetailResultDTO">
SELECT
@ -86,4 +108,52 @@
</foreach>
</select>
<!-- 查询议题审核列表 -->
<select id="auditList" resultType="com.epmet.dto.result.AuditListResultDTO">
SELECT * FROM (
SELECT
distinct ia.ID AS issueApplicationId,
h.CREATED_TIME AS applyTime,
ia.ISSUE_TITLE,
ia.SUGGESTION,
ia.APPLY_STATUS,
(CASE WHEN ia.APPLY_STATUS = 'under_auditing' THEN '待审核'
WHEN ia.APPLY_STATUS = 'rejected' THEN '已驳回'
ELSE '已驳回' END) AS applyStatusName,
ia.GRID_ID,
ia.org_id
FROM issue_application ia
LEFT JOIN issue_application_history h ON h.ISSUE_APPLICATION_ID = ia.ID AND h.DEL_FLAG = '0'
WHERE ia.DEL_FLAG = '0'
<if test='null == applyStatus or applyStatus == "" '>
AND ia.apply_status in ('rejected','under_auditing')
</if>
<if test='null != applyStatus and applyStatus != "" '>
AND ia.apply_status = #{applyStatus}
</if>
<if test='null != startTime and startTime != "" '>
AND DATE_FORMAT(h.CREATED_TIME,'%Y%m%d') <![CDATA[ >= ]]> #{startTime}
</if>
<if test='null != endTime and endTime != "" '>
AND DATE_FORMAT(h.CREATED_TIME,'%Y%m%d') <![CDATA[ <= ]]> #{endTime}
</if>
<if test='null != issueTitle and issueTitle != "" '>
AND ISSUE_TITLE LIKE CONCAT('%',#{issueTitle},'%')
</if>
<choose>
<when test='orgType == "agency"'>
AND ia.ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%')
</when>
<otherwise>
AND ia.GRID_ID = #{orgId}
</otherwise>
</choose>
ORDER BY h.CREATED_TIME DESC)t
GROUP BY issueApplicationId ORDER BY applyTime desc
</select>
<select id="initIssueApplicationHistoryData" resultType="com.epmet.dto.IssueApplicationDTO">
select * from issue_application order by created_time desc
</select>
</mapper>

6
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueAttachmentDao.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IssueAttachmentDao">
</mapper>

7
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

250
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml

@ -28,21 +28,46 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<resultMap id="IssueResultDTOMap" type="com.epmet.dto.result.IssueResultDTO">
<id column="issueId" property="issueId" />
<result column="topicId" property="topicId"/>
<result column="source_id" property="sourceId"/>
<result column="issueTitle" property="issueTitle"/>
<result column="issueStatus" property="issueStatus"/>
<result column="issueSuggestion" property="issueSuggestion"/>
<result column="gridId" property="gridId"></result>
<result column="userId" property="userId"></result>
<result column="shiftIssueTime" property="shiftIssueTime"></result>
<result column="SOURCE_TYPE" property="sourceType"/>
<collection property="issueImgs" ofType="java.lang.String">
<result column="url"/>
</collection>
</resultMap>
<!-- 议题详情 -->
<select id="issueDetail" parameterType="com.epmet.dto.form.IssueDetailFormDTO" resultType="com.epmet.dto.result.IssueResultDTO">
<select id="issueDetail" parameterType="com.epmet.dto.form.IssueDetailFormDTO" resultMap="IssueResultDTOMap">
SELECT
source_id AS topicId,
issue_title AS issueTitle,
issue_status AS issueStatus,
suggestion AS issueSuggestion,
grid_id AS gridId,
created_by AS userId,
CREATED_TIME as shiftIssueTime
i.id as issueId,
(
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,
i.grid_id AS gridId,
i.created_by AS userId,
i.CREATED_TIME as shiftIssueTime,
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
id = #{issueId}
AND del_flag = 0
i.id = #{issueId}
AND i.del_flag = 0
</select>
<select id="selectIssueListByGridId" parameterType="com.epmet.dto.form.ShiftProjectListFromDTO" resultType="com.epmet.entity.IssueEntity">
@ -202,41 +227,73 @@
</trim>
</insert>
<resultMap id="VotingIssueListResultDTOMap" type="com.epmet.dto.result.VotingIssueListResultDTO">
<id column="issueId" property="issueId" />
<result column="issueTitle" property="issueTitle"/>
<result column="suggestion" property="suggestion"/>
<result column="issuePublishTime" property="issuePublishTime"/>
<result column="created_time" property="issuePublishTimeStr"/>
<result column="sourceId" property="sourceId"/>
<result column="sourceType" property="sourceType"/>
<collection property="issueImgs" ofType="java.lang.String">
<result column="url"/>
</collection>
</resultMap>
<!-- 查询表决中议题列表 -->
<select id="selectVotingList" parameterType="com.epmet.dto.form.CommonIssueListFormDTO" resultType="com.epmet.dto.result.VotingIssueListResultDTO">
<select id="selectVotingList" parameterType="com.epmet.dto.form.CommonIssueListFormDTO" resultMap="VotingIssueListResultDTOMap">
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,
DATE_FORMAT(i.created_time,'%Y-%m-%d %H:%i') as created_time
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 = 'voting'
i.DEL_FLAG = '0'
AND i.GRID_ID = #{gridId}
AND i.ISSUE_STATUS = 'voting'
ORDER BY
created_time DESC
</select>
i.created_time DESC
</select>
<resultMap id="ClosedIssueListResultDTOMap" type="com.epmet.dto.result.ClosedIssueListResultDTO">
<id column="issueId" property="issueId" />
<result column="issueTitle" property="issueTitle"/>
<result column="solution" property="solution"/>
<result column="issueClosedTime" property="issueClosedTime"/>
<result column="sourceId" property="sourceId"/>
<result column="SOURCE_TYPE" property="sourceType"/>
<collection property="issueImgs" ofType="java.lang.String">
<result column="url"/>
</collection>
</resultMap>
<!-- 查询已关闭议题列表 -->
<select id="selectClosedList" parameterType="com.epmet.dto.form.CommonIssueListFormDTO" resultType="com.epmet.dto.result.ClosedIssueListResultDTO">
<select id="selectClosedList" parameterType="com.epmet.dto.form.CommonIssueListFormDTO" resultMap="ClosedIssueListResultDTOMap">
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
</select>
<!-- 查询已关闭议题列表 政府端 -->
<select id="selectClosedListGov" parameterType="com.epmet.dto.form.CommonIssueListFormDTO" resultType="com.epmet.dto.result.ClosedIssueListGovResultDTO">
@ -459,6 +516,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
@ -559,20 +617,43 @@
GROUP BY
temp.gridId
</select>
<select id="selectUnResolvedList" resultType="com.epmet.dto.result.UnResolvedResultDTO">
<resultMap id="UnResolvedResultDTOMap" type="com.epmet.dto.result.UnResolvedResultDTO">
<id column="issueId" property="issueId" />
<result column="issueTitle" property="issueTitle"/>
<result column="solution" property="solution"/>
<result column="closedTime" property="closedTime"/>
<result column="sourceId" property="sourceId"/>
<result column="issueSourceType" property="issueSourceType"/>
<result column="LONGITUDE" property="longitude"/>
<result column="LATITUDE" property="latitude"/>
<result column="topicId" property="topicId"/>
<collection property="issueImgs" ofType="java.lang.String">
<result column="url"/>
</collection>
</resultMap>
<select id="selectUnResolvedList" resultMap="UnResolvedResultDTOMap">
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'
</select>
<!-- 查询表决前50名 -->
@ -770,4 +851,79 @@
AND APPLY_STATUS = 'under_auditing'
AND GRID_ID = #{gridId}
</select>
<resultMap id="IssueProfileDTOMap" type="com.epmet.dto.result.IssueProfileDTO">
<id column="issueId" property="issueId" />
<result column="issueSourceType" property="issueSourceType"/>
<result column="sourceId" property="sourceId"/>
<result column="LONGITUDE" property="longitude"/>
<result column="LATITUDE" property="latitude"/>
<collection property="issueImgs" ofType="java.lang.String">
<result column="url"/>
</collection>
</resultMap>
<select id="selectIssueProfile" parameterType="map" resultMap="IssueProfileDTOMap">
SELECT
i.id AS issueId,
i.SOURCE_TYPE AS issueSourceType,
IFNULL( i.SOURCE_ID, '' ) AS sourceId,
i.LONGITUDE,
i.LATITUDE,
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'
<foreach collection="issueIds" item="issueId" separator=" OR " open="and (" close=" )">
i.ID = #{issueId}
</foreach>
</select>
<!-- 查询所有议题 -->
<select id="allIssueList" resultType="com.epmet.dto.result.AllIssueListResultDTO">
SELECT
i.ID AS issueId,
i.ISSUE_STATUS,
i.SOURCE_TYPE,
(CASE WHEN i.ISSUE_STATUS = 'shift_project' THEN '已转项目'
WHEN i.ISSUE_STATUS = 'voting' THEN '表决中'
WHEN i.ISSUE_STATUS = 'closed' THEN '已关闭'
ELSE '已关闭' END) AS issueStatusName,
i.ISSUE_TITLE,
i.GRID_ID,
i.ORG_ID,
i.CREATED_TIME,
i.suggestion,
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'
<if test='null != startTime and startTime != "" '>
AND DATE_FORMAT(i.CREATED_TIME,'%Y%m%d') >= #{startTime}
</if>
<if test='null != endTime and endTime != "" '>
AND DATE_FORMAT(i.CREATED_TIME,'%Y%m%d') <![CDATA[ <= ]]> #{endTime}
</if>
<if test='null != issueStatus and issueStatus != "" '>
AND i.ISSUE_STATUS = #{issueStatus}
</if>
<if test='null != issueTitle and issueTitle != "" '>
AND i.ISSUE_TITLE LIKE CONCAT('%',#{issueTitle},'%')
</if>
<choose>
<when test='orgType == "agency"'>
AND i.ORG_ID_PATH LIKE CONCAT('%',#{orgId},'%')
</when>
<otherwise>
AND i.GRID_ID = #{orgId}
</otherwise>
</choose>
ORDER BY i.CREATED_TIME DESC
</select>
</mapper>

6
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueProcessDao.xml

@ -102,13 +102,14 @@
<select id="issueProcess" parameterType="com.epmet.dto.form.IssueIdFormDTO" resultType="com.epmet.dto.result.ProcessListResultDTO">
SELECT
CASE
WHEN issue_status = 'voting' THEN "议题"
WHEN issue_status = 'voting' THEN "发起议题"
WHEN issue_status = 'closed' THEN "已关闭"
WHEN issue_status = 'shift_project' THEN "已转项目"
END AS processName,
UNIX_TIMESTAMP( created_time ) AS processTime,
operation_explain AS progressDesc,
org_name AS departmentName,
'issue' AS type,
id AS processId
FROM
issue_process
@ -121,10 +122,11 @@
<!-- 查询转议题信息 -->
<select id="issueBeginInfo" parameterType="com.epmet.dto.form.IssueIdFormDTO" resultType="com.epmet.dto.result.ProcessListResultDTO">
SELECT
'议题' AS processName,
'发起议题' AS processName,
UNIX_TIMESTAMP( created_time ) AS processTime,
operation_explain AS progressDesc,
org_name AS departmentName,
'issue' AS type,
id AS processId
FROM
issue_process

4
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;

10
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ColseProjectOrDemandFormDTO.java

@ -3,6 +3,7 @@ package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
@ -13,7 +14,7 @@ public class ColseProjectOrDemandFormDTO implements Serializable {
private static final long serialVersionUID = -590440160577071133L;
//事件管理Id
private String icEventId;
//类型 需求:demand 项目:project
//类型 需求:demand 项目:project 议题:issue
private String type;
//服务方【事件被转需求,需求在办结时的服务方名称】
private String serviceParty;
@ -22,4 +23,11 @@ public class ColseProjectOrDemandFormDTO implements Serializable {
private String customerId;
private String userId;
/**
* 项目的结案时间
* 需求的完成时间
* 议题的关闭时间
*/
private Date closeCaseTime;
}

9
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java

@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@ -83,7 +84,7 @@ public class IcEventAddEditFormDTO implements Serializable {
*/
private String longitude;
/**
* 处理方式[0:已回复 1:已转项目 2:已转需求]
* 0:已回复 1:已转项目 2:已转需求3:转议题
*/
private String operationType;
/**
@ -117,4 +118,10 @@ public class IcEventAddEditFormDTO implements Serializable {
private String app;
private String client;
/**
* 新增事件直接转议题
*/
@Valid
private IcEventToIssueFormDTO issueInfo;
}

64
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventToIssueFormDTO.java

@ -0,0 +1,64 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import 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 {
}
public interface AddEventAndShiftIssue extends CustomerClientShowGroup {
}
/**
* 转议题默认传3即可0:已回复 1:已转项目 2:已转需求3:转议题
*/
@NotBlank(message = "处理方式不能为空", groups = AddUserInternalGroup.class)
private String operationType;
@NotBlank(message = "事件id不能为空", groups = AddUserInternalGroup.class)
private String icEventId;
// /**
// * 二类分类Id
// */
// private String categoryId;
/**
* 项目所选分类集合不可为空
*/
@Valid
@NotEmpty(message = "事件分类不能为空", groups = AddUserShowGroup.class)
private List<CategoryOrTagFormDTO> categoryList;
@NotBlank(message = "议题标题不能为空", groups = {AddUserShowGroup.class, AddEventAndShiftIssue.class})
@Length(message = "议题标题最多输入120字",max = 120,groups = {AddUserShowGroup.class, AddEventAndShiftIssue.class})
private String issueTitle;
@Length(message = "处理建议最多输入1000字",max = 1000,groups = {AddUserShowGroup.class, AddEventAndShiftIssue.class})
@NotBlank(message = "处理建议不能为空", groups = {AddUserShowGroup.class, AddEventAndShiftIssue.class})
private String suggestion;
@NotBlank(message = "customerId不能为空", groups = {AddUserInternalGroup.class})
private String customerId;
@NotBlank(message = "currentUserId不能为空", groups = {AddUserInternalGroup.class})
private String currentUserId;
}

6
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;
/**

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventProcessListResultDTO.java

@ -14,7 +14,7 @@ import java.util.List;
public class IcEventProcessListResultDTO implements Serializable {
private static final long serialVersionUID = 5762152044573235897L;
private String issueId;
/**
* 项目ID
*/

6
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 = "";
}

2
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;
}

55
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/PendingResultDTO.java

@ -1,6 +1,7 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.epmet.commons.tools.dto.commondto.IcEventComDTO;
import com.epmet.commons.tools.dto.commondto.TopicInfoComDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -20,14 +21,64 @@ 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<String> currentHandleDepartMent;
/**
* 话题语音url列表
*/
private List<String> topicVoices;
/**
* 话题内容
*/
private List<String> 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;
/**
* 来源类型 话题resi_topic直接立议题issue
*/
private String issueSourceType;
/**
* 发布议题的图片
*/
private List<String> issueImgs;
/**
* 话题信息-2022.10.10
*/
private TopicInfoComDTO topicInfo;
/**
* 事件信息-2022.10.10
*/
private IcEventComDTO icEventInfo;
}

11
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectManageListResultDTO.java

@ -75,7 +75,15 @@ public class ProjectManageListResultDTO implements Serializable {
private Boolean processable;
private Boolean returnable;
/**
* 项目来源
* 来源议题 issue
* 项目立项 agency
* 旧版事件上报 resi_event
* 工作人员上报(巡查) work_event
* 新版事件上报 ic_event
*/
private String origin;
public ProjectManageListResultDTO() {
this.gridName = "";
this.title = "";
@ -86,5 +94,6 @@ public class ProjectManageListResultDTO implements Serializable {
this.status = "";
this.departmentNameList = new ArrayList<>();
this.projectId = "";
this.origin="";
}
}

33
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java

@ -1,5 +1,7 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.dto.commondto.IcEventComDTO;
import com.epmet.commons.tools.dto.commondto.TopicInfoComDTO;
import lombok.Data;
import java.io.Serializable;
@ -13,6 +15,7 @@ import java.util.List;
@Data
public class ResolvedResultDTO implements Serializable {
private static final long serialVersionUID = -6670213622289052352L;
private String projectId;
/**
* 议题Id
*/
@ -53,4 +56,34 @@ 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<String> issueImgs;
/**
* 话题信息-2022.10.10
*/
private TopicInfoComDTO topicInfo;
/**
* 事件信息-2022.10.10
*/
private IcEventComDTO icEventInfo;
}

34
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UnResolvedResultDTO.java

@ -1,5 +1,7 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.dto.commondto.IcEventComDTO;
import com.epmet.commons.tools.dto.commondto.TopicInfoComDTO;
import lombok.Data;
import java.io.Serializable;
@ -52,4 +54,36 @@ 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<String> issueImgs;
private String projectId;
/**
* 话题信息-2022.10.10
*/
private TopicInfoComDTO topicInfo;
/**
* 事件信息-2022.10.10
*/
private IcEventComDTO icEventInfo;
}

18
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java

@ -2,6 +2,7 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcEventDTO;
import com.epmet.dto.ProjectCategoryDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.*;
@ -170,6 +171,7 @@ public interface GovProjectOpenFeignClient {
/**
* Desc: 需求完成/项目结案时 修改事件数据
* 议题关闭时如果议题来源于事件也会调用此方法
* @author sun
*/
@PostMapping("gov/project/icEvent/closeprojectordemand")
@ -178,4 +180,20 @@ public interface GovProjectOpenFeignClient {
@PostMapping("gov/project/project/staffpendingproject")
Result<List<ProjectDTO>> staffPendingProject(@RequestBody ProjectListFromDTO formDTO);
/**
* 批量查询事件信息
* @param icEventIds
* @return
*/
@PostMapping("gov/project/icEvent/batchSelectById")
Result<List<IcEventDTO>> batchSelectById(@RequestBody List<String> icEventIds);
/**
* @Description 议题处理进展已转项目
* @param formDTO
* @author zxc
*/
@PostMapping("/gov/project/projectprocess/projectprocesslist")
Result<List<ProjectProcessListResultDTO>> projectProcessList(@RequestBody ProcessProjectIdFormDTO formDTO);
}

19
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java

@ -3,6 +3,7 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcEventDTO;
import com.epmet.dto.ProjectCategoryDTO;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.form.*;
@ -174,4 +175,22 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli
public Result<List<ProjectDTO>> staffPendingProject(ProjectListFromDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "staffPendingProject",formDTO);
}
/**
* 批量查询事件信息
*
* @param icEventIds
* @return
*/
@Override
public Result<List<IcEventDTO>> batchSelectById(List<String> icEventIds) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "batchSelectById",icEventIds);
}
@Override
public Result<List<ProjectProcessListResultDTO>> projectProcessList(ProcessProjectIdFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "projectProcessList", formDTO);
}
}

5
epmet-module/gov-project/gov-project-server/pom.xml

@ -219,8 +219,9 @@
<thread.threadPool.rejected-execution-handler>callerRunsPolicy</thread.threadPool.rejected-execution-handler>
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!-- <openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>-->
<!-- 测试环境停机,改用生产 -->
<openapi.scan.server.url>https://epmet-open.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=e894e5690f9d6a527722974c71548ff6c0fe29bd956589a09e21b16442a35ed4

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save