From 36b6bba9cdd3105235f3148485aeab8a4d7e7abe Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 21 May 2021 16:54:50 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AE=A2=E6=88=B7Id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/dto/form/IndexScoreFormDTO.java | 3 ++- .../epmet/datareport/controller/screen/IndexController.java | 3 ++- .../resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 6 ++++++ .../resources/mapper/screen/ScreenIndexDataYearlyDao.xml | 3 +++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/IndexScoreFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/IndexScoreFormDTO.java index e75abb9f63..9cd0d8cf49 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/IndexScoreFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/IndexScoreFormDTO.java @@ -3,7 +3,6 @@ package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; -import javax.validation.constraints.Min; import javax.validation.constraints.NotBlank; import java.io.Serializable; @@ -31,6 +30,8 @@ public class IndexScoreFormDTO implements Serializable { */ //@NotBlank(message = "月份Id不能为空",groups = {IndexScoreFormDTO.AddUserInternalGroup.class}) private String monthId; + + private String customerId; public interface AddUserInternalGroup {} } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index cb851647af..55543e1e70 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -134,7 +134,8 @@ public class IndexController { * @author sun */ @PostMapping("month/indexscore") - public Result indexScore(@RequestBody IndexScoreFormDTO formDTO) { + public Result indexScore(@RequestHeader("CustomerId") String customerId,@RequestBody IndexScoreFormDTO formDTO) { + formDTO.setCustomerId(customerId); ValidatorUtils.validateEntity(formDTO, IndexScoreFormDTO.AddUserInternalGroup.class); return new Result().ok(indexService.indexScore(formDTO)); } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index ccd8c9f82b..d5ca3cf33c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -87,6 +87,9 @@ del_flag = '0' AND parent_id = #{agencyId} AND month_id = #{monthId,jdbcType=VARCHAR} + + AND CUSTOMER_ID = #{customerId} + AND ORG_TYPE = #{orgType,jdbcType=VARCHAR} @@ -186,6 +189,9 @@ WHERE del_flag = '0' AND org_id = #{orgId} + + AND customer_id = #{customerId} + AND org_type = #{orgType} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml index 7cf197a054..301954275f 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -35,6 +35,9 @@ del_flag = '0' AND parent_id = #{agencyId} AND year_id = YEAR(CURDATE()) + + AND CUSTOMER_ID = #{customerId} + AND ORG_TYPE = #{orgType,jdbcType=VARCHAR} From f67ed15e676d5a52ef50d26af66856badd61b3e4 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 25 May 2021 16:08:51 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=B9=B3=E9=9F=B3=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E7=83=AD?= =?UTF-8?q?=E5=BF=83=E5=B1=85=E6=B0=91=E6=94=B9=E7=BD=91=E6=A0=BC=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/StrConstant.java | 3 +++ .../user/impl/UserAnalysisServiceImpl.java | 27 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java index 41302f5e32..25cfa3e0b2 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java @@ -82,5 +82,8 @@ public interface StrConstant { String MAX="MAX"; + //青岛体悟实训客户 String SPECIAL_CUSTOMER = "150282ed25c14ff0785e7e06283b6283"; + //平音客户 + String PY_CUSTOMER = "6f203e30de1a65aab7e69c058826cd80"; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java index c4bf48603a..7e7e2864dd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java @@ -199,6 +199,15 @@ public class UserAnalysisServiceImpl implements UserAnalysisService { for(UserSubAgencyResultDTO m:dimList){ logger.info("机关名:"+m.getName()+",总数="+m.getTotal()); } + //2021.5.25 平音客户热心居民改网格员 sun start + if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) { + dimList.forEach(d->{ + if("热心居民".equals(d.getType())){ + d.setType("网格员"); + } + }); + } + //2021.5.25 平音客户热心居民改网格员 sun end return dimList; } @@ -323,6 +332,15 @@ public class UserAnalysisServiceImpl implements UserAnalysisService { for(UserSubGridResultDTO m:dimList){ logger.info("网格名:"+m.getName()+",总数="+m.getTotal()); } + //2021.5.25 平音客户热心居民改网格员 sun start + if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) { + dimList.forEach(d->{ + if("热心居民".equals(d.getType())){ + d.setType("网格员"); + } + }); + } + //2021.5.25 平音客户热心居民改网格员 sun end return dimList; } @@ -488,6 +506,15 @@ public class UserAnalysisServiceImpl implements UserAnalysisService { party.setValue(userIncrTrendResDTO.getPartymemberIncr()); resultList.add(party); } + //2021.5.25 平音客户热心居民改网格员 sun start + if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) { + resultList.forEach(d->{ + if("热心居民".equals(d.getType())){ + d.setType("网格员"); + } + }); + } + //2021.5.25 平音客户热心居民改网格员 sun end return resultList; } From e6350b132efd393cc9f824d5d9b5404128a524f6 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 May 2021 16:31:18 +0800 Subject: [PATCH 3/4] sqlxiugai --- .../src/main/resources/db/migration/V0.0.16__add_shiftIssue.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.16__add_shiftIssue.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.16__add_shiftIssue.sql index 3f1cff2e94..367af0a9b7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.16__add_shiftIssue.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.16__add_shiftIssue.sql @@ -1 +1 @@ -ALTER TABLE `fact_origin_topic_main_daily` ADD `SHIFT_ISSUE` tinyint(1) NOT NULL COMMENT '是否转为议题,0:false,1:true'; \ No newline at end of file +ALTER TABLE `fact_origin_topic_main_daily` ADD `SHIFT_ISSUE` tinyint(1) NOT NULL default '0' COMMENT '是否转为议题,0:false,1:true' AFTER `CREATE_TOPIC_USER_IS_PARTY`; \ No newline at end of file From 2cf9bb2f016e5473d1ae58f0340b11e51fdaf86f Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 May 2021 15:14:14 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=85=9A=E5=91=98=E5=88=86=E6=95=B0?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=97=B6=20=E8=8E=B7=E5=8F=96=E5=85=9A?= =?UTF-8?q?=E5=91=98=E6=8C=87=E6=A0=87=E5=8E=9F=E5=A7=8B=E5=80=BC=E6=97=B6?= =?UTF-8?q?=E4=BB=A5=E7=94=A8=E6=88=B7Id=E5=88=86=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CpcIndexCalculateServiceImpl.java | 3 ++- .../FactIndexPartyAblityCpcMonthlyDao.xml | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index d52c6891c5..2c7c1ac52d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -219,6 +219,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { List> list = null; groupIndexDetailsMap.keySet().forEach(indexCode -> deleteOldData(formDTO, indexCode)); do { + //以党员userId为单位 获取数量 list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(),(pageNo - 1) * pageSize, pageSize, formDTO.getCustomerAreaCode(),formDTO.getSubCustomerIds()); if (!CollectionUtils.isEmpty(list)) { @@ -304,7 +305,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.info("计算的结果:{}", result); + log.info("计算的结果:{}", JSON.toJSONString(result)); //处理结果 if (CollectionUtils.isEmpty(result)) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml index 9610514dcf..2f588f52ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml @@ -120,15 +120,15 @@ cpc.QUARTER_ID, cpc.YEAR_ID, cpc.USER_ID, - cpc.CREATE_TOPIC_COUNT, - cpc.JOIN_TOPIC_COUNT, - cpc.SHIFT_ISSUE_COUNT, - cpc.SHIFT_PROJECT_COUNT, - cpc.JOIN_THREE_MEETS_COUNT, - cpc.GROUP_USER_COUNT, - cpc.GROUP_TOPIC_COUNT, - cpc.TOPIC_TO_ISSUE_RATIO, - cpc.GROUP_ACTIVE_USER_COUNT + SUM(cpc.CREATE_TOPIC_COUNT) CREATE_TOPIC_COUNT, + SUM(cpc.JOIN_TOPIC_COUNT) JOIN_TOPIC_COUNT, + SUM(cpc.SHIFT_ISSUE_COUNT) SHIFT_ISSUE_COUNT, + SUM(cpc.SHIFT_PROJECT_COUNT) SHIFT_PROJECT_COUNT, + SUM(cpc.JOIN_THREE_MEETS_COUNT) JOIN_THREE_MEETS_COUNT, + SUM(cpc.GROUP_USER_COUNT) GROUP_USER_COUNT, + SUM(cpc.GROUP_TOPIC_COUNT) GROUP_TOPIC_COUNT, + SUM(cpc.TOPIC_TO_ISSUE_RATIO) TOPIC_TO_ISSUE_RATIO, + SUM(cpc.GROUP_ACTIVE_USER_COUNT) GROUP_ACTIVE_USER_COUNT FROM fact_index_party_ablity_cpc_monthly cpc inner join screen_customer_grid scg @@ -148,6 +148,7 @@ and scg.CUSTOMER_ID=#{customerId,jdbcType=VARCHAR} + GROUP BY cpc.USER_ID LIMIT #{offset},#{pageSize}