Browse Source

Merge branches 'dev_ic_platform' and 'develop' of http://git.elinkit.com.cn:7070/r/epmet-cloud into develop

dev_shibei_match
wangxianzhang 4 years ago
parent
commit
89d2d8bf3b
  1. 2
      epmet-admin/epmet-admin-server/pom.xml
  2. 2
      epmet-auth/pom.xml
  3. 85
      epmet-auth/src/main/java/com/epmet/controller/LoginController.java
  4. 1
      epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java
  5. 2
      epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java
  6. 34
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/BaseRequestLogAspect.java
  7. 35
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/EpmetBaseRequestInterceptor.java
  8. 41
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/FeignConfig.java
  9. 13
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
  10. 10
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Pinyin4jUtil.java
  11. 5
      epmet-gateway/src/main/resources/bootstrap.yml
  12. 17
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java
  13. 3
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
  14. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
  15. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/FineExampleResultDTO.java
  16. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityRankResultDTO.java
  17. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java
  18. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsGovernRankResultDTO.java
  19. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsGovernResultDTO.java
  20. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsOrgRankResultDTO.java
  21. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GrassRootsOrgResultDTO.java
  22. 4
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java
  23. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartyUserPointResultDTO.java
  24. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PmTotalResultDTO.java
  25. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectProfileResultDTO.java
  26. 4
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java
  27. 2
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TopProfileResultDTO.java
  28. 16
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/CategoryProjectListFormDTO.java
  29. 3
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectCategoryFormDTO.java
  30. 15
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/CategoryProjectListResultDTO.java
  31. 20
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryResultDTO.java
  32. 8
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java
  33. 64
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java
  34. 1
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  35. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  36. 11
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java
  37. 24
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java
  38. BIN
      epmet-module/data-report/data-report-server/src/main/resources/excel/project_category_temp.xlsx
  39. BIN
      epmet-module/data-report/data-report-server/src/main/resources/excel/project_temp.xlsx
  40. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml
  41. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
  42. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
  43. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
  44. 7
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml
  45. 5
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml
  46. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml
  47. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnCommunityProjectProfileDao.xml
  48. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsGovernMonthlyDao.xml
  49. 6
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsOrgMonthlyDao.xml
  50. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screenan/ScreenAnGrassRootsPmTotalMonthlyDao.xml
  51. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java
  52. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/healthcheck/HealthCheckController.java
  53. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  54. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java
  55. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerDeptServiceImpl.java
  56. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java
  57. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectOrgDailyServiceImpl.java
  58. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java
  59. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java
  60. 52
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java
  61. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java
  62. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java
  63. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java
  64. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java
  65. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java
  66. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.2__dim_ag_add_col_type.sql
  67. 21
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml
  68. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml
  69. 2
      epmet-module/epmet-activiti/epmet-activiti-server/pom.xml
  70. 10
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java
  71. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql
  72. 59
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/config/JobFeignConfig.java
  73. 1
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/config/ScheduleConfig.java
  74. 2
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java
  75. 12
      epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/OssFeignClient.java
  76. 7
      epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/fallback/OssFeignClientFallback.java
  77. 68
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/TestController.java
  78. 4
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java
  79. 2
      epmet-module/epmet-point/epmet-point-server/pom.xml
  80. 6
      epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/V0.0.11__point_rule_sort.sql
  81. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ThirdPlatformController.java
  82. 2
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/MenuConfigFormDTO.java
  83. 3
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovCustomerMenuServiceImpl.java
  84. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  85. 3
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  86. 13
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java
  87. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java
  88. 9
      epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml
  89. 26
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  90. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  91. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  92. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/CustomerProjectParameterController.java
  93. 8
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectTagsController.java
  94. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
  95. 9
      epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml
  96. 7
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/GovVoiceApplication.java
  97. 23
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/LbController.java
  98. 2
      epmet-module/oper-access/oper-access-server/pom.xml
  99. 2
      epmet-module/oper-customize/oper-customize-server/pom.xml
  100. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/ResiGroupDTO.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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.15</version> <version>0.3.17</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>epmet-admin</artifactId> <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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.70</version> <version>0.3.72</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>epmet-cloud</artifactId> <artifactId>epmet-cloud</artifactId>

85
epmet-auth/src/main/java/com/epmet/controller/LoginController.java

@ -23,6 +23,9 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.IOException; import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
/** /**
* @Description 通用登录接口 * @Description 通用登录接口
@ -145,4 +148,86 @@ public class LoginController {
} }
return new Result().ok(""); return new Result().ok("");
} }
//================start test code==========
/**
* 校验签名
*/
public static boolean checkSignature(String signature, String timestamp, String nonce) {
System.out.println("signature:" + signature + "timestamp:" + timestamp + "nonc:" + nonce);
String WECHAT_TOKEN = "1jkoyyih83nj8";
String[] arr = new String[]{WECHAT_TOKEN, timestamp, nonce};
// 将token、timestamp、nonce三个参数进行字典序排序
Arrays.sort(arr);
StringBuilder content = new StringBuilder();
for (int i = 0; i < arr.length; i++) {
content.append(arr[i]);
}
MessageDigest md = null;
String tmpStr = null;
try {
md = MessageDigest.getInstance("SHA-1");
// 将三个参数字符串拼接成一个字符串进行sha1加密
byte[] digest = md.digest(content.toString().getBytes());
tmpStr = byteToStr(digest);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
content = null;
// 将sha1加密后的字符串可与signature对比,标识该请求来源于微信
System.out.println(tmpStr.equals(signature.toUpperCase()));
return tmpStr != null ? tmpStr.equals(signature.toUpperCase()) : false;
}
/**
* 将字节数组转换为十六进制字符串
*
* @param byteArray
* @return
*/
private static String byteToStr(byte[] byteArray) {
String strDigest = "";
for (int i = 0; i < byteArray.length; i++) {
strDigest += byteToHexStr(byteArray[i]);
}
return strDigest;
}
/**
* 将字节转换为十六进制字符串
*
* @param mByte
* @return
*/
private static String byteToHexStr(byte mByte) {
char[] Digit = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
char[] tempArr = new char[2];
tempArr[0] = Digit[(mByte >>> 4) & 0X0F];
tempArr[1] = Digit[mByte & 0X0F];
String s = new String(tempArr);
return s;
}
/**
* 打开开发者模式签名认证
* @param signature
* @param timestamp
* @param nonce
* @param echostr
* @return
*/
@ResponseBody
@RequestMapping(value = "/service", method = RequestMethod.GET)
public Object defaultView(String signature, String timestamp, String nonce, String echostr) {
if (echostr == null || echostr.isEmpty()) {
return nonce;
}
if (this.checkSignature(signature, timestamp, nonce)) {
return echostr;
}
return nonce;
}
} }

1
epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java

@ -4,7 +4,6 @@ import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.GovTokenDto; import com.epmet.commons.tools.security.dto.GovTokenDto;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.password.PasswordUtils; import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.utils.CpUserDetailRedis; import com.epmet.commons.tools.utils.CpUserDetailRedis;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;

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

@ -295,7 +295,7 @@ public class LoginServiceImpl implements LoginService {
if (!flag) { if (!flag) {
logger.warn(String.format("用户%s登录,验证码输入错误", formDTO.getPhone())); logger.warn(String.format("用户%s登录,验证码输入错误", formDTO.getPhone()));
//2020-05-21去除验证码校验 //2020-05-21去除验证码校验
return new Result<UserTokenResultDTO>().error(EpmetErrorCode.ERR10019.getCode()); //return new Result<UserTokenResultDTO>().error(EpmetErrorCode.ERR10019.getCode());
} }
//2、账号是否存在 //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; package com.epmet.commons.tools.aspect;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.ThreadLocalConstant; import com.epmet.commons.tools.constant.ThreadLocalConstant;
import com.epmet.commons.tools.exception.*; import com.epmet.commons.tools.exception.*;
@ -14,6 +15,9 @@ import javax.servlet.http.HttpServletRequest;
import java.time.Duration; import java.time.Duration;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Arrays; 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(); // transactionSerial = UUID.randomUUID().toString();
//} //}
Map<String, String> requestHeaders = getRequestHeaders(request);
// 将当前线程名称设置为事务流水号 // 将当前线程名称设置为事务流水号
if (!StringUtils.isEmpty(transactionSerial)) { if (!StringUtils.isEmpty(transactionSerial)) {
Thread.currentThread().setName(transactionSerial); Thread.currentThread().setName(transactionSerial);
@ -64,7 +70,8 @@ public abstract class BaseRequestLogAspect {
try { try {
Object[] args = point.getArgs(); Object[] args = point.getArgs();
ThreadLocalConstant.requestParam.set(Arrays.toString(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(); result = point.proceed();
resultInfoLog(transactionSerial, getExecPeriod(startTime), result); resultInfoLog(transactionSerial, getExecPeriod(startTime), result);
} catch (RenException e) { } catch (RenException e) {
@ -91,6 +98,23 @@ public abstract class BaseRequestLogAspect {
return result; 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日志 * info日志
* @param transactionSerial * @param transactionSerial
@ -225,7 +249,13 @@ public abstract class BaseRequestLogAspect {
StringBuilder builder = new StringBuilder("["); StringBuilder builder = new StringBuilder("[");
for (Object object : args) { for (Object object : args) {
if (object != null) { 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(","); builder.append(",");
} }
} }

35
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/EpmetBaseRequestInterceptor.java

@ -0,0 +1,35 @@
package com.epmet.commons.tools.feign;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
public class EpmetBaseRequestInterceptor implements RequestInterceptor {
@Override
public void apply(RequestTemplate template) {
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
if (requestAttributes == null) {
return;
}
HttpServletRequest request = ((ServletRequestAttributes) requestAttributes).getRequest();
Enumeration<String> headerNames = request.getHeaderNames();
if (headerNames != null) {
while (headerNames.hasMoreElements()) {
String name = headerNames.nextElement();
Enumeration<String> values = request.getHeaders(name);
while (values.hasMoreElements()) {
String value = values.nextElement();
template.header(name, value);
}
}
}
}
}

41
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/FeignConfig.java

@ -1,8 +1,8 @@
/** /**
* Copyright (c) 2018 人人开源 All rights reserved. * Copyright (c) 2018 人人开源 All rights reserved.
* * <p>
* https://www.renren.io * https://www.renren.io
* * <p>
* 版权所有侵权必究 * 版权所有侵权必究
*/ */
@ -10,49 +10,32 @@ package com.epmet.commons.tools.feign;
import feign.Logger; import feign.Logger;
import feign.RequestInterceptor; import feign.RequestInterceptor;
import feign.RequestTemplate; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
/** /**
* Feign调用携带header * Feign调用携带header
* 各服务可以自定义自己的RequestInterceptor如果自定义了此处不会再生效会优先使用自定义的拦截器实例
* *
* @author Mark sunlightcs@gmail.com * @author Mark sunlightcs@gmail.com
* @since 1.0.0 * @since 1.0.0
*/ */
@Configuration @Configuration
public class FeignConfig implements RequestInterceptor { public class FeignConfig {
@Override
public void apply(RequestTemplate template) {
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
if (requestAttributes == null) {
return;
}
HttpServletRequest request = ((ServletRequestAttributes) requestAttributes).getRequest();
Enumeration<String> headerNames = request.getHeaderNames();
if (headerNames != null) {
while (headerNames.hasMoreElements()) {
String name = headerNames.nextElement();
Enumeration<String> values = request.getHeaders(name);
while (values.hasMoreElements()) {
String value = values.nextElement();
template.header(name, value);
}
}
}
@Bean
@ConditionalOnMissingBean
RequestInterceptor requestInterceptor() {
return new EpmetBaseRequestInterceptor();
} }
@Bean @Bean
@ConditionalOnMissingBean
Logger.Level feignLoggerLevel() { Logger.Level feignLoggerLevel() {
return Logger.Level.BASIC;//控制台会输出debug日志 return Logger.Level.BASIC;//控制台会输出debug日志
} }
} }

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

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

10
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Pinyin4jUtil.java

@ -31,7 +31,6 @@ public class Pinyin4jUtil {
duoyinMap.put('均',new String[]{"jun"}); duoyinMap.put('均',new String[]{"jun"});
duoyinMap.put('会', new String[]{"hui"}); duoyinMap.put('会', new String[]{"hui"});
duoyinMap.put('属', new String[]{"shu"}); duoyinMap.put('属', new String[]{"shu"});
duoyinMap.put('调', new String[]{"diao"});
} }
/** /**
@ -43,6 +42,7 @@ public class Pinyin4jUtil {
*/ */
public static String getFirstSpellPinYin(String src, boolean isFullSpell) { public static String getFirstSpellPinYin(String src, boolean isFullSpell) {
String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, 1)); String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, 1));
System.out.println("targetStr="+targetStr);
String[] split = targetStr.split(","); String[] split = targetStr.split(",");
if (split.length > 1) { if (split.length > 1) {
targetStr = split[0]; targetStr = split[0];
@ -59,6 +59,7 @@ public class Pinyin4jUtil {
*/ */
public static String getSpellPinYin(String src, boolean isFullSpell,Integer preFont) { public static String getSpellPinYin(String src, boolean isFullSpell,Integer preFont) {
String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, preFont)); String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, preFont));
System.out.println("targetStr="+targetStr);
String[] split = targetStr.split(","); String[] split = targetStr.split(",");
if (split.length > 1) { if (split.length > 1) {
targetStr = split[0]; targetStr = split[0];
@ -195,8 +196,9 @@ public class Pinyin4jUtil {
} }
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(getFirstSpellPinYin("区直部门",false)); //System.out.println(getSpellPinYin("社区超期项目数",true,0));
System.out.println(getSpellPinYin("党员提出话题数",false,4)); System.out.println(getFirstSpellPinYin("区直部门",true));
System.out.println(getSpellPinYin("社区超期项目数",false,4)); //System.out.println(getSpellPinYin("党员提出话题数",false,4));
//System.out.println(getSpellPinYin("社区超期项目数",false,4));
} }
} }

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

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

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

@ -207,6 +207,15 @@ public class EpmetUserController {
return new Result<UserEventLogoResultDTO>().ok(epmetUserService.mentionMeEvent(tokenDto.getUserId())); return new Result<UserEventLogoResultDTO>().ok(epmetUserService.mentionMeEvent(tokenDto.getUserId()));
} }
@GetMapping("export/staffpatroll")
public void export(@LoginUser TokenDto tokenDto, @RequestBody StaffListFormDTO formDTO, HttpServletResponse response) throws Exception {
ValidatorUtils.validateEntity(formDTO, StaffListFormDTO.Staff.class);
formDTO.setUserId(tokenDto.getUserId());
//formDTO.setUserId("73ae6280e46a6653a5605d51d5462725");
List<StaffListResultDTO> resultDTOS = epmetUserService.staffPatrolList(formDTO);
ExcelUtils.exportExcelToTarget(response, null, resultDTOS, StaffPatrollExcel.class);
}
/** /**
* @Param formDTO * @Param formDTO
* @Description 通讯录姓名检索工作人员 * @Description 通讯录姓名检索工作人员
@ -261,14 +270,6 @@ public class EpmetUserController {
return new Result<CustomerStaffResultDTO>().ok(epmetUserService.getStaffInfo(staffId)); return new Result<CustomerStaffResultDTO>().ok(epmetUserService.getStaffInfo(staffId));
} }
@GetMapping("export/staffpatroll")
public void export(@LoginUser TokenDto tokenDto, @RequestBody StaffListFormDTO formDTO, HttpServletResponse response) throws Exception {
ValidatorUtils.validateEntity(formDTO, StaffListFormDTO.Staff.class);
formDTO.setUserId(tokenDto.getUserId());
//formDTO.setUserId("73ae6280e46a6653a5605d51d5462725");
List<StaffListResultDTO> resultDTOS = epmetUserService.staffPatrolList(formDTO);
ExcelUtils.exportExcelToTarget(response, null, resultDTOS, StaffPatrollExcel.class);
}
/** /**
* @Param formDTO * @Param formDTO

3
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java

@ -1,7 +1,5 @@
package com.epmet.dataaggre.service.epmetuser; package com.epmet.dataaggre.service.epmetuser;
import com.epmet.dataaggre.dto.epmetuser.CustomerStaffDTO;
import com.epmet.dataaggre.dto.epmetuser.form.*;
import com.epmet.dataaggre.dto.epmetuser.form.*; import com.epmet.dataaggre.dto.epmetuser.form.*;
import com.epmet.dataaggre.dto.epmetuser.result.*; import com.epmet.dataaggre.dto.epmetuser.result.*;
import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO; import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO;
@ -148,4 +146,5 @@ public interface EpmetUserService {
* @author sun * @author sun
*/ */
StaffDetailV2FormDTO selectByStaffId(String staffId); StaffDetailV2FormDTO selectByStaffId(String staffId);
} }

1
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java

@ -172,5 +172,4 @@ public interface GovOrgService {
* @date 2021/11/5 2:57 下午 * @date 2021/11/5 2:57 下午
*/ */
CustomerGridDTO getGridInfo(String gridId); CustomerGridDTO getGridInfo(String gridId);
} }

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 平台参与议事的党员占比 * PLAT_JOIN PARTY_RATIO 平台参与议事的党员占比
*/ */
private String platJoinPartyRatio = "0.00%"; 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的上一级组织名称 * 当前agencyName的上一级组织名称
*/ */
private String parentAgencyName; 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 parentAgencyName;
private String orgId; 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 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 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 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 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 parentAgencyName;
private String orgId; 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 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 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 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 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 Integer projectNum = 0;
private String dataEndTime;
} }

16
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/CategoryProjectListFormDTO.java

@ -11,12 +11,13 @@ import java.io.Serializable;
* @DESC * @DESC
*/ */
@Data @Data
public class CategoryProjectListFormDTO implements Serializable { public class CategoryProjectListFormDTO extends ProjectCategoryFormDTO implements Serializable {
private static final long serialVersionUID = -5448734274886241594L; private static final long serialVersionUID = -5448734274886241594L;
public interface CategoryProjectListForm{} public interface CategoryProjectListForm{}
@NotNull(message = "pageSize不能为空",groups = CategoryProjectListForm.class) @NotNull(message = "pageSize不能为空",groups = CategoryProjectListForm.class)
private Integer pageSize; private Integer pageSize;
@ -26,22 +27,21 @@ public class CategoryProjectListFormDTO implements Serializable {
/** /**
* 项目状态closed已结案all全部 * 项目状态closed已结案all全部
*/ */
@NotNull(message = "status不能为空",groups = CategoryProjectListForm.class) @NotNull(message = "status不能为空",groups = {CategoryProjectListForm.class, CategoryProjectExportForm.class})
private String status; private String status;
@NotNull(message = "categoryCode不能为空",groups = CategoryProjectListForm.class) @NotNull(message = "categoryCode不能为空",groups = {CategoryProjectListForm.class, CategoryProjectExportForm.class})
private String categoryCode; private String categoryCode;
@NotNull(message = "categoryName不能为空",groups = CategoryProjectExportForm.class)
private String categoryName;
private String parentCategoryName;
/** /**
* 组织ID * 组织ID
*/ */
private String orgId; private String orgId;
/**
* 组织类型agency组织grid网格
*/
private String orgType;
/** /**
* 是否分页默认truefalse的时候 给导出用 * 是否分页默认truefalse的时候 给导出用
*/ */

3
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/form/ProjectCategoryFormDTO.java

@ -16,6 +16,7 @@ public class ProjectCategoryFormDTO implements Serializable {
private static final long serialVersionUID = 5047143743629810527L; private static final long serialVersionUID = 5047143743629810527L;
public interface ProjectCategoryForm{} public interface ProjectCategoryForm{}
public interface CategoryProjectExportForm {}
/** /**
* 组织ID * 组织ID
@ -27,7 +28,7 @@ public class ProjectCategoryFormDTO implements Serializable {
*/ */
private String orgType; private String orgType;
@NotBlank(message = "结束时间不能为空",groups = ProjectCategoryForm.class) @NotBlank(message = "结束时间不能为空",groups = {ProjectCategoryForm.class,CategoryProjectExportForm.class})
private String endTime; private String endTime;
/** /**

15
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/CategoryProjectListResultDTO.java

@ -45,6 +45,21 @@ public class CategoryProjectListResultDTO implements Serializable {
*/ */
private String projectId; private String projectId;
/**
* 上报人
*/
private String linkName;
/**
* 上报人电话
*/
private String linkMobile;
/**
* 事件地址
*/
private String projectAddress;
@JsonIgnore @JsonIgnore
private String orgId; private String orgId;

20
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectCategoryResultDTO.java

@ -23,11 +23,21 @@ public class ProjectCategoryResultDTO implements Serializable {
*/ */
private String categoryCode; private String categoryCode;
/**
* 分类code父级
*/
private String parentCategoryCode;
/** /**
* 分类名字 * 分类名字
*/ */
private String categoryName; private String categoryName;
/**
* 分类名字父级
*/
private String parentCategoryName;
/** /**
* 项目总数 * 项目总数
*/ */
@ -38,6 +48,11 @@ public class ProjectCategoryResultDTO implements Serializable {
*/ */
private Integer closedProjectTotal; private Integer closedProjectTotal;
/**
* 所有项目总数
*/
private Integer allProjectTotal;
/** /**
* 总数占比 * 总数占比
*/ */
@ -57,8 +72,9 @@ public class ProjectCategoryResultDTO implements Serializable {
this.categoryName = ""; this.categoryName = "";
this.projectTotal = NumConstant.ZERO; this.projectTotal = NumConstant.ZERO;
this.closedProjectTotal = NumConstant.ZERO; this.closedProjectTotal = NumConstant.ZERO;
this.totalRatio = ""; this.totalRatio = "0.00%";
this.closedRatio = ""; this.closedRatio = "0.00%";
this.children = new ArrayList<>(); this.children = new ArrayList<>();
this.allProjectTotal = NumConstant.ZERO;
} }
} }

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.evaluationindex.screen.ScreenProjectQuantityOrgMonthlyService;
import com.epmet.datareport.service.project.ProjectService; import com.epmet.datareport.service.project.ProjectService;
import com.epmet.dto.form.ProcessListFormDTO; 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.form.project.MassesDiscontentFormV2DTO;
import com.epmet.dto.result.project.MassesDiscontentResultV2DTO; import com.epmet.dto.result.project.MassesDiscontentResultV2DTO;
import com.epmet.project.constant.ProjectConstant; import com.epmet.project.constant.ProjectConstant;

64
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java

@ -29,6 +29,7 @@ import com.epmet.project.dto.result.ProjectCategoryResultDTO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -195,20 +196,13 @@ public class ScreenProjectController {
* @date 2021/11/4 3:38 下午 * @date 2021/11/4 3:38 下午
*/ */
@PostMapping("selectprojectcategory/export") @PostMapping("selectprojectcategory/export")
public void selectProjectCategoryExport(@RequestBody ProjectCategoryFormDTO formDTO, /*@LoginUser*/ TokenDto tokenDto, HttpServletResponse response) throws Exception { public void selectProjectCategoryExport(@RequestBody ProjectCategoryFormDTO formDTO, @LoginUser TokenDto tokenDto, HttpServletResponse response) throws Exception {
tokenDto.setUserId("36bc0fb38565ecdebf8ab9b476b44548"); //tokenDto.setUserId("36bc0fb38565ecdebf8ab9b476b44548");
tokenDto.setCustomerId("45687aa479955f9d06204d415238f7cc"); //tokenDto.setCustomerId("45687aa479955f9d06204d415238f7cc");
ValidatorUtils.validateEntity(formDTO, ProjectCategoryFormDTO.ProjectCategoryForm.class); ValidatorUtils.validateEntity(formDTO, ProjectCategoryFormDTO.CategoryProjectExportForm.class);
List<ProjectCategoryResultDTO> data = screenProjectService.selectProjectCategory(formDTO, tokenDto); List<ProjectCategoryResultDTO> data = screenProjectService.selectProjectCategory(formDTO, tokenDto);
String templatePath = "excel/project_category_temp.xlsx"; String templatePath = "excel/project_category_temp.xlsx";
StringBuilder dateBuilder = new StringBuilder();
if (StringUtils.isNotBlank(formDTO.getStartTime())){
dateBuilder.append(formDTO.getStartTime()).append(StrConstant.HYPHEN);
}
if (StringUtils.isNotBlank(formDTO.getEndTime())){
dateBuilder.append(formDTO.getEndTime());
}
List<ProjectCategoryResultDTO> resultDTOList = new ArrayList<>(); List<ProjectCategoryResultDTO> resultDTOList = new ArrayList<>();
data.forEach(e->{ data.forEach(e->{
resultDTOList.add(e); resultDTOList.add(e);
@ -219,7 +213,7 @@ public class ScreenProjectController {
Map<String,Object> mapData = new HashMap<>(); Map<String,Object> mapData = new HashMap<>();
mapData.put("list",resultDTOList); mapData.put("list",resultDTOList);
mapData.put("orgName",staffInfo.getAgencyName()); mapData.put("orgName",staffInfo.getAgencyName());
mapData.put("exportDate",dateBuilder.toString()); mapData.put("exportDate",getExportDateStr(formDTO.getStartTime(),formDTO.getEndTime()));
Workbook workbook = ExcelExportUtil.exportExcel(new TemplateExportParams(templatePath), mapData); Workbook workbook = ExcelExportUtil.exportExcel(new TemplateExportParams(templatePath), mapData);
response.setHeader("content-Type", "application/vnd.ms-excel"); response.setHeader("content-Type", "application/vnd.ms-excel");
response.addHeader("Content-Disposition", "attachment;fileName=" + URLEncoder.encode("项目分类统计.xls", "UTF-8")); response.addHeader("Content-Disposition", "attachment;fileName=" + URLEncoder.encode("项目分类统计.xls", "UTF-8"));
@ -239,4 +233,50 @@ public class ScreenProjectController {
return new Result<PageCategoryProjectListResultDTO>().ok(screenProjectService.selectCategoryProjectList(formDTO,tokenDto)); return new Result<PageCategoryProjectListResultDTO>().ok(screenProjectService.selectCategoryProjectList(formDTO,tokenDto));
} }
/**
* @Description 项目分类查询项目分类
* @param formDTO
* @param tokenDto
* @author zxc
* @date 2021/11/4 3:38 下午
*/
@PostMapping("selectcategoryprojectlist/export")
public void selectProjectCategoryExport(@RequestBody CategoryProjectListFormDTO formDTO,@LoginUser TokenDto tokenDto, HttpServletResponse response) throws Exception {
//tokenDto.setUserId("36bc0fb38565ecdebf8ab9b476b44548");
//tokenDto.setCustomerId("45687aa479955f9d06204d415238f7cc");
formDTO.setIsPage(false);
//formDTO.setStatus("all");
//formDTO.setCategoryCode("0102");
ValidatorUtils.validateEntity(formDTO, ProjectCategoryFormDTO.CategoryProjectExportForm.class);
PageCategoryProjectListResultDTO data = screenProjectService.selectCategoryProjectList(formDTO,tokenDto);
String templatePath = "excel/project_temp.xlsx";
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
Map<String,Object> mapData = new HashMap<>();
mapData.put("list",data.getList());
mapData.put("orgName",staffInfo.getAgencyName());
mapData.put("exportDate",getExportDateStr(formDTO.getStartTime(),formDTO.getEndTime()));
mapData.put("categoryName", formDTO.getCategoryName());
if (StringUtils.isNotBlank(formDTO.getParentCategoryName())){
mapData.put("categoryName", formDTO.getParentCategoryName().concat(StrConstant.HYPHEN).concat(formDTO.getCategoryName()));
}
Workbook workbook = ExcelExportUtil.exportExcel(new TemplateExportParams(templatePath), mapData);
response.setHeader("content-Type", "application/vnd.ms-excel");
response.addHeader("Content-Disposition", "attachment;fileName=" + URLEncoder.encode("项目统计.xls", "UTF-8"));
workbook.write(response.getOutputStream());
}
@NotNull
private String getExportDateStr(String startTime,String endTime) {
StringBuilder dateBuilder = new StringBuilder();
if (StringUtils.isNotBlank(startTime)) {
dateBuilder.append(startTime).append(StrConstant.HYPHEN);
}
if (StringUtils.isNotBlank(endTime)) {
dateBuilder.append(endTime);
}
return dateBuilder.toString();
}
} }

1
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java

@ -20,6 +20,7 @@ package com.epmet.datareport.dao.evaluationindex.screen;
import com.epmet.dto.ScreenCustomerAgencyCommonDTO; import com.epmet.dto.ScreenCustomerAgencyCommonDTO;
import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.result.ParentListResultDTO; import com.epmet.dto.result.ParentListResultDTO;
import com.epmet.dto.ScreenCustomerAgencyCommonDTO;
import com.epmet.dto.result.ScreenCustomerAgencyDTO; import com.epmet.dto.result.ScreenCustomerAgencyDTO;
import com.epmet.dto.result.plugins.AgencyNodeDTO; import com.epmet.dto.result.plugins.AgencyNodeDTO;
import com.epmet.dto.result.plugins.DeptNodeDTO; import com.epmet.dto.result.plugins.DeptNodeDTO;

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

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

@ -284,6 +284,7 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
endCategoryList.forEach(e -> { endCategoryList.forEach(e -> {
e.setTotalRatio(ratio(e.getProjectTotal(), finalTotal)); e.setTotalRatio(ratio(e.getProjectTotal(), finalTotal));
e.setClosedRatio(ratio(e.getClosedProjectTotal(),e.getProjectTotal())); e.setClosedRatio(ratio(e.getClosedProjectTotal(),e.getProjectTotal()));
e.setAllProjectTotal(finalTotal);
}); });
}else { }else {
Integer endTotal = screenProjectOrgDailyDao.selectProjectTotalByAgency(customerId, endTime, orgId); Integer endTotal = screenProjectOrgDailyDao.selectProjectTotalByAgency(customerId, endTime, orgId);
@ -302,15 +303,21 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
endCategoryList.forEach(e -> { endCategoryList.forEach(e -> {
e.setTotalRatio(ratio(e.getProjectTotal(), finalTotal)); e.setTotalRatio(ratio(e.getProjectTotal(), finalTotal));
e.setClosedRatio(ratio(e.getClosedProjectTotal(),e.getProjectTotal())); e.setClosedRatio(ratio(e.getClosedProjectTotal(),e.getProjectTotal()));
e.setAllProjectTotal(finalTotal);
}); });
} }
List<ProjectCategoryResultDTO> finalEndCategoryList = endCategoryList; List<ProjectCategoryResultDTO> finalEndCategoryList = endCategoryList;
result.forEach(r -> { result.forEach(r -> {
finalEndCategoryList.stream().filter(e -> r.getCategoryCode().equals(e.getCategoryCode())).forEach(e -> { finalEndCategoryList.stream().filter(e -> r.getCategoryCode().equals(e.getCategoryCode())).forEach(e -> {
r.setTotalRatio(e.getTotalRatio());r.setClosedRatio(e.getClosedRatio()); r.setTotalRatio(e.getTotalRatio());r.setClosedRatio(e.getClosedRatio());
r.setProjectTotal(e.getProjectTotal());
r.setClosedProjectTotal(e.getClosedProjectTotal());
r.setAllProjectTotal(e.getAllProjectTotal());
}); });
r.getChildren().forEach(son -> finalEndCategoryList.stream().filter(e -> son.getCategoryCode().equals(e.getCategoryCode())).forEach(e -> { r.getChildren().forEach(son -> finalEndCategoryList.stream().filter(e -> son.getCategoryCode().equals(e.getCategoryCode())).forEach(e -> {
son.setTotalRatio(e.getTotalRatio());son.setClosedRatio(e.getClosedRatio()); son.setTotalRatio(e.getTotalRatio());son.setClosedRatio(e.getClosedRatio());
son.setProjectTotal(e.getProjectTotal());son.setClosedProjectTotal(e.getClosedProjectTotal());
son.setAllProjectTotal(e.getAllProjectTotal());
})); }));
}); });
// 排序 // 排序
@ -343,10 +350,10 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
if (denominator == NumConstant.ZERO){ if (denominator == NumConstant.ZERO){
return "0.00%"; return "0.00%";
} }
BigDecimal bigDecimalMolecule = new BigDecimal(molecule); BigDecimal bigDecimalMolecule = new BigDecimal(molecule * NumConstant.ONE_HUNDRED);
BigDecimal bigDecimalDenominator = new BigDecimal(denominator); BigDecimal bigDecimalDenominator = new BigDecimal(denominator);
BigDecimal divide = bigDecimalMolecule.divide(bigDecimalDenominator, NumConstant.TWO, BigDecimal.ROUND_HALF_UP); BigDecimal divide = bigDecimalMolecule.divide(bigDecimalDenominator, NumConstant.TWO, BigDecimal.ROUND_HALF_UP);
return divide.multiply(NumConstant.ONE_HUNDRED_DECIMAL)+"%"; return divide+"%";
} }
/** /**

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

BIN
epmet-module/data-report/data-report-server/src/main/resources/excel/project_category_temp.xlsx

Binary file not shown.

BIN
epmet-module/data-report/data-report-server/src/main/resources/excel/project_temp.xlsx

Binary file not shown.

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.RESOLVED_RATIO,0) AS RESOLVED_RATIO,
IFNULL(rankData.GOVERN_RATIO,0) AS GOVERN_RATIO, IFNULL(rankData.GOVERN_RATIO,0) AS GOVERN_RATIO,
IFNULL(rankData.SATISFACTION_RATIO,0) AS SATISFACTION_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 FROM screen_customer_agency agency
left join screen_customer_agency pa left join screen_customer_agency pa
on(agency.PARENT_AREA_CODE=pa.AREA_CODE on(agency.PARENT_AREA_CODE=pa.AREA_CODE
@ -61,7 +62,8 @@
IFNULL(rankData.RESOLVED_RATIO,0) AS RESOLVED_RATIO, IFNULL(rankData.RESOLVED_RATIO,0) AS RESOLVED_RATIO,
IFNULL(rankData.GOVERN_RATIO,0) AS GOVERN_RATIO, IFNULL(rankData.GOVERN_RATIO,0) AS GOVERN_RATIO,
IFNULL(rankData.SATISFACTION_RATIO,0) AS SATISFACTION_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 FROM screen_customer_grid grid
left join screen_customer_agency ca left join screen_customer_agency ca
on (ca.agency_id = grid.parent_agency_id) 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.CLOSE_PROJECT_RATIO AS closedProjectRatio,
rankData.SATISFACTION_RATIO AS satisfactionRatio, rankData.SATISFACTION_RATIO AS satisfactionRatio,
agency.AGENCY_NAME AS parentAgencyName, agency.AGENCY_NAME AS parentAgencyName,
rankData.ORG_ID as orgId rankData.ORG_ID as orgId,
rankData.MONTH_ID
FROM FROM
screen_org_rank_data rankData screen_org_rank_data rankData
LEFT JOIN screen_customer_agency agency LEFT JOIN screen_customer_agency agency
@ -39,7 +40,8 @@
rankData.CLOSE_PROJECT_RATIO AS closedProjectRatio, rankData.CLOSE_PROJECT_RATIO AS closedProjectRatio,
rankData.SATISFACTION_RATIO AS satisfactionRatio, rankData.SATISFACTION_RATIO AS satisfactionRatio,
agency.AGENCY_NAME AS parentAgencyName, agency.AGENCY_NAME AS parentAgencyName,
rankData.ORG_ID as orgId rankData.ORG_ID as orgId,
rankData.MONTH_ID
FROM FROM
screen_org_rank_data rankData screen_org_rank_data rankData
left join screen_customer_grid scg on( left join screen_customer_grid scg on(

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

@ -103,7 +103,8 @@
SELECT SELECT
m.USER_ID, m.USER_ID,
concat( m.surname, CASE char_length( m.NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name, 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 FROM
screen_party_user_rank_data m screen_party_user_rank_data m
left join screen_customer_grid scg 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, publish_issue_total AS publishIssueTotal,
IFNULL(publish_issue_ratio,0) AS publishIssueRatioA, IFNULL(publish_issue_ratio,0) AS publishIssueRatioA,
PLAT_ISSUE_TOTAL AS platIssueTotal, 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 FROM
screen_pioneer_data screen_pioneer_data
WHERE WHERE
@ -44,7 +45,8 @@
CEILING(sum(data.publish_issue_total)) AS publishIssueTotal, CEILING(sum(data.publish_issue_total)) AS publishIssueTotal,
IFNULL(avg(data.publish_issue_ratio),0) AS publishIssueRatioA, IFNULL(avg(data.publish_issue_ratio),0) AS publishIssueRatioA,
CEILING(sum(data.PLAT_ISSUE_TOTAL)) AS platIssueTotal, 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 FROM
screen_pioneer_data data screen_pioneer_data data
LEFT JOIN LEFT JOIN

7
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectCategoryOrgDailyDao.xml

@ -94,9 +94,12 @@
<resultMap id="selectCategoryByCustomerIdMap" type="com.epmet.project.dto.result.ProjectCategoryResultDTO"> <resultMap id="selectCategoryByCustomerIdMap" type="com.epmet.project.dto.result.ProjectCategoryResultDTO">
<result column="c" property="categoryCode"/> <result column="c" property="categoryCode"/>
<result column="n" property="categoryName"/> <result column="n" property="categoryName"/>
<result column="pc1" property="parentCategoryCode"/>
<collection property="children" ofType="com.epmet.project.dto.result.ProjectCategoryResultDTO"> <collection property="children" ofType="com.epmet.project.dto.result.ProjectCategoryResultDTO">
<result column="c2" property="categoryCode"/> <result column="c2" property="categoryCode"/>
<result column="n2" property="categoryName"/> <result column="n2" property="categoryName"/>
<result column="pc2" property="parentCategoryCode"/>
<result column="n" property="parentCategoryName"/>
</collection> </collection>
</resultMap> </resultMap>
<select id="selectCategoryByCustomerId" resultMap="selectCategoryByCustomerIdMap"> <select id="selectCategoryByCustomerId" resultMap="selectCategoryByCustomerIdMap">
@ -104,7 +107,9 @@
p1.CATEGORY_CODE AS c, p1.CATEGORY_CODE AS c,
p2.CATEGORY_CODE AS c2, p2.CATEGORY_CODE AS c2,
p1.CATEGORY_NAME AS n, p1.CATEGORY_NAME AS n,
p2.CATEGORY_NAME AS n2 p2.CATEGORY_NAME AS n2,
p1.PARENT_CATEGORY_CODE AS pc1,
p2.PARENT_CATEGORY_CODE AS pc2
FROM customer_project_category_dict p1,customer_project_category_dict p2 FROM customer_project_category_dict p1,customer_project_category_dict p2
WHERE p1.DEL_FLAG = '0' WHERE p1.DEL_FLAG = '0'
AND p2.DEL_FLAG = '0' AND p2.DEL_FLAG = '0'

5
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml

@ -168,7 +168,10 @@
DATE_FORMAT(PROJECT_CREATE_TIME,'%Y-%m-%d %h:%i:%s') AS createTime, DATE_FORMAT(PROJECT_CREATE_TIME,'%Y-%m-%d %h:%i:%s') AS createTime,
ORG_ID, ORG_ID,
ORG_TYPE, ORG_TYPE,
PROJECT_ID PROJECT_ID,
LINK_NAME,
LINK_MOBILE,
PROJECT_ADDRESS
FROM screen_project_data FROM screen_project_data
WHERE DEL_FLAG = '0' WHERE DEL_FLAG = '0'
<if test=' status == "closed" '> <if test=' status == "closed" '>

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

@ -38,7 +38,8 @@
group_total AS groupNum, group_total AS groupNum,
topic_total AS topicNum, topic_total AS topicNum,
issue_total AS issueNum, issue_total AS issueNum,
project_total AS projectNum project_total AS projectNum,
DATA_END_TIME as dataEndTime
FROM FROM
screen_user_total_data screen_user_total_data
WHERE 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 id="selectProjectProfile" resultType="com.epmet.evaluationindex.screen.dto.result.ProjectProfileResultDTO">
SELECT ORG_ID, SELECT ORG_ID,
PROJECT_TOTAL, PROJECT_TOTAL,
LEVEL LEVEL,
DATA_END_TIME as dataEndTime
FROM screen_an_community_project_profile FROM screen_an_community_project_profile
WHERE DEL_FLAG = 0 WHERE DEL_FLAG = 0
AND CUSTOMER_ID = #{customerId} 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, CLOSED_PROJECT_TOTAL,
CONCAT( 0 + cast( TRUNCATE ( PROJECT_RESPONSE_RATIO, 1 ) AS CHAR ), '%' ) AS "projectResponseRatio", 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 ( 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 FROM screen_an_grass_roots_govern_monthly
WHERE DEL_FLAG = 0 WHERE DEL_FLAG = 0
AND ORG_ID = #{agencyId} AND ORG_ID = #{agencyId}
@ -55,7 +56,8 @@
CLOSED_PROJECT_TOTAL, CLOSED_PROJECT_TOTAL,
CONCAT( 0 + cast( TRUNCATE ( PROJECT_RESPONSE_RATIO, 1 ) AS CHAR ), '%' ) AS "projectResponseRatio", 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 ( 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 FROM screen_an_grass_roots_govern_monthly
WHERE DEL_FLAG = 0 WHERE DEL_FLAG = 0
AND PID = #{agencyId} 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 id="selectGrassRootsOrg" resultType="com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgResultDTO">
SELECT GROUP_TOTAL, SELECT GROUP_TOTAL,
ISSUE_TOTAL, ISSUE_TOTAL,
PROJECT_TOTAL PROJECT_TOTAL,
MONTH_ID
FROM screen_an_grass_roots_org_monthly FROM screen_an_grass_roots_org_monthly
WHERE DEL_FLAG = 0 WHERE DEL_FLAG = 0
AND ORG_ID = #{agencyId} AND ORG_ID = #{agencyId}
@ -47,7 +48,8 @@
SELECT ORG_NAME, SELECT ORG_NAME,
GROUP_TOTAL, GROUP_TOTAL,
ISSUE_TOTAL, ISSUE_TOTAL,
PROJECT_TOTAL PROJECT_TOTAL,
MONTH_ID
FROM screen_an_grass_roots_org_monthly FROM screen_an_grass_roots_org_monthly
WHERE DEL_FLAG = 0 WHERE DEL_FLAG = 0
AND PID = #{agencyId} 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, SELECT GROUP_MEMBER_TOTAL,
TOPIC_TOTAL, TOPIC_TOTAL,
TOPIC_PARTI_USER_TOTAL, TOPIC_PARTI_USER_TOTAL,
ISSUE_TOTAL ISSUE_TOTAL,
MONTH_ID
FROM screen_an_grass_roots_pm_total_monthly FROM screen_an_grass_roots_pm_total_monthly
WHERE DEL_FLAG = '0' WHERE DEL_FLAG = '0'
AND ORG_ID = #{agencyId} AND ORG_ID = #{agencyId}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java

@ -39,7 +39,6 @@ public class ScreenCustomerGridEntity extends BaseEpmetEntity {
* 客户id * 客户id
*/ */
private String customerId; private String customerId;
private String code;
/** /**
* 网格id * 网格id
@ -93,4 +92,9 @@ public class ScreenCustomerGridEntity extends BaseEpmetEntity {
* desc: 是否参与上级计算yes:参与;no:不参与 add 01.14 * desc: 是否参与上级计算yes:参与;no:不参与 add 01.14
*/ */
private String upToCal; private String upToCal;
/**
* 地区码
*/
private String code;
} }

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/healthcheck/HealthCheckController.java

@ -1,12 +1,18 @@
package com.epmet.healthcheck; package com.epmet.healthcheck;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
@RestController @RestController
@RequestMapping("healthcheck") @RequestMapping("healthcheck")
@Slf4j
public class HealthCheckController { public class HealthCheckController {
/** /**
@ -15,7 +21,14 @@ public class HealthCheckController {
*/ */
@PostMapping("http") @PostMapping("http")
public Result httpHealthCheck() { public Result httpHealthCheck() {
return new Result(); InetAddress serverIp = null;
try {
serverIp = Inet4Address.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
}
log.info("健康检查:serverName:{}", serverIp);
return new Result().ok(serverIp);
} }
} }

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); imgMap.values().forEach(imgList::addAll);
//立案后会有 一个process 如果没有则说明是垃圾数据 如果有其他方式立项的项目则需要考虑下兼容 //立案后会有 一个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())); difficulties.removeIf( diff -> StringUtils.isBlank(diff.getLatestOperateDesc()));
imgList.forEach(item -> { imgList.forEach(item -> {
item.setCustomerId(param.getCustomerId()); item.setCustomerId(param.getCustomerId());

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

@ -146,6 +146,13 @@ public class ScreenCustomerAgencyServiceImpl extends BaseServiceImpl<ScreenCusto
exists.setParentAreaCode(e.getParentAreaCode()); exists.setParentAreaCode(e.getParentAreaCode());
exists.setCode(e.getCode()); exists.setCode(e.getCode());
updateAgency(exists); 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; 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.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
@ -90,6 +91,13 @@ public class ScreenCustomerDeptServiceImpl extends BaseServiceImpl<ScreenCustome
e.setCustomerId(dept.getCustomerId()); e.setCustomerId(dept.getCustomerId());
e.setAreaCode(dept.getAreaCode()); e.setAreaCode(dept.getAreaCode());
screenCustomerDeptDao.updateById(e); 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; 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.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.dynamic.datasource.annotation.DataSource;

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

@ -195,7 +195,7 @@ public class ScreenProjectOrgDailyServiceImpl extends BaseServiceImpl<ScreenProj
agencyInfos.forEach(a -> { agencyInfos.forEach(a -> {
a.setDateId(dateId); a.setDateId(dateId);
projectOrgDaily.forEach(p -> { projectOrgDaily.forEach(p -> {
if (a.getAreaCode().equals(p.getAreaCode())){ if (a.getOrgId().equals(p.getOrgId())){
a.setBadTotal(p.getBadTotal() + a.getBadTotal()); a.setBadTotal(p.getBadTotal() + a.getBadTotal());
a.setEvaluateTotal(p.getEvaluateTotal() + a.getEvaluateTotal()); a.setEvaluateTotal(p.getEvaluateTotal() + a.getEvaluateTotal());
a.setGoodTotal(p.getGoodTotal() + a.getGoodTotal()); a.setGoodTotal(p.getGoodTotal() + a.getGoodTotal());

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.setGridName(updatedGrid.getGridName());
dimGrid.setUpdatedTime(now); dimGrid.setUpdatedTime(now);
dimGrid.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); dimGrid.setUpdatedBy(RobotConstant.DIMENSION_ROBOT);
dimGrid.setDelFlag(updatedGrid.getDelFlag());
dimGrid.setAgencyId(updatedGrid.getPid());
dimGrid.setAreaCode(updatedGrid.getAreaCode());
dimGrid.setCustomerId(updatedGrid.getCustomerId());
dimGrid.setCode(updatedGrid.getCode()); dimGrid.setCode(updatedGrid.getCode());
dimGrids.add(dimGrid); dimGrids.add(dimGrid);
} }

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

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

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

@ -69,31 +69,6 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService {
return customerAgencyDao.getRootAgencyInfo(customerId); 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 @Override
public List<CustomerAgencyEntity> queryAgencyListByCustomerId(String customerId) { public List<CustomerAgencyEntity> queryAgencyListByCustomerId(String customerId) {
return customerAgencyDao.queryAgencyListByCustomerId(customerId); return customerAgencyDao.queryAgencyListByCustomerId(customerId);
@ -121,6 +96,31 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService {
return customerAgencyDao.selectByDeptId(deptId); 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 * 将孔村榆山锦水3个街道的组织插入到gov-org库的customer_agency
* *
@ -245,7 +245,7 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService {
* @param parentCustomerEntity 在平阴客户里网格所属组织信息 * @param parentCustomerEntity 在平阴客户里网格所属组织信息
* @author yinzuomei * @author yinzuomei
* @description 将3个街道的网格插入到gov-org.customer_grid库 * @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) { private void insertCustomerGrid(String customerId, String agencyId, CustomerAgencyEntity parentCustomerEntity) {
List<ScreenCustomerGridEntity> gridEntityList = screenCustomerGridService.selectEntityByAgencyId(customerId, agencyId); 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

@ -86,7 +86,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
*/ */
@Override @Override
public List<CustomerStaffGridDTO> getCustomerStaffGridList(String customerId) { 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,10 +139,19 @@ public class DimAgencyServiceImpl extends BaseServiceImpl<DimAgencyDao, DimAgenc
if (existsDimAgency != null) { if (existsDimAgency != null) {
//说明是已存在的,不是新增的 //说明是已存在的,不是新增的
existsDimAgency.setAgencyName(agency.getOrganizationName()); 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.setUpdatedTime(initTime);
existsDimAgency.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); existsDimAgency.setUpdatedBy(RobotConstant.DIMENSION_ROBOT);
existsDimAgency.setCode(agency.getCode()); existsDimAgency.setCode(agency.getCode());
baseDao.updateById(existsDimAgency); 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.setUpdatedTime(initTime);
existsCustomerDim.setAreaCode(updatedCustomer.getAreaCode()); existsCustomerDim.setAreaCode(updatedCustomer.getAreaCode());
baseDao.updateById(existsCustomerDim); 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()); DimDepartmentEntity dimDepartment = baseDao.selectById(updatedDepartment.getId());
if (dimDepartment != null) { if (dimDepartment != null) {
dimDepartment.setDepartmentName(updatedDepartment.getDepartmentName()); dimDepartment.setDepartmentName(updatedDepartment.getDepartmentName());
dimDepartment.setAgencyId(updatedDepartment.getAgencyId());
dimDepartment.setCustomerId(updatedDepartment.getCustomerId());
dimDepartment.setUpdatedBy(RobotConstant.DIMENSION_ROBOT); dimDepartment.setUpdatedBy(RobotConstant.DIMENSION_ROBOT);
dimDepartment.setUpdatedTime(initTime); dimDepartment.setUpdatedTime(initTime);
baseDao.updateById(dimDepartment); 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) { for (DimGridEntity updatedGridDim : changedGrids) {
baseDao.updateById(updatedGridDim); baseDao.updateById(updatedGridDim);
if ("1".equals(updatedGridDim.getDelFlag())) {
// 如果已经被删除了,那么这里也做删除操作
baseDao.deleteById(updatedGridDim.getId());
}
} }
lastExecRecordDao.updateExecTimeBySubject(new Date(), StatsSubject.DIM_GRID); 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; select 1;

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

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

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectCategoryOrgDailyDao.xml

@ -208,7 +208,7 @@
AND (cd.EPMET_CATEGORY_CODE IS NULL OR cd.EPMET_CATEGORY_CODE = '') AND (cd.EPMET_CATEGORY_CODE IS NULL OR cd.EPMET_CATEGORY_CODE = '')
</if> </if>
AND cd.EPMET_CATEGORY_CODE != '' AND cd.EPMET_CATEGORY_CODE != ''
AND pd.PROJECT_STATUS_CODE = 'closed' AND pd.PROJECT_STATUS_CODE IN ('closed','closed_case')
AND pd.ALL_PARENT_IDS LIKE CONCAT('%',(SELECT AGENCY_ID FROM screen_customer_agency WHERE DEL_FLAG = 0 AND CUSTOMER_ID = #{customerId} AND PID = '0'),'%') AND pd.ALL_PARENT_IDS LIKE CONCAT('%',(SELECT AGENCY_ID FROM screen_customer_agency WHERE DEL_FLAG = 0 AND CUSTOMER_ID = #{customerId} AND PID = '0'),'%')
AND DATE_FORMAT(pd.project_create_time,'%Y%m%d') <![CDATA[ <= ]]> #{dateId} AND DATE_FORMAT(pd.project_create_time,'%Y%m%d') <![CDATA[ <= ]]> #{dateId}
GROUP BY categoryCode GROUP BY categoryCode

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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.0</version> <version>0.3.1</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>epmet-activiti</artifactId> <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.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result; 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.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; 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 Navicat Premium Data Transfer
Source Server : 192.168.1.130 Source Server : 192.168.1.140
Source Server Type : MySQL Source Server Type : MySQL
Source Server Version : 50728 Source Server Version : 50728
Source Host : 118.190.150.119:47306 Source Host : 118.190.150.119:47306

59
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/config/JobFeignConfig.java

@ -0,0 +1,59 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.config;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.feign.EpmetBaseRequestInterceptor;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Feign调用携带header
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Configuration
public class JobFeignConfig {
@Bean
RequestInterceptor requestInterceptor() {
return new JobRequestInterceptor();
}
class JobRequestInterceptor extends EpmetBaseRequestInterceptor {
@Override
public void apply(RequestTemplate template) {
super.apply(template);
// job服务自己生成流水号
template.header(AppClientConstant.TRANSACTION_SERIAL_KEY, generateTransactionSerial());
}
/**
* 获取事务流水号
*
* @return
*/
public String generateTransactionSerial() {
String[] letterPool = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"
, "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 2; i++) {
sb.append(letterPool[(int) (Math.random() * 25)]);
}
sb.append(System.currentTimeMillis());
return sb.toString();
}
}
}

1
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/config/ScheduleConfig.java

@ -46,6 +46,7 @@ public class ScheduleConfig {
prop.put("org.quartz.jobStore.misfireThreshold", "12000"); prop.put("org.quartz.jobStore.misfireThreshold", "12000");
prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?"); prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
prop.put("org.quartz.jobStore.acquireTriggersWithinLock", "true");
//PostgreSQL数据库,需要打开此注释 //PostgreSQL数据库,需要打开此注释
//prop.put("org.quartz.jobStore.driverDelegateClass", "org.quartz.impl.jdbcjobstore.PostgreSQLDelegate"); //prop.put("org.quartz.jobStore.driverDelegateClass", "org.quartz.impl.jdbcjobstore.PostgreSQLDelegate");

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

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

12
epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/OssFeignClient.java

@ -11,7 +11,6 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.feign.fallback.OssFeignClientFallback;
import com.epmet.feign.fallback.OssFeignClientFallbackFactory; import com.epmet.feign.fallback.OssFeignClientFallbackFactory;
import feign.codec.Encoder; import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder; import feign.form.spring.SpringFormEncoder;
@ -32,7 +31,7 @@ import org.springframework.web.multipart.MultipartFile;
@FeignClient(name = ServiceConstant.EPMET_OSS_SERVER, configuration = OssFeignClient.MultipartSupportConfig.class, fallbackFactory = @FeignClient(name = ServiceConstant.EPMET_OSS_SERVER, configuration = OssFeignClient.MultipartSupportConfig.class, fallbackFactory =
OssFeignClientFallbackFactory.class) OssFeignClientFallbackFactory.class)
//@FeignClient(name = ServiceConstant.EPMET_OSS_SERVER, configuration = OssFeignClient.MultipartSupportConfig.class, fallbackFactory = //@FeignClient(name = ServiceConstant.EPMET_OSS_SERVER, configuration = OssFeignClient.MultipartSupportConfig.class, fallbackFactory =
// OssFeignClientFallbackFactory.class) // OssFeignClientFallbackFactory.class, url = "localhost:8083")
public interface OssFeignClient { public interface OssFeignClient {
/** /**
* 文件上传 * 文件上传
@ -64,4 +63,13 @@ public interface OssFeignClient {
} }
} }
/**
* @Description ribbon测试
* @return
* @author wxz
* @date 2021.08.05 16:28
*/
@PostMapping("/oss/test/test-ribbon-rcv/{sleep}")
Result testRibbonRcv(@RequestParam("sleep") Long sleep);
} }

7
epmet-module/epmet-oss/epmet-oss-client/src/main/java/com/epmet/feign/fallback/OssFeignClientFallback.java

@ -13,7 +13,7 @@ import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.UploadImgResultDTO; import com.epmet.dto.result.UploadImgResultDTO;
import com.epmet.feign.OssFeignClient; import com.epmet.feign.OssFeignClient;
import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
/** /**
@ -40,4 +40,9 @@ public class OssFeignClientFallback implements OssFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPMET_OSS_SERVER, "uploadQrCodeV2", file, customerId); return ModuleUtils.feignConError(ServiceConstant.EPMET_OSS_SERVER, "uploadQrCodeV2", file, customerId);
} }
@Override
public Result testRibbonRcv(@PathVariable Long sleep) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_OSS_SERVER, "testRibbonRcv", sleep);
}
} }

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

@ -0,0 +1,68 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
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.*;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
@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();
}
/**
* @Description ribbon测试
* @return
* @author wxz
* @date 2021.08.05 16:28
*/
@PostMapping("test-ribbon-rcv/{sleep}")
public Result testRibbonRcv(@PathVariable("sleep") Long sleep) {
InetAddress localHost = null;
try {
Thread.sleep(sleep);
localHost = Inet4Address.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
return new Result().ok(localHost);
}
}

4
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java

@ -18,13 +18,13 @@ public class GroupPointFormDTO implements Serializable {
public interface GroupPoint extends CustomerClientShowGroup {} public interface GroupPoint extends CustomerClientShowGroup {}
public interface GridRank extends CustomerClientShowGroup {} public interface GridRank extends CustomerClientShowGroup {}
public interface PointRank extends CustomerClientShowGroup {}
public interface GridScopeRank {} public interface GridScopeRank {}
public interface CustomerScopeRank {} public interface CustomerScopeRank {}
public interface MyGroupRank {} public interface MyGroupRank {}
public interface PointRank extends CustomerClientShowGroup {}
@NotBlank(message = "小组Id不能为空", groups = {GroupPoint.class, GridRank.class}) @NotBlank(message = "小组Id不能为空", groups = {GroupPoint.class, GridRank.class})
private String groupId; private String groupId;
@NotBlank(message = "网格Id不能为空", groups = {GridRank.class, PointRank.class, GridScopeRank.class, MyGroupRank.class}) @NotBlank(message = "网格Id不能为空", groups = {GridRank.class, GridScopeRank.class, MyGroupRank.class, PointRank.class})
private String gridId; private String gridId;
@NotBlank(message = "客户Id不能为空", groups = {CustomerScopeRank.class}) @NotBlank(message = "客户Id不能为空", groups = {CustomerScopeRank.class})
private String customerId; private String customerId;

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

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.0.42</version> <version>0.0.44</version>
<parent> <parent>
<artifactId>epmet-point</artifactId> <artifactId>epmet-point</artifactId>
<groupId>com.epmet</groupId> <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 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_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 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='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'; 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='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='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='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'; 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='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='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='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'; update point_rule set sort='2002',LINK_PAGE='heart' where EVENT_CODE='active_insert_live' and DEL_FLAG='0';

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; private ThirdPlatformService thirdPlatformService;
/** /**
* 根据客户id和动作列出客户登记可用的第三方平台 * 根据客户id和动作列出客户在指定动作下可用的第三方平台
* 用途工作端运营端配置界面 * 用途工作端运营端配置界面
* *
* @param input * @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 列表 * 客户id 列表
* 列表为空则所有客户都不配置这个菜单了
*/ */
@NotBlank(message = "客户id 列表不能为空")
private List<String> customerIds; 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 @Override
public void saveCustomerMenu(MenuConfigFormDTO formDTO) { public void saveCustomerMenu(MenuConfigFormDTO formDTO) {
baseDao.deleteBatchTableIds(formDTO.getTableId());
if (NumConstant.ZERO < formDTO.getCustomerIds().size()) { if (NumConstant.ZERO < formDTO.getCustomerIds().size()) {
baseDao.deleteBatchTableIds(formDTO.getTableId());
List<GovCustomerMenuEntity> entities = new ArrayList<>(); List<GovCustomerMenuEntity> entities = new ArrayList<>();
for (String customerId : formDTO.getCustomerIds()) { for (String customerId : formDTO.getCustomerIds()) {
GovCustomerMenuEntity entity = new GovCustomerMenuEntity(); 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.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result; 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.*;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; 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.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result; 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.*;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;

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

@ -102,6 +102,7 @@ public class IssueProjectTagDictRedis {
//查询客户的“其他"分类的Id //查询客户的“其他"分类的Id
IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null); IssueProjectCategoryDictEntity otherCategory = categoryDictDao.selectSingleByCustomerIdAndCategoryNameAndCategoryType(customerId, ModuleConstants.CATEGORY_NAME_OTHERS, null);
//是否传入的类别Id中只包含"其他"分类,因为自定义分类和默认分类排序规则不一样
//判断入参是否是只有一个分类Id并且是"其他"的Id //判断入参是否是只有一个分类Id并且是"其他"的Id
boolean ifOtherOnly = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false); boolean ifOtherOnly = null == otherCategory ? false : (!CollectionUtils.isEmpty(category) && category.size() == NumConstant.ONE && category.contains(otherCategory.getId()) ? true : false);
@ -409,6 +410,18 @@ public class IssueProjectTagDictRedis {
redisUtils.zSetAdd(key,o); 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){ public void batchIncrScore(Map<String,Map<String,List<IssueCategoryTagResultDTO>>> param){
if(CollectionUtils.isEmpty(param)) return; if(CollectionUtils.isEmpty(param)) return;
redisTemplate.executePipelined((RedisCallback) connection -> { redisTemplate.executePipelined((RedisCallback) connection -> {

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; 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@ url: @spring.datasource.druid.url@
username: @spring.datasource.druid.username@ username: @spring.datasource.druid.username@
password: @spring.datasource.druid.password@ password: @spring.datasource.druid.password@
#监控页面
stat-view-servlet:
enabled: true
#loginUsername: admin
#loginPassword: admin
allow:
web-stat-filter:
enabled: true
filters: stat,log4j2
cloud: cloud:
nacos: nacos:
discovery: discovery:

26
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -339,18 +339,6 @@ public class CustomerAgencyController {
return new Result<AgencyTreeResultDTO>().ok(customerAgencyService.getAgencyList(formDTO)); return new Result<AgencyTreeResultDTO>().ok(customerAgencyService.getAgencyList(formDTO));
} }
/**
* @Description 获取当前登陆人的 所属组织及下级组织/网格含直属网格
* @Param tokenDTO
* @Return {@link Result< AgencyTreeResultDTO >}
* @Author zhaoqifeng
* @Date 2021/9/8 15:20
*/
@PostMapping("agencygridtree")
public Result<AgencyTreeResultDTO> getOrgTreeData(@LoginUser TokenDto tokenDTO) {
return new Result<AgencyTreeResultDTO>().ok(customerAgencyService.getOrgTreeData(tokenDTO.getUserId()));
}
/** /**
* @description 通过staffId查询跟组织列表 * @description 通过staffId查询跟组织列表
* *
@ -369,4 +357,16 @@ public class CustomerAgencyController {
return new Result<List<StaffOrgsResultDTO>>().ok(orgList); return new Result<List<StaffOrgsResultDTO>>().ok(orgList);
} }
} /**
* @Description 获取当前登陆人的 所属组织及下级组织/网格含直属网格
* @Param tokenDTO
* @Return {@link Result< AgencyTreeResultDTO >}
* @Author zhaoqifeng
* @Date 2021/9/8 15:20
*/
@PostMapping("agencygridtree")
public Result<AgencyTreeResultDTO> getOrgTreeData(@LoginUser TokenDto tokenDTO) {
return new Result<AgencyTreeResultDTO>().ok(customerAgencyService.getOrgTreeData(tokenDTO.getUserId()));
}
}

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -273,4 +273,12 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @date 2021/10/25 2:30 下午 * @date 2021/10/25 2:30 下午
*/ */
List<MapSonOrgResultDTO> selectSonOrg(@Param("pid")String pid,@Param("type")String type); List<MapSonOrgResultDTO> selectSonOrg(@Param("pid")String pid,@Param("type")String type);
/**
* desc获取组织网格树 含直属网格
* @param agencyId
* @return
*/
AgencyTreeResultDTO getAgencyGridTree(String agencyId);
} }

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -255,12 +255,12 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
*/ */
AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO); AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO);
List<StaffOrgsResultDTO> getStaffOrgListByStaffId(String staffId);
/** /**
* desc:获取用户所属组织的组织及网格树 * desc:获取用户所属组织的组织及网格树
* @param staffId * @param staffId
* @return * @return
*/ */
AgencyTreeResultDTO getOrgTreeData(String staffId); AgencyTreeResultDTO getOrgTreeData(String staffId);
List<StaffOrgsResultDTO> getStaffOrgListByStaffId(String staffId);
} }

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

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

@ -37,8 +37,12 @@ import com.epmet.commons.tools.utils.IpUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.constant.*; import com.epmet.constant.*;
import com.epmet.dao.ProjectOrgRelationDao; 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.ProjectDao;
import com.epmet.dao.ProjectOrgRelationDao;
import com.epmet.dao.ProjectProcessDao; import com.epmet.dao.ProjectProcessDao;
import com.epmet.dao.ProjectStaffDao; import com.epmet.dao.ProjectStaffDao;
import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.CustomerStaffDTO;
@ -51,6 +55,7 @@ import com.epmet.entity.ProjectEntity;
import com.epmet.entity.ProjectOrgRelationEntity; import com.epmet.entity.ProjectOrgRelationEntity;
import com.epmet.entity.ProjectProcessEntity; import com.epmet.entity.ProjectProcessEntity;
import com.epmet.entity.ProjectStaffEntity; import com.epmet.entity.ProjectStaffEntity;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserFeignClient; 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@ url: @spring.datasource.druid.url@
username: @spring.datasource.druid.username@ username: @spring.datasource.druid.username@
password: @spring.datasource.druid.password@ 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
flyway: flyway:
enabled: @spring.flyway.enabled@ enabled: @spring.flyway.enabled@

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

@ -8,7 +8,6 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
/** /**
*
* @author Mark sunlightcs@gmail.com * @author Mark sunlightcs@gmail.com
* @since 1.0.0 * @since 1.0.0
*/ */
@ -18,7 +17,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
@EnableAsync @EnableAsync
@ServletComponentScan @ServletComponentScan
public class GovVoiceApplication { public class GovVoiceApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(GovVoiceApplication.class, 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" 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"> 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> <parent>
<artifactId>oper-access</artifactId> <artifactId>oper-access</artifactId>
<groupId>com.epmet</groupId> <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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.49</version> <version>0.3.70</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>oper-customize</artifactId> <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 Date updatedTime;
private List<ResiGroupMemberDTO> memberList; private List<ResiGroupMemberDTO> memberList;
} }

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

Loading…
Cancel
Save