From fea1a15f61f9b8e53bd235e4c50ff613a4a687d0 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 15 Sep 2020 10:27:07 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F-?= =?UTF-8?q?=E5=85=AC=E7=9B=8A=E4=BA=92=E5=8A=A9=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/HeartVolunteerrankFormDTO.java | 33 +++++++++++ .../dto/result/AgeDistributionResultDTO.java | 53 ++++++++++++++++++ .../result/GenderDistributionResultDTO.java | 26 +++++++++ .../HeartVolunteerportrayalResultDTO.java | 27 +++++++++ .../result/HeartVolunteerrankResultDTO.java | 37 ++++++++++++ .../controller/screen/KcScreenController.java | 33 ++++++++++- .../screenkc/ScreenKcActSummaryDailyDao.java | 8 +++ .../screenkc/ScreenKcActTrendMonthlyDao.java | 3 +- .../ScreenKcPlatformSummaryDailyDao.java | 3 +- ...ScreenKcVolunteerHeatRankGridDailyDao.java | 12 +++- .../ScreenKcVolunteerSummaryDailyDao.java | 8 +++ .../screen/KcScreenService.java | 21 ++++++- .../screen/impl/KcScreenServiceImpl.java | 56 ++++++++++++++++--- .../screenkc/ScreenKcActSummaryDailyDao.xml | 17 ++++++ .../screenkc/ScreenKcActTrendMonthlyDao.xml | 2 +- .../ScreenKcPlatformSummaryDailyDao.xml | 2 +- .../ScreenKcVolunteerHeatRankGridDailyDao.xml | 20 +++---- .../ScreenKcVolunteerSummaryDailyDao.xml | 20 ++++++- 18 files changed, 347 insertions(+), 34 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java new file mode 100644 index 0000000000..cca3eb4f1b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.evaluationindex.screen.dto.form; + + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名-接口入参 + * @Author sun + */ +@Data +public class HeartVolunteerrankFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageNo; + /** + * 页容量,默认10页 + */ + @Min(value = 1, message = "每页条数必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageSize; + /** + * 客户Id + */ + private String customerId; + public interface AddUserInternalGroup {} +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java new file mode 100644 index 0000000000..616d9207c4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgeDistributionResultDTO.java @@ -0,0 +1,53 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 公益互助-志愿者画像 + * @Author sun + */ +@Data +public class AgeDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 小于20岁的志愿者总人数 + */ + private Integer ageLevel1 = 0; + /** + * 20-30岁的志愿者总人数 + */ + private Integer ageLevel2 = 0; + /** + * 31-40岁的志愿者总人数 + */ + private Integer ageLevel3 = 0; + /** + * 41-50岁的志愿者总人数 + */ + private Integer ageLevel4 = 0; + /** + * 51-60岁的志愿者总人数 + */ + private Integer ageLevel5 = 0; + /** + * 60+岁的志愿者总人数 + */ + private Integer ageLevel6 = 0; + /** + * 志愿者中男性总人数 + */ + @JsonIgnore + private Integer maleCount = 0; + /** + * 志愿者中女性总人数 + */ + @JsonIgnore + private Integer femaleCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java new file mode 100644 index 0000000000..e36589103a --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GenderDistributionResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 公益互助-志愿者画像 + * @Author sun + */ +@Data +public class GenderDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 志愿者中男性总人数 + */ + private Integer maleCount = 0; + /** + * 志愿者中女性总人数 + */ + private Integer femaleCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java new file mode 100644 index 0000000000..2bbcd82df1 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerportrayalResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 公益互助-志愿者画像 + * @Author sun + */ +@Data +public class HeartVolunteerportrayalResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 个年龄段志愿者人数 + */ + private AgeDistributionResultDTO ageDistribution; + + /** + * 男、女志愿者人员 + */ + private GenderDistributionResultDTO genderDistribution; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java new file mode 100644 index 0000000000..03f962e110 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/HeartVolunteerrankResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名 + * @Author sun + */ +@Data +public class HeartVolunteerrankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 用户id + */ + private String userId = ""; + /** + * 用户名称 + */ + private String userName = ""; + /** + * 公益时长分钟 + */ + private Integer heartTime = 0; + /** + * 积分 + */ + private Integer points = 0; + /** + * 所属网格名称 + */ + private String gridName = ""; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index 88a9a425bd..f945c8c43f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -3,15 +3,18 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; -import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * 孔村大屏api * @@ -59,4 +62,28 @@ public class KcScreenController { return new Result().ok(kcScreenService.heartActcounttrend(externalAppRequestParam)); } + /** + * @param externalAppRequestParam + * @Description 公益互助-志愿者画像 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("heart/volunteerportrayal") + public Result heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.heartVolunteerportrayal(externalAppRequestParam)); + } + + /** + * @param externalAppRequestParam + * @Description 公益互助-个人(志愿者)公益时长排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("heart/volunteerrank") + public Result> heartVolunteerrank(ExternalAppRequestParam externalAppRequestParam, @RequestBody HeartVolunteerrankFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, HeartVolunteerrankFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); + return new Result>().ok(kcScreenService.heartVolunteerrank(formDTO)); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java index 8ed8b0f9d9..3de0da456c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActSummaryDailyDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-活动各类总数(先根据customerId+dateId删除) @@ -28,4 +30,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcActSummaryDailyDao { + /** + * @param customerId + * @Description 公益互助-各类总数汇总 + * @author sun + */ + HeartSummaryResultDTO selectHeartSummary(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java index bb7cdaad84..173bd2c936 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcActTrendMonthlyDao.java @@ -19,6 +19,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; import com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -36,5 +37,5 @@ public interface ScreenKcActTrendMonthlyDao { * @Description 按客户查询最近十二个月数据 * @author sun */ - List selectActTrendMonthly(String customerId); + List selectActTrendMonthly(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java index 44ac5c506a..9772805fff 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcPlatformSummaryDailyDao.java @@ -19,6 +19,7 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-平台各汇总值(先根据customerId+dateId删除) @@ -34,5 +35,5 @@ public interface ScreenKcPlatformSummaryDailyDao { * @Description 首页-平台各类总数 * @author sun */ - HomepageSummaryResultDTO selectSummaryDaily(String customerId); + HomepageSummaryResultDTO selectSummaryDaily(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java index 64ef74f376..cb57c5ef36 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java @@ -17,8 +17,13 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HeartVolunteerrankResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * KC-志愿者公益时长排名(先根据customerId删除) @@ -30,9 +35,10 @@ import org.apache.ibatis.annotations.Mapper; public interface ScreenKcVolunteerHeatRankGridDailyDao { /** - * @param customerId - * @Description 公益互助-各类总数汇总 + * @param formDTO + * @Description 公益互助-个人(志愿者)公益时长排名 * @author sun */ - HeartSummaryResultDTO selectHeartSummary(String customerId); + List selectHeartVolunteerrankList(HeartVolunteerrankFormDTO formDTO); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java index 38a06222dd..27990e8bc3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerSummaryDailyDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.AgeDistributionResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-志愿者汇总(先根据customerId+dateId删除) @@ -28,4 +30,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcVolunteerSummaryDailyDao { + /** + * @param customerId + * @Description 根据客户Id查询最近日期志愿者统计数据 + * @author sun + */ + AgeDistributionResultDTO selectVolunteerSummaryDaily(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 0e58cf7c08..448b032c21 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -1,9 +1,10 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; -import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; + +import java.util.List; /** * 孔村大屏api @@ -33,4 +34,18 @@ public interface KcScreenService { * @author sun */ HeartActcounttrendResultDTO heartActcounttrend(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param externalAppRequestParam + * @Description 公益互助-志愿者画像 + * @author sun + */ + HeartVolunteerportrayalResultDTO heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param formDTO + * @Description 公益互助-个人(志愿者)公益时长排名 + * @author sun + */ + List heartVolunteerrank(HeartVolunteerrankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 02b2c9c02d..e86c1d7353 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -2,16 +2,13 @@ package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcActTrendMonthlyDao; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcVolunteerHeatRankGridDailyDao; +import com.epmet.datareport.dao.evaluationindex.screenkc.*; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; -import com.epmet.evaluationindex.screen.dto.result.ActTrendMonthlyResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartActcounttrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -33,9 +30,13 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; @Autowired - private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; + private ScreenKcActSummaryDailyDao screenKcActSummaryDailyDao; @Autowired private ScreenKcActTrendMonthlyDao screenKcActTrendMonthlyDao; + @Autowired + private ScreenKcVolunteerSummaryDailyDao screenKcVolunteerSummaryDailyDao; + @Autowired + private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; /** * @param externalAppRequestParam @@ -54,7 +55,7 @@ public class KcScreenServiceImpl implements KcScreenService { */ @Override public HeartSummaryResultDTO heartSummary(ExternalAppRequestParam externalAppRequestParam) { - return screenKcVolunteerHeatRankGridDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId()); + return screenKcActSummaryDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId()); } /** @@ -80,4 +81,41 @@ public class KcScreenServiceImpl implements KcScreenService { return resultDTO; } + /** + * @param externalAppRequestParam + * @Description 公益互助-志愿者画像 + * @author sun + */ + @Override + public HeartVolunteerportrayalResultDTO heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam) { + HeartVolunteerportrayalResultDTO resultDTO = new HeartVolunteerportrayalResultDTO(); + GenderDistributionResultDTO genderDistribution = new GenderDistributionResultDTO(); + //1.根据客户Id查询最近日期志愿者统计数据 + AgeDistributionResultDTO ageDistribution = screenKcVolunteerSummaryDailyDao.selectVolunteerSummaryDaily(externalAppRequestParam.getCustomerId()); + //2.封装数据并返回 + if (null == ageDistribution) { + resultDTO.setAgeDistribution(new AgeDistributionResultDTO()); + resultDTO.setGenderDistribution(genderDistribution); + } else { + resultDTO.setAgeDistribution(ageDistribution); + genderDistribution.setMaleCount(ageDistribution.getMaleCount()); + genderDistribution.setFemaleCount(ageDistribution.getFemaleCount()); + resultDTO.setGenderDistribution(genderDistribution); + } + return resultDTO; + } + + /** + * @param formDTO + * @Description 公益互助-个人(志愿者)公益时长排名 + * @author sun + */ + @Override + public List heartVolunteerrank(HeartVolunteerrankFormDTO formDTO) { + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + List list = screenKcVolunteerHeatRankGridDailyDao.selectHeartVolunteerrankList(formDTO); + return list; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml index a2b108ceb9..14cba9ef1a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActSummaryDailyDao.xml @@ -3,5 +3,22 @@ + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml index 55b9bca50a..a7062885ce 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml @@ -15,7 +15,7 @@ del_flag = '0' AND customer_id = #{customerId} ORDER BY - month_id DESC + month_id DESC, created_time DESC LIMIT 12 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml index 1b2818d77c..5ef2a4780e 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcPlatformSummaryDailyDao.xml @@ -24,7 +24,7 @@ del_flag = '0' AND customer_id = #{customerId} ORDER BY - date_id DESC + date_id DESC, created_time DESC LIMIT 1 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml index 581f4a013e..527a33ce0a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.xml @@ -3,22 +3,20 @@ - - SELECT - date_id AS "dateId", - act_count AS "actCount", - volunteer_count AS "volunteerCount", - parti_user_count AS "partiUserCount", - reward_point_count AS "rewardPointCount", - heart_time AS "heartTime" + grid_name AS "gridName", + user_id AS "userId", + user_name AS "userName", + heart_time AS "heartTime", + points AS "points" FROM - screen_kc_act_summary_daily + screen_kc_volunteer_heat_rank_grid_daily WHERE del_flag = '0' AND customer_id = #{customerId} ORDER BY - date_id DESC - LIMIT 1 + date_id DESC, created_time DESC + LIMIT #{pageNo}, #{pageSize} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml index 39f5781f95..62f94e5d1f 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcVolunteerSummaryDailyDao.xml @@ -3,5 +3,23 @@ - + From 07218d8e210c92be729a30fba295e97aaf62686e Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 11:19:34 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/stats/impl/DemoDataStatsServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java | 4 +++- .../stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedAgencyYearlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentDailyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedGridDailyServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactTagUsedGridQuarterlyServiceImpl.java | 3 +++ .../service/stats/impl/FactTagUsedGridYearlyServiceImpl.java | 3 +++ 13 files changed, 39 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java index 698a7c2881..e63a135590 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DemoDataStatsServiceImpl.java @@ -1,6 +1,8 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.DimYearDao; import com.epmet.entity.stats.DimYearEntity; import com.epmet.service.stats.DemoDataStatsService; @@ -14,6 +16,7 @@ import java.util.Date; * 默认为统计数据源,不需要手动指定 */ @Service +@DataSource(DataSourceConstant.STATS) public class DemoDataStatsServiceImpl implements DemoDataStatsService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java index 7eef72f9d7..2c267d7bc5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyDailyServiceImpl.java @@ -17,12 +17,13 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyDailyDao; import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity; -import com.epmet.entity.stats.FactTagUsedGridDailyEntity; import com.epmet.service.stats.FactTagUsedAgencyDailyService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -41,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyDailyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java index 85c51f9fdb..8ab508c5bc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyMonthlyDao; import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity; import com.epmet.service.stats.FactTagUsedAgencyMonthlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java index ec83b4b9b6..9f80d9eeea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyQuarterlyDao; import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity; import com.epmet.service.stats.FactTagUsedAgencyQuarterlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyQuarterlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java index 32f24e5836..340bc6b5cc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedAgencyYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedAgencyYearlyDao; import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity; import com.epmet.service.stats.FactTagUsedAgencyYearlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedAgencyYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedAgencyYearlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java index f88f1f330a..ef85d1742f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentDailyDao; import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity; import com.epmet.service.stats.FactTagUsedDepartmentDailyService; @@ -40,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentDailyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java index e0411038be..81bea68cf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentMonthlyDao; import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity; import com.epmet.service.stats.FactTagUsedDepartmentMonthlyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentMonthlyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java index bb51750412..5b0abbbeec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentQuarterlyDao; import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity; import com.epmet.service.stats.FactTagUsedDepartmentQuarterlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentQuarterlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java index 6614095001..fb66d73fe2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedDepartmentYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedDepartmentYearlyDao; import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity; import com.epmet.service.stats.FactTagUsedDepartmentYearlyService; @@ -38,6 +40,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedDepartmentYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedDepartmentYearlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java index 95081992f2..dc0411850b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridDailyDao; import com.epmet.entity.stats.FactTagUsedGridDailyEntity; import com.epmet.service.stats.FactTagUsedGridDailyService; @@ -40,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridDailyServiceImpl extends BaseServiceImpl implements FactTagUsedGridDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java index 05dc9a8942..c62068bee9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridMonthlyDao; import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity; import com.epmet.service.stats.FactTagUsedGridMonthlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridMonthlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java index 4e6bf21e2c..d4e34af163 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridQuarterlyDao; import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity; import com.epmet.service.stats.FactTagUsedGridQuarterlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridQuarterlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridQuarterlyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java index 02c7902ec2..ec981e83ea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagUsedGridYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagUsedGridYearlyDao; import com.epmet.entity.stats.FactTagUsedGridYearlyEntity; import com.epmet.service.stats.FactTagUsedGridYearlyService; @@ -37,6 +39,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagUsedGridYearlyServiceImpl extends BaseServiceImpl implements FactTagUsedGridYearlyService { @Override From eee09a3a1beb81ab86026a169d3004c0e8d039af Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 12:15:33 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E7=BB=B4=E5=BA=A6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/stats/impl/DimAgencyServiceImpl.java | 1 + .../service/stats/impl/DimCustomerServiceImpl.java | 3 +++ .../service/stats/impl/DimDateServiceImpl.java | 12 ++++++++---- .../stats/impl/DimDepartmentServiceImpl.java | 3 +++ .../service/stats/impl/DimGridServiceImpl.java | 5 +++-- .../service/stats/impl/DimMonthServiceImpl.java | 8 ++++---- .../service/stats/impl/DimQuarterServiceImpl.java | 13 ++++++++----- .../service/stats/impl/DimWeekServiceImpl.java | 7 ++++--- .../service/stats/impl/DimYearServiceImpl.java | 7 ++++--- 9 files changed, 38 insertions(+), 21 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java index d24fec3ee8..a6a257cb6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java @@ -55,6 +55,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimAgencyServiceImpl extends BaseServiceImpl implements DimAgencyService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java index 384c07c6da..cd5a1bad1d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimCustomerServiceImpl.java @@ -19,12 +19,14 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimCustomerDao; @@ -52,6 +54,7 @@ import java.util.Map; */ @Service @Slf4j +@DataSource(DataSourceConstant.STATS) public class DimCustomerServiceImpl extends BaseServiceImpl implements DimCustomerService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java index b754794b8a..9860f1937c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDateServiceImpl.java @@ -19,17 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; -import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimDateDao; import com.epmet.dto.stats.DimDateDTO; import com.epmet.entity.stats.DimDateEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimDateService; import com.epmet.service.stats.LastExecRecordService; import com.epmet.util.DimIdGenerator; @@ -39,7 +39,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.*; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; /** * 日期维度表 @@ -48,6 +51,7 @@ import java.util.*; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimDateServiceImpl extends BaseServiceImpl implements DimDateService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java index 2c6fc13d8c..bbc261910c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimDepartmentServiceImpl.java @@ -19,10 +19,12 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimDepartmentDao; @@ -50,6 +52,7 @@ import java.util.Map; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class DimDepartmentServiceImpl extends BaseServiceImpl implements DimDepartmentService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java index cf1b8810ea..aa4091f60b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java @@ -19,12 +19,14 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimGridDao; import com.epmet.dao.stats.LastExecRecordDao; @@ -33,9 +35,7 @@ import com.epmet.dto.group.result.AgencyGridInfoResultDTO; import com.epmet.dto.group.result.SubAgencyIdResultDTO; import com.epmet.dto.stats.DimGridDTO; import com.epmet.entity.stats.DimGridEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimGridService; -import com.epmet.service.stats.LastExecRecordService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -53,6 +53,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimGridServiceImpl extends BaseServiceImpl implements DimGridService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java index 30dd3e210d..4cc6e03fd3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimMonthServiceImpl.java @@ -19,23 +19,22 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; -import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimMonthDao; import com.epmet.dto.stats.DimMonthDTO; import com.epmet.entity.stats.DimMonthEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimMonthService; import com.epmet.service.stats.LastExecRecordService; import com.epmet.util.DimIdGenerator; import org.apache.commons.lang3.StringUtils; import org.joda.time.LocalDate; -import org.joda.time.LocalTime; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -52,6 +51,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimMonthServiceImpl extends BaseServiceImpl implements DimMonthService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java index a6e38147c3..5bad47d7f0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimQuarterServiceImpl.java @@ -19,21 +19,20 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; -import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimQuarterDao; import com.epmet.dto.stats.DimQuarterDTO; import com.epmet.entity.stats.DimQuarterEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimQuarterService; import com.epmet.service.stats.LastExecRecordService; import com.epmet.util.DimIdGenerator; -import com.sun.org.apache.xpath.internal.operations.Bool; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,7 +40,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.*; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; /** * 季度维度表 @@ -50,6 +52,7 @@ import java.util.*; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimQuarterServiceImpl extends BaseServiceImpl implements DimQuarterService { private Logger logger = LoggerFactory.getLogger(getClass()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java index 67d733976f..26e5815422 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimWeekServiceImpl.java @@ -19,17 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; -import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimWeekDao; import com.epmet.dto.stats.DimWeekDTO; import com.epmet.entity.stats.DimWeekEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimWeekService; import com.epmet.service.stats.LastExecRecordService; import org.apache.commons.lang3.StringUtils; @@ -50,6 +50,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimWeekServiceImpl extends BaseServiceImpl implements DimWeekService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java index 1c51a6babe..a1ed3bd2f3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimYearServiceImpl.java @@ -19,17 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; -import com.epmet.constant.StatsSubject; import com.epmet.dao.stats.DimYearDao; import com.epmet.dto.stats.DimYearDTO; import com.epmet.entity.stats.DimYearEntity; -import com.epmet.entity.stats.LastExecRecordEntity; import com.epmet.service.stats.DimYearService; import com.epmet.service.stats.LastExecRecordService; import org.apache.commons.lang3.StringUtils; @@ -50,6 +50,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class DimYearServiceImpl extends BaseServiceImpl implements DimYearService { @Autowired From 537fc4355d76ee90926f33cb863408ee935be01b Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 13:22:23 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stats/impl/FactAgencyProjectDailyServiceImpl.java | 3 +++ .../impl/FactAgencyProjectMonthlyServiceImpl.java | 3 +++ .../FactArticlePublishedAgencyDailyServiceImpl.java | 3 +++ ...FactArticlePublishedDepartmentDailyServiceImpl.java | 3 +++ .../impl/FactArticlePublishedGridDailyServiceImpl.java | 3 +++ .../stats/impl/FactGridProjectDailyServiceImpl.java | 3 +++ .../stats/impl/FactGridProjectMonthlyServiceImpl.java | 3 +++ .../stats/impl/FactGroupAgencyDailyServiceImpl.java | 6 ++++-- .../stats/impl/FactGroupAgencyMonthlyServiceImpl.java | 5 ++++- .../stats/impl/FactGroupGridDailyServiceImpl.java | 10 ++++++---- .../stats/impl/FactIssueAgencyDailyServiceImpl.java | 6 ++++-- .../stats/impl/FactIssueAgencyMonthlyServiceImpl.java | 6 ++++-- .../stats/impl/FactIssueGridDailyServiceImpl.java | 6 ++++-- .../stats/impl/FactIssueGridMonthlyServiceImpl.java | 6 ++++-- .../impl/FactTagViewedAgencyDailyServiceImpl.java | 3 +++ .../impl/FactTagViewedAgencyMonthlyServiceImpl.java | 3 +++ .../impl/FactTagViewedAgencyQuarterlyServiceImpl.java | 3 +++ .../impl/FactTagViewedAgencyYearlyServiceImpl.java | 3 +++ .../stats/impl/FactTagViewedGridDailyServiceImpl.java | 3 +++ .../impl/FactTagViewedGridMonthlyServiceImpl.java | 3 +++ .../impl/FactTagViewedGridQuarterlyServiceImpl.java | 3 +++ .../stats/impl/FactTagViewedGridYearlyServiceImpl.java | 3 +++ .../service/stats/impl/LastExecRecordServiceImpl.java | 6 ++++-- 23 files changed, 79 insertions(+), 17 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java index bbb1b39e44..ddf18955ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactAgencyProjectDailyDao; import com.epmet.dto.project.form.MonthProjectListFormDTO; import com.epmet.entity.stats.FactAgencyProjectDailyEntity; @@ -33,6 +35,7 @@ import java.util.List; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactAgencyProjectDailyServiceImpl extends BaseServiceImpl implements FactAgencyProjectDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java index df869107f9..f96333f178 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectMonthlyServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactAgencyProjectMonthlyDao; import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; import com.epmet.service.stats.FactAgencyProjectMonthlyService; @@ -30,6 +32,7 @@ import org.springframework.stereotype.Service; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactAgencyProjectMonthlyServiceImpl extends BaseServiceImpl implements FactAgencyProjectMonthlyService { /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java index 9068ca2bdb..c12d4b176f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedAgencyDailyServiceImpl.java @@ -18,7 +18,9 @@ package com.epmet.service.stats.impl; import com.alibaba.fastjson.JSON; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactArticlePublishedAgencyDailyDao; import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity; import com.epmet.service.stats.FactArticlePublishedAgencyDailyService; @@ -37,6 +39,7 @@ import java.util.Collection; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactArticlePublishedAgencyDailyServiceImpl extends BaseServiceImpl implements FactArticlePublishedAgencyDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java index 6f9e172dce..b21b0bb942 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedDepartmentDailyServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactArticlePublishedDepartmentDailyDao; import com.epmet.entity.stats.FactArticlePublishedDepartmentDailyEntity; import com.epmet.service.stats.FactArticlePublishedDepartmentDailyService; @@ -35,6 +37,7 @@ import java.util.Collection; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactArticlePublishedDepartmentDailyServiceImpl extends BaseServiceImpl implements FactArticlePublishedDepartmentDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java index c13a282916..9ad55d632f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactArticlePublishedGridDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactArticlePublishedGridDailyDao; import com.epmet.entity.stats.FactArticlePublishedAgencyDailyEntity; import com.epmet.entity.stats.FactArticlePublishedGridDailyEntity; @@ -41,6 +43,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactArticlePublishedGridDailyServiceImpl extends BaseServiceImpl implements FactArticlePublishedGridDailyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java index 1b54cd7686..d585bbfda7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectDailyServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactGridProjectDailyDao; import com.epmet.dto.project.form.MonthProjectListFormDTO; import com.epmet.entity.stats.FactAgencyProjectDailyEntity; @@ -34,6 +36,7 @@ import java.util.List; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactGridProjectDailyServiceImpl extends BaseServiceImpl implements FactGridProjectDailyService { /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java index 1d026d2891..4677b1dfa5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGridProjectMonthlyServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactGridProjectMonthlyDao; import com.epmet.entity.stats.FactAgencyProjectMonthlyEntity; import com.epmet.entity.stats.FactGridProjectMonthlyEntity; @@ -31,6 +33,7 @@ import org.springframework.stereotype.Service; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactGridProjectMonthlyServiceImpl extends BaseServiceImpl implements FactGridProjectMonthlyService { /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java index 30262fc6f7..21df7a0da4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java @@ -19,11 +19,13 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactGroupAgencyDailyDao; import com.epmet.dto.group.form.AgencyMonthlyFormDTO; import com.epmet.dto.group.result.AgencyGroupDailyResultDTO; @@ -32,7 +34,6 @@ import com.epmet.dto.stats.FactGroupAgencyDailyDTO; import com.epmet.entity.stats.FactGroupAgencyDailyEntity; import com.epmet.service.stats.FactGroupAgencyDailyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -48,6 +49,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactGroupAgencyDailyServiceImpl extends BaseServiceImpl implements FactGroupAgencyDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java index a9ba8ff7ac..5411842a38 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyMonthlyServiceImpl.java @@ -19,11 +19,13 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactGroupAgencyMonthlyDao; import com.epmet.dto.group.form.AgencyMonthlyFormDTO; import com.epmet.dto.stats.FactGroupAgencyMonthlyDTO; @@ -44,6 +46,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactGroupAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactGroupAgencyMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java index 6556ba92b6..d59d82e1e0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupGridDailyServiceImpl.java @@ -19,17 +19,18 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.group.result.GroupGridDailyResultDTO; -import com.epmet.dto.stats.FactGroupGridDailyDTO; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactGroupGridDailyDao; +import com.epmet.dto.group.result.GroupGridDailyResultDTO; +import com.epmet.dto.stats.FactGroupGridDailyDTO; import com.epmet.entity.stats.FactGroupGridDailyEntity; import com.epmet.service.StatsGroupService; -import com.epmet.service.group.GroupDataService; import com.epmet.service.stats.FactGroupGridDailyService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -47,6 +48,7 @@ import java.util.Map; * @since v1.0.0 2020-06-16 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactGroupGridDailyServiceImpl extends BaseServiceImpl implements FactGroupGridDailyService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java index e6007e90d2..7f8b199438 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyDailyServiceImpl.java @@ -19,16 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactIssueAgencyDailyDao; import com.epmet.dto.stats.FactIssueAgencyDailyDTO; import com.epmet.entity.stats.FactIssueAgencyDailyEntity; import com.epmet.service.stats.FactIssueAgencyDailyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -43,6 +44,7 @@ import java.util.Map; * @since v1.0.0 2020-06-17 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactIssueAgencyDailyServiceImpl extends BaseServiceImpl implements FactIssueAgencyDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java index 7215ecb179..2c3b7d46af 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueAgencyMonthlyServiceImpl.java @@ -19,16 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactIssueAgencyMonthlyDao; import com.epmet.dto.stats.FactIssueAgencyMonthlyDTO; import com.epmet.entity.stats.FactIssueAgencyMonthlyEntity; import com.epmet.service.stats.FactIssueAgencyMonthlyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -43,6 +44,7 @@ import java.util.Map; * @since v1.0.0 2020-06-17 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactIssueAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactIssueAgencyMonthlyService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java index 063e2ef8c5..e076194ef0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridDailyServiceImpl.java @@ -19,16 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactIssueGridDailyDao; import com.epmet.dto.stats.FactIssueGridDailyDTO; import com.epmet.entity.stats.FactIssueGridDailyEntity; import com.epmet.service.stats.FactIssueGridDailyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -43,6 +44,7 @@ import java.util.Map; * @since v1.0.0 2020-06-17 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactIssueGridDailyServiceImpl extends BaseServiceImpl implements FactIssueGridDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java index d3b0468011..97d6f29242 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactIssueGridMonthlyServiceImpl.java @@ -19,16 +19,17 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactIssueGridMonthlyDao; import com.epmet.dto.stats.FactIssueGridMonthlyDTO; import com.epmet.entity.stats.FactIssueGridMonthlyEntity; import com.epmet.service.stats.FactIssueGridMonthlyService; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -43,6 +44,7 @@ import java.util.Map; * @since v1.0.0 2020-06-17 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactIssueGridMonthlyServiceImpl extends BaseServiceImpl implements FactIssueGridMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.java index 9e9500e96e..180be0459a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedAgencyDailyDao; import com.epmet.entity.stats.FactTagViewedAgencyDailyEntity; import com.epmet.service.stats.FactTagViewedAgencyDailyService; @@ -39,6 +41,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedAgencyDailyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java index 0b7f08a6ed..3a56ffddc3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedAgencyMonthlyDao; import com.epmet.entity.stats.FactTagViewedAgencyMonthlyEntity; import com.epmet.service.stats.FactTagViewedAgencyMonthlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedAgencyMonthlyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java index ba226febc9..6c69a4e92f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedAgencyQuarterlyDao; import com.epmet.entity.stats.FactTagViewedAgencyQuarterlyEntity; import com.epmet.service.stats.FactTagViewedAgencyQuarterlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedAgencyQuarterlyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyQuarterlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java index d5a0f0c123..3be2719703 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedAgencyYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedAgencyYearlyDao; import com.epmet.entity.stats.FactTagViewedAgencyYearlyEntity; import com.epmet.service.stats.FactTagViewedAgencyYearlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedAgencyYearlyServiceImpl extends BaseServiceImpl implements FactTagViewedAgencyYearlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java index 2f3d9c0781..c129d5f7f3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridDailyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedGridDailyDao; import com.epmet.entity.stats.FactTagViewedGridDailyEntity; import com.epmet.service.stats.FactTagViewedGridDailyService; @@ -40,6 +42,7 @@ import java.util.List; */ @Slf4j @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedGridDailyServiceImpl extends BaseServiceImpl implements FactTagViewedGridDailyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java index 59e0726914..771d6acb30 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridMonthlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedGridMonthlyDao; import com.epmet.entity.stats.FactTagViewedGridMonthlyEntity; import com.epmet.service.stats.FactTagViewedGridMonthlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedGridMonthlyServiceImpl extends BaseServiceImpl implements FactTagViewedGridMonthlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java index 1671a6f4ef..e34601b5fc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridQuarterlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedGridQuarterlyDao; import com.epmet.entity.stats.FactTagViewedGridQuarterlyEntity; import com.epmet.service.stats.FactTagViewedGridQuarterlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedGridQuarterlyServiceImpl extends BaseServiceImpl implements FactTagViewedGridQuarterlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java index a7dd6a6242..00bcb8a245 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactTagViewedGridYearlyServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.stats.FactTagViewedGridYearlyDao; import com.epmet.entity.stats.FactTagViewedGridYearlyEntity; import com.epmet.service.stats.FactTagViewedGridYearlyService; @@ -36,6 +38,7 @@ import java.util.List; * @since v1.0.0 2020-06-18 */ @Service +@DataSource(DataSourceConstant.STATS) public class FactTagViewedGridYearlyServiceImpl extends BaseServiceImpl implements FactTagViewedGridYearlyService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java index ba6e33d157..f37ac3b712 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/LastExecRecordServiceImpl.java @@ -1,5 +1,7 @@ package com.epmet.service.stats.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.RobotConstant; import com.epmet.dao.stats.LastExecRecordDao; import com.epmet.entity.stats.LastExecRecordEntity; @@ -7,13 +9,13 @@ import com.epmet.service.stats.LastExecRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.Date; - @Service +@DataSource(DataSourceConstant.STATS) public class LastExecRecordServiceImpl implements LastExecRecordService { @Autowired private LastExecRecordDao lastExecRecordDao; + @Override public LastExecRecordEntity getLastExecRecord(String statsSubject) { return lastExecRecordDao.getLastExecRecord(statsSubject); } From 38ece9f7bf95e05dda7b8fb85bd9d07ca175da5e Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 14:19:43 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=B8=8D=E8=AF=A5?= =?UTF-8?q?=E6=9C=89=E7=9A=84=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java index a6a257cb6f..ee4c56db29 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java @@ -211,7 +211,6 @@ public class DimAgencyServiceImpl extends BaseServiceImpl getAgencyListByCustomerId(String customerId) { if (StringUtils.isBlank(customerId)){ From d5ee8b7da8ad2c90b405a3bd761457c0df04e98c Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 15 Sep 2020 14:31:38 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E8=AE=AE?= =?UTF-8?q?=E9=A2=98summary+=E8=AE=AE=E9=A2=98=E8=B6=8B=E5=8A=BF=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 2 +- .../dto/result/issue/KcIssueSummary.java | 18 ++ .../result/issue/KcPartiTrendResultDTO.java | 16 ++ .../controller/screen/KcScreenController.java | 31 ++++ .../ScreenKcIssueSummaryGridDailyDao.java | 3 + .../ScreenKcIssueTrendGridMonthlyDao.java | 6 + .../ScreenKcIssueSummaryGridDailyDTO.java | 156 ++++++++++++++++++ .../ScreenKcIssueTrendGridMonthlyDTO.java | 106 ++++++++++++ .../screen/KcScreenService.java | 6 + .../screen/impl/KcScreenServiceImpl.java | 32 ++++ .../ScreenKcIssueSummaryGridDailyDao.xml | 8 + .../ScreenKcIssueTrendGridMonthlyDao.xml | 8 + .../ScreenKcIssueSummaryGridDailyDao.xml | 17 +- .../ScreenKcIssueTrendGridMonthlyDao.xml | 10 +- 14 files changed, 415 insertions(+), 4 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml diff --git a/epmet-cloud-generator/src/main/resources/application.yml b/epmet-cloud-generator/src/main/resources/application.yml index 8e526e2a73..49dbbb94d5 100644 --- a/epmet-cloud-generator/src/main/resources/application.yml +++ b/epmet-cloud-generator/src/main/resources/application.yml @@ -9,7 +9,7 @@ spring: type: com.alibaba.druid.pool.DruidDataSource #MySQL配置 driverClassName: com.mysql.jdbc.Driver - url: jdbc:mysql://192.168.1.130:3306/epmet_gov_voice?useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://192.168.1.130:3306/epmet_evaluation_index?useUnicode=true&characterEncoding=UTF-8&useSSL=false username: epmet_dba password: EpmEt-dbA-UsEr #oracle配置 diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java new file mode 100644 index 0000000000..9ae403b1c2 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcIssueSummary.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +@Data +public class KcIssueSummary { + + private String dateId; + private Integer reportCount; + private Integer issueCount; + private Integer pendingCount; + private Integer rejectedCount; + private Integer processingCount; + private Integer closedCount; + private Integer issueViewCount; + private Integer voteCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java new file mode 100644 index 0000000000..5b7db61bbb --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/KcPartiTrendResultDTO.java @@ -0,0 +1,16 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class KcPartiTrendResultDTO { + + private String monthId; + private Integer reportCount; + + private List xAxis = new ArrayList<>(); + private List reportCountDataList = new ArrayList<>(); +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index f945c8c43f..46d86bb709 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -7,6 +7,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; +import com.epmet.dto.result.issue.KcIssueSummary; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -61,6 +64,34 @@ public class KcScreenController { public Result heartActcounttrend(ExternalAppRequestParam externalAppRequestParam){ return new Result().ok(kcScreenService.heartActcounttrend(externalAppRequestParam)); } + /** + * 议题分析-各类总数 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/summary") + public Result getIssueSummary(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + KcIssueSummary issueSummary = kcScreenService.getIssueSummary(customerId); + return new Result().ok(issueSummary); + } + + /** + * 参与趋势 + * @param externalAppRequestParam + * @return + */ + //@ExternalAppRequestAuth + @PostMapping("issue/partitrend") + public Result getIssuePartiTrend(ExternalAppRequestParam externalAppRequestParam) { + //String customerId = externalAppRequestParam.getCustomerId(); + String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + KcPartiTrendResultDTO trendResultDTO = kcScreenService.getIssuePartiTrend(customerId); + return new Result().ok(trendResultDTO); + } + /** * @param externalAppRequestParam diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java index 2ec71f1d79..efc949d2fe 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.issue.KcIssueSummary; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * KC-议题分析(各类总数) @@ -28,4 +30,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcIssueSummaryGridDailyDao { + KcIssueSummary getIssueSummary(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java index 37edac5861..fb9d9918ba 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueTrendGridMonthlyDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * KC-议题参与趋势(每天上报当前月)customerId+monthId先删后增 @@ -28,4 +32,6 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcIssueTrendGridMonthlyDao { + List getIssuePartiTrend(@Param("customerId") String customerId); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java new file mode 100644 index 0000000000..605b75cf34 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueSummaryGridDailyDTO.java @@ -0,0 +1,156 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.datareport.dao.issue; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * KC-议题分析(各类总数) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-14 + */ +@Data +public class ScreenKcIssueSummaryGridDailyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键(先根据customerId+dateId删除,后插入) + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 数据更新至:yyyyMMdd + */ + private String dateId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 上报总数 + */ + private Integer reportCount; + + /** + * 议题总数 + */ + private Integer issueCount; + + /** + * 待审核数 + */ + private Integer pendingCount; + + /** + * 已驳回数 + */ + private Integer rejectedCount; + + /** + * 处理中数 + */ + private Integer processingCount; + + /** + * 已关闭数 + */ + private Integer closedCount; + + /** + * 议题浏览数 + */ + private Integer issueViewCount; + + /** + * 表态数 + */ + private Integer voteCount; + + /** + * 审核通过数 ?为了算议题效率 + */ + private Integer passedCount; + + /** + * 转化成项目数 ?为了算议题效率 + */ + private Integer shiftToProjectCount; + + /** + * 平均审核时间单位分钟 ? + */ + private Integer avgAuditTime; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java new file mode 100644 index 0000000000..527aaa443c --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/ScreenKcIssueTrendGridMonthlyDTO.java @@ -0,0 +1,106 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.datareport.dao.issue; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * KC-议题参与趋势(每天上报当前月)customerId+monthId先删后增 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-14 + */ +@Data +public class ScreenKcIssueTrendGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键(每天上报当前月),按照customerId+monthId先删除记录,再插入 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 月id :yyyyMM + */ + private String monthId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属的组织id + */ + private String parentAgencyId; + + /** + * 所有上级ID,用英文逗号分开 ? + */ + private String allParentIds; + + /** + * 议题上报数(本月内上报的议题数量) + */ + private Integer reportCount; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 448b032c21..3dce8b8545 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -5,6 +5,9 @@ import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import java.util.List; +import com.epmet.dto.result.issue.KcIssueSummary; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; /** * 孔村大屏api @@ -48,4 +51,7 @@ public interface KcScreenService { * @author sun */ List heartVolunteerrank(HeartVolunteerrankFormDTO formDTO); + KcIssueSummary getIssueSummary(String customerId); + + KcPartiTrendResultDTO getIssuePartiTrend(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index e86c1d7353..94bc4dcd55 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -5,16 +5,24 @@ import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screenkc.*; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueSummaryGridDailyDao; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueTrendGridMonthlyDao; +import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; +import com.epmet.dto.result.issue.KcIssueSummary; +import com.epmet.dto.result.issue.KcPartiTrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.LinkedList; import java.util.List; +import java.util.List; + /** * 孔村大屏api * @@ -27,6 +35,7 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private DateUtils dateUtils; + @Autowired private ScreenKcPlatformSummaryDailyDao screenKcPlatformSummaryDailyDao; @Autowired @@ -38,6 +47,12 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcVolunteerHeatRankGridDailyDao screenKcVolunteerHeatRankGridDailyDao; + @Autowired + private ScreenKcIssueSummaryGridDailyDao screenKcIssueSummaryGridDailyDao; + + @Autowired + private ScreenKcIssueTrendGridMonthlyDao trendGridMonthlyDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 @@ -118,4 +133,21 @@ public class KcScreenServiceImpl implements KcScreenService { return list; } + @Override + public KcIssueSummary getIssueSummary(String customerId) { + return screenKcIssueSummaryGridDailyDao.getIssueSummary(customerId); + } + + @Override + public KcPartiTrendResultDTO getIssuePartiTrend(String customerId) { + List trend = trendGridMonthlyDao.getIssuePartiTrend(customerId); + KcPartiTrendResultDTO result = new KcPartiTrendResultDTO(); + trend.stream().forEach(t -> { + String month = t.getMonthId().substring(4); + result.getXAxis().add(new Integer(month).toString().concat("月")); + result.getReportCountDataList().add(t.getReportCount()); + }); + return result; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml new file mode 100644 index 0000000000..607ea18a04 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueSummaryGridDailyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml new file mode 100644 index 0000000000..889b92ae59 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/ScreenKcIssueTrendGridMonthlyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml index 98b91d3ee3..8dfcc4e8a4 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml @@ -3,5 +3,20 @@ - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml index e9298902f1..731c8b8083 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueTrendGridMonthlyDao.xml @@ -3,6 +3,12 @@ - - + From 1813d6afa44dfcd4a8e05ae1e5bcbba692276f9d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 14:36:58 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E5=AD=94=E6=9D=91=E9=87=87=E9=9B=86api?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/screencoll/form/KcProjectSatisanalysisFormDTO.java | 6 +++--- .../com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java | 2 +- .../screen/ScreenKcProjectSatisGridMonthlyDao.xml | 6 +++--- .../evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java index 97843831e2..daccb603d2 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcProjectSatisanalysisFormDTO.java @@ -38,15 +38,15 @@ public class KcProjectSatisanalysisFormDTO implements Serializable { /** * 非常满意项目总数 */ - private Integer greatSatis; + private Integer greatSatisfaction; /** * 满意项目总数 */ - private Integer goodSatis; + private Integer goodSatisfaction; /** * 不满意的项目总数 */ - private Integer disSatis; + private Integer disSatisfaction; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java index cd9b0db555..79e7c0a448 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcUserSummaryFormDTO.java @@ -48,7 +48,7 @@ public class KcUserSummaryFormDTO implements Serializable { /** * 党员用户 */ - private Integer partyUserCount; + private Integer partyCount; /** * 小于20岁的党员总人数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml index 1147f687d5..740caa71e2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSatisGridMonthlyDao.xml @@ -59,9 +59,9 @@ #{item.gridName}, #{item.parentAgencyId}, #{item.allParentIds}, - #{item.greatSatis}, - #{item.goodSatis}, - #{item.disSatis}, + #{item.greatSatisfaction}, + #{item.goodSatisfaction}, + #{item.disSatisfaction}, 0, 0, 'APP_USER', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml index d1c0e9dea2..57bf0a99aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml @@ -77,7 +77,7 @@ #{item.allParentIds}, #{item.visitorCount}, #{item.regUserCount}, - #{item.partyUserCount}, + #{item.partyCount}, #{item.ageLevel1}, #{item.ageLevel2}, #{item.ageLevel3}, From 0d3f4a5f295afb3dd1b7f8787803e6370ba84be0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 14:59:06 +0800 Subject: [PATCH 08/16] =?UTF-8?q?18=E3=80=81=E9=82=BB=E9=87=8C=E5=85=9A?= =?UTF-8?q?=E7=BE=A4-=E5=B0=8F=E7=BB=84=E8=AF=A6=E6=83=85=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java | 3 ++- .../evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java index 8fc4130dbc..5e29044533 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcGroupDetailFormDTO.java @@ -63,5 +63,6 @@ public class KcGroupDetailFormDTO implements Serializable { /** * 转为议题的话题数 */ - private Integer shifitIssueCount; + private Integer shiftIssueCount; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml index e7cf3fa2cd..a4df878b37 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml @@ -70,7 +70,7 @@ #{item.groupLeader}, #{item.memberCount}, #{item.topicCount}, - #{item.shifitIssueCount}, + #{item.shiftIssueCount}, 0, 0, 'APP_USER', From f1b15209cd855cb1abd2496f437597f01a496aeb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 15:05:35 +0800 Subject: [PATCH 09/16] =?UTF-8?q?18=E3=80=81=E9=82=BB=E9=87=8C=E5=85=9A?= =?UTF-8?q?=E7=BE=A4-=E5=B0=8F=E7=BB=84=E8=AF=A6=E6=83=85=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9=20v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/ScreenKcActSummaryDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml | 2 +- .../evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml | 2 +- .../screen/ScreenKcProjectCategoryGridDailyDao.xml | 2 +- .../screen/ScreenKcProjectSummaryGridDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml | 2 +- .../evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml index 149c94e075..b7867b1098 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcActSummaryDailyDao.xml @@ -22,7 +22,7 @@ delete from screen_kc_act_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml index a4df878b37..c564c4ea3d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml @@ -27,7 +27,7 @@ delete from screen_kc_group_detail_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml index 833ca38965..380d1e540f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupSummaryGridDailyDao.xml @@ -26,7 +26,7 @@ delete from screen_kc_group_summary_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml index 57055dfcba..741fd14534 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcIssueSummaryGridDailyDao.xml @@ -32,7 +32,7 @@ delete from screen_kc_issue_summary_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml index 38d1b6cda4..64b3a8578a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsCategoryAnalysisDao.xml @@ -23,7 +23,7 @@ delete from screen_kc_news_category_analysis - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml index 9a29f845d8..f2cd35dd00 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcNewsSummaryDailyDao.xml @@ -21,7 +21,7 @@ delete from screen_kc_news_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml index ea2ca56f7d..855456a973 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcPlatformSummaryDailyDao.xml @@ -29,7 +29,7 @@ delete from screen_kc_platform_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml index a285d083b3..1a06d2959a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectCategoryGridDailyDao.xml @@ -24,7 +24,7 @@ delete from screen_kc_project_category_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml index 614ffac3af..cd19511251 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcProjectSummaryGridDailyDao.xml @@ -29,7 +29,7 @@ delete from screen_kc_project_summary_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml index 57bf0a99aa..001b32e398 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserSummaryDailyDao.xml @@ -32,7 +32,7 @@ delete from screen_kc_user_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml index 414ae85ecb..2e7de8203d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerSummaryDailyDao.xml @@ -29,7 +29,7 @@ delete from screen_kc_volunteer_summary_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID != #{dateId} + where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} limit 1000; From 9d06f21dbb7c3d04fd2377b5125fa0d8af54047a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 15:34:47 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E5=AD=94=E6=9D=91=EF=BC=9A=E5=88=A0?= =?UTF-8?q?=E9=99=A4screen=5Fkc=5Fuser=5Fheat=5Frank=5Fgrid=5Fdaily?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenKcUserHeatRankGridDailyDao.java | 31 ------ .../ScreenKcUserHeatRankGridDailyDao.xml | 7 -- .../ScreenKcUserHeatRankGridDailyDao.java | 33 ------- .../ScreenKcUserHeatRankGridDailyEntity.java | 96 ------------------- .../ScreenKcUserHeatRankGridDailyDao.xml | 28 ------ 5 files changed, 195 deletions(-) delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java delete mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java deleted file mode 100644 index dbd5ca3fc1..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcUserHeatRankGridDailyDao.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.datareport.dao.evaluationindex.screenkc; - -import org.apache.ibatis.annotations.Mapper; - -/** - * KC-用户公益时长排名(先根据customerId删除) - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-09-09 - */ -@Mapper -public interface ScreenKcUserHeatRankGridDailyDao { - -} diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml deleted file mode 100644 index 76f68580a1..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcUserHeatRankGridDailyDao.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java deleted file mode 100644 index 58ed6bf539..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dao.evaluationindex.screen; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.evaluationindex.screen.ScreenKcUserHeatRankGridDailyEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * KC-用户公益时长排名(先根据customerId删除) - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-09-09 - */ -@Mapper -public interface ScreenKcUserHeatRankGridDailyDao extends BaseDao { - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java deleted file mode 100644 index 03f18a5709..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcUserHeatRankGridDailyEntity.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.entity.evaluationindex.screen; - -import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -/** - * KC-用户公益时长排名(先根据customerId删除) - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-09-09 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("screen_kc_user_heat_rank_grid_daily") -public class ScreenKcUserHeatRankGridDailyEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 客户Id - */ - private String customerId; - - /** - * 数据更新至:yyyyMMdd - */ - private String dateId; - - /** - * 网格id - */ - private String gridId; - - /** - * 网格名称 - */ - private String gridName; - - /** - * 网格所属组织id - */ - private String parentAgencyId; - - /** - * 所有上级ID,用英文逗号分开 ? - */ - private String allParentIds; - - /** - * 用户id - */ - private String userId; - - /** - * 用户姓名 - */ - private String userName; - - /** - * 1志愿者 0不是志愿者 - */ - private Integer volunteerFlag; - - /** - * 爱心时长 单位分钟 - */ - private Integer heartTime; - - /** - * 积分 - */ - private Integer points; - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml deleted file mode 100644 index a8a3c2eff3..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcUserHeatRankGridDailyDao.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 8179fcfceec8ce29875e1afdbc18ac0297d6ebc6 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 15 Sep 2020 15:35:50 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F-?= =?UTF-8?q?=E9=82=BB=E9=87=8C=E5=85=9A=E7=BE=A4=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/GridNameGroupCountResultDTO.java | 26 ++++++ .../GroupGridgroupcountrankResultDTO.java | 28 ++++++ .../result/GroupPartitopictrendResultDTO.java | 28 ++++++ .../dto/result/GroupSummaryResultDTO.java | 48 ++++++++++ .../KcTopicTrendGridMonthlyResultDTO.java | 26 ++++++ .../controller/screen/KcScreenController.java | 35 ++++++++ .../ScreenKcGroupSummaryGridDailyDao.java | 18 ++++ .../ScreenKcTopicTrendGridMonthlyDao.java | 10 +++ ...ScreenKcVolunteerHeatRankGridDailyDao.java | 2 - .../screen/KcScreenService.java | 23 +++++ .../screen/impl/KcScreenServiceImpl.java | 89 +++++++++++++++++-- .../ScreenKcGroupSummaryGridDailyDao.xml | 53 +++++++++++ .../ScreenKcTopicTrendGridMonthlyDao.xml | 24 ++++- 13 files changed, 399 insertions(+), 11 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java new file mode 100644 index 0000000000..0f870ea551 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GridNameGroupCountResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 邻里党群-社群数量排名 + * @Author sun + */ +@Data +public class GridNameGroupCountResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 网格名称 + */ + private String gridName = ""; + + /** + * 社群数量 + */ + private Integer groupCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java new file mode 100644 index 0000000000..fc9799ef03 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupGridgroupcountrankResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 邻里党群-社群数量排名 + * @Author sun + */ +@Data +public class GroupGridgroupcountrankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 网格名称集合 + */ + private LinkedList gridNameDataList; + + /** + * 社群数量集合 + */ + private LinkedList groupCountDataList; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java new file mode 100644 index 0000000000..8eb7a406ae --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupPartitopictrendResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; + +/** + * 邻里党群-话题参与趋势 + * @Author sun + */ +@Data +public class GroupPartitopictrendResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 横坐标月份集合 + */ + private LinkedList xAxis; + + /** + * 话题数量 集合 + */ + private LinkedList actCountDataList; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java new file mode 100644 index 0000000000..31325b7b60 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupSummaryResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-各类总数汇总 + * @Author sun + */ +@Data +public class GroupSummaryResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 日期Id, 数据更新至:yyyyMMdd + */ + private String dateId = ""; + + /** + * 社群总数 + */ + private Integer groupCount = 0; + /** + * 群员总数 + */ + private Integer memberCount = 0; + /** + * 话题数量 + */ + private Integer topicCount = 0; + /** + * 话题参与量 + */ + private Integer partiCount = 0; + /** + * 转化议题率,这个后端自己算 + */ + private String shiftIssueRatio = ""; + /** + * 话题转议题总数 + */ + @JsonIgnore + private Integer shiftIssueCount = 0; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java new file mode 100644 index 0000000000..c7febe5772 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/KcTopicTrendGridMonthlyResultDTO.java @@ -0,0 +1,26 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 邻里党群-话题参与趋势 + * @Author sun + */ +@Data +public class KcTopicTrendGridMonthlyResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 月id :yyyyMM + */ + private String monthId = ""; + + /** + * 话题数量(所在月新增话题数) + */ + private Integer topicCount = 0; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index 46d86bb709..ce5efe3dba 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -117,4 +117,39 @@ public class KcScreenController { return new Result>().ok(kcScreenService.heartVolunteerrank(formDTO)); } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-各类总数 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/summary") + public Result groupSummary(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.groupSummary(externalAppRequestParam)); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题参与趋势 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/partitopictrend") + public Result groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.groupPartitopictrend(externalAppRequestParam)); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/gridgroupcountrank") + public Result groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(kcScreenService.groupGridgroupcountrank(externalAppRequestParam)); + } + + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java index 3b92aa4fa1..e6871db1b0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupSummaryGridDailyDao.java @@ -17,7 +17,12 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.GridNameGroupCountResultDTO; +import com.epmet.evaluationindex.screen.dto.result.GroupSummaryResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.LinkedList; /** * KC-小组分析各类总数(先根据customerId+dateId删除) @@ -28,4 +33,17 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcGroupSummaryGridDailyDao { + /** + * @param customerId + * @Description 邻里党群-各类总数 + * @author sun + */ + GroupSummaryResultDTO selectGroupSummaryDaily(@Param("customerId") String customerId); + + /** + * @param customerId + * @Description 按日期降序,查询客户最近一天所有网格数据,按每个网格的社区总数降序排列 + * @author sun + */ + LinkedList selectGridDailyList(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java index 8c8e181b0f..12ec47650b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcTopicTrendGridMonthlyDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.result.KcTopicTrendGridMonthlyResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * KC-话题参与趋势(先根据customerId+monthId删除) @@ -28,4 +32,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcTopicTrendGridMonthlyDao { + /** + * @param customerId + * @Description 按客户查询最近十二个月所有网格汇总数据 + * @author sun + */ + List selectActTrendMonthly(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java index cb57c5ef36..d7646b243d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcVolunteerHeatRankGridDailyDao.java @@ -18,10 +18,8 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; -import com.epmet.evaluationindex.screen.dto.result.HeartSummaryResultDTO; import com.epmet.evaluationindex.screen.dto.result.HeartVolunteerrankResultDTO; import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 3dce8b8545..0cbb285c2a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -54,4 +54,27 @@ public interface KcScreenService { KcIssueSummary getIssueSummary(String customerId); KcPartiTrendResultDTO getIssuePartiTrend(String customerId); + + + /** + * @param externalAppRequestParam + * @Description 邻里党群-各类总数 + * @author sun + */ + GroupSummaryResultDTO groupSummary(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题参与趋势 + * @author sun + */ + GroupPartitopictrendResultDTO groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam); + + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 94bc4dcd55..54a8df17e1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -5,24 +5,19 @@ import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screenkc.*; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueSummaryGridDailyDao; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueTrendGridMonthlyDao; -import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; -import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; -import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.dto.result.issue.KcIssueSummary; import com.epmet.dto.result.issue.KcPartiTrendResultDTO; -import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; +import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.text.NumberFormat; import java.util.LinkedList; import java.util.List; -import java.util.List; - /** * 孔村大屏api * @@ -53,6 +48,11 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcIssueTrendGridMonthlyDao trendGridMonthlyDao; + @Autowired + private ScreenKcGroupSummaryGridDailyDao screenKcGroupSummaryGridDailyDao; + @Autowired + private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 @@ -150,4 +150,77 @@ public class KcScreenServiceImpl implements KcScreenService { return result; } + /** + * @param externalAppRequestParam + * @Description 邻里党群-各类总数 + * @author sun + */ + @Override + public GroupSummaryResultDTO groupSummary(ExternalAppRequestParam externalAppRequestParam) { + //1.按客户查询最近一天各网格各项数据的汇总值 + GroupSummaryResultDTO resultDTO = screenKcGroupSummaryGridDailyDao.selectGroupSummaryDaily(externalAppRequestParam.getCustomerId()); + if (null == resultDTO) { + return new GroupSummaryResultDTO(); + } + + //2.计算转化议题率,保留两位小数 + if (resultDTO.getTopicCount() < NumConstant.ONE || resultDTO.getShiftIssueCount() < NumConstant.ONE) { + resultDTO.setShiftIssueRatio("0%"); + } else { + NumberFormat numberFormat = NumberFormat.getInstance(); + //设置精确到小数点后2位 + numberFormat.setMaximumFractionDigits(2); + String ratio = numberFormat.format((float) resultDTO.getShiftIssueCount() / (float) resultDTO.getTopicCount() * 100); + resultDTO.setShiftIssueRatio(ratio + "%"); + } + + return resultDTO; + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题参与趋势 + * @author sun + */ + @Override + public GroupPartitopictrendResultDTO groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam) { + GroupPartitopictrendResultDTO resultDTO = new GroupPartitopictrendResultDTO(); + LinkedList xAxis = new LinkedList<>(); + LinkedList actCountDataList = new LinkedList<>(); + //1.按客户查询最近十二个月所有网格汇总数据 + List list = screenKcTopicTrendGridMonthlyDao.selectActTrendMonthly(externalAppRequestParam.getCustomerId()); + //2.倒序遍历封装数据 + for (int i = list.size() - 1; i >= 0; i--) { + xAxis.add(list.get(i).getMonthId()); + actCountDataList.add(list.get(i).getTopicCount()); + } + //3.封装数据并返回 + resultDTO.setXAxis(xAxis); + resultDTO.setActCountDataList(actCountDataList); + return resultDTO; + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @Override + public GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam) { + GroupGridgroupcountrankResultDTO resultDTO = new GroupGridgroupcountrankResultDTO(); + LinkedList gridNameDataList = new LinkedList<>(); + LinkedList groupCountDataList = new LinkedList<>(); + //1.按日期降序,查询客户最近一天所有网格数据,按每个网格的社区总数降序排列 + LinkedList list = screenKcGroupSummaryGridDailyDao.selectGridDailyList(externalAppRequestParam.getCustomerId()); + //2.封装数据 + list.forEach(l -> { + gridNameDataList.add(l.getGridName()); + groupCountDataList.add(l.getGroupCount()); + }); + resultDTO.setGridNameDataList(gridNameDataList); + resultDTO.setGroupCountDataList(groupCountDataList); + + return resultDTO; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml index 03bbdb55c2..d461ab19d2 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupSummaryGridDailyDao.xml @@ -3,5 +3,58 @@ + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml index f6eb105077..5fed5bda9c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcTopicTrendGridMonthlyDao.xml @@ -4,5 +4,27 @@ - + From 1199124ccefd61a009a6f6d23fb35f228ea93097 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 15 Sep 2020 15:42:30 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=AD=94=E6=9D=91?= =?UTF-8?q?=E8=AE=AE=E9=A2=98=E5=A4=A7=E5=B1=8F=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/issue/IssueAvgAuditTimeDTO.java | 15 ++++++ .../result/issue/IssueEffectResultDTO.java | 11 +++++ .../result/issue/IssueGridTotalRankDTO.java | 18 ++++++++ .../controller/screen/KcScreenController.java | 46 +++++++++++++++++-- .../ScreenKcIssueSummaryGridDailyDao.java | 11 +++++ .../screen/KcScreenService.java | 10 +++- .../screen/impl/KcScreenServiceImpl.java | 28 +++++++++-- .../ScreenKcIssueSummaryGridDailyDao.xml | 40 +++++++++++++++- 8 files changed, 168 insertions(+), 11 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java new file mode 100644 index 0000000000..9e1b9c346b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueAvgAuditTimeDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class IssueAvgAuditTimeDTO { + + private String gridName; + private Integer avgAuditTime; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java new file mode 100644 index 0000000000..655df79505 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueEffectResultDTO.java @@ -0,0 +1,11 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +@Data +public class IssueEffectResultDTO { + + private Double reportEffectiveRatio; + private Double conversionRatio; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java new file mode 100644 index 0000000000..0ddfcfbf80 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/issue/IssueGridTotalRankDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result.issue; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +public class IssueGridTotalRankDTO { + + private String gridId; + private String gridName; + private Integer issueCount; + + private List gridNameDataList = new ArrayList<>(); + private List issueCountDataList = new ArrayList<>(); + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index 46d86bb709..1b605c16ba 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -5,6 +5,7 @@ import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; +import com.epmet.dto.result.issue.IssueGridTotalRankDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.dto.result.issue.KcIssueSummary; @@ -83,15 +84,54 @@ public class KcScreenController { * @param externalAppRequestParam * @return */ - //@ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("issue/partitrend") public Result getIssuePartiTrend(ExternalAppRequestParam externalAppRequestParam) { - //String customerId = externalAppRequestParam.getCustomerId(); - String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; KcPartiTrendResultDTO trendResultDTO = kcScreenService.getIssuePartiTrend(customerId); return new Result().ok(trendResultDTO); } + /** + * 按照议题总数排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/gridtotalrank") + public Result getIssueGridTotalRank(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getIssueGridTotalRank(customerId)); + } + + /** + * 议题分析-审核效率排名 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/avgaudittimerank") + public Result getAvgAuditTimeRank(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getAvgAuditTimeRank(customerId)); + } + + /** + * 议题分析-审核效率 + * @param externalAppRequestParam + * @return + */ + @ExternalAppRequestAuth + @PostMapping("issue/effective") + public Result getIssueEffective(ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + //String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933"; + return new Result().ok(kcScreenService.getIssueEffective(customerId)); + } + /** * @param externalAppRequestParam diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java index efc949d2fe..8693d6b52e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcIssueSummaryGridDailyDao.java @@ -17,10 +17,15 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.dto.result.issue.IssueAvgAuditTimeDTO; +import com.epmet.dto.result.issue.IssueEffectResultDTO; +import com.epmet.dto.result.issue.IssueGridTotalRankDTO; import com.epmet.dto.result.issue.KcIssueSummary; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * KC-议题分析(各类总数) * @@ -31,4 +36,10 @@ import org.apache.ibatis.annotations.Param; public interface ScreenKcIssueSummaryGridDailyDao { KcIssueSummary getIssueSummary(@Param("customerId") String customerId); + + List getIssueGridTotalRank(@Param("customerId") String customerId); + + List getAvgAuditTimeRank(@Param("customerId") String customerId); + + IssueEffectResultDTO getIssueEffective(@Param("customerId") String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index 3dce8b8545..d9e391b3f1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -1,12 +1,12 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.dto.result.issue.*; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import java.util.List; -import com.epmet.dto.result.issue.KcIssueSummary; -import com.epmet.dto.result.issue.KcPartiTrendResultDTO; + import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; /** @@ -54,4 +54,10 @@ public interface KcScreenService { KcIssueSummary getIssueSummary(String customerId); KcPartiTrendResultDTO getIssuePartiTrend(String customerId); + + IssueGridTotalRankDTO getIssueGridTotalRank(String customerId); + + List getAvgAuditTimeRank(String customerId); + + IssueEffectResultDTO getIssueEffective(String customerId); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 94bc4dcd55..41cd4dc4a5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -10,10 +10,9 @@ import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcIssueTrendGridM import com.epmet.datareport.dao.evaluationindex.screenkc.ScreenKcPlatformSummaryDailyDao; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; +import com.epmet.dto.result.issue.*; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; -import com.epmet.dto.result.issue.KcIssueSummary; -import com.epmet.dto.result.issue.KcPartiTrendResultDTO; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -21,8 +20,6 @@ import org.springframework.stereotype.Service; import java.util.LinkedList; import java.util.List; -import java.util.List; - /** * 孔村大屏api * @@ -150,4 +147,27 @@ public class KcScreenServiceImpl implements KcScreenService { return result; } + @Override + public IssueGridTotalRankDTO getIssueGridTotalRank(String customerId) { + List issueGridTotals = screenKcIssueSummaryGridDailyDao.getIssueGridTotalRank(customerId); + + IssueGridTotalRankDTO resultDTO = new IssueGridTotalRankDTO(); + issueGridTotals.stream().forEach(igt -> { + resultDTO.getGridNameDataList().add(igt.getGridName()); + resultDTO.getIssueCountDataList().add(igt.getIssueCount()); + }); + + return resultDTO; + } + + @Override + public List getAvgAuditTimeRank(String customerId) { + return screenKcIssueSummaryGridDailyDao.getAvgAuditTimeRank(customerId); + } + + @Override + public IssueEffectResultDTO getIssueEffective(String customerId) { + return screenKcIssueSummaryGridDailyDao.getIssueEffective(customerId); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml index 8dfcc4e8a4..1c12b7c53c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcIssueSummaryGridDailyDao.xml @@ -15,8 +15,44 @@ sum(VOTE_COUNT) voteCount from screen_kc_issue_summary_grid_daily t1 inner join ( - select t21.CUSTOMER_ID as customerId, max(t21.DATE_ID) max_date_id from screen_kc_issue_summary_grid_daily t21) t2 + select t21.CUSTOMER_ID as customerId, max(t21.DATE_ID) max_date_id from screen_kc_issue_summary_grid_daily t21 where t21.CUSTOMER_ID=#{customerId}) t2 on (t1.CUSTOMER_ID = t2.customerId and t1.DATE_ID = t2.max_date_id) - where t1.CUSTOMER_ID = #{customerId} + + + + + + + From 5caa4850b8a4ca91dd3955a9cdd63593067a0792 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 15 Sep 2020 15:48:21 +0800 Subject: [PATCH 13/16] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?@Autowired=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/impl/KcScreenServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 0aa8b129e8..4a0da15f41 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -52,6 +52,12 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcIssueTrendGridMonthlyDao trendGridMonthlyDao; + @Autowired + private ScreenKcGroupSummaryGridDailyDao screenKcGroupSummaryGridDailyDao; + + @Autowired + private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 From f374b582d7537dce786c53d9996918a650c5244e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 15 Sep 2020 15:54:35 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=E5=AD=94=E6=9D=91=EF=BC=9Agroup/detail?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml index c564c4ea3d..4dca3289ca 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcGroupDetailGridDailyDao.xml @@ -27,7 +27,7 @@ delete from screen_kc_group_detail_grid_daily - where CUSTOMER_ID = #{customerId} AND DATE_ID = #{dateId} + where CUSTOMER_ID = #{customerId} limit 1000; From 4e60223a0dfdc1547656b194f0e33da7d2c3e203 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 15 Sep 2020 16:27:41 +0800 Subject: [PATCH 15/16] =?UTF-8?q?=E5=AD=94=E6=9D=91=E5=A4=A7=E5=B1=8F-?= =?UTF-8?q?=E9=82=BB=E9=87=8C=E5=85=9A=E7=BE=A4=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GroupTopicShiftIssueRatioRankFormDTO.java | 32 +++++++++++ .../dto/form/GroupUserCountRankFormDTO.java | 32 +++++++++++ .../dto/form/HeartVolunteerrankFormDTO.java | 5 +- ...roupTopicShiftIssueRatioRankResultDTO.java | 33 +++++++++++ .../result/GroupUserCountRankResultDTO.java | 33 +++++++++++ .../controller/screen/KcScreenController.java | 28 +++++++++ .../ScreenKcGroupDetailGridDailyDao.java | 19 +++++++ .../screen/KcScreenService.java | 15 +++++ .../screen/impl/KcScreenServiceImpl.java | 33 +++++++++++ .../screenkc/ScreenKcActTrendMonthlyDao.xml | 3 +- .../ScreenKcGroupDetailGridDailyDao.xml | 57 +++++++++++++++++++ 11 files changed, 285 insertions(+), 5 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java new file mode 100644 index 0000000000..fc1a44996d --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupTopicShiftIssueRatioRankFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.evaluationindex.screen.dto.form; + + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + +/** + * 邻里党群-社群人数排名-接口入参 + * @Author sun + */ +@Data +public class GroupTopicShiftIssueRatioRankFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageNo; + /** + * 页容量,默认10页 + */ + @Min(value = 1, message = "每页条数必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageSize; + /** + * 客户Id + */ + private String customerId; + public interface AddUserInternalGroup {} + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java new file mode 100644 index 0000000000..4b6c4a80ef --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/GroupUserCountRankFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.evaluationindex.screen.dto.form; + + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + +/** + * 邻里党群-社群人数排名-接口入参 + * @Author sun + */ +@Data +public class GroupUserCountRankFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageNo; + /** + * 页容量,默认10页 + */ + @Min(value = 1, message = "每页条数必须大于0", groups = { AddUserInternalGroup.class }) + private Integer pageSize; + /** + * 客户Id + */ + private String customerId; + public interface AddUserInternalGroup {} + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java index cca3eb4f1b..e4beb2b1cd 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/HeartVolunteerrankFormDTO.java @@ -1,11 +1,9 @@ package com.epmet.evaluationindex.screen.dto.form; -import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.Min; -import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -15,6 +13,7 @@ import java.io.Serializable; @Data public class HeartVolunteerrankFormDTO implements Serializable { private static final long serialVersionUID = -2880432640584616651L; + public interface AddUserInternalGroup {} /** * 页码,从1开始 */ @@ -29,5 +28,5 @@ public class HeartVolunteerrankFormDTO implements Serializable { * 客户Id */ private String customerId; - public interface AddUserInternalGroup {} + } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java new file mode 100644 index 0000000000..d1068120bf --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupTopicShiftIssueRatioRankResultDTO.java @@ -0,0 +1,33 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名 + * @Author sun + */ +@Data +public class GroupTopicShiftIssueRatioRankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 小组id + */ + private String groupId = ""; + /** + * 小组名称 + */ + private String groupName = ""; + /** + * 话题数量 + */ + private Integer topicCount = 0; + /** + * 群主名称 + */ + private String groupLeader = ""; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java new file mode 100644 index 0000000000..d183b967c4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GroupUserCountRankResultDTO.java @@ -0,0 +1,33 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公益互助-个人(志愿者)公益时长排名 + * @Author sun + */ +@Data +public class GroupUserCountRankResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 小组id + */ + private String groupId = ""; + /** + * 小组名称 + */ + private String groupName = ""; + /** + * 群成员数 + */ + private Integer memberCount = 0; + /** + * 群主名称 + */ + private String groupLeader = ""; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java index fd239ba96a..dd23d63b0e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java @@ -6,6 +6,8 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.dto.result.issue.IssueGridTotalRankDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.dto.result.issue.KcIssueSummary; @@ -191,5 +193,31 @@ public class KcScreenController { return new Result().ok(kcScreenService.groupGridgroupcountrank(externalAppRequestParam)); } + /** + * @param externalAppRequestParam + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/usercountrank") + public Result> groupUserCountRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody GroupUserCountRankFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, GroupUserCountRankFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); + return new Result>().ok(kcScreenService.groupUserCountRank(formDTO)); + } + + /** + * @param externalAppRequestParam + * @Description 邻里党群-话题数量排名 + * @author sun + */ + @ExternalAppRequestAuth + @PostMapping("group/topicshiftissueratiorank") + public Result> groupTopicShiftIssueRatioRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody GroupTopicShiftIssueRatioRankFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, GroupTopicShiftIssueRatioRankFormDTO.AddUserInternalGroup.class); + formDTO.setCustomerId(externalAppRequestParam.getCustomerId()); + return new Result>().ok(kcScreenService.groupTopicShiftIssueRatioRank(formDTO)); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java index 8ab08ef8ce..23e6e5afbd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screenkc/ScreenKcGroupDetailGridDailyDao.java @@ -17,8 +17,14 @@ package com.epmet.datareport.dao.evaluationindex.screenkc; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.GroupTopicShiftIssueRatioRankResultDTO; +import com.epmet.evaluationindex.screen.dto.result.GroupUserCountRankResultDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * KC-小组详情(先根据customerId+dateId删除) * @@ -28,4 +34,17 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenKcGroupDetailGridDailyDao { + /** + * @param formDTO + * @Description 按客户查询最近一天所有网格数据 再按社群总数降序排列 + * @author sun + */ + List selectGroupUserCountRankList(GroupUserCountRankFormDTO formDTO); + + /** + * @param formDTO + * @Description 按客户查询最近一天所有网格数据 再按话题总数降序排列 + * @author sun + */ + List selectGroupTopicShiftIssueRatioRankList(GroupTopicShiftIssueRatioRankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java index bd2c2d8105..3debd0a626 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java @@ -2,6 +2,8 @@ package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.dto.result.issue.*; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; @@ -83,4 +85,17 @@ public interface KcScreenService { */ GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam); + /** + * @param formDTO + * @Description 邻里党群-社群数量排名 + * @author sun + */ + List groupUserCountRank(GroupUserCountRankFormDTO formDTO); + + /** + * @param formDTO + * @Description 邻里党群-话题数量排名 + * @author sun + */ + List groupTopicShiftIssueRatioRank(GroupTopicShiftIssueRatioRankFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java index 4a0da15f41..074221dd24 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java @@ -8,6 +8,8 @@ import com.epmet.datareport.dao.evaluationindex.screenkc.*; import com.epmet.datareport.service.evaluationindex.screen.KcScreenService; import com.epmet.datareport.utils.DateUtils; import com.epmet.dto.result.issue.*; +import com.epmet.evaluationindex.screen.dto.form.GroupTopicShiftIssueRatioRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.GroupUserCountRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.HeartVolunteerrankFormDTO; import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO; @@ -58,6 +60,9 @@ public class KcScreenServiceImpl implements KcScreenService { @Autowired private ScreenKcTopicTrendGridMonthlyDao screenKcTopicTrendGridMonthlyDao; + @Autowired + private ScreenKcGroupDetailGridDailyDao screenKcGroupDetailGridDailyDao; + /** * @param externalAppRequestParam * @Description 首页-平台各类总数 @@ -251,4 +256,32 @@ public class KcScreenServiceImpl implements KcScreenService { return resultDTO; } + /** + * @param formDTO + * @Description 邻里党群-社群数量排名 + * @author sun + */ + @Override + public List groupUserCountRank(GroupUserCountRankFormDTO formDTO) { + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + //按客户查询最近一天所有网格数据 再按社群总数降序排列 + List list = screenKcGroupDetailGridDailyDao.selectGroupUserCountRankList(formDTO); + return list; + } + + /** + * @param formDTO + * @Description 邻里党群-话题数量排名 + * @author sun + */ + @Override + public List groupTopicShiftIssueRatioRank(GroupTopicShiftIssueRatioRankFormDTO formDTO) { + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + //按客户查询最近一天所有网格数据 再按话题总数降序排列 + List list = screenKcGroupDetailGridDailyDao.selectGroupTopicShiftIssueRatioRankList(formDTO); + return list; + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml index a7062885ce..47ae608fc3 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcActTrendMonthlyDao.xml @@ -4,8 +4,7 @@ - SELECT month_id AS "monthId", act_count AS "actCount" diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml index 618e712bff..c0d3133d95 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screenkc/ScreenKcGroupDetailGridDailyDao.xml @@ -3,5 +3,62 @@ + + + From d1226a2d4b39a18405e7b175a1d5069697bfb485 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 15 Sep 2020 17:15:18 +0800 Subject: [PATCH 16/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/constant/IndexCalConstant.java | 4 ++-- .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 49057915f6..0cdc0e82ef 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -15,11 +15,11 @@ public interface IndexCalConstant { /** * 批量删除 一次删除50 */ - Integer DELETE_SIZE=1000; + Integer DELETE_SIZE = 1000; /** * 分批计算,一次计算 10条 */ - Integer PAGE_SIZE = 1000; + Integer PAGE_SIZE = 800; String GRID_ID="GRID_ID"; 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 0de8be20fc..de744b8553 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 @@ -84,7 +84,10 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { List list = null; Map preLastCpcScoreTotalMap = new HashMap<>(); + //当前最后一条记录 CpcScoreEntity currentLastCpcScore = null; + //当前第一条记录 + CpcScoreEntity currentFirstCpcScore = null; do { //获取数据 list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), (pageNo - NumConstant.ONE) * pageSize, pageSize); @@ -94,8 +97,11 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } else { //获取最后一条 currentLastCpcScore = list.get(list.size() - 1); - if (preLastCpcScoreTotalMap.containsKey(currentLastCpcScore.getUserId())) { + //获取第一条 + currentFirstCpcScore = list.get(0); + if (preLastCpcScoreTotalMap.containsKey(currentFirstCpcScore.getUserId())) { cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap); + preLastCpcScoreTotalMap.clear(); preLastCpcScoreTotalMap.put(currentLastCpcScore.getUserId(), null); } Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId));