diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java index ed265248e6..663731dc1b 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EnvEnum.java @@ -1,5 +1,8 @@ package com.epmet.commons.tools.enums; +import com.epmet.commons.tools.utils.SpringContextUtils; +import org.springframework.core.env.Environment; + /** * 系统环境变量枚举类 * dev|test|prod @@ -34,6 +37,16 @@ public enum EnvEnum { return EnvEnum.UN_KNOWN; } + public static EnvEnum getCurrentEnv(){ + Environment environment = SpringContextUtils.getBean(Environment.class); + String[] activeProfiles = environment.getActiveProfiles(); + if (activeProfiles != null && activeProfiles.length > 0) { + return getEnum(activeProfiles[0]); + } + return EnvEnum.UN_KNOWN; + } + + public String getCode() { return code; } diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index 0e8c054d2e..0d75f40b35 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -432,7 +432,7 @@ epmet: # url认证白名单,先判断白名单,在白名单中的url直接放行,不再判断上述需要认证的名单 urlWhiteList: - /data/report/test/test - + - /data/report/screen/** swaggerUrls: jwt: diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index e2239a5081..d2a269c202 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -140,6 +140,10 @@ false + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 @@ -175,6 +179,10 @@ true + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 @@ -210,6 +218,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..7d4fcfe070 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.datareport.service.screen.AgencyService; 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 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..935dd13830 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.datareport.service.screen.DistributionService; import com.epmet.screen.dto.form.*; import com.epmet.screen.dto.result.*; -import com.epmet.datareport.service.screen.DistributionService; 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..3cad80832d 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,6 +1,5 @@ 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; @@ -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..34823bd3fd 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,6 +1,5 @@ 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; @@ -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..401ee272a9 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,6 +1,5 @@ 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; @@ -40,7 +39,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 +52,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,7 +65,7 @@ public class IndexController { * @author zxc * @date 2020/8/19 5:27 下午 */ - @ExternalAppRequestAuth + //@ExternalAppRequestAuth @PostMapping("monthindexanalysis/barchart") public Result monthBarchart(@RequestBody MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam){ ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class); @@ -79,7 +78,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..0f3fe32130 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,6 +1,5 @@ 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; @@ -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..79d61f5f75 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,6 +1,5 @@ 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; @@ -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/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.java new file mode 100644 index 0000000000..02d7e0c722 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.java @@ -0,0 +1,43 @@ +/** + * 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.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.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/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java index a03353e825..2230e636b9 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/screen/ScreenUserTotalDataDao.java @@ -18,7 +18,6 @@ package com.epmet.datareport.dao.screen; import com.epmet.screen.dto.result.PartymemberPercentResultDTO; -import com.epmet.screen.dto.result.PublicPartiRankResultDTO; import com.epmet.screen.dto.result.TopProfileResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -60,12 +59,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/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java index 9ca543828c..cb7fd872a5 100644 --- 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 @@ -46,7 +46,11 @@ public class AgencyServiceImpl implements AgencyService { if (null == rootAgency){ return new TreeResultDTO(); } - List departmentList = this.getDepartmentList(("".equals(rootAgency.getPids()) ? "" : rootAgency.getPids() + ",") + rootAgency.getValue()); + String sub = null; + if ("".equals(rootAgency.getPids()) || rootAgency.getPids().equals("0")){ + sub = rootAgency.getValue(); + } + List departmentList = this.getDepartmentList(sub); rootAgency.setChildren(departmentList); return rootAgency; } 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/screen/impl/GrassRootsGovernServiceImpl.java index 8b0db2c65a..2dd8233800 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/screen/impl/GrassRootsGovernServiceImpl.java @@ -44,6 +44,9 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { 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 @@ -122,11 +125,17 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { @DataSource(value = DataSourceConstant.STATS,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; } 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/screen/impl/GrassrootsPartyDevServiceImpl.java index 4b31a1e02a..3cbb95a0db 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/screen/impl/GrassrootsPartyDevServiceImpl.java @@ -6,12 +6,12 @@ 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.service.screen.GrassrootsPartyDevService; 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.github.pagehelper.PageHelper; import com.google.common.collect.Maps; import org.apache.commons.lang3.StringUtils; @@ -57,6 +57,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService 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)); 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..44b522b30b 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 @@ -130,4 +130,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/logback-spring.xml b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml index 08a6a198d1..ea81aca726 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 - - + + ERROR ACCEPT DENY + ${webHook} + ${secret} + ${appname} 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..ff931885f6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml @@ -0,0 +1,29 @@ + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java index 7993cb2355..3c7c7a5141 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java @@ -82,17 +82,17 @@ public class GridPartyMemberDataFormDTO implements Serializable { private BigDecimal topicToIssueRatio; /** - * 提出的议题转项目数 + * 上级组织Id */ - private Integer issueToProjectCount; + private String parentId; /** - * 用户id - */ - private String userId; + * 党员自建群活跃群众人数(08-24) + */ + private Integer groupActiveUserCount; /** - * 上级组织Id + * 用户id */ - private String parentId; + private String userId; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/IndexCalculateForm.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/IndexCalculateForm.java new file mode 100644 index 0000000000..49e30cdb21 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/IndexCalculateForm.java @@ -0,0 +1,23 @@ +package com.epmet.dto.screen.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * desc:初始化客户指标权重参数实体类 + * @author liujianjun + */ +@Data +public class IndexCalculateForm implements Serializable { + private static final long serialVersionUID = 3280392511156378209L; + /** + * desc:客户id + */ + private String customerId; + + /** + * desc:月份id + */ + private String monthId; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PublicPartiTotalDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PublicPartiTotalDataFormDTO.java new file mode 100644 index 0000000000..df902a06a2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PublicPartiTotalDataFormDTO.java @@ -0,0 +1,67 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 18、公众参与各类总数 入参 + * 公众参与-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class PublicPartiTotalDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织类别 agency:组织;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id,如果是网格,传入网格所属的组织id + */ + private String parentId; + + /** + * 组织名称(可以是网格名称,也可以是组织名称) + */ + private String orgName; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 注册人数 + */ + private Integer regUserTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 参与人数 + */ + private Integer joinUserTotal; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java index 14f4df673d..3111d5136d 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java @@ -68,14 +68,4 @@ public class UserTotalDataFormDTO implements Serializable { * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) */ private String dataEndTime; - - /** - * 注册人数(08-21新增) - */ - private Integer regUserTotal; - - /** - * 参与人数(08-21新增) - */ - private Integer joinUserTotal; } diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 95c74f75d1..cde679eba4 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -178,6 +178,12 @@ epmet_user_user EpmEt-db-UsEr + + + + epmet_data_stats_display_user + EpmEt-db-UsEr + 0 192.168.1.130 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java index 21b5ea51b7..eee1f3bca7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.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.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; @@ -15,6 +17,6 @@ public class DataStatsApplication { public static void main(String[] args) { SpringApplication.run(DataStatsApplication.class ,args); - //HttpClientManager.getInstance().sendAlarmMsg("DataStatsApplication started!"); + HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() +" DataStatsApplication started!"); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java new file mode 100644 index 0000000000..cba12740c5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -0,0 +1,154 @@ +package com.epmet.controller; + +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.screen.form.IndexCalculateForm; +import com.epmet.service.screen.IndexCalculateService; +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; + +/** + * 指标计算controller + * + * @author liujianjun@elink-cn.com + * @date 2020/8/24 14:38 + */ +@RestController +@RequestMapping("indexcalculate") +public class IndexCalculateController { + + @Autowired + private IndexCalculateService indexCalculateService; + + /** + * 1、党建能力-党员相关指标计算(按照月份) + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("cpc") + public Result cpcIndexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody IndexCalculateForm formDTO) { + indexCalculateService.cpcIndexCalculate(formDTO); + return new Result(); + } + + /* *//** + * 2、党建能力-网格相关指标上报(按照月份) + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("gridpartyability") + public Result gridPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridPartyAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 3、党建能力-街道及社区相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("orgpartyability") + public Result orgPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertOrgPartyAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 4、服务能力-网格相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("gridserviceability") + public Result gridServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridServiceAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 5、服务能力-组织(街道|社区|全区)相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("orgserviceability") + public Result orgServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertOrgServiceAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 6、治理能力-网格相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("gridgovrnability") + public Result gridGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 7、治理能力-街道及社区相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("orggovrnability") + public Result orgGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertOrgGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } + + *//** + * 8、治理能力-部门相关指标 + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **//* + @ExternalAppRequestAuth + @PostMapping("deptgovrnability") + public Result deptGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertDeptGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + }*/ +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java index 0d0b21befc..c26189717e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java @@ -70,6 +70,7 @@ public class IndexDictController { } /** + * url:http://localhost:8108/data/stats/indexdict/initCustomerIndex * desc: 初始化客户的评价指标数据 * @param formDTO customerId * @return diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java index 080ba5384b..60042f986b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java @@ -283,4 +283,21 @@ public class ScreenCollController { screenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId()); return new Result(); } + + /** + * 18、公众参与各类总数 + * 公众参与-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 + * + * @param formDTO + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 09:44 2020-08-25 + **/ + @ExternalAppRequestAuth + @PostMapping("publicpartitotaldata") + public Result publicPartiTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + screenCollService.insertPublicPartiTotalData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java new file mode 100644 index 0000000000..a4fdc9f221 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java @@ -0,0 +1,60 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.PublicPartiTotalDataFormDTO; +import com.epmet.entity.screen.ScreenPublicPartiTotalDataEntity; +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 extends BaseDao { + + /** + * 18、公众参与各类总数 + * 公众参与-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-25 + **/ + void deletePublicPartiTotalData(@Param("customerId") String customerId, + @Param("orgIds") String[] orgIds); + + /** + * 18、公众参与各类总数 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-25 + **/ + void batchInsertPublicPartiTotalData(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java index e6ec77f0fa..689c396b2a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java @@ -27,10 +27,10 @@ import java.math.BigDecimal; import java.util.Date; /** - * 党建能力-党员相关的事实表 + * 党建能力-党员相关的事实表 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-20 + * @since v1.0.0 2020-08-24 */ @Data @EqualsAndHashCode(callSuper=false) @@ -39,89 +39,89 @@ public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; - /** - * 客户Id - */ + /** + * 客户Id + */ private String customerId; - /** - * 机关Id - */ + /** + * 机关Id + */ private String agencyId; - /** - * 上级组织Id - */ + /** + * 上级组织Id + */ private String parentId; - /** - * 网格Id - */ + /** + * 网格Id + */ private String gridId; - /** - * 用户Id: - */ + /** + * 用户Id: + */ private String userId; - /** - * 月维度Id: yyyMM - */ + /** + * 月维度Id: yyyMM + */ private String monthId; - /** - * 季度Id: yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 - */ + /** + * 季度Id: yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ private String quarterId; - /** - * 年Id : yyyy - */ + /** + * 年Id : yyyy + */ private String yearId; - /** - * 党员提出的话题数 - */ + /** + * 党员提出的话题数 + */ private Integer createTopicCount; - /** - * 党员参与话题数(支持,反对,评论,浏览) - */ + /** + * 党员参与话题数(支持,反对,评论,浏览) + */ private Integer joinTopicCount; - /** - * 话题转议题数 - */ + /** + * 党员提出的话题转议题数 + */ private Integer shiftIssueCount; - /** - * 议题转项目数 - */ + /** + * 党员提出的议题转项目数 + */ private Integer shiftProjectCount; - /** - * 参加三会一课次数 - */ + /** + * 参加三会一课次数 + */ private Integer joinThreeMeetsCount; - /** - * 自建群群众人数 - */ + /** + * 党员自建群群众人数 + */ private Integer groupUserCount; - /** - * 自建群活跃度-话题数 - */ + /** + * 党员自建群活跃群众人数(08-24) + */ + private Integer groupActiveUserCount; + + /** + * 党员自建群活跃度——话题数 + */ private Integer groupTopicCount; - /** - * 议题转项目率 - */ + /** + * 自建群活跃度——议题转项目率 + */ private BigDecimal topicToIssueRatio; - /** - * 提出的议题转项目数 - */ - private Integer issueToProjectCount; - } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java new file mode 100644 index 0000000000..56905509ad --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-24 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_public_parti_total_data") +public class ScreenPublicPartiTotalDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;网格:grid;部门:department; + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id,如果是网格,传入网格所属组织id + */ + private String parentId; + + /** + * 组织名称,也可能是网格名称 + */ + private String orgName; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 注册人数 + */ + private Integer regUserTotal; + + /** + * 参与人数 + */ + private Integer joinUserTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java index a58f257cc6..bc50eaea04 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java @@ -26,7 +26,7 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 中央区-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 + * 中央区-各类(用户|党员|党群|话题|议题|项目)总数 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-21 @@ -98,14 +98,4 @@ public class ScreenUserTotalDataEntity extends BaseEpmetEntity { */ private Integer projectTotal; - /** - * 注册人数(08-21新增) - */ - private Integer regUserTotal; - - /** - * 参与人数(08-21新增) - */ - private Integer joinUserTotal; - } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java new file mode 100644 index 0000000000..a43dcc2907 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java @@ -0,0 +1,17 @@ +package com.epmet.service.screen; + +import com.epmet.dto.screen.form.IndexCalculateForm; + +/** + * 指标计算service + * + * @author liujianjun@elink-cn.com + * @date 2020/8/18 10:25 + */ +public interface IndexCalculateService { + /** + * desc:计算党员相关指标 + * @param formDTO + */ + void cpcIndexCalculate(IndexCalculateForm formDTO); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java index 6ce2d9c3c8..5ebb7d910b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java @@ -1,6 +1,5 @@ package com.epmet.service.screen; -import com.epmet.commons.tools.utils.Result; import com.epmet.dto.screencoll.form.*; import java.util.List; @@ -219,4 +218,17 @@ public interface ScreenCollService { * @Date 10:52 2020-08-18 **/ void insertPioneerData(List formDTO, String customerId); + + /** + * 18、公众参与各类总数 + * 公众参与-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * @param formDTO + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 09:44 2020-08-25 + **/ + void insertPublicPartiTotalData(List formDTO, String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java new file mode 100644 index 0000000000..7aff662edf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java @@ -0,0 +1,16 @@ +package com.epmet.service.screen.impl; + +import com.epmet.dto.screen.form.IndexCalculateForm; +import com.epmet.service.screen.IndexCalculateService; +import org.springframework.stereotype.Service; + +/** + * @author liujianjun + */ +@Service +public class IndexCalculateServiceImpl implements IndexCalculateService { + @Override + public void cpcIndexCalculate(IndexCalculateForm formDTO) { + + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java index b5e65fd193..83162e601a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java @@ -80,6 +80,8 @@ public class ScreenCollServiceImpl implements ScreenCollService { private ScreenPioneerDataDao screenPioneerDataDao; @Autowired private ScreenIndexDataYearlyDao screenIndexDataYearlyDao; + @Autowired + private ScreenPublicPartiTotalDataDao screenPublicPartiTotalDataDao; @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @@ -445,4 +447,19 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenPioneerDataDao.batchInsertPioneerData(formDTO, customerId); } } + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @Override + @Transactional(rollbackFor = Exception.class) + public void insertPublicPartiTotalData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] orgIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + orgIds[i] = formDTO.get(i).getOrgId(); + } + screenPublicPartiTotalDataDao.deletePublicPartiTotalData(customerId, orgIds); + + screenPublicPartiTotalDataDao.batchInsertPublicPartiTotalData(formDTO, customerId); + } + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/Correlation.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/Correlation.java new file mode 100644 index 0000000000..f7a31b1436 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/Correlation.java @@ -0,0 +1,17 @@ +package com.epmet.support.normalizing; + +/** + * 指标正负相关枚举 + */ +public enum Correlation { + POSITIVE("positive","正相关"), + NEGATIVE("negative","负相关"), + ; + + private String code; + private String desc; + Correlation(String code,String desc){ + this.code = code; + this.desc = desc; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/DoubleScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/DoubleScoreCalculator.java new file mode 100644 index 0000000000..01258d0f45 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/DoubleScoreCalculator.java @@ -0,0 +1,52 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Double的分值计算 + * 每一种数据类型的计算都要继承ScoreCalculator并且实现其抽象方法,实现数据类型的转换 + */ +public class DoubleScoreCalculator extends ScoreCalculator { + + /** + * 初始化double类型分值计算 + * ☆☆☆ 务必在该构造方法最后调用父类的prepare()方法 ☆☆☆ + * @param sourceArray 数据所在的数组 + * @param minScore 分值区间的左边界 + * @param maxScore 分值区间的右边界 + * @param correlation 相关性 + */ + public DoubleScoreCalculator(Double[] sourceArray, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + this.sourceArrary = sourceArray.clone(); + this.minScore = minScore; + this.maxScore = maxScore; + this.correlation = correlation; + this.prepare(); + } + + public DoubleScoreCalculator(List sourceArray, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + this.sourceArrary = sourceArray.toArray(); + this.minScore = minScore; + this.maxScore = maxScore; + this.correlation = correlation; + this.prepare(); + } + + @Override + public BigDecimal getMaxFromSourceArray() { + Double[] doubleSourceArrary = (Double[]) this.sourceArrary; + return new BigDecimal(doubleSourceArrary[doubleSourceArrary.length - 1]); + } + + @Override + public BigDecimal getMinFromSourceArray() { + Double[] intSourceArrary = (Double[]) this.sourceArrary; + return new BigDecimal(intSourceArrary[0]); + } + + @Override + public BigDecimal convertValue2BigDecimal(Object sourceValue) { + return new BigDecimal((Double) sourceValue); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/IntegerScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/IntegerScoreCalculator.java new file mode 100644 index 0000000000..98f837ab7e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/IntegerScoreCalculator.java @@ -0,0 +1,55 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Integer的分值计算 + * 每一种数据类型的计算都要继承ScoreCalculator并且实现其抽象方法,实现数据类型的转换 + */ +public class IntegerScoreCalculator extends ScoreCalculator { + + /** + * 初始化整数分值计算 + * ☆☆☆ 务必在该构造方法最后调用父类的prepare()方法 ☆☆☆ + * @param sourceArray 数据所在的数组 + * @param minScore 分值区间的左边界 + * @param maxScore 分值区间的右边界 + * @param correlation 相关性 + */ + public IntegerScoreCalculator(Integer[] sourceArray, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + this.sourceArrary = sourceArray.clone(); + this.minScore = minScore; + this.maxScore = maxScore; + this.correlation = correlation; + this.prepare(); + System.out.println("最小值:"+minScore+";最大值:"+maxScore); + + } + + public IntegerScoreCalculator(List sourceList, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + this.sourceArrary = sourceList.toArray(); + this.minScore = minScore; + this.maxScore = maxScore; + this.correlation = correlation; + this.prepare(); + System.out.println("最小值:"+minScore+";最大值:"+maxScore); + } + + @Override + public BigDecimal getMaxFromSourceArray() { + Integer[] intSourceArrary = (Integer[]) this.sourceArrary; + return new BigDecimal(intSourceArrary[intSourceArrary.length - 1]); + } + + @Override + public BigDecimal getMinFromSourceArray() { + Integer[] intSourceArrary = (Integer[]) this.sourceArrary; + return new BigDecimal(intSourceArrary[0]); + } + + @Override + public BigDecimal convertValue2BigDecimal(Object sourceValue) { + return new BigDecimal((Integer) sourceValue); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreCalculator.java new file mode 100644 index 0000000000..48692e92ce --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreCalculator.java @@ -0,0 +1,178 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; +import java.math.MathContext; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 所有数据类型计算器的父类,实现算法骨架,数据类型转换方法则由子类实现 + * ☆☆☆ 如果需要保持传入的数组元素顺序不变,请在实现类的构造方法中将传入数组进行克隆 ☆☆☆ + * @param 数据类型泛型 + */ +public abstract class ScoreCalculator { + + protected T[] sourceArrary; + + protected BigDecimal minScore; + protected BigDecimal maxScore; + + protected Correlation correlation; + + private BigDecimal maxValue; + private BigDecimal minValue; + private BigDecimal coefficient; + + /** + * 计算准备 + */ + protected void prepare() { + // 校验数组 + if (!validSourceArray(sourceArrary)) { + throw new RuntimeException("入参数组错误:请设置非空数组"); + } + Arrays.sort(sourceArrary); + maxValue = getMaxFromSourceArray(); + minValue = getMinFromSourceArray(); + //计算系数 + System.out.println("最小值:"+minScore+";最大值:"+maxScore); + coefficient = getCoefficient(minValue, maxValue); + } + + /** + * 单值归一算法 + * @return + */ + public BigDecimal normalize(T sourceValue) { + + if (sourceValue == null) { + throw new RuntimeException("入参数组错误:请设置sourceValue"); + } + + if (!Arrays.asList(sourceArrary).contains(sourceValue)) { + throw new RuntimeException("请确认要计算的数组在数组中存在"); + } + + if (correlation == Correlation.POSITIVE) { + // 正相关 + BigDecimal x = coefficient.multiply(convertValue2BigDecimal(sourceValue).subtract(minValue)); + BigDecimal score = minScore.add(x, MathContext.DECIMAL32); + return score; + } else if (correlation == Correlation.NEGATIVE) { + // 负相关 + BigDecimal x = coefficient.multiply(convertValue2BigDecimal(sourceValue).subtract(minValue)); + BigDecimal score = minScore.add(x); + return maxScore.subtract(score, MathContext.DECIMAL32); + } else { + throw new RuntimeException("错误的相关性"); + } + } + + /** + * 单值归一算法,带权重 + * @param sourceValue + * @param weight + * @return + */ + public BigDecimal normalize(T sourceValue, BigDecimal weight) { + return normalize(sourceValue).multiply(weight); + } + + /** + * 批量归一算法 + * @param sourceValues + * @return + */ + public BigDecimal[] normalize(T[] sourceValues) { + + BigDecimal[] scores = new BigDecimal[sourceValues.length]; + + for (int i=0;i normalize(List sourceValues) { + return sourceValues.stream().map(s -> normalize(s)).collect(Collectors.toList()); + } + + /** + * 批量归一算法,带权重 + * @param sourceValues + * @param weight + * @return + */ + public BigDecimal[] normalize(T[] sourceValues, BigDecimal weight) { + + BigDecimal[] scores = new BigDecimal[sourceValues.length]; + + for (int i=0;i normalize(List sourceValues, BigDecimal weight) { + return sourceValues.stream().map(s -> normalize(s).multiply(weight)).collect(Collectors.toList()); + } + + /** + * 校验数组 + * @param sourceArray + * @param + * @return + */ + protected boolean validSourceArray(T[] sourceArray) { + if (sourceArray == null || sourceArray.length == 0) { + return false; + } + return true; + } + + /** + * 计算系数 + * @return + */ + protected BigDecimal getCoefficient(BigDecimal min, BigDecimal max) { + BigDecimal fenmu = max.subtract(min); + if (fenmu.toString().equals("0"))return new BigDecimal(0); + BigDecimal fenzi = maxScore.subtract(minScore); + BigDecimal divide = fenzi.divide(fenmu, MathContext.DECIMAL32); + System.out.println("分子:"+fenzi+"分母:"+fenmu+"系数:"+divide.toString()); + return divide; + } + + /** + * 从源数组中获取最大值 + * @return + */ + protected abstract BigDecimal getMaxFromSourceArray(); + + /** + * 从源数组中获取最小值 + * @return + */ + protected abstract BigDecimal getMinFromSourceArray(); + + /** + * 将值转化为BigDecimal + * @param sourceValue + * @return + */ + protected abstract BigDecimal convertValue2BigDecimal(T sourceValue); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml index 836adcdb03..c64ce8f35e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml @@ -9,7 +9,6 @@ - @@ -21,13 +20,14 @@ - + + @@ -44,7 +44,6 @@ AGENCY_ID, PARENT_ID, GRID_ID, - USER_ID, MONTH_ID, QUARTER_ID, YEAR_ID, @@ -56,13 +55,14 @@ GROUP_USER_COUNT, GROUP_TOPIC_COUNT, TOPIC_TO_ISSUE_RATIO, - ISSUE_TO_PROJECT_COUNT, + GROUP_ACTIVE_USER_COUNT, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + USER_ID ) values ( @@ -71,7 +71,6 @@ #{item.agencyId}, #{item.parentId}, #{item.gridId}, - #{item.userId}, #{item.monthId}, #{item.quarterId}, #{item.yearId}, @@ -83,13 +82,14 @@ #{item.groupUserCount}, #{item.groupTopicCount}, #{item.topicToIssueRatio}, - #{item.issueToProjectCount}, + #{item.groupActiveUserCount}, 0, 0, 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.userId} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml new file mode 100644 index 0000000000..c3a9200142 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete from screen_public_parti_total_data + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + + + + insert into screen_public_parti_total_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + DATA_END_TIME, + TOPIC_TOTAL, + ISSUE_TOTAL, + PROJECT_TOTAL, + REG_USER_TOTAL, + JOIN_USER_TOTAL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.dataEndTime}, + #{item.topicTotal}, + #{item.issueTotal}, + #{item.projectTotal}, + #{item.regUserTotal}, + + #{item.joinUserTotal}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml index a3f29dd5a6..29cca7fc82 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml @@ -28,8 +28,6 @@ TOPIC_TOTAL, ISSUE_TOTAL, PROJECT_TOTAL, - REG_USER_TOTAL, - JOIN_USER_TOTAL, DEL_FLAG, REVISION, CREATED_BY, @@ -52,8 +50,6 @@ #{item.topicTotal}, #{item.issueTotal}, #{item.projectTotal}, - #{item.regUserTotal}, - #{item.joinUserTotal}, 0, 0, 'APP_USER',