From f65b37919af7cff2333f314d88d179251e795f4d Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 30 Sep 2021 10:29:28 +0800 Subject: [PATCH 01/25] =?UTF-8?q?=E8=BF=90=E8=90=A5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AF=BC=E5=87=BAerror=E6=96=87=E6=A1=88bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/impl/EvaluationIndexServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java index ea95c436a8..abb0f137f5 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java @@ -167,7 +167,7 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService { //1.查询组织信息 ScreenCustomerAgencyDTO dto = evaluationIndexDao.getByAgencyId(agencyId); if (dto == null) { - log.error(String.format("组织信息不存在,组织Id->%s"), agencyId); + log.error(String.format("组织信息不存在,组织Id->%s", agencyId)); return new ScreenAgencyOrGridListDTO(); } //2.根据组织级别判断查询直属组织或网格列表 From 997687e15ef2ef5ea11048313d613de2ccc561e0 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 30 Sep 2021 16:15:03 +0800 Subject: [PATCH 02/25] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index 26fed9cca7..f1b7e8f04f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -111,7 +111,7 @@ public class IssueProjectTagDictRedis { if (!CollectionUtils.isEmpty(_default)) { result.put(ModuleConstants.DEFAULT_TAG_CATEGORY_NAME, _default); } else { - log.error("there is no default tag data in database , customerId : {},category:{}", customerId, ifOtherOnly ? null : category); + log.warn("there is no default tag data in database , customerId : {},category:{}", customerId, ifOtherOnly ? null : category); } From 2d2c90353c6730fb5bdea86723056036a2e202c5 Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 8 Oct 2021 10:28:13 +0800 Subject: [PATCH 03/25] =?UTF-8?q?=E3=80=90=E5=B9=B3=E6=BB=91=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E3=80=91=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0Pom.xml=E7=9A=84=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E6=A0=87=E8=AE=B0=E8=AE=BE=E7=BD=AE=E4=B8=BAfalse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-admin/epmet-admin-server/pom.xml | 3 +++ epmet-auth/pom.xml | 3 +++ epmet-gateway/pom.xml | 4 ++++ epmet-module/data-aggregator/data-aggregator-server/pom.xml | 3 +++ epmet-module/data-report/data-report-server/pom.xml | 3 +++ epmet-module/data-statistical/data-statistical-server/pom.xml | 2 ++ epmet-module/epmet-activiti/epmet-activiti-server/pom.xml | 2 ++ .../epmet-common-service/common-service-server/pom.xml | 2 ++ epmet-module/epmet-ext/epmet-ext-server/pom.xml | 2 ++ epmet-module/epmet-heart/epmet-heart-server/pom.xml | 2 +- epmet-module/epmet-job/epmet-job-server/pom.xml | 3 +++ epmet-module/epmet-message/epmet-message-server/pom.xml | 3 +++ epmet-module/epmet-oss/epmet-oss-server/pom.xml | 2 ++ epmet-module/epmet-point/epmet-point-server/pom.xml | 2 ++ epmet-module/epmet-third/epmet-third-server/pom.xml | 2 ++ epmet-module/gov-access/gov-access-server/pom.xml | 2 ++ epmet-module/gov-grid/gov-grid-server/pom.xml | 2 ++ epmet-module/gov-issue/gov-issue-server/pom.xml | 2 ++ epmet-module/gov-mine/gov-mine-server/pom.xml | 2 ++ epmet-module/gov-org/gov-org-server/pom.xml | 2 ++ epmet-module/gov-project/gov-project-server/pom.xml | 2 ++ epmet-module/gov-voice/gov-voice-server/pom.xml | 2 ++ epmet-module/oper-access/oper-access-server/pom.xml | 2 ++ epmet-module/oper-crm/oper-crm-server/pom.xml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 ++ epmet-module/resi-group/resi-group-server/pom.xml | 4 ++++ epmet-module/resi-guide/resi-guide-server/pom.xml | 3 +++ epmet-module/resi-hall/resi-hall-server/pom.xml | 2 ++ epmet-module/resi-home/resi-home-server/pom.xml | 4 ++++ epmet-module/resi-mine/resi-mine-server/pom.xml | 4 ++++ epmet-module/resi-partymember/resi-partymember-server/pom.xml | 3 +++ epmet-module/resi-voice/resi-voice-server/pom.xml | 3 +++ epmet-openapi/epmet-openapi-scan/pom.xml | 3 +++ epmet-user/epmet-user-server/pom.xml | 3 +++ 34 files changed, 85 insertions(+), 2 deletions(-) diff --git a/epmet-admin/epmet-admin-server/pom.xml b/epmet-admin/epmet-admin-server/pom.xml index fb865ce300..cc3884aa4e 100644 --- a/epmet-admin/epmet-admin-server/pom.xml +++ b/epmet-admin/epmet-admin-server/pom.xml @@ -245,6 +245,9 @@ false + + false + true diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index cb02025cdd..496d5901fb 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -351,6 +351,9 @@ false + + false + wxcb6ce2ed0c5ae54c c7f74941ee97fa9b2e1065772d34c397 diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index 4d9488dbf5..65d0947de1 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -498,6 +498,10 @@ false + + + false + lb://epmet-auth-server diff --git a/epmet-module/data-aggregator/data-aggregator-server/pom.xml b/epmet-module/data-aggregator/data-aggregator-server/pom.xml index a34d6056d7..dd7319d941 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/pom.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/pom.xml @@ -542,6 +542,9 @@ false + + false + true diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 185b224577..43c7bffcae 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -329,6 +329,9 @@ false + + false + true diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index dba76e743a..714dfa2c01 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -603,6 +603,8 @@ false + + false false diff --git a/epmet-module/epmet-activiti/epmet-activiti-server/pom.xml b/epmet-module/epmet-activiti/epmet-activiti-server/pom.xml index 4e13474a61..39153b082b 100644 --- a/epmet-module/epmet-activiti/epmet-activiti-server/pom.xml +++ b/epmet-module/epmet-activiti/epmet-activiti-server/pom.xml @@ -277,6 +277,8 @@ false + + false true diff --git a/epmet-module/epmet-common-service/common-service-server/pom.xml b/epmet-module/epmet-common-service/common-service-server/pom.xml index 06a966a303..4e27c15d03 100644 --- a/epmet-module/epmet-common-service/common-service-server/pom.xml +++ b/epmet-module/epmet-common-service/common-service-server/pom.xml @@ -260,6 +260,8 @@ false + + false true diff --git a/epmet-module/epmet-ext/epmet-ext-server/pom.xml b/epmet-module/epmet-ext/epmet-ext-server/pom.xml index faf7cb0922..bebc41ab98 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/pom.xml +++ b/epmet-module/epmet-ext/epmet-ext-server/pom.xml @@ -339,6 +339,8 @@ false + + false true diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index ac1f514cec..b5b36b0ee1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -263,7 +263,7 @@ false - true + false true https://epmet-open.elinkservice.cn/api/epmetscan/api diff --git a/epmet-module/epmet-job/epmet-job-server/pom.xml b/epmet-module/epmet-job/epmet-job-server/pom.xml index 1731ac910a..e29f5759e5 100644 --- a/epmet-module/epmet-job/epmet-job-server/pom.xml +++ b/epmet-module/epmet-job/epmet-job-server/pom.xml @@ -245,6 +245,9 @@ false + + false + true diff --git a/epmet-module/epmet-message/epmet-message-server/pom.xml b/epmet-module/epmet-message/epmet-message-server/pom.xml index 5c9768296a..87d40ea5fb 100644 --- a/epmet-module/epmet-message/epmet-message-server/pom.xml +++ b/epmet-module/epmet-message/epmet-message-server/pom.xml @@ -331,6 +331,9 @@ false + + false + true diff --git a/epmet-module/epmet-oss/epmet-oss-server/pom.xml b/epmet-module/epmet-oss/epmet-oss-server/pom.xml index 3a0f9cd454..e8b08e97cc 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/pom.xml +++ b/epmet-module/epmet-oss/epmet-oss-server/pom.xml @@ -259,6 +259,8 @@ false + + false true diff --git a/epmet-module/epmet-point/epmet-point-server/pom.xml b/epmet-module/epmet-point/epmet-point-server/pom.xml index 5ed97c9bd5..40d0d1d9e7 100644 --- a/epmet-module/epmet-point/epmet-point-server/pom.xml +++ b/epmet-module/epmet-point/epmet-point-server/pom.xml @@ -283,6 +283,8 @@ false + + false true diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 6090c1a743..a885af4c93 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -319,6 +319,8 @@ false + + false true diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index 299c03e7ac..28e033fa3b 100644 --- a/epmet-module/gov-access/gov-access-server/pom.xml +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -238,6 +238,8 @@ false + + false true diff --git a/epmet-module/gov-grid/gov-grid-server/pom.xml b/epmet-module/gov-grid/gov-grid-server/pom.xml index c4c7c2146b..0e81d0360b 100644 --- a/epmet-module/gov-grid/gov-grid-server/pom.xml +++ b/epmet-module/gov-grid/gov-grid-server/pom.xml @@ -218,6 +218,8 @@ false + + false true diff --git a/epmet-module/gov-issue/gov-issue-server/pom.xml b/epmet-module/gov-issue/gov-issue-server/pom.xml index f25c9fea6a..a28e3463a8 100644 --- a/epmet-module/gov-issue/gov-issue-server/pom.xml +++ b/epmet-module/gov-issue/gov-issue-server/pom.xml @@ -291,6 +291,8 @@ false + + false true https://epmet-open.elinkservice.cn/api/epmetscan/api diff --git a/epmet-module/gov-mine/gov-mine-server/pom.xml b/epmet-module/gov-mine/gov-mine-server/pom.xml index 0f5266756d..b8206f3b95 100644 --- a/epmet-module/gov-mine/gov-mine-server/pom.xml +++ b/epmet-module/gov-mine/gov-mine-server/pom.xml @@ -232,6 +232,8 @@ false + + false diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index c0b1e136a9..2bc10abf21 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -293,6 +293,8 @@ false + + false true diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index ba501c15bf..f49d89d16a 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -286,6 +286,8 @@ false + + false true https://epmet-open.elinkservice.cn/api/epmetscan/api diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml index 3435fb2bfb..0403af0463 100644 --- a/epmet-module/gov-voice/gov-voice-server/pom.xml +++ b/epmet-module/gov-voice/gov-voice-server/pom.xml @@ -249,6 +249,8 @@ false + + false true https://epmet-open.elinkservice.cn/api/epmetscan/api diff --git a/epmet-module/oper-access/oper-access-server/pom.xml b/epmet-module/oper-access/oper-access-server/pom.xml index b2f3970b1d..5b097299ec 100644 --- a/epmet-module/oper-access/oper-access-server/pom.xml +++ b/epmet-module/oper-access/oper-access-server/pom.xml @@ -234,6 +234,8 @@ false + + false true diff --git a/epmet-module/oper-crm/oper-crm-server/pom.xml b/epmet-module/oper-crm/oper-crm-server/pom.xml index 7bf8e220de..c058e133cb 100644 --- a/epmet-module/oper-crm/oper-crm-server/pom.xml +++ b/epmet-module/oper-crm/oper-crm-server/pom.xml @@ -283,7 +283,7 @@ false - true + false true diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index d9c5b09428..2d04e9a1dd 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -266,6 +266,8 @@ false + + false true diff --git a/epmet-module/resi-group/resi-group-server/pom.xml b/epmet-module/resi-group/resi-group-server/pom.xml index ed8dd00950..117e26696c 100644 --- a/epmet-module/resi-group/resi-group-server/pom.xml +++ b/epmet-module/resi-group/resi-group-server/pom.xml @@ -352,6 +352,10 @@ false + + + false + true diff --git a/epmet-module/resi-guide/resi-guide-server/pom.xml b/epmet-module/resi-guide/resi-guide-server/pom.xml index 4cf6f0f33f..94b83622e0 100644 --- a/epmet-module/resi-guide/resi-guide-server/pom.xml +++ b/epmet-module/resi-guide/resi-guide-server/pom.xml @@ -256,6 +256,9 @@ false + + false + true diff --git a/epmet-module/resi-hall/resi-hall-server/pom.xml b/epmet-module/resi-hall/resi-hall-server/pom.xml index a8083d10de..299e457a6d 100644 --- a/epmet-module/resi-hall/resi-hall-server/pom.xml +++ b/epmet-module/resi-hall/resi-hall-server/pom.xml @@ -201,6 +201,8 @@ false + + false true diff --git a/epmet-module/resi-home/resi-home-server/pom.xml b/epmet-module/resi-home/resi-home-server/pom.xml index 346bd03c0d..5012828d19 100644 --- a/epmet-module/resi-home/resi-home-server/pom.xml +++ b/epmet-module/resi-home/resi-home-server/pom.xml @@ -222,6 +222,10 @@ false + + + false + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c diff --git a/epmet-module/resi-mine/resi-mine-server/pom.xml b/epmet-module/resi-mine/resi-mine-server/pom.xml index 3dc61e993e..9101e0841f 100644 --- a/epmet-module/resi-mine/resi-mine-server/pom.xml +++ b/epmet-module/resi-mine/resi-mine-server/pom.xml @@ -238,6 +238,10 @@ false + + + false + https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c diff --git a/epmet-module/resi-partymember/resi-partymember-server/pom.xml b/epmet-module/resi-partymember/resi-partymember-server/pom.xml index 0921d16762..f52ffd6714 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/pom.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/pom.xml @@ -265,6 +265,9 @@ false + + false + true diff --git a/epmet-module/resi-voice/resi-voice-server/pom.xml b/epmet-module/resi-voice/resi-voice-server/pom.xml index 6822371e16..d98c860324 100644 --- a/epmet-module/resi-voice/resi-voice-server/pom.xml +++ b/epmet-module/resi-voice/resi-voice-server/pom.xml @@ -203,6 +203,9 @@ false + + false + diff --git a/epmet-openapi/epmet-openapi-scan/pom.xml b/epmet-openapi/epmet-openapi-scan/pom.xml index 77d83cbc7d..1fbf533003 100644 --- a/epmet-openapi/epmet-openapi-scan/pom.xml +++ b/epmet-openapi/epmet-openapi-scan/pom.xml @@ -204,6 +204,9 @@ false + + false + diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 281e8b3efe..79c3f816af 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -293,6 +293,9 @@ false + + false + true https://epmet-open.elinkservice.cn/api/epmetscan/api From e0c586890e320cdb830188c510fa1e254f437ee4 Mon Sep 17 00:00:00 2001 From: wxz Date: Sat, 9 Oct 2021 15:51:27 +0800 Subject: [PATCH 04/25] =?UTF-8?q?LoginUserHandlerMethodArgumentResolver?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=A7=A3=E6=9E=90=E5=99=A8=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?uri=E7=9A=84=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoginUserHandlerMethodArgumentResolver.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/resolver/LoginUserHandlerMethodArgumentResolver.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/resolver/LoginUserHandlerMethodArgumentResolver.java index 5c725c2ec4..79ee2d538a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/resolver/LoginUserHandlerMethodArgumentResolver.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/resolver/LoginUserHandlerMethodArgumentResolver.java @@ -27,8 +27,14 @@ import org.springframework.core.MethodParameter; import org.springframework.stereotype.Service; import org.springframework.web.bind.support.WebDataBinderFactory; import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.context.request.RequestAttributes; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.ModelAndViewContainer; +import org.springframework.web.servlet.HandlerMapping; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import java.util.Map; /** * 有@LoginUser注解的方法参数,注入当前登录用户 @@ -68,6 +74,12 @@ public class LoginUserHandlerMethodArgumentResolver implements HandlerMethodArgu @Override public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer container, NativeWebRequest request, WebDataBinderFactory factory) throws Exception { + + HttpServletRequest nativeReq = (HttpServletRequest) request.getNativeRequest(); + String requestURI = nativeReq.getRequestURI(); + + logger.info("【LoginUserHandlerMethodArgumentResolver】请求uri:{}", requestURI); + //app-client-userId String redisKey = request.getHeader(Constant.APP_USER_KEY); if (StringUtils.isEmpty(redisKey)) { From 17d5d109619082f2c2a1c2617439e629150ee60c Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 9 Oct 2021 15:58:08 +0800 Subject: [PATCH 05/25] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BC=93=E5=AD=98=20?= =?UTF-8?q?=E6=8E=92=E6=9F=A5=E4=B8=8B=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/UserBaseInfoServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index acb101464e..0f4d76d821 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -152,6 +152,9 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl 1){ + logger.error("queryUserBaseInfoFromCache userId:{} exist more than one record",userId); + } UserBaseInfoResultDTO userBaseInfoResultDTO = userBaseInfoResultDTOS.get(0); logger.debug("getUserResiInfoDTO userId:{},result:{}", userId,JSON.toJSONString(userBaseInfoResultDTO)); return userBaseInfoResultDTO; From ea7a2e0492b54acb057465396f9c38619e679e33 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 9 Oct 2021 16:37:15 +0800 Subject: [PATCH 06/25] =?UTF-8?q?job=E5=BB=B6=E9=95=BF=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E6=97=B6=E9=95=BF=2010=E5=88=86=E9=92=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-job/epmet-job-server/src/main/resources/bootstrap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml index aa0d5545ed..e0dc62b7f0 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml @@ -113,7 +113,7 @@ hystrix: execution: isolation: thread: - timeoutInMilliseconds: 90000 #缺省为1000 + timeoutInMilliseconds: 600000 #缺省为1000 ribbon: ReadTimeout: 300000 From 258145ce55a4129e0086a23a255ed3d35e34f0fb Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 9 Oct 2021 17:19:11 +0800 Subject: [PATCH 07/25] =?UTF-8?q?=E6=B2=BB=E7=90=86=E6=8E=92=E8=A1=8C?= =?UTF-8?q?=E4=BF=9D=E7=95=99=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AEbug=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/ScreenGovernRankDataDailyDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenGovernRankDataDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenGovernRankDataDailyDao.xml index b738c0f217..88f2b71e92 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenGovernRankDataDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenGovernRankDataDailyDao.xml @@ -27,7 +27,7 @@ delete from screen_govern_rank_data_daily where CUSTOMER_ID = #{customerId} - AND DATE_ID <= #{dateId} + AND DATE_ID = #{dateId} and ORG_TYPE=#{orgType} @@ -91,4 +91,4 @@ - \ No newline at end of file + From c7255c6e5578afbe1036585f90d72ad4e69f9b71 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 9 Oct 2021 17:29:51 +0800 Subject: [PATCH 08/25] =?UTF-8?q?=E6=9A=82=E6=97=B6=E4=BD=8F=E6=8E=89?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=20=E8=B7=91=E4=B8=8B=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=90=8E=E5=86=8D=E5=9B=9E=E5=A4=8D=E5=9B=9E=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toscreen/impl/ScreenExtractServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 600786782c..279534af85 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -163,7 +163,7 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { public void extractDaily(String customerId, String dateId, boolean isLast) { //等待3个线程执行完毕后再 继续执行下一个客户的 避免死锁 final CountDownLatch latch = new CountDownLatch(NumConstant.FOUR); - threadPool.submit(() -> { + /* threadPool.submit(() -> { //党员基本情况screen_cpc_base_data try { partyBaseInfoService.statsPartyMemberBaseInfoToScreen(customerId, dateId); @@ -256,7 +256,7 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { } latch.countDown(); log.info("extractDaily 3 thread run end ========= dateId:{},customerId:{}", dateId, customerId); - }); + });*/ threadPool.submit(() -> { //治理能力排行screen_govern_rank_data try { @@ -300,15 +300,15 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { } catch (Exception e) { log.error("网格员数据统计fact_grid_member_statistics_daily抽取失败,customerId为:" + customerId + "dateId为:" + dateId, e); } - extractPartData(customerId, dateId); - latch.countDown(); + //extractPartData(customerId, dateId); + //latch.countDown(); log.info("extractDaily 4 thread run end ========= dateId:{},customerId:{}", dateId, customerId); }); - try { - latch.await(); + /* try { + //latch.await(); } catch (InterruptedException e) { log.error("extractDaily run exception", e); - } + }*/ log.info("===== extractDaily method end customerId:{}======",customerId); } From ae986f44c7df8147f0b895287451ace3a9cbccfd Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 9 Oct 2021 17:50:24 +0800 Subject: [PATCH 09/25] =?UTF-8?q?=E6=9A=82=E6=97=B6=E4=BD=8F=E6=8E=89?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=20=E8=B7=91=E4=B8=8B=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=90=8E=E5=86=8D=E5=9B=9E=E5=A4=8D=E5=9B=9E=E6=9D=A52?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/toscreen/impl/ScreenExtractServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 279534af85..5b9c230735 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -284,19 +284,19 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { ExtractFactGridGovernDailyFromDTO extractFactGridGovernDailyFromDTO = new ExtractFactGridGovernDailyFromDTO(); extractFactGridGovernDailyFromDTO.setCustomerId(customerId); extractFactGridGovernDailyFromDTO.setDateId(dateId); - factGridGovernDailyService.extractFactGridGovernDaily(extractFactGridGovernDailyFromDTO); + //factGridGovernDailyService.extractFactGridGovernDaily(extractFactGridGovernDailyFromDTO); } catch (Exception e) { log.error("治理指数-网格fact_grid_govern_daily抽取失败,customerId为:" + customerId + "dateId为:" + dateId, e); } try { - factAgencyGovernDailyService.extractFactAgencyGovernDaily(customerId, dateId); + // factAgencyGovernDailyService.extractFactAgencyGovernDaily(customerId, dateId); } catch (Exception e) { log.error("治理指数-组织fact_agency_govern_daily抽取失败,customerId为:" + customerId + "dateId为:" + dateId, e); } try { - factGridMemberStatisticsDailyService.extractGridMemberStatisticsDaily(customerId, dateId); + //factGridMemberStatisticsDailyService.extractGridMemberStatisticsDaily(customerId, dateId); } catch (Exception e) { log.error("网格员数据统计fact_grid_member_statistics_daily抽取失败,customerId为:" + customerId + "dateId为:" + dateId, e); } From c61aad2f948b8f5eff604da92322b316d4c84ab1 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 9 Oct 2021 18:04:48 +0800 Subject: [PATCH 10/25] =?UTF-8?q?Revert=20"=E6=9A=82=E6=97=B6=E4=BD=8F?= =?UTF-8?q?=E6=8E=89=E4=BB=A3=E7=A0=81=20=E8=B7=91=E4=B8=8B=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=90=8E=E5=86=8D=E5=9B=9E=E5=A4=8D=E5=9B=9E=E6=9D=A5?= =?UTF-8?q?2"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ae986f44 --- .../extract/toscreen/impl/ScreenExtractServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 5b9c230735..279534af85 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -284,19 +284,19 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { ExtractFactGridGovernDailyFromDTO extractFactGridGovernDailyFromDTO = new ExtractFactGridGovernDailyFromDTO(); extractFactGridGovernDailyFromDTO.setCustomerId(customerId); extractFactGridGovernDailyFromDTO.setDateId(dateId); - //factGridGovernDailyService.extractFactGridGovernDaily(extractFactGridGovernDailyFromDTO); + factGridGovernDailyService.extractFactGridGovernDaily(extractFactGridGovernDailyFromDTO); } catch (Exception e) { log.error("治理指数-网格fact_grid_govern_daily抽取失败,customerId为:" + customerId + "dateId为:" + dateId, e); } try { - // factAgencyGovernDailyService.extractFactAgencyGovernDaily(customerId, dateId); + factAgencyGovernDailyService.extractFactAgencyGovernDaily(customerId, dateId); } catch (Exception e) { log.error("治理指数-组织fact_agency_govern_daily抽取失败,customerId为:" + customerId + "dateId为:" + dateId, e); } try { - //factGridMemberStatisticsDailyService.extractGridMemberStatisticsDaily(customerId, dateId); + factGridMemberStatisticsDailyService.extractGridMemberStatisticsDaily(customerId, dateId); } catch (Exception e) { log.error("网格员数据统计fact_grid_member_statistics_daily抽取失败,customerId为:" + customerId + "dateId为:" + dateId, e); } From b580d6adacb8eac3677d4b75e3d90f51295d7b78 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 9 Oct 2021 18:05:15 +0800 Subject: [PATCH 11/25] =?UTF-8?q?Revert=20"=E6=9A=82=E6=97=B6=E4=BD=8F?= =?UTF-8?q?=E6=8E=89=E4=BB=A3=E7=A0=81=20=E8=B7=91=E4=B8=8B=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=90=8E=E5=86=8D=E5=9B=9E=E5=A4=8D=E5=9B=9E=E6=9D=A5?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c7255c6e --- .../toscreen/impl/ScreenExtractServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 279534af85..600786782c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -163,7 +163,7 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { public void extractDaily(String customerId, String dateId, boolean isLast) { //等待3个线程执行完毕后再 继续执行下一个客户的 避免死锁 final CountDownLatch latch = new CountDownLatch(NumConstant.FOUR); - /* threadPool.submit(() -> { + threadPool.submit(() -> { //党员基本情况screen_cpc_base_data try { partyBaseInfoService.statsPartyMemberBaseInfoToScreen(customerId, dateId); @@ -256,7 +256,7 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { } latch.countDown(); log.info("extractDaily 3 thread run end ========= dateId:{},customerId:{}", dateId, customerId); - });*/ + }); threadPool.submit(() -> { //治理能力排行screen_govern_rank_data try { @@ -300,15 +300,15 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { } catch (Exception e) { log.error("网格员数据统计fact_grid_member_statistics_daily抽取失败,customerId为:" + customerId + "dateId为:" + dateId, e); } - //extractPartData(customerId, dateId); - //latch.countDown(); + extractPartData(customerId, dateId); + latch.countDown(); log.info("extractDaily 4 thread run end ========= dateId:{},customerId:{}", dateId, customerId); }); - /* try { - //latch.await(); + try { + latch.await(); } catch (InterruptedException e) { log.error("extractDaily run exception", e); - }*/ + } log.info("===== extractDaily method end customerId:{}======",customerId); } From d182085408bcd7ee295c8d247ad0e3bc29a3c7cd Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 11 Oct 2021 09:12:39 +0800 Subject: [PATCH 12/25] =?UTF-8?q?=E8=B6=85=E6=97=B6=E9=85=8D=E7=BD=AE10?= =?UTF-8?q?=E5=88=86=E9=92=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/src/main/resources/bootstrap.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index a5276aa300..8426a6c577 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -429,6 +429,7 @@ feign: config: default: loggerLevel: BASIC + readTimeout: 600000 okhttp: enabled: true From e25d30cf2ca31d23bce1eb0dd8d37309d1c667c0 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 11 Oct 2021 09:16:23 +0800 Subject: [PATCH 13/25] =?UTF-8?q?Revert=20"=E8=B6=85=E6=97=B6=E9=85=8D?= =?UTF-8?q?=E7=BD=AE10=E5=88=86=E9=92=9F"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit d1820854 --- epmet-gateway/src/main/resources/bootstrap.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 8426a6c577..a5276aa300 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -429,7 +429,6 @@ feign: config: default: loggerLevel: BASIC - readTimeout: 600000 okhttp: enabled: true From 03989aa9b130992e3b77c59544a946d403573218 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 11 Oct 2021 09:17:28 +0800 Subject: [PATCH 14/25] =?UTF-8?q?=E8=B6=85=E6=97=B6=E9=85=8D=E7=BD=AE10?= =?UTF-8?q?=E5=88=86=E9=92=9F=20=E4=B8=8A=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-job/epmet-job-server/src/main/resources/bootstrap.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml index 0b590717e1..48ed6f28e9 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml @@ -102,6 +102,7 @@ feign: config: default: loggerLevel: FULL + readTimeout: 600000 okhttp: enabled: true From dc88c7011aef35c7ebf27a93146af6f474231670 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 11 Oct 2021 09:24:24 +0800 Subject: [PATCH 15/25] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/constant/ProjectConstant.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java index af4ef095f6..e099b5f89d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java @@ -55,7 +55,7 @@ public interface ProjectConstant { /** * 统计数据执行失败日志前缀 */ - String STATS_FAILED_PREFIX = "统计数据执行失败:%s 客户ID:%s,统计日期:%s"; + String STATS_FAILED_PREFIX = "统计数据执行失败:%s 客户ID:%s,统计日期:%s,异常信息:%s"; /** * 自身 From 01c54ce593eaa4d5dfb97ff2786c17f4746603fc Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 11 Oct 2021 10:47:03 +0800 Subject: [PATCH 16/25] =?UTF-8?q?146,=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86=EF=BC=8Curl=E5=BC=80?= =?UTF-8?q?=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/src/main/resources/bootstrap.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index a5276aa300..c0308758b9 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -507,6 +507,8 @@ epmet: - /data/stats/basereport/** - /data/stats/governance/** - /third/private-epmet/push-component-access-token + - /data/stats/plugins/ofs/** + - /data/stats/plugins/workrecord/** # 对外开放接口认证白名单 From e66a8eeaeb4db7160306043946a0ebe3b591b6a8 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 11 Oct 2021 10:48:18 +0800 Subject: [PATCH 17/25] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20=E6=B7=BB=E5=8A=A0=E7=BA=BF=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactAggregationExtractController.java | 10 +- .../service/impl/StatsUserServiceImpl.java | 6 +- .../user/impl/UserStatisticalServiceImpl.java | 221 ++++++++++++++---- .../src/main/resources/bootstrap.yml | 2 +- 4 files changed, 181 insertions(+), 58 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactAggregationExtractController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactAggregationExtractController.java index c0618c9250..a0c26bcd6b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactAggregationExtractController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactAggregationExtractController.java @@ -72,11 +72,11 @@ public class FactAggregationExtractController { break; default: extractUserDataDaily(param); - extractGroupDataDaily(param); - extractTopicDataDaily(param); - extractIssueDataDaily(param); - extractProjectDataDaily(param); - extractAtricleDataDaily(param); +// extractGroupDataDaily(param); +// extractTopicDataDaily(param); +// extractIssueDataDaily(param); +// extractProjectDataDaily(param); +// extractAtricleDataDaily(param); } }); return new Result(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsUserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsUserServiceImpl.java index dc082b44ca..bdc1999ff7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsUserServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsUserServiceImpl.java @@ -3,6 +3,7 @@ package com.epmet.service.impl; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.ProjectConstant; @@ -29,7 +30,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.Calendar; @@ -138,7 +138,7 @@ public class StatsUserServiceImpl implements StatsUserService { UserStatisticalData agencyData = userService.traverseAgencyUser(agencies, date, timeDimension); userStatisticalService.insertUniquely(agencyData); } catch (Exception e) { - log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, ModuleConstant.EXCEPTION_DING_INTERCEPTOR_PREFIX_AGENCY_USER_STATISTICAL, customerId, new Date().toString(), e.getMessage())); + log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, ModuleConstant.EXCEPTION_DING_INTERCEPTOR_PREFIX_AGENCY_USER_STATISTICAL, customerId, new Date().toString(), ExceptionUtils.getErrorStackTrace(e))); } //5.计算网格统计数据、生成唯一性统计数据 @@ -146,7 +146,7 @@ public class StatsUserServiceImpl implements StatsUserService { UserStatisticalData gridData = userService.traverseGridUser(agencies, date, timeDimension); userStatisticalService.insertUniquely(gridData); } catch (Exception e) { - log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, ModuleConstant.EXCEPTION_DING_INTERCEPTOR_PREFIX_GRID_USER_STATISTICAL, customerId, new Date().toString(), e.getMessage())); + log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, ModuleConstant.EXCEPTION_DING_INTERCEPTOR_PREFIX_GRID_USER_STATISTICAL, customerId, new Date().toString(), ExceptionUtils.getErrorStackTrace(e))); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java index 50b3ade54f..92cbe678ba 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java @@ -6,15 +6,17 @@ import com.epmet.dao.stats.user.*; import com.epmet.dto.stats.user.*; import com.epmet.dto.stats.user.result.UserStatisticalData; import com.epmet.service.stats.user.UserStatisticalService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; /** * @Description @@ -22,10 +24,10 @@ import java.util.List; * @Auth wangc * @Date 2020-06-23 14:27 */ +@Slf4j @Service public class UserStatisticalServiceImpl implements UserStatisticalService { - private static final Logger logger = LoggerFactory.getLogger(UserStatisticalServiceImpl.class); @Autowired private FactParticipationUserAgencyDailyDao participationUserAgencyDailyDao; @@ -51,104 +53,225 @@ public class UserStatisticalServiceImpl implements UserStatisticalService { @Autowired private FactRegUserGridMonthlyDao regUserGridMonthlyDao; + @Autowired + private ExecutorService executorService; + @Override - @Transactional(rollbackFor = Exception.class) public void insertUniquely(UserStatisticalData data) { - if (null == data) return ; + if (null == data) { + return; + } - if(StringUtils.isBlank(data.getDateId()) || StringUtils.isBlank(data.getMonthId())){ - logger.warn("缺失重要参数:dateId或monthId"); - return ; + if (StringUtils.isBlank(data.getDateId()) || StringUtils.isBlank(data.getMonthId())) { + log.error("缺失重要参数:dateId或monthId"); + return; } + CountDownLatch countDownLatch = new CountDownLatch(8); + executorService.submit(() -> { + try { + insertParticipationUserAgencyDaily(data); + } catch (Exception e) { + log.error("insertParticipationUserAgencyDaily exception", e); + } finally { + countDownLatch.countDown(); + } + }); + + executorService.submit(() -> { + try { + insertParticipationUserAgencyMonthly(data); + } catch (Exception e) { + log.error("insertParticipationUserAgencyMonthly exception", e); + } finally { + countDownLatch.countDown(); + } + }); + + executorService.submit(() -> { + try { + insertParticipationUserGridMonthly(data); + } catch (Exception e) { + log.error("insertParticipationUserGridMonthly exception", e); + } finally { + countDownLatch.countDown(); + } + }); + + executorService.submit(() -> { + try { + insertParticipationUserGridDaily(data); + } catch (Exception e) { + log.error("insertParticipationUserGridDaily exception", e); + } finally { + countDownLatch.countDown(); + } + }); + + executorService.submit(() -> { + try { + insertRegUserAgencyDaily(data); + } catch (Exception e) { + log.error("insertRegUserAgencyDaily exception", e); + } finally { + countDownLatch.countDown(); + } + }); + + executorService.submit(() -> { + try { + insertRegUserAgencyMonthly(data); + } catch (Exception e) { + log.error("insertRegUserAgencyMonthly exception", e); + } finally { + countDownLatch.countDown(); + } + }); + + executorService.submit(() -> { + try { + insertRegUserGridDaily(data); + } catch (Exception e) { + log.error("insertRegUserGridDaily exception", e); + } finally { + countDownLatch.countDown(); + } + }); + + executorService.submit(() -> { + try { + insertRegUserGridMonthly(data); + } catch (Exception e) { + log.error("insertRegUserGridMonthly exception", e); + } finally { + countDownLatch.countDown(); + } + }); + + + countDownLatch.getCount(); + + /* insertParticipationUserAgencyDaily(data); + insertParticipationUserAgencyMonthly(data); + insertParticipationUserGridMonthly(data); + insertParticipationUserGridDaily(data); + insertRegUserAgencyDaily(data); + insertRegUserAgencyMonthly(data); + insertRegUserGridDaily(data); + insertRegUserGridMonthly(data);*/ + + log.info("执行完毕======"); + } - if(null != data.getPartiAgencyDailyList() && data.getPartiAgencyDailyList().size() > NumConstant.ZERO){ + @Transactional(rollbackFor = Exception.class) + public void insertRegUserGridMonthly(UserStatisticalData data) { + if (CollectionUtils.isNotEmpty(data.getRegGridMonthlyList())) { Integer delNum; do { - delNum = participationUserAgencyDailyDao.deleteByParams(data.getDateId(),data.getCustomerId()); - }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); - List> partition = ListUtils.partition(data.getPartiAgencyDailyList(), NumConstant.ONE_HUNDRED); + delNum = regUserGridMonthlyDao.deleteByParams(data.getMonthId(), data.getCustomerId()); + } while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); + List> partition = ListUtils.partition(data.getRegGridMonthlyList(), NumConstant.ONE_HUNDRED); partition.forEach(p -> { - participationUserAgencyDailyDao.insertBatch(p); + regUserGridMonthlyDao.insertBatch(p); }); } + } - if(null != data.getPartiAgencyMonthlyList() && data.getPartiAgencyMonthlyList().size() > NumConstant.ZERO){ + @Transactional(rollbackFor = Exception.class) + public void insertRegUserGridDaily(UserStatisticalData data) { + if (CollectionUtils.isNotEmpty(data.getRegGridDailyList())) { Integer delNum; do { - delNum = participationUserAgencyMonthlyDao.deleteByParams(data.getMonthId(),data.getCustomerId()); - }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); - List> partition = ListUtils.partition(data.getPartiAgencyMonthlyList(), NumConstant.ONE_HUNDRED); + delNum = regUserGridDailyDao.deleteByParams(data.getDateId(), data.getCustomerId()); + } while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); + List> partition = ListUtils.partition(data.getRegGridDailyList(), NumConstant.ONE_HUNDRED); partition.forEach(p -> { - participationUserAgencyMonthlyDao.insertBatch(p); + regUserGridDailyDao.insertBatch(p); }); } + } - if(null != data.getPartiGridMonthlyList() && data.getPartiGridMonthlyList().size() > NumConstant.ZERO){ + @Transactional(rollbackFor = Exception.class) + public void insertRegUserAgencyMonthly(UserStatisticalData data) { + if (CollectionUtils.isNotEmpty(data.getRegAgencyMonthlyList())) { Integer delNum; do { - delNum = participationUserGridMonthlyDao.deleteByParams(data.getMonthId(),data.getCustomerId()); - }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); - List> partition = ListUtils.partition(data.getPartiGridMonthlyList(), NumConstant.ONE_HUNDRED); + delNum = regUserAgencyMonthlyDao.deleteByParams(data.getMonthId(), data.getCustomerId()); + } while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); + List> partition = ListUtils.partition(data.getRegAgencyMonthlyList(), NumConstant.ONE_HUNDRED); partition.forEach(p -> { - participationUserGridMonthlyDao.insertBatch(p); + regUserAgencyMonthlyDao.insertBatch(p); }); } + } - if(null != data.getPartiGridDailyList() && data.getPartiGridDailyList().size() > NumConstant.ZERO){ + @Transactional(rollbackFor = Exception.class) + public void insertRegUserAgencyDaily(UserStatisticalData data) { + if (CollectionUtils.isNotEmpty(data.getRegAgencyDailyList())) { Integer delNum; do { - delNum = participationUserGridDailyDao.deleteByParams(data.getDateId(),data.getCustomerId()); - }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); - List> partition = ListUtils.partition(data.getPartiGridDailyList(), NumConstant.ONE_HUNDRED); + delNum = regUserAgencyDailyDao.deleteByParams(data.getDateId(), data.getCustomerId()); + } while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); + List> partition = ListUtils.partition(data.getRegAgencyDailyList(), NumConstant.ONE_HUNDRED); partition.forEach(p -> { - participationUserGridDailyDao.insertBatch(p); + regUserAgencyDailyDao.insertBatch(p); }); } + } - if(null != data.getRegAgencyDailyList() && data.getRegAgencyDailyList().size() > NumConstant.ZERO){ + @Transactional(rollbackFor = Exception.class) + public void insertParticipationUserGridDaily(UserStatisticalData data) { + if (CollectionUtils.isNotEmpty(data.getPartiGridDailyList())) { Integer delNum; do { - delNum = regUserAgencyDailyDao.deleteByParams(data.getDateId(),data.getCustomerId()); - }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); - List> partition = ListUtils.partition(data.getRegAgencyDailyList(), NumConstant.ONE_HUNDRED); + delNum = participationUserGridDailyDao.deleteByParams(data.getDateId(), data.getCustomerId()); + } while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); + List> partition = ListUtils.partition(data.getPartiGridDailyList(), NumConstant.ONE_HUNDRED); partition.forEach(p -> { - regUserAgencyDailyDao.insertBatch(p); + participationUserGridDailyDao.insertBatch(p); }); } + } - if(null != data.getRegAgencyMonthlyList() && data.getRegAgencyMonthlyList().size() > NumConstant.ZERO){ + @Transactional(rollbackFor = Exception.class) + public void insertParticipationUserGridMonthly(UserStatisticalData data) { + if (CollectionUtils.isNotEmpty(data.getPartiGridMonthlyList())) { Integer delNum; do { - delNum = regUserAgencyMonthlyDao.deleteByParams(data.getMonthId(),data.getCustomerId()); - }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); - List> partition = ListUtils.partition(data.getRegAgencyMonthlyList(), NumConstant.ONE_HUNDRED); + delNum = participationUserGridMonthlyDao.deleteByParams(data.getMonthId(), data.getCustomerId()); + } while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); + List> partition = ListUtils.partition(data.getPartiGridMonthlyList(), NumConstant.ONE_HUNDRED); partition.forEach(p -> { - regUserAgencyMonthlyDao.insertBatch(p); + participationUserGridMonthlyDao.insertBatch(p); }); } + } - if(null != data.getRegGridDailyList() && data.getRegGridDailyList().size() > NumConstant.ZERO){ + @Transactional(rollbackFor = Exception.class) + public void insertParticipationUserAgencyMonthly(UserStatisticalData data) { + if (CollectionUtils.isNotEmpty(data.getPartiAgencyMonthlyList())) { Integer delNum; do { - delNum = regUserGridDailyDao.deleteByParams(data.getDateId(),data.getCustomerId()); - }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); - List> partition = ListUtils.partition(data.getRegGridDailyList(), NumConstant.ONE_HUNDRED); + delNum = participationUserAgencyMonthlyDao.deleteByParams(data.getMonthId(), data.getCustomerId()); + } while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); + List> partition = ListUtils.partition(data.getPartiAgencyMonthlyList(), NumConstant.ONE_HUNDRED); partition.forEach(p -> { - regUserGridDailyDao.insertBatch(p); + participationUserAgencyMonthlyDao.insertBatch(p); }); } + } - if(null != data.getRegGridMonthlyList() && data.getRegGridMonthlyList().size() > NumConstant.ZERO){ + @Transactional(rollbackFor = Exception.class) + public void insertParticipationUserAgencyDaily(UserStatisticalData data) { + if (CollectionUtils.isNotEmpty(data.getPartiAgencyDailyList())) { Integer delNum; do { - delNum = regUserGridMonthlyDao.deleteByParams(data.getMonthId(),data.getCustomerId()); - }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); - List> partition = ListUtils.partition(data.getRegGridMonthlyList(), NumConstant.ONE_HUNDRED); + delNum = participationUserAgencyDailyDao.deleteByParams(data.getDateId(), data.getCustomerId()); + } while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); + List> partition = ListUtils.partition(data.getPartiAgencyDailyList(), NumConstant.ONE_HUNDRED); partition.forEach(p -> { - regUserGridMonthlyDao.insertBatch(p); + participationUserAgencyDailyDao.insertBatch(p); }); } - } } diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml index 48ed6f28e9..e0cbb99af4 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml @@ -119,7 +119,7 @@ hystrix: timeoutInMilliseconds: 600000 #缺省为1000 ribbon: - ReadTimeout: 300000 + ReadTimeout: 600000 ConnectTimeout: 300000 dingTalk: From 991e1dd8730390617cff340d19598aa9c650d398 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 11 Oct 2021 10:49:28 +0800 Subject: [PATCH 18/25] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20=E6=B7=BB=E5=8A=A0=E7=BA=BF=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/stats/user/impl/UserStatisticalServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java index 92cbe678ba..8e1eb8179d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java @@ -62,7 +62,7 @@ public class UserStatisticalServiceImpl implements UserStatisticalService { if (null == data) { return; } - + long start = System.currentTimeMillis(); if (StringUtils.isBlank(data.getDateId()) || StringUtils.isBlank(data.getMonthId())) { log.error("缺失重要参数:dateId或monthId"); return; @@ -160,7 +160,7 @@ public class UserStatisticalServiceImpl implements UserStatisticalService { insertRegUserGridDaily(data); insertRegUserGridMonthly(data);*/ - log.info("执行完毕======"); + log.warn("执行完毕======总耗时:{}ms",System.currentTimeMillis()-start); } @Transactional(rollbackFor = Exception.class) From 3a8c954f370e9c21ea647094f95b9306712d69e4 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 11 Oct 2021 10:58:26 +0800 Subject: [PATCH 19/25] =?UTF-8?q?=E8=BF=99=E4=B8=AA=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FactAggregationExtractController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactAggregationExtractController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactAggregationExtractController.java index a0c26bcd6b..c0618c9250 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactAggregationExtractController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactAggregationExtractController.java @@ -72,11 +72,11 @@ public class FactAggregationExtractController { break; default: extractUserDataDaily(param); -// extractGroupDataDaily(param); -// extractTopicDataDaily(param); -// extractIssueDataDaily(param); -// extractProjectDataDaily(param); -// extractAtricleDataDaily(param); + extractGroupDataDaily(param); + extractTopicDataDaily(param); + extractIssueDataDaily(param); + extractProjectDataDaily(param); + extractAtricleDataDaily(param); } }); return new Result(); From 756512a24e75855fee2217e3b3c2d1badb172662 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 11 Oct 2021 11:17:07 +0800 Subject: [PATCH 20/25] =?UTF-8?q?=E9=94=99=E5=95=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/stats/user/impl/UserStatisticalServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java index 8e1eb8179d..06ab06d192 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java @@ -149,7 +149,11 @@ public class UserStatisticalServiceImpl implements UserStatisticalService { }); - countDownLatch.getCount(); + try { + countDownLatch.await(); + } catch (InterruptedException e) { + log.error("countDownLatch exception", e); + } /* insertParticipationUserAgencyDaily(data); insertParticipationUserAgencyMonthly(data); From 64114c416360e4a291506c75d2d80e80f17b4a81 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 11 Oct 2021 13:25:35 +0800 Subject: [PATCH 21/25] =?UTF-8?q?=E5=88=86=E6=AF=8D=E4=B8=BA=E9=9B=B6bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/user/impl/UserServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java index c154ead20b..01556f8659 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java @@ -932,8 +932,8 @@ public class UserServiceImpl implements UserService { } regGridD.setPartymemberProportion(regGridD.getRegTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float)regGridD.getPartymemberTotal()/(float)regGridD.getRegTotal()))); regGridD.setWarmHeartedProportion(regGridD.getRegTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float)regGridD.getWarmHeartedTotal()/(float)regGridD.getRegTotal()))); - partiGridD.setPartymemberProportion(partiGridD.getPartymemberTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float)partiGridD.getPartymemberTotal()/(float)partiGridD.getRegTotal() ))); - partiGridD.setWarmHeartedProportion(partiGridD.getPartymemberTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float)partiGridD.getWarmHeartedTotal()/(float)partiGridD.getRegTotal() ))); + partiGridD.setPartymemberProportion(partiGridD.getRegTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float)partiGridD.getPartymemberTotal()/(float)partiGridD.getRegTotal() ))); + partiGridD.setWarmHeartedProportion(partiGridD.getRegTotal() == NumConstant.ZERO ? BigDecimal.ZERO : new BigDecimal(numberFormat.format((float)partiGridD.getWarmHeartedTotal()/(float)partiGridD.getRegTotal() ))); regGridM.setPartymemberProportion(regGridD.getPartymemberProportion()); regGridM.setWarmHeartedProportion(regGridD.getWarmHeartedProportion()); partiGridM.setPartymemberProportion(partiGridD.getPartymemberProportion()); From 19250282562f1e1ca91026e17355ab911a586795 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 11 Oct 2021 14:22:55 +0800 Subject: [PATCH 22/25] =?UTF-8?q?=E6=97=A0=E6=89=80=E8=B0=93=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/user/impl/UserServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java index c154ead20b..b1c96d6cf8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java @@ -152,7 +152,7 @@ public class UserServiceImpl implements UserService { isParty.set(true); } }); - result.put(userId,isParty.get() == true ? NumConstant.ONE : NumConstant.ZERO); + result.put(userId, isParty.get() ? NumConstant.ONE : NumConstant.ZERO); }); } for (String userId : userIds) { From 4a87c755a9c67b5920b961f0b7519408c67393c1 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 11 Oct 2021 14:58:44 +0800 Subject: [PATCH 23/25] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/stats/user/impl/UserStatisticalServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java index 06ab06d192..3e3c0c8b61 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/UserStatisticalServiceImpl.java @@ -164,7 +164,7 @@ public class UserStatisticalServiceImpl implements UserStatisticalService { insertRegUserGridDaily(data); insertRegUserGridMonthly(data);*/ - log.warn("执行完毕======总耗时:{}ms",System.currentTimeMillis()-start); + log.warn("执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-start, data.getCustomerId()); } @Transactional(rollbackFor = Exception.class) From 33754bf21976278128cd8be1a31d20f5c869b311 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 11 Oct 2021 16:13:45 +0800 Subject: [PATCH 24/25] =?UTF-8?q?=E6=B2=BB=E7=90=86=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=97=A5=E7=BB=9F=E8=AE=A1=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/DemoController.java | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index ca81ce0ba7..a25e563a07 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -50,6 +50,7 @@ import com.epmet.service.org.CustomerGridService; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimCustomerPartymemberService; import com.epmet.service.stats.DimCustomerService; +import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -59,6 +60,8 @@ import org.springframework.web.bind.annotation.*; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; @@ -695,10 +698,22 @@ public class DemoController { @PostMapping("governRankDaily") public Result governRankDaily(@RequestBody CustomerIdAndDateIdFormDTO formDTO){ - governRankDataExtractService.extractGridDataDaily(formDTO.getCustomerId(), formDTO.getDateId()); - governRankDataExtractService.extractCommunityDataDaily(formDTO.getCustomerId(), formDTO.getDateId()); - governRankDataExtractService.extractStreetDataDaily(formDTO.getCustomerId(), formDTO.getDateId()); - governRankDataExtractService.extractDistrictDataDaily(formDTO.getCustomerId(), formDTO.getDateId()); + List dateIds = new ArrayList<>(); + if ((StringUtils.isBlank(formDTO.getStartDate()) && StringUtils.isBlank(formDTO.getEndDate()))){ + if (StringUtils.isNotBlank(formDTO.getDateId())){ + dateIds.add(formDTO.getDateId()); + }else { + dateIds.add(DimIdGenerator.getDateDimId(DateUtils.addDateDays(new Date(), -1))); + } + }else { + dateIds = DateUtils.getDaysBetween(formDTO.getStartDate(), formDTO.getEndDate()); + } + dateIds.forEach(dateId -> { + governRankDataExtractService.extractGridDataDaily(formDTO.getCustomerId(), dateId); + governRankDataExtractService.extractCommunityDataDaily(formDTO.getCustomerId(), dateId); + governRankDataExtractService.extractStreetDataDaily(formDTO.getCustomerId(), dateId); + governRankDataExtractService.extractDistrictDataDaily(formDTO.getCustomerId(), dateId); + }); return new Result(); } From aa53150f6ac3bbdd2cc64a7c6ae5bbb4adce9469 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 11 Oct 2021 16:44:25 +0800 Subject: [PATCH 25/25] =?UTF-8?q?=E6=94=BE=E9=87=8D=E5=A4=8D=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/StaffPatrolController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffPatrolController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffPatrolController.java index 66a82f226a..53933da2ae 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffPatrolController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffPatrolController.java @@ -2,6 +2,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.RequirePermission; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -62,6 +63,7 @@ public class StaffPatrolController { * @author zhaoqifeng * @date 2021/6/7 16:46 */ + @NoRepeatSubmit @PostMapping("startpatrol") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOT_GOVERN_PATROL) public Result startPatrol(@LoginUser TokenDto tokenDto, @RequestBody StartPatrolFormDTO formDTO) {