From d825f75e73eefea5b11d817d2a05bfcd19a5d5eb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 12 Oct 2020 17:33:33 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=85=88=E9=94=8B?= =?UTF-8?q?=E6=A8=A1=E8=8C=83=EF=BC=8C=E5=B7=B2=E8=A7=A3=E5=86=B3=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=EF=BC=8C=E5=8D=A0=E5=B7=B2=E7=BB=93=E6=A1=88=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=8D=A0=E6=AF=94=20=20sql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectMainDailyDao.java | 12 ++++++++---- .../todata/FactOriginProjectMainDailyService.java | 11 ++++++----- .../FactOriginProjectMainDailyServiceImpl.java | 14 ++++++++------ .../impl/PioneerDataExtractServiceImpl.java | 5 +++-- .../extract/FactOriginProjectMainDailyDao.xml | 10 ++++++++-- 5 files changed, 33 insertions(+), 19 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java index 4ed5d1303c..bdadee2f52 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java @@ -113,7 +113,8 @@ public interface FactOriginProjectMainDailyDao extends BaseDao - and t1.CLOSED_STATUS=#{closedStatus} + and t1.IS_RESOLVED=#{closedStatus} + + + and t1.PROJECT_STATUS=#{projectStatus} @@ -175,7 +178,10 @@ AND T1.CUSTOMER_ID = #{customerId} and t1.PIDS LIKE CONCAT(#{agencyPath},'%') - and t1.CLOSED_STATUS=#{closedStatus} + and t1.IS_RESOLVED=#{closedStatus} + + + and t1.PROJECT_STATUS=#{projectStatus} - SELECT - t1.CREATE_TOPIC_USER_ID AS USER_ID, - COUNT( 1 ) AS SHIFT_ISSUE_COUNT + t1.CREATE_TOPIC_USER_ID AS userId, + COUNT( 1 ) AS indexValue FROM fact_origin_issue_main_daily t1 WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml index afbaa54d93..6e3e0c5628 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml @@ -113,10 +113,10 @@ - SELECT - t1.TOPIC_CREATOR_ID AS USER_ID, - COUNT( 1 ) AS SHIFT_PROJECT_COUNT + t1.TOPIC_CREATOR_ID AS userId, + COUNT( 1 ) AS indexValue FROM fact_origin_project_main_daily t1 WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicLogDailyDao.xml index 3b9b9bb5e2..1d7bc88cab 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicLogDailyDao.xml @@ -69,10 +69,10 @@ - SELECT - t1.OPERATE_USER_ID, - count( 1 ) AS JOIN_TOPIC_COUNT + t1.OPERATE_USER_ID as userId, + count( 1 ) AS indexValue FROM fact_origin_topic_log_daily t1 WHERE @@ -85,9 +85,9 @@ - + select T2.USER_ID as userId, + COUNT(1) AS indexValue from fact_origin_topic_main_daily t1 INNER JOIN ( select main.GROUP_OWNER_ID AS USER_ID,main.ID AS GROUP_ID diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml index c05217083f..a4f2d9bbaa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginTopicMainDailyDao.xml @@ -68,10 +68,10 @@ - SELECT - T1.CREATE_TOPIC_USER_ID AS USER_ID, - COUNT( 1 ) AS CREATE_TOPIC_COUNT + T1.CREATE_TOPIC_USER_ID AS userId, + COUNT( 1 ) AS indexValue FROM fact_origin_topic_main_daily t1 WHERE From ed43280ee5d9edebf6a33c0c8b97c347c5684dc7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 13 Oct 2020 09:10:27 +0800 Subject: [PATCH 4/5] =?UTF-8?q?log=E7=BA=A7=E5=88=AB=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/IndexCalculateCommunityServiceImpl.java | 4 ++-- .../indexcal/impl/IndexCalculateDistrictServiceImpl.java | 2 +- .../indexcal/impl/IndexCalculateStreetServiceImpl.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 88e6b14578..34b95afaf4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -278,7 +278,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridGovernAvg)){ - log.error("社区下级治理能力平均分集合为空"); + log.warn("社区下级治理能力平均分集合为空"); }else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); @@ -351,7 +351,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridServiceAvg)) { - log.error("查询社区下级所有网格服务能力得分平均值集合为空"); + log.warn("查询社区下级所有网格服务能力得分平均值集合为空"); } else { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subGridServiceAvg, IndexCalConstant.PAGE_SIZE); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 9334fa2351..cc640e1853 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -309,7 +309,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict } } if (CollectionUtils.isEmpty(deptScoreAvgList)) { - log.error("查询所有直属部门治理能力平均值集合为空"); + log.warn("查询所有直属部门治理能力平均值集合为空"); } else{ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(deptScoreAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(deptScoreAvgList, IndexCalConstant.PAGE_SIZE); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 4809870eef..d7637f8e5a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -279,7 +279,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { List subGridGovernAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridGovernAvg)){ - log.error("查询街道下属所有社区治理能力汇总为空"); + log.warn("查询街道下属所有社区治理能力汇总为空"); }else if (subGridGovernAvg.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); @@ -352,7 +352,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) { List subCommServiceAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subCommServiceAvg)) { - log.error("查询街道下属社区服务能力得分平均值为空"); + log.warn("查询街道下属社区服务能力得分平均值为空"); } else if (subCommServiceAvg.size() > NumConstant.ZERO) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subCommServiceAvg, IndexCalConstant.PAGE_SIZE); From 6973745213cc8749d6501df9437281d8cc237153 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 13 Oct 2020 09:47:11 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E7=99=BE=E4=BA=BA=E4=BA=BA=E5=9D=87?= =?UTF-8?q?=E8=AE=AE=E9=A2=98=20=E4=B8=8D=E8=83=BD=E4=B9=98=E4=BB=A5100=20?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E7=99=BE=E5=88=86=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/toscreen/impl/PublicPartExtractServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java index 7f85fe8339..bdbb60d9d7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java @@ -122,8 +122,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { log.debug("user:{}", JSON.toJSONString(user)); if (!user.getRegTotal().equals(0)) { BigDecimal avgIssueCount = new BigDecimal(issue.getIssueIncr()).divide(new BigDecimal(user.getRegTotal()) - .divide(new BigDecimal(NumConstant.ONE_HUNDRED)), 4, BigDecimal.ROUND_HALF_UP) - .multiply(new BigDecimal(NumConstant.ONE_HUNDRED)); + .divide(new BigDecimal(NumConstant.ONE_HUNDRED)), 4, BigDecimal.ROUND_HALF_UP); entity.setAvgIssue(avgIssueCount); } }); @@ -146,6 +145,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { //遍历实际参与人数 Map> voteMap = voteCountList.stream().collect(Collectors.groupingBy(IssueVoteUserCountResultDTO::getOrgId)); + log.debug("平均参与度:实际参与人数:{}", JSON.toJSONString(voteMap)); for (Map.Entry> entry : voteMap.entrySet()) { String gridId = entry.getKey(); ScreenUserJoinEntity entity = insertMap.get(gridId); @@ -154,6 +154,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService { BigDecimal votedByIssueCount = new BigDecimal(issueList.get(0).getIssueCount()); for (IssueVoteUserCountResultDTO vote : issueList) { Integer memberCount = gridMemberCount.get(gridId); + log.debug("平均参与度:网格Id:{},实际投票人数:{},参与投票人数:{}", gridId, vote.getVoteCount(), memberCount); if (memberCount == null) { memberCount = 0; }