+
+
+ local
+
+ true
+
+
+ 8109
+ local
+
+
+
+
+
+ epmet_data_statistical_user
+ EpmEt-db-UsEr
+
+
+
+
+
+ epmet_data_stats_display_user
+ EpmEt-db-UsEr
+
+
+
+
+ epmet_evaluation_index_user
+ EpmEt-db-UsEr
+
+
+ 0
+ 192.168.1.130
+ 6379
+ 123456
+
+
+ false
+ 192.168.1.130:8848
+ 6ceab336-d004-4acf-89c6-e121d06f4988
+
+
+ false
+
+
+
+ false
+
+
+ https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
+ SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
@@ -158,6 +217,19 @@
epmetelink@833066
+
+
+
+ epmet
+ elink@833066
+
+
+
+
+ epmet
+ elink@833066
+
+
0r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com
@@ -175,6 +247,10 @@
true
+
+
+ https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c
+ SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19
@@ -193,6 +269,18 @@
epmet_data_statisticalEpmEt-db-UsEr
+
+
+
+ epmet_data_stats_display_user
+ EpmEt-db-UsEr
+
+
+
+
+ epmet_evaluation_index_user
+ EpmEt-db-UsEr
+
0r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com
@@ -210,6 +298,10 @@
true
+
+
+ https://oapi.dingtalk.com/robot/send?access_token=a5f66c3374b1642fe2142dbf56d5997e280172d4e8f2b546c9423a68c82ece6c
+ SEC95f4f40b533ad379ea6a6d1af6dd37029383cfe1b7cd96dfac2678be2c1c3ed1
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
index cee0ed9096..989bf71965 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java
@@ -1,5 +1,7 @@
package com.epmet;
+import com.epmet.commons.tools.enums.EnvEnum;
+import com.epmet.commons.tools.utils.HttpClientManager;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@@ -13,5 +15,6 @@ import org.springframework.scheduling.annotation.EnableAsync;
public class DataReportApplication {
public static void main(String[] args) {
SpringApplication.run(DataReportApplication.class, args);
+ HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() +" DataStatsApplication started!");
}
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
index d671c4cd05..1b063dd470 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
@@ -1,23 +1,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.annotation.LoginUser;
-import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
-import com.epmet.screen.dto.form.CompartmentFormDTO;
-import com.epmet.screen.dto.result.CompartmentResultDTO;
-import com.epmet.screen.dto.result.TreeResultDTO;
-import com.epmet.datareport.service.screen.AgencyService;
+import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
+import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
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
*
@@ -37,7 +32,7 @@ public class AgencyController {
* @author zxc
* @date 2020/8/18 2:04 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("tree")
public Result tree(ExternalAppRequestParam externalAppRequestParam){
return new Result().ok(agencyService.tree(externalAppRequestParam));
@@ -49,7 +44,7 @@ public class AgencyController {
* @author zxc
* @date 2020/8/18 2:33 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("compartment")
public Result compartment(@RequestBody CompartmentFormDTO compartmentFormDTO){
ValidatorUtils.validateEntity(compartmentFormDTO, CompartmentFormDTO.Compartment.class);
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java
index b0b7c1f7a8..248547cc4c 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java
@@ -1,11 +1,10 @@
package com.epmet.datareport.controller.screen;
-import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
-import com.epmet.screen.dto.form.*;
-import com.epmet.screen.dto.result.*;
-import com.epmet.datareport.service.screen.DistributionService;
+import com.epmet.datareport.service.evaluationindex.screen.DistributionService;
+import com.epmet.evaluationindex.screen.dto.form.*;
+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;
@@ -33,7 +32,7 @@ public class DistributionController {
* @author zxc
* @date 2020/8/18 10:59 上午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("branch")
public Result> branch(@RequestBody BranchFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, BranchFormDTO.Branch.class);
@@ -46,7 +45,7 @@ public class DistributionController {
* @author zxc
* @date 2020/8/18 11:10 上午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("user")
public Result user(@RequestBody UserFormDTO userFormDTO){
ValidatorUtils.validateEntity(userFormDTO, UserFormDTO.User.class);
@@ -59,7 +58,7 @@ public class DistributionController {
* @author zxc
* @date 2020/8/18 11:20 上午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("parymember")
public Result parymember(@RequestBody ParymemberFormDTO parymemberFormDTO){
ValidatorUtils.validateEntity(parymemberFormDTO, ParymemberFormDTO.Parymember.class);
@@ -72,7 +71,7 @@ public class DistributionController {
* @author zxc
* @date 2020/8/19 1:29 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("project")
public Result> project(@RequestBody ProjectFormDTO projectFormDTO){
ValidatorUtils.validateEntity(projectFormDTO, ProjectFormDTO.Project.class);
@@ -85,7 +84,7 @@ public class DistributionController {
* @author zxc
* @date 2020/8/19 1:52 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("topprofile")
public Result topProfile(@RequestBody TopProfileFormDTO topProfileFormDTO){
ValidatorUtils.validateEntity(topProfileFormDTO, TopProfileFormDTO.TopProfile.class);
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java
index 325c4606c8..220fb0ca4a 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java
@@ -1,13 +1,12 @@
package com.epmet.datareport.controller.screen;
-import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
-import com.epmet.datareport.service.screen.GrassRootsGovernService;
-import com.epmet.screen.dto.form.AgencyAndNumFormDTO;
-import com.epmet.screen.dto.form.AgencyFormDTO;
-import com.epmet.screen.dto.form.AgencyNumTypeParamFormDTO;
-import com.epmet.screen.dto.result.*;
+import com.epmet.datareport.service.evaluationindex.screen.GrassRootsGovernService;
+import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO;
+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;
@@ -39,7 +38,7 @@ public class GrassRootsGovernController {
* @author wangc
* @date 2020.08.20 11:16
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("userpointrank")
public Result userPointRank(@RequestBody AgencyAndNumFormDTO param){
ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class);
@@ -54,7 +53,7 @@ public class GrassRootsGovernController {
* @author wangc
* @date 2020.08.20 13:55
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("difficultprojects")
public Result> difficultProject(@RequestBody AgencyNumTypeParamFormDTO param){
ValidatorUtils.validateEntity(param, AgencyNumTypeParamFormDTO.AgencyNumTypeParamGroup.class);
@@ -69,7 +68,7 @@ public class GrassRootsGovernController {
* @author wangc
* @date 2020.08.20 14:37
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("publicpartiprofile")
public Result publicPartiProfile(@RequestBody AgencyFormDTO param){
ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class);
@@ -84,7 +83,7 @@ public class GrassRootsGovernController {
* @author wangc
* @date 2020.08.20 15:32
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("publicpartirank")
public Result> publicPartiRank(@RequestBody AgencyAndNumFormDTO param){
ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class);
@@ -99,7 +98,7 @@ public class GrassRootsGovernController {
* @author wangc
* @date 2020.08.20 17:46
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("governcapacityrank")
public Result> governCapacityRank(@RequestBody AgencyAndNumFormDTO param){
ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class);
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java
index 7c536869e9..66b7555ac8 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java
@@ -1,16 +1,15 @@
package com.epmet.datareport.controller.screen;
-import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
-import com.epmet.datareport.service.screen.GrassrootsPartyDevService;
-import com.epmet.screen.dto.form.BranchBuildRankFormDTO;
-import com.epmet.screen.dto.form.BranchBuildTrendFormDTO;
-import com.epmet.screen.dto.form.ParymemberFormDTO;
-import com.epmet.screen.dto.result.BranchBuildRankResultDTO;
-import com.epmet.screen.dto.result.BranchBuildTrendResultDTO;
-import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO;
-import com.epmet.screen.dto.result.PartymemberPercentResultDTO;
+import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService;
+import com.epmet.evaluationindex.screen.dto.form.BranchBuildRankFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.BranchBuildRankResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.BranchBuildTrendResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.PartymemberAgeDistributionResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.PartymemberPercentResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -38,7 +37,7 @@ public class GrassrootsPartyDevController {
* @author wangc
* @date 2020.08.18 16:59
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("basicinfo")
public Result baseInfo(@RequestBody ParymemberFormDTO param){
ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class);
@@ -53,7 +52,7 @@ public class GrassrootsPartyDevController {
* @author wangc
* @date 2020.08.18 17:54
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("ageinfo")
public Result ageInfo(@RequestBody ParymemberFormDTO param){
ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class);
@@ -68,7 +67,7 @@ public class GrassrootsPartyDevController {
* @author wangc
* @date 2020.08.19 11:02
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("branchbuildtrend")
public Result branchBuildTrend(@RequestBody BranchBuildTrendFormDTO param){
ValidatorUtils.validateEntity(param, BranchBuildTrendFormDTO.branchBuildTrendGroup.class);
@@ -83,7 +82,7 @@ public class GrassrootsPartyDevController {
* @author wangc
* @date 2020.08.19 15:25
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("branchbuildrank")
public Result branchBuildRank(@RequestBody BranchBuildRankFormDTO param){
ValidatorUtils.validateEntity(param, BranchBuildRankFormDTO.BranchBuildRankGroup.class);
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
index 53b69591b4..d670c65b1c 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
@@ -1,18 +1,16 @@
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.screen.IndexService;
-import com.epmet.screen.dto.form.MonthBarchartFormDTO;
-import com.epmet.screen.dto.form.MonthPieChartFormDTO;
-import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO;
-import com.epmet.screen.dto.form.YearAverageIndexFormDTO;
-import com.epmet.screen.dto.result.MonthBarchartResultDTO;
-import com.epmet.screen.dto.result.MonthPieChartResultDTO;
-import com.epmet.screen.dto.result.SubAgencyIndexRankResultDTO;
-import com.epmet.screen.dto.result.YearAverageIndexResultDTO;
+import com.epmet.datareport.service.evaluationindex.screen.IndexService;
+import com.epmet.evaluationindex.screen.dto.form.MonthBarchartFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.MonthPieChartFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.YearAverageIndexFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -40,7 +38,7 @@ public class IndexController {
* @author zxc
* @date 2020/8/19 2:53 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("yearaverageindex")
public Result yearAverageIndex(@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){
ValidatorUtils.validateEntity(yearAverageIndexFormDTO, YearAverageIndexFormDTO.YearAverageIndex.class);
@@ -53,7 +51,7 @@ public class IndexController {
* @author zxc
* @date 2020/8/19 3:17 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("monthindexanalysis/piechart")
public Result monthPieChart(@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){
ValidatorUtils.validateEntity(monthPieChartFormDTO, MonthPieChartFormDTO.MonthPieChart.class);
@@ -66,11 +64,11 @@ public class IndexController {
* @author zxc
* @date 2020/8/19 5:27 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("monthindexanalysis/barchart")
- public Result monthBarchart(@RequestBody MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam){
+ public Result monthBarchart(@RequestBody MonthBarchartFormDTO monthBarchartFormDTO){
ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class);
- return new Result().ok(indexService.monthBarchart(monthBarchartFormDTO,externalAppRequestParam));
+ return new Result().ok(indexService.monthBarchart(monthBarchartFormDTO));
}
/**
@@ -79,7 +77,7 @@ public class IndexController {
* @author zxc
* @date 2020/8/20 10:02 上午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("subagencyindexrank")
public Result> subAgencyIndexRank(@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){
ValidatorUtils.validateEntity(subAgencyIndexRankFormDTO, SubAgencyIndexRankFormDTO.SubAgencyIndexRank.class);
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java
index 5478956a32..d3f4242013 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java
@@ -1,11 +1,10 @@
package com.epmet.datareport.controller.screen;
-import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
-import com.epmet.datareport.service.screen.PartyMemberLeadService;
-import com.epmet.screen.dto.form.*;
-import com.epmet.screen.dto.result.*;
+import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadService;
+import com.epmet.evaluationindex.screen.dto.form.*;
+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;
@@ -33,7 +32,7 @@ public class PartyMemberLeadController {
* @author zxc
* @date 2020/8/20 1:56 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("fineexample")
public Result fineExample(@RequestBody FineExampleFormDTO fineExampleFormDTO){
ValidatorUtils.validateEntity(fineExampleFormDTO, FineExampleFormDTO.FineExample.class);
@@ -46,7 +45,7 @@ public class PartyMemberLeadController {
* @author zxc
* @date 2020/8/20 2:35 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("contactmasslinechart")
public Result contactMassLineChart(@RequestBody ContactMassLineChartFormDTO contactMassLineChartFormDTO){
ValidatorUtils.validateEntity(contactMassLineChartFormDTO, ContactMassLineChartFormDTO.ContactMassLineChart.class);
@@ -59,7 +58,7 @@ public class PartyMemberLeadController {
* @author zxc
* @date 2020/8/20 3:19 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("volunteerservice")
public Result volunteerService(@RequestBody VolunteerServiceFormDTO volunteerServiceFormDTO){
ValidatorUtils.validateEntity(volunteerServiceFormDTO, VolunteerServiceFormDTO.VolunteerService.class);
@@ -74,7 +73,7 @@ public class PartyMemberLeadController {
* @author wangc
* @date 2020.08.21 11:05
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("advancedbranchrank")
Result> advancedBranchRank(@RequestBody AgencyAndNumFormDTO param){
ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class);
@@ -89,7 +88,7 @@ public class PartyMemberLeadController {
* @author wangc
* @date 2020.08.21 14:22
**/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("advancedpartymemberrank")
Result> advancedPartymemberRank(@RequestBody AgencyAndNumFormDTO param){
ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class);
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java
index 8c508e5eda..dc80b5178e 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java
@@ -1,11 +1,10 @@
package com.epmet.datareport.controller.screen;
-import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
-import com.epmet.datareport.service.screen.ScreenProjectService;
-import com.epmet.screen.dto.form.ProjectDetailFormDTO;
-import com.epmet.screen.dto.result.ProjectDetailResultDTO;
+import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService;
+import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -31,7 +30,7 @@ public class ScreenProjectController {
* @author zxc
* @date 2020/8/19 4:36 下午
*/
- @ExternalAppRequestAuth
+ //@ExternalAppRequestAuth
@PostMapping("detail")
public Result projectDetail(@RequestBody ProjectDetailFormDTO projectDetailFormDTO){
ValidatorUtils.validateEntity(projectDetailFormDTO, ProjectDetailFormDTO.ProjectDetail.class);
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java
similarity index 89%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java
index 87f26f3b01..e752fe40dd 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.PartymemberAgeDistributionResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
similarity index 95%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
index c97ac8b8e0..17c48ae989 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.*;
+import com.epmet.evaluationindex.screen.dto.result.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerDeptDao.java
similarity index 94%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerDeptDao.java
index e6ae450514..15ed670395 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerDeptDao.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
import org.apache.ibatis.annotations.Mapper;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java
similarity index 85%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java
index 4e57c2f71d..b6196411f8 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java
@@ -15,12 +15,9 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.AgencyDistributionResultDTO;
-import com.epmet.screen.dto.result.BranchResultDTO;
-import com.epmet.screen.dto.result.ParymemberDistributionResultDTO;
-import com.epmet.screen.dto.result.UserDistributionResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -66,5 +63,13 @@ public interface ScreenCustomerGridDao {
* @date 2020/8/19 10:30 上午
*/
List selectParymemberDistribution(@Param("parentId")String parentId);
+
+ /**
+ * @Description 查询机关下的网格
+ * @param agencyId
+ * @author zxc
+ * @date 2020/8/26 5:29 下午
+ */
+ List selectGridInfo(@Param("agencyId")String agencyId);
}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java
similarity index 90%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java
index 17d2e7a420..8697ba9adf 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.DifficultProjectResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.DifficultProjectResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventDataDao.java
similarity index 84%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventDataDao.java
index 92f1641cce..16e023adff 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventDataDao.java
@@ -15,10 +15,10 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.ProjectDetailResultDTO;
-import com.epmet.screen.dto.result.ProjectResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.ProjectResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -47,6 +47,6 @@ public interface ScreenEventDataDao{
* @author zxc
* @date 2020/8/19 4:36 下午
*/
- ProjectDetailResultDTO selectEventDetail(@Param("projectId")String projectId);
+ ProjectDetailResultDTO selectEventDetail(@Param("projectId")String projectId,@Param("agencyId")String agencyId);
}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventImgDataDao.java
similarity index 95%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventImgDataDao.java
index 8090ce00c7..f0da56ccd9 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventImgDataDao.java
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenGovernRankDataDao.java
similarity index 90%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenGovernRankDataDao.java
index 3cf167fc5e..e973aa85f3 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenGovernRankDataDao.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.GovernCapacityResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.GovernCapacityResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
similarity index 76%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
index 2e18647c39..372dacf9dd 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
@@ -15,13 +15,12 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO;
-import com.epmet.screen.dto.result.MonthBarchartResult;
-import com.epmet.screen.dto.result.MonthBarchartResultDTO;
-import com.epmet.screen.dto.result.MonthPieChartResultDTO;
-import com.epmet.screen.dto.result.SubAgencyIndexRankResultDTO;
+import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResult;
+import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -42,16 +41,15 @@ public interface ScreenIndexDataMonthlyDao{
* @author zxc
* @date 2020/8/19 3:43 下午
*/
- MonthPieChartResultDTO selectMonthPieChart(@Param("agencyId")String agencyId);
+ MonthPieChartResultDTO selectMonthPieChart(@Param("agencyId")String agencyId,@Param("monthId")String monthId);
/**
* @Description 查询近一年的指数值【不包括本月】
- * @param customerId
* @param agencyId
* @author zxc
* @date 2020/8/20 9:02 上午
*/
- List selectMonthBarchart(@Param("customerId")String customerId, @Param("agencyId")String agencyId);
+ List selectMonthBarchart(@Param("agencyId")String agencyId);
/**
* @Description 4、下级部门指数排行
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java
similarity index 89%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java
index 304351b3b7..c63c17fa57 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.YearAverageIndexResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java
similarity index 90%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java
index fbee5cd15c..2b9bdba497 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.OrgRankDataResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.OrgRankDataResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java
similarity index 78%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java
index 0117eec4a7..fa2836e4fb 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java
@@ -15,11 +15,11 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.BranchBuildOrderByCountResultDTO;
-import com.epmet.screen.dto.result.BranchIssueDataResultDTO;
-import com.epmet.screen.dto.result.VolunteerServiceResult;
+import com.epmet.evaluationindex.screen.dto.result.BranchBuildOrderByCountResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.BranchIssueDataResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.VolunteerServiceResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -68,4 +68,16 @@ public interface ScreenPartyBranchDataDao {
* @date 2020.08.20 09:46
**/
List selectBranchDataByTypeOrder(@Param("agencyId")String agencyId,@Param("category")String category,@Param("monthId")String monthId,@Param("bottomMonthId")String bottomMonthId);
+
+ /**
+ * @Description 查询组织总数或者总参与人数
+ * @param category
+ * @param type
+ * @param agencyId
+ * @param monthId
+ * @return
+ * @author wangc
+ * @date 2020.08.28 17:56
+ **/
+ Integer selectTotalOrganizationCount(@Param("category") String category,@Param("type") String type, @Param("agencyId") String agencyId,@Param("monthId") String monthId);
}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java
similarity index 90%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java
index dfa5c1f6d2..1ca974982f 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.ContactMassLineChartResult;
+import com.epmet.evaluationindex.screen.dto.result.ContactMassLineChartResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java
similarity index 88%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java
index 946ac2a096..2c4358ce15 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java
@@ -15,10 +15,10 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.PartyUserPointResultDTO;
-import com.epmet.screen.dto.result.UserPointResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.PartyUserPointResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.UserPointResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java
similarity index 90%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java
index 4b477689c3..92177ec52c 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java
@@ -15,9 +15,9 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.FineExampleResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.FineExampleResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java
new file mode 100644
index 0000000000..88c2aa0e77
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java
@@ -0,0 +1,42 @@
+/**
+ * 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.screen;
+
+import com.epmet.evaluationindex.screen.dto.result.PublicPartiRankResultDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-08-24
+ */
+@Mapper
+public interface ScreenPublicPartiTotalDataDao{
+ /**
+ * @Description 查询公众参与各类总数
+ * @param agencyId
+ * @return
+ * @author wangc
+ * @date 2020.08.20 16:00
+ **/
+ List selectPublicPartiTotal(@Param("agencyId") String agencyId);
+}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserJoinDao.java
similarity index 87%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserJoinDao.java
index 0edee635d4..962691f625 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserJoinDao.java
@@ -15,10 +15,10 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.UserJoinIndicatorGrowthRateResultDTO;
-import com.epmet.screen.dto.result.UserJoinMonthlyResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.UserJoinIndicatorGrowthRateResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.UserJoinMonthlyResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java
similarity index 77%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java
index a03353e825..653cf3f606 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java
@@ -15,16 +15,13 @@
* along with this program. If not, see .
*/
-package com.epmet.datareport.dao.screen;
+package com.epmet.datareport.dao.evaluationindex.screen;
-import com.epmet.screen.dto.result.PartymemberPercentResultDTO;
-import com.epmet.screen.dto.result.PublicPartiRankResultDTO;
-import com.epmet.screen.dto.result.TopProfileResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.PartymemberPercentResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.TopProfileResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
-import java.util.List;
-
/**
* 中央区-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数
*
@@ -60,12 +57,4 @@ public interface ScreenUserTotalDataDao {
**/
int selectAvgIssue(@Param("agencyId")String agencyId);
- /**
- * @Description 查询用户数据
- * @param agencyId
- * @return
- * @author wangc
- * @date 2020.08.20 16:00
- **/
- List selectUserTotalData(@Param("agencyId") String agencyId);
}
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java
similarity index 68%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java
index d3eee4f133..d633b94ea2 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java
@@ -1,12 +1,9 @@
-package com.epmet.datareport.service.screen;
+package com.epmet.datareport.service.evaluationindex.screen;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
-import com.epmet.commons.tools.security.dto.TokenDto;
-import com.epmet.screen.dto.form.CompartmentFormDTO;
-import com.epmet.screen.dto.result.CompartmentResultDTO;
-import com.epmet.screen.dto.result.TreeResultDTO;
-
-import java.util.List;
+import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
/**
* 组织相关api
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/DistributionService.java
similarity index 87%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/DistributionService.java
index 62a0d0d7bf..a73d1ccfcd 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/DistributionService.java
@@ -1,7 +1,7 @@
-package com.epmet.datareport.service.screen;
+package com.epmet.datareport.service.evaluationindex.screen;
-import com.epmet.screen.dto.form.*;
-import com.epmet.screen.dto.result.*;
+import com.epmet.evaluationindex.screen.dto.form.*;
+import com.epmet.evaluationindex.screen.dto.result.*;
import java.util.List;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassRootsGovernService.java
similarity index 86%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassRootsGovernService.java
index 12315295b5..fecde12a9f 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassRootsGovernService.java
@@ -1,9 +1,9 @@
-package com.epmet.datareport.service.screen;
+package com.epmet.datareport.service.evaluationindex.screen;
-import com.epmet.screen.dto.form.AgencyAndNumFormDTO;
-import com.epmet.screen.dto.form.AgencyFormDTO;
-import com.epmet.screen.dto.form.AgencyNumTypeParamFormDTO;
-import com.epmet.screen.dto.result.*;
+import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.*;
import java.util.List;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassrootsPartyDevService.java
similarity index 71%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassrootsPartyDevService.java
index a870d21585..41c8fafc28 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassrootsPartyDevService.java
@@ -1,12 +1,12 @@
-package com.epmet.datareport.service.screen;
+package com.epmet.datareport.service.evaluationindex.screen;
-import com.epmet.screen.dto.form.BranchBuildRankFormDTO;
-import com.epmet.screen.dto.form.BranchBuildTrendFormDTO;
-import com.epmet.screen.dto.form.ParymemberFormDTO;
-import com.epmet.screen.dto.result.BranchBuildRankResultDTO;
-import com.epmet.screen.dto.result.BranchBuildTrendResultDTO;
-import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO;
-import com.epmet.screen.dto.result.PartymemberPercentResultDTO;
+import com.epmet.evaluationindex.screen.dto.form.BranchBuildRankFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.BranchBuildRankResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.BranchBuildTrendResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.PartymemberAgeDistributionResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.PartymemberPercentResultDTO;
/**
* 基层党建相关各指标查询
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java
similarity index 62%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java
index 5c0b5e4ade..266898530d 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java
@@ -1,14 +1,13 @@
-package com.epmet.datareport.service.screen;
-
-import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
-import com.epmet.screen.dto.form.MonthBarchartFormDTO;
-import com.epmet.screen.dto.form.MonthPieChartFormDTO;
-import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO;
-import com.epmet.screen.dto.form.YearAverageIndexFormDTO;
-import com.epmet.screen.dto.result.MonthBarchartResultDTO;
-import com.epmet.screen.dto.result.MonthPieChartResultDTO;
-import com.epmet.screen.dto.result.SubAgencyIndexRankResultDTO;
-import com.epmet.screen.dto.result.YearAverageIndexResultDTO;
+package com.epmet.datareport.service.evaluationindex.screen;
+
+import com.epmet.evaluationindex.screen.dto.form.MonthBarchartFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.MonthPieChartFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.YearAverageIndexFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO;
import java.util.List;
@@ -42,7 +41,7 @@ public interface IndexService {
* @author zxc
* @date 2020/8/19 5:27 下午
*/
- MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam);
+ MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO);
/**
* @Description 4、下级部门指数排行
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/PartyMemberLeadService.java
similarity index 79%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/PartyMemberLeadService.java
index 5f781b2622..5e75a3946c 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/PartyMemberLeadService.java
@@ -1,10 +1,10 @@
-package com.epmet.datareport.service.screen;
+package com.epmet.datareport.service.evaluationindex.screen;
-import com.epmet.screen.dto.form.AgencyAndNumFormDTO;
-import com.epmet.screen.dto.form.ContactMassLineChartFormDTO;
-import com.epmet.screen.dto.form.FineExampleFormDTO;
-import com.epmet.screen.dto.form.VolunteerServiceFormDTO;
-import com.epmet.screen.dto.result.*;
+import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.ContactMassLineChartFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.FineExampleFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.VolunteerServiceFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.*;
import java.util.List;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java
similarity index 63%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java
index 78543bc52f..aea908ff15 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java
@@ -1,7 +1,7 @@
-package com.epmet.datareport.service.screen;
+package com.epmet.datareport.service.evaluationindex.screen;
-import com.epmet.screen.dto.form.ProjectDetailFormDTO;
-import com.epmet.screen.dto.result.ProjectDetailResultDTO;
+import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO;
/**
* 项目
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
new file mode 100644
index 0000000000..6eef8b2387
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
@@ -0,0 +1,139 @@
+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.screen.ScreenCustomerAgencyDao;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao;
+import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
+import com.epmet.evaluationindex.screen.constant.ScreenConstant;
+import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
+import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 组织相关api
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/8/18 10:18
+ */
+@Service
+@DataSource(DataSourceConstant.EVALUATION_INDEX)
+public class AgencyServiceImpl implements AgencyService {
+
+ @Autowired
+ private ScreenCustomerAgencyDao screenCustomerAgencyDao;
+ @Autowired
+ private ScreenCustomerGridDao screenCustomerGridDao;
+
+ /**
+ * @Description 1、组织机构树
+ * @param
+ * @author zxc
+ * @date 2020/8/18 2:04 下午
+ */
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
+ @Override
+ public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) {
+ // 1. 查询客户根组织ID
+// String customerId = externalAppRequestParam.getCustomerId();
+
+
+ // 验签关闭,customerId无法获取,暂时写死
+ String customerId = "b09527201c4409e19d1dbc5e3c3429a1";
+
+
+ TreeResultDTO rootAgency = screenCustomerAgencyDao.selectRootAgencyId(customerId);
+ if (null == rootAgency){
+ return new TreeResultDTO();
+ }
+ List centerMark = this.getCenterMark(rootAgency.getCenterMarkA());
+ rootAgency.setCenterMark(centerMark.size() == NumConstant.ZERO ? new ArrayList<>() : centerMark);
+ if (rootAgency.getLevel().equals(ScreenConstant.COMMUNITY)){
+ List treeResultDTOS = screenCustomerGridDao.selectGridInfo(rootAgency.getValue());
+ rootAgency.setChildren(treeResultDTOS);
+ }else {
+ List departmentList = this.getDepartmentList(("".equals(rootAgency.getPids()) || rootAgency.getPids().equals(NumConstant.ZERO_STR)) ? rootAgency.getValue() : rootAgency.getPids().concat(",").concat(rootAgency.getValue()));
+ rootAgency.setChildren(departmentList);
+ }
+ return rootAgency;
+ }
+
+ /**
+ * @Description 处理centerMark
+ * @param centerMark
+ * @author zxc
+ * @date 2020/8/26 5:18 下午
+ */
+ public List getCenterMark(String centerMark){
+ if (centerMark.length() == NumConstant.ZERO || centerMark.equals(ScreenConstant.SQUARE_BRACKETS)) {
+ return new ArrayList<>();
+ }
+ List result = new ArrayList<>();
+ String substring = centerMark.substring(NumConstant.TWO, centerMark.length() - NumConstant.TWO);
+ String[] split = substring.split(ScreenConstant.COMMA);
+ for (String s : split) {
+ result.add(Double.valueOf(s));
+ }
+ return result;
+ }
+
+ /**
+ * @Description 递归查询填充下级
+ * @param subAgencyPids
+ * @author zxc
+ * @date 2020/8/18 4:42 下午
+ */
+ private List getDepartmentList(String subAgencyPids) {
+ List subAgencyList = screenCustomerAgencyDao.selectSubAgencyList(subAgencyPids);
+ if (subAgencyList.size() > NumConstant.ZERO) {
+ subAgencyList.forEach(sub -> {
+ List centerMark = this.getCenterMark(sub.getCenterMarkA());
+ sub.setCenterMark(centerMark.size() == NumConstant.ZERO ? new ArrayList<>() : centerMark);
+ if (sub.getLevel().equals(ScreenConstant.COMMUNITY)){
+ List treeResultDTOS = screenCustomerGridDao.selectGridInfo(sub.getValue());
+ treeResultDTOS.forEach(tree -> {
+ List centerMarkTree = this.getCenterMark(tree.getCenterMarkA());
+ tree.setCenterMark(centerMarkTree.size() == NumConstant.ZERO ? new ArrayList<>() : centerMarkTree);
+ });
+ sub.setChildren(treeResultDTOS);
+ }else {
+ List subAgency = getDepartmentList(sub.getPids() + "," + sub.getValue());
+ sub.setChildren(subAgency);
+ }
+ });
+ }
+ return subAgencyList;
+ }
+
+ /**
+ * @Description 2、组织区域查询
+ * @param compartmentFormDTO
+ * @author zxc
+ * @date 2020/8/18 2:33 下午
+ */
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
+ @Override
+ public CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO) {
+ CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(compartmentFormDTO.getAgencyId());
+ if (null == agencyAreaInfo){
+ return new CompartmentResultDTO();
+ }
+ if (agencyAreaInfo.getLevel().equals(ScreenConstant.COMMUNITY)){
+ // 当level为"community"时,查询screen_customer_grid表
+ List agencyDistributionResultDTOS = screenCustomerGridDao.selectSubDistribution(compartmentFormDTO.getAgencyId());
+ agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS);
+ }else {
+ List agencyDistributionResultDTOS = screenCustomerAgencyDao.selectSubDistribution(compartmentFormDTO.getAgencyId());
+ agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS);
+ }
+ return agencyAreaInfo;
+ }
+}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java
similarity index 79%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java
index 97a627fb23..b65c0fe059 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java
@@ -1,16 +1,16 @@
-package com.epmet.datareport.service.screen.impl;
+package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
-import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao;
-import com.epmet.datareport.dao.screen.ScreenCustomerGridDao;
-import com.epmet.datareport.dao.screen.ScreenEventDataDao;
-import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao;
-import com.epmet.screen.dto.form.*;
-import com.epmet.screen.dto.result.*;
-import com.epmet.screen.constant.*;
-import com.epmet.datareport.service.screen.DistributionService;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventDataDao;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenUserTotalDataDao;
+import com.epmet.datareport.service.evaluationindex.screen.DistributionService;
+import com.epmet.evaluationindex.screen.constant.ScreenConstant;
+import com.epmet.evaluationindex.screen.dto.form.*;
+import com.epmet.evaluationindex.screen.dto.result.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -25,6 +25,7 @@ import java.util.List;
* @date 2020/8/18 10:19
*/
@Service
+@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class DistributionServiceImpl implements DistributionService {
@Autowired
@@ -42,7 +43,7 @@ public class DistributionServiceImpl implements DistributionService {
* @author zxc
* @date 2020/8/18 10:59 上午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List branch(BranchFormDTO formDTO) {
List branchResultDTOS = screenCustomerGridDao.selectBranch(formDTO.getAgencyId());
@@ -55,7 +56,7 @@ public class DistributionServiceImpl implements DistributionService {
* @author zxc
* @date 2020/8/18 11:10 上午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public UserResultDTO user(UserFormDTO userFormDTO) {
UserResultDTO userResult = new UserResultDTO();
@@ -80,7 +81,7 @@ public class DistributionServiceImpl implements DistributionService {
* @author zxc
* @date 2020/8/18 11:20 上午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public ParymemberResultDTO parymember(ParymemberFormDTO parymemberFormDTO) {
ParymemberResultDTO parymemberResult = new ParymemberResultDTO();
@@ -105,7 +106,7 @@ public class DistributionServiceImpl implements DistributionService {
* @author zxc
* @date 2020/8/19 1:29 下午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List project(ProjectFormDTO projectFormDTO) {
List projectResultDTOS = screenEventDataDao.selectEvent(projectFormDTO.getAgencyId());
@@ -121,7 +122,7 @@ public class DistributionServiceImpl implements DistributionService {
* @author zxc
* @date 2020/8/19 1:52 下午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public TopProfileResultDTO topProfile(TopProfileFormDTO topProfileFormDTO) {
TopProfileResultDTO topProfileResultDTO = screenUserTotalDataDao.selectTopProfile(topProfileFormDTO.getAgencyId());
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
similarity index 77%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
index 8b0db2c65a..d750c1ee03 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
@@ -1,20 +1,21 @@
-package com.epmet.datareport.service.screen.impl;
+package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
-import com.epmet.datareport.dao.screen.*;
-import com.epmet.datareport.service.screen.GrassRootsGovernService;
+import com.epmet.datareport.dao.evaluationindex.screen.*;
+import com.epmet.datareport.service.evaluationindex.screen.GrassRootsGovernService;
import com.epmet.datareport.utils.DateUtils;
import com.epmet.datareport.utils.ModuleConstant;
-import com.epmet.screen.dto.form.AgencyAndNumFormDTO;
-import com.epmet.screen.dto.form.AgencyFormDTO;
-import com.epmet.screen.dto.form.AgencyNumTypeParamFormDTO;
-import com.epmet.screen.dto.result.*;
+import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.*;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -30,6 +31,7 @@ import java.util.stream.Collectors;
* @date 2020/8/18 10:20
*/
@Service
+@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
@Autowired
@@ -41,9 +43,10 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
@Autowired
private DateUtils dateUtils;
@Autowired
- private ScreenUserTotalDataDao screenUserTotalDataDao;
- @Autowired
private ScreenGovernRankDataDao screenGovernRankDataDao;
+ @Autowired
+ private ScreenPublicPartiTotalDataDao screenPublicPartiTotalDataDao;
+
/**
* @Description 1、热心市民积分排行
* @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321544
@@ -52,7 +55,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
* @author wangc
* @date 2020.08.20 11:16
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public UserPointRankResultDTO userPointRank(AgencyAndNumFormDTO param) {
//默认5
@@ -76,7 +79,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
* @author wangc
* @date 2020.08.20 13:55
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List difficultProject(AgencyNumTypeParamFormDTO param) {
if(null == param.getTopNum()){
@@ -97,12 +100,21 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
* @author wangc
* @date 2020.08.20 14:37
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param) {
- String monthId = dateUtils.getPreviousMonthId();
+ String monthId = dateUtils.getCurrentMonthId();
UserJoinIndicatorGrowthRateResultDTO latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId);
+ //保证获取公众参与概率数据的最大可能性
+ int time = NumConstant.TWELVE;
+ while(null == latest && time > NumConstant.ONE)
+ {
+ time --;
+ monthId = dateUtils.getPreviousMonthIdByDest(null,monthId);
+ latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId);
+ }
+
if(null == latest) return new PublicPartiProfileResultDTO();
PublicPartiProfileResultDTO result = ConvertUtils.sourceToTarget(latest,PublicPartiProfileResultDTO.class);
result.setMonthIncr(convertPercentStr(latest.getMonthIncr(),NumConstant.ZERO));
@@ -119,14 +131,20 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
* @author wangc
* @date 2020.08.20 15:32
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List publicPartiRank(AgencyAndNumFormDTO param) {
- if(null == param.getTopNum()) param.setTopNum(NumConstant.TWO);
- if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX);
+ if(null == param.getTopNum()){
+ param.setTopNum(NumConstant.TWO);
+ }
+ if(NumConstant.ZERO == param.getTopNum()){
+ param.setTopNum(NumConstant.MAX);
+ }
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
- List result = screenUserTotalDataDao.selectUserTotalData(param.getAgencyId());
- if(null == result) return new ArrayList<>();
+ List result = screenPublicPartiTotalDataDao.selectPublicPartiTotal(param.getAgencyId());
+ if(null == result) {
+ return new ArrayList<>();
+ }
return result;
}
@@ -138,14 +156,23 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
* @author wangc
* @date 2020.08.20 17:46
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List governCapacityRank(AgencyAndNumFormDTO param) {
if(null == param.getTopNum()) param.setTopNum(NumConstant.FIVE);
if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX);
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
+ String monthId = dateUtils.getCurrentMonthId();
List orderList =
- screenGovernRankDataDao.selectGovernCapacityRatio(dateUtils.getPreviousMonthId(),param.getAgencyId());
+ screenGovernRankDataDao.selectGovernCapacityRatio(monthId,param.getAgencyId());
+ int time = NumConstant.TWELVE;
+ while(CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE){
+ time--;
+ monthId = dateUtils.getPreviousMonthIdByDest(null ,monthId);
+ PageHelper.startPage(NumConstant.ONE,param.getTopNum());
+ orderList =
+ screenGovernRankDataDao.selectGovernCapacityRatio(monthId,param.getAgencyId());
+ }
if(null == orderList || orderList.isEmpty()) return new ArrayList<>();
List result = new LinkedList<>();
orderList.forEach(o -> {
@@ -212,11 +239,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
return result;
}
- private String convertPercentStr(BigDecimal percent){
- if(null == percent || BigDecimal.ZERO == percent) return "0.00%";
- String percentStr = percent.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString();
- return percentStr.concat(ModuleConstant.SYMBOL_PERCENT);
- }
+
private String convertPercentStr(BigDecimal percent,Integer digits){
if(null == percent) percent = BigDecimal.ZERO;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java
similarity index 71%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java
index 51a7a49ff6..619eba4625 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java
@@ -1,27 +1,27 @@
-package com.epmet.datareport.service.screen.impl;
+package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.DataSourceConstant;
-import com.epmet.datareport.dao.screen.ScreenCpcBaseDataDao;
-import com.epmet.datareport.dao.screen.ScreenPartyBranchDataDao;
-import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenCpcBaseDataDao;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenPartyBranchDataDao;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenUserTotalDataDao;
+import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService;
+import com.epmet.datareport.utils.DateUtils;
import com.epmet.datareport.utils.ModuleConstant;
-import com.epmet.screen.dto.form.BranchBuildRankFormDTO;
-import com.epmet.screen.dto.form.BranchBuildTrendFormDTO;
-import com.epmet.screen.dto.form.ParymemberFormDTO;
-import com.epmet.screen.dto.result.*;
-import com.epmet.datareport.service.screen.GrassrootsPartyDevService;
+import com.epmet.evaluationindex.screen.dto.form.BranchBuildRankFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.*;
import com.github.pagehelper.PageHelper;
-import com.google.common.collect.Maps;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -32,6 +32,7 @@ import java.util.stream.Collectors;
* @date 2020/8/18 10:21
*/
@Service
+@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService {
private static final Logger logger = LoggerFactory.getLogger(GrassrootsPartyDevServiceImpl.class);
@@ -42,7 +43,8 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
private ScreenCpcBaseDataDao screenCpcBaseDataDao;
@Autowired
private ScreenPartyBranchDataDao screenPartyBranchDataDao;
- private List issueGroup;
+ @Autowired
+ private DateUtils dateUtils;
/**
* @Description 1、党员基本情况-饼状图概况
@@ -52,13 +54,15 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
* @author wangc
* @date 2020.08.18 14:58
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) {
PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercent(param.getAgencyId());
if(null == result){
+ result = new PartymemberPercentResultDTO();
logger.warn("com.epmet.datareport.service.screen.impl.GrassrootsPartyDevServiceImpl.partymemberBaseInfo:未查询出指定agencyId下的党员基础信息数据,agencyId :: {}",param.getAgencyId());
+ result = new PartymemberPercentResultDTO();
result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO));
return result;
}
@@ -79,7 +83,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
* @author wangc
* @date 2020.08.18 17:54
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param) {
return screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId());
@@ -93,7 +97,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
* @author wangc
* @date 2020.08.19 11:02
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public BranchBuildTrendResultDTO branchBuildTrend(BranchBuildTrendFormDTO param) {
if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){
@@ -108,7 +112,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
}
BranchBuildTrendResultDTO result = new BranchBuildTrendResultDTO();
//生成近十二个月的横坐标数组
- Map monthMap = getX();
+ Map monthMap = dateUtils.getXpro();
result.setXAxis(monthMap.values().stream().collect(Collectors.toList()));
List dataArray = new LinkedList<>();
@@ -151,7 +155,22 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
result.setSeriesData(dataArray);
result.setLegend(null == result.getLegend() ? new ArrayList<>() : result.getLegend());
-
+ List _ymList = monthMap.keySet().stream().collect(Collectors.toList());
+ //总组织次数
+ Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,param.getAgencyId(),monthMap.keySet().iterator().next());
+ //自旋一次
+ totalOrganizationCount = Optional.ofNullable(totalOrganizationCount).orElse(
+ screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,param.getAgencyId(),_ymList.get(NumConstant.ONE))
+ );
+ //总参与人数
+ Integer totalJoinUserCount = screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,param.getAgencyId(),monthMap.keySet().iterator().next());
+ //自旋一次
+ totalJoinUserCount = Optional.ofNullable(totalJoinUserCount).orElse(
+ screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,param.getAgencyId(),_ymList.get(NumConstant.ONE))
+ );
+
+ result.setTotalOrganizationCount(Optional.ofNullable(totalOrganizationCount).orElse(NumConstant.ZERO));
+ result.setTotalJoinUserCount(Optional.ofNullable(totalJoinUserCount).orElse(NumConstant.ZERO));
return result;
}
@@ -163,7 +182,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
* @author wangc
* @date 2020.08.19 15:25
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public BranchBuildRankResultDTO branchBuildRank(BranchBuildRankFormDTO param) {
if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){
@@ -177,13 +196,23 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_PARTY);
}
if(StringUtils.isBlank(param.getMonthId())){
- param.setMonthId(getPreviousMonthId());
+ param.setMonthId(dateUtils.getCurrentMonthId());
}
if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX);
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
List orderList =
screenPartyBranchDataDao.selectBranchDataByTypeOrder(param.getAgencyId(),param.getCategory(),param.getMonthId(),param.getBottomMonthId());
+ int time = NumConstant.TWELVE;
+ while(CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE){
+ time --;
+ param.setMonthId(dateUtils.getPreviousMonthIdByDest(null,param.getMonthId()));
+ PageHelper.startPage(NumConstant.ONE,param.getTopNum());
+ orderList =
+ screenPartyBranchDataDao.selectBranchDataByTypeOrder(param.getAgencyId(),param.getCategory(),param.getMonthId(),param.getBottomMonthId());
+ }
+
+
BranchBuildRankResultDTO result = new BranchBuildRankResultDTO();
result.setJoinData(new LinkedList<>());
result.setOrganizeData(new LinkedList<>());
@@ -203,59 +232,6 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService
return percentStr.concat(ModuleConstant.SYMBOL_PERCENT);
}
- /**
- * @Description 返回当前月以及前十一个月,升序
- * @param
- * @return Map key:202001 value:1月
- * @author wangc
- * @date 2020.08.19 12:46
- **/
- public Map getX(){
- SimpleDateFormat format = new SimpleDateFormat("yyyyMM");
- Calendar calendar = Calendar.getInstance();
- calendar.setTime(new Date()); // 设置为当前时间
- calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月
- String currentMonth = format.format(calendar.getTime());
- Integer monthCounter = Integer.parseInt(currentMonth);
- Map monthMap = new HashMap<>();
- int i = NumConstant.ONE;
- while(i <= NumConstant.TWELVE){
-
- if(monthCounter.toString().endsWith("00")){
- monthCounter -= NumConstant.EIGHTY_EIGHT;
- }
-
- String abscissa = monthCounter.toString().substring(monthCounter.toString().length() - NumConstant.TWO);
- if(abscissa.startsWith("0")) {
- abscissa = abscissa.replace("0","").concat("月");
- }else{
- abscissa = abscissa.concat("月");
- }
- monthMap.put(monthCounter.toString(),abscissa);
- monthCounter-- ;
- i++;
- }
-
- Map result = Maps.newLinkedHashMap();
- monthMap.entrySet().stream().sorted(Map.Entry.comparingByKey())
- .forEachOrdered((e -> result.put(e.getKey(),e.getValue())));
-
- return result;
- }
- /**
- * @Description 得到上个月的monthId
- * @param
- * @return
- * @author wangc
- * @date 2020.08.20 10:19
- **/
- private String getPreviousMonthId(){
- SimpleDateFormat format = new SimpleDateFormat("yyyyMM");
- Calendar calendar = Calendar.getInstance();
- calendar.setTime(new Date()); // 设置为当前时间
- calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月
- return format.format(calendar.getTime());
- }
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
similarity index 55%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
index e106a07d45..22f6aa376b 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
@@ -1,19 +1,21 @@
-package com.epmet.datareport.service.screen.impl;
+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.screen.ScreenIndexDataMonthlyDao;
-import com.epmet.datareport.dao.screen.ScreenIndexDataYearlyDao;
-import com.epmet.datareport.service.screen.IndexService;
-import com.epmet.screen.dto.form.MonthBarchartFormDTO;
-import com.epmet.screen.dto.form.MonthPieChartFormDTO;
-import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO;
-import com.epmet.screen.dto.form.YearAverageIndexFormDTO;
-import com.epmet.screen.dto.result.*;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenIndexDataMonthlyDao;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenIndexDataYearlyDao;
+import com.epmet.datareport.service.evaluationindex.screen.IndexService;
+import com.epmet.datareport.utils.DateUtils;
+import com.epmet.evaluationindex.screen.dto.form.MonthBarchartFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.MonthPieChartFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.YearAverageIndexFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.*;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
import java.time.LocalDate;
import java.util.ArrayList;
@@ -28,6 +30,7 @@ import java.util.stream.Collectors;
* @date 2020/8/18 10:21
*/
@Service
+@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class IndexServiceImpl implements IndexService {
@Autowired
@@ -36,6 +39,8 @@ public class IndexServiceImpl implements IndexService {
private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao;
@Autowired
private PartyMemberLeadServiceImpl partyMemberLeadServiceImpl;
+ @Autowired
+ private DateUtils dateUtils;
/**
* @Description 1、年度平均指数
@@ -43,7 +48,7 @@ public class IndexServiceImpl implements IndexService {
* @author zxc
* @date 2020/8/19 2:53 下午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO) {
YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId());
@@ -59,10 +64,19 @@ public class IndexServiceImpl implements IndexService {
* @author zxc
* @date 2020/8/19 3:17 下午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) {
- MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId());
+
+ MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),null);
+ String monthId = dateUtils.getCurrentMonthId();
+ int time = NumConstant.TWELVE;
+ //保证获取月度指数数据的最大可能性
+ while(null == monthPieChartResultDTO && time > NumConstant.ONE){
+ time--;
+ monthId = dateUtils.getPreviousMonthIdByDest(null,monthId);
+ monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),monthId);
+ }
if (null == monthPieChartResultDTO){
return new MonthPieChartResultDTO();
}
@@ -75,10 +89,9 @@ public class IndexServiceImpl implements IndexService {
* @author zxc
* @date 2020/8/19 5:27 下午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
- public MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam) {
- String customerId = externalAppRequestParam.getCustomerId();
+ public MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO) {
MonthBarchartResultDTO result = new MonthBarchartResultDTO();
List serviceAbilityData = new ArrayList<>();
List partyDevAbilityData = new ArrayList<>();
@@ -86,8 +99,8 @@ public class IndexServiceImpl implements IndexService {
List totalIndexData = new ArrayList<>();
// 1. x轴
result.setXAxis(partyMemberLeadServiceImpl.getXPro());
- // 2. 查询近一年的指数值【不包括本月】
- List monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(customerId, monthBarchartFormDTO.getAgencyId());
+ // 2. 查询近一年的指数值【包括本月】
+ List monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(monthBarchartFormDTO.getAgencyId());
if (monthBarchartResults.size() == NumConstant.ZERO){
for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) {
serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO);
@@ -102,12 +115,48 @@ public class IndexServiceImpl implements IndexService {
return result;
}
List collect = monthBarchartResults.stream().sorted(Comparator.comparing(MonthBarchartResult::getMonthId)).collect(Collectors.toList());
- collect.forEach(month -> {
+ //升序 当前月份在队尾
+ List _ymList = dateUtils.getXpro().keySet().stream().collect(Collectors.toList());
+ //针对集合collect的游标
+ int cursor = NumConstant.ZERO;
+ //针对X轴,数据集合不全则进行数据填充
+ a:for(int i = NumConstant.ZERO; i < _ymList.size(); i++){
+ //这里的collect必须是有序且升序的
+ if(cursor >= collect.size()) break a;
+ //如果存在过期数据,即从数据库中查询出超出横坐标左边界的月份值
+ if(Integer.parseInt(collect.get(cursor).getMonthId()) < Integer.parseInt(_ymList.get(NumConstant.ZERO))) {
+ //控制当前循环重复进行
+ i--;
+ //忽略过期数据
+ cursor++;
+ continue ;
+ }
+ if(!StringUtils.equals(collect.get(cursor).getMonthId(),_ymList.get(i))){
+ //SET DEFAULT
+ serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO);
+ partyDevAbilityData.add(NumConstant.ZERO_DOT_ZERO);
+ governAbilityData.add(NumConstant.ZERO_DOT_ZERO);
+ totalIndexData.add(NumConstant.ZERO_DOT_ZERO);
+ //保持cursor不变
+ }else{
+ MonthBarchartResult data = collect.get(cursor);
+ //SET DATA
+ serviceAbilityData.add(null == data.getServiceAbility() ? NumConstant.ZERO_DOT_ZERO : data.getServiceAbility());
+ partyDevAbilityData.add(null == data.getPartyDevAbility() ? NumConstant.ZERO_DOT_ZERO : data.getPartyDevAbility());
+ governAbilityData.add(null == data.getGovernAbility() ? NumConstant.ZERO_DOT_ZERO : data.getGovernAbility());
+ totalIndexData.add(null == data.getIndexTotal() ? NumConstant.ZERO_DOT_ZERO : data.getIndexTotal());
+ //统计日期一致后移动游标
+ cursor++;
+ }
+
+ }
+
+ /*collect.forEach(month -> {
serviceAbilityData.add(null == month.getServiceAbility() ? NumConstant.ZERO_DOT_ZERO : month.getServiceAbility());
partyDevAbilityData.add(null == month.getPartyDevAbility() ? NumConstant.ZERO_DOT_ZERO : month.getPartyDevAbility());
governAbilityData.add(null == month.getGovernAbility() ? NumConstant.ZERO_DOT_ZERO : month.getGovernAbility());
totalIndexData.add(null == month.getIndexTotal() ? NumConstant.ZERO_DOT_ZERO : month.getIndexTotal());
- });
+ });*/
result.setServiceAbilityData(serviceAbilityData);
result.setPartyDevAbilityData(partyDevAbilityData);
result.setGovernAbilityData(governAbilityData);
@@ -121,14 +170,14 @@ public class IndexServiceImpl implements IndexService {
* @author zxc
* @date 2020/8/20 10:04 上午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO) {
LocalDate now = LocalDate.now().minusMonths(NumConstant.ONE);
int yearId = now.getYear();
subAgencyIndexRankFormDTO.setYearId(String.valueOf(yearId));
List subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectSubAgencyIndexRank(subAgencyIndexRankFormDTO);
- if (subAgencyIndexRankResultDTOS.size() == NumConstant.ZERO){
+ if (CollectionUtils.isEmpty(subAgencyIndexRankResultDTOS)){
return new ArrayList<>();
}
return subAgencyIndexRankResultDTOS;
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java
similarity index 63%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java
index b1cecb92bb..203b5cb456 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java
@@ -1,31 +1,28 @@
-package com.epmet.datareport.service.screen.impl;
+package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
-import com.epmet.datareport.dao.screen.ScreenOrgRankDataDao;
-import com.epmet.datareport.dao.screen.ScreenPartyBranchDataDao;
-import com.epmet.datareport.dao.screen.ScreenPartyLinkMassesDataDao;
-import com.epmet.datareport.dao.screen.ScreenPioneerDataDao;
-import com.epmet.datareport.dao.screen.ScreenPartyUserRankDataDao;
-import com.epmet.datareport.service.screen.PartyMemberLeadService;
+import com.epmet.datareport.dao.evaluationindex.screen.*;
+import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadService;
import com.epmet.datareport.utils.DateUtils;
import com.epmet.datareport.utils.ModuleConstant;
-import com.epmet.screen.dto.form.AgencyAndNumFormDTO;
-import com.epmet.screen.dto.form.ContactMassLineChartFormDTO;
-import com.epmet.screen.dto.form.FineExampleFormDTO;
-import com.epmet.screen.dto.form.VolunteerServiceFormDTO;
-import com.epmet.screen.dto.result.*;
-import com.epmet.screen.constant.*;
+import com.epmet.evaluationindex.screen.constant.ScreenConstant;
+import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.ContactMassLineChartFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.FineExampleFormDTO;
+import com.epmet.evaluationindex.screen.dto.form.VolunteerServiceFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.*;
import com.github.pagehelper.PageHelper;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.*;
-import java.util.stream.Collectors;
/**
* 党建引领相关各指标查询
@@ -34,6 +31,7 @@ import java.util.stream.Collectors;
* @date 2020/8/18 10:22
*/
@Service
+@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
@Autowired
@@ -55,7 +53,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
* @author zxc
* @date 2020/8/20 1:56 下午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO) {
FineExampleResultDTO fineExampleResultDTO = screenPioneerDataDao.selectFineExample(fineExampleFormDTO.getAgencyId());
@@ -77,7 +75,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
* @date 2020/8/20 6:06 下午
*/
public String getRatio(Double d){
- BigDecimal bigDecimal = new BigDecimal(d * NumConstant.ONE_HUNDRED);
+ BigDecimal bigDecimal = new BigDecimal(d);
return bigDecimal.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).toPlainString().concat(ScreenConstant.RATIO);
}
@@ -87,7 +85,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
* @author zxc
* @date 2020/8/20 2:35 下午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO) {
ContactMassLineChartResultDTO result = new ContactMassLineChartResultDTO();
@@ -109,6 +107,8 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
result.setXAxis(xAxis);
result.setGroupData(groupData);
result.setGroupMemberData(groupMemberData);
+ result.setGroupTotal(groupData.stream().mapToInt(Integer :: intValue).sum());
+ result.setGroupMemberTotal(groupMemberData.stream().mapToInt(Integer :: intValue).sum());
return result;
}
@@ -118,7 +118,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
* @author zxc
* @date 2020/8/20 3:19 下午
*/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public VolunteerServiceResultDTO volunteerService(VolunteerServiceFormDTO volunteerServiceFormDTO) {
VolunteerServiceResultDTO result = new VolunteerServiceResultDTO();
@@ -126,6 +126,13 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
List joinData = new ArrayList<>();
List averageJoinUserData = new ArrayList<>();
result.setXAxis(this.getXPro());
+ //创建缺省值对象
+ VolunteerServiceResult defaultObj = new VolunteerServiceResult();
+ defaultObj.setAverageJoinUserData(NumConstant.ZERO);
+ defaultObj.setJoinData(NumConstant.ZERO);
+ defaultObj.setOrganizeData(NumConstant.ZERO);
+
+ //倒叙取十二个月的数据,从本月开始,有可能取不到十二条,要对X轴空白的缺口进行填补
List volunteerServiceResults = screenPartyBranchDataDao.selectVolunteerServiceResult(volunteerServiceFormDTO.getAgencyId());
if (volunteerServiceResults.size() == NumConstant.ZERO){
for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) {
@@ -138,27 +145,48 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
result.setAverageJoinUserData(averageJoinUserData);
return result;
}
- List collect = volunteerServiceResults.stream().sorted(Comparator.comparing(VolunteerServiceResult::getMonthId)).collect(Collectors.toList());
- collect.forEach(volunteer -> {
- organizeData.add(volunteer.getOrganizeData());
- joinData.add(volunteer.getJoinData());
- averageJoinUserData.add(volunteer.getAverageJoinUserData());
+
+ Set yyyyMMList = dateUtils.getXpro().keySet();
+ yyyyMMList.forEach(mm -> {
+ Optional opt = volunteerServiceResults.stream()
+ .filter(obj -> StringUtils.equals(mm,obj.getMonthId())).findAny();
+ VolunteerServiceResult find = opt.isPresent() ? opt.get() : defaultObj;
+ organizeData.add(find.getOrganizeData());
+ joinData.add(find.getJoinData());
+ averageJoinUserData.add(find.getAverageJoinUserData());
});
+
+
result.setOrganizeData(organizeData);
result.setJoinData(joinData);
result.setAverageJoinUserData(averageJoinUserData);
+ String bottomMonthId = yyyyMMList.iterator().next();
+ //总组织次数
+ Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId);
+ //自旋一次
+ totalOrganizationCount = Optional.ofNullable(totalOrganizationCount).orElse(
+ screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,volunteerServiceFormDTO.getAgencyId(),dateUtils.getPreviousMonthIdByDest(null,bottomMonthId))
+ );
+ //总参与人数
+ Integer totalJoinUserCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId);
+ //自旋一次
+ totalJoinUserCount = Optional.ofNullable(totalJoinUserCount).orElse(
+ screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,volunteerServiceFormDTO.getAgencyId(),dateUtils.getPreviousMonthIdByDest(null,bottomMonthId))
+ );
+ result.setTotalOrganizationCount(null == totalOrganizationCount ? NumConstant.ZERO : totalOrganizationCount);
+ result.setTotalJoinUserCount(null == totalJoinUserCount ? NumConstant.ZERO : totalJoinUserCount);
return result;
}
/**
- * @Description 获取之前的12个月份【不包括当前月】
+ * @Description 获取之前的12个月份【包括当前月】
* @author zxc
* @date 2020/8/21 10:19 上午
*/
public List getXPro(){
List xAxis = new ArrayList<>();
LocalDate today = LocalDate.now();
- for(int i = NumConstant.TWELVE;i >= NumConstant.ONE; i--){
+ for(int i = NumConstant.ELEVEN;i >= NumConstant.ZERO; i--){
LocalDate localDate = today.minusMonths(i);
String s = localDate.getMonth().getValue() + ScreenConstant.MONTH;
xAxis.add(s);
@@ -166,6 +194,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
return xAxis;
}
+
/**
* @Description 4、先进排行榜单-先进支部排行
* @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321539
@@ -174,7 +203,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
* @author wangc
* @date 2020.08.21 11:05
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List advancedBranchRank(AgencyAndNumFormDTO param) {
if(null == param.getTopNum()){
@@ -183,8 +212,16 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
param.setTopNum(NumConstant.MAX);
}
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
+ String monthId = dateUtils.getCurrentMonthId();
List gridData =
- screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),dateUtils.getPreviousMonthId());
+ screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId);
+ int time = NumConstant.TWELVE;
+ while(CollectionUtils.isEmpty(gridData) && time > NumConstant.ONE){
+ time--;
+ monthId = dateUtils.getPreviousMonthIdByDest(null,monthId);
+ PageHelper.startPage(NumConstant.ONE,param.getTopNum());
+ gridData = screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId);
+ }
List result = new LinkedList<>();
if(null == gridData || gridData.isEmpty()) return result;
gridData.forEach( data -> {
@@ -205,7 +242,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService {
* @author wangc
* @date 2020.08.21 14:22
**/
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public List advancedPartymemberRank(AgencyAndNumFormDTO param) {
if(null == param.getTopNum()) param.setTopNum(NumConstant.TEN);
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java
similarity index 66%
rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java
rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java
index dce609636d..2cf288cae9 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java
@@ -1,12 +1,12 @@
-package com.epmet.datareport.service.screen.impl;
+package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
-import com.epmet.datareport.dao.screen.ScreenEventDataDao;
-import com.epmet.datareport.dao.screen.ScreenEventImgDataDao;
-import com.epmet.datareport.service.screen.ScreenProjectService;
-import com.epmet.screen.dto.form.ProjectDetailFormDTO;
-import com.epmet.screen.dto.result.ProjectDetailResultDTO;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventDataDao;
+import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventImgDataDao;
+import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService;
+import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO;
+import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -19,6 +19,7 @@ import java.util.List;
* @date 2020/8/18 10:23
*/
@Service
+@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenProjectServiceImpl implements ScreenProjectService {
@Autowired
@@ -32,10 +33,10 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
* @author zxc
* @date 2020/8/19 4:36 下午
*/
- @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true)
+ @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
@Override
public ProjectDetailResultDTO projectDetail(ProjectDetailFormDTO projectDetailFormDTO) {
- ProjectDetailResultDTO projectDetailResultDTO = screenEventDataDao.selectEventDetail(projectDetailFormDTO.getProjectId());
+ ProjectDetailResultDTO projectDetailResultDTO = screenEventDataDao.selectEventDetail(projectDetailFormDTO.getProjectId(),projectDetailFormDTO.getAgencyId());
if (null == projectDetailResultDTO){
return new ProjectDetailResultDTO();
}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java
deleted file mode 100644
index 9ca543828c..0000000000
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.epmet.datareport.service.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.screen.ScreenCustomerAgencyDao;
-import com.epmet.datareport.dao.screen.ScreenCustomerGridDao;
-import com.epmet.screen.dto.form.CompartmentFormDTO;
-import com.epmet.screen.dto.result.AgencyDistributionResultDTO;
-import com.epmet.screen.constant.*;
-import com.epmet.screen.dto.result.CompartmentResultDTO;
-import com.epmet.screen.dto.result.TreeResultDTO;
-import com.epmet.datareport.service.screen.AgencyService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 组织相关api
- *
- * @author yinzuomei@elink-cn.com
- * @date 2020/8/18 10:18
- */
-@Service
-public class AgencyServiceImpl implements AgencyService {
-
- @Autowired
- private ScreenCustomerAgencyDao screenCustomerAgencyDao;
- @Autowired
- private ScreenCustomerGridDao screenCustomerGridDao;
-
- /**
- * @Description 1、组织机构树
- * @param
- * @author zxc
- * @date 2020/8/18 2:04 下午
- */
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
- @Override
- public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) {
- // 1. 查询客户根组织ID
- String customerId = externalAppRequestParam.getCustomerId();
- TreeResultDTO rootAgency = screenCustomerAgencyDao.selectRootAgencyId(customerId);
- if (null == rootAgency){
- return new TreeResultDTO();
- }
- List departmentList = this.getDepartmentList(("".equals(rootAgency.getPids()) ? "" : rootAgency.getPids() + ",") + rootAgency.getValue());
- rootAgency.setChildren(departmentList);
- return rootAgency;
- }
-
- /**
- * @Description 递归查询填充下级
- * @param subAgencyPids
- * @author zxc
- * @date 2020/8/18 4:42 下午
- */
- private List getDepartmentList(String subAgencyPids) {
- List subAgencyList = screenCustomerAgencyDao.selectSubAgencyList(subAgencyPids);
- if (subAgencyList.size() > NumConstant.ZERO) {
- for (TreeResultDTO sub : subAgencyList) {
- List subAgency = getDepartmentList(sub.getPids() + "," + sub.getValue());
- sub.setChildren(subAgency);
- }
- }
- return subAgencyList;
- }
-
- /**
- * @Description 2、组织区域查询
- * @param compartmentFormDTO
- * @author zxc
- * @date 2020/8/18 2:33 下午
- */
- @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true)
- @Override
- public CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO) {
- CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(compartmentFormDTO.getAgencyId());
- if (null == agencyAreaInfo){
- return new CompartmentResultDTO();
- }
- if (agencyAreaInfo.getLevel().equals(ScreenConstant.COMMUNITY)){
- // 当level为"community"时,查询screen_customer_grid表
- List agencyDistributionResultDTOS = screenCustomerGridDao.selectSubDistribution(compartmentFormDTO.getAgencyId());
- agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS);
- }else {
- List agencyDistributionResultDTOS = screenCustomerAgencyDao.selectSubDistribution(compartmentFormDTO.getAgencyId());
- agencyAreaInfo.setAgencyDistribution(agencyDistributionResultDTOS);
- }
- return agencyAreaInfo;
- }
-}
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java
index 6db1756fdb..b2d99c00f1 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java
@@ -31,7 +31,7 @@ public class DateUtils {
public Map getX(){
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date()); // 设置为当前时间
- calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月
+ //calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月
String currentMonth = defaultFormat.format(calendar.getTime());
Integer monthCounter = Integer.parseInt(currentMonth);
Map monthMap = new HashMap<>();
@@ -64,7 +64,7 @@ public class DateUtils {
Map xAxis = new HashMap<>();
LocalDate today = LocalDate.now();
- for(int i = NumConstant.TWELVE;i >= NumConstant.ONE; i--){
+ for(int i = NumConstant.ELEVEN;i >= NumConstant.ZERO; i--){
LocalDate localDate = today.minusMonths(i);
String s = localDate.getMonth().getValue() + "月";
xAxis.put(localDate.format(fmt),s);
@@ -108,6 +108,19 @@ public class DateUtils {
return format.format(c.getTime());
}
+ /**
+ * @Description 得到当前月份的monthId
+ * @param
+ * @return
+ * @author wangc
+ * @date 2020.08.27 13:43
+ **/
+ public String getCurrentMonthId(){
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(new Date()); // 设置为当前时间
+ return defaultFormat.format(calendar.getTime());
+ }
+
public static void main(String[] args) {
DateUtils util = new DateUtils();
Map result = util.getXpro();
diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java
index 9314d3ba3b..7e3af9f112 100644
--- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java
+++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java
@@ -21,4 +21,14 @@ public interface ModuleConstant {
String PARAM_DIFFICULTY_TYPE_MOST_DEPTS = "mostdepts";
String PARAM_DIFFICULTY_TYPE_MOST_HANDLED = "mosthandled";
+
+ /**
+ * 支部建设情况折线图 查询数据类型 组织次数
+ * */
+ String PARAM_BRANCH_DATA_TYPE_ORGAN = "organize";
+
+ /**
+ * 支部建设情况折线图 查询数据类型 参与人数
+ * */
+ String PARAM_BRANCH_DATA_TYPE_JOIN = "joinuser";
}
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml
index d4db395aa8..5899ead6dd 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml
@@ -104,6 +104,11 @@ dynamic:
url: @datasource.druid.statsdisplay.url@
username: @datasource.druid.statsdisplay.username@
password: @datasource.druid.statsdisplay.password@
+ evaluationIndex:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: @datasource.druid.evaluationIndex.url@
+ username: @datasource.druid.evaluationIndex.username@
+ password: @datasource.druid.evaluationIndex.password@
feign:
hystrix:
@@ -130,4 +135,9 @@ ribbon:
#pageHelper分页插件
pagehelper:
helper-dialect: mysql
- reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
\ No newline at end of file
+ reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
+
+dingTalk:
+ robot:
+ webHook: @dingTalk.robot.webHook@
+ secret: @dingTalk.robot.secret@
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/db/migration/V0.0.1__demo.sql b/epmet-module/data-report/data-report-server/src/main/resources/db/migration/V0.0.1__demo.sql
new file mode 100644
index 0000000000..7a51a3f595
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/resources/db/migration/V0.0.1__demo.sql
@@ -0,0 +1 @@
+select 0;
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml
index 08a6a198d1..793be083a1 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml
@@ -5,6 +5,8 @@
+
+ ${appname}
@@ -125,11 +127,14 @@
15
-
-
+
+ ERRORACCEPTDENY
+ ${webHook}
+ ${secret}
+ ${appname}
@@ -144,7 +149,7 @@
-
+
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml
index 3fc9c990b3..fa89221e37 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml
@@ -1,10 +1,10 @@
-
+
-
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
index cfdb8da6de..22a62be6d0 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
@@ -1,14 +1,16 @@
-
+
-
+
SELECT
agency_name AS label,
agency_id AS value,
- pids AS pids
+ pids AS pids,
+ IFNULL(center_mark,'') AS centerMarkA,
+ level AS level
FROM
screen_customer_agency
WHERE
@@ -18,11 +20,13 @@
-
+
SELECT
agency_id AS value,
agency_name AS label,
- pids AS pids
+ pids AS pids,
+ IFNULL(center_mark,'') AS centerMarkA,
+ level AS level
FROM
screen_customer_agency
WHERE
@@ -33,7 +37,7 @@
-
+
SELECT
agency_id AS agencyId,
agency_name AS name,
@@ -47,7 +51,7 @@
-
+
SELECT
agency_id AS subId,
agency_name AS subName,
@@ -62,7 +66,7 @@
-
+
SELECT
sutd.org_id AS subId,
sca.center_mark AS centerMark,
@@ -80,7 +84,7 @@
-
+
SELECT
sutd.org_id AS subId,
sca.center_mark AS centerMark,
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml
index 58e2171c3d..cf939d024a 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml
index 988e0b17cd..6cafd96036 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml
@@ -1,10 +1,10 @@
-
+
-
+
SELECT
grid_id AS subId,
grid_name AS subName,
@@ -19,7 +19,7 @@
-
+
SELECT
grid_id AS gridId,
grid_name AS gridName,
@@ -28,11 +28,11 @@
screen_customer_grid
WHERE
del_flag = 0
- AND parent_agency_id = #{agencyId}
+ AND all_parent_ids LIKE concat('%', #{agencyId}, '%')
-
+
SELECT
sutd.org_id AS subId,
scg.center_mark AS centerMark,
@@ -50,7 +50,7 @@
-
+
SELECT
sutd.org_id AS subId,
scg.center_mark AS centerMark,
@@ -66,4 +66,19 @@
AND scg.del_flag = 0
AND sutd.parent_id = #{parentId}
+
+
+
+ SELECT
+ grid_id AS value,
+ grid_name AS label,
+ IFNULL(center_mark,'') AS centerMarkA
+ FROM
+ screen_customer_grid
+ WHERE
+ del_flag = '0'
+ AND parent_agency_id = #{agencyId}
+ ORDER BY
+ created_time DESC
+
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml
index ab381cebba..0bb479ed65 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml
@@ -1,15 +1,15 @@
-
+
-
+
SELECT
diff.EVENT_ID AS projectId,
- eve.EVENT_TITLE AS title,
+ diff.EVENT_CONTENT AS title,
diff.EVENT_STATUS_CODE AS STATUS,
- diff.EVENT_COST_TIME AS totalHours,
+ ROUND(diff.EVENT_COST_TIME/60,0) AS totalHours,
DATE_FORMAT( eve.EVENT_CREATE_TIME, '%Y-%m-%d %H:%i' ) AS createDateTime,
diff.EVENT_SOURCE AS gridName,
diff.EVENT_IMG_URL AS imgUrl,
@@ -22,8 +22,7 @@
AND eve.DEL_FLAG = '0'
WHERE
diff.DEL_FLAG = '0'
- AND diff.ORG_TYPE = 'agency'
- AND diff.ORG_ID = #{agencyId}
+ AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%')
ORDER BY
CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME
WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml
index 63cadbbd5e..b877ad611d 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml
@@ -1,12 +1,12 @@
-
+
-
+
SELECT
- event_title AS projectTitle,
+ IFNULL(event_title,'') AS projectTitle,
event_level AS color,
event_id AS projectId,
org_name AS orgName,
@@ -16,11 +16,11 @@
screen_event_data
WHERE
del_flag = '0'
- AND parent_id = #{parentId}
+ AND all_parent_ids LIKE concat('%', #{parentId}, '%')
-
+
SELECT
event_content AS projectContent,
event_status_desc AS STATUS,
@@ -32,5 +32,6 @@
WHERE
del_flag = '0'
AND event_id = #{projectId}
+ AND all_parent_ids LIKE concat('%', #{agencyId}, '%')
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml
index e5e3e636af..ef20677ece 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml
index 3fb4174055..7976de7ff1 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml
@@ -1,10 +1,10 @@
-
+
-
+
SELECT
ORG_NAME AS agencyName,
RESPONSE_RATIO,
@@ -15,8 +15,7 @@
screen_govern_rank_data
WHERE
DEL_FLAG = '0'
- AND ORG_TYPE = 'agency'
- AND ORG_ID = #{agencyId}
+ AND PARENT_ID = #{agencyId}
AND MONTH_ID = #{monthId}
ORDER BY
(RESPONSE_RATIO + RESOLVED_RATIO + GOVERN_RATIO + SATISFACTION_RATIO) DESC,RESPONSE_RATIO DESC,RESOLVED_RATIO DESC,GOVERN_RATIO DESC,SATISFACTION_RATIO DESC
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
index 21293ad4c6..37f45b8084 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
@@ -1,10 +1,10 @@
-
+
-
+
SELECT
service_ablity AS serviceAbility,
party_dev_ablity AS partyDevAbility,
@@ -15,11 +15,19 @@
del_flag = '0'
AND org_type = 'agency'
AND org_id = #{agencyId}
- AND month_id = DATE_FORMAT(NOW(),'%Y%m')
+
+
+ AND month_id = DATE_FORMAT(NOW(),'%Y%m')
+
+
+ AND month_id = #{monthId}
+
+
+
-
-
+
+
SELECT
month_id AS monthId,
service_ablity AS serviceAbility,
@@ -31,13 +39,12 @@
WHERE
del_flag = '0'
AND org_id = #{agencyId}
- AND customer_id = #{customerId}
ORDER BY MONTH_ID DESC
LIMIT 12
-
+
SELECT
org_name AS NAME,
index_total AS totalIndex,
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml
index 3d9329846d..d224b92d4e 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml
@@ -1,10 +1,10 @@
-
+
-
+
SELECT
index_total AS yearAverageIndex,
service_ablity AS serviceAbility,
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
index f83ec244d7..310320029e 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml
@@ -1,10 +1,10 @@
-
+
-
+
SELECT
ORG_NAME AS NAME,
PARTY_TOTAL AS partyMemberNum,
@@ -18,7 +18,7 @@
WHERE
DEL_FLAG = '0'
AND ORG_TYPE = 'grid'
- AND PARENT_ID = #{agencyId}
+ AND ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%')
AND MONTH_ID = #{monthId}
ORDER BY
(PARTY_TOTAL + GROUP_TOTAL + ISSUE_TOTAL + PROJECT_TOTAL + CLOSE_PROJECT_RATIO + SATISFACTION_RATIO) DESC,
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml
index 8fbf102170..0ee2a6a315 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml
@@ -1,7 +1,7 @@
-
+
@@ -17,7 +17,7 @@
-
+
SELECT
MONTH_ID,
MEET_CATEGORY_NAME AS issue,
@@ -29,7 +29,6 @@
screen_party_branch_data
WHERE
DEL_FLAG = '0'
- AND ORG_TYPE = 'agency'
AND ORG_ID = #{agencyId}
AND TYPE = #{category}
AND MONTH_ID = ]]> #{bottomMonthId}
@@ -39,7 +38,7 @@
-
+
SELECT
ORG_NAME,
SUM( ORGANIZE_COUNT ) AS organizeData ,
@@ -49,7 +48,7 @@
screen_party_branch_data
DEL_FLAG = '0'
- AND ORG_TYPE = 'agency'
+
AND PARENT_ID = #{agencyId}
AND TYPE = #{category}
@@ -70,19 +69,36 @@
-
+
SELECT
month_id AS monthId,
- organize_count AS organizeData,
- join_user_count AS joinData,
- average_join_user_count AS averageJoinUserData
+ SUM(organize_count) AS organizeData,
+ SUM(join_user_count) AS joinData,
+ SUM(average_join_user_count) AS averageJoinUserData
FROM
screen_party_branch_data
WHERE
del_flag = '0'
AND org_id = #{agencyId}
+ AND type = 'voluntaryservice'
+ GROUP BY MONTH_ID
ORDER BY MONTH_ID DESC
LIMIT 12
+
+
+ SELECT
+
+ CASE #{type} WHEN 'organize' THEN SUM(ORGANIZE_COUNT)
+ ELSE SUM(JOIN_USER_COUNT)
+ END AS data
+ FROM
+ screen_party_branch_data
+ WHERE
+ DEL_FLAG = '0'
+ AND ORG_ID = #{agencyId}
+ AND TYPE = #{category}
+ AND MONTH_ID = ]]> #{monthId}
+
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml
index 5643b1e31b..2bbdece16c 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml
@@ -1,10 +1,10 @@
-
+
-
+
SELECT
org_name AS orgName,
create_group_total AS groupTotal,
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
index 66fb4d6a80..8d865b6341 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
@@ -1,10 +1,10 @@
-
+
-
+
SELECT
concat( surname, CASE char_length( NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name,
point_total AS point
@@ -12,7 +12,7 @@
screen_party_user_rank_data
WHERE
del_flag = '0'
- AND org_id = #{agencyId}
+ AND all_parent_ids LIKE CONCAT('%',#{agencyId},'%')
ORDER BY
point_total DESC,
user_name
@@ -21,7 +21,7 @@
-
+
SELECT
USER_ID,
concat( surname, CASE char_length( NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name,
@@ -30,7 +30,7 @@
screen_party_user_rank_data
WHERE
DEL_FLAG = '0'
- AND ORG_ID = #{agencyId}
+ AND ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%')
AND PARTY_FLAG = '1'
ORDER BY
POINT_TOTAL DESC
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
index 5e509c8329..992c347f9b 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml
@@ -1,10 +1,10 @@
-
+
-
+
SELECT
issue_total AS issueTotal,
issue_ratio AS issueRatioA,
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml
new file mode 100644
index 0000000000..1a94210725
--- /dev/null
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+ SELECT
+ ORG_NAME AS NAME,
+ REG_USER_TOTAL AS regNum,
+ JOIN_USER_TOTAL AS joinNum,
+ TOPIC_TOTAL AS topicNum,
+ ISSUE_TOTAL AS issueNum,
+ PROJECT_TOTAL AS projectNum
+ FROM
+ screen_public_parti_total_data
+ WHERE
+ DEL_FLAG = '0'
+ AND PARENT_ID = #{agencyId}
+ ORDER BY
+ (REG_USER_TOTAL + JOIN_USER_TOTAL + TOPIC_TOTAL + ISSUE_TOTAL + PROJECT_TOTAL) DESC,
+ REG_USER_TOTAL desc,
+ JOIN_USER_TOTAL desc,
+ TOPIC_TOTAL desc,
+ ISSUE_TOTAL desc,
+ PROJECT_TOTAL desc
+
+
+
\ No newline at end of file
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml
index 8f17dc796a..cbbc5fe211 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml
@@ -1,10 +1,10 @@
-
+
-
+
SELECT
JOIN_TOTAL AS total,
AVG_JOIN AS averageJoin,
@@ -19,13 +19,13 @@
screen_user_join
WHERE
DEL_FLAG = '0'
- AND ORG_TYPE = 'agency'
+
AND ORG_ID = #{agencyId}
AND MONTH_ID = #{monthId}
-
+
/* SELECT
MONTH_ID,
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml
index a1700b05a4..57b2959430 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml
@@ -1,10 +1,10 @@
-
+
-
+
SELECT
SUM( PARTY_TOTAL ) AS partyMemberTotal,
SUM( USER_TOTAL ) AS platFormTotal
@@ -12,12 +12,11 @@
screen_user_total_data
WHERE
DEL_FLAG = '0'
- AND ORG_TYPE = 'agency'
- AND ORG_ID = #{agencyId}
+ AND PARENT_ID = #{agencyId}
-
+
SELECT
user_total AS userNum,
party_total AS partyMemberNum,
@@ -47,7 +46,7 @@
-
+
SELECT
ORG_NAME AS NAME,
REG_USER_TOTAL AS regNum,
@@ -59,7 +58,6 @@
screen_user_total_data
WHERE
DEL_FLAG = '0'
- AND ORG_TYPE = 'agency'
AND PARENT_ID = #{agencyId}
ORDER BY
(REG_USER_TOTAL + JOIN_USER_TOTAL + TOPIC_TOTAL + ISSUE_TOTAL + PROJECT_TOTAL) DESC,
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java
index be529605de..f89ede1ba6 100644
--- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java
@@ -11,5 +11,6 @@ public interface DataSourceConstant {
String OPER_CRM = "operCrm";
String RESI_GROUP = "resiGroup";
String EPMET_USER = "epmetuser";
+ String EVALUATION_INDEX = "evaluationIndex";
}
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
new file mode 100644
index 0000000000..f02185071f
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java
@@ -0,0 +1,69 @@
+package com.epmet.constant;
+
+/**
+ * 描述一下
+ *
+ * @author yinzuomei@elink-cn.com
+ * @date 2020/8/27 15:20
+ */
+public interface IndexCalConstant {
+
+ Integer PAGE_SIZE = 10;
+
+ String GRID_ID="GRID_ID";
+
+ String DEPT_ID="DEPT_ID";
+
+ String AGENCY_ID="AGENCY_ID";
+
+ String PARENT_AGENCY_ID = "parentAgencyId";
+
+ String PARENT_ID = "PARENT_ID";
+
+ String CUSTOMER_ID="CUSTOMER_ID";
+
+ String MONTH_ID="MONTH_ID";
+
+ String USER_ID="USER_ID";
+ String YEAR_ID = "YEAR_ID";
+
+ String COMMUNITY_LEVEL = "community";
+
+ String STREET_LEVEL = "street";
+
+ String DISTRICT_LEVEL = "district";
+
+ String COMMUNITY_RELATE = "shequxiangguan";
+
+
+
+
+ // 测试插入数据用
+ String customerId="b09527201c4409e19d1dbc5e3c3429a1";
+ //社区S1-C1
+ String SHE_QU_S1_C1="S1-C1";
+ //社区S1-C2
+ String SHE_QU_S1_C2="S1-C2";
+ //网格S1-C1-G1
+ String S1_C1_G1="S1-C1-G1";
+ //网格S1-C1-G2
+ String S1_C1_G2="S1-C1-G2";
+ //网格S1-C2-G1
+ String S1_C2_G1="S1-C2-G1";
+
+ String monthId="202008";
+ String insertUser="yinzuomei";
+
+ String INDEX_DETAIL_LIST_NULL = "指标明细查询集合为空";
+ String COMMUNITY_PARTY_AVG_NULL = "查询下属所有【社区】的党建能力平均值集合为空";
+ String GRID_PARTY_AVG_NULL = "查询下属所有【网格】的党建能力平均值集合为空";
+ String DISTRICT_PARTY_AVG_NULL = "查询【区县】的党建能力平均值集合为空";
+ String STREET_PUBLISH_ARTICLE_LIST_NULL = "查询【街道】名义发文数量集合为空";
+ String DISTRICT_PUBLISH_ARTICLE_LIST_NULL = "查询【区/县】名义发文数量集合为空";
+ String COMMUNITY_PUBLISH_ARTICLE_LIST_NULL = "查询【社区】名义发文数量集合为空";
+ String INDEX_CODE_NULL = "指标Code未查询出对应字段 【 %s 】";
+ String STREET_GOVERN_ABILITY_NULL = "查询【街道】治理能力的六个五级指标集合为空";
+ String COMMUNITY_GOVERN_ABILITY_NULL = "查询【社区】治理能力的六个五级指标集合为空";
+ String STREET_SERVICE_ABILITY_NULL = "查询街道活动组织次数集合为空";
+ String COMMUNITY_SERVICE_ABILITY_NULL = "查询社区活动组织次数集合为空";
+}
diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java
new file mode 100644
index 0000000000..a9abd3411f
--- /dev/null
+++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java
@@ -0,0 +1,135 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *