Browse Source

Merge remote-tracking branch 'origin/dev_issue_audit' into dev_issue_audit

# Conflicts:
#	epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
#	epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
#	epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
#	epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
#	epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
#	epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java
#	epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
#	epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
#	epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml
#	epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java
#	epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java
#	epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
#	epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml
#	epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
#	epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
#	epmet-user/epmet-user-server/pom.xml
#	epmet-user/epmet-user-server/src/main/resources/bootstrap.yml
dev_shibei_match
zxc 5 years ago
parent
commit
e559914843
  1. 24
      epmet-auth/pom.xml
  2. 4
      epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java
  3. 7
      epmet-auth/src/main/resources/bootstrap.yml
  4. 9
      epmet-auth/src/main/resources/logback-spring.xml
  5. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java
  6. 3
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  7. 44
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java
  8. 6
      epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java
  9. 5
      epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java
  10. 4
      epmet-gateway/src/main/resources/bootstrap.yml
  11. 4
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/ProjectLatestOperationResultDTO.java
  12. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
  13. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java
  14. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java
  15. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java
  16. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java
  17. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java
  18. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java
  19. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java
  20. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
  21. 72
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  22. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java
  23. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPartyUserRankDataService.java
  24. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java
  25. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java
  26. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java
  27. 25
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java
  28. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java
  29. 12
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml
  30. 54
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
  31. 10
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml
  32. 41
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml
  33. 22
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml
  34. 28
      epmet-module/epmet-common-service/common-service-server/pom.xml
  35. 5
      epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml
  36. 9
      epmet-module/epmet-common-service/common-service-server/src/main/resources/logback-spring.xml
  37. 28
      epmet-module/epmet-ext/epmet-ext-server/pom.xml
  38. 5
      epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml
  39. 9
      epmet-module/epmet-ext/epmet-ext-server/src/main/resources/logback-spring.xml
  40. 6
      epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml
  41. 25
      epmet-module/epmet-message/epmet-message-server/pom.xml
  42. 5
      epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml
  43. 9
      epmet-module/epmet-message/epmet-message-server/src/main/resources/logback-spring.xml
  44. 25
      epmet-module/epmet-oss/epmet-oss-server/pom.xml
  45. 5
      epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml
  46. 9
      epmet-module/epmet-oss/epmet-oss-server/src/main/resources/logback-spring.xml
  47. 26
      epmet-module/epmet-third/epmet-third-server/pom.xml
  48. 5
      epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml
  49. 9
      epmet-module/epmet-third/epmet-third-server/src/main/resources/logback-spring.xml
  50. 17
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AccessConfigAdd4RoletFormDTO.java
  51. 19
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/AccessConfigController.java
  52. 2
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/AccessConfigService.java
  53. 57
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessConfigServiceImpl.java
  54. 4
      epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml
  55. 25
      epmet-module/gov-grid/gov-grid-server/pom.xml
  56. 5
      epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml
  57. 9
      epmet-module/gov-grid/gov-grid-server/src/main/resources/logback-spring.xml
  58. 97
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueSuggestionDTO.java
  59. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/EvaluationListFormDTO.java
  60. 33
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/UserIssueSuggestionFormDTO.java
  61. 55
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueSuggestionResDTO.java
  62. 22
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/SaveIssueSuggestionResultDTO.java
  63. 61
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  64. 70
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  65. 11
      epmet-module/gov-issue/gov-issue-server/pom.xml
  66. 42
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java
  67. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCustomerParameterController.java
  68. 87
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueSuggestionController.java
  69. 31
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java
  70. 54
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueSuggestionDao.java
  71. 11
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java
  72. 66
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueSuggestionEntity.java
  73. 31
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java
  74. 61
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueSuggestionService.java
  75. 73
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  76. 173
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSuggestionServiceImpl.java
  77. 6
      epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml
  78. 37
      epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.2__issue_audit_tables.sql
  79. 16
      epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.3__issue_sugg_tables.sql
  80. 9
      epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml
  81. 63
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml
  82. 36
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueSuggestionDao.xml
  83. 12
      epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml
  84. 25
      epmet-module/gov-mine/gov-mine-server/pom.xml
  85. 5
      epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml
  86. 9
      epmet-module/gov-mine/gov-mine-server/src/main/resources/logback-spring.xml
  87. 25
      epmet-module/gov-org/gov-org-server/pom.xml
  88. 5
      epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml
  89. 9
      epmet-module/gov-org/gov-org-server/src/main/resources/logback-spring.xml
  90. 56
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ParameterFormDTO.java
  91. 39
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ParameterResultDTO.java
  92. 26
      epmet-module/gov-project/gov-project-server/pom.xml
  93. 46
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java
  94. 29
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/CustomerProjectParameterService.java
  95. 41
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java
  96. 5
      epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml
  97. 9
      epmet-module/gov-project/gov-project-server/src/main/resources/logback-spring.xml
  98. 25
      epmet-module/gov-voice/gov-voice-server/pom.xml
  99. 5
      epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml
  100. 9
      epmet-module/gov-voice/gov-voice-server/src/main/resources/logback-spring.xml

24
epmet-auth/pom.xml

@ -187,6 +187,12 @@
<gov.wx.ma.secret>651f02d71ed3f123dfb584b8bf0f4d8b</gov.wx.ma.secret>
<!--<gov.wx.ma.appId>wx2679392c4cc2af22</gov.wx.ma.appId>
<gov.wx.ma.secret>e5e72147737cfeb2b0f3a43624cadb3f</gov.wx.ma.secret>-->
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -225,6 +231,12 @@
<gov.wx.ma.secret>651f02d71ed3f123dfb584b8bf0f4d8b</gov.wx.ma.secret>
<!--<gov.wx.ma.appId>wx2679392c4cc2af22</gov.wx.ma.appId>
<gov.wx.ma.secret>e5e72147737cfeb2b0f3a43624cadb3f</gov.wx.ma.secret>-->
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -258,6 +270,12 @@
<!--政府端小程序配置-->
<gov.wx.ma.appId>wx3d1372029eb816a3</gov.wx.ma.appId>
<gov.wx.ma.secret>651f02d71ed3f123dfb584b8bf0f4d8b</gov.wx.ma.secret>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
@ -295,6 +313,12 @@
<!--政府端小程序配置-->
<gov.wx.ma.appId>wx3d1372029eb816a3</gov.wx.ma.appId>
<gov.wx.ma.secret>651f02d71ed3f123dfb584b8bf0f4d8b</gov.wx.ma.secret>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

4
epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java

@ -26,7 +26,6 @@ import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.SetOperations;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.List;
@ -39,7 +38,8 @@ import java.util.Set;
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Component
//@Component 2020-11-17目前小程序升级都是从 公众号升级 所有这种方式 暂时用不到了
@Deprecated
public class CustomerAppWxServiceUtil implements ApplicationRunner {
private static Logger logger = LogManager.getLogger(CustomerAppWxServiceUtil.class);

7
epmet-auth/src/main/resources/bootstrap.yml

@ -113,7 +113,7 @@ wx:
# secret: @oper.wx.ma.secret@
# token: #微信小程序消息服务器配置的token
# aesKey: #微信小程序消息服务器配置的EncodingAESKey
# msgDataFormat: JSON
# msgDataFormat: JSON
appId:
# 党群e事通-居民端小程序配置appId
resi: @resi.wx.ma.appId@
@ -121,3 +121,8 @@ wx:
gov: @gov.wx.ma.appId@
# 党群e事通-运营端小程序配置的appId
#oper: @oper.wx.ma.appId@
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-auth/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/auth"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java

@ -84,6 +84,10 @@ public enum RequirePermissionEnum {
WORK_GRASSROOTS_ISSUE_SHIFT_PROJECT("work_grassroots_issue_shift_project", "基层治理:议题管理:转项目","转项目(选择处理部门api也需要添加此校验)"),
WORK_GRASSROOTS_ISSUE_CLOSE("work_grassroots_issue_close","基层治理:议题管理:关闭议题","关闭议题"),
WORK_GRASSROOTS_ISSUE_AUDITING_LIST("work_grassroots_issue_auditing_list","基层治理:议题管理:待审核","待审核议题申请列表查询"),
WORK_GRASSROOTS_ISSUE_REJECTED_LIST("work_grassroots_issue_rejected_list","基层治理:议题管理:已驳回","已驳回议题申请列表"),
WORK_GRASSROOTS_ISSUE_AUDIT("work_grassroots_issue_audit","基层治理:议题管理:议题审核","审核(通过或驳回)议题"),
/**
* 徽章
*/

3
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -87,7 +87,7 @@ public enum EpmetErrorCode {
TEXT_SCAN_FAILED(8503,"内容审核失败,请重新编辑"),
IMG_SCAN_FAILED(8504,"图片审核失败,请重新上传"),
PROJECT_IS_CLOSED(8601,"项目已结案"),
VOTE_ISSUE_PLEASE(8602,"请先选择支持或反对,再发表您的想法"),
// 爱心互助 居民端
NOT_IN_THE_SIGN_IN_RANGE(8510, "您还未进入指定的签到范围~"),
// 活动报名失败,弹窗:志愿者认证
@ -117,6 +117,7 @@ public enum EpmetErrorCode {
OPER_EXT_APP_SECRET_RESET_FAIL(8714, "秘钥更新失败"),
OPER_UPLOAD_IMG_TYPE_ERROR(8715, "请上传PNG格式的图片"),
OPER_UPLOAD_IMG_SIZE_ERROR(8716, "请上传200*200的图片"),
USER_LIST_ROLES_BY_KEY_FAIL(8715, "根据角色key查询角色列表失败"),
// 党建声音 前端提示 88段
DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"),

44
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java

@ -43,7 +43,6 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
@ -60,8 +59,14 @@ import java.util.Set;
*/
@Slf4j
public class HttpClientManager {
private static int connectionTimeout = 3000;// 连接超时时间,毫秒
private static int soTimeout = 10000;// 读取数据超时时间,毫秒
// 连接超时时间,毫秒
private static int connectionTimeout = 5000;
// 读取数据超时时间,毫秒
private static int soTimeout = 20000;
private static String HEADER_CONTENT_TYPE = "Content-Type";
private static String HEADER_APPLICATION_JSON = "application/json;charset=utf-8";
private static String UTF8 = "utf-8";
private static String HEADER_APPLICATION_FORM_URL_ENCODED = "application/x-www-form-urlencoded;charset=utf-8";
/**
* HttpClient对象
*/
@ -116,13 +121,14 @@ public class HttpClientManager {
try {
HttpPost httppost = new HttpPost(url);
httppost.setConfig(requestConfig);
httppost.addHeader("Content-Type", "application/x-www-form-urlencoded charset=utf-8");
httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_FORM_URL_ENCODED);
List<NameValuePair> list = new ArrayList<NameValuePair>();
for (String key : paramsMap.keySet()) {
list.add(new BasicNameValuePair(key, String.valueOf(paramsMap.get(key))));
}
UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(list, "utf-8");
UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(list, UTF8);
httppost.setEntity(urlEncodedFormEntity);
return execute(httppost, false);
@ -146,9 +152,9 @@ public class HttpClientManager {
try {
HttpPost httppost = new HttpPost(url);
httppost.setConfig(requestConfig);
httppost.addHeader("Content-Type", "application/json; charset=utf-8");
httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_JSON);
if (StringUtils.isNotEmpty(jsonStrParam)) {
StringEntity se = new StringEntity(jsonStrParam, "utf-8");
StringEntity se = new StringEntity(jsonStrParam, UTF8);
httppost.setEntity(se);
}
return execute(httppost, false);
@ -164,14 +170,14 @@ public class HttpClientManager {
try {
HttpPost httppost = new HttpPost(url);
httppost.setConfig(requestConfig);
httppost.addHeader("Content-Type", "application/json; charset=utf-8");
httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_JSON);
if (null != headerMap){
headerMap.forEach((k,v) -> {
httppost.addHeader(k,v);
});
}
if (StringUtils.isNotEmpty(jsonStrParam)) {
StringEntity se = new StringEntity(jsonStrParam, "utf-8");
StringEntity se = new StringEntity(jsonStrParam, UTF8);
httppost.setEntity(se);
}
return execute(httppost, false);
@ -221,9 +227,9 @@ public class HttpClientManager {
try {
HttpPost httppost = new HttpPost(url);
httppost.setConfig(requestConfig);
httppost.addHeader("Content-Type", "application/json");
httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_JSON);
if (StringUtils.isNotEmpty(jsonStrParam)) {
StringEntity se = new StringEntity(jsonStrParam, "utf-8");
StringEntity se = new StringEntity(jsonStrParam, UTF8);
httppost.setEntity(se);
}
return execute(httppost, true);
@ -249,9 +255,9 @@ public class HttpClientManager {
try {
String stringToSign = timestamp + "\n" + secret;
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256"));
byte[] signData = mac.doFinal(stringToSign.getBytes("UTF-8"));
String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)), "UTF-8");
mac.init(new SecretKeySpec(secret.getBytes(UTF8), "HmacSHA256"));
byte[] signData = mac.doFinal(stringToSign.getBytes(UTF8));
String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)), UTF8);
DingTalkTextMsg msg = new DingTalkTextMsg();
msg.setContent(content);
url = url.concat("&timestamp=" + timestamp + "&sign=" + sign);
@ -275,9 +281,9 @@ public class HttpClientManager {
try {
String stringToSign = timestamp + "\n" + secret;
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256"));
byte[] signData = mac.doFinal(stringToSign.getBytes("UTF-8"));
String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)), "UTF-8");
mac.init(new SecretKeySpec(secret.getBytes(UTF8), "HmacSHA256"));
byte[] signData = mac.doFinal(stringToSign.getBytes(UTF8));
String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)), UTF8);
log.info("sign为:"+sign);
url = url.concat("&timestamp=" + timestamp + "&sign=" + sign);
log.info("发送url:"+url);
@ -383,9 +389,9 @@ public class HttpClientManager {
try {
HttpPost httppost = new HttpPost(url);
httppost.setConfig(requestConfig);
httppost.addHeader("Content-Type", "application/json");
httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_JSON);
if (StringUtils.isNotEmpty(json)) {
StringEntity se = new StringEntity(json, "utf-8");
StringEntity se = new StringEntity(json, UTF8);
httppost.setEntity(se);
}
return executeToByte(httppost);

6
epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java

@ -131,6 +131,12 @@ public class InternalAuthProcessor extends AuthProcessor {
* @return
*/
private boolean needAuth(String requestUri) {
for (String url : cpProperty.getInternalAuthUrlsWhiteList()) {
if (antPathMatcher.match(url, requestUri)) {
return false;
}
}
for (String url : cpProperty.getInternalAuthUrls()) {
if (antPathMatcher.match(url, requestUri)) {
return true;

5
epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java

@ -22,6 +22,11 @@ public class CpProperty {
*/
private List<String> internalAuthUrls;
/**
* 内部认证url白名单
*/
private List<String> internalAuthUrlsWhiteList;
/**
* 对外部应用开放的url列表
*/

4
epmet-gateway/src/main/resources/bootstrap.yml

@ -439,6 +439,10 @@ epmet:
- /resi/home/**
- /data/report/**
# 内部认证url白名单(在白名单中的,就不会再校验登录了)
internalAuthUrlsWhiteList:
- /epmetuser/customerstaff/customerlist
# 外部应用认证,使用AccessToken等头进行认证
externalOpenUrls:
- /data/report/**

4
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/project/result/ProjectLatestOperationResultDTO.java

@ -17,4 +17,8 @@ public class ProjectLatestOperationResultDTO implements Serializable {
private String projectId;
private String operationName;
private Integer costTime;
private String title;
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java

@ -61,6 +61,15 @@ public interface FactOriginGroupMainDailyDao extends BaseDao<FactOriginGroupMain
**/
int selectIfExist(@Param("customerId") String customerId);
/**
* @Description 根据用户Id查询所有组原始数据
* @param customerId
* @return java.util.List<com.epmet.dto.extract.FactOriginGroupMainDailyDTO>
* @author wangc
* @date 2020.11.17 09:56
*/
List<FactOriginGroupMainDailyDTO> selectAllGroupByCustomerId(@Param("customerId") String customerId);
/**
* @param customerId
* @return

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java

@ -180,12 +180,12 @@ public interface FactOriginProjectMainDailyDao extends BaseDao<FactOriginProject
/**
* @Description 查询难点赌点的基本信息要排除之前已经结案过的项目
* @param customerId
* @param list
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity>
* @author wangc
* @date 2020.09.28 10:19
*/
List<ScreenDifficultyDataEntity> selectDifficultyBaseInfo(@Param("customerId")String customerId,@Param("list")List<String> list);
List<ScreenDifficultyDataEntity> selectDifficultyBaseInfo(@Param("customerId")String customerId,@Param("thresholdValue") Integer thresholdValue);
/**
* @Description 查询评价周期内新立的项目是为了增量新增难点赌点的图片库

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java

@ -91,4 +91,13 @@ public interface ScreenDifficultyDataDao extends BaseDao<ScreenDifficultyDataEnt
int insertBatch(@Param("list") List<ScreenDifficultyDataEntity> list);
int insertBatchImg(@Param("list") List<ScreenDifficultyImgDataEntity> list);
/**
* @Description 根据客户Id查出全部的难点赌点的项目Id和网格Id因为需要比对全部的信息然后删除因为删除网格而导致的垃圾数据
* @param customerId
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity>
* @author wangc
* @date 2020.11.17 09:33
*/
List<ScreenDifficultyDataEntity> selectAllDifficultyByCustomerId(@Param("customerId")String customerId);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java

@ -103,14 +103,5 @@ public interface ProjectDao extends BaseDao<ProjectEntity> {
*/
String selectParameterValueByKey(@Param("customerId") String customerId);
/**
* @Description 得到超过阈值滞留的项目Id集合
* 规定只要项目的任何一个负责人(被流转到的自始至终不管有没有处理)超过了自定义或默认的滞留时间就算难点赌点
* @param customerId
* @param exclude
* @return java.util.List<java.lang.String>
* @author wangc
* @date 2020.11.06 14:14
*/
List<String> selectOvertimeProjectIds(@Param("customerId") String customerId,@Param("exclude") List<String> exclude,@Param("value") Integer value);
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java

@ -153,15 +153,4 @@ public interface ProjectProcessDao extends BaseDao<ProjectProcessEntity> {
* @date 2020.09.28 14:45
*/
List<ProjectLatestOperationResultDTO> selectLatestOperation(@Param("list") List<String> list,@Param("customerId") String customerId);
/**
* @Description 查找项目标题
* @param list
* @return java.util.List<com.epmet.dto.project.result.ProjectLatestOperationResultDTO>
* @author wangc
* @date 2020.09.28 14:45
*/
List<ProjectLatestOperationResultDTO> selectProjectTitle(@Param("list") List<String> list,@Param("customerId") String customerId);
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java

@ -248,12 +248,12 @@ public interface FactOriginProjectMainDailyService extends BaseService<FactOrigi
/**
* @Description 查询难点赌点基础信息
* @param customerId
* @param list
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity>
* @author wangc
* @date 2020.09.28 10:23
*/
List<ScreenDifficultyDataEntity> getDifficultyBaseInfo(String customerId , List<String> list);
List<ScreenDifficultyDataEntity> getDifficultyBaseInfo(String customerId ,Integer thresholdValue);
/**
* @Description 得到评价周期内新立项的id

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectMainDailyServiceImpl.java

@ -237,15 +237,15 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl<FactO
/**
* @Description 查询难点赌点基础信息
* @param customerId
* @param list
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity>
* @author wangc
* @date 2020.09.28 10:23
*/
@Override
public List<ScreenDifficultyDataEntity> getDifficultyBaseInfo(String customerId, List<String> list) {
if(CollectionUtils.isEmpty(list)) return null;
return baseDao.selectDifficultyBaseInfo(customerId,list);
public List<ScreenDifficultyDataEntity> getDifficultyBaseInfo(String customerId, Integer thresholdValue) {
return baseDao.selectDifficultyBaseInfo(customerId,thresholdValue);
}
/**

21
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/GroupExtractServiceImpl.java

@ -66,7 +66,7 @@ public class GroupExtractServiceImpl implements GroupExtractService {
/**
* @param param
* @return
* @Description 业务抽取 - 小组祥光
* @Description 业务抽取 - 小组
* @author wangc
* @date 2020.09.18 21:07
**/
@ -88,22 +88,31 @@ public class GroupExtractServiceImpl implements GroupExtractService {
List<ExtractGroupMemberActionRecordResultDTO> memberList = new LinkedList<>();
if (!CollectionUtils.isEmpty(originGroupData)) {
List<GridAttributesResultDTO> gridList = dimGridService.getGridAttributes(param.getCustomerId(),originGroupData.stream().map(FactOriginGroupMainDailyDTO::getGridId).distinct().collect(Collectors.toList()));
List<String> missingGroups = new LinkedList<>();
if (!CollectionUtils.isEmpty(gridList)) {
Map<String, GridAttributesResultDTO> gridMap =
gridList.stream().collect(Collectors.toMap(GridAttributesResultDTO::getGridId, Function.identity(), (key1, key2) -> key2));
//剔除本次要更新数据中的垃圾数据
for(Iterator<FactOriginGroupMainDailyDTO> iter = originGroupData.iterator();
iter.hasNext();){
FactOriginGroupMainDailyDTO pointer = iter.next();
if(null == gridMap.get(pointer.getGridId()))iter.remove();
}
//记录全量中的垃圾数
List<String> missingGroups = new LinkedList<>();
List<FactOriginGroupMainDailyDTO> population = factOriginGroupMainDailyDao.selectAllGroupByCustomerId(param.getCustomerId());
if(!CollectionUtils.isEmpty(population)){
for(Iterator<FactOriginGroupMainDailyDTO> iter = population.iterator();
iter.hasNext();){
FactOriginGroupMainDailyDTO pointer = iter.next();
if(null == gridMap.get(pointer.getGridId())){
missingGroups.add(pointer.getId());
iter.remove();
}
}
originGroupData.forEach(group -> {
}
originGroupData.forEach(group -> {
GridAttributesResultDTO attr = gridMap.get(group.getGridId());
if (null != attr) {
group.setAgencyId(attr.getAgencyId());

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java

@ -16,7 +16,6 @@ import com.epmet.dto.issue.IssueDTO;
import com.epmet.dto.party.PartyMemberDTO;
import com.epmet.dto.project.FinishOrgDTO;
import com.epmet.dto.project.ProcessInfoDTO;
import com.epmet.dto.project.ProjectOrgRelationDTO;
import com.epmet.dto.project.result.ProjectOrgPeriodResultDTO;
import com.epmet.dto.result.WorkDayResultDTO;
import com.epmet.dto.topic.ResiTopicDTO;
@ -42,8 +41,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collector;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
/**
@ -123,6 +124,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
}
//获取项目信息
List<ProjectDTO> projectList = projectService.getProjectInfo(customerId, dateString);
factOriginProjectMainDailyService.deleteByDate(customerId, dateString);
if (!CollectionUtils.isEmpty(projectList)) {
//提取议题ID
List<String> issueIds = projectList.stream().map(ProjectDTO::getOriginId).collect(Collectors.toList());
@ -193,7 +195,6 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
}));
//插入数据
if (!list.isEmpty()) {
factOriginProjectMainDailyService.deleteByDate(customerId, dateString);
factOriginProjectMainDailyService.insertBatch(list);
}
}
@ -368,8 +369,8 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
path =path.substring(NumConstant.ZERO,path.length() - NumConstant.ONE);
}
entity.setPids(path);
}else{
log.warn("【data-statistical】业务数据抽取模块,ProjectExtractServiceImpl.saveOriginProjectDaily:查询出的项目节点发起人所属的orgIdPath不正确,agencyId->{},orgIdPath->{}",process.getAgencyId(),process.getPids());
} else {
log.warn("【data-statistical】业务数据抽取模块,ProjectExtractServiceImpl.saveOriginProjectDaily:查询出的项目节点发起人所属的orgIdPath不正确,agencyId->{},orgIdPath->{}", process.getAgencyId(), process.getPids());
entity.setPid(NumConstant.ZERO_STR);
entity.setPids("");
}
@ -378,8 +379,8 @@ public class ProjectExtractServiceImpl implements ProjectExtractService {
return entity;
}).collect(Collectors.toList()));
factOriginProjectLogDailyService.deleteByDate(customerId, dateString);
if (!logList.isEmpty()) {
factOriginProjectLogDailyService.deleteByDate(customerId, dateString);
factOriginProjectLogDailyService.insertBatch(logList);
}

72
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java

@ -5,6 +5,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dto.org.GridInfoDTO;
import com.epmet.dto.project.result.ProjectLatestOperationResultDTO;
import com.epmet.dto.screen.form.ProjectSourceMapFormDTO;
import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity;
@ -77,8 +78,7 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
//2.查询出客户下网格的相关信息
List<GridInfoDTO> gridList = customerGridService.queryGridInfoList(param.getCustomerId());
Map<String,GridInfoDTO> gridMap = new HashMap<>();
gridList.forEach(grid -> {gridMap.put(grid.getGridId(),grid);});
Map<String,GridInfoDTO> gridMap = gridList.stream().collect(Collectors.toMap(GridInfoDTO :: getGridId,a -> a,(o, n) -> o));
//3.查询出客户下用户的累计积分(累计值,没有时间概念,否则需要查询积分明细计算出评价周期末的得分)
Map<String,Integer> pointMap = userPointService.getUserPointMap(param.getCustomerId());
@ -99,6 +99,9 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
Map<String, BigDecimal> scoreMap = cpcIndexCalculateService.getCpcScore(param.getCustomerId(),dateId);
//剔除垃圾数据
registeredUsers.removeIf(user -> null == gridMap.get(user.getGridId()));
//5.整合数据
if(!CollectionUtils.isEmpty(registeredUsers)){
registeredUsers.forEach(user -> {
@ -118,24 +121,8 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
user.setDataEndTime(finalDateId);
});
}
//6.存入数据库
//不按照时间删除,每次插入之前将该客户下的所有历史数据清空
//过滤 统计维度中没有的数据
Set<String> gridIdSet = new HashSet<>();
List<ScreenPartyUserRankDataEntity> newInsertList = registeredUsers.stream()
.filter(o -> {
if (StringUtils.isBlank(o.getGridName())) {
gridIdSet.add(o.getGridId());
return false;
} else {
return true;
}
}).collect(Collectors.toList());
log.warn("userScoreDataHub grids:{} not in DimGrid", JSON.toJSONString(gridIdSet));
screenPartyUserRankDataService.dataClean(newInsertList, param.getCustomerId());
screenPartyUserRankDataService.dataClean(registeredUsers, param.getCustomerId());
}
/**
@ -147,42 +134,51 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
**/
@Override
public void difficultyDataHub(ScreenCentralZoneDataFormDTO param) {
//查询难点赌点中有无已结案的项目,若有则保留
List<String> existed = screenDifficultyDataService.selectExistedInfo(param.getCustomerId());
//查询数据
List<ScreenDifficultyDataEntity> difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),projectService.getOvertimeProjectByParameter(param.getCustomerId(),existed));
List<ScreenDifficultyDataEntity> difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),projectService.getOvertimeProjectByParameter(param.getCustomerId()));
if(CollectionUtils.isEmpty(difficulties)) return;
//2.查询出客户下网格的相关信息
List<GridInfoDTO> gridList = customerGridService.queryGridInfoList(param.getCustomerId());
Map<String,GridInfoDTO> gridMap = gridList.stream().collect(Collectors.toMap(GridInfoDTO :: getGridId,a -> a,(o, n) -> o));
//剔除垃圾数据(本次需要更新的数据集)
//for(Iterator<ScreenDifficultyDataEntity> iter = difficulties.iterator(); iter.hasNext();){
// ScreenDifficultyDataEntity pointer = iter.next();
// if(null == gridMap.get(pointer.getOrgId())){
// iter.remove();
// }
//}
difficulties.removeIf( diff -> null == gridMap.get(diff.getOrgId()));
List<String> projectIds = difficulties.stream().map(ScreenDifficultyDataEntity :: getEventId).distinct().collect(Collectors.toList());
//最近一次操作
Map<String,String> latestOperationMap = projectProcessService.getLatestOperation(projectIds,param.getCustomerId());
//标题
Map<String,String> titleMap = projectProcessService.getProjectTitle(projectIds,param.getCustomerId());
boolean isOperationNull = CollectionUtils.isEmpty(latestOperationMap) ? true : false;
boolean isTitleNull = CollectionUtils.isEmpty(titleMap) ? true : false;
Map<String, ProjectLatestOperationResultDTO> latestOperationMap = projectProcessService.getLatestOperation(projectIds,param.getCustomerId());
//图片
List<ProjectSourceMapFormDTO> projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds);
Map<String,List<ScreenDifficultyImgDataEntity>> imgMap =
topicService.getTopicImgs(projectSourceMap);
boolean isImgNull = CollectionUtils.isEmpty(imgMap) ? true : false;
Map<String,String> contentMap = topicService.getTopicContent(projectSourceMap);
boolean isContentNull = CollectionUtils.isEmpty(contentMap) ? true : false;
difficulties.forEach( diff -> {
if(!isImgNull) {
if(!CollectionUtils.isEmpty(imgMap)) {
List<ScreenDifficultyImgDataEntity> figureList = imgMap.get(diff.getEventId());
diff.setEventImgUrl(CollectionUtils.isEmpty(figureList) ? "" : figureList.get(NumConstant.ZERO).getEventImgUrl());
}
if(!isContentNull) {
if(!CollectionUtils.isEmpty(contentMap)) {
diff.setEventContent(contentMap.get(diff.getEventId()));
}
if(!isOperationNull){
diff.setLatestOperateDesc(latestOperationMap.get(diff.getEventId()));
}
if(!isTitleNull){
diff.setEventTitle(titleMap.get(diff.getEventId()));
if(! CollectionUtils.isEmpty(latestOperationMap)){
ProjectLatestOperationResultDTO oper = latestOperationMap.get(diff.getEventId());
if(null != oper){
diff.setLatestOperateDesc(oper.getOperationName());
diff.setEventTitle(oper.getTitle());
diff.setEventCostTime(oper.getCostTime());
}
}
diff.setDataEndTime(DateUtils.getBeforeNDay(NumConstant.ONE));
});
List<ScreenDifficultyImgDataEntity> imgList = new LinkedList<>();

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java

@ -51,4 +51,12 @@ public interface ScreenDifficultyDataService extends BaseService<ScreenDifficult
*/
void dataClean(String customerId,List<ScreenDifficultyDataEntity> difficulties, List<ScreenDifficultyImgDataEntity> imgs);
/**
* @Description 根据客户Id查出全部的难点赌点的项目Id和网格Id因为需要比对全部的信息然后删除因为删除网格而导致的垃圾数据
* @param customerId
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity>
* @author wangc
* @date 2020.11.17 09:31
*/
List<ScreenDifficultyDataEntity> getAllDifficultyByCustomerId(String customerId);
}

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenPartyUserRankDataService.java

@ -40,5 +40,4 @@ public interface ScreenPartyUserRankDataService extends BaseService<ScreenPartyU
* @date 2020.09.27 09:44
**/
void dataClean(List<ScreenPartyUserRankDataEntity> dataList,String customerId);
}

21
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java

@ -54,15 +54,30 @@ public class ScreenDifficultyDataServiceImpl extends BaseServiceImpl<ScreenDiffi
@Override
@Transactional(rollbackFor = Exception.class)
public void dataClean(String customerId, List<ScreenDifficultyDataEntity> difficulties, List<ScreenDifficultyImgDataEntity> imgs) {
List<ScreenDifficultyDataEntity> orient = baseDao.selectAllDifficultyByCustomerId(customerId);
if(!CollectionUtils.isEmpty(orient)){
baseDao.deleteBatchDifficultyImg(orient.stream().map(ScreenDifficultyDataEntity::getEventId).distinct().collect(Collectors.toList()));
}
baseDao.deleteBatchDifficulty(customerId,null);
if (!CollectionUtils.isEmpty(difficulties)) {
baseDao.deleteBatchDifficulty(customerId, difficulties.stream().map(ScreenDifficultyDataEntity::getEventId).distinct().collect(Collectors.toList()));
baseDao.insertBatch(difficulties);
}
if (!CollectionUtils.isEmpty(imgs)) {
baseDao.deleteBatchDifficultyImg(imgs.stream().map(ScreenDifficultyImgDataEntity::getEventId).distinct().collect(Collectors.toList()));
baseDao.insertBatchImg(imgs);
}
baseDao.updateTime(customerId, DateUtils.getBeforeNDay(NumConstant.ONE));
}
/**
* @Description 根据客户Id查出全部的难点赌点的项目Id和网格Id因为需要比对全部的信息然后删除因为删除网格而导致的垃圾数据
* @param customerId
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity>
* @author wangc
* @date 2020.11.17 09:31
*/
@Override
public List<ScreenDifficultyDataEntity> getAllDifficultyByCustomerId(String customerId) {
return baseDao.selectAllDifficultyByCustomerId(customerId);
}
}

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java

@ -120,20 +120,9 @@ public interface ProjectProcessService extends BaseService<ProjectProcessEntity>
* @Description 获得项目最新操作
* @param list
* @param customerId
* @return java.util.Map<java.lang.String,java.lang.String>
* @return
* @author wangc
* @date 2020.09.28 14:44
*/
Map<String,String> getLatestOperation(List<String> list, String customerId);
/**
* @Description 获取项目标题
* @param list
* @param customerId
* @return java.util.Map<java.lang.String,java.lang.String>
* @author wangc
* @date 2020.10.27 14:34
*/
Map<String,String> getProjectTitle(List<String>list ,String customerId);
Map<String,ProjectLatestOperationResultDTO> getLatestOperation(List<String> list, String customerId);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java

@ -104,10 +104,9 @@ public interface ProjectService extends BaseService<ProjectEntity> {
* @Description 得到超过阈值滞留的项目Id集合
* 规定只要项目的任何一个负责人(被流转到的自始至终不管有没有处理)超过了自定义或默认的滞留时间就算难点赌点
* @param customerId
* @param exclude
* @return java.util.List<java.lang.String>
* @author wangc
* @date 2020.11.06 14:14
*/
List<String> getOvertimeProjectByParameter(String customerId,List<String> exclude);
Integer getOvertimeProjectByParameter(String customerId);
}

25
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java

@ -117,36 +117,17 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
* @Description 获得项目最新操作
* @param list
* @param customerId
* @return java.util.Map<java.lang.String,java.lang.String>
* @return
* @author wangc
* @date 2020.09.28 14:44
*/
@Override
public Map<String, String> getLatestOperation(List<String> list, String customerId) {
public Map<String, ProjectLatestOperationResultDTO> getLatestOperation(List<String> list, String customerId) {
List<ProjectLatestOperationResultDTO> operations = baseDao.selectLatestOperation(list,customerId);
if(CollectionUtils.isEmpty(operations)){
return Collections.EMPTY_MAP;
}else{
return operations.stream().collect(Collectors.toMap(ProjectLatestOperationResultDTO :: getProjectId,ProjectLatestOperationResultDTO :: getOperationName));
return operations.stream().collect(Collectors.toMap(ProjectLatestOperationResultDTO :: getProjectId,o->o,(a,n)-> a));
}
}
/**
* @Description 获取项目标题
* @param list
* @param customerId
* @return java.util.Map<java.lang.String,java.lang.String>
* @author wangc
* @date 2020.10.27 14:34
*/
@Override
public Map<String, String> getProjectTitle(List<String> list, String customerId) {
List<ProjectLatestOperationResultDTO> titles = baseDao.selectProjectTitle(list,customerId);
if(CollectionUtils.isEmpty(titles)){
return Collections.EMPTY_MAP;
}else{
return titles.stream().collect(Collectors.toMap(ProjectLatestOperationResultDTO :: getProjectId,ProjectLatestOperationResultDTO :: getOperationName));
}
}
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java

@ -86,16 +86,15 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
* @Description 得到超过阈值滞留的项目Id集合
* 规定只要项目的任何一个负责人(被流转到的自始至终不管有没有处理)超过了自定义或默认的滞留时间就算难点赌点
* @param customerId
* @param exclude
* @return java.util.List<java.lang.String>
* @author wangc
* @date 2020.11.06 14:14
*/
@Override
public List<String> getOvertimeProjectByParameter(String customerId, List<String> exclude) {
public Integer getOvertimeProjectByParameter(String customerId) {
String parameter = baseDao.selectParameterValueByKey(customerId);
if(StringUtils.isBlank(parameter)) parameter = baseDao.selectParameterValueByKey("default");
return baseDao.selectOvertimeProjectIds(customerId, exclude, StringUtils.isBlank(parameter) ? NumConstant.FIVE : Integer.parseInt(parameter));
return StringUtils.isBlank(parameter) ? NumConstant.FIVE : Integer.parseInt(parameter);
}
}

12
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginGroupMainDailyDao.xml

@ -38,6 +38,18 @@
CUSTOMER_ID = #{customerId}
</select>
<!-- 根据用户Id查询所有组原始数据 -->
<select id="selectAllGroupByCustomerId" resultType="com.epmet.dto.extract.FactOriginGroupMainDailyDTO">
SELECT
id,grid_id
FROM
fact_origin_group_main_daily
WHERE
del_flag = '0'
AND
customer_id = #{customerId}
</select>
<delete id="deleteBatchByCustomerId" >
DELETE FROM
fact_origin_group_main_daily

54
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

@ -331,7 +331,7 @@
( project.PROJECT_STATUS = 'pending', '处理中', '已结案' ) AS eventStatusDesc,
IFNULL(relation.reOrg,0) AS eventReOrg,
IFNULL(handleCount.HandledCount,0) AS eventHandledCount,
IFNULL(costTime.costTime,0) AS eventCostTime ,
gridInfo.allParentIds
FROM
fact_origin_project_main_daily project
@ -382,34 +382,36 @@
GROUP BY
PROJECT_ID
) handleCount ON project.ID = handleCount.PROJECT_ID
LEFT JOIN (
SELECT
main.ID AS PROJECT_ID,
TIMESTAMPDIFF(
MINUTE,
str_to_date( main.DATE_ID, '%Y%m%d' ),
IF
( main.IS_RESOLVED = 'resolved', time.HANDLED_DATE, NOW( ) )
) AS costTime
FROM
fact_origin_project_main_daily main
LEFT JOIN fact_origin_project_org_period_daily time ON main.ID = time.PROJECT_ID
AND time.DEL_FLAG = '0'
AND time.OPERATION = 'close'
WHERE
main.DEL_FLAG = '0'
AND main.CUSTOMER_ID = #{customerId}
GROUP BY
main.ID
) costTime ON project.ID = costTime.PROJECT_ID
WHERE
project.DEL_FLAG = '0'
AND project.CUSTOMER_ID = #{customerId}
<if test="null != list and list.size() != 0">
<foreach collection="list" item="projectId" open="AND " separator=" OR " >
project.ID = #{projectId}
</foreach>
</if>
AND project.ID IN (
SELECT DISTINCT
period.project_id
FROM
fact_origin_project_org_period_daily period
LEFT JOIN
(
SELECT
project.ID AS projectId,
IF(project.project_status = 'closed',period.handled_date,NOW()) AS finishDate
FROM fact_origin_project_main_daily project LEFT JOIN fact_origin_project_org_period_daily period
ON project.ID = period.project_id AND period.del_flag = '0' AND period.customer_id = #{customerId}
AND period.operation = 'close'
WHERE project.customer_id = #{customerId} AND project.del_flag = '0'
) projectFinishDate ON projectFinishDate.projectId = period.project_id
WHERE
period.del_flag = '0'
AND period.customer_id = #{customerId}
AND TIMESTAMPDIFF( DAY, period.informed_date, projectFinishDate.finishDate) > #{thresholdValue}
)
</select>
<!-- 查询当天新立的项目,是为了增量新增难点赌点的图片库 -->

10
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml

@ -219,4 +219,14 @@
</foreach>
</insert>
<select id="selectAllDifficultyByCustomerId" resultType="com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity">
SELECT
org_id,
event_id
FROM
screen_difficulty_data
WHERE
del_flag = '0'
AND customer_id = #{customerId}
</select>
</mapper>

41
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml

@ -106,45 +106,4 @@
and PARAMETER_KEY ='detention_days'
</select>
<select id="selectOvertimeProjectIds" resultType="string">
SELECT
DISTINCT
project.ID
FROM
project project
WHERE
project.del_flag = '0'
AND project.customer_id = #{customerId}
<if test="null != exclude and exclude.size() > 0">
<foreach collection="exclude" item="id" open="AND ( " separator=" OR " close=" ) ">
project.ID <![CDATA[ <> ]]> #{id}
</foreach>
</if>
AND EXISTS (
SELECT
stff.ID
FROM
project_staff stff
LEFT JOIN project_org_relation period ON stff.ID = period.PROJECT_STAFF_ID
AND period.DEL_FLAG = '0'
WHERE
stff.DEL_FLAG = '0'
AND stff.CUSTOMER_ID = #{customerId}
AND project.ID = stff.PROJECT_ID
AND ABS(
TIMESTAMPDIFF(
DAY,
period.INFORMED_DATE,
IF
(
period.HANDLED_DATE IS NULL,
IF
( project.`STATUS` = 'closed', project.UPDATED_TIME, NOW( ) ),
period.HANDLED_DATE
)
)
) > #{value}
)
</select>
</mapper>

22
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml

@ -268,9 +268,11 @@
<select id="selectLatestOperation" resultType="com.epmet.dto.project.result.ProjectLatestOperationResultDTO">
SELECT
process.PROJECT_ID,
process.OPERATION_NAME
process.OPERATION_NAME,
project.TITLE,
CASE WHEN project.status = 'pending' THEN TIMESTAMPDIFF(MINUTE,project.created_time,NOW()) ELSE TIMESTAMPDIFF(MINUTE,project.created_time,project.UPDATED_TIME) END AS costTime
FROM
project_process process
project_process process LEFT JOIN project ON process.PROJECT_ID = project.ID AND project.DEL_FLAG = '0'
WHERE
process.DEL_FLAG = '0'
AND process.CUSTOMER_ID = #{customerId}
@ -307,20 +309,4 @@
</if>
</select>
<!-- 查找项目标题 -->
<select id="selectProjectTitle" resultType="com.epmet.dto.project.result.ProjectLatestOperationResultDTO">
SELECT
ID AS projectId,
TITLE AS operationName
FROM
project
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
<if test="null != list and list.size() > 0">
<foreach collection="list" item="projectId" open="AND (" separator=" OR " close=" )">
ID = #{projectId}
</foreach>
</if>
</select>
</mapper>

28
epmet-module/epmet-common-service/common-service-server/pom.xml

@ -130,6 +130,13 @@
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>202007161443499985fa2d397436d10356542134c8f008c48</elink.mq.appId>
<elink.mq.token>52d9d9b0e7d0eb5b8b81c205b579e07c</elink.mq.token>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -169,6 +176,13 @@
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>202007161443499985fa2d397436d10356542134c8f008c48</elink.mq.appId>
<elink.mq.token>52d9d9b0e7d0eb5b8b81c205b579e07c</elink.mq.token>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -206,6 +220,13 @@
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>20200804181646184507453a2e9aab76edc550405f80920af</elink.mq.appId>
<elink.mq.token>96d788191a10ff57a125157183413004</elink.mq.token>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -240,6 +261,13 @@
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>202008141820598348026098a1b5dd0bc63a1e2418e275d1b</elink.mq.appId>
<elink.mq.token>7ce17f65826539ff3e8616dccd4b70fc</elink.mq.token>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

5
epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml

@ -126,3 +126,8 @@ elink:
token: @elink.mq.token@ #项目接入亿联云的应用token 相当于secret
host: @elink.mq.host@ #亿联云消息网关服务地址
sendMsgPath: @elink.mq.sendMsgPath@ #发送消息路径
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-module/epmet-common-service/common-service-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/common-service"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

28
epmet-module/epmet-ext/epmet-ext-server/pom.xml

@ -197,6 +197,13 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -229,6 +236,13 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -261,6 +275,13 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
@ -294,6 +315,13 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

5
epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml

@ -98,3 +98,8 @@ ribbon:
pagehelper:
helper-dialect: mysql
reasonable: false
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-module/epmet-ext/epmet-ext-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/ext"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

6
epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml

@ -98,10 +98,14 @@ feign:
client:
config:
default:
loggerLevel: BASIC
loggerLevel: FULL
httpclient:
enabled: true
logging:
level:
com.epmet: debug
hystrix:
command:
default:

25
epmet-module/epmet-message/epmet-message-server/pom.xml

@ -171,6 +171,13 @@
<thread.pool.max-pool-size>8</thread.pool.max-pool-size>
<thread.pool.queue-capacity>10</thread.pool.queue-capacity>
<thread.pool.keep-alive>30</thread.pool.keep-alive>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -209,6 +216,12 @@
<thread.pool.max-pool-size>8</thread.pool.max-pool-size>
<thread.pool.queue-capacity>10</thread.pool.queue-capacity>
<thread.pool.keep-alive>30</thread.pool.keep-alive>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -247,6 +260,12 @@
<thread.pool.max-pool-size>8</thread.pool.max-pool-size>
<thread.pool.queue-capacity>10</thread.pool.queue-capacity>
<thread.pool.keep-alive>30</thread.pool.keep-alive>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -282,6 +301,12 @@
<thread.pool.max-pool-size>8</thread.pool.max-pool-size>
<thread.pool.queue-capacity>10</thread.pool.queue-capacity>
<thread.pool.keep-alive>30</thread.pool.keep-alive>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

5
epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml

@ -127,3 +127,8 @@ thread:
maxPoolSize: @thread.pool.max-pool-size@
queueCapacity: @thread.pool.queue-capacity@
keepAlive: @thread.pool.keep-alive@
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-module/epmet-message/epmet-message-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/message"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

25
epmet-module/epmet-oss/epmet-oss-server/pom.xml

@ -149,6 +149,13 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -181,6 +188,12 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -213,6 +226,12 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -242,6 +261,12 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

5
epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml

@ -129,3 +129,8 @@ ribbon:
pagehelper:
helper-dialect: mysql
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-module/epmet-oss/epmet-oss-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/oss"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

26
epmet-module/epmet-third/epmet-third-server/pom.xml

@ -208,6 +208,13 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -240,6 +247,12 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -272,6 +285,12 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
@ -305,6 +324,13 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

5
epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml

@ -134,3 +134,8 @@ third:
- https://epmet-ext8.elinkservice.cn
- https://epmet-ext9.elinkservice.cn
- https://epmet-ext10.elinkservice.cn
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-module/epmet-third/epmet-third-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/third"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

17
epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AccessConfigAdd4RoletFormDTO.java

@ -0,0 +1,17 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.List;
@Data
public class AccessConfigAdd4RoletFormDTO {
@NotBlank(message = "角色Key不能为空")
private String roleKey;
@NotBlank(message = "操作Key不能为空")
private String operationKey;
private List<String> scopeKeys;
}

19
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/AccessConfigController.java

@ -12,6 +12,7 @@ import oracle.jdbc.proxy.annotation.Post;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Set;
@ -116,4 +117,22 @@ public class AccessConfigController {
return new Result();
}
/**
* @Description 给角色添加操作权限和操作范围
* @return
* @author wxz
* @date 2020.11.17 17:41
*/
@PostMapping("add-ope-and-scopes-4role")
public Result addOpeAndScopes4Role(@RequestBody AccessConfigAdd4RoletFormDTO form) {
ValidatorUtils.validateEntity(form);
String roleKey = form.getRoleKey();
String operationKey = form.getOperationKey();
List<String> scopeKeys = form.getScopeKeys();
accessConfigService.addOpeAndScopes4Role(roleKey, operationKey, scopeKeys);
return new Result();
}
}

2
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/AccessConfigService.java

@ -25,4 +25,6 @@ public interface AccessConfigService {
List<AccessConfigOpeDefaultScopesResultDTO> listOpeDefaultScopes4Role(String roleKey, String operationKey);
void saveOpeDefaultScopes(String roleKey, String operationKey, List<String> scopeKeys);
void addOpeAndScopes4Role(String roleKey, String operationKey, List<String> scopeKeys);
}

57
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessConfigServiceImpl.java

@ -2,12 +2,14 @@ package com.epmet.service.impl;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.*;
import com.epmet.dto.result.*;
import com.epmet.entity.OperationScopeDefaultEntity;
import com.epmet.entity.RoleOperationDefaultEntity;
import com.epmet.entity.RoleOperationEntity;
import com.epmet.entity.RoleScopeEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.redis.RoleOpeScopeRedis;
import com.epmet.service.AccessConfigService;
import org.slf4j.Logger;
@ -41,6 +43,9 @@ public class AccessConfigServiceImpl implements AccessConfigService {
@Autowired
private OperationScopeDefaultDao operationScopeDefaultDao;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override
public List<AccessConfigOpesResultDTO> listOpesByRole(String roleId) {
return roleOperationDao.listOpesForAccessConfig(roleId);
@ -196,4 +201,56 @@ public class AccessConfigServiceImpl implements AccessConfigService {
operationScopeDefaultDao.insert(entity);
}
}
/**
* @Description 给角色添加操作权限和操作范围
* @return
* @author wxz
* @date 2020.11.17 17:41
*/
@Override
public void addOpeAndScopes4Role(String roleKey, String operationKey, List<String> scopeKeys) {
Result<List<GovStaffRoleResultDTO>> rolesResult = epmetUserOpenFeignClient.listRolesByRoleKey(roleKey);
if (!rolesResult.success()) {
String msg = "调用user服务,根据key查询角色列表失败";
throw new RenException(EpmetErrorCode.USER_LIST_ROLES_BY_KEY_FAIL.getCode(), msg, msg,
RenException.MessageMode.CODE_INTERNAL_EXTERNAL.CODE_INTERNAL_EXTERNAL);
}
List<GovStaffRoleResultDTO> roles = rolesResult.getData();
List<String> roleIds2Add = roles.stream().map(GovStaffRoleResultDTO::getRoleId).collect(Collectors.toList());
addOpeAndScopes4Role(roleIds2Add, operationKey, scopeKeys);
}
/**
* @Description 将默认的角色操作和范围同步给具体的角色
* @return
* @author wxz
* @date 2020.11.17 17:38
*/
@Transactional(rollbackFor = Exception.class)
public void addOpeAndScopes4Role(List<String> roleIds, String operationKey, List<String> scopeKeys) {
for (String roleId : roleIds) {
// 只给没有添加该权限的用户赋予该权限,已经添加了和添加了又取消的不操作
RoleOperationEntity roleOpe = roleOperationDao.getRoleOpe(roleId, operationKey);
if (roleOpe == null) {
// 没有该操作,则添加
RoleOperationEntity roleOperation = new RoleOperationEntity();
roleOperation.setOperationKey(operationKey);
roleOperation.setRoleId(roleId);
roleOperationDao.insert(roleOperation);
}
for (String scopeKey : scopeKeys) {
// 没有的话则添加
RoleScopeEntity roleScopeInDb = roleScopeDao.getByRoleIdAndOpeKey(roleId, operationKey, scopeKey);
if (roleScopeInDb == null) {
RoleScopeEntity roleScopeEntity = new RoleScopeEntity();
roleScopeEntity.setOperationKey(operationKey);
roleScopeEntity.setRoleId(roleId);
roleScopeEntity.setScopeKey(scopeKey);
roleScopeDao.insert(roleScopeEntity);
}
}
}
}
}

4
epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml

@ -119,3 +119,7 @@ pagehelper:
helper-dialect: mysql
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
#feign 日志需要该配置
logging:
level:
com.epmet: debug

25
epmet-module/gov-grid/gov-grid-server/pom.xml

@ -118,6 +118,12 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -144,6 +150,12 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -170,6 +182,12 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -196,6 +214,13 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

5
epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml

@ -75,3 +75,8 @@ ribbon:
pagehelper:
helper-dialect: mysql
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-module/gov-grid/gov-grid-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/gov-grid"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

97
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/IssueSuggestionDTO.java

@ -0,0 +1,97 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 居民端用户对议题建议或意见表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-18
*/
@Data
public class IssueSuggestionDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户Id customer.id
*/
private String customerId;
/**
* 议题id
*/
private String issueId;
/**
* 议题所属网格id
*/
private String gridId;
/**
* 对议题的想法
*/
private String suggestion;
/**
* 1公开; 0匿名
*/
private Integer publicFlag;
/**
* 删除标识0 未删除 1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 提建议的人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 修改人ID
*/
private String updatedBy;
/**
* 修改时间
*/
private Date updatedTime;
}

3
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/EvaluationListFormDTO.java

@ -2,6 +2,7 @@ package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@ -21,11 +22,13 @@ public class EvaluationListFormDTO implements Serializable {
/**
* 页码
*/
@NotBlank(message = "pageNo不能为空")
private Integer pageNo;
/**
* 每页数量
*/
@NotBlank(message = "pageSize不能为空")
private Integer pageSize;

33
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/UserIssueSuggestionFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 查询用户对于某个议题的想法 返回一条记录
*
* @author yinzuomei@elink-cn.com
* @date 2020/11/18 10:09
*/
@Data
public class UserIssueSuggestionFormDTO implements Serializable {
private static final long serialVersionUID = -8506264833919404944L;
/**
* 用户id
*/
@NotBlank(message = "userId不能为空")
private String userId;
/**
* 议题id
*/
@NotBlank(message = "issueId不能为空")
private String issueId;
public UserIssueSuggestionFormDTO( String userId, String issueId) {
this.userId = userId;
this.issueId = issueId;
}
}

55
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/IssueSuggestionResDTO.java

@ -0,0 +1,55 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* 议题建议列表
*
* @author yinzuomei@elink-cn.com
* @date 2020/11/18 14:00
*/
@Data
public class IssueSuggestionResDTO implements Serializable {
private static final long serialVersionUID = -6217415454610258644L;
/**
* 建议id
*/
private String suggestionId;
/**
* 建议内容
*/
private String suggestion;
/**
* 建议时间戳
*/
private Long publishTime;
/**
* true 公开 false 匿名
*/
private Boolean publicFlag;
/**
* 用户头像url
*/
private String headPhoto;
/**
* 用户显示名称
*/
private String userShowName;
/**
* 态度 - opposition反对support赞成
*/
private String aititude;
@JsonIgnore
private String userId;
}

22
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/SaveIssueSuggestionResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 保存居民端用户对议题的建议或意见 返回议题id, 建议id
*
* @author yinzuomei@elink-cn.com
* @date 2020/11/18 13:14
*/
@Data
public class SaveIssueSuggestionResultDTO implements Serializable {
private static final long serialVersionUID = 8199657776260756910L;
private String issueId;
/**
* issue_suggestion表主键
*/
private String suggestionId;
}

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

@ -7,6 +7,10 @@ import com.epmet.dto.form.MyPartIssuesFormDTO;
import com.epmet.dto.form.MyPubIssuesAuditingFormDTO;
import com.epmet.dto.result.MyPartIssuesResultDTO;
import com.epmet.dto.result.MyPubIssuesAuditingResultDTO;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IssueSuggestionDTO;
import com.epmet.dto.form.UserIssueSuggestionFormDTO;
import com.epmet.dto.result.SaveIssueSuggestionResultDTO;
import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack;
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO;
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO;
@ -15,6 +19,16 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
@ -64,4 +78,51 @@ public interface GovIssueOpenFeignClient {
*/
@PostMapping("/gov/issue/issue/shiftissuetopic")
Result<List<MyShiftIssueTopicsResultDTO>> myShiftIssueTopics(@RequestBody MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO);
/**
* 小组表决中议题
* @author zhaoqifeng
* @date 2020/11/17 14:58
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO>>
*/
@PostMapping("/gov/issue/issue/groupvotinglist")
Result<List<GroupVotingListResultDTO>> getVotingListByGroup(@RequestBody AllIssueFormDTO formDTO);
/**
* 小组已转项目议题
* @author zhaoqifeng
* @date 2020/11/17 14:58
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO>>
*/
@PostMapping("/gov/issue/issue/groupshiftprojectlist")
Result<List<GroupShiftProjectListResultDTO>> getShiftProjectListByGroup(@RequestBody AllIssueFormDTO formDTO);
/**
* 小组已关闭议题
* @author zhaoqifeng
* @date 2020/11/17 14:58
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO>>
*/
@PostMapping("/gov/issue/issue/groupclosedlist")
Result<List<GroupClosedListResultDTO>> getClosedListByGroup(@RequestBody AllIssueFormDTO formDTO);
/**
* @param formDTO
* @author yinzuomei
* @description 查询用户对于某个议题的想法 返回一条记录
* @Date 2020/11/18 10:17
**/
@PostMapping(value = "/gov/issue/issuesuggestion/queryuserissuesuggestion", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<IssueSuggestionDTO> queryIssueSuggestion(@RequestBody UserIssueSuggestionFormDTO formDTO);
/**
* @param issueSuggestionDTO
* @author yinzuomei
* @description 保存居民端用户对议题的建议或意见
* @Date 2020/11/18 13:24
**/
@PostMapping(value = "/gov/issue/issuesuggestion/save", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<SaveIssueSuggestionResultDTO> saveIssueSuggestion(@RequestBody IssueSuggestionDTO issueSuggestionDTO);
}

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

@ -8,9 +8,19 @@ import com.epmet.dto.form.MyPartIssuesFormDTO;
import com.epmet.dto.form.MyPubIssuesAuditingFormDTO;
import com.epmet.dto.result.MyPartIssuesResultDTO;
import com.epmet.dto.result.MyPubIssuesAuditingResultDTO;
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.IssueSuggestionDTO;
import com.epmet.dto.form.UserIssueSuggestionFormDTO;
import com.epmet.dto.result.SaveIssueSuggestionResultDTO;
import com.epmet.feign.GovIssueOpenFeignClient;
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO;
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO;
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO;
import org.springframework.stereotype.Component;
import java.util.List;
@ -42,4 +52,64 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result<List<MyShiftIssueTopicsResultDTO>> myShiftIssueTopics(MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER,"myShiftIssueTopics",myShiftIssueTopicsFormDTO);
}
/**
* 小组表决中议题
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO>>
* @author zhaoqifeng
* @date 2020/11/17 14:58
*/
@Override
public Result<List<GroupVotingListResultDTO>> getVotingListByGroup(AllIssueFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getVotingListByGroup", formDTO);
}
/**
* 小组已转项目议题
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO>>
* @author zhaoqifeng
* @date 2020/11/17 14:58
*/
@Override
public Result<List<GroupShiftProjectListResultDTO>> getShiftProjectListByGroup(AllIssueFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getShiftProjectListByGroup", formDTO);
}
/**
* 小组已关闭议题
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO>>
* @author zhaoqifeng
* @date 2020/11/17 14:58
*/
@Override
public Result<List<GroupClosedListResultDTO>> getClosedListByGroup(AllIssueFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getShiftProjectListByGroup", formDTO);
}
/**
* @param formDTO
* @author yinzuomei
* @description
* @Date 2020/11/18 10:17
**/
@Override
public Result<IssueSuggestionDTO> queryIssueSuggestion(UserIssueSuggestionFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "queryIssueSuggestion", formDTO);
}
/**
* @param issueSuggestionDTO
* @author yinzuomei
* @description 保存居民端用户对议题的建议或意见
* @Date 2020/11/18 13:24
**/
@Override
public Result<SaveIssueSuggestionResultDTO> saveIssueSuggestion(IssueSuggestionDTO issueSuggestionDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "saveIssueSuggestion", issueSuggestionDTO);
}
}

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

@ -146,7 +146,7 @@
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--测试钉钉 机器人地址-->
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19</dingTalk.robot.secret>
</properties>
@ -183,7 +183,7 @@
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--测试钉钉 机器人地址-->
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19</dingTalk.robot.secret>
</properties>
@ -253,6 +253,13 @@
<spring.flyway.enabled>true</spring.flyway.enabled>
<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=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

42
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java

@ -5,6 +5,11 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.excel.IssueExcel;
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO;
import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO;
import com.epmet.service.IssueService;
import org.springframework.beans.factory.annotation.Autowired;
@ -62,6 +67,7 @@ public class IssueController {
public Result<List<ShiftProjectListResultDTO>> getShiftProjectList(@RequestBody ShiftProjectListFromDTO fromDTO) {
return new Result<List<ShiftProjectListResultDTO>>().ok(issueService.getShiftProjectList(fromDTO));
}
/**
* @Description 话题转议题 供群组话题服务调用
* @param issueShiftedFromTopicFormDTO
@ -179,5 +185,41 @@ public class IssueController {
ValidatorUtils.validateEntity(myShiftIssueTopicsFormDTO, MyShiftIssueTopicsFormDTO.MyShiftIssueTopics.class);
return new Result<List<MyShiftIssueTopicsResultDTO>>().ok(issueService.myShiftIssueTopics(myShiftIssueTopicsFormDTO));
}
/**
* 小组表决中议题
* @author zhaoqifeng
* @date 2020/11/17 14:58
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO>>
*/
@PostMapping("groupvotinglist")
public Result<List<GroupVotingListResultDTO>> getVotingListByGroup(@RequestBody AllIssueFormDTO formDTO) {
return new Result<List<GroupVotingListResultDTO>>().ok(issueService.getVotingListByGroup(formDTO));
}
/**
* 小组已转项目议题
* @author zhaoqifeng
* @date 2020/11/17 14:58
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO>>
*/
@PostMapping("groupshiftprojectlist")
public Result<List<GroupShiftProjectListResultDTO>> getShiftProjectListByGroup(@RequestBody AllIssueFormDTO formDTO) {
return new Result<List<GroupShiftProjectListResultDTO>>().ok(issueService.getShiftProjectListByGroup(formDTO));
}
/**
* 小组已关闭议题
* @author zhaoqifeng
* @date 2020/11/17 14:58
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO>>
*/
@PostMapping("groupclosedlist")
public Result<List<GroupClosedListResultDTO>> getClosedListByGroup(@RequestBody AllIssueFormDTO formDTO) {
return new Result<List<GroupClosedListResultDTO>>().ok(issueService.getClosedListByGroup(formDTO));
}
}

2
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueCustomerParameterController.java

@ -43,7 +43,7 @@ import java.util.Map;
* @since v1.0.0 2020-05-11
*/
@RestController
@RequestMapping("issuecustomerparameter")
@RequestMapping("parameter")
public class IssueCustomerParameterController {
@Autowired

87
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueSuggestionController.java

@ -0,0 +1,87 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.IssueSuggestionDTO;
import com.epmet.dto.form.EvaluationListFormDTO;
import com.epmet.dto.form.UserIssueSuggestionFormDTO;
import com.epmet.dto.result.IssueSuggestionResDTO;
import com.epmet.dto.result.SaveIssueSuggestionResultDTO;
import com.epmet.service.IssueSuggestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 居民端用户对议题建议或意见表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-18
*/
@RestController
@RequestMapping("issuesuggestion")
public class IssueSuggestionController {
@Autowired
private IssueSuggestionService issueSuggestionService;
/**
* @param formDTO
* @author yinzuomei
* @description 查询用户对于某个议题的想法 返回一条记录
* @Date 2020/11/18 10:12
**/
@PostMapping("queryuserissuesuggestion")
public Result<IssueSuggestionDTO> queryUserIssueSuggestion(@RequestBody UserIssueSuggestionFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
IssueSuggestionDTO issueSuggestionDTO=issueSuggestionService.queryUserIssueSuggestion(formDTO);
return new Result<IssueSuggestionDTO>().ok(issueSuggestionDTO);
}
/**
* @param dto
* @author yinzuomei
* @description 保存居民端用户对议题的建议或意见
* @Date 2020/11/18 13:15
**/
@PostMapping("save")
public Result<SaveIssueSuggestionResultDTO> saveIssueSuggestion(@RequestBody IssueSuggestionDTO dto) {
SaveIssueSuggestionResultDTO resultDTO = issueSuggestionService.saveIssueSuggestion(dto);
return new Result<SaveIssueSuggestionResultDTO>().ok(resultDTO);
}
/**
* @param formDTO
* @author yinzuomei
* @description 议题建议列表
* @Date 2020/11/18 14:15
**/
@PostMapping("list")
public Result<List<IssueSuggestionResDTO>> listIssueSug(@RequestBody EvaluationListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
List<IssueSuggestionResDTO> list = issueSuggestionService.listIssueSug(formDTO);
return new Result<List<IssueSuggestionResDTO>>().ok(list);
}
}

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

@ -22,6 +22,9 @@ import com.epmet.dto.IssueDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.entity.IssueEntity;
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO;
import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -176,4 +179,32 @@ public interface IssueDao extends BaseDao<IssueEntity> {
* @date 2020/11/13 3:42 下午
*/
List<MyShiftIssueTopicsResultDTO> myShiftIssueTopics(@Param("topicIds") List<String> topicIds,@Param("customerId") String customerId);
/**
* 根据话题ID查找表决中议题列表
* @author zhaoqifeng
* @date 2020/5/13 16:27
* @param formDTO 参数
* @return java.util.List<com.epmet.entity.IssueEntity>
*/
List<GroupVotingListResultDTO> selectVotingListByTopic(AllIssueFormDTO formDTO);
/**
* 根据话题ID查找已转项目议题列表
* @author zhaoqifeng
* @date 2020/5/13 16:27
* @param formDTO 参数
* @return java.util.List<com.epmet.entity.IssueEntity>
*/
List<IssueEntity> selectShiftIssueByTopic(AllIssueFormDTO formDTO);
/**
* 根据话题ID查找已转项目议题列表
* @author zhaoqifeng
* @date 2020/5/13 16:27
* @param formDTO 参数
* @return java.util.List<com.epmet.entity.IssueEntity>
*/
List<GroupClosedListResultDTO> selectClosedListByTopic(AllIssueFormDTO formDTO);
}

54
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueSuggestionDao.java

@ -0,0 +1,54 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IssueSuggestionDTO;
import com.epmet.dto.form.UserIssueSuggestionFormDTO;
import com.epmet.dto.result.IssueSuggestionResDTO;
import com.epmet.entity.IssueSuggestionEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 居民端用户对议题建议或意见表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-18
*/
@Mapper
public interface IssueSuggestionDao extends BaseDao<IssueSuggestionEntity> {
/**
* @return com.epmet.dto.IssueSuggestionDTO
* @param formDTO
* @author yinzuomei
* @description 查询用户对于某个议题的想法 返回一条记录
* @Date 2020/11/18 10:12
**/
IssueSuggestionDTO selectUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO);
/**
* @param issueId
* @author yinzuomei
* @description 查询议题建议
* @Date 2020/11/18 14:27
**/
List<IssueSuggestionResDTO> selectListIssueSugByIssueId(String issueId);
}

11
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java

@ -18,6 +18,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IssueVoteDetailDTO;
import com.epmet.dto.form.VoteFormDTO;
import com.epmet.dto.result.IssueAttitudeCountResultDTO;
import com.epmet.dto.result.MyPartIssuesResultDTO;
@ -82,4 +83,14 @@ public interface IssueVoteDetailDao extends BaseDao<IssueVoteDetailEntity> {
* @date 2020/11/10 10:01 上午
*/
List<MyPartIssuesResultDTO> myPartIssues(@Param("userId")String userId);
/**
* @return com.epmet.dto.IssueVoteDetailDTO
* @param userId
* @param issueId
* @author yinzuomei
* @description 查询用户对某个议题的表决信息
* @Date 2020/11/18 14:35
**/
IssueVoteDetailDTO selectUserIssueDet(@Param("userId") String userId, @Param("issueId") String issueId);
}

66
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/entity/IssueSuggestionEntity.java

@ -0,0 +1,66 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 居民端用户对议题建议或意见表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("issue_suggestion")
public class IssueSuggestionEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id customer.id
*/
private String customerId;
/**
* 议题id
*/
private String issueId;
/**
* 议题所属网格id
*/
private String gridId;
/**
* 对议题的想法
*/
private String suggestion;
/**
* 1公开; 0匿名
*/
private Integer publicFlag;
}

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

@ -8,6 +8,10 @@ import com.epmet.dto.result.*;
import com.epmet.dto.form.CommonIssueListFormDTO;
import com.epmet.dto.form.IssueShiftedFromTopicFormDTO;
import com.epmet.entity.IssueEntity;
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO;
import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO;
import java.util.List;
@ -245,4 +249,31 @@ public interface IssueService extends BaseService<IssueEntity> {
*/
List<MyShiftIssueTopicsResultDTO> myShiftIssueTopics(MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO);
/**
* 小组表决中议题
* @author zhaoqifeng
* @date 2020/11/17 14:59
* @param formDTO
* @return java.util.List<com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO>
*/
List<GroupVotingListResultDTO> getVotingListByGroup(AllIssueFormDTO formDTO);
/**
* 小组已转项目议题
* @author zhaoqifeng
* @date 2020/11/17 14:59
* @param formDTO
* @return java.util.List<com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO>
*/
List<GroupShiftProjectListResultDTO> getShiftProjectListByGroup(AllIssueFormDTO formDTO);
/**
* 小组已关闭议题
* @author zhaoqifeng
* @date 2020/11/17 14:59
* @param formDTO
* @return java.util.List<com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO>
*/
List<GroupClosedListResultDTO> getClosedListByGroup(AllIssueFormDTO formDTO);
}

61
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueSuggestionService.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.IssueSuggestionDTO;
import com.epmet.dto.form.EvaluationListFormDTO;
import com.epmet.dto.form.UserIssueSuggestionFormDTO;
import com.epmet.dto.result.IssueSuggestionResDTO;
import com.epmet.dto.result.SaveIssueSuggestionResultDTO;
import com.epmet.entity.IssueSuggestionEntity;
import java.util.List;
/**
* 居民端用户对议题建议或意见表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-18
*/
public interface IssueSuggestionService extends BaseService<IssueSuggestionEntity> {
/**
* @param formDTO
* @author yinzuomei
* @description 查询用户对于某个议题的想法 返回一条记录
* @Date 2020/11/18 10:12
**/
IssueSuggestionDTO queryUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO);
/**
* @param dto
* @author yinzuomei
* @description 保存居民端用户对议题的建议或意见
* @Date 2020/11/18 13:16
**/
SaveIssueSuggestionResultDTO saveIssueSuggestion(IssueSuggestionDTO dto);
/**
* @param formDTO
* @author yinzuomei
* @description 议题建议列表
* @Date 2020/11/18 14:16
**/
List<IssueSuggestionResDTO> listIssueSug(EvaluationListFormDTO formDTO);
}

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

@ -37,6 +37,10 @@ import com.epmet.redis.GovIssueRedis;
import com.epmet.redis.IssueVoteDetailRedis;
import com.epmet.resi.group.dto.group.form.GroupInfoFormDTO;
import com.epmet.resi.group.dto.group.result.GroupInfoResultDTO;
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO;
import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO;
import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO;
import com.epmet.resi.group.dto.topic.ResiTopicDTO;
import com.epmet.resi.group.dto.topic.form.GovTopicIssueInfoFormDTO;
import com.epmet.resi.group.dto.topic.form.TopicIdListFormDTO;
@ -50,6 +54,7 @@ import com.epmet.service.IssueVoteStatisticalService;
import com.epmet.utils.ModuleConstants;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -927,4 +932,72 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
return result;
}
/**
* 小组表决中议题
*
* @param formDTO
* @return java.util.List<com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO>
* @author zhaoqifeng
* @date 2020/11/17 14:59
*/
@Override
public List<GroupVotingListResultDTO> getVotingListByGroup(AllIssueFormDTO formDTO) {
//查询条件
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageNo(pageIndex);
return baseDao.selectVotingListByTopic(formDTO);
}
/**
* 小组已转项目议题
*
* @param formDTO
* @return java.util.List<com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO>
* @author zhaoqifeng
* @date 2020/11/17 14:59
*/
@Override
public List<GroupShiftProjectListResultDTO> getShiftProjectListByGroup(AllIssueFormDTO formDTO) {
List<GroupShiftProjectListResultDTO> resultList = new ArrayList<>();
//查询条件
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageNo(pageIndex);
List<IssueEntity> issueList = baseDao.selectShiftIssueByTopic(formDTO);
if (CollectionUtils.isEmpty(issueList)) {
return resultList;
}
//遍历获取所有的议题Id
List<String> issueIds = issueList.stream().map(IssueEntity::getId).collect(Collectors.toList());
ShiftProjectsFromDTO shiftProjectsFromDTO = new ShiftProjectsFromDTO();
shiftProjectsFromDTO.setIssueIds(issueIds);
List<ShiftProjectResultDTO> projectList = govProjectFeignClient.getProjectByIssue(shiftProjectsFromDTO).getData();
resultList = issueList.stream().flatMap(issue -> projectList.stream().filter(p -> issue.getId().equals(p.getOriginId())).map(project ->{
GroupShiftProjectListResultDTO shiftProject = new GroupShiftProjectListResultDTO();
shiftProject.setIssueId(issue.getId());
shiftProject.setIssueTitle(issue.getIssueTitle());
shiftProject.setCurrentHandleDepartMent(project.getDepartmentNameList());
shiftProject.setPublicReply(project.getPublicReply());
shiftProject.setIssueShiftedTime(project.getCreatedTime().getTime()/NumConstant.ONE_THOUSAND);
shiftProject.setProjectStatus(project.getStatus());
return shiftProject;
})).collect(Collectors.toList());
return resultList;
}
/**
* 小组已关闭议题
*
* @param formDTO
* @return java.util.List<com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO>
* @author zhaoqifeng
* @date 2020/11/17 14:59
*/
@Override
public List<GroupClosedListResultDTO> getClosedListByGroup(AllIssueFormDTO formDTO) {
//查询条件
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageNo(pageIndex);
return baseDao.selectClosedListByTopic(formDTO);
}
}

173
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueSuggestionServiceImpl.java

@ -0,0 +1,173 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.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.RenException;
import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.dao.IssueSuggestionDao;
import com.epmet.dao.IssueVoteDetailDao;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.IssueSuggestionDTO;
import com.epmet.dto.IssueVoteDetailDTO;
import com.epmet.dto.form.EvaluationListFormDTO;
import com.epmet.dto.form.UserIssueSuggestionFormDTO;
import com.epmet.dto.form.UserResiInfoListFormDTO;
import com.epmet.dto.result.IssueSuggestionResDTO;
import com.epmet.dto.result.SaveIssueSuggestionResultDTO;
import com.epmet.dto.result.UserResiInfoResultDTO;
import com.epmet.entity.IssueSuggestionEntity;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.service.IssueService;
import com.epmet.service.IssueSuggestionService;
import com.github.pagehelper.PageHelper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* 居民端用户对议题建议或意见表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-18
*/
@Slf4j
@Service
public class IssueSuggestionServiceImpl extends BaseServiceImpl<IssueSuggestionDao, IssueSuggestionEntity> implements IssueSuggestionService {
@Autowired
private IssueService issueService;
@Value("${openapi.scan.server.url}")
private String scanApiUrl;
@Value("${openapi.scan.method.textSyncScan}")
private String textSyncScanMethod;
@Autowired
private EpmetUserFeignClient epmetUserFeignClient;
@Autowired
private IssueVoteDetailDao issueVoteDetailDao;
/**
* @param formDTO
* @author yinzuomei
* @description 查询用户对于某个议题的想法 返回一条记录
* @Date 2020/11/18 10:12
**/
@Override
public IssueSuggestionDTO queryUserIssueSuggestion(UserIssueSuggestionFormDTO formDTO) {
return baseDao.selectUserIssueSuggestion(formDTO);
}
/**
* @param dto
* @author yinzuomei
* @description 保存居民端用户对议题的建议或意见
* @Date 2020/11/18 13:16
**/
@Override
public SaveIssueSuggestionResultDTO saveIssueSuggestion(IssueSuggestionDTO dto) {
//是否表决过
IssueVoteDetailDTO issueVoteDetailDTO = issueVoteDetailDao.selectUserIssueDet(dto.getCreatedBy(), dto.getIssueId());
if(null==issueVoteDetailDTO){
throw new RenException(EpmetErrorCode.VOTE_ISSUE_PLEASE.getCode());
}
//校验建议内容
TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
TextTaskDTO taskDTO = new TextTaskDTO();
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
taskDTO.setContent(dto.getSuggestion());
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());
} else {
if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode());
}
}
//赋值网格id
IssueDTO issueDTO = issueService.get(dto.getIssueId());
if (null == issueDTO) {
throw new RenException(String.format("根据议题id%s,没有找到议题信息", dto.getIssueId()));
}
dto.setGridId(issueDTO.getGridId());
dto.setCustomerId(issueDTO.getCustomerId());
//插入
IssueSuggestionEntity entity = ConvertUtils.sourceToTarget(dto, IssueSuggestionEntity.class);
insert(entity);
SaveIssueSuggestionResultDTO resultDTO = new SaveIssueSuggestionResultDTO();
resultDTO.setIssueId(dto.getIssueId());
resultDTO.setSuggestionId(entity.getId());
return resultDTO;
}
/**
* @param formDTO
* @author yinzuomei
* @description 议题建议列表
* @Date 2020/11/18 14:16
**/
@Override
public List<IssueSuggestionResDTO> listIssueSug(EvaluationListFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<IssueSuggestionResDTO> list = baseDao.selectListIssueSugByIssueId(formDTO.getIssueId());
//用户信息公开的userId集合
Set<String> userIds = new HashSet<>();
list.forEach(issueSuggestion -> {
if (issueSuggestion.getPublicFlag()) {
userIds.add(issueSuggestion.getUserId());
}
IssueVoteDetailDTO issueVoteDetailDTO = issueVoteDetailDao.selectUserIssueDet(issueSuggestion.getUserId(), formDTO.getIssueId());
issueSuggestion.setAititude(null != issueVoteDetailDTO ? issueVoteDetailDTO.getAttitude() : StrConstant.EPMETY_STR);
});
//查询这部分人的基本信息
if (!CollectionUtils.isEmpty(userIds)) {
Result<List<UserResiInfoResultDTO>> userInfoRes = epmetUserFeignClient.getUserResiInfoList(new UserResiInfoListFormDTO(new ArrayList<>(userIds)));
if (userInfoRes.success() && !CollectionUtils.isEmpty(userInfoRes.getData())) {
Map<String, UserResiInfoResultDTO> userBaseInfoMap = userInfoRes.getData().stream().collect(Collectors.toMap(UserResiInfoResultDTO::getUserId, Function.identity()));
//赋值
list.forEach(issueSuggestionInfo -> {
if (issueSuggestionInfo.getPublicFlag()) {
UserResiInfoResultDTO userInfo = userBaseInfoMap.get(issueSuggestionInfo.getUserId());
if (null != userInfo && StringUtils.isNotBlank(userInfo.getHeadPhoto())) {
issueSuggestionInfo.setHeadPhoto(userInfo.getHeadPhoto());
}
if (null != userInfo && StringUtils.isNotBlank(userInfo.getShowName())) {
issueSuggestionInfo.setUserShowName(userInfo.getShowName());
}
}
});
}
}
return list;
}
}

6
epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml

@ -115,3 +115,9 @@ openapi:
pagehelper:
helper-dialect: mysql
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

37
epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.2__issue_audit_tables.sql

@ -0,0 +1,37 @@
drop table if exists issue_application;
CREATE TABLE `issue_application` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID',
`ISSUE_TITLE` varchar(128) NOT NULL COMMENT '议题名称 ',
`SUGGESTION` varchar(1024) NOT NULL COMMENT '建议',
`APPLY_STATUS` varchar(32) NOT NULL COMMENT '审核状态:under_auditing:待审核;approved:通过;rejected:驳回',
`TOPIC_ID` varchar(32) NOT NULL COMMENT '话题id',
`GROUP_ID` varchar(64) NOT NULL COMMENT '小组id',
`GRID_ID` varchar(32) NOT NULL COMMENT '网格ID 居民端议题对应一个网格Id',
`ISSUE_ID` varchar(64) DEFAULT NULL COMMENT '审核通过后对应的 议题id',
`PASSED_REASON` varchar(1024) DEFAULT NULL COMMENT '审核通过时填写的理由',
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除',
`REVISION` int(11) NOT NULL DEFAULT '0' 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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='话题转议题申请表';
drop table if exists issue_application_history;
CREATE TABLE `issue_application_history` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID',
`ISSUE_APPLICATION_ID` varchar(64) NOT NULL COMMENT '话题转议题申请表 issue_application.id',
`ACTION_TYPE` varchar(32) NOT NULL COMMENT 'under_auditing:提交审核;\r\napproved:审核通过,\r\nrejected:驳回',
`REASON` varchar(1024) DEFAULT NULL COMMENT '审核时的说明',
`STAFF_NAME` varchar(255) DEFAULT NULL COMMENT '工作端人员姓名',
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识:0 未删除 1已删除',
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁',
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人 提交人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(64) NOT NULL COMMENT '修改人ID',
`UPDATED_TIME` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='话题转议题审核历史表';

16
epmet-module/gov-issue/gov-issue-server/src/main/resources/db/migration/V0.0.3__issue_sugg_tables.sql

@ -0,0 +1,16 @@
drop table if exists issue_suggestion;
CREATE TABLE `issue_suggestion` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id customer.id',
`ISSUE_ID` varchar(64) NOT NULL COMMENT '议题id',
`GRID_ID` varchar(64) NOT NULL COMMENT '议题所属网格id',
`SUGGESTION` varchar(512) NOT NULL COMMENT '对议题的想法',
`PUBLIC_FLAG` tinyint(1) NOT NULL COMMENT '1公开; 0匿名',
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识:0 未删除 1已删除',
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁',
`CREATED_BY` varchar(64) NOT NULL COMMENT '提建议的人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(64) NOT NULL COMMENT '修改人ID',
`UPDATED_TIME` datetime NOT NULL COMMENT '修改时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='居民端用户对议题建议或意见表';

9
epmet-module/gov-issue/gov-issue-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/gov-issue"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

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

@ -377,6 +377,69 @@
del_flag = 0
AND source_id = #{topicId}
</select>
<select id="selectIssueListByTopic" resultType="com.epmet.entity.IssueEntity">
SELECT
*
FROM
issue
WHERE
DEL_FLAG = '0'
AND GRID_ID = #{gridId}
AND ISSUE_STATUS = 'shift_project'
ORDER BY UPDATED_TIME DESC
</select>
<select id="selectShiftIssueByTopic" resultType="com.epmet.entity.IssueEntity">
SELECT
ID,
IFNULL(ISSUE_TITLE, '') AS issueTitle
FROM
issue
WHERE
DEL_FLAG = '0'
AND SOURCE_TYPE = 'resi_topic'
<foreach item="topic" collection="topicIds" separator="OR" open="AND (" close=")" index="">
SOURCE_ID = #{topic}
</foreach>
AND ISSUE_STATUS = 'shift_project'
ORDER BY UPDATED_TIME DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectVotingListByTopic" resultType="com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO">
SELECT
ID AS "issueId",
IFNULL(ISSUE_TITLE, '') AS "issueTitle",
UNIX_TIMESTAMP( CREATED_TIME ) AS "issuePublishTime",
IFNULL(SUGGESTION, '') AS "suggestion"
FROM
issue
WHERE
DEL_FLAG = '0'
AND SOURCE_TYPE = 'resi_topic'
<foreach item="topic" collection="topicIds" separator="OR" open="AND (" close=")" index="">
SOURCE_ID = #{topic}
</foreach>
AND ISSUE_STATUS = 'voting'
ORDER BY CREATED_TIME DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectClosedListByTopic" resultType="com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO">
SELECT
ID AS "issueId",
IFNULL(ISSUE_TITLE, '') AS "issueTitle",
IFNULL(CLOSE_REASON, '') AS "solution",
UNIX_TIMESTAMP( UPDATED_TIME ) AS "issueClosedTime"
FROM
issue
WHERE
DEL_FLAG = '0'
AND SOURCE_TYPE = 'resi_topic'
<foreach item="topic" collection="topicIds" separator="OR" open="AND (" close=")" index="">
SOURCE_ID = #{topic}
</foreach>
AND ISSUE_STATUS = 'closed'
ORDER BY UPDATED_TIME DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<!-- 个人中心-我发起的议题列表-表决中 -->
<select id="myPubIssuesAuditing" resultType="com.epmet.dto.result.MyPubIssuesAuditingResultDTO">

36
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueSuggestionDao.xml

@ -0,0 +1,36 @@
<?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.IssueSuggestionDao">
<!-- 查询用户对于某个议题的想法 返回一条记录 -->
<select id="selectUserIssueSuggestion" parameterType="com.epmet.dto.form.UserIssueSuggestionFormDTO" resultType="com.epmet.dto.IssueSuggestionDTO">
SELECT
*
FROM
issue_suggestion i
WHERE
i.DEL_FLAG = '0'
AND i.ISSUE_ID = #{issueId}
AND i.CREATED_BY=#{userId}
</select>
<!-- 查询议题建议 -->
<select id="selectListIssueSugByIssueId" resultType="com.epmet.dto.result.IssueSuggestionResDTO">
SELECT
ig.id AS suggestionId,
ig.SUGGESTION,
ig.CREATED_TIME AS publishTime,
ig.PUBLIC_FLAG AS publicFlag,
'' AS headPhoto,
'' AS userShowName,
'' AS aititude,
ig.CREATED_BY AS userId
FROM
issue_suggestion ig
WHERE
ig.DEL_FLAG = '0'
AND ig.ISSUE_ID =#{issueId}
ORDER BY
ig.CREATED_TIME DESC
</select>
</mapper>

12
epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml

@ -87,4 +87,16 @@
AND vd.CREATED_BY = #{userId}
ORDER BY i.CREATED_TIME DESC
</select>
<!-- 查询用户对某个议题的表决信息 -->
<select id="selectUserIssueDet" parameterType="map" resultType="com.epmet.dto.IssueVoteDetailDTO">
SELECT
*
FROM
issue_vote_detail ivd
WHERE
ivd.DEL_FLAG = '0'
AND ivd.ISSUE_ID =#{issueId}
AND ivd.CREATED_BY =#{userId}
</select>
</mapper>

25
epmet-module/gov-mine/gov-mine-server/pom.xml

@ -136,6 +136,12 @@
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -160,6 +166,12 @@
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -184,6 +196,12 @@
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -205,6 +223,13 @@
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

5
epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml

@ -94,3 +94,8 @@ hystrix:
ribbon:
ReadTimeout: 300000
ConnectTimeout: 300000
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-module/gov-mine/gov-mine-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/gov-mine"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

25
epmet-module/gov-org/gov-org-server/pom.xml

@ -150,6 +150,12 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -182,6 +188,12 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -215,6 +227,12 @@
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -244,6 +262,13 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--生产钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

5
epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml

@ -131,3 +131,8 @@ ribbon:
pagehelper:
helper-dialect: mysql
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-module/gov-org/gov-org-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/gov-org"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

56
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ParameterFormDTO.java

@ -0,0 +1,56 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/18 15:00
*/
@NoArgsConstructor
@Data
public class ParameterFormDTO implements Serializable {
private static final long serialVersionUID = 6943367994919967821L;
/**
* 客户ID
*/
@NotBlank(message = "客户ID不能为空", groups = DefaultGroup.class)
private String customerId;
/**
* 可滞留天数
*/
@NotBlank(message = "可滞留天数不能为空", groups = AddGroup.class)
private String detentionDays;
/**
* 计算方式 工作日work 日历天calendar
*/
@NotBlank(message = "计算方式 不能为空", groups = AddGroup.class)
private String calculation;
/**
* 即将超期提醒时间
*/
@NotBlank(message = "即将超期提醒时间不能为空", groups = AddGroup.class)
private String remindTime;
/**
* 推送时间 默认 上午8点
*/
@NotBlank(message = "推送时间不能为空", groups = AddGroup.class)
private String pushTime;
/**
* 设定核算单位天开始时间
*/
@NotBlank(message = "设定核算单位天开始时间不能为空", groups = AddGroup.class)
private String startTime;
/**
* 设定核算单位天结束时间
*/
@NotBlank(message = "设定核算单位天结束时间不能为空", groups = AddGroup.class)
private String endTime;
}

39
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ParameterResultDTO.java

@ -0,0 +1,39 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/18 15:19
*/
@Data
public class ParameterResultDTO implements Serializable {
private static final long serialVersionUID = -2066374948905858262L;
/**
* 可滞留天数
*/
private String detentionDays;
/**
* 计算方式 工作日work 日历天calendar
*/
private String calculation;
/**
* 即将超期提醒时间
*/
private String remindTime;
/**
* 推送时间 默认 上午8点
*/
private String pushTime;
/**
* 设定核算单位天开始时间
*/
private String startTime;
/**
* 设定核算单位天结束时间
*/
private String endTime;
}

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

@ -157,6 +157,13 @@
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -190,6 +197,12 @@
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -223,6 +236,12 @@
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -253,6 +272,13 @@
<spring.flyway.enabled>true</spring.flyway.enabled>
<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=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

46
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java

@ -26,6 +26,8 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.CustomerProjectParameterDTO;
import com.epmet.dto.form.ParameterFormDTO;
import com.epmet.dto.result.ParameterResultDTO;
import com.epmet.excel.CustomerProjectParameterExcel;
import com.epmet.service.CustomerProjectParameterService;
import org.springframework.beans.factory.annotation.Autowired;
@ -43,7 +45,7 @@ import java.util.Map;
* @since v1.0.0 2020-05-11
*/
@RestController
@RequestMapping("customerprojectparameter")
@RequestMapping("parameter")
public class CustomerProjectParameterController {
@Autowired
@ -91,4 +93,46 @@ public class CustomerProjectParameterController {
ExcelUtils.exportExcelToTarget(response, null, list, CustomerProjectParameterExcel.class);
}
/**
* 滞留提醒-初始化
* @author zhaoqifeng
* @date 2020/11/18 15:26
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.ParameterResultDTO>
*/
@PostMapping("remindinit")
public Result<ParameterResultDTO> remindInit(@RequestBody ParameterFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, DefaultGroup.class);
ParameterResultDTO result = customerProjectParameterService.remindInit(formDTO);
return new Result<ParameterResultDTO>().ok(result);
}
/**
* 滞留提醒-保存
* @author zhaoqifeng
* @date 2020/11/18 15:26
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("remindsave")
public Result remindSave(@RequestBody ParameterFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, UpdateGroup.class, DefaultGroup.class);
customerProjectParameterService.remindSave(formDTO);
return new Result();
}
/**
* 滞留提醒-恢复默认
* @author zhaoqifeng
* @date 2020/11/18 15:26
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("reminddefault")
public Result remindDefault(@RequestBody ParameterFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, DefaultGroup.class);
customerProjectParameterService.remindDefault(formDTO);
return new Result();
}
}

29
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/CustomerProjectParameterService.java

@ -20,6 +20,8 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.CustomerProjectParameterDTO;
import com.epmet.dto.form.ParameterFormDTO;
import com.epmet.dto.result.ParameterResultDTO;
import com.epmet.entity.CustomerProjectParameterEntity;
import java.util.List;
@ -137,4 +139,31 @@ public interface CustomerProjectParameterService extends BaseService<CustomerPro
* @return com.epmet.dto.CustomerProjectParameterDTO
*/
CustomerProjectParameterDTO getPushTimeConfig(String customerId);
/**
* 滞留提醒-初始化
* @author zhaoqifeng
* @date 2020/11/18 15:33
* @param formDTO
* @return com.epmet.dto.result.ParameterResultDTO
*/
ParameterResultDTO remindInit(ParameterFormDTO formDTO);
/**
* 滞留提醒-保存
* @author zhaoqifeng
* @date 2020/11/18 15:33
* @param formDTO
* @return void
*/
void remindSave(ParameterFormDTO formDTO);
/**
* 滞留提醒-恢复默认
* @author zhaoqifeng
* @date 2020/11/18 15:33
* @param formDTO
* @return void
*/
void remindDefault(ParameterFormDTO formDTO);
}

41
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/CustomerProjectParameterServiceImpl.java

@ -25,6 +25,8 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.CustomerProjectParameterDao;
import com.epmet.dto.CustomerProjectParameterDTO;
import com.epmet.dto.form.ParameterFormDTO;
import com.epmet.dto.result.ParameterResultDTO;
import com.epmet.entity.CustomerProjectParameterEntity;
import com.epmet.redis.CustomerProjectParameterRedis;
import com.epmet.service.CustomerProjectParameterService;
@ -157,4 +159,43 @@ public class CustomerProjectParameterServiceImpl extends BaseServiceImpl<Custome
return baseDao.getPushTimeConfig(customerId);
}
/**
* 滞留提醒-初始化
*
* @param formDTO
* @return com.epmet.dto.result.ParameterResultDTO
* @author zhaoqifeng
* @date 2020/11/18 15:33
*/
@Override
public ParameterResultDTO remindInit(ParameterFormDTO formDTO) {
return null;
}
/**
* 滞留提醒-保存
*
* @param formDTO
* @return void
* @author zhaoqifeng
* @date 2020/11/18 15:33
*/
@Override
public void remindSave(ParameterFormDTO formDTO) {
}
/**
* 滞留提醒-恢复默认
*
* @param formDTO
* @return void
* @author zhaoqifeng
* @date 2020/11/18 15:33
*/
@Override
public void remindDefault(ParameterFormDTO formDTO) {
}
}

5
epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml

@ -115,3 +115,8 @@ openapi:
pagehelper:
helper-dialect: mysql
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-module/gov-project/gov-project-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/gov-project"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

25
epmet-module/gov-voice/gov-voice-server/pom.xml

@ -132,6 +132,12 @@
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -165,6 +171,12 @@
<spring.flyway.enabled>false</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -198,6 +210,12 @@
<spring.flyway.enabled>true</spring.flyway.enabled>
<openapi.scan.server.url>https://epmet-dev.elinkservice.cn/api/epmetscan/api</openapi.scan.server.url>
<!--测试钉钉 机器人地址-->
<dingTalk.robot.webHook>
https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
</dingTalk.robot.secret>
</properties>
</profile>
<profile>
@ -228,6 +246,13 @@
<spring.flyway.enabled>true</spring.flyway.enabled>
<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=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
</dingTalk.robot.secret>
</properties>
</profile>
</profiles>

5
epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml

@ -115,3 +115,8 @@ openapi:
pagehelper:
helper-dialect: mysql
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
dingTalk:
robot:
webHook: @dingTalk.robot.webHook@
secret: @dingTalk.robot.secret@

9
epmet-module/gov-voice/gov-voice-server/src/main/resources/logback-spring.xml

@ -5,6 +5,8 @@
<property name="log.path" value="logs/gov-voice"/>
<springProperty scope="context" name="appname" source="spring.application.name"/>
<springProperty scope="context" name="webHook" source="dingTalk.robot.webHook"/>
<springProperty scope="context" name="secret" source="dingTalk.robot.secret"/>
<!-- 日志上下文名称 -->
<contextName>${appname}</contextName>
@ -125,11 +127,14 @@
<!--日志文档保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文档只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 此日志文档只记录ERROR级别的 发送钉钉短信 -->
<filter class="com.epmet.commons.tools.filter.LogMsgSendFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
<webHook>${webHook}</webHook>
<secret>${secret}</secret>
<appName>${appname}</appName>
</filter>
</appender>

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

Loading…
Cancel
Save