Browse Source

Merge remote-tracking branch 'remotes/origin/develop' into release_temp

master
jianjun 4 years ago
parent
commit
c435431a97
  1. 2
      epmet-admin/epmet-admin-server/pom.xml
  2. 2
      epmet-auth/pom.xml
  3. 2
      epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java
  4. 34
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java
  5. 13
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
  6. 3
      epmet-gateway/src/main/resources/bootstrap.yml
  7. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java
  8. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/FineExampleResultDTO.java
  9. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityRankResultDTO.java
  10. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java
  11. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsGovernRankResultDTO.java
  12. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsGovernResultDTO.java
  13. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsOrgRankResultDTO.java
  14. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsOrgResultDTO.java
  15. 4
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java
  16. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartyUserPointResultDTO.java
  17. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PmTotalResultDTO.java
  18. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectProfileResultDTO.java
  19. 4
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java
  20. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TopProfileResultDTO.java
  21. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java
  22. 8
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java
  23. 49
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java
  24. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  25. 24
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java
  26. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml
  27. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
  28. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
  29. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
  30. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml
  31. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnCommunityProjectProfileDao.xml
  32. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsGovernMonthlyDao.xml
  33. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsOrgMonthlyDao.xml
  34. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.xml
  35. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java
  36. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  37. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java
  38. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerDeptServiceImpl.java
  39. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java
  40. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java
  41. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java
  42. 52
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java
  43. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java
  44. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java
  45. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java
  46. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java
  47. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
  48. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.2__dim_ag_add_col_type.sql
  49. 21
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml
  50. 2
      epmet-module/epmet-activiti/epmet-activiti-server/pom.xml
  51. 10
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java
  52. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql
  53. 2
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java
  54. 46
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/TestController.java
  55. 2
      epmet-module/epmet-point/epmet-point-server/pom.xml
  56. 6
      epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.11__point_rule_sort.sql
  57. 1
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java
  58. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java
  59. 2
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuConfigFormDTO.java
  60. 3
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovCustomerMenuServiceImpl.java
  61. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  62. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  63. 15
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java
  64. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java
  65. 9
      epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml
  66. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java
  67. 8
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java
  68. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
  69. 9
      epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml
  70. 7
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java
  71. 23
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/LbController.java
  72. 2
      epmet-module/oper-access/oper-access-server/pom.xml
  73. 2
      epmet-module/oper-customize/oper-customize-server/pom.xml
  74. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupDTO.java
  75. 36
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
  76. 24
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java
  77. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java
  78. 18
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java
  79. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java
  80. 22
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java
  81. 23
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
  82. 34
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java
  83. 8
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java
  84. 23
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  85. 41
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java
  86. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicShareLinkRecordServiceImpl.java
  87. 9
      epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml
  88. 34
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml
  89. 1
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml
  90. 2
      epmet-module/resi-home/resi-home-server/pom.xml
  91. 2
      epmet-module/resi-voice/resi-voice-server/pom.xml
  92. 2
      epmet-openapi/epmet-openapi-scan/pom.xml
  93. 152
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/util/RSASignature.java
  94. 3
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BasicInfoResultDTO.java
  95. 24
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/LbTestController.java
  96. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java
  97. 12
      epmet-user/epmet-user-server/src/main/java/com/epmet/feign/LbFeignClient.java
  98. 13
      epmet-user/epmet-user-server/src/main/java/com/epmet/feign/fallback/LbFeignClientFallback.java
  99. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java

2
epmet-admin/epmet-admin-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.15</version>
<version>0.3.17</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-admin</artifactId>

2
epmet-auth/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.70</version>
<version>0.3.72</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-cloud</artifactId>

2
epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java

@ -295,7 +295,7 @@ public class LoginServiceImpl implements LoginService {
if (!flag) {
logger.warn(String.format("用户%s登录,验证码输入错误", formDTO.getPhone()));
//2020-05-21去除验证码校验
return new Result<UserTokenResultDTO>().error(EpmetErrorCode.ERR10019.getCode());
//return new Result<UserTokenResultDTO>().error(EpmetErrorCode.ERR10019.getCode());
}
//2、账号是否存在
//获取用户信息

34
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java

@ -1,5 +1,6 @@
package com.epmet.commons.tools.aspect;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.ThreadLocalConstant;
import com.epmet.commons.tools.exception.*;
@ -14,6 +15,9 @@ import javax.servlet.http.HttpServletRequest;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
/**
* 日志切面
@ -54,6 +58,8 @@ public abstract class BaseRequestLogAspect {
// transactionSerial = UUID.randomUUID().toString();
//}
Map<String, String> requestHeaders = getRequestHeaders(request);
// 将当前线程名称设置为事务流水号
if (!StringUtils.isEmpty(transactionSerial)) {
Thread.currentThread().setName(transactionSerial);
@ -64,7 +70,8 @@ public abstract class BaseRequestLogAspect {
try {
Object[] args = point.getArgs();
ThreadLocalConstant.requestParam.set(Arrays.toString(point.getArgs()));
log.info(">>>>>>>>请求信息>>>>>>>>:事务流水号:{},url:{} ,method:{},请求参数:{}", transactionSerial, requestURI, method, objectsToString(args));
log.info(">>>>>>>>请求信息>>>>>>>>:事务流水号:{},url:{} ,method:{},请求参数:{},请求头:{}",
transactionSerial, requestURI, method, objectsToString(args), requestHeaders);
result = point.proceed();
resultInfoLog(transactionSerial, getExecPeriod(startTime), result);
} catch (RenException e) {
@ -91,6 +98,23 @@ public abstract class BaseRequestLogAspect {
return result;
}
/**
* @Description 获取请求头信息
* @return
* @author wxz
* @date 2021.03.31 13:59
*/
private Map<String, String> getRequestHeaders(HttpServletRequest request) {
Enumeration<String> headerNames = request.getHeaderNames();
HashMap<String, String> headerMap = new HashMap<>();
while (headerNames.hasMoreElements()) {
String headerName = headerNames.nextElement();
String headerValue = request.getHeader(headerName);
headerMap.put(headerName, headerValue);
}
return headerMap;
}
/**
* info日志
* @param transactionSerial
@ -225,7 +249,13 @@ public abstract class BaseRequestLogAspect {
StringBuilder builder = new StringBuilder("[");
for (Object object : args) {
if (object != null) {
builder.append(object.toString());
try {
// 尝试作为json解析
String objectString = JSON.toJSONString(object);
builder.append(objectString);
} catch (Exception e) {
builder.append(object.toString());
}
builder.append(",");
}
}

13
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java

@ -333,6 +333,13 @@ public class RedisKeys {
return rootPrefix.concat("stats:calflag");
}
/**
* 插入大屏指标数据分布式锁 key
*/
public static String getScreenIndexDataLockKey() {
return rootPrefix.concat("stats:indexcal:lock");
}
/**
* footbar缓存key
* @param customerId
@ -343,12 +350,6 @@ public class RedisKeys {
return rootPrefix.concat("footbar").concat(":").concat(customerId).concat(":").concat(appType);
}
/**
* 插入大屏指标数据分布式锁 key
*/
public static String getScreenIndexDataLockKey() {
return rootPrefix.concat("stats:indexcal:lock");
}
/**
* @return

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

@ -466,12 +466,15 @@ epmet:
- /data/aggregator/**
- /gov/voice/**
- /resi/voice/**
- /epmet/point/**
# 内部认证url白名单(在白名单中的,就不会再校验登录了)
internalAuthUrlsWhiteList:
- /epmetuser/customerstaff/customerlist
- /**/druid/**
- /gov/project/project/platformcallback
- /oper/customize/customerstartpage/homestartpage
- /epmet/point/mqCallback/**
# 外部应用认证,使用AccessToken等头进行认证
externalOpenUrls:

1
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java

@ -9,6 +9,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dataaggre.dto.epmetuser.form.OpenStaffDetailFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.GridMemberStatsFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.OpenStaffDetailFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolDateListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.PatrolRecordListFormDTO;
import com.epmet.dataaggre.dto.epmetuser.form.StaffListFormDTO;

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/FineExampleResultDTO.java

@ -87,4 +87,6 @@ public class FineExampleResultDTO implements Serializable {
* PLAT_JOIN PARTY_RATIO 平台参与议事的党员占比
*/
private String platJoinPartyRatio = "0.00%";
private String dataEndTime;
}

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityRankResultDTO.java

@ -44,4 +44,6 @@ public class GovernCapacityRankResultDTO implements Serializable {
* 当前agencyName的上一级组织名称
*/
private String parentAgencyName;
private String monthId;
}

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java

@ -46,4 +46,6 @@ public class GovernCapacityResultDTO implements Serializable {
private String parentAgencyName;
private String orgId;
private String monthId;
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsGovernRankResultDTO.java

@ -39,4 +39,9 @@ public class GrassRootsGovernRankResultDTO implements Serializable {
* 组织名称
*/
private String orgName;
/**
* 数据所属月份
*/
private String monthId;
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsGovernResultDTO.java

@ -35,4 +35,9 @@ public class GrassRootsGovernResultDTO implements Serializable {
* 办结率当前界面是社区时显示
*/
private String closedProjectRatio;
/**
* 数据所属月份
*/
private String monthId;
}

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsOrgRankResultDTO.java

@ -31,4 +31,6 @@ public class GrassRootsOrgRankResultDTO implements Serializable {
* 组织名称
*/
private String orgName;
private String monthId;
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsOrgResultDTO.java

@ -27,4 +27,9 @@ public class GrassRootsOrgResultDTO implements Serializable {
* 项目数
*/
private Integer projectTotal;
/**
* 数据所属月份
*/
private String monthId;
}

4
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java

@ -57,4 +57,8 @@ public class OrgRankDataResultDTO implements Serializable {
private String parentAgencyName;
private String orgId;
/**
* 数据所属月份
*/
private String monthId;
}

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartyUserPointResultDTO.java

@ -28,4 +28,6 @@ public class PartyUserPointResultDTO implements Serializable {
* 用户积分
* */
private Integer point;
private String dataEndTime;
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PmTotalResultDTO.java

@ -31,4 +31,9 @@ public class PmTotalResultDTO implements Serializable {
* 议题数
*/
private Integer issueTotal;
/**
* 数据所属月份
*/
private String monthId;
}

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectProfileResultDTO.java

@ -27,4 +27,6 @@ public class ProjectProfileResultDTO implements Serializable {
* 级别
*/
private String level;
private String dataEndTime;
}

4
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java

@ -49,4 +49,8 @@ public class PublicPartiProfileResultDTO implements Serializable {
private String joinCompareLatestTrend = "";
/**
* 数据所属月份
*/
private String monthId;
}

2
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TopProfileResultDTO.java

@ -42,4 +42,6 @@ public class TopProfileResultDTO implements Serializable {
* 项目总数
*/
private Integer projectNum = 0;
private String dataEndTime;
}

5
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java

@ -32,14 +32,17 @@ public class IndexConstant {
public static final String THRESHOLD_TEXT = "给定阈值%d%%,超过阈值不加分";
public static final String TABLE_DESC = "详见下表:";
public static final String INDEX_SCORE_TITLE = "当月指数";
public static final String INDEX_SCORE_DESC = "自然月周期内,当月指数得分(totalScore)=党建指数得分(dangjiannengli)*相关权重(dangjiannengliweight)+治理指数得分(zhilinengli)*相关权重(zhilinengliweight)+服务指数得分(fuwunengli)*相关权重(fuwunengliweight)";
public static final String INDEX_SCORE_DESC = "自然月周期内,当月指数得分#(totalScore)#=党建指数得分#(dangjiannengli)#*相关权重#(dangjiannengliweight)#" +
"+治理指数得分#(zhilinengli)#*相关权重#(zhilinengliweight)#+服务指数得分#(fuwunengli)#*相关权重#(fuwunengliweight)#";
public static final String INDEX_DISTRINCT_TABLE1_INDEX_CODE = "suoyoujiedaozlnlpjz";
public static final String INDEX_DISTRINCT_TABLE2_INDEX_CODE = "suoyouzhishubmzlnlpjz";
public static final String ZHI_LI_NENG_LI = "zhilinengli";
public static final String PATTERN_FIX = "#";
public static final String PATTERN_D = "d";
public static final String PATTERN_WEIGHT = "weight";
public static final String PATTERN_TOTAL = "totalScore";
public static final String QUAN_QU_ZHI_LI_INDEX_CODE = "quanquxiangguan:zhilinengli";
public static final String PATTERN_ALL = "[#][^#]+[#]";
/**

8
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java

@ -11,6 +11,14 @@ import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantity
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService;
import com.epmet.datareport.service.project.ProjectService;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.form.screen.EfficiencyAnalysisFormDTO;
import com.epmet.dto.form.screen.QueryQuantityMonthlyFormDTO;
import com.epmet.dto.form.screen.ScreenCommonFormDTO;
import com.epmet.dto.result.screen.EfficiencyAnalysisResultDTO;
import com.epmet.dto.result.screen.ProjectQuantityResultDTO;
import com.epmet.dto.result.screen.QueryQuantityMonthlyResultDTO;
import com.epmet.datareport.service.project.ProjectService;
import com.epmet.dto.form.ProcessListFormDTO;
import com.epmet.dto.form.project.MassesDiscontentFormV2DTO;
import com.epmet.dto.result.project.MassesDiscontentResultV2DTO;
import com.epmet.project.constant.ProjectConstant;

49
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java

@ -19,6 +19,7 @@ package com.epmet.datareport.service.evaluationindex.index.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.enums.OrgLevelEnum;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
@ -89,7 +90,6 @@ public class IndexExplainServiceImpl implements IndexExplainService {
first.setTitle(IndexConstant.INDEX_SCORE_TITLE);
first.setMeaning(IndexConstant.INDEX_SCORE_DESC);
results.add(first);
//获取该等级的分数及权重
List<IndexExplainTreeDTO> explainDTOList = indexExplainDao.getIndexExplainTreeByOrgType(formDTO.getOrgLevel());
if (CollectionUtils.isEmpty(explainDTOList)) {
@ -120,19 +120,21 @@ public class IndexExplainServiceImpl implements IndexExplainService {
ablityListFormDTO.setAllParentIndexCode(explainDTO.getIndexCode());
ablityListFormDTO.setMonthId(StringUtils.isBlank(formDTO.getMonthId()) ? DateUtils.getCurrentTimeBeforeMonthId() : formDTO.getMonthId());
List<IndexScoreResult> scoreResults = agencySubScoreDao.selectSubScore(ablityListFormDTO);
scoreResults.forEach(e->{
String newMeaning = result.getMeaning().replaceFirst(e.getIndexCode(),e.getScore().toString())
scoreResults.forEach(e -> {
String newMeaning = result.getMeaning().replaceFirst(e.getIndexCode(), e.getScore().toString())
.replaceFirst(IndexConstant.PATTERN_D,
e.getWeight().multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.ZERO, BigDecimal.ROUND_HALF_UP).toString());;
e.getWeight().multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.ZERO, BigDecimal.ROUND_HALF_UP).toString());
result.setMeaning(newMeaning);
});
}
//设置表格数据
setTableData(formDTO, detailEntityMap, explainDTO, result);
//子节点
setChildren(formDTO, detailEntityMap, result, explainDTO, explainDTO.getChildren());
//设置 新的含义 带分数的
setCurrentMonthScore(formDTO, first,result);
//设置 新的含义 带分数的
setCurrentMonthScore(formDTO, first, result);
}
return results;
@ -166,9 +168,10 @@ public class IndexExplainServiceImpl implements IndexExplainService {
default:
log.error("暂不支持更高级别的查询,level:{}", orgLevel);
}
if (CollectionUtils.isNotEmpty(list)) {
setNewMeaningWithScore(list, first,second);
}
setNewMeaningWithScore(list, first, second);
}
private void setNewMeaningWithScore(List<IndexScoreResult> list, IndexExplainResult first, IndexExplainResult second) {
@ -181,15 +184,31 @@ public class IndexExplainServiceImpl implements IndexExplainService {
continue;
}
firstMeaning = firstMeaning.replaceFirst(indexCode, score.getScore().toString()).replaceFirst(indexCode.concat(IndexConstant.PATTERN_WEIGHT), score.getWeight().multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.ZERO, BigDecimal.ROUND_HALF_UP).toString() + "%");
if (second.getIndexCode().contains(score.getIndexCode())){
firstMeaning = firstMeaning.replaceFirst(indexCode, score.getScore().toString()).replace(indexCode.concat(IndexConstant.PATTERN_WEIGHT), score.getWeight().multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.ZERO, BigDecimal.ROUND_HALF_UP).toString() + "%");
if (second.getIndexCode().contains(score.getIndexCode())) {
secondMeaning = secondMeaning.replaceFirst(IndexConstant.PATTERN_TOTAL, score.getScore().toString())
.replaceFirst(IndexConstant.BEN_JI_EN, score.getSelfScore().toString())
.replaceFirst(IndexConstant.XIA_JI_EN, score.getSubScore().toString());
}
}
first.setMeaning(firstMeaning);
second.setMeaning(secondMeaning);
if (CollectionUtils.isEmpty(list)) {
firstMeaning = firstMeaning.replaceAll(IndexConstant.PATTERN_ALL, StrConstant.EPMETY_STR);
secondMeaning = secondMeaning.replaceAll(IndexConstant.PATTERN_ALL, StrConstant.EPMETY_STR);
}
first.setMeaning(firstMeaning.replaceAll(IndexConstant.PATTERN_FIX, StrConstant.EPMETY_STR));
second.setMeaning(secondMeaning.replaceAll(IndexConstant.PATTERN_FIX, StrConstant.EPMETY_STR));
}
public static void main(String[] args) {
String patern = "(?<=\\{).*?(?=(\\}|$))";
patern = "[#][^#]+[#]";
String str = "1234#qwert#134";
System.out.println(str.replaceAll(patern, ""));
String str2 = "自然月周期内,当月指数得分P(totalScore)P=党建指数得分#(65.7)#*相关权重#(40%)#+治理指数得分#(68.2)#*相关权重#(40%)#+服务指数得分#(77.5)#*相关权重#(20%)#";
String totalP = "P".concat(IndexConstant.PATTERN_TOTAL).concat("P");
System.out.println(str2.replaceFirst(totalP, ""));
}
private void setTableData(IndexExplainFormDTO formDTO, Map<String, List<IndexGroupDetailResult>> detailEntityMap, IndexExplainTreeDTO explainDTO, IndexExplainResult result) {
@ -375,10 +394,6 @@ public class IndexExplainServiceImpl implements IndexExplainService {
result.setChildren(childrenList);
}
public static void main(String[] args) {
}
private List<String> getTableHeaders(String type, String allIndexCode, String orgLevel) {
List<String> headers = new ArrayList<>();
OrgLevelEnum anEnum = OrgLevelEnum.getEnum(orgLevel);

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java

@ -190,6 +190,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
result.setMonthIncr(convertPercentStr(latest.getMonthIncr(), NumConstant.ZERO));
result.setJoinCompareLatestMonth(convertPercentStr(latest.getJoinCompareLatestMonth().abs(), NumConstant.ZERO));
result.setIssueCompareLatestMonth(convertPercentStr(latest.getIssueCompareLatestMonth().abs(), NumConstant.ZERO));
result.setMonthId(monthId);
return result;
}
@ -279,6 +280,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
rank.setResponseRatio(convertPercentStr(o.getResponseRatio(),NumConstant.ONE));
rank.setSatisfactionRatio(convertPercentStr(o.getSatisfactionRatio(),NumConstant.ONE));
rank.setParentAgencyName(o.getParentAgencyName());
rank.setMonthId(o.getMonthId());
result.add(rank);
});
return result;

24
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java

@ -211,7 +211,7 @@ public class ProjectServiceImpl implements ProjectService {
}
/**
* @Description 项目详情
* @Description 项目详情
* @Param processListFormDTO
* @author zxc
* @date 2020/10/23 10:33 上午
@ -285,9 +285,9 @@ public class ProjectServiceImpl implements ProjectService {
}
/**
* @return
* @Description 难点赌点-获取组织下拉框
* @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614
* @return
* @author jiangyy
* @date 2020.10.19 16:38
**/
@ -297,7 +297,7 @@ public class ProjectServiceImpl implements ProjectService {
//1、根据token获取本级agencyId、获取userId
String agencyId = getLoginUserDetails(tokenDto);
String userId=getLoginUserUserId(tokenDto);
String userId = getLoginUserUserId(tokenDto);
//2、获取本级组织机构
Result<CustomerAgencyDTO> customerAgencyDTO = govOrgOpenFeignClient.getAgencyById(agencyId);
@ -328,7 +328,7 @@ public class ProjectServiceImpl implements ProjectService {
Result<SubAgencyResultDTO> SubAgencyResultDTO = govOrgOpenFeignClient.subAgencyList(form);
List<SubListResultDTO> subAgencyList = SubAgencyResultDTO.getData().getAgencyList();
for(int i=0;i<subAgencyList.size();i++){
for (int i = 0; i < subAgencyList.size(); i++) {
ProjectNextAgencyResultDTO subAgencyDto = new ProjectNextAgencyResultDTO();
subAgencyDto.setOrgId(subAgencyList.get(i).getAgencyId());
subAgencyDto.setOrgName(subAgencyList.get(i).getAgencyName());
@ -337,30 +337,30 @@ public class ProjectServiceImpl implements ProjectService {
}
}
if(null == resultList) return new ArrayList<>();
if (null == resultList) return new ArrayList<>();
return resultList;
}
/**
* @Description 难点赌点-耗时最长|涉及部门最多|处理次数
* @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614
* @param param
* @return
* @Description 难点赌点-耗时最长|涉及部门最多|处理次数
* @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614
* @author jiangyy
* @date 2020.10.19 16:38
**/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
@Override
public List<ProjectDifficultRankResultDTO> getDifficultyRank(DifficultyRankFormDTO param) {
PageHelper.startPage(null == param.getPageNo() ? NumConstant.ONE:param.getPageNo(),param.getTopNum());
List<ProjectDifficultRankResultDTO> result = projectDao.difficultyRank(param);
for (int i = 0; i < result.size (); i ++){
List<String> imgUrlList ;
imgUrlList = projectDao.getDifficultyImgList(result.get(i).getProjectId()) ;
for (int i = 0; i < result.size(); i++) {
List<String> imgUrlList;
imgUrlList = projectDao.getDifficultyImgList(result.get(i).getProjectId());
result.get(i).setImgUrlList(imgUrlList);
}
if(null == result) return new ArrayList<>();
if (null == result) return new ArrayList<>();
return result;
}

6
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml

@ -35,7 +35,8 @@
IFNULL(rankData.RESOLVED_RATIO,0) AS RESOLVED_RATIO,
IFNULL(rankData.GOVERN_RATIO,0) AS GOVERN_RATIO,
IFNULL(rankData.SATISFACTION_RATIO,0) AS SATISFACTION_RATIO,
pa.AGENCY_NAME AS parentAgencyName
pa.AGENCY_NAME AS parentAgencyName,
rankData.MONTH_ID as monthId
FROM screen_customer_agency agency
left join screen_customer_agency pa
on(agency.PARENT_AREA_CODE=pa.AREA_CODE
@ -61,7 +62,8 @@
IFNULL(rankData.RESOLVED_RATIO,0) AS RESOLVED_RATIO,
IFNULL(rankData.GOVERN_RATIO,0) AS GOVERN_RATIO,
IFNULL(rankData.SATISFACTION_RATIO,0) AS SATISFACTION_RATIO,
ca.agency_name AS parentAgencyName
ca.agency_name AS parentAgencyName,
rankData.MONTH_ID as monthId
FROM screen_customer_grid grid
left join screen_customer_agency ca
on (ca.agency_id = grid.parent_agency_id)

6
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml

@ -14,7 +14,8 @@
rankData.CLOSE_PROJECT_RATIO AS closedProjectRatio,
rankData.SATISFACTION_RATIO AS satisfactionRatio,
agency.AGENCY_NAME AS parentAgencyName,
rankData.ORG_ID as orgId
rankData.ORG_ID as orgId,
rankData.MONTH_ID
FROM
screen_org_rank_data rankData
LEFT JOIN screen_customer_agency agency
@ -39,7 +40,8 @@
rankData.CLOSE_PROJECT_RATIO AS closedProjectRatio,
rankData.SATISFACTION_RATIO AS satisfactionRatio,
agency.AGENCY_NAME AS parentAgencyName,
rankData.ORG_ID as orgId
rankData.ORG_ID as orgId,
rankData.MONTH_ID
FROM
screen_org_rank_data rankData
left join screen_customer_grid scg on(

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml

@ -102,7 +102,8 @@
SELECT
m.USER_ID,
concat( m.surname, CASE char_length( m.NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name,
m.POINT_TOTAL AS point
m.POINT_TOTAL AS point,
m.DATA_END_TIME
FROM
screen_party_user_rank_data m
left join screen_customer_grid scg

6
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml

@ -17,7 +17,8 @@
publish_issue_total AS publishIssueTotal,
IFNULL(publish_issue_ratio,0) AS publishIssueRatioA,
PLAT_ISSUE_TOTAL AS platIssueTotal,
IFNULL(PLAT_JOIN_PARTY_RATIO,0) AS platJoinPartyRatio
IFNULL(PLAT_JOIN_PARTY_RATIO,0) AS platJoinPartyRatio,
DATA_END_TIME as dataEndTime
FROM
screen_pioneer_data
WHERE
@ -44,7 +45,8 @@
CEILING(sum(data.publish_issue_total)) AS publishIssueTotal,
IFNULL(avg(data.publish_issue_ratio),0) AS publishIssueRatioA,
CEILING(sum(data.PLAT_ISSUE_TOTAL)) AS platIssueTotal,
IFNULL(avg(data.PLAT_JOIN_PARTY_RATIO),0) AS platJoinPartyRatio
IFNULL(avg(data.PLAT_JOIN_PARTY_RATIO),0) AS platJoinPartyRatio,
DATA_END_TIME as dataEndTime
FROM
screen_pioneer_data data
LEFT JOIN

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml

@ -38,7 +38,8 @@
group_total AS groupNum,
topic_total AS topicNum,
issue_total AS issueNum,
project_total AS projectNum
project_total AS projectNum,
DATA_END_TIME as dataEndTime
FROM
screen_user_total_data
WHERE

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnCommunityProjectProfileDao.xml

@ -5,7 +5,8 @@
<select id="selectProjectProfile" resultType="com.epmet.evaluationindex.screen.dto.result.ProjectProfileResultDTO">
SELECT ORG_ID,
PROJECT_TOTAL,
LEVEL
LEVEL,
DATA_END_TIME as dataEndTime
FROM screen_an_community_project_profile
WHERE DEL_FLAG = 0
AND CUSTOMER_ID = #{customerId}

6
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsGovernMonthlyDao.xml

@ -9,7 +9,8 @@
CLOSED_PROJECT_TOTAL,
CONCAT( 0 + cast( TRUNCATE ( PROJECT_RESPONSE_RATIO, 1 ) AS CHAR ), '%' ) AS "projectResponseRatio",
CONCAT( 0 + cast( TRUNCATE ( PROJECT_SATIS_RATIO, 1 ) AS CHAR ), '%' ) AS "projectSatisRatio",
CONCAT( 0 + cast( TRUNCATE ( CLOSED_PROJECT_RATIO, 1 ) AS CHAR ), '%' ) AS "closedProjectRatio"
CONCAT( 0 + cast( TRUNCATE ( CLOSED_PROJECT_RATIO, 1 ) AS CHAR ), '%' ) AS "closedProjectRatio",
MONTH_ID
FROM screen_an_grass_roots_govern_monthly
WHERE DEL_FLAG = 0
AND ORG_ID = #{agencyId}
@ -55,7 +56,8 @@
CLOSED_PROJECT_TOTAL,
CONCAT( 0 + cast( TRUNCATE ( PROJECT_RESPONSE_RATIO, 1 ) AS CHAR ), '%' ) AS "projectResponseRatio",
CONCAT( 0 + cast( TRUNCATE ( PROJECT_SATIS_RATIO, 1 ) AS CHAR ), '%' ) AS "projectSatisRatio",
CONCAT( 0 + cast( TRUNCATE ( CLOSED_PROJECT_RATIO, 1 ) AS CHAR ), '%' ) AS "closedProjectRatio"
CONCAT( 0 + cast( TRUNCATE ( CLOSED_PROJECT_RATIO, 1 ) AS CHAR ), '%' ) AS "closedProjectRatio",
MONTH_ID
FROM screen_an_grass_roots_govern_monthly
WHERE DEL_FLAG = 0
AND PID = #{agencyId}

6
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsOrgMonthlyDao.xml

@ -7,7 +7,8 @@
<select id="selectGrassRootsOrg" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgResultDTO">
SELECT GROUP_TOTAL,
ISSUE_TOTAL,
PROJECT_TOTAL
PROJECT_TOTAL,
MONTH_ID
FROM screen_an_grass_roots_org_monthly
WHERE DEL_FLAG = 0
AND ORG_ID = #{agencyId}
@ -47,7 +48,8 @@
SELECT ORG_NAME,
GROUP_TOTAL,
ISSUE_TOTAL,
PROJECT_TOTAL
PROJECT_TOTAL,
MONTH_ID
FROM screen_an_grass_roots_org_monthly
WHERE DEL_FLAG = 0
AND PID = #{agencyId}

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.xml

@ -7,7 +7,8 @@
SELECT GROUP_MEMBER_TOTAL,
TOPIC_TOTAL,
TOPIC_PARTI_USER_TOTAL,
ISSUE_TOTAL
ISSUE_TOTAL,
MONTH_ID
FROM screen_an_grass_roots_pm_total_monthly
WHERE DEL_FLAG = '0'
AND ORG_ID = #{agencyId}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java

@ -78,10 +78,16 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently
String redisKey = RedisKeys.getProjectChangedMsgDistinceKey(msgObj.getCustomerId());
if (redisUtils.get(redisKey) == null) {
consumeMessage(msgObj);
log.info("消费了项目变动消息,customer id:{}", msgObj.getCustomerId());
// 有效期30秒
// 该线程启动消费之后,其他线程再收到该客户id的消费请求,则不消费
redisUtils.set(redisKey, msg, 30);
try {
consumeMessage(msgObj);
} catch (Exception e) {
// 如果消费失败了,清楚该key,收到消息之后可以继续消费
redisUtils.delete(redisKey);
throw e;
}
log.info("消费了项目变动消息,customer id:{}", msgObj.getCustomerId());
} else {
log.info("该客户的项目变动消息刚刚消费,请等待30秒,customer id:{}", msgObj.getCustomerId());
}

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

@ -209,6 +209,10 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
imgMap.values().forEach(imgList::addAll);
//立案后会有 一个process 如果没有则说明是垃圾数据 如果有其他方式立项的项目则需要考虑下兼容
difficulties.removeIf(diff -> StringUtils.isBlank(diff.getLatestOperateDesc()));
screenDifficultyDataService.dataClean(param.getCustomerId(), difficulties, imgList);
log.info("【大屏数据抽取-难点赌点执行完毕】 客户Id{} 难点赌点数据{}", param.getCustomerId(), JSON.toJSONString(difficulties));
difficulties.removeIf( diff -> StringUtils.isBlank(diff.getLatestOperateDesc()));
imgList.forEach(item -> {
item.setCustomerId(param.getCustomerId());

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

@ -17,6 +17,7 @@
package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils;
@ -142,6 +143,13 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ
exists.setAllParentNames(e.getAllParentName());
exists.setParentAreaCode(e.getParentAreaCode());
updateAgency(exists);
// 已删除数据的处理
if ("1".equals(e.getDelFlag())) {
LambdaQueryWrapper<ScreenCustomerAgencyEntity> w = new LambdaQueryWrapper<>();
w.eq(ScreenCustomerAgencyEntity::getAgencyId, e.getId());
screenCustomerAgencyDao.delete(w);
}
}
}
}

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

@ -17,6 +17,7 @@
package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.utils.DateUtils;
@ -90,6 +91,13 @@ public class ScreenCustomerDeptServiceImpl extends BaseServiceImpl<ScreenCustome
e.setCustomerId(dept.getCustomerId());
e.setAreaCode(dept.getAreaCode());
screenCustomerDeptDao.updateById(e);
// 已删除数据的处理
if ("1".equals(dept.getDelFlag())) {
LambdaQueryWrapper<ScreenCustomerDeptEntity> w = new LambdaQueryWrapper<>();
w.eq(ScreenCustomerDeptEntity::getDeptId, dept.getId());
screenCustomerDeptDao.delete(w);
}
}
}
}

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

@ -18,6 +18,7 @@
package com.epmet.service.evaluationindex.screen.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java

@ -106,6 +106,10 @@ public class StatsDimServiceImpl implements StatsDimService {
dimGrid.setGridName(updatedGrid.getGridName());
dimGrid.setUpdatedTime(now);
dimGrid.setUpdatedBy(RobotConstant.DIMENSION_ROBOT);
dimGrid.setDelFlag(updatedGrid.getDelFlag());
dimGrid.setAgencyId(updatedGrid.getPid());
dimGrid.setAreaCode(updatedGrid.getAreaCode());
dimGrid.setCustomerId(updatedGrid.getCustomerId());
dimGrids.add(dimGrid);
}
}

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java

@ -49,6 +49,7 @@ public interface CustomerAgencyService {
*/
CustomerAgencyEntity getAgencyByDeptId(String deptId);
/**
* 将孔村榆山锦水3个街道的组织插入到gov-org库的customer_agency
*

52
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java

@ -67,31 +67,6 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService {
return customerAgencyDao.getRootAgencyInfo(customerId);
}
/**
* 获取每个组织每个网格下工作人员userId集合
*
* @param customerId
* @return com.epmet.dto.org.result.OrgStaffResultDTO
*/
@Override
public List<OrgStaffDTO> queryOrgStaffIds(String customerId) {
List<OrgStaffDTO> resultList=new ArrayList<>();
List<CustomerAgencyEntity> list=customerAgencyDao.selectListByCustomerId(customerId);
for(CustomerAgencyEntity agencyEntity:list){
List<String> agencyStaffIds=customerAgencyDao.selectAgencyStaffIds(customerId,agencyEntity.getId());
if(!CollectionUtils.isEmpty(agencyStaffIds)){
OrgStaffDTO agencyStaffDTO=new OrgStaffDTO();
agencyStaffDTO.setOrgId(agencyEntity.getId());
agencyStaffDTO.setOrgType("agency");
agencyStaffDTO.setStaffIds(agencyStaffIds);
resultList.add(agencyStaffDTO);
}
}
List<OrgStaffDTO> gridStaffIds=customerAgencyDao.selectGridStaffIds(customerId);
resultList.addAll(gridStaffIds);
return resultList;
}
@Override
public List<CustomerAgencyEntity> queryAgencyListByCustomerId(String customerId) {
return customerAgencyDao.queryAgencyListByCustomerId(customerId);
@ -119,6 +94,31 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService {
return customerAgencyDao.selectByDeptId(deptId);
}
/**
* 获取每个组织每个网格下工作人员userId集合
*
* @param customerId
* @return com.epmet.dto.org.result.OrgStaffResultDTO
*/
@Override
public List<OrgStaffDTO> queryOrgStaffIds(String customerId) {
List<OrgStaffDTO> resultList=new ArrayList<>();
List<CustomerAgencyEntity> list=customerAgencyDao.selectListByCustomerId(customerId);
for(CustomerAgencyEntity agencyEntity:list){
List<String> agencyStaffIds=customerAgencyDao.selectAgencyStaffIds(customerId,agencyEntity.getId());
if(!CollectionUtils.isEmpty(agencyStaffIds)){
OrgStaffDTO agencyStaffDTO=new OrgStaffDTO();
agencyStaffDTO.setOrgId(agencyEntity.getId());
agencyStaffDTO.setOrgType("agency");
agencyStaffDTO.setStaffIds(agencyStaffIds);
resultList.add(agencyStaffDTO);
}
}
List<OrgStaffDTO> gridStaffIds=customerAgencyDao.selectGridStaffIds(customerId);
resultList.addAll(gridStaffIds);
return resultList;
}
/**
* 将孔村榆山锦水3个街道的组织插入到gov-org库的customer_agency
*
@ -243,7 +243,7 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService {
* @param parentCustomerEntity 在平阴客户里网格所属组织信息
* @author yinzuomei
* @description 将3个街道的网格插入到gov-org.customer_grid库
* @Date 2021/7/7 9:54
* @Date 2021/7/7 9:54
**/
private void insertCustomerGrid(String customerId, String agencyId, CustomerAgencyEntity parentCustomerEntity) {
List<ScreenCustomerGridEntity> gridEntityList = screenCustomerGridService.selectEntityByAgencyId(customerId, agencyId);

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java

@ -77,6 +77,6 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
*/
@Override
public List<CustomerStaffGridDTO> getCustomerStaffGridList(String customerId) {
return customerGridDao.getCustomerStaffGridList(customerId);
return baseDao.getCustomerStaffGridList(customerId);
}
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java

@ -139,9 +139,18 @@ public class DimAgencyServiceImpl extends BaseServiceImpl<DimAgencyDao, DimAgenc
if (existsDimAgency != null) {
//说明是已存在的,不是新增的
existsDimAgency.setAgencyName(agency.getOrganizationName());
existsDimAgency.setAllParentName(agency.getAllParentName());
existsDimAgency.setCustomerId(agency.getCustomerId());
existsDimAgency.setLevel(agency.getLevel());
existsDimAgency.setPid(agency.getPid());
existsDimAgency.setPids(agency.getPids());
existsDimAgency.setUpdatedTime(initTime);
existsDimAgency.setUpdatedBy(RobotConstant.DIMENSION_ROBOT);
baseDao.updateById(existsDimAgency);
if ("1".equals(agency.getDelFlag())) {
baseDao.deleteById(agency.getId());
}
}
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java

@ -146,6 +146,10 @@ public class DimCustomerServiceImpl extends BaseServiceImpl<DimCustomerDao, DimC
existsCustomerDim.setUpdatedTime(initTime);
existsCustomerDim.setAreaCode(updatedCustomer.getAreaCode());
baseDao.updateById(existsCustomerDim);
if ("1".equals(updatedCustomer.getDelFlag())) {
baseDao.deleteById(updatedCustomer.getId());
}
}
}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java

@ -132,9 +132,15 @@ public class DimDepartmentServiceImpl extends BaseServiceImpl<DimDepartmentDao,
DimDepartmentEntity dimDepartment = baseDao.selectById(updatedDepartment.getId());
if (dimDepartment != null) {
dimDepartment.setDepartmentName(updatedDepartment.getDepartmentName());
dimDepartment.setAgencyId(updatedDepartment.getAgencyId());
dimDepartment.setCustomerId(updatedDepartment.getCustomerId());
dimDepartment.setUpdatedBy(RobotConstant.DIMENSION_ROBOT);
dimDepartment.setUpdatedTime(initTime);
baseDao.updateById(dimDepartment);
if ("1".equals(updatedDepartment.getDelFlag())) {
baseDao.deleteById(updatedDepartment.getId());
}
}
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java

@ -128,6 +128,10 @@ public class DimGridServiceImpl extends BaseServiceImpl<DimGridDao, DimGridEntit
for (DimGridEntity updatedGridDim : changedGrids) {
baseDao.updateById(updatedGridDim);
if ("1".equals(updatedGridDim.getDelFlag())) {
// 如果已经被删除了,那么这里也做删除操作
baseDao.deleteById(updatedGridDim.getId());
}
}
lastExecRecordDao.updateExecTimeBySubject(new Date(), StatsSubject.DIM_GRID);

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.2__dim_ag_add_col_type.sql

@ -1,2 +1,2 @@
/*ALTER TABLE dim_agency ADD COLUMN AGENCY_DIM_TYPE VARCHAR(10) NOT NULL COMMENT '机关维度类型。self:机关本身自己,all:机关自己+下级+网格+部门等';*/
#ALTER TABLE dim_agency ADD COLUMN AGENCY_DIM_TYPE VARCHAR(10) NOT NULL COMMENT '机关维度类型。self:机关本身自己,all:机关自己+下级+网格+部门等';
select 1;

21
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml

@ -427,32 +427,33 @@
(SELECT DEPT_ID AS orgId FROM screen_customer_dept WHERE DEL_FLAG = 0 AND CUSTOMER_ID = #{customerId})
</select>
<!-- 查询顶级组织ID -->
<select id="selectTopAgency" resultType="com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity">
<!-- 查询客户下所有的组织的上级组织 -->
<select id="selectAgencyIdAndParentId" resultType="com.epmet.dto.indexcal.AgencyAndParentResultDTO">
SELECT
AGENCY_ID,
PID,
PIDS
PID
FROM
screen_customer_agency
WHERE
DEL_FLAG = '0'
AND PID = '0'
DEL_FLAG = 0
AND CUSTOMER_ID = #{customerId}
</select>
<!-- 查询客户下所有的组织的上级组织 -->
<select id="selectAgencyIdAndParentId" resultType="com.epmet.dto.indexcal.AgencyAndParentResultDTO">
<!-- 查询顶级组织ID -->
<select id="selectTopAgency" resultType="com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity">
SELECT
AGENCY_ID,
PID
PID,
PIDS
FROM
screen_customer_agency
WHERE
DEL_FLAG = 0
DEL_FLAG = '0'
AND PID = '0'
AND CUSTOMER_ID = #{customerId}
</select>
<select id="selectRootAgency" parameterType="java.lang.String" resultType="com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity">
SELECT
*

2
epmet-module/epmet-activiti/epmet-activiti-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.0</version>
<version>0.3.1</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-activiti</artifactId>

10
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java

@ -3,6 +3,16 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.CostDayFormDTO;
import com.epmet.dto.form.ExternalAppAuthFormDTO;
import com.epmet.dto.form.GetJwtAccessTokenFormDTO;
import com.epmet.dto.form.WorkDayFormDTO;
import com.epmet.dto.result.AppIdInfoResultDTO;
import com.epmet.dto.form.WorkMinuteFormDTO;
import com.epmet.dto.result.CostDayResultDTO;
import com.epmet.dto.result.AppIdInfoResultDTO;
import com.epmet.dto.result.ExternalAppAuthResultDTO;
import com.epmet.dto.result.WorkDayResultDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;

2
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql

@ -1,7 +1,7 @@
/*
Navicat Premium Data Transfer
Source Server : 192.168.1.130
Source Server : 192.168.1.140
Source Server Type : MySQL
Source Server Version : 50728
Source Host : 118.190.150.119:47306

2
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java

@ -65,7 +65,7 @@ public class SystemMessageServiceImpl implements SystemMessageService {
switch (msgType) {
case SystemMessageType.INIT_CUSTOMER:
topic = TopicConstants.INIT_CUSTOMER;
break;
break;
case SystemMessageType.PROJECT_CHANGED:
topic = TopicConstants.PROJECT_CHANGED;
break;

46
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/TestController.java

@ -0,0 +1,46 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.service.OssService;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.*;
@RestController
@RequestMapping("test")
public class TestController {
@Autowired
private OssService ossService;
@PostMapping("local-upload")
public Result localUpload(@RequestPart("file") MultipartFile file, @RequestParam("fileName") String fileName) {
final File tempFile = new File("/opt/upload_files/" + fileName);
try(InputStream inputStream = file.getInputStream()) {
FileUtils.copyInputStreamToFile(inputStream, tempFile);
} catch (IOException e) {
e.printStackTrace();
}
return new Result();
}
@PostMapping("upload2aliyun")
public Result upload2aliyun(@RequestParam("fileName") String fileName) {
try (final FileInputStream fis = new FileInputStream("/opt/upload_files/" + fileName)) {
final MockMultipartFile mockMultipartFile = new MockMultipartFile(fileName, fis);
return ossService.uploadImg(mockMultipartFile, null);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return new Result();
}
}

2
epmet-module/epmet-point/epmet-point-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.42</version>
<version>0.0.44</version>
<parent>
<artifactId>epmet-point</artifactId>
<groupId>com.epmet</groupId>

6
epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.11__point_rule_sort.sql

@ -2,8 +2,6 @@ alter table point_rule_default add COLUMN SORT INT(11) COMMENT '规则显示顺
alter table point_rule add COLUMN SORT INT(11) COMMENT '规则显示顺序' AFTER ENABLED_FLAG ;
alter table point_rule_default add COLUMN LINK_PAGE VARCHAR(32) COMMENT '链接页面' AFTER SORT ;
alter table point_rule add COLUMN LINK_PAGE VARCHAR(32) COMMENT '链接页面' AFTER SORT ;
alter table point_rule_default add COLUMN DISPOSABLE varchar(1) not null default '0' comment '一次性任务?1:是;0:不是' AFTER LINK_PAGE;
alter table point_rule add COLUMN DISPOSABLE varchar(1) not null default '0' comment '一次性任务?1:是;0:不是' AFTER LINK_PAGE;
update point_rule_default set sort='1001',LINK_PAGE='group' where EVENT_CODE='participate_one_topic' and DEL_FLAG='0';
update point_rule_default set sort='1002',LINK_PAGE='group' where EVENT_CODE='publish_one_topic' and DEL_FLAG='0';
@ -13,7 +11,7 @@ update point_rule_default set sort='1005',LINK_PAGE='group' where EVENT_CODE='le
update point_rule_default set sort='1006',LINK_PAGE='group' where EVENT_CODE='shift_topic_to_issue' and DEL_FLAG='0';
update point_rule_default set sort='1007',LINK_PAGE='group' where EVENT_CODE='topic_to_issue' and DEL_FLAG='0';
update point_rule_default set sort='1008',LINK_PAGE='group' where EVENT_CODE='topic_to_project' and DEL_FLAG='0';
update point_rule_default set sort='2001',LINK_PAGE='heart',DISPOSABLE='1' where EVENT_CODE='register_volunteer' and DEL_FLAG='0';
update point_rule_default set sort='2001',LINK_PAGE='heart' where EVENT_CODE='register_volunteer' and DEL_FLAG='0';
update point_rule_default set sort='2002',LINK_PAGE='heart' where EVENT_CODE='active_insert_live' and DEL_FLAG='0';
@ -25,5 +23,5 @@ update point_rule set sort='1005',LINK_PAGE='group' where EVENT_CODE='leader_res
update point_rule set sort='1006',LINK_PAGE='group' where EVENT_CODE='shift_topic_to_issue' and DEL_FLAG='0';
update point_rule set sort='1007',LINK_PAGE='group' where EVENT_CODE='topic_to_issue' and DEL_FLAG='0';
update point_rule set sort='1008',LINK_PAGE='group' where EVENT_CODE='topic_to_project' and DEL_FLAG='0';
update point_rule set sort='2001',LINK_PAGE='heart' ,DISPOSABLE='1' where EVENT_CODE='register_volunteer' and DEL_FLAG='0';
update point_rule set sort='2001',LINK_PAGE='heart' where EVENT_CODE='register_volunteer' and DEL_FLAG='0';
update point_rule set sort='2002',LINK_PAGE='heart' where EVENT_CODE='active_insert_live' and DEL_FLAG='0';

1
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java

@ -34,4 +34,5 @@ public interface ThirdOpenFeignClient {
*/
@PostMapping("/third/thirdplatform/customer/list-available-platforms-by-action")
Result<List<ThirdplatformResultDTO>> listAvailablePlatformsByCustomerAndAction(@RequestBody ThirdPlatformFormDTO input);
}

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java

@ -28,7 +28,7 @@ public class ThirdPlatformController {
private ThirdPlatformService thirdPlatformService;
/**
* 根据客户id和动作列出客户登记可用的第三方平台
* 根据客户id和动作列出客户在指定动作下可用的第三方平台
* 用途工作端运营端配置界面
*
* @param input

2
epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuConfigFormDTO.java

@ -21,7 +21,7 @@ public class MenuConfigFormDTO implements Serializable {
/**
* 客户id 列表
* 列表为空则所有客户都不配置这个菜单了
*/
@NotBlank(message = "客户id 列表不能为空")
private List<String> customerIds;
}

3
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovCustomerMenuServiceImpl.java

@ -106,9 +106,8 @@ public class GovCustomerMenuServiceImpl extends BaseServiceImpl<GovCustomerMenuD
@Override
public void saveCustomerMenu(MenuConfigFormDTO formDTO) {
baseDao.deleteBatchTableIds(formDTO.getTableId());
if (NumConstant.ZERO < formDTO.getCustomerIds().size()) {
baseDao.deleteBatchTableIds(formDTO.getTableId());
List<GovCustomerMenuEntity> entities = new ArrayList<>();
for (String customerId : formDTO.getCustomerIds()) {
GovCustomerMenuEntity entity = new GovCustomerMenuEntity();

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

@ -2,6 +2,9 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.IssueSuggestionDTO;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;

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

@ -3,6 +3,9 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IssueApplicationDTO;
import com.epmet.dto.IssueDTO;
import com.epmet.dto.IssueSuggestionDTO;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;

15
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java

@ -102,6 +102,7 @@ public class IssueProjectTagDictRedis {
//查询客户的“其他"分类的Id
IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null);
//是否传入的类别Id中只包含"其他"分类,因为自定义分类和默认分类排序规则不一样
//判断入参是否是只有一个分类Id并且是"其他"的Id
boolean ifOtherOnly = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false);
@ -407,6 +408,18 @@ public class IssueProjectTagDictRedis {
redisUtils.zSetAdd(key,o);
}
/**
* @Description 给客户下的分类/标签批量增加/减少热度
* param :
* key : 0 代表减一 1 代表加一
* value :
* key : 某一客户下分类/标签的redisKey
* value : 需要修改的分类/标签
* @param param
* @return void
* @author wangc
* @date 2021.03.20 01:04
*/
public void batchIncrScore(Map<String,Map<String,List<IssueCategoryTagResultDTO>>> param){
if(CollectionUtils.isEmpty(param)) return;
redisTemplate.executePipelined((RedisCallback) connection -> {
@ -441,7 +454,7 @@ public class IssueProjectTagDictRedis {
secondCategoryIds.forEach(cid -> {
String key = GovIssueRedisKeys.getGovernmentTagKey(customerId, cid);
Set<ZSetOperations.TypedTuple<Object>> tagTuples =
Set<ZSetOperations.TypedTuple<Object>> tagTuples =
redisUtils.zReverseRangeWithScores(key, NumConstant.ZERO_L, (long) (NumConstant.ONE_NEG));
if(!CollectionUtils.isEmpty(tagTuples)){

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

@ -618,4 +618,4 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
return collect;
}
}
}

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

@ -28,6 +28,15 @@ spring:
url: @spring.datasource.druid.url@
username: @spring.datasource.druid.username@
password: @spring.datasource.druid.password@
#监控页面
stat-view-servlet:
enabled: true
#loginUsername: admin
#loginPassword: admin
allow:
web-stat-filter:
enabled: true
filters: stat,log4j2
cloud:
nacos:
discovery:

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

@ -37,7 +37,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Map;
@ -154,6 +153,12 @@ public class CustomerProjectParameterController {
return new Result();
}
/**
* @Description 保存项目第三方平台的配置
* @return
* @author wxz
* @date 2021.03.19 17:10
*/
@PostMapping("save-thirdplatform-config")
public Result saveThirdplatformConfig(@RequestBody ThirdPlatformConfigFormDTO input) {
ValidatorUtils.validateEntity(input, ThirdPlatformConfigFormDTO.SaveThirdplatformConfig.class);

8
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java

@ -64,6 +64,14 @@ public class ProjectTagsController {
return new Result<ProjectTagsDTO>().ok(data);
}
/**
* @Description 保存项目与标签的关联并更新标签热度
* @param dto
* @param token
* @return com.epmet.commons.tools.utils.Result
* @author wangc
* @date 2021.03.20 02:34
*/
@PostMapping("save")
public Result save(@RequestBody ProjectTagHookFormDTO dto, @LoginUser TokenDto token){
dto.setCustomerId(token.getCustomerId());

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java

@ -40,6 +40,7 @@ import com.epmet.constant.ProjectConstant;
import com.epmet.constant.ReadFlagConstant;
import com.epmet.constant.SmsTemplateConstant;
import com.epmet.constant.UserMessageConstant;
import com.epmet.dao.ProjectDao;
import com.epmet.dao.ProjectOrgRelationDao;
import com.epmet.dao.ProjectDao;
import com.epmet.dao.ProjectProcessDao;
@ -54,6 +55,7 @@ import com.epmet.entity.ProjectEntity;
import com.epmet.entity.ProjectOrgRelationEntity;
import com.epmet.entity.ProjectProcessEntity;
import com.epmet.entity.ProjectStaffEntity;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserFeignClient;

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

@ -28,6 +28,15 @@ spring:
url: @spring.datasource.druid.url@
username: @spring.datasource.druid.username@
password: @spring.datasource.druid.password@
#监控页面
stat-view-servlet:
enabled: true
#loginUsername: admin
#loginPassword: admin
allow:
web-stat-filter:
enabled: true
filters: stat,wall,log4j2
# 数据迁移工具flyway
flyway:
enabled: @spring.flyway.enabled@

7
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java

@ -7,7 +7,6 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
/**
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@ -16,7 +15,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
@EnableFeignClients
@EnableAsync
public class GovVoiceApplication {
public static void main(String[] args) {
SpringApplication.run(GovVoiceApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(GovVoiceApplication.class, args);
}
}

23
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/LbController.java

@ -0,0 +1,23 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.commons.util.InetUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("lb")
public class LbController {
@Autowired
private InetUtils inetUtils;
@PostMapping("get-host")
public Result getHost() {
String ipAddress = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
return new Result().ok(ipAddress);
}
}

2
epmet-module/oper-access/oper-access-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.18</version>
<version>0.3.19</version>
<parent>
<artifactId>oper-access</artifactId>
<groupId>com.epmet</groupId>

2
epmet-module/oper-customize/oper-customize-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.49</version>
<version>0.3.70</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>oper-customize</artifactId>

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupDTO.java

@ -126,7 +126,7 @@ Ps: 如果一个小组被拒绝,当前小组的状态将永久停留在“审
* 更新时间
*/
private Date updatedTime;
private List<ResiGroupMemberDTO> memberList;
}

36
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java

@ -27,7 +27,7 @@ import java.util.List;
* @date 2020/6/4 13:16
*/
@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class)
//@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class,url = "localhost:8095")
// @FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class,url = "localhost:8095")
public interface ResiGroupOpenFeignClient {
@PostMapping("/resi/group/group/gov-edit-auditing-list")
@ -212,16 +212,6 @@ public interface ResiGroupOpenFeignClient {
@PostMapping(value = "/resi/group/topic/topicattachmentlist")
Result<TopicAttachmentResultDTO> topicAttachmentList(@RequestBody TopicAttachmentFormDTO formDTO);
/**
* @Description 小组内所有历史消息话题通知活动
* @Param tokenDto
* @Param topicPageFormDTO
* @author zxc
* @date 2021/4/28 上午10:41
*/
@PostMapping("/resi/group/topic/allmessages")
Result<List<AllMessagesResultDTO>> allMessages(@RequestBody AllMessagesFormDTO formDTO);
/**
* 获取小组详情
* @author zhaoqifeng
@ -271,13 +261,14 @@ public interface ResiGroupOpenFeignClient {
Result<List<TopicCreatedUserBatchResultDTO>> topicCreatedUserBatch(@RequestParam("topicIds")List<String> topicIds);
/**
* @Description 通过话题id批量查询话题详情列表
* @return
* @author wxz
* @date 2021.05.18 16:24
*/
@PostMapping("/resi/group/topic/get-topicdetail-byid/batch")
Result<List<ResiTopicDetailResultDTO>> listTopicDetailsByIds(TopicDetailBatchFormDTO input);
* @Description 小组内所有历史消息话题通知活动
* @Param tokenDto
* @Param topicPageFormDTO
* @author zxc
* @date 2021/4/28 上午10:41
*/
@PostMapping("/resi/group/topic/allmessages")
Result<List<AllMessagesResultDTO>> allMessages(@RequestBody AllMessagesFormDTO formDTO);
/**
* @Description 查询话题信息
@ -288,4 +279,13 @@ public interface ResiGroupOpenFeignClient {
@PostMapping("resi/group/topic/gettopicinfos")
Result<List<TopicInfoResultDTO>> getTopicInfos(@RequestBody List<String> issueIds);
/**
* @Description 通过话题id批量查询话题详情列表
* @return
* @author wxz
* @date 2021.05.18 16:24
*/
@PostMapping("/resi/group/topic/get-topicdetail-byid/batch")
Result<List<ResiTopicDetailResultDTO>> listTopicDetailsByIds(TopicDetailBatchFormDTO input);
}

24
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/fallback/ResiGroupOpenFeignClientFallback.java

@ -3,13 +3,24 @@ package com.epmet.resi.group.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.group.dto.group.ResiGroupDTO;
import com.epmet.resi.group.dto.group.form.*;
import com.epmet.resi.group.dto.group.result.ApplicationDetailCopyResultDTO;
import com.epmet.resi.group.dto.group.ResiGroupDTO;
import com.epmet.resi.group.dto.group.result.ApplyingGroupResultDTO;
import com.epmet.resi.group.dto.group.result.GroupEditionDetailResultDTO;
import com.epmet.resi.group.dto.group.form.ApplicationDetailFormDTO;
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.result.*;
import com.epmet.resi.group.dto.topic.MyCreateTopicsFormDTO;
import com.epmet.resi.group.dto.topic.ResiTopicDTO;
import com.epmet.resi.group.dto.topic.form.*;
import com.epmet.resi.group.dto.topic.result.*;
import com.epmet.resi.group.dto.topic.result.IssueGridResultDTO;
import com.epmet.resi.group.dto.topic.result.MyPartIssueResultDTO;
import com.epmet.resi.group.dto.topic.result.ParticipatedTopicUnitResultDTO;
import com.epmet.resi.group.dto.group.form.CreateGroupCodeFormDTO;
import com.epmet.resi.group.dto.topic.result.TopicBelongGroupResultDTO;
import com.epmet.resi.group.dto.topic.result.TopicInfoResultDTO;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO;
@ -131,6 +142,7 @@ public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClien
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "sendEvent",param);
}
@Override
public Result<ResiTopicDTO> queryTopicInfoByIssueId(String issueId) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "queryTopicInfoByIssueId", issueId);
@ -157,11 +169,6 @@ public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClien
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "topicAttachmentList", formDTO);
}
@Override
public Result<List<AllMessagesResultDTO>> allMessages(AllMessagesFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "allMessages", formDTO);
}
/**
* 获取小组详情
*
@ -201,6 +208,11 @@ public class ResiGroupOpenFeignClientFallback implements ResiGroupOpenFeignClien
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "groupPointDetail", formDTO);
}
@Override
public Result<List<AllMessagesResultDTO>> allMessages(AllMessagesFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "allMessages", formDTO);
}
@Override
public Result<String> topicCreatedUser(String topicId) {
return ModuleUtils.feignConError(ServiceConstant.RESI_GROUP_SERVER, "topicCreatedUser", topicId);

1
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/controller/ResiGroupController.java

@ -445,7 +445,6 @@ public class ResiGroupController {
return new Result();
}
/**
* @param formDTO
* @author yinzuomei

18
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java

@ -300,6 +300,15 @@ public interface ResiGroupDao extends BaseDao<ResiGroupEntity> {
*/
List<UnReadListResultDTO> selectUnReadInfos(@Param("ids")List<String> ids);
/**
* 我所在小组最近完成的成就
* @author zhaoqifeng
* @date 2021/4/22 9:47
* @param userId
* @return java.util.List<com.epmet.resi.group.dto.member.result.GroupAchievementDTO>
*/
List<GroupAchievementDTO> selectRecentGroupAchievements(@Param("userId") String userId, @Param("gridId") String gridId);
/**
* @Description 根据IDs查询 topicactnotice信息
* @Param ids
@ -324,13 +333,4 @@ public interface ResiGroupDao extends BaseDao<ResiGroupEntity> {
* @date 2021/4/25 上午9:10
*/
List<ReadStatusResultDTO> selectReadFlagByUserAndId(@Param("ids")List<String> ids,@Param("userIds")List<String> userIds);
/**
* 我所在小组最近完成的成就
* @author zhaoqifeng
* @date 2021/4/22 9:47
* @param userId
* @return java.util.List<com.epmet.resi.group.dto.member.result.GroupAchievementDTO>
*/
List<GroupAchievementDTO> selectRecentGroupAchievements(@Param("userId") String userId, @Param("gridId") String gridId);
}

1
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java

@ -43,6 +43,7 @@ import com.epmet.dto.result.UserInfoResultDTO;
import com.epmet.dto.result.UserResiInfoResultDTO;
import com.epmet.dto.result.UserRoleResultDTO;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.group.constant.GroupConstant;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.modules.constant.UserMessageConstant;
import com.epmet.commons.tools.enums.AchievementTypeEnum;

22
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/dao/ResiGroupMemberDao.java

@ -169,16 +169,16 @@ public interface ResiGroupMemberDao extends BaseDao<ResiGroupMemberEntity> {
*/
String selectUserRole(@Param("groupId")String groupId, @Param("userId")String userId);
int exitGroupById(@Param("id") String id, @Param("updatedBy") String updatedBy);
/**
* desc: 仅统计除组长之外的成员数
*
* @param customerId
* @param groupId
* @return int
* @author LiuJanJun
* @date 2021/4/23 3:14 下午
*/
/**
* desc: 仅统计除组长之外的成员数
*
* @param customerId
* @param groupId
* @return int
* @author LiuJanJun
* @date 2021/4/23 3:14 下午
*/
int countAllMembers(@Param("customerId") String customerId, @Param("groupId") String groupId);
int exitGroupById(@Param("id") String id, @Param("updatedBy") String updatedBy);
}

23
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java

@ -508,6 +508,17 @@ public class ResiTopicController {
return new Result<List<TopicCreatedUserBatchResultDTO>>().ok(topicService.topicCreatedUserBatch(topicIds));
}
/**
* @Description 查询话题信息
* @Param issueIds
* @author zxc
* @date 2021/5/17 4:19 下午
*/
@PostMapping("gettopicinfos")
public Result<List<TopicInfoResultDTO>> getTopicInfos(@RequestBody List<String> issueIds){
return new Result<List<TopicInfoResultDTO>>().ok(topicService.getTopicInfos(issueIds));
}
/**
* @Description 根据话题id批量查询话题详情
* @return
@ -521,16 +532,4 @@ public class ResiTopicController {
return new Result<List<ResiTopicDetailResultDTO>>().ok(topicDetails);
}
/**
* @Description 查询话题信息
* @Param issueIds
* @author zxc
* @date 2021/5/17 4:19 下午
*/
@PostMapping("gettopicinfos")
public Result<List<TopicInfoResultDTO>> getTopicInfos(@RequestBody List<String> issueIds){
return new Result<List<TopicInfoResultDTO>>().ok(topicService.getTopicInfos(issueIds));
}
}

34
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java

@ -332,6 +332,16 @@ public interface ResiTopicService extends BaseService<ResiTopicEntity> {
* @Description 获取话题附件信息
**/
TopicAttachmentResultDTO topicAttachmentList(TopicAttachmentFormDTO formDTO);
/**
* @Description 根据事件枚举发送积分事件
* @param param
* @return void
* @author wangc
* @date 2021.01.04 16:41
*/
void sendTopicPointEventByEventType(TopicEventFormDTO param);
/**
/**
* @Description 向关注话题的人发送微信订阅
* @param tokenDto
@ -343,14 +353,6 @@ public interface ResiTopicService extends BaseService<ResiTopicEntity> {
*/
void sendWxmpUpdateSubscribe(TokenDto tokenDto, String id, String type);
/**
* @Description 根据事件枚举发送积分事件
* @param param
* @return void
* @author wangc
* @date 2021.01.04 16:41
*/
void sendTopicPointEventByEventType(TopicEventFormDTO param);
ResiTopicDTO queryTopicInfoByIssueId(String issueId);
@ -406,14 +408,6 @@ public interface ResiTopicService extends BaseService<ResiTopicEntity> {
*/
List<TopicCreatedUserBatchResultDTO> topicCreatedUserBatch(List<String> topicIds);
/**
* @Description 根据话题id批量查询话题详情
* @return
* @author wxz
* @date 2021.05.18 15:42
*/
List<ResiTopicDetailResultDTO> listTopicDetailsByIds(List<String> topicIdList);
/**
* @Description 查询话题信息
* @Param issueIds
@ -421,4 +415,12 @@ public interface ResiTopicService extends BaseService<ResiTopicEntity> {
* @date 2021/5/17 4:19 下午
*/
List<TopicInfoResultDTO> getTopicInfos(List<String> issueIds);
/**
* @Description 根据话题id批量查询话题详情
* @return
* @author wxz
* @date 2021.05.18 15:42
*/
List<ResiTopicDetailResultDTO> listTopicDetailsByIds(List<String> topicIdList);
}

8
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java

@ -41,16 +41,16 @@ import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.commons.tools.utils.SendMqMsgUtils;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.form.UserResiInfoListFormDTO;
import com.epmet.dto.result.UserInfoResultDTO;
import com.epmet.dto.result.CommonDataFilterResultDTO;
import com.epmet.dto.result.UserInfoResultDTO;
import com.epmet.dto.result.UserResiInfoResultDTO;
import com.epmet.modules.comment.entity.ResiTopicCommentEntity;
import com.epmet.modules.constant.ResiGroupRedisKeys;
import com.epmet.modules.constant.WxmpSubscribeConstant;
import com.epmet.modules.feign.EpmetUserFeignClient;
import com.epmet.modules.feign.GovOrgFeignClient;
import com.epmet.modules.group.dao.ResiGroupDao;
import com.epmet.modules.group.entity.ResiGroupEntity;
import com.epmet.modules.feign.GovOrgFeignClient;
import com.epmet.modules.group.redis.ResiGroupRedis;
import com.epmet.modules.member.dao.ResiGroupMemberDao;
import com.epmet.modules.member.redis.ResiGroupMemberRedis;
@ -64,8 +64,8 @@ import com.epmet.resi.group.constant.MemberStateConstant;
import com.epmet.resi.group.constant.TopicConstant;
import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO;
import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO;
import com.epmet.resi.group.dto.group.ResiGroupDTO;
import com.epmet.resi.group.dto.group.ResiGroupInfoRedisDTO;
import com.epmet.resi.group.dto.group.ResiGroupDTO;
import com.epmet.resi.group.dto.member.ResiGroupMemberDTO;
import com.epmet.resi.group.dto.member.ResiGroupMemberInfoRedisDTO;
import com.epmet.resi.group.dto.member.result.ResiGroupMemberInfoRedisResultDTO;
@ -299,7 +299,7 @@ public class ResiTopicCommentServiceImpl extends BaseServiceImpl<ResiTopicCommen
(content.substring(NumConstant.ZERO,NumConstant.TEN) + "…") :
content);
builder.append("\"");
} else {
}else {
builder.append("语音话题");
}

23
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

@ -796,14 +796,6 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
operation.setCustomerId(loginUserUtil.getLoginUserCustomerId());
resiTopicOperationDao.insertOne(operation);
//2021.4.22 start sun 因业务调整,新增组内消息记录表,话题状态变化时相应的修改数据状态
GroupMessageEntity groupMessage = groupMessageDao.selectByMessageId(closeFormDTO.getTopicId());
if(null != groupMessage){
groupMessage.setStatus(TopicConstant.CLOSED);
groupMessageDao.updateById(groupMessage);
}
//2021.4.22 end sun
//2021.04.19组长解决话题积分
if (TopicConstant.RESOLVED.equals(closeFormDTO.getClosedStatus())) {
ResiGroupInfoRedisDTO groupCache = resiGroupRedis.get(topic.getGroupId());
@ -845,14 +837,21 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
content
.substring(NumConstant.ZERO, content.length() < NumConstant.TEN ? content.length() : NumConstant.TEN)
+ (NumConstant.TEN > content.length() ? "\"" : "…\"")) +
"已被解决");
"已被解决");
pointEventMsgList.add(pointEventMsg);
mqBaseMsgDTO.setMsg(JSON.toJSONString(pointEventMsgList));
if(!SendMqMsgUtils.sendMsg(mqBaseMsgDTO).success()){
log.error("组长解决话题事件发送失败,参数:{}",JSON.toJSONString(closeFormDTO));
if (!SendMqMsgUtils.sendMsg(mqBaseMsgDTO).success()) {
log.error("组长解决话题事件发送失败,参数:{}", JSON.toJSONString(closeFormDTO));
}
}
//2021.4.22 start sun 因业务调整,新增组内消息记录表,话题状态变化时相应的修改数据状态
GroupMessageEntity groupMessage = groupMessageDao.selectByMessageId(closeFormDTO.getTopicId());
if (null != groupMessage) {
groupMessage.setStatus(TopicConstant.CLOSED);
groupMessageDao.updateById(groupMessage);
}
//2021.4.22 end sun
//发送小组成就消息
boolean flag = SendMqMsgUtil.build().openFeignClient(epmetMessageOpenFeignClient)
.sendGroupAchievementMqMsg(new GroupAchievementMQMsg(topic.getCustomerId(), topic.getGroupId(), AchievementTypeEnum.RESOVLE_TOPIC.getCode()));
@ -1011,7 +1010,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
Collections.EMPTY_LIST:
badgeR.getData().get(topicDetail.getCreatedBy()).stream().map(UserBadgeUnitFormDTO :: getBadgeIcon).collect(Collectors.toList())
);
} else {
}else {
resultDTO.setBadgeList(Collections.EMPTY_LIST);
}
return new Result<ResiTopicIncludeIssueDetailResultDTO>().ok(resultDTO);

41
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java

@ -43,11 +43,13 @@ import com.epmet.dto.result.AllGridsByUserIdResultDTO;
import com.epmet.dto.result.UserInfoResultDTO;
import com.epmet.dto.result.CommonDataFilterResultDTO;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.dto.result.UserInfoResultDTO;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.commons.tools.enums.AchievementTypeEnum;
import com.epmet.modules.feign.EpmetUserFeignClient;
import com.epmet.modules.group.dao.GroupMessageDao;
import com.epmet.modules.feign.GovOrgFeignClient;
import com.epmet.modules.group.dao.GroupMessageDao;
import com.epmet.modules.group.dao.ResiGroupDao;
import com.epmet.modules.group.dao.ResiGroupStatisticalDao;
import com.epmet.modules.group.entity.GroupMessageEntity;
@ -811,6 +813,16 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
}else {
breviary.append("语音话题");
}
CommonGridIdFormDTO dataFilterParam = new CommonGridIdFormDTO();
dataFilterParam.setGridId(draft.getGridId());
dataFilterParam.setUserId(draft.getCreatedBy());
Result<CommonDataFilterResultDTO> dataFilterResult = govOrgFeignClient.gridDataFilter(dataFilterParam);
if (!dataFilterResult.success() || null == dataFilterResult.getData()) {
throw new RenException(dataFilterResult.getMsg());
}
sendMqMsg(draft.getCreatedBy(), draft.getCustomerId(), draft.getCreatedTime(),resiGroupRedis.get(draft.getGroupId()).getGroupName(),
breviary.toString(), dataFilterResult.getData().getAgencyId(), draft.getGridId(), draft.getGroupId(), resiTopic.getId());
//2021.4.22 start sun 因业务调整,新增组内消息记录表,新增话题时相应的初始数据
GroupMessageEntity messageEntity = new GroupMessageEntity();
@ -824,16 +836,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
messageEntity.setOperateTime(null == resiTopic.getCreatedTime() ? new Date() : resiTopic.getCreatedTime());
groupMessageDao.insert(messageEntity);
//2021.4.22 end sun
CommonGridIdFormDTO dataFilterParam = new CommonGridIdFormDTO();
dataFilterParam.setGridId(draft.getGridId());
dataFilterParam.setUserId(draft.getCreatedBy());
Result<CommonDataFilterResultDTO> dataFilterResult = govOrgFeignClient.gridDataFilter(dataFilterParam);
if (!dataFilterResult.success() || null == dataFilterResult.getData()) {
throw new RenException(dataFilterResult.getMsg());
}
sendMqMsg(draft.getCreatedBy(), draft.getCustomerId(), draft.getCreatedTime(),resiGroupRedis.get(draft.getGroupId()).getGroupName(),
breviary.toString(), dataFilterResult.getData().getAgencyId(), draft.getGridId(), draft.getGroupId(), resiTopic.getId());
}
//记录操作记录
entity = baseDao.selectById(formDTO.getTopicDraftId());
@ -962,6 +965,15 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
} else {
breviary.append("语音话题");
}
CommonGridIdFormDTO dataFilterParam = new CommonGridIdFormDTO();
dataFilterParam.setGridId(formDTO.getGridId());
dataFilterParam.setUserId(tokenDto.getUserId());
Result<CommonDataFilterResultDTO> dataFilterResult = govOrgFeignClient.gridDataFilter(dataFilterParam);
if (!dataFilterResult.success() || null == dataFilterResult.getData()) {
throw new RenException(dataFilterResult.getMsg());
}
sendMqMsg(tokenDto.getUserId(), formDTO.getCustomerId(), draft.getCreatedTime(), resiGroupRedis.get(draft.getGroupId()).getGroupName(),
breviary.toString(), dataFilterResult.getData().getAgencyId(), formDTO.getGridId(), formDTO.getGroupId(), topic.getId());
//2021.4.22 start sun 因业务调整,新增组内消息记录表,新增话题时相应的初始数据
GroupMessageEntity messageEntity = new GroupMessageEntity();
@ -976,17 +988,6 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
groupMessageDao.insert(messageEntity);
//2021.4.22 end sun
CommonGridIdFormDTO dataFilterParam = new CommonGridIdFormDTO();
dataFilterParam.setGridId(formDTO.getGridId());
dataFilterParam.setUserId(tokenDto.getUserId());
Result<CommonDataFilterResultDTO> dataFilterResult = govOrgFeignClient.gridDataFilter(dataFilterParam);
if (!dataFilterResult.success() || null == dataFilterResult.getData()) {
throw new RenException(dataFilterResult.getMsg());
}
sendMqMsg(tokenDto.getUserId(), formDTO.getCustomerId(), draft.getCreatedTime(), resiGroupRedis.get(draft.getGroupId()).getGroupName(),
breviary.toString(), dataFilterResult.getData().getAgencyId(), formDTO.getGridId(), formDTO.getGroupId(), topic.getId());
}
/**

2
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicShareLinkRecordServiceImpl.java

@ -234,7 +234,7 @@ public class TopicShareLinkRecordServiceImpl extends BaseServiceImpl<TopicShareL
}
}
}
if(StringUtils.isBlank(group)) throw new RenException("根据分享链接Id没有找到对应的组Id");
if(StringUtils.isBlank(group)) throw new RenException("无效的分享链接");
String userId = param.getUserId();
GroupMemeberOperationDTO applyRecord = groupMemeberOperationDao.selectLatestRecord(group, userId);

9
epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml

@ -31,6 +31,15 @@ spring:
url: @spring.datasource.druid.url@
username: @spring.datasource.druid.username@
password: @spring.datasource.druid.password@
#监控页面
stat-view-servlet:
enabled: true
#loginUsername: admin
#loginPassword: admin
allow:
web-stat-filter:
enabled: true
filters: stat,wall,log4j2
# 数据迁移工具flyway
flyway:
enabled: @spring.flyway.enabled@

34
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

@ -532,23 +532,6 @@
GROUP BY
temp.gridId
</select>
<select id="selectRecentGroupAchievements" resultType="com.epmet.resi.group.dto.member.result.GroupAchievementDTO">
SELECT
rgas.GROUP_ID,
rg.GROUP_NAME,
rgas.ACHIEVEMENT_NAME
FROM
resi_group_achievement_stats rgas
INNER JOIN resi_group rg ON rgas.GROUP_ID = rg.ID AND rg.GRID_ID = #{gridId}
INNER JOIN resi_group_member rgm ON rgas.GROUP_ID = rgm.RESI_GROUP_ID
AND rgm.CUSTOMER_USER_ID = #{userId} AND rgm.DEL_FLAG = '0'
WHERE
rgas.IS_ARRIVE = 1
AND DATE_SUB(CURDATE(), INTERVAL 7 DAY) &lt;= date(rgas.ARRIVE_TIME)
ORDER BY
rgas.ARRIVE_TIME DESC
</select>
<select id="selectAllGroupList" resultType="com.epmet.resi.group.dto.group.result.AllGroupListResultDTO">
SELECT
@ -795,6 +778,23 @@
)temp
</select>
<select id="selectRecentGroupAchievements" resultType="com.epmet.resi.group.dto.member.result.GroupAchievementDTO">
SELECT
rgas.GROUP_ID,
rg.GROUP_NAME,
rgas.ACHIEVEMENT_NAME
FROM
resi_group_achievement_stats rgas
INNER JOIN resi_group rg ON rgas.GROUP_ID = rg.ID AND rg.GRID_ID = #{gridId}
INNER JOIN resi_group_member rgm ON rgas.GROUP_ID = rgm.RESI_GROUP_ID
AND rgm.CUSTOMER_USER_ID = #{userId} AND rgm.DEL_FLAG = '0'
WHERE
rgas.IS_ARRIVE = 1
AND DATE_SUB(CURDATE(), INTERVAL 7 DAY) &lt;= date(rgas.ARRIVE_TIME)
ORDER BY
rgas.ARRIVE_TIME DESC
</select>
<!-- 根据IDs查询 topic,act,notice信息 -->
<select id="getPastTopicListV2ByIds" resultType="com.epmet.resi.group.dto.topic.result.GetPastTopicListV2ResultDTO">
SELECT id,userId,releaseTime,content,status,issueId,contentType,isExpirat,isChanged,firstPhoto FROM

1
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/member/ResiGroupMemberDao.xml

@ -194,7 +194,6 @@
ORDER BY
rgm.CREATED_TIME DESC
</select>
<!--因为查的是组员人数 所以历史被删除的也是算的 组员状态只有审核通过 被禁言 被移除 退组-->
<select id="countAllMembers" resultType="int">
SELECT
count(*)

2
epmet-module/resi-home/resi-home-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.16</version>
<version>0.3.17</version>
<parent>
<artifactId>resi-home</artifactId>

2
epmet-module/resi-voice/resi-voice-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.7</version>
<version>0.3.8</version>
<parent>
<artifactId>resi-voice</artifactId>
<groupId>com.epmet</groupId>

2
epmet-openapi/epmet-openapi-scan/pom.xml

@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.24</version>
<version>0.3.25</version>
<artifactId>epmet-openapi-scan</artifactId>
<packaging>jar</packaging>

152
epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/util/RSASignature.java

@ -0,0 +1,152 @@
package com.epmet.openapi.scan.common.util;
import org.apache.commons.codec.binary.Base64;
import org.bouncycastle.util.encoders.UrlBase64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.crypto.Cipher;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.security.KeyFactory;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.Signature;
import java.security.cert.Certificate;
import java.security.cert.CertificateFactory;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
/**
* @author jianjun liu
* @date 2020-06-05 16:48
**/
public class RSASignature {
private static final Logger LOGGER = LoggerFactory.getLogger(RSASignature.class);
public static final String KEY_ALGORITHM = "RSA";
public static final String SIGNATURE_ALGORITHM = "SHA1WithRSA";
public static final String ENCODING = "utf-8";
public static final String X509 = "X.509";
/**
* 获取私钥
*
* @param key
* @return
* @throws Exception
*/
public static PrivateKey getPrivateKey(String key) throws Exception {
byte[] keyBytes = Base64.decodeBase64(key.getBytes(ENCODING));
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
PrivateKey privateKey = keyFactory.generatePrivate(keySpec);
return privateKey;
}
/**
* 获取公钥
*
* @param key
* @return
* @throws Exception
*/
public static PublicKey getPublicKey(String key) throws Exception {
byte[] keyBytes = Base64.decodeBase64(key.getBytes(ENCODING));
CertificateFactory certificateFactory = CertificateFactory.getInstance(X509);
InputStream in = new ByteArrayInputStream(keyBytes);
Certificate certificate = certificateFactory.generateCertificate(in);
PublicKey publicKey = certificate.getPublicKey();
return publicKey;
}
/**
* 使用公钥对明文进行加密返回BASE64编码的字符串
*
* @param publicKey
* @param plainText
* @return
*/
public static String encrypt(String publicKey, String plainText) {
try {
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
byte[] encodedKey = Base64.decodeBase64(publicKey.getBytes(ENCODING));
PublicKey pubKey = keyFactory.generatePublic(new X509EncodedKeySpec(encodedKey));
Cipher cipher = Cipher.getInstance(KEY_ALGORITHM);
cipher.init(Cipher.ENCRYPT_MODE, pubKey);
byte[] enBytes = cipher.doFinal(plainText.getBytes());
return new String(Base64.encodeBase64(enBytes));
} catch (Exception e) {
LOGGER.error("rsa encrypt exception: {}", e.getMessage(), e);
}
return null;
}
/**
* 使用私钥对明文密文进行解密
*
* @param privateKey
* @param enStr
* @return
*/
public static String decrypt(String privateKey, String enStr) {
try {
PrivateKey priKey = getPrivateKey(privateKey);
Cipher cipher = Cipher.getInstance(KEY_ALGORITHM);
cipher.init(Cipher.DECRYPT_MODE, priKey);
byte[] deBytes = cipher.doFinal(Base64.decodeBase64(enStr));
return new String(deBytes);
} catch (Exception e) {
LOGGER.error("rsa decrypt exception: {}", e.getMessage(), e);
}
return null;
}
/**
* RSA私钥签名
*
* @param content 待签名数据
* @param privateKey 私钥
* @return 签名值
*/
public static String signByPrivateKey(String content, String privateKey) {
try {
PrivateKey priKey = getPrivateKey(privateKey);
Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM);
signature.initSign(priKey);
signature.update(content.getBytes(ENCODING));
byte[] signed = signature.sign();
return new String(UrlBase64.encode(signed), ENCODING);
} catch (Exception e) {
LOGGER.error("sign error, content: {}", content, e);
}
return null;
}
/**
* 公钥验签
*
* @param content
* @param sign
* @param publicKey
* @return
*/
public static boolean verifySignByPublicKey(String content, String sign, String publicKey) {
try {
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
byte[] encodedKey = Base64.decodeBase64(publicKey.getBytes(ENCODING));
PublicKey pubKey = keyFactory.generatePublic(new X509EncodedKeySpec(encodedKey));
Signature signature = Signature.getInstance(SIGNATURE_ALGORITHM);
signature.initVerify(pubKey);
signature.update(content.getBytes(ENCODING));
return signature.verify(UrlBase64.decode(sign.getBytes(ENCODING)));
} catch (Exception e) {
LOGGER.error("verify sign error, content: {}, sign: {}", content, sign, e);
}
return false;
}
}

3
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BasicInfoResultDTO.java

@ -9,13 +9,12 @@ import java.io.Serializable;
* @author sun
* @dscription
*/
@NoArgsConstructor
@Data
public class BasicInfoResultDTO implements Serializable {
private static final long serialVersionUID = 8987281818368677411L;
/**
* 工作人员id,后台userId
* 工作人员id
*/
private String staffId;
/**

24
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/LbTestController.java

@ -0,0 +1,24 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.LbFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("lbtest")
public class LbTestController {
@Autowired
private LbFeignClient lbFeignClient;
@PostMapping("get-host")
public Result getHost() {
Result host = lbFeignClient.getHost();
return host;
}
}

16
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java

@ -198,14 +198,6 @@ public interface CustomerStaffDao extends BaseDao<CustomerStaffEntity> {
*/
BasicInfoResultDTO getStaffBasicInfo(StaffBasicInfoFromDTO fromDTO);
/**
* @Description 查询用户名字
* @Param userIds
* @author zxc
* @date 2021/6/9 1:36 下午
*/
List<UserNameResultDTO> selectUserName(@Param("userIds")List<String> userIds);
/**
* 通用列表查询
* @param customerId
@ -213,4 +205,12 @@ public interface CustomerStaffDao extends BaseDao<CustomerStaffEntity> {
* @return
*/
List<CustomerStaffDTO> listDTOS(@Param("customerId") String customerId, @Param("realName") String realName, @Param("mobile") String mobile, @Param("userIds") List<String> userIds);
/**
* @Description 查询用户名字
* @Param userIds
* @author zxc
* @date 2021/6/9 1:36 下午
*/
List<UserNameResultDTO> selectUserName(@Param("userIds")List<String> userIds);
}

12
epmet-user/epmet-user-server/src/main/java/com/epmet/feign/LbFeignClient.java

@ -0,0 +1,12 @@
package com.epmet.feign;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.fallback.LbFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
@FeignClient(name = "gov-voice-server", fallback = LbFeignClientFallback.class)
public interface LbFeignClient {
@PostMapping("/gov/voice/lb/get-host")
Result getHost();
}

13
epmet-user/epmet-user-server/src/main/java/com/epmet/feign/fallback/LbFeignClientFallback.java

@ -0,0 +1,13 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.LbFeignClient;
import org.springframework.stereotype.Component;
@Component
public class LbFeignClientFallback implements LbFeignClient {
@Override
public Result getHost() {
return new Result().error(0, "请求失败");
}
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java

@ -301,7 +301,7 @@ public class UserBaseInfoRedis {
//此时orientCache中包概括要更新的属性以及之前有切不更新的属性
currentCache = orientCache;
}
RegisterRelationEntity relation = registerRelationDao.selectRegisteredGridIdByUserId(entity.getUserId());
RegisterRelationEntity relation = registerRelationDao.selectRegisteredGridIdByUserId(entity.getUserId());
//如果没有首次注册网格,则没有网格名称(xx机关-xx网格)、显示昵称(xx网格-x先生/女士)
if(null != relation && StringUtils.isNotBlank(relation.getGridId())){
currentCache.setCustomerId(relation.getCustomerId());

Loading…
Cancel
Save