From 798c4e95c96ef991dd7ed26e46a9a7fc1fcbe28c Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 14 Aug 2020 10:21:48 +0800 Subject: [PATCH 001/360] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml index c1416cc71c..11e57ebe24 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.128 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.129 ports: - "8110:8110" network_mode: host # 使用现有网络 From 504b2810d5fab9d94d91f4ec767bc9d410e991d1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 18 Aug 2020 10:39:52 +0800 Subject: [PATCH 002/360] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86+?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/screen/AgencyController.java | 15 +++ .../screen/DistributionController.java | 15 +++ .../screen/GrassRootsGovernController.java | 15 +++ .../screen/GrassrootsPartyDevController.java | 15 +++ .../controller/screen/IndexController.java | 15 +++ .../screen/PartyMemberLeadController.java | 15 +++ .../controller/screen/ProjectController.java | 15 +++ .../dao/screen/ScreenCpcBaseDataDao.java | 31 +++++ .../dao/screen/ScreenCustomerAgencyDao.java | 31 +++++ .../dao/screen/ScreenDifficultyDataDao.java | 31 +++++ .../epmet/dao/screen/ScreenEventDataDao.java | 31 +++++ .../dao/screen/ScreenEventImgDataDao.java | 31 +++++ .../dao/screen/ScreenGovernRankDataDao.java | 31 +++++ .../epmet/dao/screen/ScreenIndexDataDao.java | 31 +++++ .../dao/screen/ScreenOrgRankDataDao.java | 31 +++++ .../dao/screen/ScreenPartyBranchDataDao.java | 31 +++++ .../screen/ScreenPartyLinkMassesDataDao.java | 31 +++++ .../screen/ScreenPartyUserRankDataDao.java | 31 +++++ .../dao/screen/ScreenPioneerDataDao.java | 31 +++++ .../epmet/dao/screen/ScreenUserJoinDao.java | 31 +++++ .../dao/screen/ScreenUserTotalDataDao.java | 31 +++++ .../ScreenVoluntaryActivityDataDao.java | 31 +++++ .../epmet/service/screen/AgencyService.java | 10 ++ .../service/screen/DistributionService.java | 10 ++ .../screen/GrassRootsGovernService.java | 10 ++ .../screen/GrassrootsPartyDevService.java | 10 ++ .../epmet/service/screen/IndexService.java | 10 ++ .../screen/PartyMemberLeadService.java | 10 ++ .../epmet/service/screen/ProjectService.java | 10 ++ .../screen/impl/AgencyServiceImpl.java | 12 ++ .../screen/impl/DistributionServiceImpl.java | 12 ++ .../impl/GrassRootsGovernServiceImpl.java | 12 ++ .../impl/GrassrootsPartyDevServiceImpl.java | 12 ++ .../service/screen/impl/IndexServiceImpl.java | 12 ++ .../impl/PartyMemberLeadServiceImpl.java | 12 ++ .../screen/impl/ProjectServiceImpl.java | 12 ++ .../mapper/screen/ScreenCpcBaseDataDao.xml | 8 ++ .../mapper/screen/ScreenCustomerAgencyDao.xml | 8 ++ .../mapper/screen/ScreenDifficultyDataDao.xml | 7 + .../mapper/screen/ScreenEventDataDao.xml | 8 ++ .../mapper/screen/ScreenEventImgDataDao.xml | 8 ++ .../mapper/screen/ScreenGovernRankDataDao.xml | 7 + .../mapper/screen/ScreenIndexDataDao.xml | 8 ++ .../mapper/screen/ScreenOrgRankDataDao.xml | 8 ++ .../screen/ScreenPartyBranchDataDao.xml | 8 ++ .../screen/ScreenPartyLinkMassesDataDao.xml | 8 ++ .../screen/ScreenPartyUserRankDataDao.xml | 8 ++ .../mapper/screen/ScreenPioneerDataDao.xml | 7 + .../mapper/screen/ScreenUserJoinDao.xml | 7 + .../mapper/screen/ScreenUserTotalDataDao.xml | 8 ++ .../screen/ScreenVoluntaryActivityDataDao.xml | 8 ++ .../controller/ScreenCollController.java | 15 +++ .../dao/screen/ScreenCpcBaseDataDao.java | 33 +++++ .../dao/screen/ScreenCustomerAgencyDao.java | 33 +++++ .../dao/screen/ScreenDifficultyDataDao.java | 33 +++++ .../epmet/dao/screen/ScreenEventDataDao.java | 33 +++++ .../dao/screen/ScreenEventImgDataDao.java | 33 +++++ .../dao/screen/ScreenGovernRankDataDao.java | 33 +++++ .../epmet/dao/screen/ScreenIndexDataDao.java | 33 +++++ .../dao/screen/ScreenOrgRankDataDao.java | 33 +++++ .../dao/screen/ScreenPartyBranchDataDao.java | 33 +++++ .../screen/ScreenPartyLinkMassesDataDao.java | 33 +++++ .../screen/ScreenPartyUserRankDataDao.java | 33 +++++ .../dao/screen/ScreenPioneerDataDao.java | 33 +++++ .../epmet/dao/screen/ScreenUserJoinDao.java | 33 +++++ .../dao/screen/ScreenUserTotalDataDao.java | 33 +++++ .../ScreenVoluntaryActivityDataDao.java | 33 +++++ .../screen/ScreenCpcBaseDataEntity.java | 111 +++++++++++++++ .../screen/ScreenCustomerAgencyEntity.java | 100 ++++++++++++++ .../screen/ScreenDifficultyDataEntity.java | 116 ++++++++++++++++ .../entity/screen/ScreenEventDataEntity.java | 127 ++++++++++++++++++ .../screen/ScreenEventImgDataEntity.java | 56 ++++++++ .../screen/ScreenGovernRankDataEntity.java | 97 +++++++++++++ .../entity/screen/ScreenIndexDataEntity.java | 97 +++++++++++++ .../screen/ScreenOrgRankDataEntity.java | 112 +++++++++++++++ .../screen/ScreenPartyBranchDataEntity.java | 101 ++++++++++++++ .../ScreenPartyLinkMassesDataEntity.java | 76 +++++++++++ .../screen/ScreenPartyUserRankDataEntity.java | 96 +++++++++++++ .../screen/ScreenPioneerDataEntity.java | 91 +++++++++++++ .../entity/screen/ScreenUserJoinEntity.java | 97 +++++++++++++ .../screen/ScreenUserTotalDataEntity.java | 96 +++++++++++++ .../ScreenVoluntaryActivityDataEntity.java | 86 ++++++++++++ .../mapper/screen/ScreenCpcBaseDataDao.xml | 8 ++ .../mapper/screen/ScreenCustomerAgencyDao.xml | 8 ++ .../mapper/screen/ScreenDifficultyDataDao.xml | 8 ++ .../mapper/screen/ScreenEventDataDao.xml | 8 ++ .../mapper/screen/ScreenEventImgDataDao.xml | 7 + .../mapper/screen/ScreenGovernRankDataDao.xml | 8 ++ .../mapper/screen/ScreenIndexDataDao.xml | 8 ++ .../mapper/screen/ScreenOrgRankDataDao.xml | 8 ++ .../screen/ScreenPartyBranchDataDao.xml | 8 ++ .../screen/ScreenPartyLinkMassesDataDao.xml | 7 + .../screen/ScreenPartyUserRankDataDao.xml | 8 ++ .../mapper/screen/ScreenPioneerDataDao.xml | 8 ++ .../mapper/screen/ScreenUserJoinDao.xml | 8 ++ .../mapper/screen/ScreenUserTotalDataDao.xml | 8 ++ .../screen/ScreenVoluntaryActivityDataDao.xml | 8 ++ 97 files changed, 2927 insertions(+) create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassRootsGovernController.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassrootsPartyDevController.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/IndexController.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/PartyMemberLeadController.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/ProjectController.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassRootsGovernService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassrootsPartyDevService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/IndexService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/PartyMemberLeadService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/ProjectService.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassRootsGovernServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/IndexServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/PartyMemberLeadServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/ProjectServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java new file mode 100644 index 0000000000..73c93f89f5 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java @@ -0,0 +1,15 @@ +package com.epmet.controller.screen; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 组织相关api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:15 + */ +@RestController +@RequestMapping("/screen/agency") +public class AgencyController { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java new file mode 100644 index 0000000000..af386611f1 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java @@ -0,0 +1,15 @@ +package com.epmet.controller.screen; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 中央区相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:14 + */ +@RestController +@RequestMapping("/screen/distribution") +public class DistributionController { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassRootsGovernController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassRootsGovernController.java new file mode 100644 index 0000000000..2d2c251a26 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassRootsGovernController.java @@ -0,0 +1,15 @@ +package com.epmet.controller.screen; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 基层治理相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:12 + */ +@RestController +@RequestMapping("/screen/grassrootsgovern") +public class GrassRootsGovernController { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassrootsPartyDevController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassrootsPartyDevController.java new file mode 100644 index 0000000000..0eb55c6c2c --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassrootsPartyDevController.java @@ -0,0 +1,15 @@ +package com.epmet.controller.screen; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 基层党建相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:11 + */ +@RestController +@RequestMapping("/screen/grassrootspartydev") +public class GrassrootsPartyDevController { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/IndexController.java new file mode 100644 index 0000000000..6bd6faab9b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/IndexController.java @@ -0,0 +1,15 @@ +package com.epmet.controller.screen; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 指数相关相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:13 + */ +@RestController +@RequestMapping("/screen/index") +public class IndexController { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/PartyMemberLeadController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/PartyMemberLeadController.java new file mode 100644 index 0000000000..6f730e9711 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/PartyMemberLeadController.java @@ -0,0 +1,15 @@ +package com.epmet.controller.screen; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 党建引领相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:10 + */ +@RestController +@RequestMapping("/screen/partymemberlead") +public class PartyMemberLeadController { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/ProjectController.java new file mode 100644 index 0000000000..20e5af2bf4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/ProjectController.java @@ -0,0 +1,15 @@ +package com.epmet.controller.screen; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 项目 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:16 + */ +@RestController +@RequestMapping("/screen/project") +public class ProjectController { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java new file mode 100644 index 0000000000..2210a3b541 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 基层党建-党员基本情况 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCpcBaseDataDao{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java new file mode 100644 index 0000000000..441e7e3ebc --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 组织机构信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCustomerAgencyDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java new file mode 100644 index 0000000000..e39518da61 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 基层治理-难点堵点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenDifficultyDataDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java new file mode 100644 index 0000000000..e5ae922669 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 中央区-事件数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenEventDataDao{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java new file mode 100644 index 0000000000..66e45a7076 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 中央区-事件数据图片数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenEventImgDataDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java new file mode 100644 index 0000000000..1f6b354383 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 基层治理-治理能力排行数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenGovernRankDataDao{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java new file mode 100644 index 0000000000..d722725afc --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 指数-指数数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenIndexDataDao{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java new file mode 100644 index 0000000000..eb501a0c4b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 党建引领-组织排行榜 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenOrgRankDataDao{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java new file mode 100644 index 0000000000..08760ede69 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 基层党建-建设情况数据(支部,联建) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenPartyBranchDataDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java new file mode 100644 index 0000000000..b7c6bd385d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 党建引领-党员联系群众数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenPartyLinkMassesDataDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java new file mode 100644 index 0000000000..b888baed3d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 党建引领|基层治理-市民(党员)积分排行榜 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenPartyUserRankDataDao{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java new file mode 100644 index 0000000000..cf086610d6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 党建引领-先锋模范数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenPioneerDataDao{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java new file mode 100644 index 0000000000..0eb4b041ac --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 基层治理-公众参与 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenUserJoinDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java new file mode 100644 index 0000000000..ec1e99bcc1 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 中央区-各类用户总数 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenUserTotalDataDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java new file mode 100644 index 0000000000..7b83a751c0 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 党建引领-志愿活动服务数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenVoluntaryActivityDataDao{ + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java new file mode 100644 index 0000000000..99f32bef09 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java @@ -0,0 +1,10 @@ +package com.epmet.service.screen; + +/** + * 组织相关api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:18 + */ +public interface AgencyService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java new file mode 100644 index 0000000000..138b0aeb1d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java @@ -0,0 +1,10 @@ +package com.epmet.service.screen; + +/** + * 中央区相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:19 + */ +public interface DistributionService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassRootsGovernService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassRootsGovernService.java new file mode 100644 index 0000000000..2ec957601e --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassRootsGovernService.java @@ -0,0 +1,10 @@ +package com.epmet.service.screen; + +/** + * 基层治理相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:20 + */ +public interface GrassRootsGovernService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassrootsPartyDevService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassrootsPartyDevService.java new file mode 100644 index 0000000000..31fe870770 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassrootsPartyDevService.java @@ -0,0 +1,10 @@ +package com.epmet.service.screen; + +/** + * 基层党建相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:21 + */ +public interface GrassrootsPartyDevService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/IndexService.java new file mode 100644 index 0000000000..da71854f81 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/IndexService.java @@ -0,0 +1,10 @@ +package com.epmet.service.screen; + +/** + * 指数相关相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:21 + */ +public interface IndexService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/PartyMemberLeadService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/PartyMemberLeadService.java new file mode 100644 index 0000000000..745720e6f8 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/PartyMemberLeadService.java @@ -0,0 +1,10 @@ +package com.epmet.service.screen; + +/** + * 党建引领相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:22 + */ +public interface PartyMemberLeadService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/ProjectService.java new file mode 100644 index 0000000000..35b2ebbb2d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/ProjectService.java @@ -0,0 +1,10 @@ +package com.epmet.service.screen; + +/** + * 项目 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:22 + */ +public interface ProjectService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java new file mode 100644 index 0000000000..e6fb4de7cb --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java @@ -0,0 +1,12 @@ +package com.epmet.service.screen.impl; + +import com.epmet.service.screen.AgencyService; + +/** + * 组织相关api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:18 + */ +public class AgencyServiceImpl implements AgencyService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java new file mode 100644 index 0000000000..a00c9d0665 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java @@ -0,0 +1,12 @@ +package com.epmet.service.screen.impl; + +import com.epmet.service.screen.DistributionService; + +/** + * 中央区相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:19 + */ +public class DistributionServiceImpl implements DistributionService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassRootsGovernServiceImpl.java new file mode 100644 index 0000000000..4dd3e63e15 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassRootsGovernServiceImpl.java @@ -0,0 +1,12 @@ +package com.epmet.service.screen.impl; + +import com.epmet.service.screen.GrassRootsGovernService; + +/** + * 基层治理相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:20 + */ +public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java new file mode 100644 index 0000000000..191ac7c086 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java @@ -0,0 +1,12 @@ +package com.epmet.service.screen.impl; + +import com.epmet.service.screen.GrassrootsPartyDevService; + +/** + * 基层党建相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:21 + */ +public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/IndexServiceImpl.java new file mode 100644 index 0000000000..7c5bf8bd7a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/IndexServiceImpl.java @@ -0,0 +1,12 @@ +package com.epmet.service.screen.impl; + +import com.epmet.service.screen.IndexService; + +/** + * 指数相关相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:21 + */ +public class IndexServiceImpl implements IndexService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/PartyMemberLeadServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/PartyMemberLeadServiceImpl.java new file mode 100644 index 0000000000..4328a14279 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/PartyMemberLeadServiceImpl.java @@ -0,0 +1,12 @@ +package com.epmet.service.screen.impl; + +import com.epmet.service.screen.PartyMemberLeadService; + +/** + * 党建引领相关各指标查询 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:22 + */ +public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/ProjectServiceImpl.java new file mode 100644 index 0000000000..b8713b165a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/ProjectServiceImpl.java @@ -0,0 +1,12 @@ +package com.epmet.service.screen.impl; + +import com.epmet.service.screen.ProjectService; + +/** + * 项目 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:23 + */ +public class ProjectServiceImpl implements ProjectService { +} \ No newline at end of file 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 new file mode 100644 index 0000000000..a44106f3f6 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml new file mode 100644 index 0000000000..9fea45f98a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml new file mode 100644 index 0000000000..f0d5d9ebc9 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000000..a9c0339fa9 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml new file mode 100644 index 0000000000..c9fc631d95 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml new file mode 100644 index 0000000000..fdf84386af --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml new file mode 100644 index 0000000000..35275e613d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml new file mode 100644 index 0000000000..60c597c6ac --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml new file mode 100644 index 0000000000..891493b386 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml new file mode 100644 index 0000000000..0d3af2a93d --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml new file mode 100644 index 0000000000..89abfabab4 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml new file mode 100644 index 0000000000..2761a3346f --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ 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 new file mode 100644 index 0000000000..109f33a67a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000000..0bf7ed23aa --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml new file mode 100644 index 0000000000..416026256a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000000..616182f026 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java @@ -0,0 +1,15 @@ +package com.epmet.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 大屏数据采集api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:25 + */ +@RestController +@RequestMapping("screencoll") +public class ScreenCollController { +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java new file mode 100644 index 0000000000..f36b90de5a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenCpcBaseDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 基层党建-党员基本情况 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCpcBaseDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java new file mode 100644 index 0000000000..7c6b86064a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenCustomerAgencyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 组织机构信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCustomerAgencyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java new file mode 100644 index 0000000000..59bf5ed908 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenDifficultyDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 基层治理-难点堵点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenDifficultyDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java new file mode 100644 index 0000000000..a1b422d57d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenEventDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 中央区-事件数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenEventDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java new file mode 100644 index 0000000000..341a71e4fc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenEventImgDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 中央区-事件数据图片数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenEventImgDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java new file mode 100644 index 0000000000..c165a8c2e0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenGovernRankDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 基层治理-治理能力排行数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenGovernRankDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java new file mode 100644 index 0000000000..5824e61ce9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenIndexDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 指数-指数数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenIndexDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java new file mode 100644 index 0000000000..416c1e73c5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenOrgRankDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党建引领-组织排行榜 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenOrgRankDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java new file mode 100644 index 0000000000..cd05f39bae --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenPartyBranchDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 基层党建-建设情况数据(支部,联建) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenPartyBranchDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java new file mode 100644 index 0000000000..59379fb5c2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenPartyLinkMassesDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党建引领-党员联系群众数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenPartyLinkMassesDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java new file mode 100644 index 0000000000..beb5c89990 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenPartyUserRankDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党建引领|基层治理-市民(党员)积分排行榜 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenPartyUserRankDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java new file mode 100644 index 0000000000..d5614450e5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenPioneerDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党建引领-先锋模范数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenPioneerDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java new file mode 100644 index 0000000000..8d87e41a02 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenUserJoinEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 基层治理-公众参与 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenUserJoinDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java new file mode 100644 index 0000000000..67193fea32 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenUserTotalDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 中央区-各类用户总数 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenUserTotalDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java new file mode 100644 index 0000000000..2d01356044 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenVoluntaryActivityDataEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党建引领-志愿活动服务数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenVoluntaryActivityDataDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java new file mode 100644 index 0000000000..18eaf5d6e3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java @@ -0,0 +1,111 @@ +/** + * 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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_cpc_base_data") +public class ScreenCpcBaseDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 注册用户数 + */ + private Integer registerUserCount; + + /** + * 群众用户数 + */ + private Integer resiTotal; + + /** + * 注册党员数 + */ + private Integer partyMemberCount; + + /** + * 小于20岁 + */ + private Integer ageLevel1; + + /** + * 20-30岁 + */ + private Integer ageLevel2; + + /** + * 31-40岁 + */ + private Integer ageLevel3; + + /** + * 41-50岁 + */ + private Integer ageLevel4; + + /** + * 51-60岁 + */ + private Integer ageLevel5; + + /** + * 60+岁 + */ + private Integer ageLevel6; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java new file mode 100644 index 0000000000..25134c12b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java @@ -0,0 +1,100 @@ +/** + * 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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_customer_agency") +public class ScreenCustomerAgencyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 组织名称 + */ + private String agencyName; + + /** + * 父级id ,顶级,此列为0 + */ + private String pid; + + /** + * 所有上级ID,用逗号分开 + */ + private String pids; + + /** + * 所有组织名称以-链接 + */ + private String allParentNames; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党支部位置 + */ + private String partyMark; + + /** + * 机关级别(社区级:community, +乡(镇、街道)级:street, +区县级: district, +市级: city +省级:province) + */ + private String level; + + /** + * 行政地区编码 + */ + private String areaCode; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java new file mode 100644 index 0000000000..fa3b352711 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java @@ -0,0 +1,116 @@ +/** + * 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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_difficulty_data") +public class ScreenDifficultyDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 事件原Id + */ + private String eventId; + + /** + * 事件图片 + */ + private String eventImgUrl; + + /** + * 事件来源 XX街道-社区-网格 + */ + private String eventSource; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 事件耗时 单位:分钟 + */ + private Integer eventCostTime; + + /** + * 事件涉及部门数 + */ + private Integer eventReOrg; + + /** + * 事件类别编码 + */ + private String eventCategoryCode; + + /** + * 事件类别名称 + */ + private String eventCategoryName; + + /** + * 事件状态编码 + */ + private String eventStatusCode; + + /** + * 事件状态描述 + */ + private String eventStatusDesc; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java new file mode 100644 index 0000000000..15f6503950 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java @@ -0,0 +1,127 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 中央区-事件数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_event_data") +public class ScreenEventDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 原始事件Id + */ + private String eventId; + + /** + * 事件名称 + */ + private String eventTitle; + + /** + * 事件时间 + */ + private Date eventCreateTime; + + /** + * 联系人 联系人 + */ + private String linkMobile; + + /** + * 事件描述 + */ + private String eventContent; + + /** + * 事件图片 + */ + private String eventImgUrl; + + /** + * 事件待处理级别 red:红;yellow:黄 + */ + private String eventLevel; + + /** + * 事件地址 + */ + private String eventAddress; + + /** + * 事件所在经度 + */ + private BigDecimal longitude; + + /** + * 事件所在维度 + */ + private BigDecimal latitude; + + /** + * 最后处理组织 + */ + private String lastProcessDept; + + /** + * 最后处理时间 + */ + private Date lastProcessDate; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java new file mode 100644 index 0000000000..9babf7e18f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java @@ -0,0 +1,56 @@ +/** + * 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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_event_img_data") +public class ScreenEventImgDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 原始事件Id + */ + private String eventId; + + /** + * 图片图片地址 + */ + private String eventImgUrl; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java new file mode 100644 index 0000000000..804ad16f07 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java @@ -0,0 +1,97 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 基层治理-治理能力排行数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_govern_rank_data") +public class ScreenGovernRankDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id + */ + private String yearId; + + /** + * 月份Id + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 响应率 + */ + private BigDecimal responseRatio; + + /** + * 解决率 + */ + private BigDecimal resolvedRatio; + + /** + * 自治率 + */ + private BigDecimal governRatio; + + /** + * 满意率 + */ + private BigDecimal satisfactionRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataEntity.java new file mode 100644 index 0000000000..ed9ac7fb97 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataEntity.java @@ -0,0 +1,97 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 指数-指数数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_index_data") +public class ScreenIndexDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id + */ + private String yearId; + + /** + * 月份Id + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 总指数 + */ + private BigDecimal indexTotal; + + /** + * 党建能力指数 + */ + private BigDecimal partyDevAblity; + + /** + * 服务能力指数 + */ + private BigDecimal serviceAblity; + + /** + * 治理能力指数 + */ + private BigDecimal governAblity; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java new file mode 100644 index 0000000000..e5a33a235e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java @@ -0,0 +1,112 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 党建引领-组织排行榜 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_org_rank_data") +public class ScreenOrgRankDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id + */ + private String yearId; + + /** + * 月份Id + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 党员总数 + */ + private Integer partyTotal; + + /** + * 小组(支部建设)总数 + */ + private Integer groupTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 结案率 + */ + private BigDecimal closeProjectRatio; + + /** + * 满意率 + */ + private BigDecimal satisfactionRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java new file mode 100644 index 0000000000..95420d51a7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java @@ -0,0 +1,101 @@ +/** + * 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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_party_branch_data") +public class ScreenPartyBranchDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id + */ + private String yearId; + + /** + * 月份Id + */ + private String monthId; + + /** + * 数据类别 party:支部建设;union:联合建设 + */ + private String type; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 议题分类Id + */ + private String issueCategoryId; + + /** + * 议题分类名称 + */ + private String issueCategoryName; + + /** + * 组织次数 + */ + private Integer organizeCount; + + /** + * 参加人数 + */ + private Integer joinUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java new file mode 100644 index 0000000000..4931575b55 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java @@ -0,0 +1,76 @@ +/** + * 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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_party_link_masses_data") +public class ScreenPartyLinkMassesDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 建群总数 + */ + private Integer createGroupTotal; + + /** + * 群成员总数 + */ + private Integer groupUserTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java new file mode 100644 index 0000000000..a313b55cc7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_party_user_rank_data") +public class ScreenPartyUserRankDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id + */ + private String yearId; + + /** + * 月份Id + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 用户身份 party:党员;resi:居民 + */ + private String userType; + + /** + * 用户Id + */ + private String userId; + + /** + * 用户名称 + */ + private String userName; + + /** + * 用户积分 + */ + private Integer pointTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java new file mode 100644 index 0000000000..ab192e7161 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java @@ -0,0 +1,91 @@ +/** + * 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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_pioneer_data") +public class ScreenPioneerDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 用户总数 + */ + private Integer userTotal; + + /** + * 议事数 + */ + private Integer issueTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题转项目数 + */ + private Integer shiftProjectTotal; + + /** + * 解决项目总数 + */ + private Integer resolvedProjectTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java new file mode 100644 index 0000000000..4da0ff5d4b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java @@ -0,0 +1,97 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 基层治理-公众参与 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_user_join") +public class ScreenUserJoinEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 总的参与次数 + */ + private Integer joinTotal; + + /** + * 总的参与次数较上月增长率 + */ + private BigDecimal joinTotalUpRate; + + /** + * 人均议题 + */ + private Integer avgIssue; + + /** + * 人均议题较上月增长率 + */ + private BigDecimal avgIssueUpRate; + + /** + * 平均参与度 + */ + private Integer avgJoin; + + /** + * 平均参与度较上月增长率 + */ + private BigDecimal agvgJoinUpRate; + +} 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 new file mode 100644 index 0000000000..80187ba014 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_user_total_data") +public class ScreenUserTotalDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 用户总数 + */ + private Integer userTotal; + + /** + * 注册党总数 + */ + private Integer partyTotal; + + /** + * 小组(党群)总数 + */ + private Integer groupTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java new file mode 100644 index 0000000000..cd11e5b43a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java @@ -0,0 +1,86 @@ +/** + * 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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_voluntary_activity_data") +public class ScreenVoluntaryActivityDataEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id + */ + private String yearId; + + /** + * 月份Id + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 组织活动次数 + */ + private Integer activetyCount; + + /** + * 活动参与人数 + */ + private Integer joinUserCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml new file mode 100644 index 0000000000..a44106f3f6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml new file mode 100644 index 0000000000..9fea45f98a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml new file mode 100644 index 0000000000..9beabee8b7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml new file mode 100644 index 0000000000..a9c0339fa9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml new file mode 100644 index 0000000000..473e3165fa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml new file mode 100644 index 0000000000..99af58be38 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml new file mode 100644 index 0000000000..35275e613d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml new file mode 100644 index 0000000000..60c597c6ac --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml new file mode 100644 index 0000000000..891493b386 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml new file mode 100644 index 0000000000..48164dfcf2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml new file mode 100644 index 0000000000..89abfabab4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml new file mode 100644 index 0000000000..0fe5e969e3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml new file mode 100644 index 0000000000..68b3c4133f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000000..0bf7ed23aa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml new file mode 100644 index 0000000000..416026256a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 02b1a3dd5ae8409bf133459a8224dc2d47dcd267 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 18 Aug 2020 13:52:06 +0800 Subject: [PATCH 003/360] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E3=80=81?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E5=B8=83=E3=80=81=E5=85=9A=E5=91=98?= =?UTF-8?q?=E5=88=86=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/screen/dto/form/BranchFormDTO.java | 24 +++++++++ .../screen/dto/form/ParymemberFormDTO.java | 24 +++++++++ .../epmet/screen/dto/form/UserFormDTO.java | 24 +++++++++ .../screen/dto/result/BranchResultDTO.java | 35 +++++++++++++ .../ParymemberDistributionResultDTO.java | 46 ++++++++++++++++ .../dto/result/ParymemberResultDTO.java | 36 +++++++++++++ .../dto/result/UserDistributionResultDTO.java | 46 ++++++++++++++++ .../screen/dto/result/UserResultDTO.java | 36 +++++++++++++ .../screen/DistributionController.java | 52 +++++++++++++++++++ .../service/screen/DistributionService.java | 32 ++++++++++++ .../screen/impl/DistributionServiceImpl.java | 39 ++++++++++++++ 11 files changed, 394 insertions(+) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java new file mode 100644 index 0000000000..89a7bc5eaa --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 10:49 上午 + */ +@Data +public class BranchFormDTO implements Serializable { + + private static final long serialVersionUID = -8256381995441422191L; + + public interface Branch{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {Branch.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java new file mode 100644 index 0000000000..ee06b313d1 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 10:49 上午 + */ +@Data +public class ParymemberFormDTO implements Serializable { + + private static final long serialVersionUID = -5589396567320406525L; + + public interface Parymember{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {Parymember.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java new file mode 100644 index 0000000000..4a3b23da00 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 10:49 上午 + */ +@Data +public class UserFormDTO implements Serializable { + + private static final long serialVersionUID = 4863908542899315106L; + + public interface User{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {User.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java new file mode 100644 index 0000000000..a41d5111b0 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 10:52 上午 + */ +@Data +public class BranchResultDTO implements Serializable { + + private static final long serialVersionUID = -8001714892170166320L; + + /** + * 名称:根据当前所在组织,查询出的子级名称 + */ + private String name; + + /** + * 可能是agencyId,也可以是gridId, 也可以是deptId + */ + private String id; + + /** + * 组织:agency 网格:grid 部门:dept + */ + private String type; + + /** + * 中心点位 + */ + private String centerMark; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java new file mode 100644 index 0000000000..e663986791 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java @@ -0,0 +1,46 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 11:06 上午 + */ +@Data +public class ParymemberDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = 9180892033529262049L; + + /** + * 可能是gridId,可能是agencyId + */ + private String subId; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党员总人数 + */ + private Integer totalNum; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 可以是网格的名称,可以是组织的名称 + */ + private String subName; + + /** + * 组织:agency, 网格 : grid; + */ + private String type; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java new file mode 100644 index 0000000000..432d81f2ed --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/18 11:03 上午 + */ +@Data +public class ParymemberResultDTO implements Serializable { + + private static final long serialVersionUID = -7230556020628357047L; + + /** + * 当前所选组织 + */ + private String agencyId; + + /** + * 当前所选组织名称 + */ + private String name; + + /** + * 当前所选组织的坐标区域 + */ + private String areaMarks; + + /** + * 子级用户分布 + */ + private List userDistribution; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java new file mode 100644 index 0000000000..15787f28ed --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java @@ -0,0 +1,46 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 11:06 上午 + */ +@Data +public class UserDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = -7679590088019724244L; + + /** + * 可能是gridId,可能是agencyId + */ + private String subId; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 用户总人数 + */ + private Integer totalNum; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 可以是网格的名称,可以是组织的名称 + */ + private String subName; + + /** + * 组织:agency, 网格 : grid; + */ + private String type; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java new file mode 100644 index 0000000000..ea13de5f0c --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/18 11:03 上午 + */ +@Data +public class UserResultDTO implements Serializable { + + private static final long serialVersionUID = -6633682494274511121L; + + /** + * 当前所选组织 + */ + private String agencyId; + + /** + * 当前所选组织名称 + */ + private String name; + + /** + * 当前所选组织的坐标区域 + */ + private String areaMarks; + + /** + * 子级用户分布 + */ + private List userDistribution; +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java index af386611f1..b142d14893 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java @@ -1,5 +1,17 @@ package com.epmet.controller.screen; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.screen.dto.form.BranchFormDTO; +import com.epmet.screen.dto.form.ParymemberFormDTO; +import com.epmet.screen.dto.form.UserFormDTO; +import com.epmet.screen.dto.result.BranchResultDTO; +import com.epmet.screen.dto.result.ParymemberResultDTO; +import com.epmet.screen.dto.result.UserResultDTO; +import com.epmet.service.screen.DistributionService; +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; @@ -12,4 +24,44 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/screen/distribution") public class DistributionController { + + @Autowired + private DistributionService distributionService; + + /** + * @Description 1、党支部 + * @param formDTO + * @author zxc + * @date 2020/8/18 10:59 上午 + */ + @PostMapping("branch") + public Result branch(@RequestBody BranchFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, BranchFormDTO.Branch.class); + return new Result().ok(distributionService.branch(formDTO)); + } + + /** + * @Description 2、用户分布 + * @param userFormDTO + * @author zxc + * @date 2020/8/18 11:10 上午 + */ + @PostMapping("user") + public Result user(@RequestBody UserFormDTO userFormDTO){ + ValidatorUtils.validateEntity(userFormDTO, UserFormDTO.User.class); + return new Result().ok(distributionService.user(userFormDTO)); + } + + /** + * @Description 3、党员分布 + * @param parymemberFormDTO + * @author zxc + * @date 2020/8/18 11:20 上午 + */ + @PostMapping("parymember") + public Result parymember(@RequestBody ParymemberFormDTO parymemberFormDTO){ + ValidatorUtils.validateEntity(parymemberFormDTO, ParymemberFormDTO.Parymember.class); + return new Result().ok(distributionService.parymember(parymemberFormDTO)); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java index 138b0aeb1d..7aa880d9eb 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java @@ -1,5 +1,12 @@ package com.epmet.service.screen; +import com.epmet.screen.dto.form.BranchFormDTO; +import com.epmet.screen.dto.form.ParymemberFormDTO; +import com.epmet.screen.dto.form.UserFormDTO; +import com.epmet.screen.dto.result.BranchResultDTO; +import com.epmet.screen.dto.result.ParymemberResultDTO; +import com.epmet.screen.dto.result.UserResultDTO; + /** * 中央区相关各指标查询 * @@ -7,4 +14,29 @@ package com.epmet.service.screen; * @date 2020/8/18 10:19 */ public interface DistributionService { + + /** + * @Description 1、党支部 + * @param formDTO + * @author zxc + * @date 2020/8/18 10:59 上午 + */ + BranchResultDTO branch(BranchFormDTO formDTO); + + /** + * @Description 2、用户分布 + * @param userFormDTO + * @author zxc + * @date 2020/8/18 11:10 上午 + */ + UserResultDTO user(UserFormDTO userFormDTO); + + /** + * @Description 3、党员分布 + * @param parymemberFormDTO + * @author zxc + * @date 2020/8/18 11:20 上午 + */ + ParymemberResultDTO parymember(ParymemberFormDTO parymemberFormDTO); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java index a00c9d0665..1723fee251 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java @@ -1,5 +1,11 @@ package com.epmet.service.screen.impl; +import com.epmet.screen.dto.form.BranchFormDTO; +import com.epmet.screen.dto.form.ParymemberFormDTO; +import com.epmet.screen.dto.form.UserFormDTO; +import com.epmet.screen.dto.result.BranchResultDTO; +import com.epmet.screen.dto.result.ParymemberResultDTO; +import com.epmet.screen.dto.result.UserResultDTO; import com.epmet.service.screen.DistributionService; /** @@ -9,4 +15,37 @@ import com.epmet.service.screen.DistributionService; * @date 2020/8/18 10:19 */ public class DistributionServiceImpl implements DistributionService { + + /** + * @Description 1、党支部 + * @param formDTO + * @author zxc + * @date 2020/8/18 10:59 上午 + */ + @Override + public BranchResultDTO branch(BranchFormDTO formDTO) { + return null; + } + + /** + * @Description 2、用户分布 + * @param userFormDTO + * @author zxc + * @date 2020/8/18 11:10 上午 + */ + @Override + public UserResultDTO user(UserFormDTO userFormDTO) { + return null; + } + + /** + * @Description 3、党员分布 + * @param parymemberFormDTO + * @author zxc + * @date 2020/8/18 11:20 上午 + */ + @Override + public ParymemberResultDTO parymember(ParymemberFormDTO parymemberFormDTO) { + return null; + } } From a7d58b956d7ee9cc1567f406118a516592935033 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 18 Aug 2020 14:24:35 +0800 Subject: [PATCH 004/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9screen=5Fcustomer=5Fa?= =?UTF-8?q?gency=E8=A1=A8=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/entity/screen/ScreenCustomerAgencyEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java index 25134c12b0..91f37c37c1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java @@ -79,7 +79,7 @@ public class ScreenCustomerAgencyEntity extends BaseEpmetEntity { private String centerMark; /** - * 党支部位置 + * 党工委或者党委的位置,目前此阶段为预留字段 */ private String partyMark; From de50cf447d3c976bbb08a0db21ffc5d23bab8674 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 18 Aug 2020 14:50:20 +0800 Subject: [PATCH 005/360] =?UTF-8?q?=E6=96=B0=E5=A2=9Escreen=5Fcustomer=5Fd?= =?UTF-8?q?ept=E3=80=81screen=5Fcustomer=5Fgrid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/screen/ScreenCustomerDeptDao.java | 31 ++++++++ .../dao/screen/ScreenCustomerGridDao.java | 31 ++++++++ .../mapper/screen/ScreenCustomerDeptDao.xml | 8 ++ .../mapper/screen/ScreenCustomerGridDao.xml | 8 ++ .../dao/screen/ScreenCustomerDeptDao.java | 33 ++++++++ .../dao/screen/ScreenCustomerGridDao.java | 33 ++++++++ .../screen/ScreenCustomerDeptEntity.java | 76 +++++++++++++++++++ .../screen/ScreenCustomerGridEntity.java | 76 +++++++++++++++++++ .../mapper/screen/ScreenCustomerDeptDao.xml | 8 ++ .../mapper/screen/ScreenCustomerGridDao.xml | 8 ++ 10 files changed, 312 insertions(+) create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java new file mode 100644 index 0000000000..3a0ac47e2a --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 部门信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCustomerDeptDao { + +} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java new file mode 100644 index 0000000000..45d5ba843b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 网格信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCustomerGridDao { + +} \ No newline at end of file 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 new file mode 100644 index 0000000000..721653ca7f --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml new file mode 100644 index 0000000000..66c30e3e32 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java new file mode 100644 index 0000000000..7880a87e19 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenCustomerDeptEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 部门信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCustomerDeptDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java new file mode 100644 index 0000000000..be0e30d3b5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenCustomerGridEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 网格信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-18 + */ +@Mapper +public interface ScreenCustomerGridDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java new file mode 100644 index 0000000000..2dc5f09cc4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java @@ -0,0 +1,76 @@ +/** + * 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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_customer_dept") +public class ScreenCustomerDeptEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 部门所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 部门所在位置(目前预留此字段) + */ + private String deptMark; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java new file mode 100644 index 0000000000..646fd8af24 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java @@ -0,0 +1,76 @@ +/** + * 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-18 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_customer_grid") +public class ScreenCustomerGridEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党支部(=网格)的位置 + */ + private String partyMark; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml new file mode 100644 index 0000000000..721653ca7f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml new file mode 100644 index 0000000000..66c30e3e32 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From e9dff01a4e4d3f6756bb0485518672b82e946f46 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 18 Aug 2020 15:41:27 +0800 Subject: [PATCH 006/360] =?UTF-8?q?=E5=85=9A=E5=91=98=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/PartymemberPercentResultDTO.java | 34 +++++++++++++++++++ .../dao/screen/ScreenUserTotalDataDao.java | 11 ++++++ .../screen/GrassrootsPartyDevService.java | 14 ++++++++ .../impl/GrassrootsPartyDevServiceImpl.java | 29 ++++++++++++++++ .../mapper/screen/ScreenUserTotalDataDao.xml | 13 ++++++- 5 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java new file mode 100644 index 0000000000..eb8bc35184 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java @@ -0,0 +1,34 @@ +package com.epmet.screen.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 1、党员基本情况-饼状图概况 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321324 + * @ClassName PartymemberPercentResultDTO + * @Auth wangc + * @Date 2020-08-18 14:54 + */ +@Data +public class PartymemberPercentResultDTO implements Serializable { + private static final long serialVersionUID = -2864099044581782674L; + + /** + * 注册党员总数 + * */ + private Integer partyMemberTotal = NumConstant.ZERO; + + /** + * 注册党员占比 + * */ + private String percentInPlatForm; + + /** + * 注册用户总数 + * */ + private Integer platFormTotal = NumConstant.ZERO; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java index ec1e99bcc1..3392dcdb9b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java @@ -17,7 +17,9 @@ package com.epmet.dao.screen; +import com.epmet.screen.dto.result.PartymemberPercentResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 中央区-各类用户总数 @@ -28,4 +30,13 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenUserTotalDataDao { + /** + * @Description 党员基本情况-饼状图概况 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.18 15:17 + **/ + PartymemberPercentResultDTO selectAgencyPartymemberPercent(@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/service/screen/GrassrootsPartyDevService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassrootsPartyDevService.java index 31fe870770..ce74d350be 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassrootsPartyDevService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassrootsPartyDevService.java @@ -1,5 +1,8 @@ package com.epmet.service.screen; +import com.epmet.screen.dto.form.ParymemberFormDTO; +import com.epmet.screen.dto.result.PartymemberPercentResultDTO; + /** * 基层党建相关各指标查询 * @@ -7,4 +10,15 @@ package com.epmet.service.screen; * @date 2020/8/18 10:21 */ public interface GrassrootsPartyDevService { + + /** + * @Description 1、党员基本情况-饼状图概况 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321324 + * @param param + * @return + * @author wangc + * @date 2020.08.18 14:58 + **/ + PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java index 191ac7c086..23c42f7bcf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java @@ -1,6 +1,13 @@ package com.epmet.service.screen.impl; +import com.epmet.dao.screen.ScreenUserTotalDataDao; +import com.epmet.screen.dto.form.ParymemberFormDTO; +import com.epmet.screen.dto.result.PartymemberPercentResultDTO; import com.epmet.service.screen.GrassrootsPartyDevService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; /** * 基层党建相关各指标查询 @@ -8,5 +15,27 @@ import com.epmet.service.screen.GrassrootsPartyDevService; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:21 */ +@Service public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService { + + private static final Logger logger = LoggerFactory.getLogger(GrassrootsPartyDevServiceImpl.class); + + @Autowired + private ScreenUserTotalDataDao screenUserTotalDataDao; + + /** + * @Description 1、党员基本情况-饼状图概况 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321324 + * @param param + * @return + * @author wangc + * @date 2020.08.18 14:58 + **/ + @Override + public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) { + + PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercent(param.getAgencyId()); + + return null; + } } 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 0bf7ed23aa..276d649545 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 @@ -3,6 +3,17 @@ - + + \ No newline at end of file From 5f16fa4d168e551ecf75b88c311e1c27f20178d4 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 18 Aug 2020 15:43:22 +0800 Subject: [PATCH 007/360] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9C=BA=E6=9E=84?= =?UTF-8?q?=E6=A0=91=EF=BC=8C=E7=BB=84=E7=BB=87=E5=8C=BA=E5=9F=9F=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/form/CompartmentFormDTO.java | 24 +++++++++ .../result/AgencyDistributionResultDTO.java | 40 ++++++++++++++ .../dto/result/CompartmentResultDTO.java | 36 +++++++++++++ .../screen/dto/result/TreeResultDTO.java | 36 +++++++++++++ .../controller/screen/AgencyController.java | 40 ++++++++++++++ .../dao/screen/ScreenCustomerAgencyDao.java | 16 +++++- .../epmet/service/screen/AgencyService.java | 24 +++++++++ .../screen/impl/AgencyServiceImpl.java | 53 +++++++++++++++++++ .../mapper/screen/ScreenCustomerAgencyDao.xml | 25 +++++++++ 9 files changed, 293 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java new file mode 100644 index 0000000000..3571ff7bb6 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 2:14 下午 + */ +@Data +public class CompartmentFormDTO implements Serializable { + + private static final long serialVersionUID = -3354777434424878413L; + + public interface Compartment{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {Compartment.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java new file mode 100644 index 0000000000..da0a5a389e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/18 2:20 下午 + */ +@Data +public class AgencyDistributionResultDTO implements Serializable { + + private static final long serialVersionUID = -8404806508669824731L; + + /** + * 可能是gridId,可能是agencyId + */ + private String subId; + + /** + * 名称 + */ + private String subName; + + /** + * 坐标区域 + */ + private String subAreaMarks; + + /** + * 中心点位 + */ + private String subCenterMark; + + /** + * 组织:agency; 网格:grid ; 部门:dept + */ + private String type; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java new file mode 100644 index 0000000000..2e55aaae56 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/18 14:18 + */ +@Data +public class CompartmentResultDTO implements Serializable { + + private static final long serialVersionUID = 7963177476365327829L; + + /** + * 当前所选组织 + */ + private String agencyId; + + /** + * 当前所选组织名称 + */ + private String name; + + /** + * 当前所选组织的坐标区域 + */ + private String areaMarks; + + /** + * 子级用户分布 + */ + private List userDistribution; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java new file mode 100644 index 0000000000..72fd6a0dd9 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/18 2:00 下午 + */ +@Data +public class TreeResultDTO implements Serializable { + + private static final long serialVersionUID = 3860268744336541373L; + + /** + * 显示名称 + */ + private String label; + + /** + * agencyId下拉框value + */ + private String value; + + @JsonIgnore + private String pids; + + /** + * 子目录 + */ + private List children; + +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java index 73c93f89f5..410a8da660 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java @@ -1,8 +1,21 @@ package com.epmet.controller.screen; +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.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 * @@ -12,4 +25,31 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/screen/agency") public class AgencyController { + + @Autowired + private AgencyService agencyService; + + /** + * @Description 1、组织机构树 + * @param tokenDto + * @author zxc + * @date 2020/8/18 2:04 下午 + */ + @PostMapping("tree") + public Result> tree(@LoginUser TokenDto tokenDto){ + return new Result>().ok(agencyService.tree(tokenDto)); + } + + /** + * @Description 2、组织区域查询 + * @param compartmentFormDTO + * @author zxc + * @date 2020/8/18 2:33 下午 + */ + @PostMapping("compartment") + public Result compartment(@RequestBody CompartmentFormDTO compartmentFormDTO){ + ValidatorUtils.validateEntity(compartmentFormDTO, CompartmentFormDTO.Compartment.class); + return new Result().ok(agencyService.compartment(compartmentFormDTO)); + } + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java index 441e7e3ebc..be2e05d62b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java @@ -17,7 +17,11 @@ package com.epmet.dao.screen; +import com.epmet.screen.dto.result.TreeResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 组织机构信息 @@ -27,5 +31,15 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenCustomerAgencyDao { - + + /** + * @Description 查询客户根组织ID + * @param customerId + * @author zxc + * @date 2020/8/18 2:44 下午 + */ + TreeResultDTO selectRootAgencyId(@Param("customerId")String customerId); + + List selectSubAgencyList(@Param("subAgencyPids") String subAgencyPids); + } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java index 99f32bef09..58f429eca7 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java @@ -1,5 +1,12 @@ package com.epmet.service.screen; +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; + /** * 组织相关api * @@ -7,4 +14,21 @@ package com.epmet.service.screen; * @date 2020/8/18 10:18 */ public interface AgencyService { + + /** + * @Description 1、组织机构树 + * @param tokenDto + * @author zxc + * @date 2020/8/18 2:04 下午 + */ + List tree(TokenDto tokenDto); + + /** + * @Description 2、组织区域查询 + * @param compartmentFormDTO + * @author zxc + * @date 2020/8/18 2:33 下午 + */ + CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO); + } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java index e6fb4de7cb..2e732bba83 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java @@ -1,6 +1,19 @@ package com.epmet.service.screen.impl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.screen.ScreenCustomerAgencyDao; +import com.epmet.dto.result.AgencySubResultDTO; +import com.epmet.dto.result.ProcessorListResultDTO; +import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.screen.dto.form.CompartmentFormDTO; +import com.epmet.screen.dto.result.CompartmentResultDTO; +import com.epmet.screen.dto.result.TreeResultDTO; import com.epmet.service.screen.AgencyService; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; /** * 组织相关api @@ -9,4 +22,44 @@ import com.epmet.service.screen.AgencyService; * @date 2020/8/18 10:18 */ public class AgencyServiceImpl implements AgencyService { + + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private ScreenCustomerAgencyDao screenCustomerAgencyDao; + + /** + * @Description 1、组织机构树 + * @param tokenDto + * @author zxc + * @date 2020/8/18 2:04 下午 + */ + @Override + public List tree(TokenDto tokenDto) { + // 1. 查询客户根组织ID + TreeResultDTO rootAgency = screenCustomerAgencyDao.selectRootAgencyId(tokenDto.getCustomerId()); + return this.getDepartmentList(("".equals(rootAgency.getPids()) ? "" : rootAgency.getPids() + ":") + rootAgency.getValue()); + } + + 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 下午 + */ + @Override + public CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO) { + return null; + } } 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 9fea45f98a..8b95789110 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 @@ -3,6 +3,31 @@ + + + \ No newline at end of file From 6eb5008048a4464073943401b9c946021fbea67a Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 18 Aug 2020 16:10:43 +0800 Subject: [PATCH 008/360] =?UTF-8?q?dataport=E6=B7=BB=E5=8A=A0=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DataReportApplication.java | 2 +- .../aspect/RequestLogAspect.java | 4 +-- .../config/ModuleConfigImpl.java | 2 +- .../{ => datareport}/controller/.gitignore | 0 .../controller/group/GroupController.java | 2 +- .../controller/issue/IssueController.java | 4 +-- .../controller/project/ProjectController.java | 0 .../publicity/PublicityController.java | 4 +-- .../controller/screen/AgencyController.java | 4 +-- .../screen/DistributionController.java | 4 +-- .../screen/GrassRootsGovernController.java | 2 +- .../screen/GrassrootsPartyDevController.java | 2 +- .../controller/screen/IndexController.java | 2 +- .../screen/PartyMemberLeadController.java | 2 +- .../controller/screen/ProjectController.java | 2 +- .../controller/topic/TopicController.java | 4 +-- .../user/UserAnalysisController.java | 4 +-- .../com/epmet/{ => datareport}/dao/.gitignore | 0 .../{ => datareport}/dao/group/GroupDao.java | 2 +- .../{ => datareport}/dao/issue/IssueDao.java | 2 +- .../dao/project/ProjectDao.java | 2 +- .../dao/publicity/PublicityDao.java | 2 +- .../dao/screen/ScreenCpcBaseDataDao.java | 2 +- .../dao/screen/ScreenCustomerAgencyDao.java | 2 +- .../dao/screen/ScreenCustomerDeptDao.java | 2 +- .../dao/screen/ScreenCustomerGridDao.java | 2 +- .../dao/screen/ScreenDifficultyDataDao.java | 2 +- .../dao/screen/ScreenEventDataDao.java | 2 +- .../dao/screen/ScreenEventImgDataDao.java | 2 +- .../dao/screen/ScreenGovernRankDataDao.java | 2 +- .../dao/screen/ScreenIndexDataDao.java | 2 +- .../dao/screen/ScreenOrgRankDataDao.java | 2 +- .../dao/screen/ScreenPartyBranchDataDao.java | 2 +- .../screen/ScreenPartyLinkMassesDataDao.java | 2 +- .../screen/ScreenPartyUserRankDataDao.java | 2 +- .../dao/screen/ScreenPioneerDataDao.java | 2 +- .../dao/screen/ScreenUserJoinDao.java | 2 +- .../dao/screen/ScreenUserTotalDataDao.java | 2 +- .../ScreenVoluntaryActivityDataDao.java | 2 +- .../{ => datareport}/dao/topic/TopicDao.java | 3 +- .../dao/user/UserAnalysisDao.java | 2 +- .../epmet/{ => datareport}/service/.gitignore | 0 .../service/group/GroupService.java | 2 +- .../service/group/impl/GroupServiceImpl.java | 6 ++-- .../service/issue/IssueService.java | 2 +- .../service/issue/impl/IssueServiceImpl.java | 8 ++---- .../service/project/ProjectService.java | 0 .../project/impl/ProjectServiceImpl.java | 4 +-- .../service/publicity/PublicityService.java | 2 +- .../publicity/impl/PublicityServiceImpl.java | 6 ++-- .../service/screen/AgencyService.java | 2 +- .../service/screen/DistributionService.java | 2 +- .../screen/GrassRootsGovernService.java | 2 +- .../screen/GrassrootsPartyDevService.java | 2 +- .../service/screen/IndexService.java | 2 +- .../screen/PartyMemberLeadService.java | 2 +- .../service/screen/ProjectService.java | 2 +- .../screen/impl/AgencyServiceImpl.java | 9 ++---- .../screen/impl/DistributionServiceImpl.java | 4 +-- .../impl/GrassRootsGovernServiceImpl.java | 4 +-- .../impl/GrassrootsPartyDevServiceImpl.java | 6 ++-- .../service/screen/impl/IndexServiceImpl.java | 4 +-- .../impl/PartyMemberLeadServiceImpl.java | 4 +-- .../screen/impl/ProjectServiceImpl.java | 4 +-- .../service/topic/TopicService.java | 2 +- .../service/topic/impl/TopicServiceImpl.java | 9 ++---- .../service/user/UserAnalysisService.java | 2 +- .../user/impl/UserAnalysisServiceImpl.java | 6 ++-- .../src/main/resources/logback-spring.xml | 28 +++++++++---------- .../main/resources/mapper/group/GroupDao.xml | 2 +- .../main/resources/mapper/issue/IssueDao.xml | 2 +- .../resources/mapper/project/ProjectDao.xml | 2 +- .../mapper/publicity/PublicityDao.xml | 2 +- .../mapper/screen/ScreenCpcBaseDataDao.xml | 2 +- .../mapper/screen/ScreenCustomerAgencyDao.xml | 2 +- .../mapper/screen/ScreenCustomerDeptDao.xml | 2 +- .../mapper/screen/ScreenCustomerGridDao.xml | 2 +- .../mapper/screen/ScreenDifficultyDataDao.xml | 2 +- .../mapper/screen/ScreenEventDataDao.xml | 2 +- .../mapper/screen/ScreenEventImgDataDao.xml | 2 +- .../mapper/screen/ScreenGovernRankDataDao.xml | 2 +- .../mapper/screen/ScreenIndexDataDao.xml | 2 +- .../mapper/screen/ScreenOrgRankDataDao.xml | 2 +- .../screen/ScreenPartyBranchDataDao.xml | 2 +- .../screen/ScreenPartyLinkMassesDataDao.xml | 2 +- .../screen/ScreenPartyUserRankDataDao.xml | 2 +- .../mapper/screen/ScreenPioneerDataDao.xml | 2 +- .../mapper/screen/ScreenUserJoinDao.xml | 2 +- .../mapper/screen/ScreenUserTotalDataDao.xml | 2 +- .../screen/ScreenVoluntaryActivityDataDao.xml | 2 +- .../main/resources/mapper/topic/TopicDao.xml | 2 +- .../resources/mapper/user/UserAnalysisDao.xml | 2 +- 92 files changed, 127 insertions(+), 136 deletions(-) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/DataReportApplication.java (94%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/aspect/RequestLogAspect.java (90%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/config/ModuleConfigImpl.java (92%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/.gitignore (100%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/group/GroupController.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/issue/IssueController.java (96%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/project/ProjectController.java (100%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/publicity/PublicityController.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/screen/AgencyController.java (94%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/screen/DistributionController.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/screen/GrassRootsGovernController.java (87%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/screen/GrassrootsPartyDevController.java (87%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/screen/IndexController.java (86%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/screen/PartyMemberLeadController.java (87%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/screen/ProjectController.java (85%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/topic/TopicController.java (96%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/controller/user/UserAnalysisController.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/.gitignore (100%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/group/GroupDao.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/issue/IssueDao.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/project/ProjectDao.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/publicity/PublicityDao.java (99%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenCpcBaseDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenCustomerAgencyDao.java (96%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenCustomerDeptDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenCustomerGridDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenDifficultyDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenEventDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenEventImgDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenGovernRankDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenIndexDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenOrgRankDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenPartyBranchDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenPartyLinkMassesDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenPartyUserRankDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenPioneerDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenUserJoinDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenUserTotalDataDao.java (96%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/screen/ScreenVoluntaryActivityDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/topic/TopicDao.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/dao/user/UserAnalysisDao.java (99%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/.gitignore (100%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/group/GroupService.java (96%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/group/impl/GroupServiceImpl.java (96%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/issue/IssueService.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/issue/impl/IssueServiceImpl.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/project/ProjectService.java (100%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/project/impl/ProjectServiceImpl.java (98%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/publicity/PublicityService.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/publicity/impl/PublicityServiceImpl.java (98%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/AgencyService.java (94%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/DistributionService.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/GrassRootsGovernService.java (77%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/GrassrootsPartyDevService.java (92%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/IndexService.java (75%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/PartyMemberLeadService.java (77%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/ProjectService.java (72%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/impl/AgencyServiceImpl.java (87%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/impl/DistributionServiceImpl.java (91%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/impl/GrassRootsGovernServiceImpl.java (61%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/impl/GrassrootsPartyDevServiceImpl.java (86%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/impl/IndexServiceImpl.java (60%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/impl/PartyMemberLeadServiceImpl.java (61%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/screen/impl/ProjectServiceImpl.java (56%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/topic/TopicService.java (96%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/topic/impl/TopicServiceImpl.java (97%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/user/UserAnalysisService.java (98%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{ => datareport}/service/user/impl/UserAnalysisServiceImpl.java (99%) 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/datareport/DataReportApplication.java similarity index 94% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/DataReportApplication.java index cee0ed9096..c8a3e68002 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/datareport/DataReportApplication.java @@ -1,4 +1,4 @@ -package com.epmet; +package com.epmet.datareport; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/aspect/RequestLogAspect.java similarity index 90% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/aspect/RequestLogAspect.java index 7d4ff2d7d4..d57b2833e5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/aspect/RequestLogAspect.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/aspect/RequestLogAspect.java @@ -1,4 +1,4 @@ -package com.epmet.aspect; +package com.epmet.datareport.aspect; import com.epmet.commons.tools.aspect.BaseRequestLogAspect; import org.aspectj.lang.ProceedingJoinPoint; @@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletRequest; public class RequestLogAspect extends BaseRequestLogAspect { @Override - @Around(value = "execution(* com.epmet.controller.*.*Controller*.*(..)) ") + @Around(value = "execution(* com.epmet.datareport.controller.*.*Controller*.*(..)) ") public Object proceed(ProceedingJoinPoint point) throws Throwable { return super.proceed(point, getRequest()); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/config/ModuleConfigImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/config/ModuleConfigImpl.java similarity index 92% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/config/ModuleConfigImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/config/ModuleConfigImpl.java index c52ec15b50..10a4cdd6d7 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/config/ModuleConfigImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/config/ModuleConfigImpl.java @@ -6,7 +6,7 @@ * 版权所有,侵权必究! */ -package com.epmet.config; +package com.epmet.datareport.config; import com.epmet.commons.tools.config.ModuleConfig; import org.springframework.stereotype.Service; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/.gitignore similarity index 100% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/.gitignore rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/.gitignore diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/group/GroupController.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/group/GroupController.java index 88dd3bb376..1d269eddbd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/group/GroupController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/group/GroupController.java @@ -9,7 +9,7 @@ import com.epmet.group.dto.result.GroupIncrTrendResultDTO; import com.epmet.group.dto.result.GroupSubAgencyResultDTO; import com.epmet.group.dto.result.GroupSubGridResultDTO; import com.epmet.group.dto.result.GroupSummaryInfoResultDTO; -import com.epmet.service.group.GroupService; +import com.epmet.datareport.service.group.GroupService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/issue/IssueController.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/issue/IssueController.java index c9fad20ce2..afc732802d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/issue/IssueController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/issue/IssueController.java @@ -1,11 +1,11 @@ -package com.epmet.controller.issue; +package com.epmet.datareport.controller.issue; 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.issue.dto.form.IssueIncrtrendFormDTO; import com.epmet.issue.dto.result.*; -import com.epmet.service.issue.IssueService; +import com.epmet.datareport.service.issue.IssueService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/project/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java similarity index 100% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/project/ProjectController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/project/ProjectController.java diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/publicity/PublicityController.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/publicity/PublicityController.java index 8612d82002..f01540758c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/publicity/PublicityController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/publicity/PublicityController.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.controller.publicity; +package com.epmet.datareport.controller.publicity; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.constant.NumConstant; @@ -24,7 +24,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.publicity.dto.form.TagFormDTO; import com.epmet.publicity.dto.result.*; -import com.epmet.service.publicity.PublicityService; +import com.epmet.datareport.service.publicity.PublicityService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java similarity index 94% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index 410a8da660..e69b0d51f1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.screen; +package com.epmet.datareport.controller.screen; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.security.dto.TokenDto; @@ -7,7 +7,7 @@ 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.service.screen.AgencyService; +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; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java index b142d14893..c9b946f620 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/DistributionController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.screen; +package com.epmet.datareport.controller.screen; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -8,7 +8,7 @@ import com.epmet.screen.dto.form.UserFormDTO; import com.epmet.screen.dto.result.BranchResultDTO; import com.epmet.screen.dto.result.ParymemberResultDTO; import com.epmet.screen.dto.result.UserResultDTO; -import com.epmet.service.screen.DistributionService; +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; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassRootsGovernController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java similarity index 87% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassRootsGovernController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java index 2d2c251a26..f5400c31ed 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassRootsGovernController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.screen; +package com.epmet.datareport.controller.screen; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassrootsPartyDevController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java similarity index 87% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassrootsPartyDevController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java index 0eb55c6c2c..9747aa3ff9 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/GrassrootsPartyDevController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.screen; +package com.epmet.datareport.controller.screen; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java similarity index 86% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/IndexController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index 6bd6faab9b..d8417ddcdb 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.screen; +package com.epmet.datareport.controller.screen; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/PartyMemberLeadController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java similarity index 87% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/PartyMemberLeadController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java index 6f730e9711..34b2fee3c0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/PartyMemberLeadController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.screen; +package com.epmet.datareport.controller.screen; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ProjectController.java similarity index 85% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/ProjectController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ProjectController.java index 20e5af2bf4..44f1a6407b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/screen/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ProjectController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.screen; +package com.epmet.datareport.controller.screen; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/topic/TopicController.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/topic/TopicController.java index 233f31dc27..91edf636dd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/topic/TopicController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/topic/TopicController.java @@ -1,10 +1,10 @@ -package com.epmet.controller.topic; +package com.epmet.datareport.controller.topic; 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.service.topic.TopicService; +import com.epmet.datareport.service.topic.TopicService; import com.epmet.topic.dto.form.TopicIncrTrendFormDTO; import com.epmet.topic.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/user/UserAnalysisController.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/user/UserAnalysisController.java index cceebbef37..dda6b177cf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/controller/user/UserAnalysisController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/user/UserAnalysisController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.user; +package com.epmet.datareport.controller.user; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -7,7 +7,7 @@ import com.epmet.dto.form.user.UserSubAgencyFormDTO; import com.epmet.dto.form.user.UserSubGridFormDTO; import com.epmet.dto.form.user.UserSummaryInfoFormDTO; import com.epmet.dto.result.user.*; -import com.epmet.service.user.UserAnalysisService; +import com.epmet.datareport.service.user.UserAnalysisService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/.gitignore similarity index 100% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/.gitignore rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/.gitignore diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/group/GroupDao.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/group/GroupDao.java index e2a8410272..975b49ba5a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/group/GroupDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/group/GroupDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.group; +package com.epmet.datareport.dao.group; import com.epmet.group.dto.result.*; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/IssueDao.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/IssueDao.java index abf2c4d350..53cab40c92 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/issue/IssueDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/issue/IssueDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.issue; +package com.epmet.datareport.dao.issue; import com.epmet.issue.dto.result.IssueDataDTO; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/project/ProjectDao.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/project/ProjectDao.java index 3ae53720f7..b8920580bf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/project/ProjectDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/project/ProjectDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.project; +package com.epmet.datareport.dao.project; import com.epmet.project.dto.FactAgencyProjectDailyDTO; import com.epmet.project.dto.result.*; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/publicity/PublicityDao.java similarity index 99% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/publicity/PublicityDao.java index a4babe6039..b65c16b9a1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/publicity/PublicityDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.publicity; +package com.epmet.datareport.dao.publicity; import com.epmet.publicity.dto.result.*; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java index 2210a3b541..76edf9c12b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java index be2e05d62b..26bc852633 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import com.epmet.screen.dto.result.TreeResultDTO; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java index 3a0ac47e2a..e6ae450514 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java index 45d5ba843b..92489cffc5 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java index e39518da61..ced4f66003 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java index e5ae922669..7ef0c0287b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java index 66e45a7076..28809db0ce 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java index 1f6b354383..9c08e1d226 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataDao.java index d722725afc..1f038fd5b3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java index eb501a0c4b..6369c71ee3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java index 08760ede69..83b3fb5c15 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java index b7c6bd385d..637f4bf604 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java index b888baed3d..caadd5520f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java index cf086610d6..e2c01f7f9f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java index 0eb4b041ac..34b2a61cbf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java index 3392dcdb9b..70477e48c6 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import com.epmet.screen.dto.result.PartymemberPercentResultDTO; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenVoluntaryActivityDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenVoluntaryActivityDataDao.java index 7b83a751c0..b4433d9b1d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenVoluntaryActivityDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/topic/TopicDao.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/topic/TopicDao.java index 2ab863ab78..4c0fb9d377 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/topic/TopicDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/topic/TopicDao.java @@ -1,6 +1,5 @@ -package com.epmet.dao.topic; +package com.epmet.datareport.dao.topic; -import com.epmet.group.dto.result.GroupIncrTrendResultDTO; import com.epmet.topic.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/dao/user/UserAnalysisDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/UserAnalysisDao.java similarity index 99% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/UserAnalysisDao.java index 2df268feb2..c0a69f82fc 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/user/UserAnalysisDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/user/UserAnalysisDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.user; +package com.epmet.datareport.dao.user; import com.epmet.dto.DimAgencyDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/.gitignore similarity index 100% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/.gitignore rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/.gitignore diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/GroupService.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/GroupService.java index d644029bcf..66d57fc92c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/GroupService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/GroupService.java @@ -1,4 +1,4 @@ -package com.epmet.service.group; +package com.epmet.datareport.service.group; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.group.dto.form.GroupIncrTrendFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/impl/GroupServiceImpl.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/impl/GroupServiceImpl.java index d1be53ee85..be4faf115d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/group/impl/GroupServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/group/impl/GroupServiceImpl.java @@ -1,15 +1,15 @@ -package com.epmet.service.group.impl; +package com.epmet.datareport.service.group.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.dao.group.GroupDao; +import com.epmet.datareport.dao.group.GroupDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.group.constant.GroupConstant; import com.epmet.group.dto.form.GroupIncrTrendFormDTO; import com.epmet.group.dto.result.*; -import com.epmet.service.group.GroupService; +import com.epmet.datareport.service.group.GroupService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/IssueService.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/IssueService.java index c0d33b2a3b..d0b3b6156d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/IssueService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/IssueService.java @@ -1,4 +1,4 @@ -package com.epmet.service.issue; +package com.epmet.datareport.service.issue; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.issue.dto.form.IssueIncrtrendFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/impl/IssueServiceImpl.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/impl/IssueServiceImpl.java index d44576202e..86953616b1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/issue/impl/IssueServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/issue/impl/IssueServiceImpl.java @@ -1,22 +1,20 @@ -package com.epmet.service.issue.impl; +package com.epmet.datareport.service.issue.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.dao.issue.IssueDao; +import com.epmet.datareport.dao.issue.IssueDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.issue.constant.IssueConstant; import com.epmet.issue.dto.form.IssueIncrtrendFormDTO; import com.epmet.issue.dto.result.*; -import com.epmet.service.issue.IssueService; +import com.epmet.datareport.service.issue.IssueService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; -import java.math.RoundingMode; -import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java similarity index 100% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/ProjectService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/ProjectService.java diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java similarity index 98% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 6e5366827f..41af9351ac 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -1,10 +1,10 @@ -package com.epmet.service.project.impl; +package com.epmet.datareport.service.project.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.dao.project.ProjectDao; +import com.epmet.datareport.dao.project.ProjectDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/PublicityService.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/PublicityService.java index bec823066c..35b6fff93b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/PublicityService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/PublicityService.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.service.publicity; +package com.epmet.datareport.service.publicity; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.publicity.dto.result.*; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/impl/PublicityServiceImpl.java similarity index 98% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/impl/PublicityServiceImpl.java index b01f9339bc..9a8ceaca2f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/publicity/impl/PublicityServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/publicity/impl/PublicityServiceImpl.java @@ -15,16 +15,16 @@ * along with this program. If not, see . */ -package com.epmet.service.publicity.impl; +package com.epmet.datareport.service.publicity.impl; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.DateUtils; -import com.epmet.dao.publicity.PublicityDao; +import com.epmet.datareport.dao.publicity.PublicityDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.publicity.dto.result.*; -import com.epmet.service.publicity.PublicityService; +import com.epmet.datareport.service.publicity.PublicityService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java similarity index 94% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java index 58f429eca7..317cfde18d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.datareport.service.screen; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.screen.dto.form.CompartmentFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java index 7aa880d9eb..c98ad3b6c0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/DistributionService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.datareport.service.screen; import com.epmet.screen.dto.form.BranchFormDTO; import com.epmet.screen.dto.form.ParymemberFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassRootsGovernService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java similarity index 77% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassRootsGovernService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java index 2ec957601e..5c1343fcd1 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassRootsGovernService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.datareport.service.screen; /** * 基层治理相关各指标查询 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassrootsPartyDevService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java similarity index 92% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassrootsPartyDevService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java index ce74d350be..4f25eb5f0d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/GrassrootsPartyDevService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.datareport.service.screen; import com.epmet.screen.dto.form.ParymemberFormDTO; import com.epmet.screen.dto.result.PartymemberPercentResultDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java similarity index 75% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/IndexService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java index da71854f81..069534f7b8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/IndexService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.datareport.service.screen; /** * 指数相关相关各指标查询 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/PartyMemberLeadService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java similarity index 77% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/PartyMemberLeadService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java index 745720e6f8..61276a3c74 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/PartyMemberLeadService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.datareport.service.screen; /** * 党建引领相关各指标查询 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ProjectService.java similarity index 72% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/ProjectService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ProjectService.java index 35b2ebbb2d..6998572bde 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/ProjectService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ProjectService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.datareport.service.screen; /** * 项目 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java similarity index 87% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java index 2e732bba83..40260140d4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java @@ -1,16 +1,13 @@ -package com.epmet.service.screen.impl; +package com.epmet.datareport.service.screen.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.Result; -import com.epmet.dao.screen.ScreenCustomerAgencyDao; -import com.epmet.dto.result.AgencySubResultDTO; -import com.epmet.dto.result.ProcessorListResultDTO; +import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.screen.dto.form.CompartmentFormDTO; import com.epmet.screen.dto.result.CompartmentResultDTO; import com.epmet.screen.dto.result.TreeResultDTO; -import com.epmet.service.screen.AgencyService; +import com.epmet.datareport.service.screen.AgencyService; import org.springframework.beans.factory.annotation.Autowired; import java.util.List; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java similarity index 91% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java index 1723fee251..7d2dad4706 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen.impl; +package com.epmet.datareport.service.screen.impl; import com.epmet.screen.dto.form.BranchFormDTO; import com.epmet.screen.dto.form.ParymemberFormDTO; @@ -6,7 +6,7 @@ import com.epmet.screen.dto.form.UserFormDTO; import com.epmet.screen.dto.result.BranchResultDTO; import com.epmet.screen.dto.result.ParymemberResultDTO; import com.epmet.screen.dto.result.UserResultDTO; -import com.epmet.service.screen.DistributionService; +import com.epmet.datareport.service.screen.DistributionService; /** * 中央区相关各指标查询 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java similarity index 61% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassRootsGovernServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java index 4dd3e63e15..751b4b8c50 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassRootsGovernServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java @@ -1,6 +1,6 @@ -package com.epmet.service.screen.impl; +package com.epmet.datareport.service.screen.impl; -import com.epmet.service.screen.GrassRootsGovernService; +import com.epmet.datareport.service.screen.GrassRootsGovernService; /** * 基层治理相关各指标查询 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java similarity index 86% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java index 23c42f7bcf..94cf163888 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/GrassrootsPartyDevServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java @@ -1,9 +1,9 @@ -package com.epmet.service.screen.impl; +package com.epmet.datareport.service.screen.impl; -import com.epmet.dao.screen.ScreenUserTotalDataDao; +import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; import com.epmet.screen.dto.form.ParymemberFormDTO; import com.epmet.screen.dto.result.PartymemberPercentResultDTO; -import com.epmet.service.screen.GrassrootsPartyDevService; +import com.epmet.datareport.service.screen.GrassrootsPartyDevService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java similarity index 60% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/IndexServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java index 7c5bf8bd7a..370d60016d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java @@ -1,6 +1,6 @@ -package com.epmet.service.screen.impl; +package com.epmet.datareport.service.screen.impl; -import com.epmet.service.screen.IndexService; +import com.epmet.datareport.service.screen.IndexService; /** * 指数相关相关各指标查询 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/PartyMemberLeadServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java similarity index 61% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/PartyMemberLeadServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java index 4328a14279..cb85f7e75c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/PartyMemberLeadServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java @@ -1,6 +1,6 @@ -package com.epmet.service.screen.impl; +package com.epmet.datareport.service.screen.impl; -import com.epmet.service.screen.PartyMemberLeadService; +import com.epmet.datareport.service.screen.PartyMemberLeadService; /** * 党建引领相关各指标查询 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ProjectServiceImpl.java similarity index 56% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/ProjectServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ProjectServiceImpl.java index b8713b165a..44741a7921 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/screen/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ProjectServiceImpl.java @@ -1,6 +1,6 @@ -package com.epmet.service.screen.impl; +package com.epmet.datareport.service.screen.impl; -import com.epmet.service.screen.ProjectService; +import com.epmet.datareport.service.screen.ProjectService; /** * 项目 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/TopicService.java similarity index 96% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/TopicService.java index 584ac1b1dc..f0dd505cb4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/TopicService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/TopicService.java @@ -1,4 +1,4 @@ -package com.epmet.service.topic; +package com.epmet.datareport.service.topic; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.topic.dto.form.TopicIncrTrendFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/impl/TopicServiceImpl.java similarity index 97% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/impl/TopicServiceImpl.java index 298dcae7a3..12889caaae 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/topic/impl/TopicServiceImpl.java @@ -1,13 +1,12 @@ -package com.epmet.service.topic.impl; +package com.epmet.datareport.service.topic.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.dao.topic.TopicDao; +import com.epmet.datareport.dao.topic.TopicDao; import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.group.constant.GroupConstant; -import com.epmet.service.topic.TopicService; +import com.epmet.datareport.service.topic.TopicService; import com.epmet.topic.constant.TopicConstant; import com.epmet.topic.dto.form.TopicIncrTrendFormDTO; import com.epmet.topic.dto.result.*; @@ -16,8 +15,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; -import java.text.DecimalFormat; -import java.text.NumberFormat; import java.time.LocalDate; import java.util.*; import java.util.stream.Collectors; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/UserAnalysisService.java similarity index 98% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/UserAnalysisService.java index 2c658fc1da..47c304f1b2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/UserAnalysisService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/UserAnalysisService.java @@ -1,4 +1,4 @@ -package com.epmet.service.user; +package com.epmet.datareport.service.user; import com.epmet.dto.form.user.UserIncrTrendFormDTO; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java similarity index 99% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java index 3244076896..88e39067b4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/user/impl/UserAnalysisServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java @@ -1,4 +1,4 @@ -package com.epmet.service.user.impl; +package com.epmet.datareport.service.user.impl; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.NumConstant; @@ -7,7 +7,7 @@ import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.UserAnalysisConstant; -import com.epmet.dao.user.UserAnalysisDao; +import com.epmet.datareport.dao.user.UserAnalysisDao; import com.epmet.dto.DimAgencyDTO; import com.epmet.dto.DimDepartmentDTO; import com.epmet.dto.DimGridDTO; @@ -19,7 +19,7 @@ import com.epmet.dto.form.user.UserSummaryInfoFormDTO; import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.dto.result.user.*; import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.service.user.UserAnalysisService; +import com.epmet.datareport.service.user.UserAnalysisService; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 ad10364cb5..bfbabc6259 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 @@ -137,13 +137,13 @@ - - - - - - - + + + + + + + @@ -156,13 +156,13 @@ - - - - - - - + + + + + + + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml index b3b1faecd7..159a814a61 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/group/GroupDao.xml @@ -1,7 +1,7 @@ - + SELECT AGENCY_ID, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml index 9ea5c548d6..21b472e4de 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml @@ -1,7 +1,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 a44106f3f6..356c3bae7e 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,7 +1,7 @@ - + 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 8b95789110..9650c3f164 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,7 +1,7 @@ - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml index 416026256a..f65cb61870 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml @@ -1,7 +1,7 @@ - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml index 01d4a5d335..3b96ffc150 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/topic/TopicDao.xml @@ -1,7 +1,7 @@ - + SELECT From 347a16d7bb69d47cb8637be27a6b514ef031fc42 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 18 Aug 2020 16:14:57 +0800 Subject: [PATCH 009/360] =?UTF-8?q?controller=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-module/data-report/data-report-server/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 7f96938c28..690dfb72f3 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -112,7 +112,7 @@ 123456 - true + false 122.152.200.70:8848 fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b From f480de9688397d3039c03c5ab7283a47ef47cf71 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 18 Aug 2020 16:24:04 +0800 Subject: [PATCH 010/360] =?UTF-8?q?controller=E9=87=8D=E5=91=BD=E5=90=8D?= =?UTF-8?q?=20=20=E5=90=AF=E5=8A=A8=E7=B1=BB=E4=BF=AE=E6=94=B9=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/{datareport => }/DataReportApplication.java | 2 +- .../epmet/datareport/controller/screen/ProjectController.java | 2 +- .../epmet/datareport/service/screen/impl/AgencyServiceImpl.java | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/{datareport => }/DataReportApplication.java (94%) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/DataReportApplication.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java similarity index 94% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/DataReportApplication.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java index c8a3e68002..cee0ed9096 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/DataReportApplication.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/DataReportApplication.java @@ -1,4 +1,4 @@ -package com.epmet.datareport; +package com.epmet; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ProjectController.java index 44f1a6407b..4bf4b33342 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ProjectController.java @@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RestController; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:16 */ -@RestController +@RestController("screeproject") @RequestMapping("/screen/project") public class ProjectController { } 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 40260140d4..fdb36ae339 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 @@ -9,6 +9,7 @@ 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; @@ -18,6 +19,7 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:18 */ +@Service public class AgencyServiceImpl implements AgencyService { @Autowired From 3fd59b932ee08b4782f892d15b50fc40e814730b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 18 Aug 2020 16:31:41 +0800 Subject: [PATCH 011/360] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9C=BA=E6=9E=84?= =?UTF-8?q?=E6=A0=91=EF=BC=8C=E7=BB=84=E7=BB=87=E5=8C=BA=E5=9F=9F=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/screen/AgencyController.java | 6 +++--- ...ntroller.java => ScreenProjectController.java} | 2 +- .../datareport/service/screen/AgencyService.java | 4 ++-- ...jectService.java => ScreenProjectService.java} | 2 +- .../service/screen/impl/AgencyServiceImpl.java | 15 +++++++++++---- .../screen/impl/DistributionServiceImpl.java | 2 ++ .../screen/impl/GrassRootsGovernServiceImpl.java | 2 ++ .../service/screen/impl/IndexServiceImpl.java | 2 ++ .../screen/impl/PartyMemberLeadServiceImpl.java | 2 ++ .../service/screen/impl/ProjectServiceImpl.java | 12 ------------ .../screen/impl/ScreenProjectServiceImpl.java | 14 ++++++++++++++ .../mapper/screen/ScreenCustomerAgencyDao.xml | 1 + 12 files changed, 41 insertions(+), 23 deletions(-) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/{ProjectController.java => ScreenProjectController.java} (89%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/{ProjectService.java => ScreenProjectService.java} (76%) delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ProjectServiceImpl.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java 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 e69b0d51f1..c37a2ad225 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 @@ -31,13 +31,13 @@ public class AgencyController { /** * @Description 1、组织机构树 - * @param tokenDto + * @param * @author zxc * @date 2020/8/18 2:04 下午 */ @PostMapping("tree") - public Result> tree(@LoginUser TokenDto tokenDto){ - return new Result>().ok(agencyService.tree(tokenDto)); + public Result tree(){ + return new Result().ok(agencyService.tree()); } /** diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java similarity index 89% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ProjectController.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java index 4bf4b33342..a28be5899b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java @@ -11,5 +11,5 @@ import org.springframework.web.bind.annotation.RestController; */ @RestController("screeproject") @RequestMapping("/screen/project") -public class ProjectController { +public class ScreenProjectController { } 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/screen/AgencyService.java index 317cfde18d..5b7a48177a 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/screen/AgencyService.java @@ -17,11 +17,11 @@ public interface AgencyService { /** * @Description 1、组织机构树 - * @param tokenDto + * @param * @author zxc * @date 2020/8/18 2:04 下午 */ - List tree(TokenDto tokenDto); + TreeResultDTO tree(); /** * @Description 2、组织区域查询 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java similarity index 76% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ProjectService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java index 6998572bde..51354ec4f6 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ProjectService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java @@ -6,5 +6,5 @@ package com.epmet.datareport.service.screen; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:22 */ -public interface ProjectService { +public interface ScreenProjectService { } 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 fdb36ae339..922b15000d 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 @@ -29,15 +29,22 @@ public class AgencyServiceImpl implements AgencyService { /** * @Description 1、组织机构树 - * @param tokenDto + * @param * @author zxc * @date 2020/8/18 2:04 下午 */ @Override - public List tree(TokenDto tokenDto) { + public TreeResultDTO tree() { // 1. 查询客户根组织ID - TreeResultDTO rootAgency = screenCustomerAgencyDao.selectRootAgencyId(tokenDto.getCustomerId()); - return this.getDepartmentList(("".equals(rootAgency.getPids()) ? "" : rootAgency.getPids() + ":") + rootAgency.getValue()); + // TODO 改成正式注解获取customerId + String customerId = "zxc"; + 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; } private List getDepartmentList(String subAgencyPids) { 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/screen/impl/DistributionServiceImpl.java index 7d2dad4706..c83c82aff7 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/screen/impl/DistributionServiceImpl.java @@ -7,6 +7,7 @@ import com.epmet.screen.dto.result.BranchResultDTO; import com.epmet.screen.dto.result.ParymemberResultDTO; import com.epmet.screen.dto.result.UserResultDTO; import com.epmet.datareport.service.screen.DistributionService; +import org.springframework.stereotype.Service; /** * 中央区相关各指标查询 @@ -14,6 +15,7 @@ import com.epmet.datareport.service.screen.DistributionService; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:19 */ +@Service public class DistributionServiceImpl implements DistributionService { /** 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 751b4b8c50..cb1e1fe160 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 @@ -1,6 +1,7 @@ package com.epmet.datareport.service.screen.impl; import com.epmet.datareport.service.screen.GrassRootsGovernService; +import org.springframework.stereotype.Service; /** * 基层治理相关各指标查询 @@ -8,5 +9,6 @@ import com.epmet.datareport.service.screen.GrassRootsGovernService; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:20 */ +@Service public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { } 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/screen/impl/IndexServiceImpl.java index 370d60016d..042e9b2229 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/screen/impl/IndexServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.datareport.service.screen.impl; import com.epmet.datareport.service.screen.IndexService; +import org.springframework.stereotype.Service; /** * 指数相关相关各指标查询 @@ -8,5 +9,6 @@ import com.epmet.datareport.service.screen.IndexService; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:21 */ +@Service public class IndexServiceImpl implements IndexService { } 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/screen/impl/PartyMemberLeadServiceImpl.java index cb85f7e75c..33903007a5 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.datareport.service.screen.impl; import com.epmet.datareport.service.screen.PartyMemberLeadService; +import org.springframework.stereotype.Service; /** * 党建引领相关各指标查询 @@ -8,5 +9,6 @@ import com.epmet.datareport.service.screen.PartyMemberLeadService; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:22 */ +@Service public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ProjectServiceImpl.java deleted file mode 100644 index 44741a7921..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ProjectServiceImpl.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.epmet.datareport.service.screen.impl; - -import com.epmet.datareport.service.screen.ProjectService; - -/** - * 项目 - * - * @author yinzuomei@elink-cn.com - * @date 2020/8/18 10:23 - */ -public class ProjectServiceImpl implements ProjectService { -} \ 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/ScreenProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java new file mode 100644 index 0000000000..5a09c8ce83 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java @@ -0,0 +1,14 @@ +package com.epmet.datareport.service.screen.impl; + +import com.epmet.datareport.service.screen.ScreenProjectService; +import org.springframework.stereotype.Service; + +/** + * 项目 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:23 + */ +@Service +public class ScreenProjectServiceImpl implements ScreenProjectService { +} \ 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 9650c3f164..fd9095fc7d 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 @@ -6,6 +6,7 @@ + + + + + + + \ No newline at end of file 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 5a1a10b48d..df1a2fbe44 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 @@ -3,6 +3,18 @@ - - + + \ No newline at end of file From 9a7248c4faa255db8f0963befaacbda27730fa28 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 19 Aug 2020 11:16:38 +0800 Subject: [PATCH 014/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86=20=E5=85=A8=E9=83=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/screencoll/ImgDataListDTO.java | 31 ++ .../screencoll/form/CpcBaseDataFormDTO.java | 86 +++++ .../form/CustomerAgencyFormDTO.java | 71 ++++ .../screencoll/form/CustomerDeptFormDTO.java | 51 +++ .../screencoll/form/CustomerGridFormDTO.java | 51 +++ .../form/DifficultyDataFormDTO.java | 91 +++++ .../dto/screencoll/form/EventDataFormDTO.java | 109 ++++++ .../form/GovernRankDataFormDTO.java | 72 ++++ .../dto/screencoll/form/IndexDataFormDTO.java | 71 ++++ .../screencoll/form/OrgRankDataFormDTO.java | 87 +++++ .../form/PartyBranchDataFormDTO.java | 76 ++++ .../form/PartyLinkMassesDataFormDTO.java | 51 +++ .../form/PartyUserRankDataFormDTO.java | 71 ++++ .../screencoll/form/PioneerDataFormDTO.java | 66 ++++ .../dto/screencoll/form/UserJoinFormDTO.java | 72 ++++ .../screencoll/form/UserTotalDataFormDTO.java | 71 ++++ .../form/VoluntaryActivityDataFormDTO.java | 61 +++ .../controller/ScreenCollController.java | 221 +++++++++++ .../dao/screen/ScreenCpcBaseDataDao.java | 29 +- .../dao/screen/ScreenCustomerAgencyDao.java | 29 +- .../dao/screen/ScreenCustomerDeptDao.java | 29 +- .../dao/screen/ScreenCustomerGridDao.java | 28 +- .../dao/screen/ScreenDifficultyDataDao.java | 29 +- .../epmet/dao/screen/ScreenEventDataDao.java | 29 +- .../dao/screen/ScreenEventImgDataDao.java | 14 +- .../dao/screen/ScreenGovernRankDataDao.java | 32 +- .../epmet/dao/screen/ScreenIndexDataDao.java | 33 +- .../dao/screen/ScreenOrgRankDataDao.java | 32 +- .../dao/screen/ScreenPartyBranchDataDao.java | 32 +- .../screen/ScreenPartyLinkMassesDataDao.java | 29 +- .../screen/ScreenPartyUserRankDataDao.java | 33 +- .../dao/screen/ScreenPioneerDataDao.java | 29 +- .../epmet/dao/screen/ScreenUserJoinDao.java | 29 +- .../dao/screen/ScreenUserTotalDataDao.java | 29 +- .../ScreenVoluntaryActivityDataDao.java | 33 +- .../service/screen/ScreenCollService.java | 201 ++++++++++ .../screen/impl/ScreenCollServiceImpl.java | 346 ++++++++++++++++++ .../mapper/screen/ScreenCpcBaseDataDao.xml | 63 +++- .../mapper/screen/ScreenCustomerAgencyDao.xml | 55 ++- .../mapper/screen/ScreenCustomerDeptDao.xml | 47 ++- .../mapper/screen/ScreenCustomerGridDao.xml | 47 ++- .../mapper/screen/ScreenDifficultyDataDao.xml | 59 ++- .../mapper/screen/ScreenEventDataDao.xml | 63 +++- .../mapper/screen/ScreenEventImgDataDao.xml | 6 +- .../mapper/screen/ScreenGovernRankDataDao.xml | 59 ++- .../mapper/screen/ScreenIndexDataDao.xml | 56 ++- .../mapper/screen/ScreenOrgRankDataDao.xml | 61 ++- .../screen/ScreenPartyBranchDataDao.xml | 58 ++- .../screen/ScreenPartyLinkMassesDataDao.xml | 48 ++- .../screen/ScreenPartyUserRankDataDao.xml | 55 ++- .../mapper/screen/ScreenPioneerDataDao.xml | 53 ++- .../mapper/screen/ScreenUserJoinDao.xml | 55 ++- .../mapper/screen/ScreenUserTotalDataDao.xml | 55 ++- .../screen/ScreenVoluntaryActivityDataDao.xml | 51 ++- 54 files changed, 3293 insertions(+), 52 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ImgDataListDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ImgDataListDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ImgDataListDTO.java new file mode 100644 index 0000000000..fb63116850 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ImgDataListDTO.java @@ -0,0 +1,31 @@ +package com.epmet.dto.screencoll; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 图片列表 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class ImgDataListDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 原始事件id + */ + private String eventId; + + /** + * 图片地址 + */ + private String imgUrl; + + /** + * 排序 + */ + private Integer sort; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java new file mode 100644 index 0000000000..0efee2a896 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java @@ -0,0 +1,86 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 2、党员基本情况 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class CpcBaseDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 注册用户数 + */ + private Integer registerUserCount; + + /** + * 群众用户数 + */ + private Integer resiTotal; + + /** + * 注册党员数 + */ + private Integer partyMemberCount; + + /** + * 小于20岁 + */ + private Integer ageLevel1; + + /** + * 20-30岁 + */ + private Integer ageLevel2; + + /** + * 31-40岁 + */ + private Integer ageLevel3; + + /** + * 41-50岁 + */ + private Integer ageLevel4; + + /** + * 51-60岁 + */ + private Integer ageLevel5; + + /** + * 60+岁 + */ + private Integer ageLevel6; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java new file mode 100644 index 0000000000..7baff54308 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java @@ -0,0 +1,71 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 14、组织层级 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class CustomerAgencyFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织id + */ + private String agencyId; + + /** + * 组织名称 + */ + private String agencyName; + + /** + * 父级id ,顶级,此列为0 + */ + private String pid; + + /** + * 所有上级ID,用逗号分开 + */ + private String pids; + + /** + * 所有组织名称以-链接 + */ + private String allParentNames; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党工委|街道党委的位置,预留字段 + */ + private String partyMark; + + /** + * 机关级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province) + */ + private String level; + + /** + * 行政地区编码 + */ + private String areaCode; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java new file mode 100644 index 0000000000..5566ea3ad7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 16、部门信息上传 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class CustomerDeptFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 部门所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域可空 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 部门所在位置 + */ + private String deptMark; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java new file mode 100644 index 0000000000..13345ffaad --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 15、网格信息上传 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class CustomerGridFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域可空 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党支部的位置!!! + */ + private String partyMark; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java new file mode 100644 index 0000000000..3053fe955a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java @@ -0,0 +1,91 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 3、难点赌点 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class DifficultyDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 事件原Id + */ + private String eventId; + + /** + * 事件图片 URL + */ + private String eventImgUrl; + + /** + * 事件来源 eg: XXX街道-xx社区-网格 + */ + private String eventSource; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 事件耗时单位:分钟 + */ + private Integer eventCostTime; + + /** + * 事件设计部门数 + */ + private Integer eventReOrg; + + /** + * 事件类别编码 + */ + private String eventCategoryCode; + + /** + * 事件状态编码 + */ + private String eventStatusCode; + + /** + * 事件类别名称 + */ + private String eventCategoryName; + + /** + * 事件状态描述 + */ + private String eventStatusDesc; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java new file mode 100644 index 0000000000..1f56464806 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java @@ -0,0 +1,109 @@ +package com.epmet.dto.screencoll.form; + +import com.epmet.dto.screencoll.ImgDataListDTO; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +/** + * 4、事件数据(中央区-事件数据) 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class EventDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 原始事件Id + */ + private String eventId; + + /** + * 事件名称 + */ + private String eventTitle; + + /** + * yyyy-MM-dd HH:mm:ss事件时间 + */ + private String eventCreateTime; + + /** + * 联系人 + */ + private String linkMobile; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 事件图片(如果有图片,此列为第一张图片) + */ + private String eventImgUrl; + + /** + * 事件待处理级别 red:红;yellow:黄 , green绿色 + */ + private String eventLevel; + + /** + * 事件发生的地址 + */ + private String eventAddress; + + /** + * 经度 + */ + private BigDecimal longitude; + + /** + * 维度 + */ + private BigDecimal latitude; + + /** + * 最后处理的组织名称 + */ + private String lastProcessDept; + + /** + * 最后处理的时间 + */ + private String lastProcessDate; + + /** + * 图片列表 + */ + private List imgDataList; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java new file mode 100644 index 0000000000..3976647f24 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java @@ -0,0 +1,72 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 5、基层治理-治理能力数据 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class GovernRankDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 年Id :yyyy + */ + private String yearId; + + /** + * 月份Id :yyyyMM + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 响应率,最大值100,保留小数点后4位 + */ + private BigDecimal responseRatio; + + /** + * 解决率 最大值100,保留小数点后4位 + */ + private BigDecimal resolvedRatio; + + /** + * 自治率 最大值100,保留小数点后4位 + */ + private BigDecimal governRatio; + + /** + * 满意率,最大值100,保留小数点后四位 + */ + private BigDecimal satisfactionRatio; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataFormDTO.java new file mode 100644 index 0000000000..d6d3065992 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataFormDTO.java @@ -0,0 +1,71 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 1、指数相关 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class IndexDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * yyyy + */ + private String yearId; + + /** + * yyyyMM eg :202007 + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 总指数 + */ + private Integer indexTotal; + + /** + * 党建能力指数 + */ + private Integer partyDevAblity; + + /** + * 服务能力指数 + */ + private Integer serviceAblity; + + /** + * 治理能力指数 + */ + private Integer governAblity; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java new file mode 100644 index 0000000000..37386fcc6b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java @@ -0,0 +1,87 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 6、党建引领-组织排行 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class OrgRankDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 年Id :yyyy + */ + private String yearId; + + /** + * 月份Id :yyyyMM + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 党员总数 + */ + private Integer partyTotal; + + /** + * 小组(支部建设总数) + */ + private Integer groupTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; + + /** + * 结案率,最大值100,保留小数点后四位 + */ + private BigDecimal closeProjectRatio; + + /** + * 满意率,最大值100,保留小数点后四位 + */ + private BigDecimal satisfactionRatio; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java new file mode 100644 index 0000000000..956a1db6aa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java @@ -0,0 +1,76 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 7、基层党建-建设情况数据(支部、联建) 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class PartyBranchDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 年Id :yyyy + */ + private String yearId; + + /** + * 月份Id :yyyyMM + */ + private String monthId; + + /** + * 数据类别 party:支部建设;union:联合建设 + */ + private String type; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 议题分类名称 + */ + private String issueCategoryName; + + /** + * 议题分类id + */ + private String issueCategoryId; + + /** + * 组织次数 + */ + private Integer organizeCount; + + /** + * 参加人数 + */ + private Integer joinUserCount; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java new file mode 100644 index 0000000000..bacca22874 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 8、党建引领-党员联系群众数据 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class PartyLinkMassesDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 建群总数 + */ + private Integer createGroupTotal; + + /** + * 群成员总数 + */ + private Integer groupUserTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java new file mode 100644 index 0000000000..6267736f51 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java @@ -0,0 +1,71 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 9、党建引领|基层治理-居民(党员)积分排行榜 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class PartyUserRankDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 年Id :yyyy + */ + private String yearId; + + /** + * 月份Id :yyyyMM + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 用户身份 party:党员;resi:居民 + */ + private String userType; + + /** + * 用户Id + */ + private String userId; + + /** + * 用户名称 + */ + private String userName; + + /** + * 用户积分 + */ + private Integer pointTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java new file mode 100644 index 0000000000..bde79f0baf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java @@ -0,0 +1,66 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 10、党建引领-先锋模范数据 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class PioneerDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 用户总数 + */ + private Integer userTotal; + + /** + * 议事数 + */ + private Integer issueTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题转项目数 + */ + private Integer shiftProjectTotal; + + /** + * 解决项目总数 + */ + private Integer resolvedProjectTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java new file mode 100644 index 0000000000..65b563795d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java @@ -0,0 +1,72 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 11、基层治理-公众参与 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class UserJoinFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 总的参与次数 + */ + private Integer joinTotal; + + /** + * 总的参与次数较上月增长率 + */ + private BigDecimal joinTotalUpRate; + + /** + * 人均议题 + */ + private Integer avgIssue; + + /** + * 人均议题较上月增长率 + */ + private BigDecimal avgIssueUpRate; + + /** + * 平均参与度 + */ + private Integer avgJoin; + + /** + * 平均参与度较上月增长率 + */ + private BigDecimal avgJoinUpRate; +} 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 new file mode 100644 index 0000000000..3cf171e6f7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataFormDTO.java @@ -0,0 +1,71 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 12、中央区各类总数 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class UserTotalDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 用户总数 + */ + private Integer userTotal; + + /** + * 注册党员数 + */ + private Integer partyTotal; + + /** + * 小组(党群)总数 + */ + private Integer groupTotal; + + /** + * 话题总数 + */ + private Integer topicTotal; + + /** + * 议题总数 + */ + private Integer issueTotal; + + /** + * 项目总数 + */ + private Integer projectTotal; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java new file mode 100644 index 0000000000..6746a60303 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java @@ -0,0 +1,61 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 13、党建引领-志愿活动服务数据 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class VoluntaryActivityDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * yyyy + */ + private String yearId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 组织活动次数 + */ + private Integer activetyCount; + + /** + * 活动参与人数 + */ + private Integer joinUserCount; +} 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 616182f026..0052006dff 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 @@ -1,8 +1,16 @@ package com.epmet.controller; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.screencoll.form.*; +import com.epmet.service.screen.ScreenCollService; +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 * @@ -12,4 +20,217 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("screencoll") public class ScreenCollController { + + @Autowired + private ScreenCollService screenCollService; + + /** + * 9、党建引领|基层治理-居民(党员)积分排行榜 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("partyuserrankdata") + public Result partyUserRankData(@RequestBody List formDTO) { + return screenCollService.insertPartyUserRankData(formDTO); + } + + /** + * 8、党建引领-党员联系群众数据 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("partylinkmassesdata") + public Result partyLinkMassesData(@RequestBody List formDTO) { + return screenCollService.insertPartyLinkMassesData(formDTO); + } + + /** + * 7、基层党建-建设情况数据(支部、联建) + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("partybranchdata") + public Result partyBranchData(@RequestBody List formDTO) { + return screenCollService.insertPartyBranchData(formDTO); + } + + /** + * 6、党建引领-组织排行 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("orgrankdata") + public Result orgRankData(@RequestBody List formDTO) { + return screenCollService.insertOrgRankData(formDTO); + } + + /** + * 5、基层治理-治理能力数据 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("governrankdata") + public Result governRankData(@RequestBody List formDTO) { + return screenCollService.insertGovernRankData(formDTO); + } + + /** + * 4、事件数据 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("eventdata") + public Result eventData(@RequestBody List formDTO) { + return screenCollService.insertEventData(formDTO); + } + + /** + * 3、难点赌点 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("difficultydata") + public Result difficultyData(@RequestBody List formDTO) { + return screenCollService.insertDifficultyData(formDTO); + } + + /** + * 2、党员基本情况 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("cpcbasedata") + public Result cpcbaseData(@RequestBody List formDTO) { + return screenCollService.insertCpcbaseData(formDTO); + } + + /** + * 1、指数相关 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("indexdata") + public Result indexData(@RequestBody List formDTO) { + return screenCollService.insertIndexData(formDTO); + } + + // -- + + /** + * 16、部门信息上传 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("customerdept") + public Result customerDept(@RequestBody List formDTO) { + return screenCollService.insertCustomerDept(formDTO); + } + + /** + * 15、网格信息上传 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("customergrid") + public Result customerGrid(@RequestBody List formDTO) { + return screenCollService.insertCustomerGrid(formDTO); + } + + /** + * 14、组织层级 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("customeragency") + public Result customerAgency(@RequestBody List formDTO) { + return screenCollService.insertCustomerAgency(formDTO); + } + + /** + * 13、党建引领-志愿活动服务数据 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("voluntaryactivitydata") + public Result voluntaryActivityData(@RequestBody List formDTO) { + return screenCollService.insertVoluntaryActivityData(formDTO); + } + + /** + * 12、中央区各类总数 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("usertotaldata") + public Result userTotalData(@RequestBody List formDTO) { + return screenCollService.insertUserTotalData(formDTO); + } + + /** + * 11、基层治理-公众参与 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("userjoin") + public Result userJoin(@RequestBody List formDTO) { + return screenCollService.insertUserJoin(formDTO); + } + + /** + * 10、党建引领-先锋模范数据 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("pioneerdata") + public Result pioneerData(@RequestBody List formDTO) { + return screenCollService.insertPioneerData(formDTO); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java index f36b90de5a..fa30fdef44 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.CpcBaseDataFormDTO; import com.epmet.entity.screen.ScreenCpcBaseDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 基层党建-党员基本情况 @@ -29,5 +33,26 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenCpcBaseDataDao extends BaseDao { - -} \ No newline at end of file + + /** + * 2、党员基本情况 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteCpcBaseData(@Param("customerId") String customerId, + @Param("orgIds") String[] orgIds); + + /** + * 2、党员基本情况 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertCpcBaseData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java index 7c6b86064a..240c48e041 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java @@ -18,8 +18,13 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO; +import com.epmet.dto.screencoll.form.CustomerGridFormDTO; import com.epmet.entity.screen.ScreenCustomerAgencyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 组织机构信息 @@ -29,5 +34,25 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenCustomerAgencyDao extends BaseDao { - -} \ No newline at end of file + /** + *14、组织层级 + * 1) 根据CUSTOMER_ID、AGENCY_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param agencyIds 组织id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteCustomerAgency(@Param("customerId") String customerId, + @Param("agencyIds") String[] agencyIds); + + /** + * 14、组织层级 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertCustomerAgency(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java index 7880a87e19..84e641b47b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.CustomerDeptFormDTO; import com.epmet.entity.screen.ScreenCustomerDeptEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 部门信息 @@ -29,5 +33,26 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenCustomerDeptDao extends BaseDao { - -} \ No newline at end of file + + /** + *16、部门信息上传 + * 1) 根据CUSTOMER_ID、DEPT_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param deptIds 部门Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteCustomerDept(@Param("customerId") String customerId, + @Param("deptIds") String[] deptIds); + + /** + * 16、部门信息上传 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertCustomerDept(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java index be0e30d3b5..cfc0c7092c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.CustomerGridFormDTO; import com.epmet.entity.screen.ScreenCustomerGridEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 网格信息 @@ -29,5 +33,25 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenCustomerGridDao extends BaseDao { - -} \ No newline at end of file + /** + *15、网格信息上传 + * 1) 根据CUSTOMER_ID、GRID_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param gridIds 网格Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteCustomerGrid(@Param("customerId") String customerId, + @Param("gridIds") String[] gridIds); + + /** + * 15、网格信息上传 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertCustomerGrid(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java index 59bf5ed908..503f070506 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.DifficultyDataFormDTO; import com.epmet.entity.screen.ScreenDifficultyDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 基层治理-难点堵点 @@ -29,5 +33,26 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenDifficultyDataDao extends BaseDao { - -} \ No newline at end of file + /** + * 3、难点赌点 + * 1) 根据CUSTOMER_ID、EVENT_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * CUSTOMER_ID 一 + * EVENT_ID 多 + * ORG_ID 多 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteDifficultyData(DifficultyDataFormDTO list); + + /** + * 3、难点赌点 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertDifficultyData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java index a1b422d57d..20250bc7ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.EventDataFormDTO; import com.epmet.entity.screen.ScreenEventDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 中央区-事件数据 @@ -29,5 +33,26 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenEventDataDao extends BaseDao { - -} \ No newline at end of file + /** + * 4、事件数据 + * 1) 根据CUSTOMER_ID、EVENT_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * CUSTOMER_ID 一 + * EVENT_ID 多 + * ORG_ID 多 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteEventData(EventDataFormDTO list); + + /** + * 4、事件数据 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertEventData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java index 341a71e4fc..42ca86859e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java @@ -20,6 +20,7 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.screen.ScreenEventImgDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 中央区-事件数据图片数据 @@ -29,5 +30,14 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenEventImgDataDao extends BaseDao { - -} \ No newline at end of file + + /** + * 根据原始事件Id,进行物理删除 + * + * @param eventId + * @return void + * @Author zhangyong + * @Date 16:47 2020-08-18 + **/ + void delEventImgDataByEventId(@Param("eventId") String eventId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java index c165a8c2e0..295538b085 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.GovernRankDataFormDTO; import com.epmet.entity.screen.ScreenGovernRankDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 基层治理-治理能力排行数据 @@ -29,5 +33,29 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenGovernRankDataDao extends BaseDao { - -} \ No newline at end of file + /** + * 5、基层治理-治理能力数据 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteGovernRankData(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 5、基层治理-治理能力数据 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertGovernRankData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java index 5824e61ce9..53a413b048 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.IndexDataFormDTO; import com.epmet.entity.screen.ScreenIndexDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 指数-指数数据 @@ -29,5 +33,30 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenIndexDataDao extends BaseDao { - -} \ No newline at end of file + + /** + *1、指数相关 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteIndexData(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 1、指数相关 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertIndexData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java index 416c1e73c5..110d37c618 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.OrgRankDataFormDTO; import com.epmet.entity.screen.ScreenOrgRankDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 党建引领-组织排行榜 @@ -29,5 +33,29 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenOrgRankDataDao extends BaseDao { - -} \ No newline at end of file + /** + * 6、党建引领-组织排行 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteOrgRankData(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 6、党建引领-组织排行 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertOrgRankData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java index cd05f39bae..9dc6a142c1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.PartyBranchDataFormDTO; import com.epmet.entity.screen.ScreenPartyBranchDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 基层党建-建设情况数据(支部,联建) @@ -29,5 +33,29 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenPartyBranchDataDao extends BaseDao { - -} \ No newline at end of file + /** + * 7、基层党建-建设情况数据(支部、联建) + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deletePartyBranchData(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 7、基层党建-建设情况数据(支部、联建) + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertPartyBranchData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java index 59379fb5c2..d100742ec8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.PartyLinkMassesDataFormDTO; import com.epmet.entity.screen.ScreenPartyLinkMassesDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 党建引领-党员联系群众数据 @@ -29,5 +33,26 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenPartyLinkMassesDataDao extends BaseDao { - -} \ No newline at end of file + + /** + * 8、党建引领-党员联系群众数据 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deletePartyLinkMassesData(@Param("customerId") String customerId, + @Param("orgIds") String[] orgIds); + + /** + * 8、党建引领-党员联系群众数据 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertPartyLinkMassesData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java index beb5c89990..c0ab9db8c1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.PartyUserRankDataFormDTO; import com.epmet.entity.screen.ScreenPartyUserRankDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 党建引领|基层治理-市民(党员)积分排行榜 @@ -29,5 +33,30 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenPartyUserRankDataDao extends BaseDao { - -} \ No newline at end of file + + /** + * 9、党建引领|基层治理-居民(党员)积分排行榜 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deletePartyUserRankData(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 9、党建引领|基层治理-居民(党员)积分排行榜 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertPartyUserRankData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java index d5614450e5..ba6bfa532a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.PioneerDataFormDTO; import com.epmet.entity.screen.ScreenPioneerDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 党建引领-先锋模范数据 @@ -29,5 +33,26 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenPioneerDataDao extends BaseDao { - -} \ No newline at end of file + + /** + * 10、党建引领-先锋模范数据 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deletePioneerData(@Param("customerId") String customerId, + @Param("orgIds") String[] orgIds); + + /** + * 10、党建引领-先锋模范数据 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertPioneerData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java index 8d87e41a02..440f611196 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.UserJoinFormDTO; import com.epmet.entity.screen.ScreenUserJoinEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 基层治理-公众参与 @@ -29,5 +33,26 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenUserJoinDao extends BaseDao { - -} \ No newline at end of file + + /** + * 11、基层治理-公众参与 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteUserJoin(@Param("customerId") String customerId, + @Param("orgIds") String[] orgIds); + + /** + * 11、基层治理-公众参与 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertUserJoin(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java index 67193fea32..ef7543555a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.UserTotalDataFormDTO; import com.epmet.entity.screen.ScreenUserTotalDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 中央区-各类用户总数 @@ -29,5 +33,26 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenUserTotalDataDao extends BaseDao { - -} \ No newline at end of file + + /** + * 12、中央区各类总数 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteUserTotalData(@Param("customerId") String customerId, + @Param("orgIds") String[] orgIds); + + /** + * 12、中央区各类总数 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertUserTotalData(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java index 2d01356044..13357e03c2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.VoluntaryActivityDataFormDTO; import com.epmet.entity.screen.ScreenVoluntaryActivityDataEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 党建引领-志愿活动服务数据 @@ -29,5 +33,30 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenVoluntaryActivityDataDao extends BaseDao { - -} \ No newline at end of file + + /** + * 13、党建引领-志愿活动服务数据 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteVoluntaryActivityData(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + + /** + * 13、党建引领-志愿活动服务数据 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertVoluntaryActivityData(@Param("list") List list); +} 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 new file mode 100644 index 0000000000..1c6c212588 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java @@ -0,0 +1,201 @@ +package com.epmet.service.screen; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.screencoll.form.*; + +import java.util.List; + +public interface ScreenCollService { + + /** + * 9、党建引领|基层治理-居民(党员)积分排行榜 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertPartyUserRankData(List formDTO); + + /** + * 8、党建引领-党员联系群众数据 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertPartyLinkMassesData(List formDTO); + + /** + * 7、基层党建-建设情况数据(支部、联建) + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertPartyBranchData(List formDTO); + + /** + * 6、党建引领-组织排行 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertOrgRankData(List formDTO); + + /** + * 5、基层治理-治理能力数据 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertGovernRankData(List formDTO); + + /** + * 4、事件数据 + * 1) 根据CUSTOMER_ID、EVENT_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertEventData(List formDTO); + + /** + * 3、难点赌点 + * 1) 根据CUSTOMER_ID、EVENT_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertDifficultyData(List formDTO); + + /** + * 2、党员基本情况 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertCpcbaseData(List formDTO); + + /** + * 1、指数相关 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertIndexData(List formDTO); + + /** + * 16、部门信息上传 + * 1) 根据CUSTOMER_ID、DEPT_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertCustomerDept(List formDTO); + + /** + * 15、网格信息上传 + * 1) 根据CUSTOMER_ID、GRID_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertCustomerGrid(List formDTO); + + /** + * 14、组织层级 + * 1) 根据CUSTOMER_ID、AGENCY_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertCustomerAgency(List formDTO); + + /** + * 13、党建引领-志愿活动服务数据 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertVoluntaryActivityData(List formDTO); + + /** + * 12、中央区各类总数 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertUserTotalData(List formDTO); + + /** + * 11、基层治理-公众参与 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertUserJoin(List formDTO); + + /** + * 10、党建引领-先锋模范数据 + * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertPioneerData(List 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 new file mode 100644 index 0000000000..922de2f876 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java @@ -0,0 +1,346 @@ +/** + * 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.service.screen.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.screen.*; +import com.epmet.dto.screencoll.form.*; +import com.epmet.entity.screen.ScreenEventImgDataEntity; +import com.epmet.service.screen.ScreenCollService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 大屏数据采集 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-05-11 + */ +@Service +public class ScreenCollServiceImpl implements ScreenCollService { + + @Autowired + private ScreenPartyUserRankDataDao screenPartyUserRankDataDao; + @Autowired + private ScreenPartyLinkMassesDataDao screenPartyLinkMassesDataDao; + @Autowired + private ScreenPartyBranchDataDao screenPartyBranchDataDao; + @Autowired + private ScreenOrgRankDataDao screenOrgRankDataDao; + @Autowired + private ScreenGovernRankDataDao screenGovernRankDataDao; + @Autowired + private ScreenEventDataDao screenEventDataDao; + @Autowired + private ScreenEventImgDataDao screenEventImgDataDao; + @Autowired + private ScreenDifficultyDataDao screenDifficultyDataDao; + @Autowired + private ScreenCpcBaseDataDao screenCpcBaseDataDao; + @Autowired + private ScreenIndexDataDao screenIndexDataDao; + @Autowired + private ScreenCustomerDeptDao screenCustomerDeptDao; + @Autowired + private ScreenCustomerGridDao screenCustomerGridDao; + @Autowired + private ScreenCustomerAgencyDao screenCustomerAgencyDao; + @Autowired + private ScreenVoluntaryActivityDataDao screenVoluntaryActivityDataDao; + @Autowired + private ScreenUserTotalDataDao screenUserTotalDataDao; + @Autowired + private ScreenUserJoinDao screenUserJoinDao; + @Autowired + private ScreenPioneerDataDao screenPioneerDataDao; + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertPartyUserRankData(List formDTO) { + 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(); + } + screenPartyUserRankDataDao.deletePartyUserRankData(formDTO.get(NumConstant.ZERO).getCustomerId(), + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + screenPartyUserRankDataDao.batchInsertPartyUserRankData(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertPartyLinkMassesData(List formDTO) { + 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(); + } + screenPartyLinkMassesDataDao.deletePartyLinkMassesData(formDTO.get(NumConstant.ZERO).getCustomerId(), orgIds); + + screenPartyLinkMassesDataDao.batchInsertPartyLinkMassesData(formDTO); + } + return new Result(); + } + + @Override + public Result insertPartyBranchData(List formDTO) { + 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(); + } + screenPartyBranchDataDao.deletePartyBranchData(formDTO.get(NumConstant.ZERO).getCustomerId(), + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + screenPartyBranchDataDao.batchInsertPartyBranchData(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertOrgRankData(List formDTO) { + 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(); + } + screenOrgRankDataDao.deleteOrgRankData(formDTO.get(NumConstant.ZERO).getCustomerId(), + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + screenOrgRankDataDao.batchInsertOrgRankData(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertGovernRankData(List formDTO) { + 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(); + } + screenGovernRankDataDao.deleteGovernRankData(formDTO.get(NumConstant.ZERO).getCustomerId(), + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + screenGovernRankDataDao.batchInsertGovernRankData(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertEventData(List formDTO) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + screenEventDataDao.deleteEventData(formDTO.get(i)); + } + + screenEventDataDao.batchInsertEventData(formDTO); + + for (int i = NumConstant.ZERO; i < formDTO.size(); i++) { + if (null != formDTO.get(i).getImgDataList() && formDTO.get(i).getImgDataList().size() > NumConstant.ZERO) { + // 根据原始事件ID,物理删除 - 事件数据图片数据 + screenEventImgDataDao.delEventImgDataByEventId(formDTO.get(i).getEventId()); + for (int j = NumConstant.ZERO; j < formDTO.get(i).getImgDataList().size(); j++){ + // 新增 中央区-事件数据图片数据 表 + ScreenEventImgDataEntity imgDataEntity = new ScreenEventImgDataEntity(); + imgDataEntity.setEventId(formDTO.get(i).getImgDataList().get(j).getEventId()); + imgDataEntity.setEventImgUrl(formDTO.get(i).getImgDataList().get(j).getImgUrl()); + imgDataEntity.setSort(formDTO.get(i).getImgDataList().get(j).getSort()); + screenEventImgDataDao.insert(imgDataEntity); + } + } + } + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertDifficultyData(List formDTO) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + screenDifficultyDataDao.deleteDifficultyData(formDTO.get(i)); + } + + screenDifficultyDataDao.batchInsertDifficultyData(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertCpcbaseData(List formDTO) { + 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(); + } + screenCpcBaseDataDao.deleteCpcBaseData(formDTO.get(NumConstant.ZERO).getCustomerId(), orgIds); + + screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertIndexData(List formDTO) { + 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(); + } + screenIndexDataDao.deleteIndexData(formDTO.get(NumConstant.ZERO).getCustomerId(), + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + screenIndexDataDao.batchInsertIndexData(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertCustomerDept(List formDTO) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] deptIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + deptIds[i] = formDTO.get(i).getDeptId(); + } + screenCustomerDeptDao.deleteCustomerDept(formDTO.get(NumConstant.ZERO).getCustomerId(), deptIds); + + screenCustomerDeptDao.batchInsertCustomerDept(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertCustomerGrid(List formDTO) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] gridIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + gridIds[i] = formDTO.get(i).getGridId(); + } + screenCustomerGridDao.deleteCustomerGrid(formDTO.get(NumConstant.ZERO).getCustomerId(), gridIds); + + screenCustomerGridDao.batchInsertCustomerGrid(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertCustomerAgency(List formDTO) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] agencyIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + agencyIds[i] = formDTO.get(i).getAgencyId(); + } + screenCustomerAgencyDao.deleteCustomerAgency(formDTO.get(NumConstant.ZERO).getCustomerId(), agencyIds); + + screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertVoluntaryActivityData(List formDTO) { + 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(); + } + screenVoluntaryActivityDataDao.deleteVoluntaryActivityData(formDTO.get(NumConstant.ZERO).getCustomerId(), + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + orgIds); + + screenVoluntaryActivityDataDao.batchInsertVoluntaryActivityData(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertUserTotalData(List formDTO) { + 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(); + } + screenUserTotalDataDao.deleteUserTotalData(formDTO.get(NumConstant.ZERO).getCustomerId(), + orgIds); + + screenUserTotalDataDao.batchInsertUserTotalData(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertUserJoin(List formDTO) { + 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(); + } + screenUserJoinDao.deleteUserJoin(formDTO.get(NumConstant.ZERO).getCustomerId(), + orgIds); + + screenUserJoinDao.batchInsertUserJoin(formDTO); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertPioneerData(List formDTO) { + 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(); + } + screenPioneerDataDao.deletePioneerData(formDTO.get(NumConstant.ZERO).getCustomerId(), + orgIds); + + screenPioneerDataDao.batchInsertPioneerData(formDTO); + } + return new Result(); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml index a44106f3f6..de6f379dc4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml @@ -3,6 +3,67 @@ + + delete from screen_cpc_base_data + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + + + insert into screen_cpc_base_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + REGISTER_USER_COUNT, + RESI_TOTAL, + PARTY_MEMBER_COUNT, + AGE_LEVEL_1, + AGE_LEVEL_2, + AGE_LEVEL_3, + AGE_LEVEL_4, + AGE_LEVEL_5, + AGE_LEVEL_6, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.registerUserCount}, + #{item.resiTotal}, - \ No newline at end of file + #{item.partyMemberCount}, + #{item.ageLevel1}, + #{item.ageLevel2}, + #{item.ageLevel3}, + #{item.ageLevel4}, + #{item.ageLevel5}, + #{item.ageLevel6}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index 9fea45f98a..c01c3dcc95 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -3,6 +3,59 @@ + + delete from screen_customer_agency + where CUSTOMER_ID = #{customerId} + AND AGENCY_ID IN + + #{item} + + + + insert into screen_customer_agency + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + AGENCY_NAME, + PID, + PIDS, + ALL_PARENT_NAMES, + AREA_MARKS, + CENTER_MARK, + PARTY_MARK, + `LEVEL`, + AREA_CODE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.agencyId}, + #{item.agencyName}, + #{item.pid}, + #{item.pids}, + #{item.allParentNames}, + #{item.areaMarks}, + #{item.centerMark}, + #{item.partyMark}, + #{item.level}, + #{item.areaCode}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml index 721653ca7f..267a118cd8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml @@ -3,6 +3,51 @@ + + delete from screen_customer_dept + where CUSTOMER_ID = #{customerId} + AND DEPT_ID IN + + #{item} + + + + insert into screen_customer_dept + ( + ID, + CUSTOMER_ID, + DEPT_ID, + DEPT_NAME, + PARENT_AGENCY_ID, + AREA_MARKS, + CENTER_MARK, + DEPT_MARK, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.deptId}, + #{item.deptName}, + #{item.parentAgencyId}, + #{item.areaMarks}, + #{item.centerMark}, + #{item.deptMark}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 66c30e3e32..5c96ed4ae8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -3,6 +3,51 @@ + + delete from screen_customer_grid + where CUSTOMER_ID = #{customerId} + AND GRID_ID IN + + #{item} + + + + insert into screen_customer_grid + ( + ID, + CUSTOMER_ID, + GRID_ID, + GRID_NAME, + PARENT_AGENCY_ID, + AREA_MARKS, + CENTER_MARK, + PARTY_MARK, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.gridId}, + #{item.gridName}, + #{item.parentAgencyId}, + #{item.areaMarks}, + #{item.centerMark}, + #{item.partyMark}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index 9beabee8b7..5ec18b6c7b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -3,6 +3,63 @@ + + delete from screen_difficulty_data + where CUSTOMER_ID = #{customerId} AND EVENT_ID = #{eventId} AND ORG_ID = #{orgId} + + + insert into screen_difficulty_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + EVENT_ID, + EVENT_IMG_URL, + EVENT_SOURCE, + EVENT_CONTENT, + EVENT_COST_TIME, + EVENT_RE_ORG, + EVENT_CATEGORY_CODE, + EVENT_CATEGORY_NAME, + EVENT_STATUS_CODE, + EVENT_STATUS_DESC, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.eventId}, + #{item.eventImgUrl}, + #{item.eventSource}, + #{item.eventContent}, + #{item.eventCostTime}, + #{item.eventReOrg}, + #{item.eventCategoryCode}, + #{item.eventCategoryName}, + #{item.eventStatusCode}, + #{item.eventStatusDesc}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml index a9c0339fa9..c861d869ed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -3,6 +3,67 @@ + + delete from screen_event_data + where CUSTOMER_ID = #{customerId} AND EVENT_ID = #{eventId} AND ORG_ID = #{orgId} + + + insert into screen_event_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + EVENT_ID, + EVENT_TITLE, + EVENT_CREATE_TIME, + LINK_MOBILE, + EVENT_CONTENT, + EVENT_IMG_URL, + EVENT_LEVEL, + EVENT_ADDRESS, + LONGITUDE, + LATITUDE, + LAST_PROCESS_DEPT, + LAST_PROCESS_DATE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.eventId}, + #{item.eventTitle}, + #{item.eventCreateTime}, + #{item.linkMobile}, + #{item.eventContent}, + #{item.eventImgUrl}, + #{item.eventLevel}, + #{item.eventAddress}, + #{item.longitude}, + #{item.latitude}, + #{item.lastProcessDept}, + #{item.lastProcessDate}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml index 473e3165fa..eaef413fd8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml @@ -3,5 +3,9 @@ + + delete from screen_event_img_data + where DEL_FLAG = '0' AND EVENT_ID = #{eventId} + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml index 99af58be38..48d98970ce 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml @@ -3,6 +3,63 @@ + + delete from screen_govern_rank_data + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + + + insert into screen_govern_rank_data + ( + ID, + CUSTOMER_ID, + YEAR_ID, + MONTH_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, - \ No newline at end of file + RESPONSE_RATIO, + RESOLVED_RATIO, + GOVERN_RATIO, + SATISFACTION_RATIO, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.yearId}, + #{item.monthId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + + #{item.responseRatio}, + #{item.resolvedRatio}, + #{item.governRatio}, + #{item.satisfactionRatio}, + + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml index 35275e613d..045bf7926e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml @@ -3,6 +3,60 @@ + + delete from screen_index_data + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + + + insert into screen_index_data + ( + ID, + CUSTOMER_ID, + YEAR_ID, + MONTH_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + INDEX_TOTAL, + PARTY_DEV_ABLITY, + SERVICE_ABLITY, + GOVERN_ABLITY, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.yearId}, + #{item.monthId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, - \ No newline at end of file + #{item.indexTotal}, + #{item.partyDevAblity}, + #{item.serviceAblity}, + #{item.governAblity}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml index 60c597c6ac..be2ff1fb67 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -3,6 +3,65 @@ + + delete from screen_org_rank_data + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + + + insert into screen_org_rank_data + ( + ID, + CUSTOMER_ID, + YEAR_ID, + MONTH_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + PARTY_TOTAL, + GROUP_TOTAL, + TOPIC_TOTAL, + ISSUE_TOTAL, + PROJECT_TOTAL, + CLOSE_PROJECT_RATIO, + SATISFACTION_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.yearId}, + #{item.monthId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.partyTotal}, + #{item.groupTotal}, + #{item.topicTotal}, + #{item.issueTotal}, + #{item.projectTotal}, + #{item.closeProjectRatio}, + #{item.satisfactionRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml index 891493b386..c7cf37d027 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml @@ -3,6 +3,60 @@ + + delete from screen_party_branch_data + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + - - \ No newline at end of file + + insert into screen_party_branch_data + ( + ID, + CUSTOMER_ID, + YEAR_ID, + MONTH_ID, + `TYPE`, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + ISSUE_CATEGORY_ID, + ISSUE_CATEGORY_NAME, + ORGANIZE_COUNT, + JOIN_USER_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.yearId}, + #{item.monthId}, + #{item.type}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.issueCategoryId}, + #{item.issueCategoryName}, + #{item.organizeCount}, + #{item.joinUserCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml index 48164dfcf2..b5f7770bfd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml @@ -3,5 +3,51 @@ + + delete from screen_party_link_masses_data + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + - \ No newline at end of file + + insert into screen_party_link_masses_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + CREATE_GROUP_TOTAL, + GROUP_USER_TOTAL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.createGroupTotal}, + #{item.groupUserTotal}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 89abfabab4..74e3377d18 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -3,6 +3,59 @@ + + delete from screen_party_user_rank_data + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + + + insert into screen_party_user_rank_data + ( + ID, + CUSTOMER_ID, + YEAR_ID, + MONTH_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + USER_TYPE, + USER_ID, + USER_NAME, + POINT_TOTAL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.yearId}, + #{item.monthId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.userType}, + #{item.userId}, + #{item.userName}, + #{item.pointTotal}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml index 0fe5e969e3..c31c51fe78 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml @@ -3,6 +3,57 @@ + + delete from screen_pioneer_data + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + + + insert into screen_pioneer_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + USER_TOTAL, + ISSUE_TOTAL, + TOPIC_TOTAL, + SHIFT_PROJECT_TOTAL, + RESOLVED_PROJECT_TOTAL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.userTotal}, + #{item.issueTotal}, + #{item.topicTotal}, + #{item.shiftProjectTotal}, + #{item.resolvedProjectTotal}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml index 68b3c4133f..3e5acce57a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -3,6 +3,59 @@ + + delete from screen_user_join + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + + + insert into screen_user_join + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + JOIN_TOTAL, + JOIN_TOTAL_UP_RATE, + AVG_ISSUE, + AVG_ISSUE_UP_RATE, + AVG_JOIN, + AGVG_JOIN_UP_RATE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.joinTotal}, + #{item.joinTotalUpRate}, + #{item.avgIssue}, + #{item.avgIssueUpRate}, + #{item.avgJoin}, + #{item.avgJoinUpRate}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + 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 0bf7ed23aa..51257d5837 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 @@ -3,6 +3,59 @@ + + delete from screen_user_total_data + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + + + insert into screen_user_total_data + ( + ID, + CUSTOMER_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + USER_TOTAL, + PARTY_TOTAL, + GROUP_TOTAL, + TOPIC_TOTAL, + ISSUE_TOTAL, + PROJECT_TOTAL, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.userTotal}, + #{item.partyTotal}, + #{item.groupTotal}, + #{item.topicTotal}, + #{item.issueTotal}, + #{item.projectTotal}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml index 416026256a..dc2c2585a6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml @@ -3,6 +3,55 @@ + + delete from screen_voluntary_activity_data + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} + AND ORG_ID IN + + #{item} + + + + insert into screen_voluntary_activity_data + ( + ID, + CUSTOMER_ID, + YEAR_ID, + MONTH_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + ACTIVETY_COUNT, + JOIN_USER_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.yearId}, + #{item.monthId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, + #{item.activetyCount}, + #{item.joinUserCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + - \ No newline at end of file + From c900ba7912c2cec626cdaf0e47634c5ec4df281c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 19 Aug 2020 11:21:22 +0800 Subject: [PATCH 015/360] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E3=80=81?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/result/BranchResultDTO.java | 17 +++---- .../ParymemberDistributionResultDTO.java | 12 ++--- .../dto/result/ParymemberResultDTO.java | 18 +++++-- .../screen/dto/result/UserResultDTO.java | 12 +++++ .../controller/screen/AgencyController.java | 7 ++- .../screen/DistributionController.java | 6 ++- .../dao/screen/ScreenCustomerAgencyDao.java | 20 ++++++-- .../dao/screen/ScreenCustomerGridDao.java | 27 ++++++++++ .../service/screen/AgencyService.java | 3 +- .../service/screen/DistributionService.java | 4 +- .../screen/impl/AgencyServiceImpl.java | 9 ++-- .../screen/impl/DistributionServiceImpl.java | 51 ++++++++++++++++--- .../mapper/screen/ScreenCustomerAgencyDao.xml | 36 +++++++++++++ .../mapper/screen/ScreenCustomerGridDao.xml | 49 ++++++++++++++++++ 14 files changed, 232 insertions(+), 39 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java index a41d5111b0..0a836a6bfd 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java @@ -14,22 +14,17 @@ public class BranchResultDTO implements Serializable { private static final long serialVersionUID = -8001714892170166320L; /** - * 名称:根据当前所在组织,查询出的子级名称 + * 网格ID */ - private String name; + private String gridId; /** - * 可能是agencyId,也可以是gridId, 也可以是deptId + * 网格名称 */ - private String id; + private String gridName; /** - * 组织:agency 网格:grid 部门:dept + * 党支部(网格)位置 */ - private String type; - - /** - * 中心点位 - */ - private String centerMark; + private String partyMark; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java index e663986791..397b53287b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java @@ -16,31 +16,31 @@ public class ParymemberDistributionResultDTO implements Serializable { /** * 可能是gridId,可能是agencyId */ - private String subId; + private String subId = ""; /** * 中心点位 */ - private String centerMark; + private String centerMark = ""; /** * 党员总人数 */ - private Integer totalNum; + private Integer totalNum = 0; /** * 坐标区域 */ - private String areaMarks; + private String areaMarks = ""; /** * 可以是网格的名称,可以是组织的名称 */ - private String subName; + private String subName= ""; /** * 组织:agency, 网格 : grid; */ - private String type; + private String type = ""; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java index 432d81f2ed..b655f5fad5 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.screen.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -17,17 +18,28 @@ public class ParymemberResultDTO implements Serializable { /** * 当前所选组织 */ - private String agencyId; + private String agencyId = ""; /** * 当前所选组织名称 */ - private String name; + private String name = ""; /** * 当前所选组织的坐标区域 */ - private String areaMarks; + private String areaMarks = ""; + + /** + * 机关级别 + * 社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级:province + */ + @JsonIgnore + private String level; /** * 子级用户分布 diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java index ea13de5f0c..102faca70d 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.screen.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -29,6 +30,17 @@ public class UserResultDTO implements Serializable { */ private String areaMarks; + /** + * 机关级别 + * 社区级:community, + * 乡(镇、街道)级:street, + * 区县级: district, + * 市级: city + * 省级:province + */ + @JsonIgnore + private String level; + /** * 子级用户分布 */ 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 c37a2ad225..d4bbc8f160 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,5 +1,7 @@ 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; @@ -35,9 +37,10 @@ public class AgencyController { * @author zxc * @date 2020/8/18 2:04 下午 */ + @ExternalAppRequestAuth @PostMapping("tree") - public Result tree(){ - return new Result().ok(agencyService.tree()); + public Result tree(ExternalAppRequestParam externalAppRequestParam){ + return new Result().ok(agencyService.tree(externalAppRequestParam)); } /** 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 c9b946f620..a85fe05054 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 @@ -15,6 +15,8 @@ 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; + /** * 中央区相关各指标查询 * @@ -35,9 +37,9 @@ public class DistributionController { * @date 2020/8/18 10:59 上午 */ @PostMapping("branch") - public Result branch(@RequestBody BranchFormDTO formDTO){ + public Result> branch(@RequestBody BranchFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, BranchFormDTO.Branch.class); - return new Result().ok(distributionService.branch(formDTO)); + return new Result>().ok(distributionService.branch(formDTO)); } /** 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/screen/ScreenCustomerAgencyDao.java index dc08b40c34..c97ac8b8e0 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/screen/ScreenCustomerAgencyDao.java @@ -17,9 +17,7 @@ package com.epmet.datareport.dao.screen; -import com.epmet.screen.dto.result.AgencyDistributionResultDTO; -import com.epmet.screen.dto.result.CompartmentResultDTO; -import com.epmet.screen.dto.result.TreeResultDTO; +import com.epmet.screen.dto.result.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -66,4 +64,20 @@ public interface ScreenCustomerAgencyDao { */ List selectSubDistribution(@Param("agencyId")String agencyId); + /** + * @Description 查询子级用户分布【机关级别】 + * @param parentId + * @author zxc + * @date 2020/8/19 9:33 上午 + */ + List selectUserDistributionAgency(@Param("parentId")String parentId); + + /** + * @Description 查询子级党员分布【机关级别】 + * @param parentId + * @author zxc + * @date 2020/8/19 10:30 上午 + */ + List selectParymemberDistribution(@Param("parentId")String parentId); + } \ No newline at end of file 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/screen/ScreenCustomerGridDao.java index 5f33641d71..9dff41e9ff 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/screen/ScreenCustomerGridDao.java @@ -18,6 +18,9 @@ package com.epmet.datareport.dao.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 org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -39,5 +42,29 @@ public interface ScreenCustomerGridDao { * @date 2020/8/18 5:12 下午 */ List selectSubDistribution(@Param("agencyId")String agencyId); + + /** + * @Description 查询党支部信息 + * @param agencyId + * @author zxc + * @date 2020/8/19 9:13 上午 + */ + List selectBranch(@Param("agencyId")String agencyId); + + /** + * @Description 查询子级用户分布【网格级别】 + * @param parentId + * @author zxc + * @date 2020/8/19 9:33 上午 + */ + List selectUserDistribution(@Param("parentId")String parentId); + + /** + * @Description 查询子级党员分布【网格级别】 + * @param parentId + * @author zxc + * @date 2020/8/19 10:30 上午 + */ + List selectParymemberDistribution(@Param("parentId")String parentId); } \ 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/screen/AgencyService.java index 5b7a48177a..d3eee4f133 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/screen/AgencyService.java @@ -1,5 +1,6 @@ package com.epmet.datareport.service.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; @@ -21,7 +22,7 @@ public interface AgencyService { * @author zxc * @date 2020/8/18 2:04 下午 */ - TreeResultDTO tree(); + TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam); /** * @Description 2、组织区域查询 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/screen/DistributionService.java index c98ad3b6c0..02471cdf22 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/screen/DistributionService.java @@ -7,6 +7,8 @@ import com.epmet.screen.dto.result.BranchResultDTO; import com.epmet.screen.dto.result.ParymemberResultDTO; import com.epmet.screen.dto.result.UserResultDTO; +import java.util.List; + /** * 中央区相关各指标查询 * @@ -21,7 +23,7 @@ public interface DistributionService { * @author zxc * @date 2020/8/18 10:59 上午 */ - BranchResultDTO branch(BranchFormDTO formDTO); + List branch(BranchFormDTO formDTO); /** * @Description 2、用户分布 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 65682d4441..3512ed5324 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 @@ -1,5 +1,6 @@ package com.epmet.datareport.service.screen.impl; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; import com.epmet.datareport.dao.screen.ScreenCustomerGridDao; @@ -35,10 +36,9 @@ public class AgencyServiceImpl implements AgencyService { * @date 2020/8/18 2:04 下午 */ @Override - public TreeResultDTO tree() { + public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) { // 1. 查询客户根组织ID - // TODO 改成正式注解获取customerId - String customerId = "zxc"; + String customerId = externalAppRequestParam.getCustomerId(); TreeResultDTO rootAgency = screenCustomerAgencyDao.selectRootAgencyId(customerId); if (null == rootAgency){ return new TreeResultDTO(); @@ -74,6 +74,9 @@ public class AgencyServiceImpl implements AgencyService { @Override public CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO) { CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(compartmentFormDTO.getAgencyId()); + if (null == agencyAreaInfo){ + return agencyAreaInfo; + } if (agencyAreaInfo.getLevel().equals(ScreenConstant.COMMUNITY)){ // 当level为"community"时,查询screen_customer_grid表 List agencyDistributionResultDTOS = screenCustomerGridDao.selectSubDistribution(compartmentFormDTO.getAgencyId()); 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/screen/impl/DistributionServiceImpl.java index c83c82aff7..1c6356d550 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/screen/impl/DistributionServiceImpl.java @@ -1,14 +1,19 @@ package com.epmet.datareport.service.screen.impl; +import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; +import com.epmet.datareport.dao.screen.ScreenCustomerGridDao; import com.epmet.screen.dto.form.BranchFormDTO; import com.epmet.screen.dto.form.ParymemberFormDTO; import com.epmet.screen.dto.form.UserFormDTO; -import com.epmet.screen.dto.result.BranchResultDTO; -import com.epmet.screen.dto.result.ParymemberResultDTO; -import com.epmet.screen.dto.result.UserResultDTO; +import com.epmet.screen.dto.result.*; +import com.epmet.screen.constant.*; import com.epmet.datareport.service.screen.DistributionService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * 中央区相关各指标查询 * @@ -18,6 +23,11 @@ import org.springframework.stereotype.Service; @Service public class DistributionServiceImpl implements DistributionService { + @Autowired + private ScreenCustomerGridDao screenCustomerGridDao; + @Autowired + private ScreenCustomerAgencyDao screenCustomerAgencyDao; + /** * @Description 1、党支部 * @param formDTO @@ -25,8 +35,9 @@ public class DistributionServiceImpl implements DistributionService { * @date 2020/8/18 10:59 上午 */ @Override - public BranchResultDTO branch(BranchFormDTO formDTO) { - return null; + public List branch(BranchFormDTO formDTO) { + List branchResultDTOS = screenCustomerGridDao.selectBranch(formDTO.getAgencyId()); + return branchResultDTOS; } /** @@ -37,7 +48,20 @@ public class DistributionServiceImpl implements DistributionService { */ @Override public UserResultDTO user(UserFormDTO userFormDTO) { - return null; + UserResultDTO userResult = new UserResultDTO(); + CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(userFormDTO.getAgencyId()); + if (null == agencyAreaInfo){ + return userResult; + } + BeanUtils.copyProperties(agencyAreaInfo,userResult); + if (userResult.getLevel().equals(ScreenConstant.COMMUNITY)){ + List userDistributionResultDTOS = screenCustomerGridDao.selectUserDistribution(userFormDTO.getAgencyId()); + userResult.setUserDistribution(userDistributionResultDTOS); + }else { + List userDistributionResultDTOS = screenCustomerAgencyDao.selectUserDistributionAgency(userFormDTO.getAgencyId()); + userResult.setUserDistribution(userDistributionResultDTOS); + } + return userResult; } /** @@ -48,6 +72,19 @@ public class DistributionServiceImpl implements DistributionService { */ @Override public ParymemberResultDTO parymember(ParymemberFormDTO parymemberFormDTO) { - return null; + ParymemberResultDTO parymemberResult = new ParymemberResultDTO(); + CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(parymemberFormDTO.getAgencyId()); + if (null == agencyAreaInfo){ + return parymemberResult; + } + BeanUtils.copyProperties(agencyAreaInfo,parymemberResult); + if (parymemberResult.getLevel().equals(ScreenConstant.COMMUNITY)){ + List parymemberDistributionResultDTOS = screenCustomerGridDao.selectParymemberDistribution(parymemberFormDTO.getAgencyId()); + parymemberResult.setUserDistribution(parymemberDistributionResultDTOS); + }else { + List parymemberDistributionResultDTOS = screenCustomerAgencyDao.selectParymemberDistribution(parymemberFormDTO.getAgencyId()); + parymemberResult.setUserDistribution(parymemberDistributionResultDTOS); + } + return parymemberResult; } } 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 b92fc4e8c6..cfdb8da6de 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 @@ -61,4 +61,40 @@ AND pid = #{agencyId} + + + + + + \ No newline at end of file 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 df1a2fbe44..988e0b17cd 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 @@ -17,4 +17,53 @@ del_flag = 0 AND parent_agency_id = #{agencyId} + + + + + + + + + \ No newline at end of file From 38fdaefefbfb7fdfc0609db817978082d92f50b9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Aug 2020 11:39:38 +0800 Subject: [PATCH 016/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9screen=5Fparty=5Fbran?= =?UTF-8?q?ch=5Fdata=E8=A1=A8=EF=BC=8C=E6=96=B0=E5=A2=9EaverageJoinUserCou?= =?UTF-8?q?nt=EF=BC=8C=E4=BF=AE=E6=94=B9meetCategoryId=EF=BC=88issueCatego?= =?UTF-8?q?ryId=EF=BC=89,meetCategoryName(issueCategoryName)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenPartyBranchDataEntity.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java index 95420d51a7..cdd5c6ef0e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java @@ -26,7 +26,7 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 基层党建-建设情况数据(支部,联建) + * 基层党建-建设情况数据(支部,联建,志愿服务) * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-18 @@ -79,14 +79,14 @@ public class ScreenPartyBranchDataEntity extends BaseEpmetEntity { private String orgName; /** - * 议题分类Id + * 会议分类Id */ - private String issueCategoryId; + private String meetCategoryId; /** - * 议题分类名称 + * 会议分类名称 */ - private String issueCategoryName; + private String meetCategoryName; /** * 组织次数 @@ -98,4 +98,9 @@ public class ScreenPartyBranchDataEntity extends BaseEpmetEntity { */ private Integer joinUserCount; + /** + * 平均参加人数 + */ + private Integer averageJoinUserCount; + } From a1178dfd517474bf241bdd300f60a93cdd75ec73 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Aug 2020 12:40:34 +0800 Subject: [PATCH 017/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9screen=5Fuser=5Fjoin?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScreenVoluntaryActivityDataDao.java | 31 -------------- .../screen/ScreenVoluntaryActivityDataDao.xml | 8 ---- .../screen/ScreenPartyBranchDataEntity.java | 2 +- .../entity/screen/ScreenUserJoinEntity.java | 40 +++++++++---------- 4 files changed, 19 insertions(+), 62 deletions(-) delete mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenVoluntaryActivityDataDao.java delete mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenVoluntaryActivityDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenVoluntaryActivityDataDao.java deleted file mode 100644 index b4433d9b1d..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenVoluntaryActivityDataDao.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.datareport.dao.screen; - -import org.apache.ibatis.annotations.Mapper; - -/** - * 党建引领-志愿活动服务数据 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 - */ -@Mapper -public interface ScreenVoluntaryActivityDataDao{ - -} \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml deleted file mode 100644 index f65cb61870..0000000000 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java index cdd5c6ef0e..8717291a31 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java @@ -54,7 +54,7 @@ public class ScreenPartyBranchDataEntity extends BaseEpmetEntity { private String monthId; /** - * 数据类别 party:支部建设;union:联合建设 + * 数据类别 party:支部建设;union:联合建设党员志愿服务:voluntaryservice */ private String type; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java index 4da0ff5d4b..d7ff0d4860 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java @@ -44,6 +44,16 @@ public class ScreenUserJoinEntity extends BaseEpmetEntity { */ private String customerId; + /** + * 年Id + */ + private String yearId; + + /** + * 月份Id + */ + private String monthId; + /** * 组织类别 agency:组织;部门:department;网格:grid */ @@ -65,33 +75,19 @@ public class ScreenUserJoinEntity extends BaseEpmetEntity { private String orgName; /** - * 总的参与次数 - */ - private Integer joinTotal; - - /** - * 总的参与次数较上月增长率 - */ - private BigDecimal joinTotalUpRate; - - /** - * 人均议题 + * 组织次数 */ - private Integer avgIssue; + private Integer organizeTotal; - /** - * 人均议题较上月增长率 - */ - private BigDecimal avgIssueUpRate; + /** + * 参与次数 + */ + private Integer joinTotal; /** - * 平均参与度 + * 平均参与人数 */ - private Integer avgJoin; + private Integer avgJoinUser; - /** - * 平均参与度较上月增长率 - */ - private BigDecimal agvgJoinUpRate; } From 29f6b0e24e516a4dcb4ad35491aa3eaeb0f409dc Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Aug 2020 13:29:20 +0800 Subject: [PATCH 018/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9partyuserrankdata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/screencoll/form/PartyUserRankDataFormDTO.java | 5 ----- .../data-statistical/data-statistical-server/pom.xml | 6 ++++++ .../java/com/epmet/controller/ScreenCollController.java | 8 ++++++-- .../com/epmet/dao/screen/ScreenPartyUserRankDataDao.java | 2 +- .../java/com/epmet/service/screen/ScreenCollService.java | 2 +- .../epmet/service/screen/impl/ScreenCollServiceImpl.java | 7 +++---- .../mapper/screen/ScreenPartyUserRankDataDao.xml | 4 ++-- 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java index 6267736f51..b4e3884dae 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java @@ -14,11 +14,6 @@ public class PartyUserRankDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 年Id :yyyy */ diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 0dfdd97d91..cf116c4fb7 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -68,6 +68,12 @@ 2.0.0 compile + + com.epmet + epmet-commons-extapp-auth + 2.0.0 + compile + 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 0052006dff..248bf39931 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 @@ -1,5 +1,7 @@ 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.screencoll.form.*; import com.epmet.service.screen.ScreenCollService; @@ -32,9 +34,11 @@ public class ScreenCollController { * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("partyuserrankdata") - public Result partyUserRankData(@RequestBody List formDTO) { - return screenCollService.insertPartyUserRankData(formDTO); + public Result partyUserRankData(ExternalAppRequestParam externalAppRequestParam,@RequestBody List formDTO) { + screenCollService.insertPartyUserRankData(formDTO,externalAppRequestParam.getCustomerId()); + return new Result(); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java index c0ab9db8c1..de25a82b88 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java @@ -58,5 +58,5 @@ public interface ScreenPartyUserRankDataDao extends BaseDao list); + void batchInsertPartyUserRankData(@Param("list") List list,@Param("customerId")String customerId); } 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 1c6c212588..dfd49c1e5c 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 @@ -17,7 +17,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertPartyUserRankData(List formDTO); + void insertPartyUserRankData(List formDTO,String customerId); /** * 8、党建引领-党员联系群众数据 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 922de2f876..00dbd2a516 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 @@ -75,20 +75,19 @@ public class ScreenCollServiceImpl implements ScreenCollService { @Override @Transactional(rollbackFor = Exception.class) - public Result insertPartyUserRankData(List formDTO) { + public void insertPartyUserRankData(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(); } - screenPartyUserRankDataDao.deletePartyUserRankData(formDTO.get(NumConstant.ZERO).getCustomerId(), + screenPartyUserRankDataDao.deletePartyUserRankData(customerId, formDTO.get(NumConstant.ZERO).getYearId(), formDTO.get(NumConstant.ZERO).getMonthId(), orgIds); - screenPartyUserRankDataDao.batchInsertPartyUserRankData(formDTO); + screenPartyUserRankDataDao.batchInsertPartyUserRankData(formDTO,customerId); } - return new Result(); } @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 74e3377d18..1de992bd4d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -12,7 +12,7 @@ - + insert into screen_party_user_rank_data ( ID, @@ -37,7 +37,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.yearId}, #{item.monthId}, #{item.orgType}, From 79bf69cfb859485b3b9454656c42e071d5c8c86d Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 19 Aug 2020 13:37:44 +0800 Subject: [PATCH 019/360] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E5=BC=95=E9=A2=86-?= =?UTF-8?q?=E5=BF=97=E6=84=BF=E6=B4=BB=E5=8A=A8=E6=9C=8D=E5=8A=A1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=20=E6=8E=A5=E5=8F=A3=E5=88=A0=E9=99=A4=EF=BC=88?= =?UTF-8?q?=E8=A1=A8=E5=BA=9F=E5=BC=83=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/VoluntaryActivityDataFormDTO.java | 61 ------------- .../controller/ScreenCollController.java | 13 --- .../ScreenVoluntaryActivityDataDao.java | 62 ------------- .../ScreenVoluntaryActivityDataEntity.java | 86 ------------------- .../service/screen/ScreenCollService.java | 12 --- .../screen/impl/ScreenCollServiceImpl.java | 20 ----- .../screen/ScreenVoluntaryActivityDataDao.xml | 57 ------------ 7 files changed, 311 deletions(-) delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java deleted file mode 100644 index 6746a60303..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/VoluntaryActivityDataFormDTO.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.epmet.dto.screencoll.form; - -import lombok.Data; - -import java.io.Serializable; - -/** - * 13、党建引领-志愿活动服务数据 入参 - * @Auther: zhangyong - * @Date: 2020-08-18 09:59 - */ -@Data -public class VoluntaryActivityDataFormDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 客户id - */ - private String customerId; - - /** - * yyyy - */ - private String yearId; - - /** - * yyyyMM - */ - private String monthId; - - /** - * 组织类别 agency:组织;部门:department;网格:grid - */ - private String orgType; - - /** - * 组织Id 可以为网格,机关id - */ - private String orgId; - - /** - * 上级组织Id - */ - private String parentId; - - /** - * 组织名称 - */ - private String orgName; - - /** - * 组织活动次数 - */ - private Integer activetyCount; - - /** - * 活动参与人数 - */ - private Integer joinUserCount; -} 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 248bf39931..78230dd581 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 @@ -186,19 +186,6 @@ public class ScreenCollController { return screenCollService.insertCustomerAgency(formDTO); } - /** - * 13、党建引领-志愿活动服务数据 - * - * @param formDTO - * @return com.epmet.commons.tools.utils.Result - * @Author zhangyong - * @Date 10:52 2020-08-18 - **/ - @PostMapping("voluntaryactivitydata") - public Result voluntaryActivityData(@RequestBody List formDTO) { - return screenCollService.insertVoluntaryActivityData(formDTO); - } - /** * 12、中央区各类总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java deleted file mode 100644 index 13357e03c2..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenVoluntaryActivityDataDao.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dao.screen; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.screencoll.form.VoluntaryActivityDataFormDTO; -import com.epmet.entity.screen.ScreenVoluntaryActivityDataEntity; -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-18 - */ -@Mapper -public interface ScreenVoluntaryActivityDataDao extends BaseDao { - - /** - * 13、党建引领-志愿活动服务数据 - * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 - * - * @param customerId - * @param yearId - * @param monthId - * @param orgIds 组织Id集合 - * @Author zhangyong - * @Date 10:52 2020-08-18 - **/ - void deleteVoluntaryActivityData(@Param("customerId") String customerId, - @Param("yearId") String yearId, - @Param("monthId") String monthId, - @Param("orgIds") String[] orgIds); - - /** - * 13、党建引领-志愿活动服务数据 - * 2) 在批量新增 - * - * @param list - * @Author zhangyong - * @Date 10:52 2020-08-18 - **/ - void batchInsertVoluntaryActivityData(@Param("list") List list); -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java deleted file mode 100644 index cd11e5b43a..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenVoluntaryActivityDataEntity.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.entity.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-18 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("screen_voluntary_activity_data") -public class ScreenVoluntaryActivityDataEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 客户Id - */ - private String customerId; - - /** - * 年Id - */ - private String yearId; - - /** - * 月份Id - */ - private String monthId; - - /** - * 组织类别 agency:组织;部门:department;网格:grid - */ - private String orgType; - - /** - * 组织Id 可以为网格,机关id - */ - private String orgId; - - /** - * 上级组织Id - */ - private String parentId; - - /** - * 组织名称 - */ - private String orgName; - - /** - * 组织活动次数 - */ - private Integer activetyCount; - - /** - * 活动参与人数 - */ - private Integer joinUserCount; - -} 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 dfd49c1e5c..7fbddb072f 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 @@ -151,18 +151,6 @@ public interface ScreenCollService { **/ Result insertCustomerAgency(List formDTO); - /** - * 13、党建引领-志愿活动服务数据 - * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 - * 2) 在新增 - * - * @param formDTO - * @return com.epmet.commons.tools.utils.Result - * @Author zhangyong - * @Date 10:52 2020-08-18 - **/ - Result insertVoluntaryActivityData(List formDTO); - /** * 12、中央区各类总数 * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 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 00dbd2a516..339fa96305 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 @@ -65,8 +65,6 @@ public class ScreenCollServiceImpl implements ScreenCollService { @Autowired private ScreenCustomerAgencyDao screenCustomerAgencyDao; @Autowired - private ScreenVoluntaryActivityDataDao screenVoluntaryActivityDataDao; - @Autowired private ScreenUserTotalDataDao screenUserTotalDataDao; @Autowired private ScreenUserJoinDao screenUserJoinDao; @@ -277,24 +275,6 @@ public class ScreenCollServiceImpl implements ScreenCollService { return new Result(); } - @Override - @Transactional(rollbackFor = Exception.class) - public Result insertVoluntaryActivityData(List formDTO) { - 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(); - } - screenVoluntaryActivityDataDao.deleteVoluntaryActivityData(formDTO.get(NumConstant.ZERO).getCustomerId(), - formDTO.get(NumConstant.ZERO).getYearId(), - formDTO.get(NumConstant.ZERO).getMonthId(), - orgIds); - - screenVoluntaryActivityDataDao.batchInsertVoluntaryActivityData(formDTO); - } - return new Result(); - } - @Override @Transactional(rollbackFor = Exception.class) public Result insertUserTotalData(List formDTO) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml deleted file mode 100644 index dc2c2585a6..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenVoluntaryActivityDataDao.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - delete from screen_voluntary_activity_data - where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} - AND ORG_ID IN - - #{item} - - - - - insert into screen_voluntary_activity_data - ( - ID, - CUSTOMER_ID, - YEAR_ID, - MONTH_ID, - ORG_TYPE, - ORG_ID, - PARENT_ID, - ORG_NAME, - ACTIVETY_COUNT, - JOIN_USER_COUNT, - DEL_FLAG, - REVISION, - CREATED_BY, - CREATED_TIME, - UPDATED_BY, - UPDATED_TIME - ) values - - ( - (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, - #{item.yearId}, - #{item.monthId}, - #{item.orgType}, - #{item.orgId}, - #{item.parentId}, - #{item.orgName}, - #{item.activetyCount}, - #{item.joinUserCount}, - 0, - 0, - 'APP_USER', - now(), - 'APP_USER', - now() - ) - - - - From 8f8df6abb84e2b82667da37c7c9a8b9bc56282ae Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Aug 2020 13:38:55 +0800 Subject: [PATCH 020/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/entity/screen/ScreenEventDataEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java index 15f6503950..2dd7603939 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java @@ -95,7 +95,7 @@ public class ScreenEventDataEntity extends BaseEpmetEntity { private String eventImgUrl; /** - * 事件待处理级别 red:红;yellow:黄 + * 事件待处理级别 red:红;yellow:黄;绿色:green */ private String eventLevel; From 3b6b6ccdc038c2b4b8ae8c7964d09d291fa53662 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Aug 2020 13:51:20 +0800 Subject: [PATCH 021/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9screen=5Fevent=5Fdata?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/entity/screen/ScreenDifficultyDataEntity.java | 2 +- .../com/epmet/entity/screen/ScreenEventDataEntity.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java index fa3b352711..76af0410c0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java @@ -104,7 +104,7 @@ public class ScreenDifficultyDataEntity extends BaseEpmetEntity { private String eventCategoryName; /** - * 事件状态编码 + * 事件状态key */ private String eventStatusCode; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java index 2dd7603939..9e605802f3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java @@ -124,4 +124,13 @@ public class ScreenEventDataEntity extends BaseEpmetEntity { */ private Date lastProcessDate; + /** + * 事件状态key + */ + private String eventStatusCode; + + /** + * 事件状态描述 + */ + private String eventStatusDesc; } From d8dbc5201692b9bdc107682ca05afdd0e371cc3d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 19 Aug 2020 14:36:52 +0800 Subject: [PATCH 022/360] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E3=80=81=E5=85=9A?= =?UTF-8?q?=E5=91=98=E5=88=86=E5=B8=83=E3=80=81top=E5=8C=BA=E6=A6=82?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/screen/dto/form/ProjectFormDTO.java | 24 ++++++++++ .../screen/dto/form/TopProfileFormDTO.java | 24 ++++++++++ .../screen/dto/result/BranchResultDTO.java | 6 +-- .../screen/dto/result/ProjectResultDTO.java | 45 +++++++++++++++++++ .../dto/result/TopProfileResultDTO.java | 45 +++++++++++++++++++ .../controller/screen/AgencyController.java | 1 + .../screen/DistributionController.java | 38 +++++++++++++--- .../dao/screen/ScreenEventDataDao.java | 14 +++++- .../dao/screen/ScreenUserTotalDataDao.java | 9 ++++ .../service/screen/DistributionService.java | 24 +++++++--- .../screen/impl/DistributionServiceImpl.java | 42 +++++++++++++++-- .../mapper/screen/ScreenEventDataDao.xml | 17 ++++++- .../mapper/screen/ScreenUserTotalDataDao.xml | 17 +++++++ 13 files changed, 285 insertions(+), 21 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java new file mode 100644 index 0000000000..445cefc453 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 1:25 下午 + */ +@Data +public class ProjectFormDTO implements Serializable { + + private static final long serialVersionUID = 7114390205886348751L; + + public interface Project{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {Project.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java new file mode 100644 index 0000000000..6b0d00dae1 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 1:43 下午 + */ +@Data +public class TopProfileFormDTO implements Serializable { + + private static final long serialVersionUID = -287352242311433250L; + + public interface TopProfile{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {TopProfile.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java index 0a836a6bfd..f4a611cc10 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java @@ -16,15 +16,15 @@ public class BranchResultDTO implements Serializable { /** * 网格ID */ - private String gridId; + private String gridId = ""; /** * 网格名称 */ - private String gridName; + private String gridName = ""; /** * 党支部(网格)位置 */ - private String partyMark; + private String partyMark = ""; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java new file mode 100644 index 0000000000..7a0a016b25 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java @@ -0,0 +1,45 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 1:27 下午 + */ +@Data +public class ProjectResultDTO implements Serializable { + + private static final long serialVersionUID = 7130615407473171093L; + + /** + * 项目标题 + */ + private String projectTitle = ""; + + /** + * red, green,yellow + */ + private String color = ""; + + /** + * 项目id + */ + private String projectId = ""; + + /** + * 网格名称 + */ + private String orgName = ""; + + /** + * 经度 + */ + private Double longitude = 0.0; + + /** + * 纬度 + */ + private Double latitude = 0.0; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java new file mode 100644 index 0000000000..607891f5bf --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java @@ -0,0 +1,45 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 1:46 下午 + */ +@Data +public class TopProfileResultDTO implements Serializable { + + private static final long serialVersionUID = -5081563117620857359L; + + /** + * 用户总数 + */ + private Integer userNum = 0; + + /** + * 党员总数 + */ + private Integer partyMemberNum = 0; + + /** + * 党群总数 + */ + private Integer groupNum = 0; + + /** + * 话题总数 + */ + private Integer topicNum = 0; + + /** + * 议题总数 + */ + private Integer issueNum = 0; + + /** + * 项目总数 + */ + private Integer projectNum = 0; +} 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 d4bbc8f160..d671c4cd05 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 @@ -49,6 +49,7 @@ public class AgencyController { * @author zxc * @date 2020/8/18 2:33 下午 */ + @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 a85fe05054..648d1e088b 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,13 +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.BranchFormDTO; -import com.epmet.screen.dto.form.ParymemberFormDTO; -import com.epmet.screen.dto.form.UserFormDTO; -import com.epmet.screen.dto.result.BranchResultDTO; -import com.epmet.screen.dto.result.ParymemberResultDTO; -import com.epmet.screen.dto.result.UserResultDTO; +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; @@ -36,6 +33,7 @@ public class DistributionController { * @author zxc * @date 2020/8/18 10:59 上午 */ + @ExternalAppRequestAuth @PostMapping("branch") public Result> branch(@RequestBody BranchFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, BranchFormDTO.Branch.class); @@ -48,6 +46,7 @@ public class DistributionController { * @author zxc * @date 2020/8/18 11:10 上午 */ + @ExternalAppRequestAuth @PostMapping("user") public Result user(@RequestBody UserFormDTO userFormDTO){ ValidatorUtils.validateEntity(userFormDTO, UserFormDTO.User.class); @@ -60,10 +59,37 @@ public class DistributionController { * @author zxc * @date 2020/8/18 11:20 上午 */ + @ExternalAppRequestAuth @PostMapping("parymember") public Result parymember(@RequestBody ParymemberFormDTO parymemberFormDTO){ ValidatorUtils.validateEntity(parymemberFormDTO, ParymemberFormDTO.Parymember.class); return new Result().ok(distributionService.parymember(parymemberFormDTO)); } + /** + * @Description 4、事件 + * @param projectFormDTO + * @author zxc + * @date 2020/8/19 1:29 下午 + */ +// @ExternalAppRequestAuth + @PostMapping("project") + public Result> project(@RequestBody ProjectFormDTO projectFormDTO){ + ValidatorUtils.validateEntity(projectFormDTO, ProjectFormDTO.Project.class); + return new Result>().ok(distributionService.project(projectFormDTO)); + } + + /** + * @Description 5、top区概况 + * @param topProfileFormDTO + * @author zxc + * @date 2020/8/19 1:52 下午 + */ +// @ExternalAppRequestAuth + @PostMapping("topprofile") + public Result topProfile(@RequestBody TopProfileFormDTO topProfileFormDTO){ + ValidatorUtils.validateEntity(topProfileFormDTO, TopProfileFormDTO.TopProfile.class); + return new Result().ok(distributionService.topProfile(topProfileFormDTO)); + } + } 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/screen/ScreenEventDataDao.java index 7ef0c0287b..362ada2193 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/screen/ScreenEventDataDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.ProjectResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 中央区-事件数据 @@ -27,5 +31,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenEventDataDao{ - + + /** + * @Description 查询事件 + * @param parentId + * @author zxc + * @date 2020/8/19 2:09 下午 + */ + List selectEvent(@Param("parentId")String parentId); + } \ 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 70477e48c6..46576c5517 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,6 +18,7 @@ package com.epmet.datareport.dao.screen; import com.epmet.screen.dto.result.PartymemberPercentResultDTO; +import com.epmet.screen.dto.result.TopProfileResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -39,4 +40,12 @@ public interface ScreenUserTotalDataDao { **/ PartymemberPercentResultDTO selectAgencyPartymemberPercent(@Param("agencyId")String agencyId); + /** + * @Description 查询top区概况 + * @param agencyId + * @author zxc + * @date 2020/8/19 2:13 下午 + */ + TopProfileResultDTO selectTopProfile(@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/DistributionService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java index 02471cdf22..62a0d0d7bf 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/screen/DistributionService.java @@ -1,11 +1,7 @@ package com.epmet.datareport.service.screen; -import com.epmet.screen.dto.form.BranchFormDTO; -import com.epmet.screen.dto.form.ParymemberFormDTO; -import com.epmet.screen.dto.form.UserFormDTO; -import com.epmet.screen.dto.result.BranchResultDTO; -import com.epmet.screen.dto.result.ParymemberResultDTO; -import com.epmet.screen.dto.result.UserResultDTO; +import com.epmet.screen.dto.form.*; +import com.epmet.screen.dto.result.*; import java.util.List; @@ -41,4 +37,20 @@ public interface DistributionService { */ ParymemberResultDTO parymember(ParymemberFormDTO parymemberFormDTO); + /** + * @Description 4、事件 + * @param projectFormDTO + * @author zxc + * @date 2020/8/19 1:29 下午 + */ + List project(ProjectFormDTO projectFormDTO); + + /** + * @Description 5、top区概况 + * @param topProfileFormDTO + * @author zxc + * @date 2020/8/19 1:52 下午 + */ + TopProfileResultDTO topProfile(TopProfileFormDTO topProfileFormDTO); + } 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/screen/impl/DistributionServiceImpl.java index 1c6356d550..a1d9025ead 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/screen/impl/DistributionServiceImpl.java @@ -1,10 +1,11 @@ package com.epmet.datareport.service.screen.impl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; import com.epmet.datareport.dao.screen.ScreenCustomerGridDao; -import com.epmet.screen.dto.form.BranchFormDTO; -import com.epmet.screen.dto.form.ParymemberFormDTO; -import com.epmet.screen.dto.form.UserFormDTO; +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; @@ -12,6 +13,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** @@ -27,6 +29,10 @@ public class DistributionServiceImpl implements DistributionService { private ScreenCustomerGridDao screenCustomerGridDao; @Autowired private ScreenCustomerAgencyDao screenCustomerAgencyDao; + @Autowired + private ScreenEventDataDao screenEventDataDao; + @Autowired + private ScreenUserTotalDataDao screenUserTotalDataDao; /** * @Description 1、党支部 @@ -87,4 +93,34 @@ public class DistributionServiceImpl implements DistributionService { } return parymemberResult; } + + /** + * @Description 4、事件 + * @param projectFormDTO + * @author zxc + * @date 2020/8/19 1:29 下午 + */ + @Override + public List project(ProjectFormDTO projectFormDTO) { + List projectResultDTOS = screenEventDataDao.selectEvent(projectFormDTO.getAgencyId()); + if (projectResultDTOS.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + return projectResultDTOS; + } + + /** + * @Description 5、top区概况 + * @param topProfileFormDTO + * @author zxc + * @date 2020/8/19 1:52 下午 + */ + @Override + public TopProfileResultDTO topProfile(TopProfileFormDTO topProfileFormDTO) { + TopProfileResultDTO topProfileResultDTO = screenUserTotalDataDao.selectTopProfile(topProfileFormDTO.getAgencyId()); + if (null == topProfileResultDTO){ + return new TopProfileResultDTO(); + } + return topProfileResultDTO; + } } 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 813b3f74a3..6cfafcf70a 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 @@ -3,6 +3,19 @@ - - + + \ No newline at end of file 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 72c533126d..673ffee04a 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 @@ -16,4 +16,21 @@ AND ORG_ID = #{agencyId} + + + \ No newline at end of file From 322e86635ccbabdaf4bfa7df618d307725ee251c Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 19 Aug 2020 15:14:33 +0800 Subject: [PATCH 023/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86=E9=9C=80=E6=B1=82=E5=8F=98=E6=9B=B4=EF=BC=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/screencoll/form/EventDataFormDTO.java | 10 +++++++ .../form/PartyBranchDataFormDTO.java | 17 +++++++----- .../dto/screencoll/form/UserJoinFormDTO.java | 26 +++++++------------ .../controller/ScreenCollController.java | 10 ++++--- .../dao/screen/ScreenPartyBranchDataDao.java | 4 +-- .../epmet/dao/screen/ScreenUserJoinDao.java | 8 ++++-- .../service/screen/ScreenCollService.java | 4 +-- .../screen/impl/ScreenCollServiceImpl.java | 2 ++ .../mapper/screen/ScreenEventDataDao.xml | 8 ++++-- .../screen/ScreenPartyBranchDataDao.xml | 10 ++++--- .../mapper/screen/ScreenUserJoinDao.xml | 20 +++++++------- 11 files changed, 70 insertions(+), 49 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java index 1f56464806..81800701c8 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java @@ -106,4 +106,14 @@ public class EventDataFormDTO implements Serializable { * 图片列表 */ private List imgDataList; + + /** + * 事件状态描述 + */ + private String eventStatusDesc; + + /** + * 事件状态key + */ + private String eventStatusCode; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java index 956a1db6aa..f05bd7bc80 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java @@ -5,7 +5,7 @@ import lombok.Data; import java.io.Serializable; /** - * 7、基层党建-建设情况数据(支部、联建) 入参 + * 7、基层党建-建设情况数据(支部、联建、志愿) 入参 * @Auther: zhangyong * @Date: 2020-08-18 09:59 */ @@ -30,7 +30,7 @@ public class PartyBranchDataFormDTO implements Serializable { private String monthId; /** - * 数据类别 party:支部建设;union:联合建设 + * 数据类别 party:支部建设;union:联合建设党员志愿服务:voluntaryservice */ private String type; @@ -55,14 +55,14 @@ public class PartyBranchDataFormDTO implements Serializable { private String orgName; /** - * 议题分类名称 + * 会议分类名称 */ - private String issueCategoryName; + private String meetCategoryName; /** - * 议题分类id + * 会议分类id */ - private String issueCategoryId; + private String meetCategoryId; /** * 组织次数 @@ -73,4 +73,9 @@ public class PartyBranchDataFormDTO implements Serializable { * 参加人数 */ private Integer joinUserCount; + + /** + * 平均参加人数 + */ + private Integer averageJoinUserCount; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java index 65b563795d..d474115972 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java @@ -3,7 +3,6 @@ package com.epmet.dto.screencoll.form; import lombok.Data; import java.io.Serializable; -import java.math.BigDecimal; /** * 11、基层治理-公众参与 入参 @@ -41,32 +40,27 @@ public class UserJoinFormDTO implements Serializable { private String orgName; /** - * 总的参与次数 + * 组织次数 */ - private Integer joinTotal; + private Integer organizeTotal; /** - * 总的参与次数较上月增长率 + * 参与次数 */ - private BigDecimal joinTotalUpRate; - - /** - * 人均议题 - */ - private Integer avgIssue; + private Integer joinTotal; /** - * 人均议题较上月增长率 + * 平均参与人数 */ - private BigDecimal avgIssueUpRate; + private Integer avgJoinUser; /** - * 平均参与度 + * 年Id :yyyy */ - private Integer avgJoin; + private String yearId; /** - * 平均参与度较上月增长率 + * 月份Id :yyyyMM */ - private BigDecimal avgJoinUpRate; + private String monthId; } 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 78230dd581..bb0e64b694 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 @@ -1,5 +1,7 @@ package com.epmet.controller; +import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; @@ -36,7 +38,7 @@ public class ScreenCollController { **/ @ExternalAppRequestAuth @PostMapping("partyuserrankdata") - public Result partyUserRankData(ExternalAppRequestParam externalAppRequestParam,@RequestBody List formDTO) { + public Result partyUserRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { screenCollService.insertPartyUserRankData(formDTO,externalAppRequestParam.getCustomerId()); return new Result(); } @@ -55,15 +57,15 @@ public class ScreenCollController { } /** - * 7、基层党建-建设情况数据(支部、联建) + * 7、基层党建-建设情况数据(支部、联建、志愿) * * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - @PostMapping("partybranchdata") - public Result partyBranchData(@RequestBody List formDTO) { + @PostMapping("meetdata") + public Result meetData(@RequestBody List formDTO) { return screenCollService.insertPartyBranchData(formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java index 9dc6a142c1..00b9f0df8d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java @@ -34,7 +34,7 @@ import java.util.List; @Mapper public interface ScreenPartyBranchDataDao extends BaseDao { /** - * 7、基层党建-建设情况数据(支部、联建) + * 7、基层党建-建设情况数据(支部、联建、志愿) * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 * * @param customerId @@ -50,7 +50,7 @@ public interface ScreenPartyBranchDataDao extends BaseDao { /** * 11、基层治理-公众参与 - * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 * * @param customerId + * @param yearId + * @param monthId * @param orgIds 组织Id集合 * @Author zhangyong * @Date 10:52 2020-08-18 **/ void deleteUserJoin(@Param("customerId") String customerId, - @Param("orgIds") String[] orgIds); + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); /** * 11、基层治理-公众参与 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 7fbddb072f..dcb9268db3 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 @@ -32,7 +32,7 @@ public interface ScreenCollService { Result insertPartyLinkMassesData(List formDTO); /** - * 7、基层党建-建设情况数据(支部、联建) + * 7、基层党建-建设情况数据(支部、联建、志愿) * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 * 2) 在新增 * @@ -165,7 +165,7 @@ public interface ScreenCollService { /** * 11、基层治理-公众参与 - * 1) 根据CUSTOMER_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 * 2) 在新增 * * @param 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 339fa96305..14787a6762 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 @@ -300,6 +300,8 @@ public class ScreenCollServiceImpl implements ScreenCollService { orgIds[i] = formDTO.get(i).getOrgId(); } screenUserJoinDao.deleteUserJoin(formDTO.get(NumConstant.ZERO).getCustomerId(), + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), orgIds); screenUserJoinDao.batchInsertUserJoin(formDTO); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml index c861d869ed..a6cdd87a2e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -34,7 +34,9 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + EVENT_STATUS_CODE, + EVENT_STATUS_DESC ) values ( @@ -61,7 +63,9 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.eventStatusCode}, + #{item.eventStatusDesc} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml index c7cf37d027..05c5d92066 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml @@ -24,10 +24,11 @@ ORG_ID, PARENT_ID, ORG_NAME, - ISSUE_CATEGORY_ID, - ISSUE_CATEGORY_NAME, + MEET_CATEGORY_ID, + MEET_CATEGORY_NAME, ORGANIZE_COUNT, JOIN_USER_COUNT, + AVERAGE_JOIN_USER_COUNT, DEL_FLAG, REVISION, CREATED_BY, @@ -46,10 +47,11 @@ #{item.orgId}, #{item.parentId}, #{item.orgName}, - #{item.issueCategoryId}, - #{item.issueCategoryName}, + #{item.meetCategoryId}, + #{item.meetCategoryName}, #{item.organizeCount}, #{item.joinUserCount}, + #{item.averageJoinUserCount}, 0, 0, 'APP_USER', diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml index 3e5acce57a..b09c3e6690 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -5,7 +5,7 @@ delete from screen_user_join - where CUSTOMER_ID = #{customerId} + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND ORG_ID IN #{item} @@ -17,16 +17,15 @@ ( ID, CUSTOMER_ID, + YEAR_ID, + MONTH_ID, ORG_TYPE, ORG_ID, PARENT_ID, ORG_NAME, + ORGANIZE_TOTAL, JOIN_TOTAL, - JOIN_TOTAL_UP_RATE, - AVG_ISSUE, - AVG_ISSUE_UP_RATE, - AVG_JOIN, - AGVG_JOIN_UP_RATE, + AVG_JOIN_USER, DEL_FLAG, REVISION, CREATED_BY, @@ -38,16 +37,15 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), #{item.customerId}, + #{item.yearId}, + #{item.monthId}, #{item.orgType}, #{item.orgId}, #{item.parentId}, #{item.orgName}, + #{item.organizeTotal}, #{item.joinTotal}, - #{item.joinTotalUpRate}, - #{item.avgIssue}, - #{item.avgIssueUpRate}, - #{item.avgJoin}, - #{item.avgJoinUpRate}, + #{item.avgJoinUser}, 0, 0, 'APP_USER', From cd1748049e9fb465494bd98f34e0544f24d3f782 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 19 Aug 2020 15:17:14 +0800 Subject: [PATCH 024/360] =?UTF-8?q?=E8=8E=B7=E5=8F=96X=E8=BD=B4,=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E6=96=B9=E6=B3=95=20=20=20getX()=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/NumConstant.java | 2 + .../dto/form/BranchBuildRankFormDTO.java | 33 +++ .../dto/form/BranchBuildTrendFormDTO.java | 39 ++++ .../dto/result/BranchBuildRankResultDTO.java | 18 ++ .../dto/result/BranchBuildTrendResultDTO.java | 31 +++ .../dto/result/BranchIssueDataResultDTO.java | 22 ++ .../BranchTrendSeriesDataResultDTO.java | 27 +++ .../PartymemberAgeDistributionResultDTO.java | 36 +++ .../PartymemberAgePercentResultDTO.java | 37 +++ .../screen/GrassrootsPartyDevController.java | 26 +++ .../dao/screen/ScreenCpcBaseDataDao.java | 15 +- .../dao/screen/ScreenPartyBranchDataDao.java | 25 +- .../screen/GrassrootsPartyDevService.java | 22 ++ .../impl/GrassrootsPartyDevServiceImpl.java | 215 +++++++++++++++++- .../mapper/screen/ScreenCpcBaseDataDao.xml | 15 +- .../screen/ScreenPartyBranchDataDao.xml | 33 +++ 16 files changed, 592 insertions(+), 4 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java index 92af86d3a9..0c7b46ef93 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java @@ -35,6 +35,8 @@ public interface NumConstant { int ONE_HUNDRED = 100; int ONE_THOUSAND = 1000; int MAX = 99999999; + int EIGHTY_EIGHT = 88; + long ZERO_L = 0L; long ONE_L = 1L; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java new file mode 100644 index 0000000000..169a24b29a --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.screen.dto.form; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 4、支部建设情况|联建共建情况-排行 入参dto + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321982 + * @ClassName BranchBuildRankFormDTO + * @Auth wangc + * @Date 2020-08-19 15:06 + */ +@Data +public class BranchBuildRankFormDTO implements Serializable { + private static final long serialVersionUID = -6580433475773171870L; + + /** + * 机关Id + * */ + private String agencyId; + + /** + * 支部建设情况:zbjs; 联建共建情况:ljgj;支部建设情况:zbjs; 联建共建情况:ljgj;联建党员志愿服务情况:ljdyzy + * */ + private String category; + + /** + * 默认显示前4,显示全部传入0 + * */ + private Integer topNum = NumConstant.FOUR; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java new file mode 100644 index 0000000000..1d68458b20 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java @@ -0,0 +1,39 @@ +package com.epmet.screen.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 3、支部建设情况|联建共建情况-折线图 入参DTO + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321981 + * @ClassName BranchBuildTrendFormDTO + * @Auth wangc + * @Date 2020-08-19 10:01 + */ +@Data +public class BranchBuildTrendFormDTO implements Serializable { + private static final long serialVersionUID = 2998463730542699247L; + + public interface branchBuildTrendGroup extends CustomerClientShowGroup{} + + /** + * 机关Id + * */ + @NotBlank(message = "agencyId不可为空" , groups = branchBuildTrendGroup.class) + private String agencyId; + + /** + * 组织次数:organize; 参加人数:joinuser; 平均参加人数:averagejoinuser + * */ + @NotBlank(message = "基层党建折线图类型不可为空" , groups = branchBuildTrendGroup.class) + private String type; + + /** + * 支部建设情况:zbjs; 联建共建情况:ljgj + * */ + @NotBlank(message = "基层党建情况不可为空" , groups = branchBuildTrendGroup.class) + private String category; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java new file mode 100644 index 0000000000..9b1584e276 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java @@ -0,0 +1,18 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 4、支部建设情况|联建共建情况-排行 返参dto + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321982 + * @Auth wangc + * @Date 2020-08-19 15:09 + */ +@Data +public class BranchBuildRankResultDTO implements Serializable { + private static final long serialVersionUID = 6213072175254509349L; + + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java new file mode 100644 index 0000000000..58a277322f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 3、支部建设情况|联建共建情况-折线图 返参DTO + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321981 + * @ClassName BranchBuildTrendResultDTO + * @Auth wangc + * @Date 2020-08-19 10:06 + */ +@Data +public class BranchBuildTrendResultDTO implements Serializable { + private static final long serialVersionUID = 2453727230656371207L; + + /** + * 分类数组 ["三会党课","主体党日","三述专题","志愿服务","党内关怀"] + * */ + private List legend; + + /** + * 横坐标,近12个月的结合 ["8月","9月"] + * */ + private List xAxis; + + private List seriesData; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java new file mode 100644 index 0000000000..65a6888047 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java @@ -0,0 +1,22 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @ClassName BranchIssueDataResultDTO + * @Auth wangc + * @Date 2020-08-19 10:50 + */ +@Data +public class BranchIssueDataResultDTO implements Serializable { + private static final long serialVersionUID = 2417543749267496482L; + + private String issue; + + private String monthId; + + private Integer data; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java new file mode 100644 index 0000000000..7d5f415547 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 3、支部建设情况|联建共建情况-折线图 返参中的系列数组 + * @ClassName BranchTrendSeriesDataResultDTO + * @Auth wangc + * @Date 2020-08-19 10:22 + */ +@Data +public class BranchTrendSeriesDataResultDTO implements Serializable { + private static final long serialVersionUID = -2288264050517402039L; + + /** + * 和legend集合值一致 + * */ + private String name; + + /** + * 对应每个月的数值 + * */ + private List data; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java new file mode 100644 index 0000000000..b9a22cb55b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @ClassName PartymemberAgeDistributionResultDTO + * @Auth wangc + * @Date 2020-08-18 17:04 + */ +@Data +public class PartymemberAgeDistributionResultDTO implements Serializable { + private static final long serialVersionUID = -3477512511475784330L; + + /** + * 30岁以下 的党员占 注册党员总数的百分比 (返回数字,小数点后保留两位) + * */ + private String under30Ratio; + + /** + * 31-50岁 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * */ + private String between31And50Ratio; + + /** + * 51-60岁 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * */ + private String between51And60Ratio; + + /** + * 61岁以上 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * */ + private String above61; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java new file mode 100644 index 0000000000..c5eec4d539 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Description + * @ClassName PartymemberAgePercentResultDTO + * @Auth wangc + * @Date 2020-08-19 09:13 + */ +@Data +public class PartymemberAgePercentResultDTO implements Serializable { + private static final long serialVersionUID = 2228109850328978771L; + + /** + * 30岁以下 的党员占 注册党员总数的百分比 (返回数字,小数点后保留两位) + * */ + private BigDecimal under30Ratio; + + /** + * 31-50岁 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * */ + private BigDecimal between31And50Ratio; + + /** + * 51-60岁 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * */ + private BigDecimal between51And60Ratio; + + /** + * 61岁以上 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * */ + private BigDecimal above61; +} 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 9747aa3ff9..d5934455bb 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,5 +1,13 @@ package com.epmet.datareport.controller.screen; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; +import com.epmet.datareport.service.screen.GrassrootsPartyDevService; +import com.epmet.screen.dto.form.ParymemberFormDTO; +import com.epmet.screen.dto.result.PartymemberPercentResultDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -12,4 +20,22 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/screen/grassrootspartydev") public class GrassrootsPartyDevController { + + @Autowired + private GrassrootsPartyDevService grassrootsPartyDevService; + + /** + * @Description 党员基本情况-饼状图概况 + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321324 + * @param param + * @return + * @author wangc + * @date 2020.08.18 16:59 + **/ + @PostMapping("basicinfo") + Result partymemberBaseInfo(ParymemberFormDTO param){ + ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class); + return new Result().ok(grassrootsPartyDevService.partymemberBaseInfo(param)); + } + } 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/screen/ScreenCpcBaseDataDao.java index 76edf9c12b..26f91ed0be 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/screen/ScreenCpcBaseDataDao.java @@ -17,7 +17,10 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.PartymemberAgePercentResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + /** * 基层党建-党员基本情况 @@ -27,5 +30,15 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenCpcBaseDataDao{ - + + /** + * @Description 查询党员年龄分布情况 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.18 17:47 + **/ + PartymemberAgePercentResultDTO selectPartymemberAgeDistribution(@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/ScreenPartyBranchDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java index 83b3fb5c15..bd51bb6869 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/screen/ScreenPartyBranchDataDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.BranchIssueDataResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 基层党建-建设情况数据(支部,联建) @@ -27,5 +31,24 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenPartyBranchDataDao { - + + /** + * @Description 根据agencyTd、type(数据类别 party:支部建设;union:联合建设)查出共有多少议题主题 + * @param agencyId + * @param type + * @return List + * @author wangc + * @date 2020.08.19 10:44 + **/ + List selectIssueGroup(@Param("agencyId") String agencyId , @Param("type") String type); + + /** + * @Description 根据议题名称查找近12个月的数据 + * @param agencyId .. + * @return List + * @author wangc + * @date 2020.08.19 10:59 + **/ + List selectBranchDataByTypeAndTimeZone(@Param("agencyId") String agencyId , @Param("type") String type, @Param("category") String category, @Param("bottomMonthId") String bottomMonthId); + } \ No newline at end of file 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/screen/GrassrootsPartyDevService.java index 4f25eb5f0d..8caa92ac10 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/screen/GrassrootsPartyDevService.java @@ -1,6 +1,9 @@ package com.epmet.datareport.service.screen; +import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; import com.epmet.screen.dto.form.ParymemberFormDTO; +import com.epmet.screen.dto.result.BranchBuildTrendResultDTO; +import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO; import com.epmet.screen.dto.result.PartymemberPercentResultDTO; /** @@ -20,5 +23,24 @@ public interface GrassrootsPartyDevService { * @date 2020.08.18 14:58 **/ PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param); + + /** + * @Description 2、党员基本情况-年龄分布 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321980 + * @param param + * @return + * @author wangc + * @date 2020.08.18 17:54 + **/ + PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param); + /** + * @Description 3、支部建设情况|联建共建情况-折线图 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321981 + * @param param + * @return BranchBuildTrendResultDTO + * @author wangc + * @date 2020.08.19 11:02 + **/ + BranchBuildTrendResultDTO branchBuildTrend(BranchBuildTrendFormDTO param); } 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 94cf163888..d0458bfca5 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 @@ -1,14 +1,26 @@ package com.epmet.datareport.service.screen.impl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.datareport.dao.screen.ScreenCpcBaseDataDao; +import com.epmet.datareport.dao.screen.ScreenPartyBranchDataDao; import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; +import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; import com.epmet.screen.dto.form.ParymemberFormDTO; -import com.epmet.screen.dto.result.PartymemberPercentResultDTO; +import com.epmet.screen.dto.result.*; import com.epmet.datareport.service.screen.GrassrootsPartyDevService; +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 java.math.BigDecimal; +import java.math.BigInteger; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + /** * 基层党建相关各指标查询 * @@ -22,6 +34,11 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService @Autowired private ScreenUserTotalDataDao screenUserTotalDataDao; + @Autowired + private ScreenCpcBaseDataDao screenCpcBaseDataDao; + @Autowired + private ScreenPartyBranchDataDao screenPartyBranchDataDao; + private List issueGroup; /** * @Description 1、党员基本情况-饼状图概况 @@ -35,7 +52,203 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) { PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercent(param.getAgencyId()); + if(null == result){ + logger.warn("com.epmet.datareport.service.screen.impl.GrassrootsPartyDevServiceImpl.partymemberBaseInfo:未查询出指定agencyId下的党员基础信息数据,agencyId :: {}",param.getAgencyId()); + result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); + return result; + } + //partymember / platform + if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){ + result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); + }else{ + result.setPercentInPlatForm(convertPercentStr(new BigDecimal(result.getPartyMemberTotal()/result.getPlatFormTotal()))); + } + return result; + } + + /** + * @Description 2、党员基本情况-年龄分布 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321980 + * @param param + * @return + * @author wangc + * @date 2020.08.18 17:54 + **/ + @Override + public PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param) { + PartymemberAgePercentResultDTO percent = screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId()); + PartymemberAgeDistributionResultDTO result = new PartymemberAgeDistributionResultDTO(); + + if(null == percent.getUnder30Ratio()) percent.setUnder30Ratio(new BigDecimal(NumConstant.ZERO)); + result.setUnder30Ratio(convertPercentStr(percent.getUnder30Ratio())); + + if(null == percent.getBetween31And50Ratio()) percent.setBetween31And50Ratio(new BigDecimal(NumConstant.ZERO)); + result.setBetween31And50Ratio(convertPercentStr(percent.getBetween31And50Ratio())); + + if(null == percent.getBetween51And60Ratio()) percent.setBetween51And60Ratio(new BigDecimal(NumConstant.ZERO)); + result.setBetween51And60Ratio(convertPercentStr(percent.getBetween51And60Ratio())); + + if(null == percent.getAbove61()) percent.setAbove61(new BigDecimal(NumConstant.ZERO)); + result.setAbove61(convertPercentStr(percent.getAbove61())); + + return result; + } + + /** + * @Description 3、支部建设情况|联建共建情况-折线图 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321981 + * @param param + * @return BranchBuildTrendResultDTO + * @author wangc + * @date 2020.08.19 11:02 + **/ + @Override + public BranchBuildTrendResultDTO branchBuildTrend(BranchBuildTrendFormDTO param) { + if(StringUtils.equals("ljgj",param.getCategory())){ + //联建共建情况 + param.setCategory("union"); + }else if(StringUtils.equals("ljdyzy",param.getCategory())){ + //联建党员志愿服务情况 + param.setCategory("voluntaryservice"); + }else{ + //默认支部建设 + param.setCategory("party"); + } + BranchBuildTrendResultDTO result = new BranchBuildTrendResultDTO(); + //生成近十二个月的横坐标数组 + Map monthMap = getX(); + result.setXAxis(monthMap.values().stream().collect(Collectors.toList())); + + List dataArray = new LinkedList<>(); + List yearlyDataList = + screenPartyBranchDataDao.selectBranchDataByTypeAndTimeZone(param.getAgencyId(),param.getType(),param.getCategory(),monthMap.keySet().iterator().next()); + + + if(null != yearlyDataList && !yearlyDataList.isEmpty()){ + + Map> dataMapByIssue = + yearlyDataList.stream().collect(Collectors.groupingBy(BranchIssueDataResultDTO::getIssue)); + + + result.setLegend(new LinkedList<>(dataMapByIssue.keySet())); + + dataMapByIssue.forEach((issue,val) ->{ + List issueYearlyDataList = val; + List numArray = new LinkedList<>(); + BranchTrendSeriesDataResultDTO data = new BranchTrendSeriesDataResultDTO(); + data.setName(issue); + if(null != issueYearlyDataList && issueYearlyDataList.isEmpty()){ + monthMap.keySet().forEach( monthId ->{ + Optional optional + = issueYearlyDataList.stream().filter(yearly -> StringUtils.equals(monthId,yearly.getMonthId())).findAny(); + if(optional.isPresent()){ + numArray.add(optional.get().getData()); + }else{ + numArray.add(NumConstant.ZERO); + } + }); + }else{ + for(int i = NumConstant.ZERO ; i < NumConstant.TWELVE ; i++){ + numArray.add(NumConstant.ZERO); + } + } + dataArray.add(data); + }); + } + + result.setSeriesData(dataArray); + result.setLegend(null == result.getLegend() ? new ArrayList<>() : result.getLegend()); return null; } + + + 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("%"); + } + + /** + * @Description 返回当前月以及前十一个月,升序 + * @param + * @return Map key:202001 value:1月 + * @author wangc + * @date 2020.08.19 12:46 + **/ + private 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; + } + + + public static void main(String[] args) { + SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); + String currentMonth = format.format(new Date()); + 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()))); + result.forEach((k,v) -> { + System.out.print(k); + System.out.print(" -> "); + System.out.print(v); + System.out.println(); + }); + + List xLine = result.values().stream().collect(Collectors.toList()); + xLine.forEach(x -> { + System.out.println(x); + }); + + result.keySet().forEach(key -> System.out.println(key)); + } } 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 356c3bae7e..24b84fb507 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 @@ -3,6 +3,19 @@ - + + \ No newline at end of file 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 bab712283c..c095f123a6 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 @@ -3,6 +3,39 @@ + + + + \ No newline at end of file From c39a2be59353641401bb04dbcaaa954efa57e06b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Aug 2020 15:22:25 +0800 Subject: [PATCH 025/360] =?UTF-8?q?screen=5Findex=5Fdata=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E4=B8=BAscreen=5Findex=5Fdata=5Fmonthly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...reenIndexDataDao.java => ScreenIndexDataMonthlyDao.java} | 2 +- ...ScreenIndexDataDao.xml => ScreenIndexDataMonthlyDao.xml} | 2 +- ...reenIndexDataDao.java => ScreenIndexDataMonthlyDao.java} | 4 ++-- ...dexDataEntity.java => ScreenIndexDataMonthlyEntity.java} | 4 ++-- ...ScreenIndexDataDao.xml => ScreenIndexDataMonthlyDao.xml} | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/{ScreenIndexDataDao.java => ScreenIndexDataMonthlyDao.java} (95%) rename epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/{ScreenIndexDataDao.xml => ScreenIndexDataMonthlyDao.xml} (89%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/{ScreenIndexDataDao.java => ScreenIndexDataMonthlyDao.java} (92%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/{ScreenIndexDataEntity.java => ScreenIndexDataMonthlyEntity.java} (94%) rename epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/{ScreenIndexDataDao.xml => ScreenIndexDataMonthlyDao.xml} (90%) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java index 1f038fd5b3..e43635d0aa 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java @@ -26,6 +26,6 @@ import org.apache.ibatis.annotations.Mapper; * @since v1.0.0 2020-08-18 */ @Mapper -public interface ScreenIndexDataDao{ +public interface ScreenIndexDataMonthlyDao{ } \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml similarity index 89% rename from epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml rename to epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index f5e693fd42..ae29ff18bf 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -1,7 +1,7 @@ - + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java index 53a413b048..c949f23a9a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java @@ -19,7 +19,7 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataFormDTO; -import com.epmet.entity.screen.ScreenIndexDataEntity; +import com.epmet.entity.screen.ScreenIndexDataMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -32,7 +32,7 @@ import java.util.List; * @since v1.0.0 2020-08-18 */ @Mapper -public interface ScreenIndexDataDao extends BaseDao { +public interface ScreenIndexDataMonthlyDao extends BaseDao { /** *1、指数相关 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java index ed9ac7fb97..f0f3ef1fed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java @@ -34,8 +34,8 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("screen_index_data") -public class ScreenIndexDataEntity extends BaseEpmetEntity { +@TableName("screen_index_data_monthly") +public class ScreenIndexDataMonthlyEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 045bf7926e..9cf0ef9a41 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -1,10 +1,10 @@ - + - delete from screen_index_data + delete from screen_index_data_monthly where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND ORG_ID IN @@ -13,7 +13,7 @@ - insert into screen_index_data + insert into screen_index_data_monthly ( ID, CUSTOMER_ID, From fa8cb17bcc9658e795f34da60d525e2565cd0f1c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Aug 2020 15:30:08 +0800 Subject: [PATCH 026/360] =?UTF-8?q?=E6=96=B0=E5=A2=9Escreen=5Findex=5Fdata?= =?UTF-8?q?=5Fyearly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/screen/ScreenIndexDataYearlyDao.java | 31 +++++++ .../screen/ScreenIndexDataYearlyDao.xml | 8 ++ .../dao/screen/ScreenIndexDataYearlyDao.java | 33 +++++++ .../screen/ScreenIndexDataYearlyEntity.java | 92 +++++++++++++++++++ .../screen/ScreenIndexDataYearlyDao.xml | 8 ++ 5 files changed, 172 insertions(+) create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml 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/screen/ScreenIndexDataYearlyDao.java new file mode 100644 index 0000000000..3739cb2246 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java @@ -0,0 +1,31 @@ +/** + * 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 org.apache.ibatis.annotations.Mapper; + +/** + * 指数-指数数据(按年统计) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface ScreenIndexDataYearlyDao{ + +} \ No newline at end of file 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 new file mode 100644 index 0000000000..865dc1e924 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java new file mode 100644 index 0000000000..76da4e689c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.ScreenIndexDataYearlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 指数-指数数据(按年统计) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface ScreenIndexDataYearlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java new file mode 100644 index 0000000000..8f8063c0db --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java @@ -0,0 +1,92 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 指数-指数数据(按年统计) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("screen_index_data_yearly") +public class ScreenIndexDataYearlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 年Id: yyyy + */ + private String yearId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 总指数 + */ + private BigDecimal indexTotal; + + /** + * 党建能力指数 + */ + private BigDecimal partyDevAblity; + + /** + * 服务能力指数 + */ + private BigDecimal serviceAblity; + + /** + * 治理能力指数 + */ + private BigDecimal governAblity; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml new file mode 100644 index 0000000000..3896921c0e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 2f256043ad244a289a3c0f1b5c3af844249564ee Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 19 Aug 2020 15:59:03 +0800 Subject: [PATCH 027/360] =?UTF-8?q?4=E3=80=81=E6=94=AF=E9=83=A8=E5=BB=BA?= =?UTF-8?q?=E8=AE=BE=E6=83=85=E5=86=B5|=E8=81=94=E5=BB=BA=E5=85=B1?= =?UTF-8?q?=E5=BB=BA=E6=83=85=E5=86=B5-=E6=8E=92=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/BranchBuildRankResultDTO.java | 14 ++++++++ .../PartymemberAgeDistributionResultDTO.java | 24 +++++++++----- .../dao/screen/ScreenCpcBaseDataDao.java | 4 +-- .../screen/GrassrootsPartyDevService.java | 12 +++++++ .../impl/GrassrootsPartyDevServiceImpl.java | 32 +++++++++---------- .../mapper/screen/ScreenCpcBaseDataDao.xml | 11 ++++--- .../screen/ScreenPartyBranchDataDao.xml | 26 +++++++++++++++ 7 files changed, 92 insertions(+), 31 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java index 9b1584e276..f7593319e1 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.screen.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * @Description 4、支部建设情况|联建共建情况-排行 返参dto @@ -14,5 +15,18 @@ import java.io.Serializable; public class BranchBuildRankResultDTO implements Serializable { private static final long serialVersionUID = 6213072175254509349L; + /** + * 组织次数 + * */ + private List organizeData; + /** + * 组织名称数组 + * */ + private List xAxis; + + /** + * 参与人数 + * */ + private List joinData; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java index b9a22cb55b..6ae70d9a67 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.screen.dto.result; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -15,22 +16,29 @@ public class PartymemberAgeDistributionResultDTO implements Serializable { private static final long serialVersionUID = -3477512511475784330L; /** - * 30岁以下 的党员占 注册党员总数的百分比 (返回数字,小数点后保留两位) + * 30岁以下 的党员 * */ - private String under30Ratio; + private Integer under30Count = NumConstant.ZERO; /** - * 31-50岁 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * 31-50岁 的党员 * */ - private String between31And50Ratio; + private Integer between31And50Count = NumConstant.ZERO; /** - * 51-60岁 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * 51-60岁 的党员 * */ - private String between51And60Ratio; + private Integer between51And60Count = NumConstant.ZERO; /** - * 61岁以上 的党员占 注册党员总数的百分比(返回数字,小数点后保留两位) + * 61岁以上 的党员 * */ - private String above61; + private Integer above61Count = NumConstant.ZERO; + + /** + * 党员总数 + * */ + private Integer partyTotal = NumConstant.ZERO; + + } 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/screen/ScreenCpcBaseDataDao.java index 26f91ed0be..87f26f3b01 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/screen/ScreenCpcBaseDataDao.java @@ -17,7 +17,7 @@ package com.epmet.datareport.dao.screen; -import com.epmet.screen.dto.result.PartymemberAgePercentResultDTO; +import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -38,7 +38,7 @@ public interface ScreenCpcBaseDataDao{ * @author wangc * @date 2020.08.18 17:47 **/ - PartymemberAgePercentResultDTO selectPartymemberAgeDistribution(@Param("agencyId") String agencyId); + PartymemberAgeDistributionResultDTO selectPartymemberAgeDistribution(@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/GrassrootsPartyDevService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java index 8caa92ac10..a870d21585 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/screen/GrassrootsPartyDevService.java @@ -1,7 +1,9 @@ package com.epmet.datareport.service.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; @@ -43,4 +45,14 @@ public interface GrassrootsPartyDevService { * @date 2020.08.19 11:02 **/ BranchBuildTrendResultDTO branchBuildTrend(BranchBuildTrendFormDTO param); + + /** + * @Description 4、支部建设情况|联建共建情况-排行 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321982 + * @param param + * @return + * @author wangc + * @date 2020.08.19 15:25 + **/ + BranchBuildRankResultDTO branchBuildRank(BranchBuildRankFormDTO param); } 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 d0458bfca5..893f5115ce 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 @@ -4,6 +4,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.datareport.dao.screen.ScreenCpcBaseDataDao; import com.epmet.datareport.dao.screen.ScreenPartyBranchDataDao; import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; +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.*; @@ -76,22 +77,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService **/ @Override public PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param) { - PartymemberAgePercentResultDTO percent = screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId()); - PartymemberAgeDistributionResultDTO result = new PartymemberAgeDistributionResultDTO(); - - if(null == percent.getUnder30Ratio()) percent.setUnder30Ratio(new BigDecimal(NumConstant.ZERO)); - result.setUnder30Ratio(convertPercentStr(percent.getUnder30Ratio())); - - if(null == percent.getBetween31And50Ratio()) percent.setBetween31And50Ratio(new BigDecimal(NumConstant.ZERO)); - result.setBetween31And50Ratio(convertPercentStr(percent.getBetween31And50Ratio())); - - if(null == percent.getBetween51And60Ratio()) percent.setBetween51And60Ratio(new BigDecimal(NumConstant.ZERO)); - result.setBetween51And60Ratio(convertPercentStr(percent.getBetween51And60Ratio())); - - if(null == percent.getAbove61()) percent.setAbove61(new BigDecimal(NumConstant.ZERO)); - result.setAbove61(convertPercentStr(percent.getAbove61())); - - return result; + return screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId()); } /** @@ -159,6 +145,20 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService result.setSeriesData(dataArray); result.setLegend(null == result.getLegend() ? new ArrayList<>() : result.getLegend()); + return result; + } + + /** + * @Description 4、支部建设情况|联建共建情况-排行 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321982 + * @param param + * @return BranchBuildRankResultDTO + * @author wangc + * @date 2020.08.19 15:25 + **/ + @Override + public BranchBuildRankResultDTO branchBuildRank(BranchBuildRankFormDTO param) { + return null; } 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 24b84fb507..3fc9c990b3 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 @@ -4,12 +4,13 @@ - SELECT - SUM( AGE_LEVEL_1 ) + SUM( AGE_LEVEL_2 ) AS under30Ratio, - SUM( AGE_LEVEL_3 ) + SUM( AGE_LEVEL_4 ) AS between31And50Ratio, - SUM( AGE_LEVEL_5 ) AS between51And60Ratio, - SUM( AGE_LEVEL_6 ) AS above61 + SUM( AGE_LEVEL_1 ) + SUM( AGE_LEVEL_2 ) AS under30Count, + SUM( AGE_LEVEL_3 ) + SUM( AGE_LEVEL_4 ) AS between31And50Count, + SUM( AGE_LEVEL_5 ) AS between51And60Count, + SUM( AGE_LEVEL_6 ) AS above61Count, + SUM( PARTY_MEMBER_COUNT) AS partyTotal FROM screen_cpc_base_data WHERE 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 c095f123a6..67b6006b05 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 @@ -38,4 +38,30 @@ ISSUE_CATEGORY_NAME + + \ No newline at end of file From 125445b0c3db72f019b2edf1e1f750be428bf592 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 19 Aug 2020 15:59:34 +0800 Subject: [PATCH 028/360] =?UTF-8?q?1=E3=80=81=E5=B9=B4=E5=BA=A6=E5=B9=B3?= =?UTF-8?q?=E5=9D=87=E6=8C=87=E6=95=B0=20=202=E3=80=81=E6=9C=88=E5=BA=A6?= =?UTF-8?q?=E6=8C=87=E6=95=B0=E5=88=86=E6=9E=90-=E9=A5=BC=E7=8A=B6?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/form/MonthPieChartFormDTO.java | 24 +++++++++++ .../dto/form/YearAverageIndexFormDTO.java | 24 +++++++++++ .../dto/result/MonthPieChartResultDTO.java | 30 +++++++++++++ .../dto/result/YearAverageIndexResultDTO.java | 35 ++++++++++++++++ .../screen/DistributionController.java | 4 +- .../controller/screen/IndexController.java | 42 +++++++++++++++++++ .../dao/screen/ScreenIndexDataMonthlyDao.java | 10 +++++ .../dao/screen/ScreenIndexDataYearlyDao.java | 10 +++++ .../service/screen/IndexService.java | 22 ++++++++++ .../service/screen/impl/IndexServiceImpl.java | 42 +++++++++++++++++++ .../screen/ScreenIndexDataMonthlyDao.xml | 16 ++++++- .../screen/ScreenIndexDataYearlyDao.xml | 17 +++++++- 12 files changed, 270 insertions(+), 6 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java new file mode 100644 index 0000000000..0c188f427e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 3:10 下午 + */ +@Data +public class MonthPieChartFormDTO implements Serializable { + + private static final long serialVersionUID = -3163410637094615814L; + + public interface MonthPieChart{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {MonthPieChart.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java new file mode 100644 index 0000000000..80d526bd48 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 2:40 下午 + */ +@Data +public class YearAverageIndexFormDTO implements Serializable { + + private static final long serialVersionUID = -2389432085360116229L; + + public interface YearAverageIndex{} + + /** + * 机关Id + */ + @NotBlank(message = "机关ID不能为空",groups = {YearAverageIndex.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java new file mode 100644 index 0000000000..248f69d5ce --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 3:12 下午 + */ +@Data +public class MonthPieChartResultDTO implements Serializable { + + private static final long serialVersionUID = 8399158251970739021L; + + /** + * 服务能力 + */ + private Double serviceAbility = 0.0; + + /** + * 党建能力 + */ + private Double partyDevAbility = 0.0; + + /** + * 治理能力 + */ + private Double governAbility = 0.0; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java new file mode 100644 index 0000000000..d05479d5d2 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java @@ -0,0 +1,35 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 2:45 下午 + */ +@Data +public class YearAverageIndexResultDTO implements Serializable { + + private static final long serialVersionUID = 6453379153616899440L; + + /** + * 年度平均指数 + */ + private Double yearAverageIndex = 0.0; + + /** + * 服务能力 + */ + private Double serviceAbility = 0.0; + + /** + * 党建能力 + */ + private Double partyDevAbility = 0.0; + + /** + * 治理能力 + */ + private Double governAbility = 0.0; +} 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 648d1e088b..b0b7c1f7a8 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 @@ -72,7 +72,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 +85,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/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index d8417ddcdb..ce74b4b766 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,5 +1,16 @@ 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.IndexService; +import com.epmet.screen.dto.form.MonthPieChartFormDTO; +import com.epmet.screen.dto.form.YearAverageIndexFormDTO; +import com.epmet.screen.dto.result.MonthPieChartResultDTO; +import com.epmet.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; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -12,4 +23,35 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/screen/index") public class IndexController { + + @Autowired + private IndexService indexService; + + /** + * @Description 1、年度平均指数 + * @param yearAverageIndexFormDTO + * @author zxc + * @date 2020/8/19 2:53 下午 + */ + @ExternalAppRequestAuth + @PostMapping("yearaverageindex") + public Result yearAverageIndex(@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){ + ValidatorUtils.validateEntity(yearAverageIndexFormDTO, YearAverageIndexFormDTO.YearAverageIndex.class); + return new Result().ok(indexService.yearAverageIndex(yearAverageIndexFormDTO)); + } + + /** + * @Description 2、月度指数分析-饼状图 + * @param monthPieChartFormDTO + * @author zxc + * @date 2020/8/19 3:17 下午 + */ + @ExternalAppRequestAuth + @PostMapping("monthindexanalysis/piechart") + public Result monthPieChart(@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){ + ValidatorUtils.validateEntity(monthPieChartFormDTO, MonthPieChartFormDTO.MonthPieChart.class); + return new Result().ok(indexService.monthPieChart(monthPieChartFormDTO)); + } + + } 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/screen/ScreenIndexDataMonthlyDao.java index e43635d0aa..f27f9f4fb8 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/screen/ScreenIndexDataMonthlyDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.MonthPieChartResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 指数-指数数据 @@ -27,5 +29,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenIndexDataMonthlyDao{ + + /** + * @Description 2、月度指数分析-饼状图 + * @param agencyId + * @author zxc + * @date 2020/8/19 3:43 下午 + */ + MonthPieChartResultDTO selectMonthPieChart(@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/ScreenIndexDataYearlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java index 3739cb2246..304351b3b7 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/screen/ScreenIndexDataYearlyDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.YearAverageIndexResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 指数-指数数据(按年统计) @@ -27,5 +29,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenIndexDataYearlyDao{ + + /** + * @Description 1、年度平均指数 + * @param agencyId + * @author zxc + * @date 2020/8/19 3:43 下午 + */ + YearAverageIndexResultDTO selectYearAverageIndex(@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/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java index 069534f7b8..4eba79bd88 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/screen/IndexService.java @@ -1,5 +1,10 @@ package com.epmet.datareport.service.screen; +import com.epmet.screen.dto.form.MonthPieChartFormDTO; +import com.epmet.screen.dto.form.YearAverageIndexFormDTO; +import com.epmet.screen.dto.result.MonthPieChartResultDTO; +import com.epmet.screen.dto.result.YearAverageIndexResultDTO; + /** * 指数相关相关各指标查询 * @@ -7,4 +12,21 @@ package com.epmet.datareport.service.screen; * @date 2020/8/18 10:21 */ public interface IndexService { + + /** + * @Description 1、年度平均指数 + * @param yearAverageIndexFormDTO + * @author zxc + * @date 2020/8/19 2:53 下午 + */ + YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO); + + /** + * @Description 2、月度指数分析-饼状图 + * @param monthPieChartFormDTO + * @author zxc + * @date 2020/8/19 3:17 下午 + */ + MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO); + } 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/screen/impl/IndexServiceImpl.java index 042e9b2229..9db0ebca3c 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/screen/impl/IndexServiceImpl.java @@ -1,6 +1,13 @@ package com.epmet.datareport.service.screen.impl; +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.MonthPieChartFormDTO; +import com.epmet.screen.dto.form.YearAverageIndexFormDTO; +import com.epmet.screen.dto.result.MonthPieChartResultDTO; +import com.epmet.screen.dto.result.YearAverageIndexResultDTO; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** @@ -11,4 +18,39 @@ import org.springframework.stereotype.Service; */ @Service public class IndexServiceImpl implements IndexService { + + @Autowired + private ScreenIndexDataYearlyDao screenIndexDataYearlyDao; + @Autowired + private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao; + + /** + * @Description 1、年度平均指数 + * @param yearAverageIndexFormDTO + * @author zxc + * @date 2020/8/19 2:53 下午 + */ + @Override + public YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO) { + YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId()); + if (null == yearAverageIndexResultDTO){ + return new YearAverageIndexResultDTO(); + } + return yearAverageIndexResultDTO; + } + + /** + * @Description 2、月度指数分析-饼状图 + * @param monthPieChartFormDTO + * @author zxc + * @date 2020/8/19 3:17 下午 + */ + @Override + public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) { + MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId()); + if (null == monthPieChartFormDTO){ + return new MonthPieChartResultDTO(); + } + return monthPieChartResultDTO; + } } 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 ae29ff18bf..bee1716ec6 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 @@ -3,6 +3,18 @@ - - + + \ No newline at end of file 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 865dc1e924..3d9329846d 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 @@ -3,6 +3,19 @@ - - + + \ No newline at end of file From 08efa913a7501b4061b253a9f7b26d2be90bc009 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 19 Aug 2020 16:25:30 +0800 Subject: [PATCH 029/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...mDTO.java => IndexDataMonthlyFormDTO.java} | 4 +- .../form/IndexDataYearlyFormDTO.java | 66 +++++++++++++++++++ .../controller/ScreenCollController.java | 23 +++++-- .../dao/screen/ScreenIndexDataMonthlyDao.java | 6 +- .../dao/screen/ScreenIndexDataYearlyDao.java | 31 ++++++++- .../service/screen/ScreenCollService.java | 16 ++++- .../screen/impl/ScreenCollServiceImpl.java | 27 ++++++-- .../screen/ScreenIndexDataMonthlyDao.xml | 4 +- .../screen/ScreenIndexDataYearlyDao.xml | 54 ++++++++++++++- .../externalapp/ExtAppJwtTokenUtils.java | 2 +- 10 files changed, 209 insertions(+), 24 deletions(-) rename epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/{IndexDataFormDTO.java => IndexDataMonthlyFormDTO.java} (91%) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataFormDTO.java rename to epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java index d6d3065992..5b3699f82b 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java @@ -5,12 +5,12 @@ import lombok.Data; import java.io.Serializable; /** - * 1、指数相关 入参 + * 1、指数_按月统计 入参 * @Auther: zhangyong * @Date: 2020-08-18 09:59 */ @Data -public class IndexDataFormDTO implements Serializable { +public class IndexDataMonthlyFormDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java new file mode 100644 index 0000000000..6c44c9411a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java @@ -0,0 +1,66 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 17、指数_按年统计 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class IndexDataYearlyFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * yyyy + */ + private String yearId; + + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 总指数 + */ + private Integer indexTotal; + + /** + * 党建能力指数 + */ + private Integer partyDevAblity; + + /** + * 服务能力指数 + */ + private Integer serviceAblity; + + /** + * 治理能力指数 + */ + private Integer governAblity; +} 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 bb0e64b694..981c056313 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 @@ -1,7 +1,5 @@ package com.epmet.controller; -import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; -import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; @@ -135,20 +133,33 @@ public class ScreenCollController { } /** - * 1、指数相关 + * 1、指数_按月统计 * * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - @PostMapping("indexdata") - public Result indexData(@RequestBody List formDTO) { - return screenCollService.insertIndexData(formDTO); + @PostMapping("indexdatamonthly") + public Result indexDataMonthly(@RequestBody List formDTO) { + return screenCollService.insertIndexDataMonthly(formDTO); } // -- + /** + * 17、指数_按年统计 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + @PostMapping("indexdatayearly") + public Result indexDataYearly(@RequestBody List formDTO) { + return screenCollService.insertIndexDataYearly(formDTO); + } + /** * 16、部门信息上传 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java index c949f23a9a..ec102d2499 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java @@ -18,7 +18,7 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.screencoll.form.IndexDataFormDTO; +import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO; import com.epmet.entity.screen.ScreenIndexDataMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -45,7 +45,7 @@ public interface ScreenIndexDataMonthlyDao extends BaseDao list); + void batchInsertIndexDataMonthly(@Param("list") List list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java index 76da4e689c..6c27ae9e70 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO; import com.epmet.entity.screen.ScreenIndexDataYearlyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 指数-指数数据(按年统计) @@ -29,5 +33,28 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenIndexDataYearlyDao extends BaseDao { - -} \ No newline at end of file + + /** + * 17、指数_按年统计 + * 1) 根据CUSTOMER_ID、YEAR_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param orgIds 组织Id集合 + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void deleteIndexDataYearly(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("orgIds") String[] orgIds); + + /** + * 17、指数_按年统计 + * 2) 在批量新增 + * + * @param list + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + void batchInsertIndexDataYearly(@Param("list") List list); +} 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 dcb9268db3..d2bc9d0bdb 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 @@ -104,7 +104,7 @@ public interface ScreenCollService { Result insertCpcbaseData(List formDTO); /** - * 1、指数相关 + * 1、指数_按月统计 * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 * 2) 在新增 * @@ -113,7 +113,19 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertIndexData(List formDTO); + Result insertIndexDataMonthly(List formDTO); + + /** + * 17、指数_按年统计 + * 1) 根据CUSTOMER_ID、YEAR_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 2) 在新增 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-18 + **/ + Result insertIndexDataYearly(List formDTO); /** * 16、部门信息上传 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 14787a6762..3f2a95ae03 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 @@ -57,7 +57,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { @Autowired private ScreenCpcBaseDataDao screenCpcBaseDataDao; @Autowired - private ScreenIndexDataDao screenIndexDataDao; + private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao; @Autowired private ScreenCustomerDeptDao screenCustomerDeptDao; @Autowired @@ -70,7 +70,8 @@ public class ScreenCollServiceImpl implements ScreenCollService { private ScreenUserJoinDao screenUserJoinDao; @Autowired private ScreenPioneerDataDao screenPioneerDataDao; - + @Autowired + private ScreenIndexDataYearlyDao screenIndexDataYearlyDao; @Override @Transactional(rollbackFor = Exception.class) public void insertPartyUserRankData(List formDTO,String customerId) { @@ -214,18 +215,34 @@ public class ScreenCollServiceImpl implements ScreenCollService { @Override @Transactional(rollbackFor = Exception.class) - public Result insertIndexData(List formDTO) { + public Result insertIndexDataMonthly(List formDTO) { 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(); } - screenIndexDataDao.deleteIndexData(formDTO.get(NumConstant.ZERO).getCustomerId(), + screenIndexDataMonthlyDao.deleteIndexDataMonthly(formDTO.get(NumConstant.ZERO).getCustomerId(), formDTO.get(NumConstant.ZERO).getYearId(), formDTO.get(NumConstant.ZERO).getMonthId(), orgIds); - screenIndexDataDao.batchInsertIndexData(formDTO); + screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(formDTO); + } + return new Result(); + } + + @Override + public Result insertIndexDataYearly(List formDTO) { + 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(); + } + screenIndexDataYearlyDao.deleteIndexDataYearly(formDTO.get(NumConstant.ZERO).getCustomerId(), + formDTO.get(NumConstant.ZERO).getYearId(), + orgIds); + + screenIndexDataYearlyDao.batchInsertIndexDataYearly(formDTO); } return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 9cf0ef9a41..182ea29161 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -3,7 +3,7 @@ - + delete from screen_index_data_monthly where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND ORG_ID IN @@ -12,7 +12,7 @@ - + insert into screen_index_data_monthly ( ID, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml index 3896921c0e..2fb2faae43 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -3,6 +3,58 @@ + + delete from screen_index_data_yearly + where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} + AND ORG_ID IN + + #{item} + + + + insert into screen_index_data_yearly + ( + ID, + CUSTOMER_ID, + YEAR_ID, + ORG_TYPE, + ORG_ID, + PARENT_ID, + ORG_NAME, + INDEX_TOTAL, + PARTY_DEV_ABLITY, + SERVICE_ABLITY, + GOVERN_ABLITY, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.yearId}, + #{item.orgType}, + #{item.orgId}, + #{item.parentId}, + #{item.orgName}, - \ No newline at end of file + #{item.indexTotal}, + #{item.partyDevAblity}, + #{item.serviceAblity}, + #{item.governAblity}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java index 1c3a326c75..a1639646a2 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java @@ -75,7 +75,7 @@ public class ExtAppJwtTokenUtils { public static void genToken() { HashMap claim = new HashMap<>(); - claim.put("appId", "227fb75ae4baa820755aaf43bf7f0a69"); + claim.put("appId", "dbfad3110c124c89948d16e8b06a8888"); claim.put("customerId", "c1"); claim.put("ts", System.currentTimeMillis() - 1000 * 60 * 4); From db9273780a3f0a1268933eb0141567d4e91a31b9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Aug 2020 16:59:11 +0800 Subject: [PATCH 030/360] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20latestOperateDesc;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/entity/screen/ScreenDifficultyDataEntity.java | 4 ++++ .../java/com/epmet/entity/screen/ScreenEventDataEntity.java | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java index 76af0410c0..3a49498dca 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java @@ -113,4 +113,8 @@ public class ScreenDifficultyDataEntity extends BaseEpmetEntity { */ private String eventStatusDesc; + /** + * 最近一次操作说明 + */ + private String latestOperateDesc; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java index 9e605802f3..a007794682 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java @@ -133,4 +133,9 @@ public class ScreenEventDataEntity extends BaseEpmetEntity { * 事件状态描述 */ private String eventStatusDesc; + + /** + * 最近一次操作说明 + */ + private String latestOperateDesc; } From 0db0ff81e2926288a542cc300a24a419485a6401 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 19 Aug 2020 17:27:42 +0800 Subject: [PATCH 031/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screencoll/form/CpcBaseDataFormDTO.java | 5 - .../form/CustomerAgencyFormDTO.java | 5 - .../screencoll/form/CustomerDeptFormDTO.java | 5 - .../screencoll/form/CustomerGridFormDTO.java | 5 - .../form/DifficultyDataFormDTO.java | 10 +- .../dto/screencoll/form/EventDataFormDTO.java | 10 +- .../form/GovernRankDataFormDTO.java | 5 - .../form/IndexDataMonthlyFormDTO.java | 5 - .../form/IndexDataYearlyFormDTO.java | 5 - .../screencoll/form/OrgRankDataFormDTO.java | 5 - .../form/PartyBranchDataFormDTO.java | 5 - .../form/PartyLinkMassesDataFormDTO.java | 5 - .../screencoll/form/PioneerDataFormDTO.java | 5 - .../dto/screencoll/form/UserJoinFormDTO.java | 5 - .../screencoll/form/UserTotalDataFormDTO.java | 5 - .../java/com/epmet/DataStatsApplication.java | 4 + .../controller/ScreenCollController.java | 93 ++++++++++++------ .../dao/screen/ScreenCpcBaseDataDao.java | 3 +- .../dao/screen/ScreenCustomerAgencyDao.java | 3 +- .../dao/screen/ScreenCustomerDeptDao.java | 3 +- .../dao/screen/ScreenCustomerGridDao.java | 3 +- .../dao/screen/ScreenDifficultyDataDao.java | 16 ++-- .../epmet/dao/screen/ScreenEventDataDao.java | 14 +-- .../dao/screen/ScreenGovernRankDataDao.java | 3 +- .../dao/screen/ScreenIndexDataMonthlyDao.java | 3 +- .../dao/screen/ScreenIndexDataYearlyDao.java | 3 +- .../dao/screen/ScreenOrgRankDataDao.java | 3 +- .../dao/screen/ScreenPartyBranchDataDao.java | 3 +- .../screen/ScreenPartyLinkMassesDataDao.java | 3 +- .../dao/screen/ScreenPioneerDataDao.java | 3 +- .../epmet/dao/screen/ScreenUserJoinDao.java | 3 +- .../dao/screen/ScreenUserTotalDataDao.java | 3 +- .../service/screen/ScreenCollService.java | 48 ++++++---- .../screen/impl/ScreenCollServiceImpl.java | 94 +++++++++---------- .../mapper/screen/ScreenCpcBaseDataDao.xml | 4 +- .../mapper/screen/ScreenCustomerAgencyDao.xml | 4 +- .../mapper/screen/ScreenCustomerDeptDao.xml | 4 +- .../mapper/screen/ScreenCustomerGridDao.xml | 4 +- .../mapper/screen/ScreenDifficultyDataDao.xml | 10 +- .../mapper/screen/ScreenEventDataDao.xml | 10 +- .../mapper/screen/ScreenGovernRankDataDao.xml | 4 +- .../screen/ScreenIndexDataMonthlyDao.xml | 4 +- .../screen/ScreenIndexDataYearlyDao.xml | 4 +- .../mapper/screen/ScreenOrgRankDataDao.xml | 4 +- .../screen/ScreenPartyBranchDataDao.xml | 4 +- .../screen/ScreenPartyLinkMassesDataDao.xml | 4 +- .../mapper/screen/ScreenPioneerDataDao.xml | 4 +- .../mapper/screen/ScreenUserJoinDao.xml | 4 +- .../mapper/screen/ScreenUserTotalDataDao.xml | 4 +- 49 files changed, 236 insertions(+), 229 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java index 0efee2a896..3ff8c4446a 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java @@ -14,11 +14,6 @@ public class CpcBaseDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 组织类别 agency:组织;部门:department;网格:grid */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java index 7baff54308..de5dc8abdd 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java @@ -14,11 +14,6 @@ public class CustomerAgencyFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 组织id */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java index 5566ea3ad7..19f5f3fecd 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java @@ -14,11 +14,6 @@ public class CustomerDeptFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 部门id */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java index 13345ffaad..8935eaa156 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java @@ -14,11 +14,6 @@ public class CustomerGridFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 网格id */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java index 3053fe955a..14ef258fb8 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java @@ -14,11 +14,6 @@ public class DifficultyDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 组织类别 agency:组织;部门:department;网格:grid */ @@ -88,4 +83,9 @@ public class DifficultyDataFormDTO implements Serializable { * 事件状态描述 */ private String eventStatusDesc; + + /** + * 最近一次操作说明 eg: 转项目,结案,流转 + */ + private String latestOperateDesc; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java index 81800701c8..5be17787cf 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java @@ -17,11 +17,6 @@ public class EventDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 组织类别 agency:组织;部门:department;网格:grid */ @@ -116,4 +111,9 @@ public class EventDataFormDTO implements Serializable { * 事件状态key */ private String eventStatusCode; + + /** + * 最近一次操作说明 eg: 转项目,结案,流转 + */ + private String latestOperateDesc; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java index 3976647f24..f12e196ab7 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataFormDTO.java @@ -15,11 +15,6 @@ public class GovernRankDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 年Id :yyyy */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java index 5b3699f82b..9c9ca798a5 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java @@ -14,11 +14,6 @@ public class IndexDataMonthlyFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * yyyy */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java index 6c44c9411a..bd360a63fa 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java @@ -14,11 +14,6 @@ public class IndexDataYearlyFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * yyyy */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java index 37386fcc6b..8b0a753839 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java @@ -15,11 +15,6 @@ public class OrgRankDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 年Id :yyyy */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java index f05bd7bc80..21144c89ab 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataFormDTO.java @@ -14,11 +14,6 @@ public class PartyBranchDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 年Id :yyyy */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java index bacca22874..8d1ae654a9 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java @@ -14,11 +14,6 @@ public class PartyLinkMassesDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 组织类别 agency:组织;部门:department;网格:grid */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java index bde79f0baf..cdad61be67 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java @@ -14,11 +14,6 @@ public class PioneerDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 组织类别 agency:组织;部门:department;网格:grid */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java index d474115972..48802ff6d1 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java @@ -14,11 +14,6 @@ public class UserJoinFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 组织类别 agency:组织;部门:department;网格:grid */ 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 3cf171e6f7..42722f7111 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 @@ -14,11 +14,6 @@ public class UserTotalDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; - /** - * 客户id - */ - private String customerId; - /** * 组织类别 agency:组织;部门:department;网格:grid */ 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 ad4e2110fa..3b93ce39a3 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 @@ -3,8 +3,12 @@ package com.epmet; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.scheduling.annotation.EnableAsync; +@EnableDiscoveryClient +@EnableFeignClients @SpringBootApplication (exclude = {DataSourceAutoConfiguration.class}) @EnableAsync public class DataStatsApplication { 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 981c056313..ae770d75fa 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 @@ -29,6 +29,7 @@ public class ScreenCollController { /** * 9、党建引领|基层治理-居民(党员)积分排行榜 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong @@ -37,112 +38,128 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("partyuserrankdata") public Result partyUserRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - screenCollService.insertPartyUserRankData(formDTO,externalAppRequestParam.getCustomerId()); + screenCollService.insertPartyUserRankData(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-18 **/ + @ExternalAppRequestAuth @PostMapping("partylinkmassesdata") - public Result partyLinkMassesData(@RequestBody List formDTO) { - return screenCollService.insertPartyLinkMassesData(formDTO); + public Result partyLinkMassesData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertPartyLinkMassesData(formDTO, externalAppRequestParam.getCustomerId()); } /** * 7、基层党建-建设情况数据(支部、联建、志愿) * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("meetdata") - public Result meetData(@RequestBody List formDTO) { - return screenCollService.insertPartyBranchData(formDTO); + public Result meetData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertPartyBranchData(formDTO, externalAppRequestParam.getCustomerId()); } /** * 6、党建引领-组织排行 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("orgrankdata") - public Result orgRankData(@RequestBody List formDTO) { - return screenCollService.insertOrgRankData(formDTO); + public Result orgRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertOrgRankData(formDTO, externalAppRequestParam.getCustomerId()); } /** * 5、基层治理-治理能力数据 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("governrankdata") - public Result governRankData(@RequestBody List formDTO) { - return screenCollService.insertGovernRankData(formDTO); + public Result governRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertGovernRankData(formDTO, externalAppRequestParam.getCustomerId()); } /** * 4、事件数据 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("eventdata") - public Result eventData(@RequestBody List formDTO) { - return screenCollService.insertEventData(formDTO); + public Result eventData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertEventData(formDTO, externalAppRequestParam.getCustomerId()); } /** * 3、难点赌点 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("difficultydata") - public Result difficultyData(@RequestBody List formDTO) { - return screenCollService.insertDifficultyData(formDTO); + public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId()); } /** * 2、党员基本情况 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("cpcbasedata") - public Result cpcbaseData(@RequestBody List formDTO) { - return screenCollService.insertCpcbaseData(formDTO); + public Result cpcbaseData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertCpcbaseData(formDTO, externalAppRequestParam.getCustomerId()); } /** * 1、指数_按月统计 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("indexdatamonthly") - public Result indexDataMonthly(@RequestBody List formDTO) { - return screenCollService.insertIndexDataMonthly(formDTO); + public Result indexDataMonthly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertIndexDataMonthly(formDTO, externalAppRequestParam.getCustomerId()); } // -- @@ -150,91 +167,105 @@ public class ScreenCollController { /** * 17、指数_按年统计 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("indexdatayearly") - public Result indexDataYearly(@RequestBody List formDTO) { - return screenCollService.insertIndexDataYearly(formDTO); + public Result indexDataYearly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertIndexDataYearly(formDTO, externalAppRequestParam.getCustomerId()); } /** * 16、部门信息上传 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("customerdept") - public Result customerDept(@RequestBody List formDTO) { - return screenCollService.insertCustomerDept(formDTO); + public Result customerDept(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertCustomerDept(formDTO, externalAppRequestParam.getCustomerId()); } /** * 15、网格信息上传 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("customergrid") - public Result customerGrid(@RequestBody List formDTO) { - return screenCollService.insertCustomerGrid(formDTO); + public Result customerGrid(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertCustomerGrid(formDTO, externalAppRequestParam.getCustomerId()); } /** * 14、组织层级 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("customeragency") - public Result customerAgency(@RequestBody List formDTO) { - return screenCollService.insertCustomerAgency(formDTO); + public Result customerAgency(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertCustomerAgency(formDTO, externalAppRequestParam.getCustomerId()); } /** * 12、中央区各类总数 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("usertotaldata") - public Result userTotalData(@RequestBody List formDTO) { - return screenCollService.insertUserTotalData(formDTO); + public Result userTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertUserTotalData(formDTO, externalAppRequestParam.getCustomerId()); } /** * 11、基层治理-公众参与 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("userjoin") - public Result userJoin(@RequestBody List formDTO) { - return screenCollService.insertUserJoin(formDTO); + public Result userJoin(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertUserJoin(formDTO, externalAppRequestParam.getCustomerId()); } /** * 10、党建引领-先锋模范数据 * + * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ + @ExternalAppRequestAuth @PostMapping("pioneerdata") - public Result pioneerData(@RequestBody List formDTO) { - return screenCollService.insertPioneerData(formDTO); + public Result pioneerData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + return screenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId()); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java index fa30fdef44..12271b8e3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java @@ -51,8 +51,9 @@ public interface ScreenCpcBaseDataDao extends BaseDao { * 2) 在批量新增 * * @param list + * @param customerId * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void batchInsertCpcBaseData(@Param("list") List list); + void batchInsertCpcBaseData(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java index 240c48e041..d7851cd754 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java @@ -51,8 +51,9 @@ public interface ScreenCustomerAgencyDao extends BaseDao list); + void batchInsertCustomerAgency(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java index 84e641b47b..53f37049a3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java @@ -51,8 +51,9 @@ public interface ScreenCustomerDeptDao extends BaseDao * 2) 在批量新增 * * @param list + * @param customerId * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void batchInsertCustomerDept(@Param("list") List list); + void batchInsertCustomerDept(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java index cfc0c7092c..3925d0ad6e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java @@ -50,8 +50,9 @@ public interface ScreenCustomerGridDao extends BaseDao * 2) 在批量新增 * * @param list + * @param customerId * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void batchInsertCustomerGrid(@Param("list") List list); + void batchInsertCustomerGrid(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java index 503f070506..5379eeb893 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java @@ -36,23 +36,25 @@ public interface ScreenDifficultyDataDao extends BaseDao list); + void batchInsertDifficultyData(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java index 20250bc7ff..ec80809c55 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java @@ -36,23 +36,25 @@ public interface ScreenEventDataDao extends BaseDao { /** * 4、事件数据 * 1) 根据CUSTOMER_ID、EVENT_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 - * CUSTOMER_ID 一 - * EVENT_ID 多 - * ORG_ID 多 * - * @param list + * @param customerId 一 + * @param eventId 多 + * @param orgId 多 * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void deleteEventData(EventDataFormDTO list); + void deleteEventData(@Param("customerId")String customerId, + @Param("eventId")String eventId, + @Param("orgId")String orgId); /** * 4、事件数据 * 2) 在批量新增 * * @param list + * @param customerId * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void batchInsertEventData(@Param("list") List list); + void batchInsertEventData(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java index 295538b085..ea3d67aa68 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java @@ -54,8 +54,9 @@ public interface ScreenGovernRankDataDao extends BaseDao list); + void batchInsertGovernRankData(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java index ec102d2499..e97406febf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java @@ -55,8 +55,9 @@ public interface ScreenIndexDataMonthlyDao extends BaseDao list); + void batchInsertIndexDataMonthly(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java index 6c27ae9e70..4ca64f6944 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java @@ -53,8 +53,9 @@ public interface ScreenIndexDataYearlyDao extends BaseDao list); + void batchInsertIndexDataYearly(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java index 110d37c618..4eabfd508a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java @@ -54,8 +54,9 @@ public interface ScreenOrgRankDataDao extends BaseDao { * 2) 在批量新增 * * @param list + * @param customerId * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void batchInsertOrgRankData(@Param("list") List list); + void batchInsertOrgRankData(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java index 00b9f0df8d..3cae4a160d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java @@ -54,8 +54,9 @@ public interface ScreenPartyBranchDataDao extends BaseDao list); + void batchInsertPartyBranchData(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java index d100742ec8..276b08e356 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java @@ -51,8 +51,9 @@ public interface ScreenPartyLinkMassesDataDao extends BaseDao list); + void batchInsertPartyLinkMassesData(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java index ba6bfa532a..202fc4aa59 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java @@ -51,8 +51,9 @@ public interface ScreenPioneerDataDao extends BaseDao { * 2) 在批量新增 * * @param list + * @param customerId * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void batchInsertPioneerData(@Param("list") List list); + void batchInsertPioneerData(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java index 0b6f09f58c..46d19682ea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java @@ -55,8 +55,9 @@ public interface ScreenUserJoinDao extends BaseDao { * 2) 在批量新增 * * @param list + * @param customerId * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void batchInsertUserJoin(@Param("list") List list); + void batchInsertUserJoin(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java index ef7543555a..ec449f1352 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java @@ -51,8 +51,9 @@ public interface ScreenUserTotalDataDao extends BaseDao list); + void batchInsertUserTotalData(@Param("list") List list, @Param("customerId")String customerId); } 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 d2bc9d0bdb..4670c31fa1 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 @@ -13,11 +13,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void insertPartyUserRankData(List formDTO,String customerId); + void insertPartyUserRankData(List formDTO, String customerId); /** * 8、党建引领-党员联系群众数据 @@ -25,11 +26,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertPartyLinkMassesData(List formDTO); + Result insertPartyLinkMassesData(List formDTO, String customerId); /** * 7、基层党建-建设情况数据(支部、联建、志愿) @@ -37,11 +39,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertPartyBranchData(List formDTO); + Result insertPartyBranchData(List formDTO, String customerId); /** * 6、党建引领-组织排行 @@ -49,11 +52,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertOrgRankData(List formDTO); + Result insertOrgRankData(List formDTO, String customerId); /** * 5、基层治理-治理能力数据 @@ -61,11 +65,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertGovernRankData(List formDTO); + Result insertGovernRankData(List formDTO, String customerId); /** * 4、事件数据 @@ -73,11 +78,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertEventData(List formDTO); + Result insertEventData(List formDTO, String customerId); /** * 3、难点赌点 @@ -85,11 +91,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertDifficultyData(List formDTO); + Result insertDifficultyData(List formDTO, String customerId); /** * 2、党员基本情况 @@ -97,11 +104,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCpcbaseData(List formDTO); + Result insertCpcbaseData(List formDTO, String customerId); /** * 1、指数_按月统计 @@ -109,11 +117,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertIndexDataMonthly(List formDTO); + Result insertIndexDataMonthly(List formDTO, String customerId); /** * 17、指数_按年统计 @@ -121,11 +130,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertIndexDataYearly(List formDTO); + Result insertIndexDataYearly(List formDTO, String customerId); /** * 16、部门信息上传 @@ -133,11 +143,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCustomerDept(List formDTO); + Result insertCustomerDept(List formDTO, String customerId); /** * 15、网格信息上传 @@ -145,11 +156,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCustomerGrid(List formDTO); + Result insertCustomerGrid(List formDTO, String customerId); /** * 14、组织层级 @@ -157,11 +169,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCustomerAgency(List formDTO); + Result insertCustomerAgency(List formDTO, String customerId); /** * 12、中央区各类总数 @@ -169,11 +182,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertUserTotalData(List formDTO); + Result insertUserTotalData(List formDTO, String customerId); /** * 11、基层治理-公众参与 @@ -181,11 +195,12 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertUserJoin(List formDTO); + Result insertUserJoin(List formDTO, String customerId); /** * 10、党建引领-先锋模范数据 @@ -193,9 +208,10 @@ public interface ScreenCollService { * 2) 在新增 * * @param formDTO + * @param customerId * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertPioneerData(List formDTO); + Result insertPioneerData(List formDTO, String customerId); } 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 3f2a95ae03..f96ece5527 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 @@ -91,81 +91,82 @@ public class ScreenCollServiceImpl implements ScreenCollService { @Override @Transactional(rollbackFor = Exception.class) - public Result insertPartyLinkMassesData(List formDTO) { + public Result insertPartyLinkMassesData(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(); } - screenPartyLinkMassesDataDao.deletePartyLinkMassesData(formDTO.get(NumConstant.ZERO).getCustomerId(), orgIds); + screenPartyLinkMassesDataDao.deletePartyLinkMassesData(customerId, orgIds); - screenPartyLinkMassesDataDao.batchInsertPartyLinkMassesData(formDTO); + screenPartyLinkMassesDataDao.batchInsertPartyLinkMassesData(formDTO, customerId); } return new Result(); } @Override - public Result insertPartyBranchData(List formDTO) { + @Transactional(rollbackFor = Exception.class) + public Result insertPartyBranchData(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(); } - screenPartyBranchDataDao.deletePartyBranchData(formDTO.get(NumConstant.ZERO).getCustomerId(), + screenPartyBranchDataDao.deletePartyBranchData(customerId, formDTO.get(NumConstant.ZERO).getYearId(), formDTO.get(NumConstant.ZERO).getMonthId(), orgIds); - screenPartyBranchDataDao.batchInsertPartyBranchData(formDTO); + screenPartyBranchDataDao.batchInsertPartyBranchData(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertOrgRankData(List formDTO) { + public Result insertOrgRankData(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(); } - screenOrgRankDataDao.deleteOrgRankData(formDTO.get(NumConstant.ZERO).getCustomerId(), + screenOrgRankDataDao.deleteOrgRankData(customerId, formDTO.get(NumConstant.ZERO).getYearId(), formDTO.get(NumConstant.ZERO).getMonthId(), orgIds); - screenOrgRankDataDao.batchInsertOrgRankData(formDTO); + screenOrgRankDataDao.batchInsertOrgRankData(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertGovernRankData(List formDTO) { + public Result insertGovernRankData(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(); } - screenGovernRankDataDao.deleteGovernRankData(formDTO.get(NumConstant.ZERO).getCustomerId(), + screenGovernRankDataDao.deleteGovernRankData(customerId, formDTO.get(NumConstant.ZERO).getYearId(), formDTO.get(NumConstant.ZERO).getMonthId(), orgIds); - screenGovernRankDataDao.batchInsertGovernRankData(formDTO); + screenGovernRankDataDao.batchInsertGovernRankData(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertEventData(List formDTO) { + public Result insertEventData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ - screenEventDataDao.deleteEventData(formDTO.get(i)); + screenEventDataDao.deleteEventData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); } - screenEventDataDao.batchInsertEventData(formDTO); + screenEventDataDao.batchInsertEventData(formDTO, customerId); for (int i = NumConstant.ZERO; i < formDTO.size(); i++) { if (null != formDTO.get(i).getImgDataList() && formDTO.get(i).getImgDataList().size() > NumConstant.ZERO) { @@ -187,157 +188,156 @@ public class ScreenCollServiceImpl implements ScreenCollService { @Override @Transactional(rollbackFor = Exception.class) - public Result insertDifficultyData(List formDTO) { + public Result insertDifficultyData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ - screenDifficultyDataDao.deleteDifficultyData(formDTO.get(i)); + screenDifficultyDataDao.deleteDifficultyData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); } - screenDifficultyDataDao.batchInsertDifficultyData(formDTO); + screenDifficultyDataDao.batchInsertDifficultyData(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCpcbaseData(List formDTO) { + public Result insertCpcbaseData(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(); } - screenCpcBaseDataDao.deleteCpcBaseData(formDTO.get(NumConstant.ZERO).getCustomerId(), orgIds); + screenCpcBaseDataDao.deleteCpcBaseData(customerId, orgIds); - screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO); + screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertIndexDataMonthly(List formDTO) { + public Result insertIndexDataMonthly(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(); } - screenIndexDataMonthlyDao.deleteIndexDataMonthly(formDTO.get(NumConstant.ZERO).getCustomerId(), + screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, formDTO.get(NumConstant.ZERO).getYearId(), formDTO.get(NumConstant.ZERO).getMonthId(), orgIds); - screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(formDTO); + screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(formDTO, customerId); } return new Result(); } @Override - public Result insertIndexDataYearly(List formDTO) { + @Transactional(rollbackFor = Exception.class) + public Result insertIndexDataYearly(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(); } - screenIndexDataYearlyDao.deleteIndexDataYearly(formDTO.get(NumConstant.ZERO).getCustomerId(), + screenIndexDataYearlyDao.deleteIndexDataYearly(customerId, formDTO.get(NumConstant.ZERO).getYearId(), orgIds); - screenIndexDataYearlyDao.batchInsertIndexDataYearly(formDTO); + screenIndexDataYearlyDao.batchInsertIndexDataYearly(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCustomerDept(List formDTO) { + public Result insertCustomerDept(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] deptIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ deptIds[i] = formDTO.get(i).getDeptId(); } - screenCustomerDeptDao.deleteCustomerDept(formDTO.get(NumConstant.ZERO).getCustomerId(), deptIds); + screenCustomerDeptDao.deleteCustomerDept(customerId, deptIds); - screenCustomerDeptDao.batchInsertCustomerDept(formDTO); + screenCustomerDeptDao.batchInsertCustomerDept(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCustomerGrid(List formDTO) { + public Result insertCustomerGrid(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] gridIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ gridIds[i] = formDTO.get(i).getGridId(); } - screenCustomerGridDao.deleteCustomerGrid(formDTO.get(NumConstant.ZERO).getCustomerId(), gridIds); + screenCustomerGridDao.deleteCustomerGrid(customerId, gridIds); - screenCustomerGridDao.batchInsertCustomerGrid(formDTO); + screenCustomerGridDao.batchInsertCustomerGrid(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCustomerAgency(List formDTO) { + public Result insertCustomerAgency(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] agencyIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ agencyIds[i] = formDTO.get(i).getAgencyId(); } - screenCustomerAgencyDao.deleteCustomerAgency(formDTO.get(NumConstant.ZERO).getCustomerId(), agencyIds); + screenCustomerAgencyDao.deleteCustomerAgency(customerId, agencyIds); - screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO); + screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertUserTotalData(List formDTO) { + public Result insertUserTotalData(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(); } - screenUserTotalDataDao.deleteUserTotalData(formDTO.get(NumConstant.ZERO).getCustomerId(), - orgIds); + screenUserTotalDataDao.deleteUserTotalData(customerId, orgIds); - screenUserTotalDataDao.batchInsertUserTotalData(formDTO); + screenUserTotalDataDao.batchInsertUserTotalData(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertUserJoin(List formDTO) { + public Result insertUserJoin(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(); } - screenUserJoinDao.deleteUserJoin(formDTO.get(NumConstant.ZERO).getCustomerId(), + screenUserJoinDao.deleteUserJoin(customerId, formDTO.get(NumConstant.ZERO).getYearId(), formDTO.get(NumConstant.ZERO).getMonthId(), orgIds); - screenUserJoinDao.batchInsertUserJoin(formDTO); + screenUserJoinDao.batchInsertUserJoin(formDTO, customerId); } return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertPioneerData(List formDTO) { + public Result insertPioneerData(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(); } - screenPioneerDataDao.deletePioneerData(formDTO.get(NumConstant.ZERO).getCustomerId(), - orgIds); + screenPioneerDataDao.deletePioneerData(customerId, orgIds); - screenPioneerDataDao.batchInsertPioneerData(formDTO); + screenPioneerDataDao.batchInsertPioneerData(formDTO, customerId); } return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml index de6f379dc4..a0adcc3b70 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml @@ -12,7 +12,7 @@ - + insert into screen_cpc_base_data ( ID, @@ -40,7 +40,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.orgType}, #{item.orgId}, #{item.parentId}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index c01c3dcc95..923a8410f0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -12,7 +12,7 @@ - + insert into screen_customer_agency ( ID, @@ -37,7 +37,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.agencyId}, #{item.agencyName}, #{item.pid}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml index 267a118cd8..627b3b39c1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml @@ -12,7 +12,7 @@ - + insert into screen_customer_dept ( ID, @@ -33,7 +33,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.deptId}, #{item.deptName}, #{item.parentAgencyId}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 5c96ed4ae8..7a36507ce7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -12,7 +12,7 @@ - + insert into screen_customer_grid ( ID, @@ -33,7 +33,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.gridId}, #{item.gridName}, #{item.parentAgencyId}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index 5ec18b6c7b..517d2efaa0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -8,7 +8,7 @@ where CUSTOMER_ID = #{customerId} AND EVENT_ID = #{eventId} AND ORG_ID = #{orgId} - + insert into screen_difficulty_data ( ID, @@ -32,12 +32,13 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + LATEST_OPERATE_DESC ) values ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.orgType}, #{item.orgId}, #{item.parentId}, @@ -57,7 +58,8 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{latestOperateDesc} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml index a6cdd87a2e..f0c84a1e8a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -8,7 +8,7 @@ where CUSTOMER_ID = #{customerId} AND EVENT_ID = #{eventId} AND ORG_ID = #{orgId} - + insert into screen_event_data ( ID, @@ -36,12 +36,13 @@ UPDATED_BY, UPDATED_TIME, EVENT_STATUS_CODE, - EVENT_STATUS_DESC + EVENT_STATUS_DESC, + LATEST_OPERATE_DESC ) values ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.orgType}, #{item.orgId}, #{item.parentId}, @@ -65,7 +66,8 @@ 'APP_USER', now(), #{item.eventStatusCode}, - #{item.eventStatusDesc} + #{item.eventStatusDesc}, + #{latestOperateDesc} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml index 48d98970ce..9a6e6c3c44 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml @@ -12,7 +12,7 @@ - + insert into screen_govern_rank_data ( ID, @@ -39,7 +39,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.yearId}, #{item.monthId}, #{item.orgType}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 182ea29161..721c4e0af3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -12,7 +12,7 @@ - + insert into screen_index_data_monthly ( ID, @@ -37,7 +37,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.yearId}, #{item.monthId}, #{item.orgType}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml index 2fb2faae43..8747e1219a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -12,7 +12,7 @@ - + insert into screen_index_data_yearly ( ID, @@ -36,7 +36,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.yearId}, #{item.orgType}, #{item.orgId}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml index be2ff1fb67..4ebe5e2c28 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -12,7 +12,7 @@ - + insert into screen_org_rank_data ( ID, @@ -40,7 +40,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.yearId}, #{item.monthId}, #{item.orgType}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml index 05c5d92066..afeaca9651 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml @@ -12,7 +12,7 @@ - + insert into screen_party_branch_data ( ID, @@ -39,7 +39,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.yearId}, #{item.monthId}, #{item.type}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml index b5f7770bfd..01a63f3a53 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml @@ -12,7 +12,7 @@ - + insert into screen_party_link_masses_data ( ID, @@ -33,7 +33,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.orgType}, #{item.orgId}, #{item.parentId}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml index c31c51fe78..73e703ae25 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml @@ -12,7 +12,7 @@ - + insert into screen_pioneer_data ( ID, @@ -36,7 +36,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.orgType}, #{item.orgId}, #{item.parentId}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml index b09c3e6690..db7b626e27 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -12,7 +12,7 @@ - + insert into screen_user_join ( ID, @@ -36,7 +36,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.yearId}, #{item.monthId}, #{item.orgType}, 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 51257d5837..a582bedbb7 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 @@ -12,7 +12,7 @@ - + insert into screen_user_total_data ( ID, @@ -37,7 +37,7 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), - #{item.customerId}, + #{customerId}, #{item.orgType}, #{item.orgId}, #{item.parentId}, From 718d2ccfaee82c3448f0e91795c099837d100b20 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 19 Aug 2020 17:56:11 +0800 Subject: [PATCH 032/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9-end?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenDifficultyDataDao.xml | 2 +- .../src/main/resources/mapper/screen/ScreenEventDataDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index 517d2efaa0..11451dc3ae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -59,7 +59,7 @@ now(), 'APP_USER', now(), - #{latestOperateDesc} + #{item.latestOperateDesc} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml index f0c84a1e8a..1df8e0a068 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -67,7 +67,7 @@ now(), #{item.eventStatusCode}, #{item.eventStatusDesc}, - #{latestOperateDesc} + #{item.latestOperateDesc} ) From c084ca825e14d14735a763169c335ebf3b076793 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 19 Aug 2020 18:23:55 +0800 Subject: [PATCH 033/360] =?UTF-8?q?=E8=BF=94=E5=8F=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ScreenCollController.java | 45 ++++++++++++------- .../service/screen/ScreenCollService.java | 37 ++++++++------- .../screen/impl/ScreenCollServiceImpl.java | 45 +++++++------------ 3 files changed, 66 insertions(+), 61 deletions(-) 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 ae770d75fa..080ba5384b 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 @@ -54,7 +54,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("partylinkmassesdata") public Result partyLinkMassesData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertPartyLinkMassesData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertPartyLinkMassesData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -69,7 +70,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("meetdata") public Result meetData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertPartyBranchData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertPartyBranchData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -84,7 +86,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("orgrankdata") public Result orgRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertOrgRankData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertOrgRankData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -99,7 +102,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("governrankdata") public Result governRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertGovernRankData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertGovernRankData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -114,7 +118,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("eventdata") public Result eventData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertEventData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertEventData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -129,7 +134,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("difficultydata") public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -144,7 +150,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("cpcbasedata") public Result cpcbaseData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertCpcbaseData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertCpcbaseData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -159,7 +166,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("indexdatamonthly") public Result indexDataMonthly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertIndexDataMonthly(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertIndexDataMonthly(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } // -- @@ -176,7 +184,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("indexdatayearly") public Result indexDataYearly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertIndexDataYearly(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertIndexDataYearly(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -191,7 +200,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("customerdept") public Result customerDept(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertCustomerDept(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertCustomerDept(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -206,7 +216,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("customergrid") public Result customerGrid(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertCustomerGrid(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertCustomerGrid(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -221,7 +232,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("customeragency") public Result customerAgency(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertCustomerAgency(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertCustomerAgency(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -236,7 +248,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("usertotaldata") public Result userTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertUserTotalData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertUserTotalData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -251,7 +264,8 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("userjoin") public Result userJoin(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertUserJoin(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertUserJoin(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } /** @@ -266,6 +280,7 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("pioneerdata") public Result pioneerData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - return screenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId()); + screenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId()); + return new Result(); } } 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 4670c31fa1..8ee702178d 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 @@ -4,7 +4,12 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.screencoll.form.*; import java.util.List; - +/** + * 大屏数据采集api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:25 + */ public interface ScreenCollService { /** @@ -31,7 +36,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertPartyLinkMassesData(List formDTO, String customerId); + void insertPartyLinkMassesData(List formDTO, String customerId); /** * 7、基层党建-建设情况数据(支部、联建、志愿) @@ -44,7 +49,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertPartyBranchData(List formDTO, String customerId); + void insertPartyBranchData(List formDTO, String customerId); /** * 6、党建引领-组织排行 @@ -57,7 +62,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertOrgRankData(List formDTO, String customerId); + void insertOrgRankData(List formDTO, String customerId); /** * 5、基层治理-治理能力数据 @@ -70,7 +75,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertGovernRankData(List formDTO, String customerId); + void insertGovernRankData(List formDTO, String customerId); /** * 4、事件数据 @@ -83,7 +88,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertEventData(List formDTO, String customerId); + void insertEventData(List formDTO, String customerId); /** * 3、难点赌点 @@ -96,7 +101,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertDifficultyData(List formDTO, String customerId); + void insertDifficultyData(List formDTO, String customerId); /** * 2、党员基本情况 @@ -109,7 +114,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCpcbaseData(List formDTO, String customerId); + void insertCpcbaseData(List formDTO, String customerId); /** * 1、指数_按月统计 @@ -122,7 +127,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertIndexDataMonthly(List formDTO, String customerId); + void insertIndexDataMonthly(List formDTO, String customerId); /** * 17、指数_按年统计 @@ -135,7 +140,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertIndexDataYearly(List formDTO, String customerId); + void insertIndexDataYearly(List formDTO, String customerId); /** * 16、部门信息上传 @@ -148,7 +153,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCustomerDept(List formDTO, String customerId); + void insertCustomerDept(List formDTO, String customerId); /** * 15、网格信息上传 @@ -161,7 +166,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCustomerGrid(List formDTO, String customerId); + void insertCustomerGrid(List formDTO, String customerId); /** * 14、组织层级 @@ -174,7 +179,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertCustomerAgency(List formDTO, String customerId); + void insertCustomerAgency(List formDTO, String customerId); /** * 12、中央区各类总数 @@ -187,7 +192,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertUserTotalData(List formDTO, String customerId); + void insertUserTotalData(List formDTO, String customerId); /** * 11、基层治理-公众参与 @@ -200,7 +205,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertUserJoin(List formDTO, String customerId); + void insertUserJoin(List formDTO, String customerId); /** * 10、党建引领-先锋模范数据 @@ -213,5 +218,5 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - Result insertPioneerData(List formDTO, String customerId); + void insertPioneerData(List formDTO, String customerId); } 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 f96ece5527..899ebac605 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 @@ -91,7 +91,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { @Override @Transactional(rollbackFor = Exception.class) - public Result insertPartyLinkMassesData(List formDTO, String customerId) { + public void insertPartyLinkMassesData(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++){ @@ -101,12 +101,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenPartyLinkMassesDataDao.batchInsertPartyLinkMassesData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertPartyBranchData(List formDTO, String customerId) { + public void insertPartyBranchData(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++){ @@ -119,12 +118,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenPartyBranchDataDao.batchInsertPartyBranchData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertOrgRankData(List formDTO, String customerId) { + public void insertOrgRankData(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++){ @@ -137,12 +135,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenOrgRankDataDao.batchInsertOrgRankData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertGovernRankData(List formDTO, String customerId) { + public void insertGovernRankData(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++){ @@ -155,12 +152,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenGovernRankDataDao.batchInsertGovernRankData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertEventData(List formDTO, String customerId) { + public void insertEventData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ screenEventDataDao.deleteEventData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); @@ -183,12 +179,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertDifficultyData(List formDTO, String customerId) { + public void insertDifficultyData(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ screenDifficultyDataDao.deleteDifficultyData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); @@ -196,12 +191,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenDifficultyDataDao.batchInsertDifficultyData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCpcbaseData(List formDTO, String customerId) { + public void insertCpcbaseData(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++){ @@ -211,12 +205,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertIndexDataMonthly(List formDTO, String customerId) { + public void insertIndexDataMonthly(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++){ @@ -229,12 +222,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertIndexDataYearly(List formDTO, String customerId) { + public void insertIndexDataYearly(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++){ @@ -246,12 +238,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenIndexDataYearlyDao.batchInsertIndexDataYearly(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCustomerDept(List formDTO, String customerId) { + public void insertCustomerDept(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] deptIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -261,12 +252,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenCustomerDeptDao.batchInsertCustomerDept(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCustomerGrid(List formDTO, String customerId) { + public void insertCustomerGrid(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] gridIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -276,12 +266,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenCustomerGridDao.batchInsertCustomerGrid(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertCustomerAgency(List formDTO, String customerId) { + public void insertCustomerAgency(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ String[] agencyIds = new String[formDTO.size()]; for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ @@ -291,12 +280,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenCustomerAgencyDao.batchInsertCustomerAgency(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertUserTotalData(List formDTO, String customerId) { + public void insertUserTotalData(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++){ @@ -306,12 +294,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenUserTotalDataDao.batchInsertUserTotalData(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertUserJoin(List formDTO, String customerId) { + public void insertUserJoin(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++){ @@ -324,12 +311,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenUserJoinDao.batchInsertUserJoin(formDTO, customerId); } - return new Result(); } @Override @Transactional(rollbackFor = Exception.class) - public Result insertPioneerData(List formDTO, String customerId) { + public void insertPioneerData(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++){ @@ -339,6 +325,5 @@ public class ScreenCollServiceImpl implements ScreenCollService { screenPioneerDataDao.batchInsertPioneerData(formDTO, customerId); } - return new Result(); } } From 56e454e1e22d5bf5df7646dcfb360fb14eb44c14 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 20 Aug 2020 09:42:37 +0800 Subject: [PATCH 034/360] =?UTF-8?q?=E6=8C=87=E6=A0=87=E9=87=87=E9=9B=86?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexCollectController.java | 15 ++ .../FactIndexGovrnAblityDeptMonthlyDao.java | 32 ++++ .../FactIndexGovrnAblityGridMonthlyDao.java | 33 +++++ .../FactIndexGovrnAblityOrgMonthlyDao.java | 33 +++++ .../FactIndexPartyAblityCpcMonthlyDao.java | 33 +++++ .../FactIndexPartyAblityGridMonthlyDao.java | 33 +++++ .../FactIndexPartyAblityOrgMonthlyDao.java | 33 +++++ .../FactIndexServiceAblityGridMonthlyDao.java | 33 +++++ .../FactIndexServiceAblityOrgMonthlyDao.java | 33 +++++ ...FactIndexGovrnAblityDeptMonthlyEntity.java | 102 +++++++++++++ ...FactIndexGovrnAblityGridMonthlyEntity.java | 112 ++++++++++++++ .../FactIndexGovrnAblityOrgMonthlyEntity.java | 107 ++++++++++++++ .../FactIndexPartyAblityCpcMonthlyEntity.java | 127 ++++++++++++++++ ...FactIndexPartyAblityGridMonthlyEntity.java | 137 ++++++++++++++++++ .../FactIndexPartyAblityOrgMonthlyEntity.java | 81 +++++++++++ ...ctIndexServiceAblityGridMonthlyEntity.java | 87 +++++++++++ ...actIndexServiceAblityOrgMonthlyEntity.java | 81 +++++++++++ .../FactIndexGovrnAblityDeptMonthlyDao.xml | 29 ++++ .../FactIndexGovrnAblityGridMonthlyDao.xml | 31 ++++ .../FactIndexGovrnAblityOrgMonthlyDao.xml | 30 ++++ .../FactIndexPartyAblityCpcMonthlyDao.xml | 34 +++++ .../FactIndexPartyAblityGridMonthlyDao.xml | 36 +++++ .../FactIndexPartyAblityOrgMonthlyDao.xml | 25 ++++ .../FactIndexServiceAblityGridMonthlyDao.xml | 26 ++++ .../FactIndexServiceAblityOrgMonthlyDao.xml | 25 ++++ 25 files changed, 1348 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java new file mode 100644 index 0000000000..83d05006a4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java @@ -0,0 +1,15 @@ +package com.epmet.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 指标采集相关api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/20 9:38 + */ +@RestController +@RequestMapping("indexcollect") +public class FactIndexCollectController { +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java new file mode 100644 index 0000000000..2e9922e8c4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -0,0 +1,32 @@ +package com.epmet.dao.indexcoll; /** + * 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 . + */ + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 治理能力-部门相关数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Mapper +public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java new file mode 100644 index 0000000000..1bd3057274 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 治理能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Mapper +public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java new file mode 100644 index 0000000000..dcce6fe74d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 治理能力-街道及社区相关数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Mapper +public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java new file mode 100644 index 0000000000..3f8ef7ab22 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党建能力-党员相关的事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Mapper +public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java new file mode 100644 index 0000000000..dcebc723ce --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党建能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Mapper +public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java new file mode 100644 index 0000000000..0817e24f06 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党建能力-街道及社区相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Mapper +public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java new file mode 100644 index 0000000000..8beb4263fc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 服务能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Mapper +public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java new file mode 100644 index 0000000000..3cf7fc6cf7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 服务能力-组织(街道|社区|全区)相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Mapper +public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java new file mode 100644 index 0000000000..24827756fa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java @@ -0,0 +1,102 @@ +/** + * 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.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 治理能力-部门相关数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_govrn_ablity_dept_monthly") +public class FactIndexGovrnAblityDeptMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门所属机关Id + */ + private String agencyId; + + /** + * 部门id + */ + private String deptId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id:yyyy + */ + private String yearId; + + /** + * 区直部门被吹哨次数 + */ + private Integer transferedCount; + + /** + * 区直部门办结项目数 + */ + private Integer closedProjectCount; + + /** + * 区直部门项目响应度 所有被吹哨后的滞留时间除以项目数 + */ + private BigDecimal respProjectRatio; + + /** + * 区直部门办结项目的处理效率 + */ + private BigDecimal handleProjectRatio; + + /** + * 区直部门项目办结率 + */ + private BigDecimal closedProjectRatio; + + /** + * 办结项目满意度 + */ + private BigDecimal satisfactionRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java new file mode 100644 index 0000000000..c1c6553ef5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java @@ -0,0 +1,112 @@ +/** + * 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.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 治理能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_govrn_ablity_grid_monthly") +public class FactIndexGovrnAblityGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格所属机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id:yyyy + */ + private String yearId; + + /** + * 网格总议题数 + */ + private Integer issueTotal; + + /** + * 网格人均议题数目 + */ + private Integer avgIssueCount; + + /** + * 网格议题转项目率 + */ + private BigDecimal avgShiftProjectRatio; + + /** + * 网格总项目数 + */ + private Integer projectTotal; + + /** + * 网格自治项目数 统计期网格自身内办结的项目数目 + */ + private Integer selfSolveProjectCount; + + /** + * 网格办结项目数 统计期内办结的项目数目 + */ + private Integer resolveProjectCount; + + /** + * 网格吹哨部门准确率 + */ + private BigDecimal transferRightRatio; + + /** + * 网格内解决的项目的满意度 + */ + private BigDecimal satisfactionRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java new file mode 100644 index 0000000000..bf38ebbbda --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -0,0 +1,107 @@ +/** + * 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.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 治理能力-街道及社区相关数据 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_govrn_ablity_org_monthly") +public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 上级组织Id,如果是根级组织,此列为0 + */ + private String parentId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id:yyyy + */ + private String yearId; + + /** + * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + */ + private Integer dataType; + + /** + * 被吹哨次数 + */ + private Integer transferedCount; + + /** + * 办结项目数 + */ + private Integer closedProjectCount; + + /** + * 项目响应度 所有被吹哨后的滞留时间除以项目数 + */ + private BigDecimal respProjectRatio; + + /** + * 办结项目率 + */ + private BigDecimal closedProjectRatio; + + /** + * 办结项目满意度 + */ + private BigDecimal satisfactionRatio; + + /** + * 超期项目率 + */ + private BigDecimal overdueProjectRatio; + +} 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 new file mode 100644 index 0000000000..e6ec77f0fa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java @@ -0,0 +1,127 @@ +/** + * 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.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 党建能力-党员相关的事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_party_ablity_cpc_monthly") +public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 用户Id: + */ + private String userId; + + /** + * 月维度Id: yyyMM + */ + private String monthId; + + /** + * 季度Id: yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id : yyyy + */ + private String yearId; + + /** + * 党员提出的话题数 + */ + private Integer createTopicCount; + + /** + * 党员参与话题数(支持,反对,评论,浏览) + */ + private Integer joinTopicCount; + + /** + * 话题转议题数 + */ + private Integer shiftIssueCount; + + /** + * 议题转项目数 + */ + private Integer shiftProjectCount; + + /** + * 参加三会一课次数 + */ + private Integer joinThreeMeetsCount; + + /** + * 自建群群众人数 + */ + private Integer groupUserCount; + + /** + * 自建群活跃度-话题数 + */ + 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/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java new file mode 100644 index 0000000000..208106e87a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java @@ -0,0 +1,137 @@ +/** + * 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.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 党建能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_party_ablity_grid_monthly") +public class FactIndexPartyAblityGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id + */ + private String monthId; + + /** + * 季度Id + */ + private String quarterId; + + /** + * 年Id + */ + private String yearId; + + /** + * 网格群众用户数 + */ + private Integer userCount; + + /** + * 网格党员用户数 + */ + private Integer partyCount; + + /** + * 网格活跃群众用户数 + */ + private Integer activeUserCount; + + /** + * 网格活跃党员用户数 + */ + private Integer activePartyCount; + + /** + * 网格党员人均提出话题数 + */ + private Integer partyAvgTopicCount; + + /** + * 网格群众人均提出话题数 + */ + private Integer userAvgTopicCount; + + /** + * 网格党员人均提出的议题转项目数 + */ + private Integer partyAvgShiftProjectCount; + + /** + * 网格群众人均提出的议题转项目数 + */ + private Integer userAvgShiftProjectCount; + + /** + * 建群党员数(累计值) 去重 + */ + private Integer createGroupPartyCount; + + /** + * 网格发文数 + */ + private Integer publishArticleCount; + + /** + * 网格议题转项目率 + */ + private BigDecimal issueToProjectRatio; + + /** + * 组织三会一课次数 + */ + private Integer createThreeMeetsCount; + + /** + * 党员参加三会一课人次 + */ + private Integer joinThreeMeetsCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java new file mode 100644 index 0000000000..14ea565482 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java @@ -0,0 +1,81 @@ +/** + * 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.indexcoll; + +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-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_party_ablity_org_monthly") +public class FactIndexPartyAblityOrgMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 月维度Id + */ + private String monthId; + + /** + * 季度Id + */ + private String quarterId; + + /** + * 年Id + */ + private String yearId; + + /** + * 发文数 + */ + private Integer publishArticleCount; + + /** + * 数据类型 allRegion:全区;community:社区;street:街道 + */ + private Integer dataType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java new file mode 100644 index 0000000000..d4c6aa6ab6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java @@ -0,0 +1,87 @@ +/** + * 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.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 服务能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_service_ablity_grid_monthly") +public class FactIndexServiceAblityGridMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格所属组织Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id: yyyy + */ + private String yearId; + + /** + * 网格活动组织次数 爱心活动 + */ + private Integer activityCount; + + /** + * 网格志愿者占比 + */ + private BigDecimal volunteerRatio; + + /** + * 网格党员志愿者率 + */ + private BigDecimal partyVolunteerRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java new file mode 100644 index 0000000000..9e590690fa --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java @@ -0,0 +1,81 @@ +/** + * 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.indexcoll; + +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-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_service_ablity_org_monthly") +public class FactIndexServiceAblityOrgMonthlyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id:yyyy + */ + private String yearId; + + /** + * 社区/街道活动组织次数 爱心活动 + */ + private Integer activityCount; + + /** + * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + */ + private Integer dataType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml new file mode 100644 index 0000000000..f6261e5e6b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml new file mode 100644 index 0000000000..2b88158a9a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml new file mode 100644 index 0000000000..1c5d52a23b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file 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 new file mode 100644 index 0000000000..b1a6e0d616 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml new file mode 100644 index 0000000000..7f58b377f2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml new file mode 100644 index 0000000000..1b3299d367 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml new file mode 100644 index 0000000000..8b7c42b41d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml new file mode 100644 index 0000000000..24556d1dd4 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 4beaeacfcb77855a1c23d43ec21e9f79b6640130 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 20 Aug 2020 09:42:49 +0800 Subject: [PATCH 035/360] =?UTF-8?q?getX()=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/BranchBuildRankFormDTO.java | 12 +++++++++- .../BranchBuildOrderByCountResultDTO.java | 23 +++++++++++++++++++ .../dao/screen/ScreenPartyBranchDataDao.java | 2 ++ .../impl/GrassrootsPartyDevServiceImpl.java | 14 +++++++---- .../screen/ScreenPartyBranchDataDao.xml | 5 +++- 5 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java index 169a24b29a..458f2e4af5 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java @@ -1,8 +1,10 @@ package com.epmet.screen.dto.form; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -16,18 +18,26 @@ import java.io.Serializable; public class BranchBuildRankFormDTO implements Serializable { private static final long serialVersionUID = -6580433475773171870L; + public interface BranchBuildRankGroup extends CustomerClientShowGroup{} + /** * 机关Id * */ + @NotBlank(message = "机关Id不能为空",groups = BranchBuildRankGroup.class) private String agencyId; /** - * 支部建设情况:zbjs; 联建共建情况:ljgj;支部建设情况:zbjs; 联建共建情况:ljgj;联建党员志愿服务情况:ljdyzy + * 支部建设情况:zbjs; 联建共建情况:ljgj;联建党员志愿服务情况:ljdyzy * */ + @NotBlank(message = "类型key不能为空" , groups = BranchBuildRankGroup.class) private String category; /** * 默认显示前4,显示全部传入0 * */ private Integer topNum = NumConstant.FOUR; + + private String monthId; + + private String bottomMonthId; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java new file mode 100644 index 0000000000..d6ba6ae18b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java @@ -0,0 +1,23 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 查询机关组织次数、参加人数的排序返参 + * @ClassName BranchBuildOrderByCountResultDTO + * @Auth wangc + * @Date 2020-08-20 09:20 + */ +@Data +public class BranchBuildOrderByCountResultDTO implements Serializable { + private static final long serialVersionUID = -8268706123005848128L; + + private String orgName; + + private Integer organizeData; + + private Integer joinData; + +} 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/screen/ScreenPartyBranchDataDao.java index bd51bb6869..5b6bbbed94 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/screen/ScreenPartyBranchDataDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.BranchBuildOrderByCountResultDTO; import com.epmet.screen.dto.result.BranchIssueDataResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -51,4 +52,5 @@ public interface ScreenPartyBranchDataDao { **/ List selectBranchDataByTypeAndTimeZone(@Param("agencyId") String agencyId , @Param("type") String type, @Param("category") String category, @Param("bottomMonthId") String bottomMonthId); + List selectBranchDataByTypeOrder(String agencyId,String category,String monthId,String bottomMonthId); } \ 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/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java index 893f5115ce..09852df8aa 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 @@ -158,6 +158,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService **/ @Override public BranchBuildRankResultDTO branchBuildRank(BranchBuildRankFormDTO param) { + //TODO .. 传参为agencyId 返参的横坐标为agencyId数组,传入的agencyId是父Id?还是应该传入customerId return null; } @@ -176,8 +177,8 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService * @author wangc * @date 2020.08.19 12:46 **/ - private Map getX(){ - SimpleDateFormat format = new SimpleDateFormat("YYYYmm"); + 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); // 设置为上一个月 @@ -212,7 +213,10 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService public static void main(String[] args) { SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); - String currentMonth = format.format(new Date()); + 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; @@ -233,10 +237,10 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService i++; } - Map result = Maps.newLinkedHashMap(); - monthMap.entrySet().stream().sorted(Map.Entry.comparingByKey()) + monthMap.entrySet().stream().sorted(Map.Entry.comparingByKey()) .forEachOrdered((e -> result.put(e.getKey(),e.getValue()))); + result.forEach((k,v) -> { System.out.print(k); System.out.print(" -> "); 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 67b6006b05..1268f91a2b 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 @@ -38,7 +38,8 @@ ISSUE_CATEGORY_NAME - SELECT ORG_NAME, COUNT( ORGANIZE_COUNT ) AS organizeData, @@ -54,12 +55,14 @@ AND MONTH_ID = #{monthId} + AND MONTH_ID = ]]> #{bottomMonthId} ORDER BY + (organizeData + joinData) DESC, organizeData DESC, joinData DESC From 6ea8436111b8cc3c475c1a6b02d139fc8fdefee4 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 20 Aug 2020 10:11:00 +0800 Subject: [PATCH 036/360] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E8=83=BD=E5=8A=9B=20?= =?UTF-8?q?-=20=E6=8E=A5=E5=8F=A3=E5=85=A5=E5=8F=82=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/DeptGovrnAbilityFormDTO.java | 77 +++++++++++++ .../form/GridGovrnAbilityFormDTO.java | 82 ++++++++++++++ .../form/GridPartyAbilityFormDTO.java | 107 ++++++++++++++++++ .../form/GridPartyMemberDataFormDTO.java | 89 +++++++++++++++ .../form/GridServiceAbilityFormDTO.java | 58 ++++++++++ .../form/OrgGovrnAbilityFormDTO.java | 77 +++++++++++++ .../form/OrgPartyAbilityFormDTO.java | 53 +++++++++ .../form/OrgServiceAbilityFormDTO.java | 53 +++++++++ .../FactIndexCollectController.java | 5 + .../indexcollect/FactIndexCollectService.java | 12 ++ .../impl/FactIndexCollectServiceImpl.java | 10 ++ 11 files changed, 623 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java new file mode 100644 index 0000000000..50cc040c44 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 8、治理能力-部门相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class DeptGovrnAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 上级组织id + */ + private String deptId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * allRegion:全区;community:社区;street:街道 + */ + private String dataType; + + /** + * 区直部门被吹哨次数 + */ + private Integer transferedCount; + + /** + * 区直部门办结项目数 + */ + private Integer closedProjectCount; + + /** + * 区直部门项目响应度 所有被吹哨后的滞留时间除以项目数 + */ + private BigDecimal respProjectRatio; + + /** + * 区直部门办结项目的处理效率 + */ + private BigDecimal handleProjectRatio; + + /** + * 区直部门项目办结率 + */ + private BigDecimal closedProjectRatio; + + /** + * 办结项目满意度 + */ + private BigDecimal satisfactionRatio; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java new file mode 100644 index 0000000000..e289e15a02 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java @@ -0,0 +1,82 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 6、治理能力-网格相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class GridGovrnAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 网格id + */ + private String gridId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * 网格总议题数 + */ + private Integer issueTotal; + + /** + * 网格人均议题数目 + */ + private Integer avgIssueCount; + + /** + * 网格总项目数 + */ + private Integer projectTotal; + + /** + * 网格自治项目数 + */ + private Integer selfSolveProjectRatio; + + /** + * 网格办结项目数 + */ + private Integer resolveProjectTotal; + + /** + * 网格吹哨部门准确率 + */ + private BigDecimal transferRightRatio; + + /** + * 网格内解决的项目的满意度 + */ + private BigDecimal satisfactionRatio; + + /** + * 网格议题转项目率 + */ + private BigDecimal avgShiftProjectRatio; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java new file mode 100644 index 0000000000..8738c5c3f2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java @@ -0,0 +1,107 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 2、党建能力-网格相关指标上报(按照月份) 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class GridPartyAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 网格id + */ + private String gridId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * 网格党员用户数 + */ + private Integer partyCount; + + /** + * 网格党员人均提出的议题转项目数 + */ + private Integer partyAvgShiftProjectCount; + + /** + * 网格活跃群众用户数 + */ + private Integer activeUserCount; + + /** + * 网格活跃党员用户数 + */ + private Integer activePartyCount; + + /** + * 网格党员人均提出话题数 + */ + private Integer partyAvgTopicCount; + + /** + * 网格群众人均提出话题数 + */ + private Integer userAvgTopicCount; + + /** + * 网格群众用户数 + */ + private Integer userCount; + + /** + * 网格群众人均提出的议题转项目数 + */ + private Integer userAvgShiftProjectCount; + + /** + * 建群党员数(累计值) + */ + private Integer createGroupPartyCount; + + /** + * 网格发文数 + */ + private Integer publishArticleCount; + + /** + * 网格议题转项目率 + */ + private BigDecimal issueToProjectRatio; + + /** + * 组织三会一课次数 + */ + private Integer createThreeMeetsCount; + + /** + * 党员参加三会一课人次 + */ + private Integer joinThreeMeetsCount; +} 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 new file mode 100644 index 0000000000..20c6e0c0a6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java @@ -0,0 +1,89 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; +import org.apache.poi.hpsf.Decimal; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 1、党建能力-党员相关指标上报(按照月份) 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class GridPartyMemberDataFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 网格id + */ + private String gridId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * 党员提出的话题数 + */ + private Integer createTopicCount; + + /** + * 党员参与话题数(支持,反对,评论,浏览) + */ + private Integer joinTopicCount; + + /** + * 话题转议题数 + */ + private Integer shiftIssueCount; + + /** + * 议题转项目数 + */ + private Integer shiftProjectCount; + + /** + * 参加三会一课次数 + */ + private Integer joinThreeMeetsCount; + + /** + * 自建群群众人数 + */ + private Integer groupUserCount; + + /** + * 自建群活跃度-话题数 + */ + private Integer groupTopicCount; + + /** + * 议题转项目率 + */ + private BigDecimal topicToIssueRatio; + + /** + * 提出的议题转项目数 + */ + private Integer issueToProjectCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java new file mode 100644 index 0000000000..02b7906a36 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityFormDTO.java @@ -0,0 +1,58 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 4、服务能力-网格相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class GridServiceAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 网格id + */ + private String gridId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * 网格活动组织次数 爱心活动 + */ + private Integer activityCount; + + /** + * 网格志愿者占比 + */ + private Integer volunteerRatio; + + /** + * 网格党员志愿者率 + */ + private BigDecimal partyVolunteerRatio; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java new file mode 100644 index 0000000000..7ddb9e785a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java @@ -0,0 +1,77 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 7、治理能力-街道及社区相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class OrgGovrnAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * allRegion:全区;community:社区;street:街道 + */ + private String dataType; + + /** + * 被吹哨次数 + */ + private Integer transferedCount; + + /** + * 办结项目数 + */ + private Integer closedProjectCount; + + /** + * 项目响应度 所有被吹哨后的滞留时间除以项目数 + */ + private BigDecimal respProjectRatio; + + /** + * 办结项目率 + */ + private BigDecimal closedProjectRatio; + + /** + * 办结项目满意度 + */ + private BigDecimal satisfactionRatio; + + /** + * 超期项目率 + */ + private BigDecimal overdueProjectRatio; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java new file mode 100644 index 0000000000..e5ad40ef3f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java @@ -0,0 +1,53 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 3、党建能力-街道及社区相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class OrgPartyAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * allRegion:全区;community:社区;street:街道 + */ + private String dataType; + + /** + * 发文数 + */ + private Integer publishArticleCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java new file mode 100644 index 0000000000..9b95c02bda --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java @@ -0,0 +1,53 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 5、服务能力-组织(街道|社区|全区)相关指标 入参 + * @Auther: zhangyong + * @Date: 2020-08-18 09:59 + */ +@Data +public class OrgServiceAbilityFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * allRegion:全区;community:社区;street:街道 + */ + private Integer dataType; + + /** + * 社区/街道活动组织次数 爱心活动 + */ + private Integer activityCount; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java index 83d05006a4..00428efa4d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java @@ -1,5 +1,7 @@ package com.epmet.controller; +import com.epmet.service.indexcollect.FactIndexCollectService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -12,4 +14,7 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("indexcollect") public class FactIndexCollectController { + + @Autowired + private FactIndexCollectService factIndexCollectService; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java new file mode 100644 index 0000000000..fb0cdd71f5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java @@ -0,0 +1,12 @@ +package com.epmet.service.indexcollect; + +/** + * 大屏数据采集api + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/18 10:25 + */ +public interface FactIndexCollectService { + + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java new file mode 100644 index 0000000000..b030657f68 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java @@ -0,0 +1,10 @@ +package com.epmet.service.indexcollect.impl; + +import com.epmet.service.indexcollect.FactIndexCollectService; + +/** + * @Auther: zhangyong + * @Date: 2020-08-20 10:05 + */ +public class FactIndexCollectServiceImpl implements FactIndexCollectService { +} From bea1873c14cda484d93c3a55f15a669e10784b35 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 20 Aug 2020 11:13:38 +0800 Subject: [PATCH 037/360] =?UTF-8?q?4=E3=80=81=E4=B8=8B=E7=BA=A7=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E6=8C=87=E6=95=B0=E6=8E=92=E8=A1=8C,3=E3=80=81?= =?UTF-8?q?=E6=9C=88=E5=BA=A6=E6=8C=87=E6=95=B0=E5=88=86=E6=9E=90-?= =?UTF-8?q?=E6=9F=B1=E7=8A=B6=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/NumConstant.java | 2 + .../screen/dto/form/MonthBarchartFormDTO.java | 24 ++++++ .../screen/dto/form/ProjectDetailFormDTO.java | 24 ++++++ .../dto/form/SubAgencyIndexRankFormDTO.java | 33 ++++++++ .../dto/result/MonthBarchartResult.java | 25 ++++++ .../dto/result/MonthBarchartResultDTO.java | 42 ++++++++++ .../dto/result/ProjectDetailResultDTO.java | 46 +++++++++++ .../result/SubAgencyIndexRankResultDTO.java | 40 ++++++++++ .../controller/screen/IndexController.java | 32 ++++++++ .../screen/ScreenProjectController.java | 28 ++++++- .../dao/screen/ScreenEventDataDao.java | 9 +++ .../dao/screen/ScreenEventImgDataDao.java | 11 +++ .../dao/screen/ScreenIndexDataMonthlyDao.java | 23 ++++++ .../service/screen/IndexService.java | 23 ++++++ .../service/screen/ScreenProjectService.java | 12 +++ .../service/screen/impl/IndexServiceImpl.java | 80 ++++++++++++++++++- .../screen/impl/ScreenProjectServiceImpl.java | 29 +++++++ .../mapper/screen/ScreenEventDataDao.xml | 15 ++++ .../mapper/screen/ScreenEventImgDataDao.xml | 12 ++- .../screen/ScreenIndexDataMonthlyDao.xml | 36 +++++++++ 20 files changed, 541 insertions(+), 5 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java index 0c7b46ef93..0ac7dbf706 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java @@ -37,6 +37,8 @@ public interface NumConstant { int MAX = 99999999; int EIGHTY_EIGHT = 88; + double ZERO_DOT_ZERO = 0.0; + long ZERO_L = 0L; long ONE_L = 1L; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java new file mode 100644 index 0000000000..ad454ff8dc --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 5:20 下午 + */ +@Data +public class MonthBarchartFormDTO implements Serializable { + + private static final long serialVersionUID = 4852721296827851714L; + + public interface MonthBarchart{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {MonthBarchart.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java new file mode 100644 index 0000000000..32359cb03e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/19 4:34 下午 + */ +@Data +public class ProjectDetailFormDTO implements Serializable { + + private static final long serialVersionUID = 6588246858516674808L; + + public interface ProjectDetail{} + + /** + * 项目ID + */ + @NotBlank(message = "项目ID不能为空",groups = {ProjectDetail.class}) + private String projectId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java new file mode 100644 index 0000000000..0ff2012301 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 9:54 上午 + */ +@Data +public class SubAgencyIndexRankFormDTO implements Serializable { + + private static final long serialVersionUID = -2920561669035794486L; + + public interface SubAgencyIndexRank{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {SubAgencyIndexRank.class}) + private String agencyId; + + /** + * 默认查询前几名 + */ + @NotNull(message = "默认查询名次不能为空",groups = {SubAgencyIndexRank.class}) + private Integer topNum; + + private String monthId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java new file mode 100644 index 0000000000..ebf0d9d276 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java @@ -0,0 +1,25 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 9:12 上午 + */ +@Data +public class MonthBarchartResult implements Serializable { + + private static final long serialVersionUID = 3777652772902180088L; + + private String monthId; + + private Double serviceAbility; + + private Double partyDevAbility; + + private Double governAbility; + + private Double indexTotal; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java new file mode 100644 index 0000000000..479547a883 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java @@ -0,0 +1,42 @@ +package com.epmet.screen.dto.result; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/19 5:23 下午 + */ +@Data +public class MonthBarchartResultDTO implements Serializable { + + private static final long serialVersionUID = 561457498288576566L; + + /** + * 服务能力 + */ + private List serviceAbilityData; + + /** + * 党建能力 + */ + private List partyDevAbilityData; + + /** + * 治理能力 + */ + private List governAbilityData; + + /** + * 横坐标月份集合 + */ + private List xAxis; + + /** + * 总指数集合 + */ + private List totalIndexData; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java new file mode 100644 index 0000000000..b560620d9a --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java @@ -0,0 +1,46 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/19 4:37 下午 + */ +@Data +public class ProjectDetailResultDTO implements Serializable { + + private static final long serialVersionUID = 2884179183725459493L; + + /** + * 项目内容 + */ + private String projectContent = ""; + + /** + * 当前状态 + */ + private String status = ""; + + /** + * 最后一次处理的部门 + */ + private String latestHandleDept = ""; + + /** + * 最后一次处理的时间yyyy-MM-dd HH:mm + */ + private String latestHandleTime = ""; + + /** + * 操作描述 + */ + private String operDesc = ""; + + /** + * 图片列表 + */ + private List imgList; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java new file mode 100644 index 0000000000..5b0d89f39f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java @@ -0,0 +1,40 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 9:58 上午 + */ +@Data +public class SubAgencyIndexRankResultDTO implements Serializable { + + private static final long serialVersionUID = -2767000156092731932L; + + /** + * 名称(组织或者网格名称,部门名称) + */ + private String name = ""; + + /** + * 总指数 + */ + private Double totalIndex = 0.0; + + /** + * 党建能力 + */ + private Double governAbility = 0.0; + + /** + * 治理能力 + */ + private Double partyDevAbility = 0.0; + + /** + * 服务能力 + */ + private Double serviceAbility = 0.0; +} 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 ce74b4b766..53b69591b4 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,12 +1,17 @@ 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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -14,6 +19,8 @@ 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; + /** * 指数相关相关各指标查询 * @@ -53,5 +60,30 @@ public class IndexController { return new Result().ok(indexService.monthPieChart(monthPieChartFormDTO)); } + /** + * @Description 3、月度指数分析-柱状图 + * @param monthBarchartFormDTO + * @author zxc + * @date 2020/8/19 5:27 下午 + */ + @ExternalAppRequestAuth + @PostMapping("monthindexanalysis/barchart") + public Result monthBarchart(@RequestBody MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam){ + ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class); + return new Result().ok(indexService.monthBarchart(monthBarchartFormDTO,externalAppRequestParam)); + } + + /** + * @Description 4、下级部门指数排行 + * @param subAgencyIndexRankFormDTO + * @author zxc + * @date 2020/8/20 10:02 上午 + */ + @ExternalAppRequestAuth + @PostMapping("subagencyindexrank") + public Result> subAgencyIndexRank(@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){ + ValidatorUtils.validateEntity(subAgencyIndexRankFormDTO, SubAgencyIndexRankFormDTO.SubAgencyIndexRank.class); + return new Result>().ok(indexService.subAgencyIndexRank(subAgencyIndexRankFormDTO)); + } } 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 a28be5899b..2718fcca1e 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,5 +1,14 @@ 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 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; @@ -9,7 +18,24 @@ import org.springframework.web.bind.annotation.RestController; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:16 */ -@RestController("screeproject") +@RestController @RequestMapping("/screen/project") public class ScreenProjectController { + + @Autowired + private ScreenProjectService screenProjectService; + + /** + * @Description 3、项目详情 + * @param projectDetailFormDTO + * @author zxc + * @date 2020/8/19 4:36 下午 + */ + @ExternalAppRequestAuth + @PostMapping("deatil") + public Result projectDetail(@RequestBody ProjectDetailFormDTO projectDetailFormDTO){ + ValidatorUtils.validateEntity(projectDetailFormDTO, ProjectDetailFormDTO.ProjectDetail.class); + return new Result().ok(screenProjectService.projectDetail(projectDetailFormDTO)); + } + } 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/screen/ScreenEventDataDao.java index 362ada2193..92f1641cce 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/screen/ScreenEventDataDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.ProjectDetailResultDTO; import com.epmet.screen.dto.result.ProjectResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -40,4 +41,12 @@ public interface ScreenEventDataDao{ */ List selectEvent(@Param("parentId")String parentId); + /** + * @Description 3、项目详情 + * @param projectId + * @author zxc + * @date 2020/8/19 4:36 下午 + */ + ProjectDetailResultDTO selectEventDetail(@Param("projectId")String projectId); + } \ 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/screen/ScreenEventImgDataDao.java index 28809db0ce..8090ce00c7 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/screen/ScreenEventImgDataDao.java @@ -18,6 +18,9 @@ package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 中央区-事件数据图片数据 @@ -27,5 +30,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenEventImgDataDao { + + /** + * @Description 查询事件imgUrl集合 + * @param projectId + * @author zxc + * @date 2020/8/19 5:11 下午 + */ + List selectEventImgList(@Param("projectId")String projectId); } \ No newline at end of file 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/screen/ScreenIndexDataMonthlyDao.java index f27f9f4fb8..2e18647c39 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/screen/ScreenIndexDataMonthlyDao.java @@ -17,10 +17,16 @@ package com.epmet.datareport.dao.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 org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 指数-指数数据 * @@ -37,5 +43,22 @@ public interface ScreenIndexDataMonthlyDao{ * @date 2020/8/19 3:43 下午 */ MonthPieChartResultDTO selectMonthPieChart(@Param("agencyId")String agencyId); + + /** + * @Description 查询近一年的指数值【不包括本月】 + * @param customerId + * @param agencyId + * @author zxc + * @date 2020/8/20 9:02 上午 + */ + List selectMonthBarchart(@Param("customerId")String customerId, @Param("agencyId")String agencyId); + + /** + * @Description 4、下级部门指数排行 + * @param subAgencyIndexRankFormDTO + * @author zxc + * @date 2020/8/20 10:04 上午 + */ + List selectSubAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO); } \ No newline at end of file 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/screen/IndexService.java index 4eba79bd88..5c0b5e4ade 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/screen/IndexService.java @@ -1,10 +1,17 @@ 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; +import java.util.List; + /** * 指数相关相关各指标查询 * @@ -29,4 +36,20 @@ public interface IndexService { */ MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO); + /** + * @Description 3、月度指数分析-柱状图 + * @param monthBarchartFormDTO + * @author zxc + * @date 2020/8/19 5:27 下午 + */ + MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam); + + /** + * @Description 4、下级部门指数排行 + * @param subAgencyIndexRankFormDTO + * @author zxc + * @date 2020/8/20 10:04 上午 + */ + List subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO); + } 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/screen/ScreenProjectService.java index 51354ec4f6..78543bc52f 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/screen/ScreenProjectService.java @@ -1,5 +1,8 @@ package com.epmet.datareport.service.screen; +import com.epmet.screen.dto.form.ProjectDetailFormDTO; +import com.epmet.screen.dto.result.ProjectDetailResultDTO; + /** * 项目 * @@ -7,4 +10,13 @@ package com.epmet.datareport.service.screen; * @date 2020/8/18 10:22 */ public interface ScreenProjectService { + + /** + * @Description 3、项目详情 + * @param projectDetailFormDTO + * @author zxc + * @date 2020/8/19 4:36 下午 + */ + ProjectDetailResultDTO projectDetail(ProjectDetailFormDTO projectDetailFormDTO); + } 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/screen/impl/IndexServiceImpl.java index 9db0ebca3c..7ad1c645b4 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/screen/impl/IndexServiceImpl.java @@ -1,15 +1,25 @@ package com.epmet.datareport.service.screen.impl; +import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.constant.NumConstant; 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.MonthPieChartResultDTO; -import com.epmet.screen.dto.result.YearAverageIndexResultDTO; +import com.epmet.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + /** * 指数相关相关各指标查询 * @@ -23,6 +33,8 @@ public class IndexServiceImpl implements IndexService { private ScreenIndexDataYearlyDao screenIndexDataYearlyDao; @Autowired private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao; + @Autowired + private GrassrootsPartyDevServiceImpl grassrootsPartyDevServiceImpl; /** * @Description 1、年度平均指数 @@ -53,4 +65,68 @@ public class IndexServiceImpl implements IndexService { } return monthPieChartResultDTO; } + + /** + * @Description 3、月度指数分析-柱状图 + * @param monthBarchartFormDTO + * @author zxc + * @date 2020/8/19 5:27 下午 + */ + @Override + public MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam) { + String customerId = externalAppRequestParam.getCustomerId(); + MonthBarchartResultDTO result = new MonthBarchartResultDTO(); + List serviceAbilityData = new ArrayList<>(); + List partyDevAbilityData = new ArrayList<>(); + List governAbilityData = new ArrayList<>(); + List totalIndexData = new ArrayList<>(); + // 1. x轴 + Map x = grassrootsPartyDevServiceImpl.getX(); + result.setXAxis(x.values().stream().collect(Collectors.toList())); + // 2. 查询近一年的指数值【不包括本月】 + List monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(customerId, monthBarchartFormDTO.getAgencyId()); + if (monthBarchartResults.size() == NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) { + serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO); + partyDevAbilityData.add(NumConstant.ZERO_DOT_ZERO); + governAbilityData.add(NumConstant.ZERO_DOT_ZERO); + totalIndexData.add(NumConstant.ZERO_DOT_ZERO); + } + result.setServiceAbilityData(serviceAbilityData); + result.setPartyDevAbilityData(partyDevAbilityData); + result.setGovernAbilityData(governAbilityData); + result.setTotalIndexData(totalIndexData); + return result; + } + List collect = monthBarchartResults.stream().sorted(Comparator.comparing(MonthBarchartResult::getMonthId)).collect(Collectors.toList()); + 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); + result.setTotalIndexData(totalIndexData); + return result; + } + + /** + * @Description 4、下级部门指数排行 + * @param subAgencyIndexRankFormDTO + * @author zxc + * @date 2020/8/20 10:04 上午 + */ + @Override + public List subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO) { + LocalDate now = LocalDate.now().minusMonths(NumConstant.ONE); + String monthId = now.toString().substring(NumConstant.ZERO,NumConstant.FOUR).concat(now.toString().substring(NumConstant.FIVE,NumConstant.SEVEN)); + subAgencyIndexRankFormDTO.setMonthId(monthId); + List subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectSubAgencyIndexRank(subAgencyIndexRankFormDTO); + if (subAgencyIndexRankResultDTOS.size() == NumConstant.ZERO){ + return new ArrayList<>(); + } + return subAgencyIndexRankResultDTOS; + } } 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/screen/impl/ScreenProjectServiceImpl.java index 5a09c8ce83..411fd15230 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/screen/impl/ScreenProjectServiceImpl.java @@ -1,8 +1,15 @@ package com.epmet.datareport.service.screen.impl; +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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * 项目 * @@ -11,4 +18,26 @@ import org.springframework.stereotype.Service; */ @Service public class ScreenProjectServiceImpl implements ScreenProjectService { + + @Autowired + private ScreenEventDataDao screenEventDataDao; + @Autowired + private ScreenEventImgDataDao screenEventImgDataDao; + + /** + * @Description 3、项目详情 + * @param projectDetailFormDTO + * @author zxc + * @date 2020/8/19 4:36 下午 + */ + @Override + public ProjectDetailResultDTO projectDetail(ProjectDetailFormDTO projectDetailFormDTO) { + ProjectDetailResultDTO projectDetailResultDTO = screenEventDataDao.selectEventDetail(projectDetailFormDTO.getProjectId()); + if (null == projectDetailResultDTO){ + return new ProjectDetailResultDTO(); + } + List imgList = screenEventImgDataDao.selectEventImgList(projectDetailFormDTO.getProjectId()); + projectDetailResultDTO.setImgList(imgList); + return projectDetailResultDTO; + } } \ No newline at end of file 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 6cfafcf70a..63cadbbd5e 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 @@ -18,4 +18,19 @@ del_flag = '0' AND parent_id = #{parentId} + + + \ 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 a95efe13ad..e5e3e636af 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 @@ -3,6 +3,14 @@ - - + + \ No newline at end of file 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 bee1716ec6..78d6ced4c1 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 @@ -17,4 +17,40 @@ AND org_id = #{agencyId} AND month_id = DATE_FORMAT(NOW(),'%Y%m') + + + + + + \ No newline at end of file From 57909e4ba31774ffcf213852be609cddddecb0a9 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 20 Aug 2020 14:59:22 +0800 Subject: [PATCH 038/360] =?UTF-8?q?=E6=8C=87=E6=95=B0=E9=87=87=E9=9B=86=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexCollectController.java | 136 ++++++++++++++++++ .../FactIndexGovrnAblityDeptMonthlyDao.java | 30 +++- .../FactIndexGovrnAblityGridMonthlyDao.java | 31 +++- .../FactIndexGovrnAblityOrgMonthlyDao.java | 37 ++++- .../FactIndexPartyAblityCpcMonthlyDao.java | 31 +++- .../FactIndexPartyAblityGridMonthlyDao.java | 31 +++- .../FactIndexPartyAblityOrgMonthlyDao.java | 38 ++++- .../FactIndexServiceAblityGridMonthlyDao.java | 28 +++- .../FactIndexServiceAblityOrgMonthlyDao.java | 38 ++++- .../indexcollect/FactIndexCollectService.java | 98 +++++++++++++ .../impl/FactIndexCollectServiceImpl.java | 132 +++++++++++++++++ .../FactIndexGovrnAblityDeptMonthlyDao.xml | 55 ++++++- .../FactIndexGovrnAblityGridMonthlyDao.xml | 59 +++++++- .../FactIndexGovrnAblityOrgMonthlyDao.xml | 60 +++++++- .../FactIndexPartyAblityCpcMonthlyDao.xml | 67 ++++++++- .../FactIndexPartyAblityGridMonthlyDao.xml | 70 ++++++++- .../FactIndexPartyAblityOrgMonthlyDao.xml | 53 ++++++- .../FactIndexServiceAblityGridMonthlyDao.xml | 50 ++++++- .../FactIndexServiceAblityOrgMonthlyDao.xml | 52 ++++++- 19 files changed, 1060 insertions(+), 36 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java index 00428efa4d..7c12fec411 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java @@ -1,10 +1,18 @@ 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.indexcollect.form.*; import com.epmet.service.indexcollect.FactIndexCollectService; 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 * @@ -17,4 +25,132 @@ public class FactIndexCollectController { @Autowired private FactIndexCollectService factIndexCollectService; + + /** + * 1、党建能力-党员相关指标上报(按照月份) + * + * @param externalAppRequestParam + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + @ExternalAppRequestAuth + @PostMapping("gridpartymemberdata") + public Result gridPartyMemberData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { + factIndexCollectService.insertGridPartyMemberData(formDTO, externalAppRequestParam.getCustomerId()); + 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/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index 2e9922e8c4..f3725d5811 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -17,16 +17,40 @@ package com.epmet.dao.indexcoll; /** import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; 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-20 */ @Mapper public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao { - -} \ No newline at end of file + /** + * 8、治理能力-部门相关指标 + * 据CUSTOMER_ID、AGENCY_ID、DEPT_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexGovrnAblityDeptMonthly(DeptGovrnAbilityFormDTO formDTO, @Param("customerId") String customerId); + + /** + * 8、治理能力-部门相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexGovrnAblityDeptMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index 1bd3057274..0033c4c323 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -18,16 +18,41 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; 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-20 */ @Mapper public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao { - -} \ No newline at end of file + + /** + * 6、治理能力-网格相关指标 + * 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexGovrnAblityGridMonthly(GridGovrnAbilityFormDTO formDTO, @Param("customerId") String customerId); + + /** + * 6、治理能力-网格相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexGovrnAblityGridMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java index dcce6fe74d..9013d4f9cf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java @@ -18,16 +18,47 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.OrgGovrnAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; 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-20 */ @Mapper public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao { - -} \ No newline at end of file + /** + * 7、治理能力-街道及社区相关指标 + * 据CUSTOMER_ID、AGENCY_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param quarterId + * @param agencyIds + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexGovrnAblityOrgMonthly(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId, + @Param("agencyIds") String[] agencyIds); + + /** + * 7、治理能力-街道及社区相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexGovrnAblityOrgMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index 3f8ef7ab22..d482b78e75 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -18,16 +18,41 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO; import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; 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-20 */ @Mapper public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao { - -} \ No newline at end of file + + /** + * 1、党建能力-党员相关指标上报(按照月份) + * 1) 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、USER_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexPartyAblityCpcMonthly(GridPartyMemberDataFormDTO formDTO, @Param("customerId") String customerId); + + /** + * 1、党建能力-党员相关指标上报(按照月份) + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexPartyAblityCpcMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index dcebc723ce..7ffb311067 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -18,16 +18,41 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; 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-20 */ @Mapper public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao { - -} \ No newline at end of file + + /** + * 2、党建能力-网格相关指标上报(按照月份) + * 1) 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexPartyAblityGridMonthly(GridPartyAbilityFormDTO formDTO, @Param("customerId") String customerId); + + /** + * 2、党建能力-网格相关指标上报(按照月份) + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexPartyAblityGridMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 0817e24f06..73a73a1c50 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -18,16 +18,48 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.OrgPartyAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; 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-20 */ @Mapper public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao { - -} \ No newline at end of file + + /** + * 3、党建能力-街道及社区相关指标 + * 根据CUSTOMER_ID、AGENCY_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param quarterId + * @param agencyIds + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexPartyAblityOrgMonthly(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId, + @Param("agencyIds") String[] agencyIds); + + /** + * 3、党建能力-街道及社区相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexPartyAblityOrgMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java index 8beb4263fc..0f37c41733 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -18,8 +18,12 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 服务能力-网格相关事实表 @@ -29,5 +33,25 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao { - -} \ No newline at end of file + /** + * 4、服务能力-网格相关指标 + * 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexServiceAblityGridMonthly(GridServiceAbilityFormDTO formDTO, @Param("customerId") String customerId); + + /** + * 4、服务能力-网格相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexServiceAblityGridMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index 3cf7fc6cf7..31c268cd75 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -18,16 +18,48 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.OrgServiceAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; 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-20 */ @Mapper public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao { - -} \ No newline at end of file + + /** + * 5、服务能力-组织(街道|社区|全区)相关指标 + * 根据CUSTOMER_ID、AGENCY_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param customerId + * @param yearId + * @param monthId + * @param quarterId + * @param agencyIds + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void deleteFactIndexServiceAblityOrgMonthly(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("quarterId") String quarterId, + @Param("agencyIds") String[] agencyIds); + + /** + * 5、服务能力-组织(街道|社区|全区)相关指标 + * 2) 在批量新增 + * + * @param list + * @param customerId + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void batchInsertFactIndexServiceAblityOrgMonthly(@Param("list") List list, @Param("customerId")String customerId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java index fb0cdd71f5..c9d876996b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/FactIndexCollectService.java @@ -1,5 +1,9 @@ package com.epmet.service.indexcollect; +import com.epmet.dto.indexcollect.form.*; + +import java.util.List; + /** * 大屏数据采集api * @@ -8,5 +12,99 @@ package com.epmet.service.indexcollect; */ public interface FactIndexCollectService { + /** + * 1、党建能力-党员相关指标上报(按照月份) + * 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、USER_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertGridPartyMemberData(List formDTO, String customerId); + + /** + * 2、党建能力-网格相关指标上报(按照月份) + * 根据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertGridPartyAbility(List formDTO, String customerId); + + /** + * 3、党建能力-街道及社区相关指标 + * 根据CUSTOMER_ID、AGENCY_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertOrgPartyAbility(List formDTO, String customerId); + + /** + * 4、服务能力-网格相关指标 + * 据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertGridServiceAbility(List formDTO, String customerId); + + /** + * 5、服务能力-组织(街道|社区|全区)相关指标 + * 据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertOrgServiceAbility(List formDTO, String customerId); + + /** + * 6、治理能力-网格相关指标 + * 据CUSTOMER_ID、AGENCY_ID、GRID_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertGridGovrnAbility(List formDTO, String customerId); + + /** + * 7、治理能力-街道及社区相关指标 + * 据CUSTOMER_ID、AGENCY_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertOrgGovrnAbility(List formDTO, String customerId); + /** + * 8、治理能力-部门相关指标 + * 据CUSTOMER_ID、AGENCY_ID、DEPT_ID、YEAR_ID、MONTH_ID、QUARTER_ID进行查询,如果有数据,则先进行物理删除 + * + * @param formDTO + * @param customerId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 10:52 2020-08-20 + **/ + void insertDeptGovrnAbility(List formDTO, String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java index b030657f68..0a747c1e74 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java @@ -1,10 +1,142 @@ package com.epmet.service.indexcollect.impl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.dao.indexcoll.*; +import com.epmet.dto.indexcollect.form.*; import com.epmet.service.indexcollect.FactIndexCollectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; /** * @Auther: zhangyong * @Date: 2020-08-20 10:05 */ +@Service public class FactIndexCollectServiceImpl implements FactIndexCollectService { + + @Autowired + private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; + @Autowired + private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao; + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGridPartyMemberData(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(formDTO.get(i), customerId); + } + factIndexPartyAblityCpcMonthlyDao.batchInsertFactIndexPartyAblityCpcMonthly(formDTO, customerId); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGridPartyAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + factIndexPartyAblityGridMonthlyDao.deleteFactIndexPartyAblityGridMonthly(formDTO.get(i), customerId); + } + factIndexPartyAblityGridMonthlyDao.batchInsertFactIndexPartyAblityGridMonthly(formDTO, customerId); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void insertOrgPartyAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] agencyIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + agencyIds[i] = formDTO.get(i).getAgencyId(); + } + factIndexPartyAblityOrgMonthlyDao.deleteFactIndexPartyAblityOrgMonthly(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + formDTO.get(NumConstant.ZERO).getQuarterId(), + agencyIds); + factIndexPartyAblityOrgMonthlyDao.batchInsertFactIndexPartyAblityOrgMonthly(formDTO, customerId); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGridServiceAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + factIndexServiceAblityGridMonthlyDao.deleteFactIndexServiceAblityGridMonthly(formDTO.get(i), customerId); + } + factIndexServiceAblityGridMonthlyDao.batchInsertFactIndexServiceAblityGridMonthly(formDTO, customerId); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void insertOrgServiceAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] agencyIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + agencyIds[i] = formDTO.get(i).getAgencyId(); + } + factIndexServiceAblityOrgMonthlyDao.deleteFactIndexServiceAblityOrgMonthly(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + formDTO.get(NumConstant.ZERO).getQuarterId(), + agencyIds); + factIndexServiceAblityOrgMonthlyDao.batchInsertFactIndexServiceAblityOrgMonthly(formDTO, customerId); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void insertGridGovrnAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + factIndexGovrnAblityGridMonthlyDao.deleteFactIndexGovrnAblityGridMonthly(formDTO.get(i), customerId); + } + factIndexGovrnAblityGridMonthlyDao.batchInsertFactIndexGovrnAblityGridMonthly(formDTO, customerId); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void insertOrgGovrnAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + String[] agencyIds = new String[formDTO.size()]; + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + agencyIds[i] = formDTO.get(i).getAgencyId(); + } + factIndexGovrnAblityOrgMonthlyDao.deleteFactIndexGovrnAblityOrgMonthly(customerId, + formDTO.get(NumConstant.ZERO).getYearId(), + formDTO.get(NumConstant.ZERO).getMonthId(), + formDTO.get(NumConstant.ZERO).getQuarterId(), + agencyIds); + factIndexGovrnAblityOrgMonthlyDao.batchInsertFactIndexGovrnAblityOrgMonthly(formDTO, customerId); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void insertDeptGovrnAbility(List formDTO, String customerId) { + if (null != formDTO && formDTO.size() > NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + factIndexGovrnAblityDeptMonthlyDao.deleteFactIndexGovrnAblityDeptMonthly(formDTO.get(i), customerId); + } + factIndexGovrnAblityDeptMonthlyDao.batchInsertFactIndexGovrnAblityDeptMonthly(formDTO, customerId); + } + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml index f6261e5e6b..107b94abc1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml @@ -25,5 +25,58 @@ + + delete from fact_index_govrn_ablity_dept_monthly + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND DEPT_ID = #{deptId} + AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} + - \ No newline at end of file + + insert into fact_index_govrn_ablity_dept_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + DEPT_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + TRANSFERED_COUNT, + CLOSED_PROJECT_COUNT, + RESP_PROJECT_RATIO, + HANDLE_PROJECT_RATIO, + CLOSED_PROJECT_RATIO, + SATISFACTION_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.deptId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.transferedCount}, + #{item.closedProjectCount}, + #{item.respProjectRatio}, + #{item.handleProjectRatio}, + #{item.closedProjectRatio}, + #{item.satisfactionRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml index 2b88158a9a..6200f537aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -27,5 +27,62 @@ + + delete from fact_index_govrn_ablity_grid_monthly + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND USER_ID = #{userId} + AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} + - \ No newline at end of file + + insert into fact_index_govrn_ablity_grid_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + GRID_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + ISSUE_TOTAL, + AVG_ISSUE_COUNT, + AVG_SHIFT_PROJECT_RATIO, + PROJECT_TOTAL, + SELF_SOLVE_PROJECT_COUNT, + RESOLVE_PROJECT_COUNT, + TRANSFER_RIGHT_RATIO, + SATISFACTION_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.gridId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.issueTotal}, + #{item.avgIssueCount}, + #{item.avgShiftProjectRatio}, + #{item.projectTotal}, + #{item.selfSolveProjectCount}, + #{item.resolveProjectCount}, + #{item.transferRightRatio}, + #{item.satisfactionRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index 1c5d52a23b..36e4d07b3a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -26,5 +26,63 @@ + + delete from fact_index_govrn_ablity_org_monthly + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId} + AND AGENCY_ID IN + + #{item} + + - \ No newline at end of file + + insert into fact_index_govrn_ablity_org_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + PARENT_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + DATA_TYPE, + TRANSFERED_COUNT, + CLOSED_PROJECT_COUNT, + RESP_PROJECT_RATIO, + CLOSED_PROJECT_RATIO, + SATISFACTION_RATIO, + OVERDUE_PROJECT_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.parentId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.dataType}, + #{item.transferedCount}, + #{item.closedProjectCount}, + #{item.respProjectRatio}, + #{item.closedProjectRatio}, + #{item.satisfactionRatio}, + #{item.overdueProjectRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + 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 b1a6e0d616..836adcdb03 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 @@ -1,7 +1,7 @@ - + @@ -30,5 +30,68 @@ + + delete from fact_index_party_ablity_cpc_monthly + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND USER_ID = #{userId} + AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} + - \ No newline at end of file + + insert into fact_index_party_ablity_cpc_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + PARENT_ID, + GRID_ID, + USER_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + CREATE_TOPIC_COUNT, + JOIN__TOPIC_COUNT, + SHIFT_ISSUE_COUNT, + SHIFT_PROJECT_COUNT, + JOIN_THREE_MEETS_COUNT, + GROUP_USER_COUNT, + GROUP_TOPIC_COUNT, + TOPIC_TO_ISSUE_RATIO, + ISSUE_TO_PROJECT_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.parentId}, + #{item.gridId}, + #{item.userId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.createTopicCount}, + #{item.joinTopicCount}, + #{item.shiftIssueCount}, + #{item.shiftProjectCount}, + #{item.joinThreeMeetsCount}, + #{item.groupUserCount}, + #{item.groupTopicCount}, + #{item.topicToIssueRatio}, + #{item.issueToProjectCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml index 7f58b377f2..e51a7d4f7f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml @@ -1,7 +1,7 @@ - + @@ -32,5 +32,71 @@ + + delete from fact_index_party_ablity_grid_monthly + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} + AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId} + - \ No newline at end of file + + insert into fact_index_party_ablity_grid_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + GRID_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + USER_COUNT, + PARTY_COUNT, + ACTIVE_USER_COUNT, + ACTIVE_PARTY_COUNT, + PARTY_AVG_TOPIC_COUNT, + USER_AVG_TOPIC_COUNT, + PARTY_AVG_SHIFT_PROJECT_COUNT, + USER_AVG_SHIFT_PROJECT_COUNT, + CREATE_GROUP_PARTY_COUNT, + PUBLISH_ARTICLE_COUNT, + ISSUE_TO_PROJECT_RATIO, + CREATE_THREE_MEETS_COUNT, + JOIN_THREE_MEETS_COUNT, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.gridId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.userCount}, + #{item.partyCount}, + #{item.activeUserCount}, + #{item.activePartyCount}, + #{item.partyAvgTopicCount}, + #{item.userAvgTopicCount}, + #{item.partyAvgShiftProjectCount}, + #{item.userAvgShiftProjectCount}, + #{item.createGroupPartyCount}, + #{item.publishArticleCount}, + #{item.issueToProjectRatio}, + #{item.createThreeMeetsCount}, + #{item.joinThreeMeetsCount}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 1b3299d367..758a686052 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -1,7 +1,7 @@ - + @@ -21,5 +21,54 @@ + + delete from fact_index_party_ablity_org_monthly + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId} + AND AGENCY_ID IN + + #{item} + + - \ No newline at end of file + + insert into fact_index_party_ablity_org_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + PARENT_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + PUBLISH_ARTICLE_COUNT, + DATA_TYPE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.parentId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.publishArticleCount}, + #{item.dataType}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml index 8b7c42b41d..bc4348ea56 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml @@ -1,7 +1,7 @@ - + @@ -22,5 +22,51 @@ + + delete from fact_index_service_ablity_grid_monthly + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} + AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId} + - \ No newline at end of file + + insert into fact_index_service_ablity_grid_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + GRID_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + ACTIVITY_COUNT, + VOLUNTEER_RATIO, + PARTY_VOLUNTEER_RATIO, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.gridId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.activityCount}, + #{item.volunteerRatio}, + #{item.partyVolunteerRatio}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml index 24556d1dd4..c475e2aca1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -1,7 +1,7 @@ - + @@ -21,5 +21,53 @@ + + delete from fact_index_service_ablity_org_monthly + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId} + AND AGENCY_ID IN + + #{item} + + - \ No newline at end of file + + insert into fact_index_service_ablity_org_monthly + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + PARENT_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + ACTIVITY_COUNT, + DATA_TYPE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.parentId}, + #{item.monthId}, + #{item.quarterId}, + #{item.yearId}, + #{item.activityCount}, + #{item.dataType}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + From ed1c7caacf39f03b3b5b4441f71d8a2d04ee203b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 20 Aug 2020 15:03:32 +0800 Subject: [PATCH 039/360] =?UTF-8?q?2=E3=80=81=E5=85=9A=E5=91=98=E8=81=94?= =?UTF-8?q?=E7=B3=BB=E7=BE=A4=E4=BC=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/ContactMassLineChartFormDTO.java | 24 ++++++++ .../screen/dto/form/FineExampleFormDTO.java | 24 ++++++++ .../result/ContactMassLineChartResult.java | 30 ++++++++++ .../result/ContactMassLineChartResultDTO.java | 31 ++++++++++ .../dto/result/FineExampleResultDTO.java | 55 +++++++++++++++++ .../screen/PartyMemberLeadController.java | 41 +++++++++++++ .../screen/ScreenPartyLinkMassesDataDao.java | 12 ++++ .../screen/PartyMemberLeadService.java | 22 +++++++ .../impl/PartyMemberLeadServiceImpl.java | 60 +++++++++++++++++++ .../screen/ScreenPartyLinkMassesDataDao.xml | 14 ++++- 10 files changed, 311 insertions(+), 2 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java new file mode 100644 index 0000000000..e82038de21 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 2:28 下午 + */ +@Data +public class ContactMassLineChartFormDTO implements Serializable { + + private static final long serialVersionUID = 5627978767044772204L; + + public interface ContactMassLineChart{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {ContactMassLineChart.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java new file mode 100644 index 0000000000..1840c3048b --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 1:46 下午 + */ +@Data +public class FineExampleFormDTO implements Serializable { + + private static final long serialVersionUID = -5402747414542735700L; + + public interface FineExample{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {FineExample.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java new file mode 100644 index 0000000000..e77c336fbe --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java @@ -0,0 +1,30 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 2:45 下午 + */ +@Data +public class ContactMassLineChartResult implements Serializable { + + private static final long serialVersionUID = 5668549816473850787L; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 党员建群数 + */ + private Integer groupTotal; + + /** + * 群成员数 + */ + private Integer userTotal; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java new file mode 100644 index 0000000000..e57b0cc54f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/20 2:31 下午 + */ +@Data +public class ContactMassLineChartResultDTO implements Serializable { + + private static final long serialVersionUID = 192666933158635787L; + + /** + * 横坐标集合 + */ + private List xAxis; + + /** + * 党员建群数 + */ + private List groupData; + + /** + * 群成员数 + */ + private List groupMemberData; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java new file mode 100644 index 0000000000..bd05a4b317 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java @@ -0,0 +1,55 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 1:48 下午 + */ +@Data +public class FineExampleResultDTO implements Serializable { + + private static final long serialVersionUID = -2754696449087950719L; + + /** + * 党员参与议题数 + */ + private Integer issueTotal; + + /** + * 党员参与议题书占平台议题数的占比 + */ + private String issueRatio; + + /** + * 党员发布话题总数 + */ + private Integer topicTotal; + + /** + * 占平台总话题百分比 + */ + private String topicRatio; + + /** + * 议题转项目 + */ + private Integer shiftProjectTotal; + + /** + * 议题转项目占平台总项目数的比率 + */ + private String shiftProjectRatio; + + /** + * 解决项目 + */ + private Integer resolvedProjectTotal; + + /** + * 占总解决项目的百分比 + */ + private String resolvedProjectRatio; +} 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 34b2fee3c0..7b6784a039 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,5 +1,16 @@ 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.ContactMassLineChartFormDTO; +import com.epmet.screen.dto.form.FineExampleFormDTO; +import com.epmet.screen.dto.result.ContactMassLineChartResultDTO; +import com.epmet.screen.dto.result.FineExampleResultDTO; +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; @@ -12,4 +23,34 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/screen/partymemberlead") public class PartyMemberLeadController { + + @Autowired + private PartyMemberLeadService partyMemberLeadService; + + /** + * @Description 1、先锋模范 + * @param fineExampleFormDTO + * @author zxc + * @date 2020/8/20 1:56 下午 + */ + @ExternalAppRequestAuth + @PostMapping("fineexample") + public Result fineExample(@RequestBody FineExampleFormDTO fineExampleFormDTO){ + ValidatorUtils.validateEntity(fineExampleFormDTO, FineExampleFormDTO.FineExample.class); + return new Result().ok(partyMemberLeadService.fineExample(fineExampleFormDTO)); + } + + /** + * @Description 2、党员联系群众 + * @param contactMassLineChartFormDTO + * @author zxc + * @date 2020/8/20 2:35 下午 + */ + @ExternalAppRequestAuth + @PostMapping("contactmasslinechart") + public Result contactMassLineChart(@RequestBody ContactMassLineChartFormDTO contactMassLineChartFormDTO){ + ValidatorUtils.validateEntity(contactMassLineChartFormDTO, ContactMassLineChartFormDTO.ContactMassLineChart.class); + return new Result().ok(partyMemberLeadService.contactMassLineChart(contactMassLineChartFormDTO)); + } + } 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/screen/ScreenPartyLinkMassesDataDao.java index 637f4bf604..dfa5c1f6d2 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/screen/ScreenPartyLinkMassesDataDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.ContactMassLineChartResult; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 党建引领-党员联系群众数据 @@ -27,5 +31,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenPartyLinkMassesDataDao { + + /** + * @Description 查询党员联系群众 + * @param agencyId + * @author zxc + * @date 2020/8/20 2:48 下午 + */ + List selectContactMassLineChart(@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/PartyMemberLeadService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java index 61276a3c74..3157a10f74 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/screen/PartyMemberLeadService.java @@ -1,5 +1,10 @@ package com.epmet.datareport.service.screen; +import com.epmet.screen.dto.form.ContactMassLineChartFormDTO; +import com.epmet.screen.dto.form.FineExampleFormDTO; +import com.epmet.screen.dto.result.ContactMassLineChartResultDTO; +import com.epmet.screen.dto.result.FineExampleResultDTO; + /** * 党建引领相关各指标查询 * @@ -7,4 +12,21 @@ package com.epmet.datareport.service.screen; * @date 2020/8/18 10:22 */ public interface PartyMemberLeadService { + + /** + * @Description 1、先锋模范 + * @param fineExampleFormDTO + * @author zxc + * @date 2020/8/20 1:56 下午 + */ + FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO); + + /** + * @Description 2、党员联系群众 + * @param contactMassLineChartFormDTO + * @author zxc + * @date 2020/8/20 2:35 下午 + */ + ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO); + } 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/screen/impl/PartyMemberLeadServiceImpl.java index 33903007a5..5f4fc78092 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -1,8 +1,23 @@ package com.epmet.datareport.service.screen.impl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; +import com.epmet.datareport.dao.screen.ScreenPartyLinkMassesDataDao; import com.epmet.datareport.service.screen.PartyMemberLeadService; +import com.epmet.screen.dto.form.ContactMassLineChartFormDTO; +import com.epmet.screen.dto.form.FineExampleFormDTO; +import com.epmet.screen.constant.*; +import com.epmet.screen.dto.result.CompartmentResultDTO; +import com.epmet.screen.dto.result.ContactMassLineChartResult; +import com.epmet.screen.dto.result.ContactMassLineChartResultDTO; +import com.epmet.screen.dto.result.FineExampleResultDTO; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + /** * 党建引领相关各指标查询 * @@ -11,4 +26,49 @@ import org.springframework.stereotype.Service; */ @Service public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { + + @Autowired + private ScreenPartyLinkMassesDataDao screenPartyLinkMassesDataDao; + + /** + * @Description 1、先锋模范 + * @param fineExampleFormDTO + * @author zxc + * @date 2020/8/20 1:56 下午 + */ + @Override + public FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO) { + + return null; + } + + /** + * @Description 2、党员联系群众 + * @param contactMassLineChartFormDTO + * @author zxc + * @date 2020/8/20 2:35 下午 + */ + @Override + public ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO) { + ContactMassLineChartResultDTO result = new ContactMassLineChartResultDTO(); + List contactMassLineChartResults = screenPartyLinkMassesDataDao.selectContactMassLineChart(contactMassLineChartFormDTO.getAgencyId()); + if (contactMassLineChartResults.size() == NumConstant.ZERO){ + result.setXAxis(new ArrayList<>()); + result.setGroupMemberData(new ArrayList<>()); + result.setGroupData(new ArrayList<>()); + return result; + } + List xAxis = new ArrayList<>(); + List groupData = new ArrayList<>(); + List groupMemberData = new ArrayList<>(); + contactMassLineChartResults.forEach(contact -> { + xAxis.add(contact.getOrgName()); + groupData.add(contact.getGroupTotal()); + groupMemberData.add(contact.getUserTotal()); + }); + result.setXAxis(xAxis); + result.setGroupData(groupData); + result.setGroupMemberData(groupMemberData); + return result; + } } 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 b690a6381d..5643b1e31b 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 @@ -3,6 +3,16 @@ - - + + \ No newline at end of file From 93af81cee32762150fec78fd455f12ba6ab3262d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 20 Aug 2020 15:05:12 +0800 Subject: [PATCH 040/360] =?UTF-8?q?2=E3=80=81=E5=85=9A=E5=91=98=E8=81=94?= =?UTF-8?q?=E7=B3=BB=E7=BE=A4=E4=BC=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/screen/impl/PartyMemberLeadServiceImpl.java | 4 ---- 1 file changed, 4 deletions(-) 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/screen/impl/PartyMemberLeadServiceImpl.java index 5f4fc78092..c96984f9dd 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -1,13 +1,10 @@ package com.epmet.datareport.service.screen.impl; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; import com.epmet.datareport.dao.screen.ScreenPartyLinkMassesDataDao; import com.epmet.datareport.service.screen.PartyMemberLeadService; import com.epmet.screen.dto.form.ContactMassLineChartFormDTO; import com.epmet.screen.dto.form.FineExampleFormDTO; -import com.epmet.screen.constant.*; -import com.epmet.screen.dto.result.CompartmentResultDTO; import com.epmet.screen.dto.result.ContactMassLineChartResult; import com.epmet.screen.dto.result.ContactMassLineChartResultDTO; import com.epmet.screen.dto.result.FineExampleResultDTO; @@ -16,7 +13,6 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; -import java.util.Map; /** * 党建引领相关各指标查询 From c6daa8fff3bf2c4ced07e105dd5c18e90ac53909 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 20 Aug 2020 15:46:10 +0800 Subject: [PATCH 041/360] =?UTF-8?q?3=E3=80=81=E5=85=9A=E5=91=98=E5=BF=97?= =?UTF-8?q?=E6=84=BF=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/VolunteerServiceFormDTO.java | 24 +++++++++ .../dto/result/VolunteerServiceResult.java | 35 +++++++++++++ .../dto/result/VolunteerServiceResultDTO.java | 36 +++++++++++++ .../screen/PartyMemberLeadController.java | 15 ++++++ .../dao/screen/ScreenPartyBranchDataDao.java | 9 ++++ .../screen/PartyMemberLeadService.java | 10 ++++ .../impl/PartyMemberLeadServiceImpl.java | 51 +++++++++++++++++-- .../screen/ScreenPartyBranchDataDao.xml | 16 ++++++ 8 files changed, 193 insertions(+), 3 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java new file mode 100644 index 0000000000..510bb5ec41 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 3:12 下午 + */ +@Data +public class VolunteerServiceFormDTO implements Serializable { + + private static final long serialVersionUID = 7916606646764729831L; + + public interface VolunteerService{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {VolunteerService.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java new file mode 100644 index 0000000000..bc2d53edff --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java @@ -0,0 +1,35 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/20 3:16 下午 + */ +@Data +public class VolunteerServiceResult implements Serializable { + + private static final long serialVersionUID = 959536759114517195L; + + /** + * 月份ID + */ + private String monthId; + + /** + * 组织次数 + */ + private Integer organizeData; + + /** + * 参与次数 + */ + private Integer joinData; + + /** + * 平均参与人次 + */ + private Integer averageJoinUserData; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java new file mode 100644 index 0000000000..18331f9ca7 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/20 3:14 下午 + */ +@Data +public class VolunteerServiceResultDTO implements Serializable { + + private static final long serialVersionUID = -6227889392267793005L; + + /** + * x轴,返回近12个月,不包含当前月 + */ + private List xAxis; + + /** + * 组织次数 + */ + private List organizeData; + + /** + * 参与次数 + */ + private List joinData; + + /** + * 平均参与人次 + */ + private List averageJoinUserData; +} 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 7b6784a039..1401a7f036 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 @@ -6,8 +6,10 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.datareport.service.screen.PartyMemberLeadService; 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.ContactMassLineChartResultDTO; import com.epmet.screen.dto.result.FineExampleResultDTO; +import com.epmet.screen.dto.result.VolunteerServiceResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -53,4 +55,17 @@ public class PartyMemberLeadController { return new Result().ok(partyMemberLeadService.contactMassLineChart(contactMassLineChartFormDTO)); } + /** + * @Description 3、党员志愿服务 + * @param volunteerServiceFormDTO + * @author zxc + * @date 2020/8/20 3:19 下午 + */ + @ExternalAppRequestAuth + @PostMapping("volunteerservice") + public Result volunteerService(@RequestBody VolunteerServiceFormDTO volunteerServiceFormDTO){ + ValidatorUtils.validateEntity(volunteerServiceFormDTO, VolunteerServiceFormDTO.VolunteerService.class); + return new Result().ok(partyMemberLeadService.volunteerService(volunteerServiceFormDTO)); + } + } 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/screen/ScreenPartyBranchDataDao.java index 5b6bbbed94..b5ab2e28e8 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/screen/ScreenPartyBranchDataDao.java @@ -19,6 +19,7 @@ package com.epmet.datareport.dao.screen; import com.epmet.screen.dto.result.BranchBuildOrderByCountResultDTO; import com.epmet.screen.dto.result.BranchIssueDataResultDTO; +import com.epmet.screen.dto.result.VolunteerServiceResult; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -53,4 +54,12 @@ public interface ScreenPartyBranchDataDao { List selectBranchDataByTypeAndTimeZone(@Param("agencyId") String agencyId , @Param("type") String type, @Param("category") String category, @Param("bottomMonthId") String bottomMonthId); List selectBranchDataByTypeOrder(String agencyId,String category,String monthId,String bottomMonthId); + + /** + * @Description 查询党员志愿服务 + * @param agencyId + * @author zxc + * @date 2020/8/20 3:30 下午 + */ + List selectVolunteerServiceResult(@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/PartyMemberLeadService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java index 3157a10f74..85c25ec9eb 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/screen/PartyMemberLeadService.java @@ -2,8 +2,10 @@ package com.epmet.datareport.service.screen; 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.ContactMassLineChartResultDTO; import com.epmet.screen.dto.result.FineExampleResultDTO; +import com.epmet.screen.dto.result.VolunteerServiceResultDTO; /** * 党建引领相关各指标查询 @@ -29,4 +31,12 @@ public interface PartyMemberLeadService { */ ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO); + /** + * @Description 3、党员志愿服务 + * @param volunteerServiceFormDTO + * @author zxc + * @date 2020/8/20 3:19 下午 + */ + VolunteerServiceResultDTO volunteerService(VolunteerServiceFormDTO volunteerServiceFormDTO); + } 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/screen/impl/PartyMemberLeadServiceImpl.java index c96984f9dd..f9a451bd6b 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -1,18 +1,21 @@ package com.epmet.datareport.service.screen.impl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.datareport.dao.screen.ScreenPartyBranchDataDao; import com.epmet.datareport.dao.screen.ScreenPartyLinkMassesDataDao; import com.epmet.datareport.service.screen.PartyMemberLeadService; import com.epmet.screen.dto.form.ContactMassLineChartFormDTO; import com.epmet.screen.dto.form.FineExampleFormDTO; -import com.epmet.screen.dto.result.ContactMassLineChartResult; -import com.epmet.screen.dto.result.ContactMassLineChartResultDTO; -import com.epmet.screen.dto.result.FineExampleResultDTO; +import com.epmet.screen.dto.form.VolunteerServiceFormDTO; +import com.epmet.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * 党建引领相关各指标查询 @@ -25,6 +28,10 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { @Autowired private ScreenPartyLinkMassesDataDao screenPartyLinkMassesDataDao; + @Autowired + private GrassrootsPartyDevServiceImpl grassrootsPartyDevServiceImpl; + @Autowired + private ScreenPartyBranchDataDao screenPartyBranchDataDao; /** * @Description 1、先锋模范 @@ -67,4 +74,42 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { result.setGroupMemberData(groupMemberData); return result; } + + /** + * @Description 3、党员志愿服务 + * @param volunteerServiceFormDTO + * @author zxc + * @date 2020/8/20 3:19 下午 + */ + @Override + public VolunteerServiceResultDTO volunteerService(VolunteerServiceFormDTO volunteerServiceFormDTO) { + VolunteerServiceResultDTO result = new VolunteerServiceResultDTO(); + List organizeData = new ArrayList<>(); + List joinData = new ArrayList<>(); + List averageJoinUserData = new ArrayList<>(); + Map x = grassrootsPartyDevServiceImpl.getX(); + result.setXAxis(x.values().stream().collect(Collectors.toList())); + List volunteerServiceResults = screenPartyBranchDataDao.selectVolunteerServiceResult(volunteerServiceFormDTO.getAgencyId()); + if (volunteerServiceResults.size() == NumConstant.ZERO){ + for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) { + organizeData.add(NumConstant.ZERO); + joinData.add(NumConstant.ZERO); + averageJoinUserData.add(NumConstant.ZERO); + } + result.setOrganizeData(organizeData); + result.setJoinData(joinData); + 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()); + }); + result.setOrganizeData(organizeData); + result.setJoinData(joinData); + result.setAverageJoinUserData(averageJoinUserData); + return result; + } } 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 1268f91a2b..e5c4e38f70 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 @@ -67,4 +67,20 @@ joinData DESC + + + \ No newline at end of file From dd2c58fba585b0036781d93808feacadcfa791cd Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 20 Aug 2020 16:04:14 +0800 Subject: [PATCH 042/360] =?UTF-8?q?=E5=9F=BA=E5=B1=82=E6=B2=BB=E7=90=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=201~4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/form/AgencyAndNumFormDTO.java | 28 ++++ .../epmet/screen/dto/form/AgencyFormDTO.java | 24 ++++ .../dto/form/AgencyNumTypeParamFormDTO.java | 35 +++++ .../dto/result/DifficultProjectResultDTO.java | 44 ++++++ .../result/PublicPartiProfileResultDTO.java | 47 ++++++ .../dto/result/PublicPartiRankResultDTO.java | 28 ++++ .../dto/result/UserPointRankResultDTO.java | 28 ++++ .../screen/dto/result/UserPointResultDTO.java | 20 +++ .../dao/screen/ScreenDifficultyDataDao.java | 13 ++ .../dao/screen/ScreenPartyBranchDataDao.java | 8 ++ .../screen/ScreenPartyUserRankDataDao.java | 15 +- .../dao/screen/ScreenUserJoinDao.java | 13 +- .../dao/screen/ScreenUserTotalDataDao.java | 20 +++ .../screen/GrassRootsGovernService.java | 50 +++++++ .../impl/GrassRootsGovernServiceImpl.java | 135 ++++++++++++++++++ .../impl/GrassrootsPartyDevServiceImpl.java | 61 ++++++-- .../com/epmet/datareport/utils/DateUtils.java | 94 ++++++++++++ .../datareport/utils/ModuleConstant.java | 24 ++++ .../mapper/screen/ScreenDifficultyDataDao.xml | 25 ++++ .../screen/ScreenPartyBranchDataDao.xml | 8 +- .../screen/ScreenPartyUserRankDataDao.xml | 16 ++- .../mapper/screen/ScreenUserJoinDao.xml | 13 +- .../mapper/screen/ScreenUserTotalDataDao.xml | 29 ++++ .../externalapp/ExtAppJwtTokenUtils.java | 4 +- 24 files changed, 763 insertions(+), 19 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java new file mode 100644 index 0000000000..a20c10ce80 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 通用的agencyId topNum入参 + * @ClassName AgencyAndNumFormDTO + * @Auth wangc + * @Date 2020-08-20 10:29 + */ +@Data +public class AgencyAndNumFormDTO implements Serializable { + private static final long serialVersionUID = -8674763412362557239L; + + /** + * 显示多少条 不在这里设置默认值 不同的接口使用的默认值不同 在逻辑中判断 + * */ + private Integer topNum; + + /** + * 机关Id + * */ + @NotBlank(message = "机关Id不能为空" , groups = AgencyFormDTO.CommonAgencyIdGroup.class) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java new file mode 100644 index 0000000000..a9e479e3a5 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.screen.dto.form; + + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 通用 agencyId 入参 + ClassName AgencyFormDTO + * @Auth wangc + * @Date 2020-08-20 10:29 + */ +@Data +public class AgencyFormDTO implements Serializable { + private static final long serialVersionUID = -2880432640584616651L; + + public interface CommonAgencyIdGroup extends CustomerClientShowGroup{} + + @NotBlank(message = "机关Id不能为空" , groups = CommonAgencyIdGroup.class) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java new file mode 100644 index 0000000000..04dfc0625e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java @@ -0,0 +1,35 @@ +package com.epmet.screen.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 通用 agencyId topNum type(各种类型)传参dto + * @ClassName AgencyNumTypeParamFormDTO + * @Auth wangc + * @Date 2020-08-20 13:36 + */ +@Data +public class AgencyNumTypeParamFormDTO implements Serializable { + private static final long serialVersionUID = -8049013016922130410L; + + public interface AgencyNumTypeParamGroup extends CustomerClientShowGroup{} + + /** + * agencyId + * */ + @NotBlank(message = "机关Id不能为空", groups = AgencyNumTypeParamGroup.class) + private String agencyId; + + private Integer topNum; + + /** + * 各种类型 + * */ + @NotBlank(message = "类型不能为空", groups = AgencyNumTypeParamGroup.class) + private String type; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java new file mode 100644 index 0000000000..e89155d00c --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java @@ -0,0 +1,44 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 2、难点赌点-耗时最长|涉及部门最多|处理次数 返参DTO + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614 + * @ClassName DifficultProjectResultDTO + * @Auth wangc + * @Date 2020-08-20 13:43 + */ +@Data +public class DifficultProjectResultDTO implements Serializable { + private static final long serialVersionUID = -7338625142484943434L; + + private String projectId; + + private String title; + + /** + * 状态: 待处理: pending; 结案closed + * */ + private String status; + + private Integer totalHours; + + /** + * yyyy-MM-dd HH:mm + * */ + private String createDateTime; + + private String gridName; + + private String imgUrl; + + private String categoryName; + + private Integer handleDepts; + + private Integer handleCount; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java new file mode 100644 index 0000000000..48782cd02c --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java @@ -0,0 +1,47 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 3、公众参与概况返参DTO + * @ClassName PublicPartiProfileResultDTO + * @Auth wangc + * @Date 2020-08-20 14:33 + */ +@Data +public class PublicPartiProfileResultDTO implements Serializable { + private static final long serialVersionUID = 2520835419152912027L; + + private Integer total; + + private String monthIncr; + + /** + * incr上升, decr下降 + * */ + private String monthTrend; + + private Integer averageIssue; + + /** + * 较上月百分比 + * */ + private String issueCompareLastestMonth; + + /** + * 较上月趋势:incr上升,decr下降 + * */ + private String issueCompareLatestTrend; + + /** + * 平均参与度 + * */ + private Integer averageJoin; + + private String joinCompareLatestMonth; + + private String joinCompareLatestTrend; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java new file mode 100644 index 0000000000..b151901bdf --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 公众参与-排行榜 传参dto + * @ClassName PublicPartiRankResultDTO + * @Auth wangc + * @Date 2020-08-20 15:29 + */ +@Data +public class PublicPartiRankResultDTO implements Serializable { + private static final long serialVersionUID = -2958188980327497507L; + + private String name; + + private Integer regNum; + + private Integer joinNum; + + private Integer topicNum; + + private Integer issueNum; + + private Integer projectNum; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java new file mode 100644 index 0000000000..43cc73e066 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java @@ -0,0 +1,28 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.LinkedList; +import java.util.List; + +/** + * @Description + * @ClassName UserPointRankResultDTO + * @Auth wangc + * @Date 2020-08-20 10:46 + */ +@Data +public class UserPointRankResultDTO implements Serializable { + private static final long serialVersionUID = 2829557017489626022L; + + /** + * 横坐标:姓名 + * */ + private List nameData = new LinkedList<>(); + + /** + * 纵坐标:积分 + * */ + private List pointsData = new LinkedList<>(); +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java new file mode 100644 index 0000000000..1f38d6886e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 用户积分DTO - 查询结果 + * @ClassName UserPointResultDTO + * @Auth wangc + * @Date 2020-08-20 10:50 + */ +@Data +public class UserPointResultDTO implements Serializable { + private static final long serialVersionUID = -5174248184514429116L; + + private String name; + + private Integer point; +} 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/screen/ScreenDifficultyDataDao.java index ced4f66003..8e5ccd5d1b 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/screen/ScreenDifficultyDataDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.DifficultProjectResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 基层治理-难点堵点 @@ -28,4 +32,13 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface ScreenDifficultyDataDao { + /** + * @Description 查询难点赌点-耗时最长|涉及部门最多|处理次数 + * @param + * @return + * @author wangc + * @date 2020.08.20 14:26 + **/ + List selectDifficulty(@Param("agencyId")String agencyId,@Param("type")String type); + } \ No newline at end of file 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/screen/ScreenPartyBranchDataDao.java index b5ab2e28e8..4d706ec55f 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/screen/ScreenPartyBranchDataDao.java @@ -62,4 +62,12 @@ public interface ScreenPartyBranchDataDao { * @date 2020/8/20 3:30 下午 */ List selectVolunteerServiceResult(@Param("agencyId")String agencyId); + /** + * @Description 查找指定组织的下一级组织的数据排行 + * @param agencyId .. + * @return List + * @author wangc + * @date 2020.08.20 09:46 + **/ + List selectBranchDataByTypeOrder(@Param("agencyId")String agencyId,@Param("category")String category,@Param("monthId")String monthId,@Param("bottomMonthId")String bottomMonthId); } \ No newline at end of file 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/screen/ScreenPartyUserRankDataDao.java index caadd5520f..7bfb9ef83f 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/screen/ScreenPartyUserRankDataDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.UserPointResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 党建引领|基层治理-市民(党员)积分排行榜 @@ -27,5 +31,14 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenPartyUserRankDataDao{ - + + /** + * @Description 查询指定机关下的用户积分排名 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.20 11:11 + **/ + List selectUserPointOrder(@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/screen/ScreenUserJoinDao.java index 34b2a61cbf..afa7186d21 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/screen/ScreenUserJoinDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.PublicPartiProfileResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 基层治理-公众参与 @@ -27,5 +29,14 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenUserJoinDao { - + + /** + * @Description 查询用户参与数据 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.20 15:07 + **/ + PublicPartiProfileResultDTO selectUserJoinData(@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/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java index 46576c5517..543cd50e42 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,10 +18,13 @@ 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; +import java.util.List; + /** * 中央区-各类用户总数 * @@ -48,4 +51,21 @@ public interface ScreenUserTotalDataDao { */ TopProfileResultDTO selectTopProfile(@Param("agencyId")String agencyId); + /** + * @Description 求出人均议题 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.20 14:54 + **/ + 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/GrassRootsGovernService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java index 5c1343fcd1..be1c6f91d7 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/screen/GrassRootsGovernService.java @@ -1,5 +1,15 @@ package com.epmet.datareport.service.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.DifficultProjectResultDTO; +import com.epmet.screen.dto.result.PublicPartiProfileResultDTO; +import com.epmet.screen.dto.result.PublicPartiRankResultDTO; +import com.epmet.screen.dto.result.UserPointRankResultDTO; + +import java.util.List; + /** * 基层治理相关各指标查询 * @@ -7,4 +17,44 @@ package com.epmet.datareport.service.screen; * @date 2020/8/18 10:20 */ public interface GrassRootsGovernService { + + /** + * @Description 1、热心市民积分排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321544 + * @param param + * @return + * @author wangc + * @date 2020.08.20 11:16 + **/ + UserPointRankResultDTO userPointRank(AgencyAndNumFormDTO param); + + /** + * @Description 2、难点赌点-耗时最长|涉及部门最多|处理次数 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614 + * @param param + * @return + * @author wangc + * @date 2020.08.20 13:55 + **/ + List difficultProject(AgencyNumTypeParamFormDTO param); + + /** + * @Description 3、公众参与概况 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321975 + * @param param + * @return + * @author wangc + * @date 2020.08.20 14:37 + **/ + PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param); + + /** + * @Description 公众参与-排行榜 + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321978 + * @param param + * @return + * @author wangc + * @date 2020.08.20 15:32 + **/ + List publicPartiRank(AgencyAndNumFormDTO param); } 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 cb1e1fe160..c24b870023 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 @@ -1,8 +1,28 @@ package com.epmet.datareport.service.screen.impl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.datareport.dao.screen.ScreenDifficultyDataDao; +import com.epmet.datareport.dao.screen.ScreenPartyUserRankDataDao; +import com.epmet.datareport.dao.screen.ScreenUserJoinDao; +import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; import com.epmet.datareport.service.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.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.stream.Collectors; + /** * 基层治理相关各指标查询 * @@ -11,4 +31,119 @@ import org.springframework.stereotype.Service; */ @Service public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { + + @Autowired + private ScreenPartyUserRankDataDao screenPartyUserRankDataDao; + @Autowired + private ScreenDifficultyDataDao screenDifficultyDataDao; + @Autowired + private ScreenUserJoinDao screenUserJoinDao; + @Autowired + private DateUtils dateUtils; + @Autowired + private ScreenUserTotalDataDao screenUserTotalDataDao; + /** + * @Description 1、热心市民积分排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321544 + * @param param + * @return + * @author wangc + * @date 2020.08.20 11:16 + **/ + @Override + public UserPointRankResultDTO userPointRank(AgencyAndNumFormDTO param) { + //默认5 + if(null == param.getTopNum()){ + param.setTopNum(NumConstant.FIVE); + } + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List userPointList = screenPartyUserRankDataDao.selectUserPointOrder(param.getAgencyId()); + UserPointRankResultDTO result = new UserPointRankResultDTO(); + result.setNameData(userPointList.stream().map(UserPointResultDTO::getName).collect(Collectors.toList())); + result.setPointsData(userPointList.stream().map(UserPointResultDTO::getPoint).collect(Collectors.toList())); + return result; + } + + + /** + * @Description 2、难点赌点-耗时最长|涉及部门最多|处理次数 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614 + * @param param + * @return + * @author wangc + * @date 2020.08.20 13:55 + **/ + @Override + public List difficultProject(AgencyNumTypeParamFormDTO param) { + if(null == param.getTopNum()){ + param.setTopNum(NumConstant.TWO); + } + + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType()); + if(null == result) return new ArrayList<>(); + return result; + } + + + /** + * @Description 3、公众参与概况 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321975 + * @param param + * @return + * @author wangc + * @date 2020.08.20 14:37 + **/ + @Override + public PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param) { + String monthId = dateUtils.getPreviousMonthId(); + PublicPartiProfileResultDTO latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId); + if(null == latest) return null; + if(null == latest.getTotal()) latest.setTotal(NumConstant.ZERO); + if(null == latest.getAverageJoin()) latest.setAverageJoin(NumConstant.ZERO); + PublicPartiProfileResultDTO previous = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), dateUtils.getPreviousMonthIdByDest(null,monthId)); + Integer preTotal ; Integer preAvgJoin ; + if(null == previous){ preTotal = NumConstant.ZERO; preAvgJoin = NumConstant.ZERO;} + preTotal = null == previous.getTotal() ? NumConstant.ZERO : previous.getTotal(); + preAvgJoin = null == previous.getAverageJoin() ? NumConstant.ZERO : previous.getAverageJoin(); + if(latest.getTotal() >= preTotal){ + latest.setMonthTrend("incr"); + latest.setMonthIncr(convertPercentStr(new BigDecimal((latest.getTotal() - preTotal)/preTotal))); + } + if(latest.getAverageJoin() >= preAvgJoin){ + latest.setJoinCompareLatestTrend("incr"); + latest.setJoinCompareLatestMonth(convertPercentStr(new BigDecimal((latest.getAverageJoin() - preAvgJoin)/preAvgJoin))); + } + latest.setAverageIssue(screenUserTotalDataDao.selectAvgIssue(param.getAgencyId())); + latest.setIssueCompareLatestTrend("incr"); + latest.setIssueCompareLastestMonth(convertPercentStr(null)); + return null; + } + + /** + * @Description 公众参与-排行榜 + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321978 + * @param param + * @return + * @author wangc + * @date 2020.08.20 15:32 + **/ + @Override + public List publicPartiRank(AgencyAndNumFormDTO param) { + + 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<>(); + 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); + } + + + } 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 09852df8aa..74fae27854 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 @@ -4,11 +4,13 @@ import com.epmet.commons.tools.constant.NumConstant; 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.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; import org.slf4j.Logger; @@ -17,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; -import java.math.BigInteger; import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; @@ -90,15 +91,15 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService **/ @Override public BranchBuildTrendResultDTO branchBuildTrend(BranchBuildTrendFormDTO param) { - if(StringUtils.equals("ljgj",param.getCategory())){ + if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){ //联建共建情况 - param.setCategory("union"); - }else if(StringUtils.equals("ljdyzy",param.getCategory())){ + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_UNION); + }else if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_VOLUNTARY_SERVICE,param.getCategory())){ //联建党员志愿服务情况 - param.setCategory("voluntaryservice"); + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE); }else{ //默认支部建设 - param.setCategory("party"); + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_PARTY); } BranchBuildTrendResultDTO result = new BranchBuildTrendResultDTO(); //生成近十二个月的横坐标数组 @@ -158,16 +159,41 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService **/ @Override public BranchBuildRankResultDTO branchBuildRank(BranchBuildRankFormDTO param) { - //TODO .. 传参为agencyId 返参的横坐标为agencyId数组,传入的agencyId是父Id?还是应该传入customerId - - return null; + if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){ + //联建共建情况 + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_UNION); + }else if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_VOLUNTARY_SERVICE,param.getCategory())){ + //联建党员志愿服务情况 + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE); + }else{ + //默认支部建设 + param.setCategory(ModuleConstant.KEY_BRANCH_CATEGORY_PARTY); + } + if(StringUtils.isBlank(param.getMonthId())){ + param.setMonthId(getPreviousMonthId()); + } + 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()); + + BranchBuildRankResultDTO result = new BranchBuildRankResultDTO(); + result.setJoinData(new LinkedList<>()); + result.setOrganizeData(new LinkedList<>()); + result.setXAxis(new LinkedList<>()); + for(BranchBuildOrderByCountResultDTO data : orderList){ + result.getXAxis().add(data.getOrgName()); + result.getOrganizeData().add(data.getOrganizeData()); + result.getJoinData().add(data.getJoinData()); + } + 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("%"); + return percentStr.concat(ModuleConstant.SYMBOL_PERCENT); } /** @@ -255,4 +281,19 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService result.keySet().forEach(key -> System.out.println(key)); } + + /** + * @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/utils/DateUtils.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java new file mode 100644 index 0000000000..1ead9b3a73 --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/DateUtils.java @@ -0,0 +1,94 @@ +package com.epmet.datareport.utils; + +import com.epmet.commons.tools.constant.NumConstant; +import com.google.common.collect.Maps; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; + +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * @Description + * @ClassName DateUtils + * @Auth wangc + * @Date 2020-08-20 10:56 + */ +@Component +public class DateUtils { + /** + * @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 + **/ + public 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()); + } + + public String getPreviousMonthIdByDest(Date date,String dateStr){ + SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); + Calendar c = Calendar.getInstance(); + if(null == date && StringUtils.isNotBlank(dateStr)){ + try{ + date = format.parse(dateStr); + + }catch(Exception e){ + e.printStackTrace(); + } + }else{ + return null; + } + c.setTime(date); + c.add(Calendar.MONTH, NumConstant.ONE_NEG); + return format.format(c.getTime()); + } +} 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 new file mode 100644 index 0000000000..9314d3ba3b --- /dev/null +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/utils/ModuleConstant.java @@ -0,0 +1,24 @@ +package com.epmet.datareport.utils; + +public interface ModuleConstant { + + String PARAM_BRANCH_CATEGORY_UNION = "ljgj"; + + String PARAM_BRANCH_CATEGORY_VOLUNTARY_SERVICE = "ljdyzy"; + + String PARAM_BRANCH_CATEGORY_PARTY = "zbjs"; + + String KEY_BRANCH_CATEGORY_UNION = "union"; + + String KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE = "voluntaryservice"; + + String KEY_BRANCH_CATEGORY_PARTY = "party"; + + String SYMBOL_PERCENT = "%"; + + String PARAM_DIFFICULTY_TYPE_TIME_LONGEST = "timelongest"; + + String PARAM_DIFFICULTY_TYPE_MOST_DEPTS = "mostdepts"; + + String PARAM_DIFFICULTY_TYPE_MOST_HANDLED = "mosthandled"; +} 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 c7551661f6..1003feb9e2 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 @@ -3,5 +3,30 @@ + + \ No newline at end of file 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 e5c4e38f70..a8af55a171 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 @@ -42,8 +42,9 @@ 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 1e42f6c61a..924b709a8b 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 @@ -3,6 +3,20 @@ - + + \ 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 6314cf2fdc..65102879bb 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 @@ -3,5 +3,16 @@ - + \ No newline at end of file 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 673ffee04a..250b308f76 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 @@ -33,4 +33,33 @@ AND org_id = #{agencyId} + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java index a1639646a2..80d21ccde0 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java @@ -75,8 +75,8 @@ public class ExtAppJwtTokenUtils { public static void genToken() { HashMap claim = new HashMap<>(); - claim.put("appId", "dbfad3110c124c89948d16e8b06a8888"); - claim.put("customerId", "c1"); + claim.put("appId", "227fb75ae4baa820755aaf43bf7f0a69"); + claim.put("customerId", "b09527201c4409e19d1dbc5e3c3429a1 "); claim.put("ts", System.currentTimeMillis() - 1000 * 60 * 4); String abc = new ExtAppJwtTokenUtils().createToken(claim, "4a762660254c57996343f8ee42fbc0a6"); From d2c2a857053c071e150b72ba8e32f6f9f742d08d Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 20 Aug 2020 16:57:48 +0800 Subject: [PATCH 043/360] =?UTF-8?q?=E6=8C=87=E6=95=B0=E9=87=87=E9=9B=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9-end?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/GridGovrnAbilityFormDTO.java | 12 +++++------ .../form/GridPartyMemberDataFormDTO.java | 9 +++++++++ .../form/OrgServiceAbilityFormDTO.java | 2 +- .../FactIndexGovrnAblityDeptMonthlyDao.java | 14 +++++++++++-- .../FactIndexGovrnAblityGridMonthlyDao.java | 13 ++++++++++-- .../FactIndexPartyAblityCpcMonthlyDao.java | 18 ++++++++++++++--- .../FactIndexPartyAblityGridMonthlyDao.java | 13 ++++++++++-- .../FactIndexServiceAblityGridMonthlyDao.java | 13 ++++++++++-- .../FactIndexGovrnAblityOrgMonthlyEntity.java | 4 ++-- .../FactIndexPartyAblityOrgMonthlyEntity.java | 4 ++-- ...actIndexServiceAblityOrgMonthlyEntity.java | 4 ++-- .../impl/FactIndexCollectServiceImpl.java | 20 ++++++++++++++----- .../V0.0.3__update_col_data_type.sql | 3 +++ .../FactIndexGovrnAblityGridMonthlyDao.xml | 2 +- 14 files changed, 101 insertions(+), 30 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__update_col_data_type.sql diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java index e289e15a02..ef4efd6a24 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java @@ -55,15 +55,10 @@ public class GridGovrnAbilityFormDTO implements Serializable { */ private Integer projectTotal; - /** - * 网格自治项目数 - */ - private Integer selfSolveProjectRatio; - /** * 网格办结项目数 */ - private Integer resolveProjectTotal; + private Integer resolveProjectCount; /** * 网格吹哨部门准确率 @@ -79,4 +74,9 @@ public class GridGovrnAbilityFormDTO implements Serializable { * 网格议题转项目率 */ private BigDecimal avgShiftProjectRatio; + + /** + * 网格自治项目数 统计期网格自身内办结的项目数目 + */ + private Integer selfSolveProjectCount; } 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 20c6e0c0a6..7993cb2355 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 @@ -86,4 +86,13 @@ public class GridPartyMemberDataFormDTO implements Serializable { */ private Integer issueToProjectCount; + /** + * 用户id + */ + private String userId; + + /** + * 上级组织Id + */ + private String parentId; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java index 9b95c02bda..6ef48c6fa4 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java @@ -43,7 +43,7 @@ public class OrgServiceAbilityFormDTO implements Serializable { /** * allRegion:全区;community:社区;street:街道 */ - private Integer dataType; + private String dataType; /** * 社区/街道活动组织次数 爱心活动 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index f3725d5811..f56638a3f6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -36,12 +36,22 @@ public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao list, @Param("customerId")String customerId); + void batchInsertFactIndexPartyAblityCpcMonthly(@Param("list") List list, + @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index 7ffb311067..b5cb8d2c5e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -38,12 +38,21 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ - factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(formDTO.get(i), customerId); + factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(customerId, + formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getUserId(), + formDTO.get(i).getYearId(), formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); } factIndexPartyAblityCpcMonthlyDao.batchInsertFactIndexPartyAblityCpcMonthly(formDTO, customerId); } @@ -50,7 +52,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { public void insertGridPartyAbility(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ - factIndexPartyAblityGridMonthlyDao.deleteFactIndexPartyAblityGridMonthly(formDTO.get(i), customerId); + factIndexPartyAblityGridMonthlyDao.deleteFactIndexPartyAblityGridMonthly(customerId, + formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getYearId(), + formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); } factIndexPartyAblityGridMonthlyDao.batchInsertFactIndexPartyAblityGridMonthly(formDTO, customerId); } @@ -78,7 +82,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { public void insertGridServiceAbility(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ - factIndexServiceAblityGridMonthlyDao.deleteFactIndexServiceAblityGridMonthly(formDTO.get(i), customerId); + factIndexServiceAblityGridMonthlyDao.deleteFactIndexServiceAblityGridMonthly(customerId, + formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getYearId(), + formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); } factIndexServiceAblityGridMonthlyDao.batchInsertFactIndexServiceAblityGridMonthly(formDTO, customerId); } @@ -106,7 +112,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { public void insertGridGovrnAbility(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ - factIndexGovrnAblityGridMonthlyDao.deleteFactIndexGovrnAblityGridMonthly(formDTO.get(i), customerId); + factIndexGovrnAblityGridMonthlyDao.deleteFactIndexGovrnAblityGridMonthly(customerId, + formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getYearId(), + formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); } factIndexGovrnAblityGridMonthlyDao.batchInsertFactIndexGovrnAblityGridMonthly(formDTO, customerId); } @@ -134,7 +142,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { public void insertDeptGovrnAbility(List formDTO, String customerId) { if (null != formDTO && formDTO.size() > NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ - factIndexGovrnAblityDeptMonthlyDao.deleteFactIndexGovrnAblityDeptMonthly(formDTO.get(i), customerId); + factIndexGovrnAblityDeptMonthlyDao.deleteFactIndexGovrnAblityDeptMonthly(customerId, + formDTO.get(i).getAgencyId(), formDTO.get(i).getDeptId(), formDTO.get(i).getYearId(), + formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); } factIndexGovrnAblityDeptMonthlyDao.batchInsertFactIndexGovrnAblityDeptMonthly(formDTO, customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__update_col_data_type.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__update_col_data_type.sql new file mode 100644 index 0000000000..05b34b4833 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__update_col_data_type.sql @@ -0,0 +1,3 @@ +alter table fact_index_party_ablity_org_monthly MODIFY column DATA_TYPE VARCHAR(100) DEFAULT '' COMMENT '数据类型 allRegion:全区;community:社区;street:街道'; +alter table fact_index_service_ablity_org_monthly MODIFY column DATA_TYPE VARCHAR(100) DEFAULT '' COMMENT '数据类型 allRegion:全区;community:社区;street:街道'; +alter table fact_index_govrn_ablity_org_monthly MODIFY column DATA_TYPE VARCHAR(100) DEFAULT '' COMMENT '数据类型 allRegion:全区;community:社区;street:街道'; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml index 6200f537aa..ed0f65cc79 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -29,7 +29,7 @@ delete from fact_index_govrn_ablity_grid_monthly - where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND USER_ID = #{userId} + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} From 57d76e6486a90dd0a3e5b0104962278d7c77d833 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 20 Aug 2020 17:31:00 +0800 Subject: [PATCH 044/360] =?UTF-8?q?10=E3=80=81=E5=85=9A=E5=BB=BA=E5=BC=95?= =?UTF-8?q?=E9=A2=86-=E5=85=88=E9=94=8B=E6=A8=A1=E8=8C=83=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=20=20=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screencoll/form/PioneerDataFormDTO.java | 31 +++++++++++++++++-- .../screen/ScreenPioneerDataEntity.java | 30 ++++++++++++++++-- .../mapper/screen/ScreenPioneerDataDao.xml | 15 +++++++-- 3 files changed, 70 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java index cdad61be67..0efe2ff448 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.screencoll.form; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; /** * 10、党建引领-先锋模范数据 @@ -35,9 +36,9 @@ public class PioneerDataFormDTO implements Serializable { private String orgName; /** - * 用户总数 + * 党员发布议题 */ - private Integer userTotal; + private Integer publishIssueTotal; /** * 议事数 @@ -58,4 +59,30 @@ public class PioneerDataFormDTO implements Serializable { * 解决项目总数 */ private Integer resolvedProjectTotal; + + + /** + * 议事占比 + */ + private BigDecimal issueRatio; + + /** + * 话题占比 + */ + private BigDecimal topicRatio; + + /** + * 议题转项目占比 + */ + private BigDecimal shiftProjectRatio; + + /** + * 解决项目占比 + */ + private BigDecimal resolvedProjectRatio; + + /** + * 党员发布议题占比 + */ + private BigDecimal publishIssueRatio; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java index ab192e7161..4366427141 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java @@ -23,6 +23,7 @@ import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.math.BigDecimal; import java.util.Date; /** @@ -64,9 +65,9 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity { private String orgName; /** - * 用户总数 + * 党员发布议题 */ - private Integer userTotal; + private Integer publishIssueTotal; /** * 议事数 @@ -88,4 +89,29 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity { */ private Integer resolvedProjectTotal; + + /** + * 议事占比 + */ + private BigDecimal issueRatio; + + /** + * 话题占比 + */ + private BigDecimal topicRatio; + + /** + * 议题转项目占比 + */ + private BigDecimal shiftProjectRatio; + + /** + * 解决项目占比 + */ + private BigDecimal resolvedProjectRatio; + + /** + * 党员发布议题占比 + */ + private BigDecimal publishIssueRatio; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml index 73e703ae25..c140b7d3f3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml @@ -21,11 +21,16 @@ ORG_ID, PARENT_ID, ORG_NAME, - USER_TOTAL, + PUBLISH_ISSUE_TOTAL, ISSUE_TOTAL, TOPIC_TOTAL, SHIFT_PROJECT_TOTAL, RESOLVED_PROJECT_TOTAL, + PUBLISH_ISSUE_RATIO, + ISSUE_RATIO, + TOPIC_RATIO, + SHIFT_PROJECT_RATIO, + RESOLVED_PROJECT_TOTAL_RATIO, DEL_FLAG, REVISION, CREATED_BY, @@ -41,11 +46,17 @@ #{item.orgId}, #{item.parentId}, #{item.orgName}, - #{item.userTotal}, + #{item.publishIssueTotal}, #{item.issueTotal}, #{item.topicTotal}, #{item.shiftProjectTotal}, #{item.resolvedProjectTotal}, + + #{item.issueRatio}, + #{item.topicRatio}, + #{item.shiftProjectRatio}, + #{item.resolvedProjectRatio}, + #{item.publishIssueRatio}, 0, 0, 'APP_USER', From b84d4f68116bfdf38b7f25d6207a09abe77cd72c Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 20 Aug 2020 17:50:31 +0800 Subject: [PATCH 045/360] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml index e368b27eda..9b72f3c260 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.131 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.132 ports: - "8110:8110" network_mode: host # 使用现有网络 From 5c06fa9a41a18666b0cf79927e5282f42204abcc Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 20 Aug 2020 17:51:32 +0800 Subject: [PATCH 046/360] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml index d10eea3729..ed16793dcc 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.131 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.132 ports: - "8110:8110" network_mode: host # 使用现有网络 From ae17f56fe4083e1091231c20251906165789e466 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 20 Aug 2020 18:07:15 +0800 Subject: [PATCH 047/360] =?UTF-8?q?1=E3=80=81=E5=85=88=E9=94=8B=E6=A8=A1?= =?UTF-8?q?=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/FineExampleResultDTO.java | 52 ++++++++++++++----- .../dao/screen/ScreenPioneerDataDao.java | 12 ++++- .../impl/PartyMemberLeadServiceImpl.java | 25 ++++++++- .../mapper/screen/ScreenPioneerDataDao.xml | 20 ++++++- 4 files changed, 93 insertions(+), 16 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java index bd05a4b317..a81f45fc05 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.screen.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -14,42 +15,67 @@ public class FineExampleResultDTO implements Serializable { private static final long serialVersionUID = -2754696449087950719L; /** - * 党员参与议题数 + * 党员参与议事 */ - private Integer issueTotal; + private Integer issueTotal = 0; + + @JsonIgnore + private Double issueRatioA; /** - * 党员参与议题书占平台议题数的占比 + * 党员参与议事占比 */ - private String issueRatio; + private String issueRatio = "0.00%"; /** * 党员发布话题总数 */ - private Integer topicTotal; + private Integer topicTotal = 0; + + @JsonIgnore + private Double topicRatioA; /** - * 占平台总话题百分比 + * 党员发布话题占比 */ - private String topicRatio; + private String topicRatio = "0.00%"; /** * 议题转项目 */ - private Integer shiftProjectTotal; + private Integer shiftProjectTotal = 0; + + @JsonIgnore + private Double shiftProjectRatioA; /** - * 议题转项目占平台总项目数的比率 + * 议题转项目占比 */ - private String shiftProjectRatio; + private String shiftProjectRatio = "0.00%"; /** * 解决项目 */ - private Integer resolvedProjectTotal; + private Integer resolvedProjectTotal = 0; + + @JsonIgnore + private Double resolvedProjectRatioA; + + /** + * 解决项目占比 + */ + private String resolvedProjectRatio = "0.00%"; + + /** + * 党员发布议题数 + */ + private Integer publishIssueTotal = 0; + + @JsonIgnore + private Double publishIssueRatioA; /** - * 占总解决项目的百分比 + * 党员发布议题数占比 */ - private String resolvedProjectRatio; + private String publishIssueRatio = "0.00%"; } 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/screen/ScreenPioneerDataDao.java index e2c01f7f9f..4b477689c3 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/screen/ScreenPioneerDataDao.java @@ -17,7 +17,9 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.FineExampleResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 党建引领-先锋模范数据 @@ -27,5 +29,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenPioneerDataDao{ - + + /** + * @Description 查询先锋模范 + * @param agencyId + * @author zxc + * @date 2020/8/20 5:22 下午 + */ + FineExampleResultDTO selectFineExample(@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/PartyMemberLeadServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java index f9a451bd6b..9620590d25 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -3,6 +3,7 @@ package com.epmet.datareport.service.screen.impl; import com.epmet.commons.tools.constant.NumConstant; 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.service.screen.PartyMemberLeadService; import com.epmet.screen.dto.form.ContactMassLineChartFormDTO; import com.epmet.screen.dto.form.FineExampleFormDTO; @@ -11,6 +12,7 @@ import com.epmet.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.Comparator; import java.util.List; @@ -32,6 +34,8 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { private GrassrootsPartyDevServiceImpl grassrootsPartyDevServiceImpl; @Autowired private ScreenPartyBranchDataDao screenPartyBranchDataDao; + @Autowired + private ScreenPioneerDataDao screenPioneerDataDao; /** * @Description 1、先锋模范 @@ -41,8 +45,27 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { */ @Override public FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO) { + FineExampleResultDTO fineExampleResultDTO = screenPioneerDataDao.selectFineExample(fineExampleFormDTO.getAgencyId()); + if (null == fineExampleResultDTO){ + return new FineExampleResultDTO(); + } + fineExampleResultDTO.setIssueRatio(this.getRatio(fineExampleResultDTO.getIssueRatioA()).concat("%")); + fineExampleResultDTO.setPublishIssueRatio(this.getRatio(fineExampleResultDTO.getPublishIssueRatioA()).concat("%")); + fineExampleResultDTO.setResolvedProjectRatio(this.getRatio(fineExampleResultDTO.getResolvedProjectRatioA()).concat("%")); + fineExampleResultDTO.setTopicRatio(this.getRatio(fineExampleResultDTO.getTopicRatioA()).concat("%")); + fineExampleResultDTO.setShiftProjectRatio(this.getRatio(fineExampleResultDTO.getShiftProjectRatioA()).concat("%")); + return fineExampleResultDTO; + } - return null; + /** + * @Description + * @param d + * @author zxc + * @date 2020/8/20 6:06 下午 + */ + public String getRatio(Double d){ + BigDecimal bigDecimal = new BigDecimal(d * NumConstant.ONE_HUNDRED); + return bigDecimal.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).toPlainString(); } /** 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 b59d02f321..58247ff1e3 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 @@ -3,5 +3,23 @@ - + + \ No newline at end of file From 28a953512551b19660f55bb7c3a384b7cd43d7ce Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 21 Aug 2020 09:20:02 +0800 Subject: [PATCH 048/360] =?UTF-8?q?=E5=85=88=E9=94=8B=E6=A8=A1=E8=8C=83?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/PartyMemberLeadServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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/screen/impl/PartyMemberLeadServiceImpl.java index 9620590d25..0bcdbbc5d9 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -49,23 +49,23 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { if (null == fineExampleResultDTO){ return new FineExampleResultDTO(); } - fineExampleResultDTO.setIssueRatio(this.getRatio(fineExampleResultDTO.getIssueRatioA()).concat("%")); - fineExampleResultDTO.setPublishIssueRatio(this.getRatio(fineExampleResultDTO.getPublishIssueRatioA()).concat("%")); - fineExampleResultDTO.setResolvedProjectRatio(this.getRatio(fineExampleResultDTO.getResolvedProjectRatioA()).concat("%")); - fineExampleResultDTO.setTopicRatio(this.getRatio(fineExampleResultDTO.getTopicRatioA()).concat("%")); - fineExampleResultDTO.setShiftProjectRatio(this.getRatio(fineExampleResultDTO.getShiftProjectRatioA()).concat("%")); + fineExampleResultDTO.setIssueRatio(this.getRatio(fineExampleResultDTO.getIssueRatioA())); + fineExampleResultDTO.setPublishIssueRatio(this.getRatio(fineExampleResultDTO.getPublishIssueRatioA())); + fineExampleResultDTO.setResolvedProjectRatio(this.getRatio(fineExampleResultDTO.getResolvedProjectRatioA())); + fineExampleResultDTO.setTopicRatio(this.getRatio(fineExampleResultDTO.getTopicRatioA())); + fineExampleResultDTO.setShiftProjectRatio(this.getRatio(fineExampleResultDTO.getShiftProjectRatioA())); return fineExampleResultDTO; } /** - * @Description + * @Description 小数转换百分比 * @param d * @author zxc * @date 2020/8/20 6:06 下午 */ public String getRatio(Double d){ BigDecimal bigDecimal = new BigDecimal(d * NumConstant.ONE_HUNDRED); - return bigDecimal.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).toPlainString(); + return bigDecimal.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).toPlainString().concat("%"); } /** From 453df054ec7e6297f52a58a07b5cab8572b5c33a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 21 Aug 2020 10:26:41 +0800 Subject: [PATCH 049/360] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=9C=88=E4=BB=BD?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BD=B4=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/screen/constant/ScreenConstant.java | 4 +++ .../service/screen/impl/IndexServiceImpl.java | 5 ++-- .../impl/PartyMemberLeadServiceImpl.java | 25 +++++++++++++++---- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java index fcbbfd7b35..b03dbe6466 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java @@ -8,4 +8,8 @@ public interface ScreenConstant { String COMMUNITY = "community"; + String MONTH = "月"; + + String RATIO = "%"; + } 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/screen/impl/IndexServiceImpl.java index 7ad1c645b4..79272dd3b4 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/screen/impl/IndexServiceImpl.java @@ -34,7 +34,7 @@ public class IndexServiceImpl implements IndexService { @Autowired private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao; @Autowired - private GrassrootsPartyDevServiceImpl grassrootsPartyDevServiceImpl; + private PartyMemberLeadServiceImpl partyMemberLeadServiceImpl; /** * @Description 1、年度平均指数 @@ -81,8 +81,7 @@ public class IndexServiceImpl implements IndexService { List governAbilityData = new ArrayList<>(); List totalIndexData = new ArrayList<>(); // 1. x轴 - Map x = grassrootsPartyDevServiceImpl.getX(); - result.setXAxis(x.values().stream().collect(Collectors.toList())); + result.setXAxis(partyMemberLeadServiceImpl.getX()); // 2. 查询近一年的指数值【不包括本月】 List monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(customerId, monthBarchartFormDTO.getAgencyId()); if (monthBarchartResults.size() == NumConstant.ZERO){ 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/screen/impl/PartyMemberLeadServiceImpl.java index 0bcdbbc5d9..c3c5fcf0d1 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -9,10 +9,12 @@ 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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; +import java.time.LocalDate; import java.util.ArrayList; import java.util.Comparator; import java.util.List; @@ -31,8 +33,6 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { @Autowired private ScreenPartyLinkMassesDataDao screenPartyLinkMassesDataDao; @Autowired - private GrassrootsPartyDevServiceImpl grassrootsPartyDevServiceImpl; - @Autowired private ScreenPartyBranchDataDao screenPartyBranchDataDao; @Autowired private ScreenPioneerDataDao screenPioneerDataDao; @@ -65,7 +65,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { */ public String getRatio(Double d){ BigDecimal bigDecimal = new BigDecimal(d * NumConstant.ONE_HUNDRED); - return bigDecimal.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).toPlainString().concat("%"); + return bigDecimal.setScale(NumConstant.TWO, BigDecimal.ROUND_HALF_UP).toPlainString().concat(ScreenConstant.RATIO); } /** @@ -110,8 +110,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { List organizeData = new ArrayList<>(); List joinData = new ArrayList<>(); List averageJoinUserData = new ArrayList<>(); - Map x = grassrootsPartyDevServiceImpl.getX(); - result.setXAxis(x.values().stream().collect(Collectors.toList())); + result.setXAxis(this.getX()); List volunteerServiceResults = screenPartyBranchDataDao.selectVolunteerServiceResult(volunteerServiceFormDTO.getAgencyId()); if (volunteerServiceResults.size() == NumConstant.ZERO){ for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) { @@ -135,4 +134,20 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { result.setAverageJoinUserData(averageJoinUserData); return result; } + + /** + * @Description 获取之前的12个月份【不包括当前月】 + * @author zxc + * @date 2020/8/21 10:19 上午 + */ + public List getX(){ + List xAxis = new ArrayList<>(); + LocalDate today = LocalDate.now(); + for(int i = NumConstant.TWELVE;i >= NumConstant.ONE; i--){ + LocalDate localDate = today.minusMonths(i); + String s = localDate.getMonth().getValue() + ScreenConstant.MONTH; + xAxis.add(s); + } + return xAxis; + } } From c22f2a76c87f1a6c89106d0f93b5b11e8ea6e8f8 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 21 Aug 2020 10:30:19 +0800 Subject: [PATCH 050/360] getXPro --- .../datareport/service/screen/impl/IndexServiceImpl.java | 2 +- .../service/screen/impl/PartyMemberLeadServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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/screen/impl/IndexServiceImpl.java index 79272dd3b4..b739d2551b 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/screen/impl/IndexServiceImpl.java @@ -81,7 +81,7 @@ public class IndexServiceImpl implements IndexService { List governAbilityData = new ArrayList<>(); List totalIndexData = new ArrayList<>(); // 1. x轴 - result.setXAxis(partyMemberLeadServiceImpl.getX()); + result.setXAxis(partyMemberLeadServiceImpl.getXPro()); // 2. 查询近一年的指数值【不包括本月】 List monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(customerId, monthBarchartFormDTO.getAgencyId()); if (monthBarchartResults.size() == NumConstant.ZERO){ 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/screen/impl/PartyMemberLeadServiceImpl.java index c3c5fcf0d1..f5d2704990 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -110,7 +110,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { List organizeData = new ArrayList<>(); List joinData = new ArrayList<>(); List averageJoinUserData = new ArrayList<>(); - result.setXAxis(this.getX()); + result.setXAxis(this.getXPro()); List volunteerServiceResults = screenPartyBranchDataDao.selectVolunteerServiceResult(volunteerServiceFormDTO.getAgencyId()); if (volunteerServiceResults.size() == NumConstant.ZERO){ for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) { @@ -140,7 +140,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author zxc * @date 2020/8/21 10:19 上午 */ - public List getX(){ + public List getXPro(){ List xAxis = new ArrayList<>(); LocalDate today = LocalDate.now(); for(int i = NumConstant.TWELVE;i >= NumConstant.ONE; i--){ From 0d7d292f6603f03a0c0ed81d26d14c7ee9176164 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 21 Aug 2020 11:39:02 +0800 Subject: [PATCH 051/360] =?UTF-8?q?screen=5F=E7=9B=B8=E5=85=B3=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/screen/ScreenCustomerGridDao.java | 2 +- .../dao/screen/ScreenDifficultyDataDao.java | 2 +- .../dao/screen/ScreenUserTotalDataDao.java | 2 +- .../dao/screen/ScreenCustomerGridDao.java | 2 +- .../dao/screen/ScreenDifficultyDataDao.java | 2 +- .../dao/screen/ScreenUserTotalDataDao.java | 2 +- .../screen/ScreenCpcBaseDataEntity.java | 19 ++++-- .../screen/ScreenCustomerAgencyEntity.java | 10 ++- .../screen/ScreenCustomerDeptEntity.java | 7 +- .../screen/ScreenCustomerGridEntity.java | 9 ++- .../screen/ScreenDifficultyDataEntity.java | 16 +++-- .../entity/screen/ScreenEventDataEntity.java | 26 ++++--- .../screen/ScreenEventImgDataEntity.java | 2 +- .../screen/ScreenGovernRankDataEntity.java | 4 +- .../screen/ScreenIndexDataMonthlyEntity.java | 8 +-- .../screen/ScreenIndexDataYearlyEntity.java | 2 +- .../screen/ScreenOrgRankDataEntity.java | 4 +- .../screen/ScreenPartyBranchDataEntity.java | 15 ++--- .../ScreenPartyLinkMassesDataEntity.java | 9 ++- .../screen/ScreenPartyUserRankDataEntity.java | 41 +++++++----- .../screen/ScreenPioneerDataEntity.java | 43 ++++++++++-- .../entity/screen/ScreenUserJoinEntity.java | 67 +++++++++++++------ .../screen/ScreenUserTotalDataEntity.java | 23 +++++-- 23 files changed, 216 insertions(+), 101 deletions(-) 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/screen/ScreenCustomerGridDao.java index 9dff41e9ff..4e57c2f71d 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/screen/ScreenCustomerGridDao.java @@ -27,7 +27,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * 网格信息 + * 网格(党支部)信息 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-18 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/screen/ScreenDifficultyDataDao.java index ced4f66003..5a18c2b998 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/screen/ScreenDifficultyDataDao.java @@ -20,7 +20,7 @@ package com.epmet.datareport.dao.screen; import org.apache.ibatis.annotations.Mapper; /** - * 基层治理-难点堵点 + * 基层治理-难点堵点(耗时最长|设计部门最多|处理次数) * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-18 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 46576c5517..14137c4be0 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 @@ -23,7 +23,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; /** - * 中央区-各类用户总数 + * 中央区-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-18 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java index 3925d0ad6e..c9fa856582 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java @@ -26,7 +26,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * 网格信息 + * 网格(党支部)信息 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-18 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java index 5379eeb893..1a9b991bac 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java @@ -26,7 +26,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * 基层治理-难点堵点 + * 基层治理-难点堵点(耗时最长|设计部门最多|处理次数) * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-18 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java index ec449f1352..e0712dee50 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java @@ -26,7 +26,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * 中央区-各类用户总数 + * 中央区-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-08-18 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java index 18eaf5d6e3..e649e5e89f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java @@ -29,7 +29,7 @@ import java.util.Date; * 基层党建-党员基本情况 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -63,6 +63,11 @@ public class ScreenCpcBaseDataEntity extends BaseEpmetEntity { */ private String orgName; + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + /** * 注册用户数 */ @@ -79,32 +84,32 @@ public class ScreenCpcBaseDataEntity extends BaseEpmetEntity { private Integer partyMemberCount; /** - * 小于20岁 + * 小于20岁的党员总人数 */ private Integer ageLevel1; /** - * 20-30岁 + * 20-30岁的党员总人数 */ private Integer ageLevel2; /** - * 31-40岁 + * 31-40岁的党员总人数 */ private Integer ageLevel3; /** - * 41-50岁 + * 41-50岁的党员总人数 */ private Integer ageLevel4; /** - * 51-60岁 + * 51-60岁的党员总人数 */ private Integer ageLevel5; /** - * 60+岁 + * 60+岁的党员总人数 */ private Integer ageLevel6; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java index 91f37c37c1..96b2e23dfe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java @@ -14,7 +14,6 @@ * 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; @@ -29,7 +28,7 @@ import java.util.Date; * 组织机构信息 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -59,7 +58,7 @@ public class ScreenCustomerAgencyEntity extends BaseEpmetEntity { private String pid; /** - * 所有上级ID,用逗号分开 + * 所有上级ID,用逗号(英文)分开 */ private String pids; @@ -97,4 +96,9 @@ public class ScreenCustomerAgencyEntity extends BaseEpmetEntity { */ private String areaCode; + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java index 2dc5f09cc4..f020e44cd8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java @@ -29,7 +29,7 @@ import java.util.Date; * 部门信息 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -73,4 +73,9 @@ public class ScreenCustomerDeptEntity extends BaseEpmetEntity { */ private String deptMark; + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java index 646fd8af24..99b6c99553 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java @@ -26,10 +26,10 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 网格信息 + * 网格(党支部)信息 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -73,4 +73,9 @@ public class ScreenCustomerGridEntity extends BaseEpmetEntity { */ private String partyMark; + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java index 3a49498dca..27426e658c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java @@ -26,10 +26,10 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 基层治理-难点堵点 + * 基层治理-难点堵点(耗时最长|设计部门最多|处理次数) * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -113,8 +113,14 @@ public class ScreenDifficultyDataEntity extends BaseEpmetEntity { */ private String eventStatusDesc; - /** - * 最近一次操作说明 - */ + /** + * 最近一次操作说明 + */ private String latestOperateDesc; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java index a007794682..e666f852b0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java @@ -30,7 +30,7 @@ import java.util.Date; * 中央区-事件数据 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -124,18 +124,24 @@ public class ScreenEventDataEntity extends BaseEpmetEntity { */ private Date lastProcessDate; - /** - * 事件状态key - */ + /** + * 事件状态key + */ private String eventStatusCode; - /** - * 事件状态描述 - */ + /** + * 事件状态描述 + */ private String eventStatusDesc; - /** - * 最近一次操作说明 - */ + /** + * 最近一次操作说明 + */ private String latestOperateDesc; + + /** + * 数据更新至: yyyy|yyyMM|yyyyMMdd + */ + private String dataEndTime; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java index 9babf7e18f..fb0e81290b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java @@ -29,7 +29,7 @@ import java.util.Date; * 中央区-事件数据图片数据 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java index 804ad16f07..d280785a6c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.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-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java index f0f3ef1fed..fbeb83ba9a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.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-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -45,12 +45,12 @@ public class ScreenIndexDataMonthlyEntity extends BaseEpmetEntity { private String customerId; /** - * 年Id + * 年Id: yyyy */ private String yearId; /** - * 月份Id + * 月份Id yyyyMM */ private String monthId; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java index 8f8063c0db..259947010d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java @@ -30,7 +30,7 @@ import java.util.Date; * 指数-指数数据(按年统计) * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-19 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java index e5a33a235e..a732eda4b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.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-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java index 8717291a31..cb870d2de7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java @@ -14,7 +14,6 @@ * 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; @@ -26,10 +25,10 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 基层党建-建设情况数据(支部,联建,志愿服务) + * 基层党建-建设情况数据(支部,联建,志愿服务)按月 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -54,7 +53,7 @@ public class ScreenPartyBranchDataEntity extends BaseEpmetEntity { private String monthId; /** - * 数据类别 party:支部建设;union:联合建设党员志愿服务:voluntaryservice + * 数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice */ private String type; @@ -84,7 +83,7 @@ public class ScreenPartyBranchDataEntity extends BaseEpmetEntity { private String meetCategoryId; /** - * 会议分类名称 + * 会议分类名称(三会党课、主题党日.....等等) */ private String meetCategoryName; @@ -98,9 +97,9 @@ public class ScreenPartyBranchDataEntity extends BaseEpmetEntity { */ private Integer joinUserCount; - /** - * 平均参加人数 - */ + /** + * 平均参加人数 + */ private Integer averageJoinUserCount; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java index 4931575b55..c663fc770b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java @@ -29,7 +29,7 @@ import java.util.Date; * 党建引领-党员联系群众数据 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -64,7 +64,7 @@ public class ScreenPartyLinkMassesDataEntity extends BaseEpmetEntity { private String orgName; /** - * 建群总数 + * 党员建群总数 */ private Integer createGroupTotal; @@ -73,4 +73,9 @@ public class ScreenPartyLinkMassesDataEntity extends BaseEpmetEntity { */ private Integer groupUserTotal; + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java index a313b55cc7..702e184439 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java @@ -29,7 +29,7 @@ import java.util.Date; * 党建引领|基层治理-市民(党员)积分排行榜 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -44,47 +44,47 @@ public class ScreenPartyUserRankDataEntity extends BaseEpmetEntity { private String customerId; /** - * 年Id + * 网格id */ - private String yearId; + private String gridId; /** - * 月份Id + * 组织名称 */ - private String monthId; + private String gridName; /** - * 组织类别 agency:组织;部门:department;网格:grid + * 网格所属的组织id */ - private String orgType; + private String orgId; /** - * 组织Id 可以为网格,机关id + * 网格所属的组织名称 */ - private String orgId; + private String orgName; /** - * 上级组织Id + * 是否是党员标志:1是。0不是党员 */ - private String parentId; + private Integer partyFlag; /** - * 组织名称 + * 用户Id */ - private String orgName; + private String userId; /** - * 用户身份 party:党员;resi:居民 + * 姓 */ - private String userType; + private String surname; /** - * 用户Id + * 名 */ - private String userId; + private String name; /** - * 用户名称 + * 姓名 */ private String userName; @@ -93,4 +93,9 @@ public class ScreenPartyUserRankDataEntity extends BaseEpmetEntity { */ private Integer pointTotal; + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java index ab192e7161..b53561b229 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java @@ -23,13 +23,14 @@ import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.math.BigDecimal; import java.util.Date; /** * 党建引领-先锋模范数据 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -64,28 +65,58 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity { private String orgName; /** - * 用户总数 + * 党员参与议事 */ - private Integer userTotal; + private Integer issueTotal; /** - * 议事数 + * 党员参与议事占比 */ - private Integer issueTotal; + private BigDecimal issueRatio; /** - * 话题总数 + * 党员发布话题 */ private Integer topicTotal; + /** + * 党员发布话题占比 + */ + private BigDecimal topicRatio; + + /** + * 党员发布议题 + */ + private Integer publishIssueTotal; + + /** + * 党员发布议题占比 + */ + private BigDecimal publishIssueRatio; + /** * 议题转项目数 */ private Integer shiftProjectTotal; + /** + * 议题转项目占比 + */ + private BigDecimal shiftProjectRatio; + /** * 解决项目总数 */ private Integer resolvedProjectTotal; + /** + * 解决项目总数占比 + */ + private BigDecimal resolvedProjectRatio; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java index d7ff0d4860..6c054eba53 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java @@ -30,7 +30,7 @@ import java.util.Date; * 基层治理-公众参与 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -44,16 +44,6 @@ public class ScreenUserJoinEntity extends BaseEpmetEntity { */ private String customerId; - /** - * 年Id - */ - private String yearId; - - /** - * 月份Id - */ - private String monthId; - /** * 组织类别 agency:组织;部门:department;网格:grid */ @@ -75,19 +65,58 @@ public class ScreenUserJoinEntity extends BaseEpmetEntity { private String orgName; /** - * 组织次数 + * 数据更新至 年Id: yyyy + */ + private String yearId; + + /** + * 数据更新至 :月份Id :yyyyMM */ - private Integer organizeTotal; + private String monthId; + + /** + * 总的参与次数 + */ + private String joinTotal; - /** - * 参与次数 - */ - private Integer joinTotal; + /** + * 总的参与次数较上月增长率(采集的时候后台自己计算) + */ + private String joinTotalUpRate; /** - * 平均参与人数 + * 增长:incr;下降:decr; 相等 :eq */ - private Integer avgJoinUser; + private String joinTotalUpFlag; + /** + * 人均议题 + */ + private Integer avgIssue; + + /** + * 人均议题较上月增长率(采集的时候后台自己计算) + */ + private BigDecimal avgIssueUpRate; + + /** + * 增长:incr;下降:decr; 相等 :eq + */ + private String avgIssueUpFlag; + + /** + * 平均参与度 + */ + private Integer avgJoin; + + /** + * 平均参与度较上月增长率(采集的时候后台自己计算) + */ + private BigDecimal agvgJoinUpRate; + + /** + * 增长:incr;下降:decr; 相等 :eq + */ + private String agvgJoinUpFlag; } 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 80187ba014..a58f257cc6 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,10 +26,10 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 中央区-各类用户总数 + * 中央区-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-18 + * @since v1.0.0 2020-08-21 */ @Data @EqualsAndHashCode(callSuper=false) @@ -44,7 +44,7 @@ public class ScreenUserTotalDataEntity extends BaseEpmetEntity { private String customerId; /** - * 组织类别 agency:组织;部门:department;网格:grid + * 组织类别 agency:组织;网格:grid;部门:department; */ private String orgType; @@ -59,10 +59,15 @@ public class ScreenUserTotalDataEntity extends BaseEpmetEntity { private String parentId; /** - * 组织名称 + * 组织名称,也可能是网格名称 */ private String orgName; + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + /** * 用户总数 */ @@ -93,4 +98,14 @@ public class ScreenUserTotalDataEntity extends BaseEpmetEntity { */ private Integer projectTotal; + /** + * 注册人数(08-21新增) + */ + private Integer regUserTotal; + + /** + * 参与人数(08-21新增) + */ + private Integer joinUserTotal; + } From 8804a1796179be151ef005a7b23aa1a13e768d20 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 21 Aug 2020 11:40:28 +0800 Subject: [PATCH 052/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9screen=5F=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/entity/screen/ScreenPioneerDataEntity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java index 6c5d634ba6..b53561b229 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java @@ -23,6 +23,7 @@ import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.math.BigDecimal; import java.util.Date; /** From 57994420ba7571a8c1ce8c12a1c610b0b2e09bcf Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 21 Aug 2020 12:27:25 +0800 Subject: [PATCH 053/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9screen=5F=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E8=A1=A8v3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/entity/screen/ScreenDifficultyDataEntity.java | 4 ++++ .../java/com/epmet/entity/screen/ScreenUserJoinEntity.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java index 27426e658c..845bbb7db0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java @@ -93,6 +93,10 @@ public class ScreenDifficultyDataEntity extends BaseEpmetEntity { */ private Integer eventReOrg; + /** + * 事件被处理次数(08-21新增) + */ + private Integer eventHandledCount; /** * 事件类别编码 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java index 6c054eba53..d67593a2f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java @@ -82,7 +82,7 @@ public class ScreenUserJoinEntity extends BaseEpmetEntity { /** * 总的参与次数较上月增长率(采集的时候后台自己计算) */ - private String joinTotalUpRate; + private BigDecimal joinTotalUpRate; /** * 增长:incr;下降:decr; 相等 :eq From 9957f8d81b6411752a1317b5cd7a92896435c3bb Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 21 Aug 2020 13:27:32 +0800 Subject: [PATCH 054/360] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/screen/dto/result/CompartmentResultDTO.java | 9 +++++---- .../com/epmet/screen/dto/result/ParymemberResultDTO.java | 3 ++- .../epmet/screen/dto/result/ProjectDetailResultDTO.java | 3 ++- .../java/com/epmet/screen/dto/result/TreeResultDTO.java | 7 ++++--- .../java/com/epmet/screen/dto/result/UserResultDTO.java | 9 +++++---- .../service/screen/impl/AgencyServiceImpl.java | 2 +- .../datareport/service/screen/impl/IndexServiceImpl.java | 2 +- 7 files changed, 20 insertions(+), 15 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java index aa55fe420e..2bf8ffd3d6 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -18,17 +19,17 @@ public class CompartmentResultDTO implements Serializable { /** * 当前所选组织 */ - private String agencyId; + private String agencyId = ""; /** * 当前所选组织名称 */ - private String name; + private String name = ""; /** * 当前所选组织的坐标区域 */ - private String areaMarks; + private String areaMarks = ""; /** * 机关级别 @@ -44,5 +45,5 @@ public class CompartmentResultDTO implements Serializable { /** * 子级用户分布 */ - private List agencyDistribution; + private List agencyDistribution = new ArrayList<>(); } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java index b655f5fad5..18bc33df48 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -44,5 +45,5 @@ public class ParymemberResultDTO implements Serializable { /** * 子级用户分布 */ - private List userDistribution; + private List userDistribution = new ArrayList<>(); } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java index b560620d9a..234fe38034 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.screen.dto.result; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -42,5 +43,5 @@ public class ProjectDetailResultDTO implements Serializable { /** * 图片列表 */ - private List imgList; + private List imgList = new ArrayList<>(); } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java index 72fd6a0dd9..b12a8f46f5 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -18,12 +19,12 @@ public class TreeResultDTO implements Serializable { /** * 显示名称 */ - private String label; + private String label = ""; /** * agencyId下拉框value */ - private String value; + private String value = ""; @JsonIgnore private String pids; @@ -31,6 +32,6 @@ public class TreeResultDTO implements Serializable { /** * 子目录 */ - private List children; + private List children = new ArrayList<>(); } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java index 102faca70d..179aa5bec2 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; import java.util.List; /** @@ -18,17 +19,17 @@ public class UserResultDTO implements Serializable { /** * 当前所选组织 */ - private String agencyId; + private String agencyId = ""; /** * 当前所选组织名称 */ - private String name; + private String name = ""; /** * 当前所选组织的坐标区域 */ - private String areaMarks; + private String areaMarks = ""; /** * 机关级别 @@ -44,5 +45,5 @@ public class UserResultDTO implements Serializable { /** * 子级用户分布 */ - private List userDistribution; + private List userDistribution = new ArrayList<>(); } 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 3512ed5324..941cba3477 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 @@ -75,7 +75,7 @@ public class AgencyServiceImpl implements AgencyService { public CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO) { CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(compartmentFormDTO.getAgencyId()); if (null == agencyAreaInfo){ - return agencyAreaInfo; + return new CompartmentResultDTO(); } if (agencyAreaInfo.getLevel().equals(ScreenConstant.COMMUNITY)){ // 当level为"community"时,查询screen_customer_grid表 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/screen/impl/IndexServiceImpl.java index b739d2551b..50fa7cf4be 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/screen/impl/IndexServiceImpl.java @@ -60,7 +60,7 @@ public class IndexServiceImpl implements IndexService { @Override public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) { MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId()); - if (null == monthPieChartFormDTO){ + if (null == monthPieChartResultDTO){ return new MonthPieChartResultDTO(); } return monthPieChartResultDTO; From 1f45d782a7dd5d4ce9062db8ed1cf86928196821 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 21 Aug 2020 14:00:36 +0800 Subject: [PATCH 055/360] =?UTF-8?q?=E5=B0=86=E8=AF=84=E4=BB=B7=E6=8C=87?= =?UTF-8?q?=E6=A0=87=E4=BD=93=E7=B3=BBexcel=E5=AF=BC=E5=85=A5=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/utils/UniqueIdGenerator.java | 81 ++++++ .../com/epmet/dto/screen/IndexDictDTO.java | 97 +++++++ .../com/epmet/dto/screen/IndexGroupDTO.java | 92 ++++++ .../epmet/dto/screen/IndexGroupDetailDTO.java | 92 ++++++ .../screen/IndexGroupDetailTemplateDTO.java | 92 ++++++ .../data-statistical-server/pom.xml | 19 ++ .../epmet/controller/IndexDictController.java | 68 +++++ .../com/epmet/dao/screen/IndexDictDao.java | 34 +++ .../com/epmet/dao/screen/IndexGroupDao.java | 33 +++ .../epmet/dao/screen/IndexGroupDetailDao.java | 33 +++ .../screen/IndexGroupDetailTemplateDao.java | 35 +++ .../dao/screen/IndexGroupTemplateDao.java | 34 +++ .../epmet/entity/screen/IndexDictEntity.java | 53 ++++ .../entity/screen/IndexGroupDetailEntity.java | 60 ++++ .../IndexGroupDetailTemplateEntity.java | 65 +++++ .../epmet/entity/screen/IndexGroupEntity.java | 58 ++++ .../screen/IndexGroupTemplateEntity.java | 53 ++++ .../epmet/model/IndexExcelDataListener.java | 272 ++++++++++++++++++ .../main/java/com/epmet/model/IndexModel.java | 26 ++ .../epmet/model/ParseIndexExcelResult.java | 54 ++++ .../service/screen/IndexDictService.java | 34 +++ .../screen/IndexGroupDetailService.java | 31 ++ .../IndexGroupDetailTemplateService.java | 34 +++ .../service/screen/IndexGroupService.java | 31 ++ .../screen/IndexGroupTemplateService.java | 34 +++ .../screen/impl/IndexDictServiceImpl.java | 43 +++ .../impl/IndexGroupDetailServiceImpl.java | 36 +++ .../IndexGroupDetailTemplateServiceImpl.java | 42 +++ .../screen/impl/IndexGroupServiceImpl.java | 35 +++ .../impl/IndexGroupTemplateServiceImpl.java | 43 +++ .../java/com/epmet/util/ExcelListener.java | 17 ++ .../java/com/epmet/util/TestFileUtil.java | 35 +++ .../resources/mapper/screen/IndexDictDao.xml | 8 + .../resources/mapper/screen/IndexGroupDao.xml | 7 + .../mapper/screen/IndexGroupDetailDao.xml | 6 + .../screen/IndexGroupDetailTemplateDao.xml | 9 + .../mapper/screen/IndexGroupTemplateDao.xml | 8 + .../com/epmet/stats/test/model/DemoData.java | 17 ++ .../stats/test/model/DemoDataListener.java | 84 ++++++ .../epmet/stats/test/read/ConverterData.java | 30 ++ .../test/read/ConverterDataListener.java | 48 ++++ .../read/CustomStringStringConverter.java | 59 ++++ .../com/epmet/stats/test/read/DemoDAO.java | 15 + .../com/epmet/stats/test/read/DemoData.java | 17 ++ .../stats/test/read/DemoDataListener.java | 97 +++++++ .../com/epmet/stats/test/read/ReadTest.java | 70 +++++ .../epmet/stats/test/util/TestFileUtil.java | 35 +++ ...评价指标体系算法需求-备注.xlsx | Bin 0 -> 59391 bytes 48 files changed, 2276 insertions(+) create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/UniqueIdGenerator.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexDictDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailTemplateDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/ParseIndexExcelResult.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexDictService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailTemplateService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupTemplateService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexDictServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailTemplateServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupTemplateServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/ExcelListener.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/TestFileUtil.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexDictDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoData.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoDataListener.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterData.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterDataListener.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/CustomStringStringConverter.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDAO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoData.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDataListener.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ReadTest.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/util/TestFileUtil.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/resources/评价指标体系算法需求-备注.xlsx diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/UniqueIdGenerator.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/UniqueIdGenerator.java new file mode 100644 index 0000000000..fcefbdf2ca --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/UniqueIdGenerator.java @@ -0,0 +1,81 @@ +package com.epmet.commons.tools.utils; + + +import org.apache.commons.lang3.StringUtils; + +import java.util.Date; +import java.util.Random; +import java.util.concurrent.atomic.AtomicLong; + +/** + * 唯一ID生成器 + */ +public class UniqueIdGenerator { + + private static UniqueValue uniqueValue = new UniqueValue(); + private static String middle; + static { + String threadCode = StringUtils.right(String.valueOf(Math.abs(System.nanoTime()+"".hashCode())), 2); + middle = StringUtils.leftPad(threadCode, 2, "0"); + } + + /** + * 唯一时间值 + */ + private static class UniqueValue { + + private AtomicLong uniqueValue = new AtomicLong(0L); + private volatile String currentTime = DateUtils.format(new Date(), DateUtils.DATE_TIME_NO_SPLIT); + private volatile String lastTime = currentTime; + + /** + * 获取当前时间:yyyyMMddHHmmSS + * 如果到了下一秒,则唯一值从0开始 + * + * @return + */ + public String getCurrentTime() { + currentTime = DateUtils.format(new Date(), DateUtils.DATE_TIME_NO_SPLIT); + if (!currentTime.equals(lastTime)) { + lastTime = currentTime; + Random random = new Random(); + uniqueValue.set(Long.valueOf(random.nextInt(10))); + } + return currentTime; + } + + public String getCurrentValue() { + return StringUtils.leftPad(String.valueOf(uniqueValue.incrementAndGet()), 5, "0"); + } + } + + /** + * 生成一个24位唯一ID + * 15位时间+2位中间值(防止多服务冲突)+2个线程code+5位秒级递增值 + * + * @return + */ + public static String generate() { + StringBuilder builder = new StringBuilder(32); + builder.append(uniqueValue.getCurrentTime()) + .append(middle) + .append(getUniqueThreadCode()) + .append(uniqueValue.getCurrentValue()); + + return builder.toString(); + } + + public static String getUniqueThreadCode() { + String threadCode = StringUtils.left(String.valueOf(Thread.currentThread().hashCode()), 2); + return StringUtils.leftPad(threadCode, 2, "0"); + } + + public static void main(String[] args) throws InterruptedException { + + System.out.println(UniqueIdGenerator.uniqueValue.currentTime); + System.out.println(UniqueIdGenerator.middle); + System.out.println(UniqueIdGenerator.getUniqueThreadCode()); + System.out.println(uniqueValue.getCurrentValue()); + + } +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexDictDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexDictDTO.java new file mode 100644 index 0000000000..7ca7e42117 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexDictDTO.java @@ -0,0 +1,97 @@ +/** + * 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.dto.screen; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 评价指标字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +public class IndexDictDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private String id; + + /** + * 指标编码(唯一) + */ + private String indexCode; + + /** + * 指标名 + */ + private String indexName; + + /** + * 指标描述 + */ + private String indexDesc; + + /** + * 父级指标id,如果是一级指标,PID=0 + */ + private String pid; + + /** + * 指标级别(1,2,3,4,5) + */ + private String level; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDTO.java new file mode 100644 index 0000000000..19ee948d15 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDTO.java @@ -0,0 +1,92 @@ +/** + * 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.dto.screen; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +public class IndexGroupDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 指标id + */ + private String indexCode; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 当前指标关联的上一级指标分组,如果没有上一级,则为0 + */ + private String parentIndexGroupId; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java new file mode 100644 index 0000000000..e6335250eb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java @@ -0,0 +1,92 @@ +/** + * 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.dto.screen; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +public class IndexGroupDetailDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private String id; + + /** + * index_group.id + */ + private String indexGroupId; + + /** + * 指标id + */ + private String indexCode; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailTemplateDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailTemplateDTO.java new file mode 100644 index 0000000000..e82b7b4588 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailTemplateDTO.java @@ -0,0 +1,92 @@ +/** + * 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.dto.screen; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +public class IndexGroupDetailTemplateDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private String id; + + /** + * index_group.id + */ + private String indexGroupId; + + /** + * 指标id + */ + private String indexCode; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index cf116c4fb7..95c74f75d1 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -74,6 +74,25 @@ 2.0.0 compile + + + + + org.apache.poi + poi + 3.17 + + + + org.apache.poi + poi-ooxml + 3.17 + + + com.alibaba + easyexcel + 2.2.6 + 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 new file mode 100644 index 0000000000..217867ea32 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java @@ -0,0 +1,68 @@ +package com.epmet.controller; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelReader; +import com.alibaba.excel.read.metadata.ReadSheet; +import com.epmet.commons.tools.utils.Result; +import com.epmet.model.IndexExcelDataListener; +import com.epmet.model.IndexModel; +import com.epmet.service.screen.IndexDictService; +import com.epmet.service.screen.IndexGroupDetailTemplateService; +import com.epmet.service.screen.IndexGroupTemplateService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.io.InputStream; + +/** + * @author liujianjun + */ +@RequestMapping("indexdict") +@RestController +@Slf4j +public class IndexDictController { + + @Autowired + private IndexDictService indexDictService; + @Autowired + private IndexGroupTemplateService indexGroupTemplateService; + @Autowired + private IndexGroupDetailTemplateService indexGroupDetailTemplateService; + + /** + * url:http://localhost:8108/data/stats/indexdict/initFromExcel + * desc:从excel初始化指标,分组,权重 + * + * @param file + * @return + */ + @PostMapping("initFromExcel") + public Result testTx(@RequestPart("file") MultipartFile file) { + ExcelReader excelReader = null; + try { + InputStream inputStream = null; + try { + inputStream = file.getInputStream(); + } catch (IOException e) { + return new Result().error("读取文件失败"); + } + excelReader = EasyExcel.read(inputStream).build(); + // 这里为了简单 所以注册了 同样的head 和Listener 自己使用功能必须不同的Listener + ReadSheet readSheet = EasyExcel.readSheet(1).head(IndexModel.class) + .registerReadListener(new IndexExcelDataListener(indexDictService, indexGroupTemplateService, indexGroupDetailTemplateService)) + .build(); + excelReader.read(readSheet); + } finally { + if (excelReader != null) { + excelReader.finish(); + } + } + return new Result<>(); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java new file mode 100644 index 0000000000..7aa2ab9733 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java @@ -0,0 +1,34 @@ +/** + * 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.entity.screen.IndexDictEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 评价指标字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface IndexDictDao extends BaseDao { + + int deleteAll(); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java new file mode 100644 index 0000000000..10033b7456 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.IndexGroupEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface IndexGroupDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java new file mode 100644 index 0000000000..1a7dd4a0a8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.IndexGroupDetailEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface IndexGroupDetailDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java new file mode 100644 index 0000000000..cfe5270615 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java @@ -0,0 +1,35 @@ +/** + * 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.entity.screen.IndexGroupDetailTemplateEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface IndexGroupDetailTemplateDao extends BaseDao { + + int deleteAll(); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java new file mode 100644 index 0000000000..6f64a61349 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java @@ -0,0 +1,34 @@ +/** + * 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.entity.screen.IndexGroupTemplateEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 默认指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Mapper +public interface IndexGroupTemplateDao extends BaseDao { + + int deleteAll(); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java new file mode 100644 index 0000000000..2ea5745dba --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java @@ -0,0 +1,53 @@ +/** + * 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; + +/** + * 评价指标字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_dict") +public class IndexDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 指标名 + */ + private String indexName; + + /** + * 指标描述 + */ + private String indexDesc; + + /** + * 指标级别(1,2,3,4,5) + */ + private String level; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java new file mode 100644 index 0000000000..e17ba9b2b2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.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.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_group_detail") +public class IndexGroupDetailEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * index_group.id + */ + private String indexGroupId; + + /** + * 指标id + */ + private String indexId; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java new file mode 100644 index 0000000000..569cda48d9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java @@ -0,0 +1,65 @@ +/** + * 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.math.BigDecimal; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_group_detail_template") +public class IndexGroupDetailTemplateEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * index_group.id + */ + private String indexGroupId; + + /** + * 指标id + */ + private String indexId; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 阈值 如果是百分比 则为除以100以后的值 + */ + private BigDecimal threshold; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java new file mode 100644 index 0000000000..24df1ef18a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java @@ -0,0 +1,58 @@ +/** + * 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; + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_group") +public class IndexGroupEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 指标id + */ + private String indexId; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 当前指标关联的上一级指标分组,如果没有上一级,则为0 + */ + private String parentIndexGroupId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java new file mode 100644 index 0000000000..3348ebdeda --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java @@ -0,0 +1,53 @@ +/** + * 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; + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_group_template") +public class IndexGroupTemplateEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 指标id + */ + private String indexId; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 当前指标关联的上一级指标分组,如果没有上一级,则为0 + */ + private String parentIndexGroupId; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java new file mode 100644 index 0000000000..76f0897890 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -0,0 +1,272 @@ +package com.epmet.model; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.utils.UniqueIdGenerator; +import com.epmet.entity.screen.IndexDictEntity; +import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.screen.IndexGroupTemplateEntity; +import com.epmet.service.screen.IndexDictService; +import com.epmet.service.screen.IndexGroupDetailTemplateService; +import com.epmet.service.screen.IndexGroupTemplateService; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + +/** + * 读取转换异常 + * + * @author Jiaju Zhuang + */ +public class IndexExcelDataListener extends AnalysisEventListener { + private static final Logger LOGGER = LoggerFactory.getLogger(IndexExcelDataListener.class); + /** + * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 + */ + private static volatile boolean isGroup = false; + ; + AtomicInteger total = new AtomicInteger(0); + Map indexDicMap = new HashMap<>(); + Map indexGroupMap = new HashMap<>(); + Map indexGroupDetailMap = new HashMap<>(); + List indexModelList = new ArrayList<>(); + private String preWheight; + + private Integer wheightSum = 0; + /** + * 假设这个是一个DAO,当然有业务逻辑这个也可以是一个service。当然如果不用存储这个对象没用。 + */ + private IndexDictService indexDictService; + + private IndexGroupTemplateService indexGroupTemplateService; + + private IndexGroupDetailTemplateService indexGroupDetailTemplateService; + + + /** + * 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来 + * + * @param indexDictService + */ + public IndexExcelDataListener(IndexDictService indexDictService, IndexGroupTemplateService indexGroupTemplateService, IndexGroupDetailTemplateService indexGroupDetailTemplateService) { + this.indexDictService = indexDictService; + this.indexGroupTemplateService = indexGroupTemplateService; + this.indexGroupDetailTemplateService = indexGroupDetailTemplateService; + } + + /** + * 这个每一条数据解析都会来调用 + * + * @param data one row value. Is is same as {@link AnalysisContext#readRowHolder()} + * @param context + */ + @Override + public void invoke(IndexModel data, AnalysisContext context) { + if (data == null || data.getIsUsed() == null || data.getIsUsed() != 1) { + return; + } + + //合并单元格的 权重 处理 + String weight = data.getWeight(); + if (StringUtils.isNotBlank(weight)) { + weight = weight.replace("%", ""); + data.setWeight(weight); + preWheight = data.getWeight(); + } else { + data.setWeight(preWheight); + } + LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data)); + + IndexDictEntity entity = new IndexDictEntity(); + IndexDictEntity entity2 = new IndexDictEntity(); + IndexDictEntity entity3 = new IndexDictEntity(); + IndexDictEntity entity4 = new IndexDictEntity(); + IndexDictEntity entity5 = new IndexDictEntity(); + + indexModelList.add(data); + buildIndexDicEntity(data, entity, entity2, entity3, entity4, entity5); + + buildIndexGroupEntity(); + + total.addAndGet(1); + + + // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM + /*if (isGroup) { + saveData(); + // 存储完成清理 list + list.clear(); + }*/ + } + + private void buildIndexGroupEntity() { + List collect = indexModelList.stream().sorted(Comparator.comparing(IndexModel::getLevel1Index)).collect(Collectors.toList()); + collect.forEach(index -> { + if (index.getLevel1Index().equals("党员相关")) { + IndexDictEntity indexDictEntity = indexDicMap.get(index.getLevel1Index()); + String level1GroupId = UniqueIdGenerator.generate(); + IndexGroupTemplateEntity group1 = indexGroupMap.get(index.getLevel1Index()); + if (group1 == null) { + group1 = new IndexGroupTemplateEntity(); + group1.setIndexId(indexDictEntity.getId()); + group1.setParentIndexGroupId("0"); + group1.setId(level1GroupId); + indexGroupMap.put(index.getLevel1Index(), group1); + } + + String level4Index = index.getLevel4Index(); + indexDictEntity = indexDicMap.get(level4Index); + String level2GroupId = UniqueIdGenerator.generate(); + + IndexGroupTemplateEntity group2 = indexGroupMap.get(level4Index); + IndexGroupDetailTemplateEntity templateEntity = null; + if (group2 == null) { + group2 = new IndexGroupTemplateEntity(); + group2.setIndexId(indexDictEntity.getId()); + group2.setParentIndexGroupId(level1GroupId); + group2.setId(level2GroupId); + indexGroupMap.put(level4Index, group2); + //构建 分组明细 + templateEntity = indexGroupDetailMap.get(level4Index); + if (templateEntity == null) { + buildIndexGroupDetail(indexDictEntity, index, group1.getId(), 2); + } + } + indexDictEntity = indexDicMap.get(index.getLevel5Index()); + + templateEntity = indexGroupDetailMap.get(index.getLevel5Index()); + if (templateEntity == null) { + buildIndexGroupDetail(indexDictEntity, index, group2.getId(), 5); + } + } else { + //todo 测试完去掉 + //if ("街道相关".equals(index.getLevel1Index())) { + IndexDictEntity indexDictEntity = indexDicMap.get(index.getLevel1Index()); + String level1GroupId = UniqueIdGenerator.generate(); + IndexGroupTemplateEntity group1 = indexGroupMap.get(index.getLevel1Index()); + if (group1 == null) { + group1 = new IndexGroupTemplateEntity(); + group1.setIndexId(indexDictEntity.getId()); + group1.setParentIndexGroupId("0"); + group1.setId(level1GroupId); + indexGroupMap.put(index.getLevel1Index(), group1); + } + + String level2Index = index.getLevel2Index(); + indexDictEntity = indexDicMap.get(level2Index); + String level2GroupId = UniqueIdGenerator.generate(); + + IndexGroupTemplateEntity group2 = indexGroupMap.get(level2Index); + IndexGroupDetailTemplateEntity templateEntity = null; + if (group2 == null) { + group2 = new IndexGroupTemplateEntity(); + group2.setIndexId(indexDictEntity.getId()); + group2.setParentIndexGroupId(level1GroupId); + group2.setId(level2GroupId); + indexGroupMap.put(level2Index, group2); + //构建 分组明细 + templateEntity = indexGroupDetailMap.get(level2Index); + if (templateEntity == null) { + buildIndexGroupDetail(indexDictEntity, index, group1.getId(), 2); + } + } + indexDictEntity = indexDicMap.get(index.getLevel5Index()); + + templateEntity = indexGroupDetailMap.get(index.getLevel5Index()); + if (templateEntity == null) { + buildIndexGroupDetail(indexDictEntity, index, group2.getId(), 5); + } + } + //} + }); + LOGGER.info("所有指标分组数据解析完成:{}", JSON.toJSONString(indexGroupMap.values())); + LOGGER.info("所有指标分组明细数据解析完成:{}", JSON.toJSONString(indexGroupDetailMap.values())); + } + + private void buildIndexGroupDetail(IndexDictEntity indexDictEntity, IndexModel index, String groupId, Integer level) { + IndexGroupDetailTemplateEntity templateEntity; + templateEntity = new IndexGroupDetailTemplateEntity(); + templateEntity.setIndexGroupId(groupId); + templateEntity.setIndexId(indexDictEntity.getId()); + + if (level == 5) { + String level5WeightStr = index.getLevel5Weight().replace("%", ""); + templateEntity.setWeight(new BigDecimal(level5WeightStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); + indexGroupDetailMap.put(index.getLevel5Index(), templateEntity); + } else { + indexGroupDetailMap.put(indexDictEntity.getIndexName(), templateEntity); + templateEntity.setWeight(new BigDecimal(index.getWeight()).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); + } + templateEntity.setId(UniqueIdGenerator.generate()); + if (StringUtils.isNotBlank(index.getThreshold())) { + String thresholdStr = index.getThreshold().replace("%", ""); + templateEntity.setThreshold(new BigDecimal(thresholdStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); + } + } + + private void buildIndexDicEntity(IndexModel data, IndexDictEntity entity, IndexDictEntity entity2, IndexDictEntity entity3, IndexDictEntity entity4, IndexDictEntity entity5) { + if (!indexDicMap.containsKey(data.getLevel1Index())) { + entity.setId(UniqueIdGenerator.generate()); + entity.setIndexName(data.getLevel1Index()); + entity.setLevel("1"); + indexDicMap.put(data.getLevel1Index(), entity); + } + if (!indexDicMap.containsKey(data.getLevel2Index())) { + entity2.setId(UniqueIdGenerator.generate()); + entity2.setIndexName(data.getLevel2Index()); + entity2.setLevel("2"); + indexDicMap.put(data.getLevel2Index(), entity2); + } + if (!indexDicMap.containsKey(data.getLevel3Index())) { + entity3.setId(UniqueIdGenerator.generate()); + entity3.setIndexName(data.getLevel3Index()); + entity3.setLevel("3"); + indexDicMap.put(data.getLevel3Index(), entity3); + } + if (!indexDicMap.containsKey(data.getLevel4Index())) { + entity4.setId(UniqueIdGenerator.generate()); + entity4.setIndexName(data.getLevel4Index()); + entity4.setLevel("4"); + indexDicMap.put(data.getLevel4Index(), entity4); + } + if (!indexDicMap.containsKey(data.getLevel5Index())) { + entity5.setId(UniqueIdGenerator.generate()); + entity5.setIndexName(data.getLevel5Index()); + entity5.setLevel("5"); + indexDicMap.put(data.getLevel5Index(), entity5); + } + } + + /** + * 所有数据解析完成了 都会来调用 + * + * @param context + */ + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + // 这里也要保存数据,确保最后遗留的数据也存储到数据库 + saveData(); + LOGGER.info("所有数据解析完成!total:{}", total.intValue()); + } + + /** + * 加上存储数据库 + */ + private void saveData() { + LOGGER.info("{}条数据,开始存储数据库!", indexDicMap.size()); + indexDictService.deleteAndInsertBatch(indexDicMap.values()); + + buildIndexGroupEntity(); + + indexGroupTemplateService.deleteAndInsertBatch(indexGroupMap.values()); + indexGroupDetailTemplateService.deleteAndInsertBatch(indexGroupDetailMap.values()); + LOGGER.info("存储数据库成功!指标:{}个,分组:{}个,详情:{}个", indexDicMap.values().size(), indexGroupMap.values().size(), indexGroupDetailMap.values().size()); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java new file mode 100644 index 0000000000..f264a2c39e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java @@ -0,0 +1,26 @@ +package com.epmet.model; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +@Data +public class IndexModel { + @ExcelProperty(value = "一级指标") + private String level1Index; + @ExcelProperty(value = "二级指标") + private String level2Index; + @ExcelProperty(value = "三级指标") + private String level3Index; + @ExcelProperty(value = "四级指标") + private String level4Index; + @ExcelProperty(value = "五级指标") + private String level5Index; + @ExcelProperty(value = "是否采用") + private Integer isUsed; + @ExcelProperty(value = "权重") + private String weight; + @ExcelProperty(value = "五级权重") + private String level5Weight; + @ExcelProperty(value = "阈值") + private String threshold; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/ParseIndexExcelResult.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/ParseIndexExcelResult.java new file mode 100644 index 0000000000..17b4fa0634 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/ParseIndexExcelResult.java @@ -0,0 +1,54 @@ +package com.epmet.model; + +import lombok.Data; + +import java.io.Serializable; +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; + +@Data +public class ParseIndexExcelResult implements Serializable { + private String id; + private String groupId; + /** + * 当前指标关联的上一级指标分组,如果没有上一级,则为0 + */ + private String parentIndexGroupId; + /** + * 指标编码(唯一) + */ + private String indexCode; + + /** + * 指标名 + */ + private String indexName; + + /** + * 指标描述 + */ + private String indexDesc; + + /** + * 指标级别(1,2,3,4,5) + */ + private String level; + + private Set children = new HashSet<>(); + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ParseIndexExcelResult that = (ParseIndexExcelResult) o; + return indexCode.equals(that.indexCode) && + indexName.equals(that.indexName) && + level.equals(that.level); + } + + @Override + public int hashCode() { + return Objects.hash(indexCode, indexName, indexDesc, level); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexDictService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexDictService.java new file mode 100644 index 0000000000..9e3b4f83ed --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexDictService.java @@ -0,0 +1,34 @@ +/** + * 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.service.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.screen.IndexDictEntity; + +import java.util.Collection; + +/** + * 评价指标字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +public interface IndexDictService extends BaseService { + + Boolean deleteAndInsertBatch(Collection values); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java new file mode 100644 index 0000000000..ea03e298a1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java @@ -0,0 +1,31 @@ +/** + * 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.service.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.screen.IndexGroupDetailEntity; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +public interface IndexGroupDetailService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailTemplateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailTemplateService.java new file mode 100644 index 0000000000..3b0c48f7f9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailTemplateService.java @@ -0,0 +1,34 @@ +/** + * 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.service.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; + +import java.util.Collection; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +public interface IndexGroupDetailTemplateService extends BaseService { + + Boolean deleteAndInsertBatch(Collection values); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java new file mode 100644 index 0000000000..f2ee989bea --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java @@ -0,0 +1,31 @@ +/** + * 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.service.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.screen.IndexGroupEntity; + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +public interface IndexGroupService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupTemplateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupTemplateService.java new file mode 100644 index 0000000000..1f23716176 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupTemplateService.java @@ -0,0 +1,34 @@ +/** + * 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.service.screen; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.screen.IndexGroupTemplateEntity; + +import java.util.Collection; + +/** + * 默认指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +public interface IndexGroupTemplateService extends BaseService { + + Boolean deleteAndInsertBatch(Collection values); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexDictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexDictServiceImpl.java new file mode 100644 index 0000000000..16e4815226 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexDictServiceImpl.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.service.screen.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.screen.IndexDictDao; +import com.epmet.entity.screen.IndexDictEntity; +import com.epmet.service.screen.IndexDictService; +import org.springframework.stereotype.Service; + +import java.util.Collection; + +/** + * 评价指标字典 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Service +public class IndexDictServiceImpl extends BaseServiceImpl implements IndexDictService { + + + @Override + public Boolean deleteAndInsertBatch(Collection values) { + int n = baseDao.deleteAll(); + return this.insertBatch(values,10); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java new file mode 100644 index 0000000000..db9fe1f411 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java @@ -0,0 +1,36 @@ +/** + * 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.service.screen.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.screen.IndexGroupDetailDao; +import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.service.screen.IndexGroupDetailService; +import org.springframework.stereotype.Service; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Service +public class IndexGroupDetailServiceImpl extends BaseServiceImpl implements IndexGroupDetailService { + + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailTemplateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailTemplateServiceImpl.java new file mode 100644 index 0000000000..081f94ef3c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailTemplateServiceImpl.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.service.screen.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.screen.IndexGroupDetailTemplateDao; +import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import com.epmet.service.screen.IndexGroupDetailTemplateService; +import org.springframework.stereotype.Service; + +import java.util.Collection; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Service +public class IndexGroupDetailTemplateServiceImpl extends BaseServiceImpl implements IndexGroupDetailTemplateService { + + @Override + public Boolean deleteAndInsertBatch(Collection values) { + baseDao.deleteAll(); + return this.insertBatch(values, 10); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java new file mode 100644 index 0000000000..5d12ec33d1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java @@ -0,0 +1,35 @@ +/** + * 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.service.screen.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.screen.IndexGroupDao; +import com.epmet.entity.screen.IndexGroupEntity; +import com.epmet.service.screen.IndexGroupService; +import org.springframework.stereotype.Service; + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Service +public class IndexGroupServiceImpl extends BaseServiceImpl implements IndexGroupService { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupTemplateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupTemplateServiceImpl.java new file mode 100644 index 0000000000..058cf911eb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupTemplateServiceImpl.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.service.screen.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.screen.IndexGroupTemplateDao; +import com.epmet.entity.screen.IndexGroupTemplateEntity; +import com.epmet.service.screen.IndexGroupTemplateService; +import org.springframework.stereotype.Service; + +import java.util.Collection; + +/** + * 客户指标分组 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Service +public class IndexGroupTemplateServiceImpl extends BaseServiceImpl implements IndexGroupTemplateService { + + @Override + public Boolean deleteAndInsertBatch(Collection values) { + + baseDao.deleteAll(); + return this.insertBatch(values, 10); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/ExcelListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/ExcelListener.java new file mode 100644 index 0000000000..e8ad7cbe66 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/ExcelListener.java @@ -0,0 +1,17 @@ +package com.epmet.util; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import org.apache.poi.ss.formula.functions.T; + +public class ExcelListener extends AnalysisEventListener { + @Override + public void invoke(T t, AnalysisContext analysisContext) { + + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + System.out.println(analysisContext); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/TestFileUtil.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/TestFileUtil.java new file mode 100644 index 0000000000..865e691e80 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/TestFileUtil.java @@ -0,0 +1,35 @@ +package com.epmet.util; + +import java.io.File; +import java.io.InputStream; + +public class TestFileUtil { + + public static InputStream getResourcesFileInputStream(String fileName) { + return Thread.currentThread().getContextClassLoader().getResourceAsStream("" + fileName); + } + + public static String getPath() { + return TestFileUtil.class.getResource("/").getPath(); + } + + public static File createNewFile(String pathName) { + File file = new File(getPath() + pathName); + if (file.exists()) { + file.delete(); + } else { + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + } + return file; + } + + public static File readFile(String pathName) { + return new File(getPath() + pathName); + } + + public static File readUserHomeFile(String pathName) { + return new File(System.getProperty("user.home") + File.separator + pathName); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexDictDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexDictDao.xml new file mode 100644 index 0000000000..a91513e1d5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexDictDao.xml @@ -0,0 +1,8 @@ + + + + + + delete from index_dict + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml new file mode 100644 index 0000000000..06f0cf0198 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml new file mode 100644 index 0000000000..b7854f3338 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml new file mode 100644 index 0000000000..ddb138771e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml @@ -0,0 +1,9 @@ + + + + + + + delete from index_group_detail_template + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml new file mode 100644 index 0000000000..d527876c4d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml @@ -0,0 +1,8 @@ + + + + + + delete from index_group_template + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoData.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoData.java new file mode 100644 index 0000000000..234e66cb58 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoData.java @@ -0,0 +1,17 @@ +package com.epmet.stats.test.model; + +import lombok.Data; + +import java.util.Date; + +/** + * 基础数据类.这里的排序和excel里面的排序一致 + * + * @author Jiaju Zhuang + **/ +@Data +public class DemoData { + private String string; + private Date date; + private Double doubleData; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoDataListener.java new file mode 100644 index 0000000000..d218327ad1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/model/DemoDataListener.java @@ -0,0 +1,84 @@ +package com.epmet.stats.test.model; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.alibaba.fastjson.JSON; +import com.epmet.dao.screen.ScreenCustomerAgencyDao; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; + +/** + * 模板的读取类 + * + * @author Jiaju Zhuang + */ +// 有个很重要的点 DemoDataListener 不能被spring管理,要每次读取excel都要new,然后里面用到spring可以构造方法传进去 +public class DemoDataListener extends AnalysisEventListener { + private static final Logger LOGGER = LoggerFactory.getLogger(DemoDataListener.class); + /** + * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 + */ + private static final int BATCH_COUNT = 5; + List list = new ArrayList(); + /** + * 假设这个是一个DAO,当然有业务逻辑这个也可以是一个service。当然如果不用存储这个对象没用。 + */ + private ScreenCustomerAgencyDao demoDAO; + + public DemoDataListener() { + // 这里是demo,所以随便new一个。实际使用如果到了spring,请使用下面的有参构造函数 + demoDAO = null; + } + + /** + * 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来 + * + * @param demoDAO + */ + public DemoDataListener(ScreenCustomerAgencyDao demoDAO) { + this.demoDAO = demoDAO; + } + + /** + * 这个每一条数据解析都会来调用 + * + * @param data + * one row value. Is is same as {@link AnalysisContext#readRowHolder()} + * @param context + */ + @Override + public void invoke(DemoData data, AnalysisContext context) { + LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data)); + list.add(data); + // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM + if (list.size() >= BATCH_COUNT) { + saveData(); + // 存储完成清理 list + list.clear(); + } + } + + /** + * 所有数据解析完成了 都会来调用 + * + * @param context + */ + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + // 这里也要保存数据,确保最后遗留的数据也存储到数据库 + saveData(); + LOGGER.info("所有数据解析完成!"); + } + + /** + * 加上存储数据库 + */ + private void saveData() { + LOGGER.info("{}条数据,开始存储数据库!", list.size()); + //demoDAO.save(list); + LOGGER.info("存储数据库成功!"); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterData.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterData.java new file mode 100644 index 0000000000..9a9be1642d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterData.java @@ -0,0 +1,30 @@ +package com.epmet.stats.test.read; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.format.DateTimeFormat; +import com.alibaba.excel.annotation.format.NumberFormat; +import lombok.Data; + +/** + * 基础数据类.这里的排序和excel里面的排序一致 + * + * @author Jiaju Zhuang + **/ +@Data +public class ConverterData { + /** + * 我自定义 转换器,不管数据库传过来什么 。我给他加上“自定义:” + */ + @ExcelProperty(converter = CustomStringStringConverter.class) + private String string; + /** + * 这里用string 去接日期才能格式化。我想接收年月日格式 + */ + @DateTimeFormat("yyyy年MM月dd日HH时mm分ss秒") + private String date; + /** + * 我想接收百分比的数字 + */ + @NumberFormat("#.##%") + private String doubleData; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterDataListener.java new file mode 100644 index 0000000000..7c28d41fe8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ConverterDataListener.java @@ -0,0 +1,48 @@ +package com.epmet.stats.test.read; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.alibaba.fastjson.JSON; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; + +/** + * 模板的读取类 + * + * @author Jiaju Zhuang + */ +public class ConverterDataListener extends AnalysisEventListener { + private static final Logger LOGGER = LoggerFactory.getLogger(ConverterDataListener.class); + /** + * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 + */ + private static final int BATCH_COUNT = 5; + List list = new ArrayList(); + + @Override + public void invoke(ConverterData data, AnalysisContext context) { + LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data)); + list.add(data); + if (list.size() >= BATCH_COUNT) { + saveData(); + list.clear(); + } + } + + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + saveData(); + LOGGER.info("所有数据解析完成!"); + } + + /** + * 加上存储数据库 + */ + private void saveData() { + LOGGER.info("{}条数据,开始存储数据库!", list.size()); + LOGGER.info("存储数据库成功!"); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/CustomStringStringConverter.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/CustomStringStringConverter.java new file mode 100644 index 0000000000..584e563a77 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/CustomStringStringConverter.java @@ -0,0 +1,59 @@ +package com.epmet.stats.test.read; + +import com.alibaba.excel.converters.Converter; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.CellData; +import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.property.ExcelContentProperty; + +/** + * String and string converter + * + * @author Jiaju Zhuang + */ +public class CustomStringStringConverter implements Converter { + @Override + public Class supportJavaTypeKey() { + return String.class; + } + + @Override + public CellDataTypeEnum supportExcelTypeKey() { + return CellDataTypeEnum.STRING; + } + + /** + * 这里读的时候会调用 + * + * @param cellData + * NotNull + * @param contentProperty + * Nullable + * @param globalConfiguration + * NotNull + * @return + */ + @Override + public String convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + return "自定义:" + cellData.getStringValue(); + } + + /** + * 这里是写的时候会调用 不用管 + * + * @param value + * NotNull + * @param contentProperty + * Nullable + * @param globalConfiguration + * NotNull + * @return + */ + @Override + public CellData convertToExcelData(String value, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + return new CellData(value); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDAO.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDAO.java new file mode 100644 index 0000000000..bf09288f59 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDAO.java @@ -0,0 +1,15 @@ +package com.epmet.stats.test.read; + +import java.util.List; + +/** + * 假设这个是你的DAO存储。当然还要这个类让spring管理,当然你不用需要存储,也不需要这个类。 + * + * @author Jiaju Zhuang + **/ +public class DemoDAO { + + public void save(List list) { + // 如果是mybatis,尽量别直接调用多次insert,自己写一个mapper里面新增一个方法batchInsert,所有数据一次性插入 + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoData.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoData.java new file mode 100644 index 0000000000..ceb3dd37ca --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoData.java @@ -0,0 +1,17 @@ +package com.epmet.stats.test.read; + +import lombok.Data; + +import java.util.Date; + +/** + * 基础数据类.这里的排序和excel里面的排序一致 + * + * @author Jiaju Zhuang + **/ +@Data +public class DemoData { + private String string; + private Date date; + private Double doubleData; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDataListener.java new file mode 100644 index 0000000000..539f1903b0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/DemoDataListener.java @@ -0,0 +1,97 @@ +package com.epmet.stats.test.read; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.alibaba.fastjson.JSON; +import com.epmet.model.IndexModel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * 模板的读取类 + * + * @author Jiaju Zhuang + */ +// 有个很重要的点 DemoDataListener 不能被spring管理,要每次读取excel都要new,然后里面用到spring可以构造方法传进去 +public class DemoDataListener extends AnalysisEventListener { + private static final Logger LOGGER = LoggerFactory.getLogger(DemoDataListener.class); + /** + * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 + */ + private static final int BATCH_COUNT = 5; + List list = new ArrayList(); + AtomicInteger total = new AtomicInteger(0); + + private String preWheight; + /** + * 假设这个是一个DAO,当然有业务逻辑这个也可以是一个service。当然如果不用存储这个对象没用。 + */ + private DemoDAO demoDAO; + + public DemoDataListener() { + // 这里是demo,所以随便new一个。实际使用如果到了spring,请使用下面的有参构造函数 + demoDAO = new DemoDAO(); + } + + /** + * 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来 + * + * @param demoDAO + */ + public DemoDataListener(DemoDAO demoDAO) { + this.demoDAO = demoDAO; + } + + /** + * 这个每一条数据解析都会来调用 + * + * @param data + * one row value. Is is same as {@link AnalysisContext#readRowHolder()} + * @param context + */ + @Override + public void invoke(IndexModel data, AnalysisContext context) { + if (data == null || data.getIsUsed() == null || data.getIsUsed() != 1){ + return; + } + if ( data.getWeight() != null){ + preWheight = data.getWeight(); + }else{ + data.setWeight(preWheight); + } + LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data)); + list.add(data); + total.addAndGet(1); + // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM + if (list.size() >= BATCH_COUNT) { + saveData(); + // 存储完成清理 list + list.clear(); + } + } + + /** + * 所有数据解析完成了 都会来调用 + * + * @param context + */ + @Override + public void doAfterAllAnalysed(AnalysisContext context) { + // 这里也要保存数据,确保最后遗留的数据也存储到数据库 + saveData(); + LOGGER.info("所有数据解析完成!total:{}",total.intValue()); + } + + /** + * 加上存储数据库 + */ + private void saveData() { + LOGGER.info("{}条数据,开始存储数据库!", list.size()); + //demoDAO.save(list); + LOGGER.info("存储数据库成功!"); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ReadTest.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ReadTest.java new file mode 100644 index 0000000000..85ee1e7806 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/read/ReadTest.java @@ -0,0 +1,70 @@ +package com.epmet.stats.test.read; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelReader; +import com.alibaba.excel.read.metadata.ReadSheet; +import com.epmet.model.IndexModel; +import com.epmet.util.TestFileUtil; +import org.junit.Ignore; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.FileNotFoundException; + + +/** + * 读的常见写法 + * + * @author Jiaju Zhuang + */ +@Ignore +public class ReadTest { + + private static final Logger LOGGER = LoggerFactory.getLogger(ReadTest.class); + + + + /** + * 读多个或者全部sheet,这里注意一个sheet不能读取多次,多次读取需要重新读取文件 + *

+ * 1. 创建excel对应的实体对象 参照{@link DemoData} + *

+ * 2. 由于默认一行行的读取excel,所以需要创建excel一行一行的回调监听器,参照{@link DemoDataListener} + *

+ * 3. 直接读即可 + */ + @Test + public void repeatedRead() throws FileNotFoundException { + String fileName = ""; + /* String fileName = TestFileUtil.getPath() + File.separator + "评价指标体系算法需求-备注.xlsx"; + // 读取全部sheet + // 这里需要注意 DemoDataListener的doAfterAllAnalysed 会在每个sheet读取完毕后调用一次。然后所有sheet都会往同一个DemoDataListener里面写 + EasyExcel.read(fileName, IndexModel.class, new DemoDataListener()).doReadAll(); +*/ + // 读取部分sheet + String excelName = "评价指标体系算法需求-备注.xlsx"; + fileName = TestFileUtil.getPath() + File.separator + excelName; + //fileName = this.getClass().getResource(File.separator).getPath().concat(excelName); + ExcelReader excelReader = null; + try { + //ExcelImportUtil.importExcel(null); + + //EasyExcel.read(new FileInputStream(new File(fileName)),IndexModel.class); + excelReader = EasyExcel.read(fileName).build(); + // 这里为了简单 所以注册了 同样的head 和Listener 自己使用功能必须不同的Listener + ReadSheet readSheet1 = + EasyExcel.readSheet(0).head(IndexModel.class).registerReadListener(new DemoDataListener()).build(); + ReadSheet readSheet2 = + EasyExcel.readSheet(1).head(IndexModel.class).registerReadListener(new DemoDataListener()).build(); + // 这里注意 一定要把sheet1 sheet2 一起传进去,不然有个问题就是03版的excel 会读取多次,浪费性能 + excelReader.read(readSheet2); + } finally { + if (excelReader != null) { + // 这里千万别忘记关闭,读的时候会创建临时文件,到时磁盘会崩的 + excelReader.finish(); + } + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/util/TestFileUtil.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/util/TestFileUtil.java new file mode 100644 index 0000000000..5035e52046 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/util/TestFileUtil.java @@ -0,0 +1,35 @@ +package com.epmet.stats.test.util; + +import java.io.File; +import java.io.InputStream; + +public class TestFileUtil { + + public static InputStream getResourcesFileInputStream(String fileName) { + return Thread.currentThread().getContextClassLoader().getResourceAsStream("" + fileName); + } + + public static String getPath() { + return TestFileUtil.class.getResource("/").getPath(); + } + + public static File createNewFile(String pathName) { + File file = new File(getPath() + pathName); + if (file.exists()) { + file.delete(); + } else { + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + } + return file; + } + + public static File readFile(String pathName) { + return new File(getPath() + pathName); + } + + public static File readUserHomeFile(String pathName) { + return new File(System.getProperty("user.home") + File.separator + pathName); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/评价指标体系算法需求-备注.xlsx b/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/评价指标体系算法需求-备注.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..592e740466e97361226da2745174eb8dcb4754fd GIT binary patch literal 59391 zcmagF1z6Nu*FH=Mf}|jw0z-F6Nr=J#Lw87b2?z*Cij?Hgg9suZDcv9(kp@A!Q3<7$ z5Rv-!40?{|d7kh8a_w=rm_2K+xYxbb-utJ93MLjF8uBMX?UO9>{r3+p_{G}IO2fnL zo+qCMm_`Qva2Yl2Yveq=3OX8^6$Tm_@t@Ny?%m^k;NqMGmr=nKpzQMbYlpb1zUa0> z-~2VX&fA+B^H$rfqW99mmJjT+O!5c`w4%1lV{%oR>u-<4tZZneI8Xk+rzi9_J`VJuU|$&63yxexqZu~X9n zH7l|gNdhqc?RXCcG7_ZY9f9LX{&c*Rn}-e3^N-z-He=;Z-vG z4v+tm5d9AE%k0a=bxiv{JH+BLQS}%7!PDctr%$FW%S*moDb=p+C4pUzZjUtL)L#AK z)f)4e-QyWeZ^?{o9N~xI+=kbE3LOeAAEze>49eSYhgj2+!s6-{#PF@y>T()YLOZbB zwT%Y@Zp>U2GkLgs^`3GM!NiBgJ)f95O|;TU!M2!yzl0MLVZHNS_eNd+K$r6qm^c>ZsHjQHBNX91tDYY zKE1e_6Gvc=HwMY4MR#3#pSTjkSlcw0h4IU_A6tZ*!W`roi4mE1*R^rYh$L&m+auHt z=k06QKVFxb)2SER?4;r{NqF<9aQJoDXJY4&%FlMsC9)MtnW=&IhP@#|o@OVepzUkoDZ29?6Uh`MPg zk5I4p9N{I3Fx3SJNJIw-Y}>8n@tPX5ImR;xKE%~$Qi7_`pIT-UA%U{Ah`kyTSj-hkd#x|1AU70m=s ze(*uN*dX#sfp|O>?hOy_s+SL$EDUZO%TZ#78Q!3~(IGD+I2(&Lc9{~c=Uk&Dd#BHA z&)M41@b(6RHJlR7)e7nCnu1X5g`iYs*8r zfVXyAJEN;Z{?&(bTlH!qY7fU%?dR+9>*AK4G>dzBF!Ik(y*&EBtrgIdeJ|qjQ!^yC z|97+qFQVn+=HcXNZ)0=+KdHa4!1?DLCp5Ia_ZVoD|1}r&6;uH8TTPQ_^iyq)ZrbiK zSU+@&LVs&#r0jyrC`(Kd!o7i5^R;<*GC48Ht1yM{Af?z?6mt>JzM7C$;zz0zFAw~!T7P+>+>HS5oTw*TP5d*=hNr) z$NFXgXS>^J3=60G-_i~jU;per9x6XO_5mLsbhiba?C)fs|2#WQE7$p$HUvK2NaJfe z`Q@Z`tZXCJeD8JW|S%%QeGzw_;gZ+xdGqhckK~W(-gf?DPi%B}{qD_&d&66whZfW1 zi6@43Zk`@52A;Zco|JfRFWx-a|JX0nH6L&=&(MAOd}UN@@$_2+QMAPkZ?gcu^QHRo zv-<}TGUaZrW@{;lN7)Pu=ck@~i)I9hTZ=aXPYypmu9tauyk1*;`g1$&(Cl={ENGnE zy1k_Q^}~~cqtke^x}Bh(&};hTul){B(}>Q$otcFN9Iu1#9_@bn{PE!Z6TY7>7-RxY z7I%WE>W|J|9$Lzr2|Azef+Y@)+iqNYDq7Ll)TUWJ7hhhjH!FAD*>>B0^-6!~oWXmKLB;_mylL@#tNQy{ zOJ#{?YZ2Uonrm(GvvS&B%Zu4{GT%0Y%7e0xN;1oLCQACf^@-Yi`X@gt|2)ixdw)OB z-R|5e%af)(lskW|<99j~yY}4#3Vv-m`}zI5*W2RxcP6PGt&;j9Z9^$~lV*$c`GIb% zW!6gz$Q6hJRN)^FW1$hYrFlVST{Sl|50CLo95U#*@Xy^joSQW?;%Q-K%1wW^q_uIjQF8Fp0zpvXPxpSYF`lBMT0a=S$6#K_{y+HR%CCcSM6t4tmHFbmKSC3=eyl87HNyaFz=c7tlOr znQ>&d{g!zc52Zb@mY*v=Lu;&hkR4U|&@8etSpBWRn;-~;`Rq<#m>5EDY1+O*q@|J2 zZGU%p&^(5~XSD6d&x4e+wWMk6UEK#hHi{mKF?4;3mYW9KQI(I5!YL&YIOclZ!i(5K z%ehw+x0>h*tr!Pi%@#ZhHZ%+yYBw>I;(Kc##b&N2zN&`Tt3i>JY-*0{%GnKR0p3geT$x%pmL}2WT6mJ_-Lf8&0op*%EIadPGL)>< zyx|N7hy3Awj>q}+Yj>aK@mtdlWEj3cu0fm(a1;Hqo>@JiQ+vVckKTV;zimnI4}4*Y3scrTdI`#uh5{U3!&JQ=(4 zFGKPxOl7d)&9AFIN|7vSp=swac6o1L4a_M&=h|iE2*2_@;f>VdeLgiU$|?euBn~a& zB`snr|5moHxHmNBCrWgY?i`^|4(G}EkmXm+L4Rs90DV5&oj=-r&xcBDDskpd8CG8O zQI)L=q+r47s**NL0p8pE9FGZ(D3!K<&h$y4Yx4?+fTgUyJq^x~3@F^IWa%7UC*W`v z%G~aR;@zqXu@=0IXUY9h(bC!2AGpYTLR5sPJ-Im^_?PCLK*HRC*WImnyG}OXUzBr@ zf|BH6rPn)6=Mo7`d+xo#SO5yCA&q*(p+>xlCtW>GWlghefF6 z>H8_m>NT^hDgoQf0r?x3eI+jYN@1luB<|a@WJsW9U}g0Bl6!?bHqqkKgD18^!n{K5 z0@v;8dbw|tJ*F;HP|%3FoI_0_SJ#M1@X#gGKXaID_}-x_oHnU9%lI>TMk;yeLxeQ5 z^-`c*PglV8!lpjUZ=g$lzRauLq zW1A-rWEU8dovgAGnlM-uE3teGS#Z zwcW6oX~^hi+FIqULKZS(C(e{Gv|?QJ`&nGp*$LYW5n*?BKFmjyG_=t&S4q!K^*ahX zm95RbpS4ENRm)3;zH;gHWBF37K*s!T&@^+(t#G84ZnlGJ#LKhA)5B#ckY<25-aGKe z%f)jmMi`ak5B2usV>ENA=M?5rIi&oabdR{^m3U`J#1Jp&>hv=|mOEk0$Gds2ON1{s zFjA>WtLu09oCt`Hk8#+_W?jeT@4R9jO+f)^t?+dZV=|jf$PO;LYa*J`y#1|3Hf#NM znb5}L)wj76?&acs7XJC_`%`a>>;^?M=E@xJkSX^Zo|14)Cw#{m*L@^vhfP-jH`Q%{ z+2cnRbO~hGejey#3zaIc122luV&;C_{g>qP`V>$^e^SF1J#$5vsQzicl|1=@XohN! zPoQGL&Iz;J>pg!kS74iV)a&jWZ``uN%$z4V{e!z-{XEg(x&<4g{=P9iCsUB54h|9$ zo$J?8FpJE|Yzd|D*_Iuyh3<+ze|iVfE0Cd@BhI)q@$B+$`ZL_!^t<3)4NFAe0A5&I z!5^#l-k0+F*PAN^LB0|=vyG0Ks*q*LHs&6mvqZ+lBWbz8ckwvO1ae}&*juC$^`xt> zEc8uf{u;{8JX_(o-VC3HRFi2svpuIKkrlZf?5Kb?Kh^m;1pDqwO`SdmYdCF@hNtYi zQFc5V4A&7M-9K0Vax>6@y3^(CMl5&NV6nfi$6H<|6u#oXx{9F>KObU=NCrK-gY*FG zRYHJ#Qzb8Mt=)@;Z}iN4oJ$3wCEGv)_GMykyVX*q?&?^!(1MzTr3peoQGTaYHNh%)qZy&?}tmR zFQ8YOOQ#`1ZHJPf4|f=FcUzHJcIr#t>AI5cx*17ZI1-x$U4YzARbX27b(xzH$e5c+ z>D&)XAXuYfq8Yg&581|j{&caG<#WNv51*W(nrQMt_9z0s(Kab&XtMqFD*0yaWQ~+C z&gq4nN-aZZj#f$-qvUlrPfw1hEO=b+^1Bow!K=$xwuR(H^C*z{DDMd`oaZlPsfMd= zU2c_9wp^MnZA!Ca!G$mb?QEWh6|?B{eh-XKiDuC#QkG9({VFP!2A`Th$~v-R&qhX` zq>8DP(OMvj7?GrK8s0ey+h@K5b=J<*J=~39`O8}2_2F-=622Ss63)_u7PC||`ZeLQ zvsNbUCf4cQ9KDm!y&t2I$P%7x_|xzxEM=8NTnu5W54Z1)fm^5SJ$6Eg61L)fNfTVm zf_Aj9)6Mr2regK_K!YVjS@&w_W@O9YU_MKoXScN=`gzO>shsXrN-f`NGOlS838v(T z`euk>w!e!f9KYPId{BnHVa?1I3h#}4xZ{I$4SJaqPOQUgg3AeKT!ynG!zn#gA*5e_ zTQ}GW{>muK*4sEK$_1Tt-iv?WIx*ib1jkAu0h&~4$m?D$w)Su9R(=h{u!an#jKcJk zq0UO()*hcvgwoZqd{u`oUxS*@-Aq$6a8SD{(wO=RI`JNhM)0fj>^@&SJUPCB6(#F( zG5oDLLfKp4yFrl>Mv80c2s)Qd+!F4gi@Y6l|9kfQJbhBHdovs*5{Tu)(uFdH*#5Pp zF80~msvf?aX}0mDKQ?Zvbsl7$$6Ex}thFH1;t?Il`FO0OcRRREmCVQ3&!uVt zj&<4rDnXyPXR2-oq_Ec|X~ZH+5Hd+!2hT7GT7<1h`yO}cm0Afldge2!fY7RfmwZC^ z{p`RdX;f%zGXdpXLw z@WN#HGF(K&x=2Hs=Js=1I1q@+GbvC{s^Nv%HSEy+%sbG{tB%#%cb~BcBqEdj6eRmG zNcNpW;3La9@d9IG3?iK(<*O-L@G1~G;}R}hS>3C_AYrNNk*eukJ+L8Xjd~3-YU}L( z(Cg}hUwS2{u%yo!nL^P(9=I#jVZ0_@7Rb7cNKqKfybaB56jHXNh(!99B`T^0hRP`t z9oDEakrZc7|6+g@<@!1-`a-P~7S4PY(LCmB#avJ_NAGvxzbr&1ia7LD(2GgYmS?SX zwS$SU^9xzFfdILGyGu!axQr(RCp4M`H=iYS1WC-LELcY-evlq3Kc*fl2@+whsGouz z%7TYQWgA~+@u`Ftzos{RKkZLqA%8EL5z}*stPQ82HXQngy1KZw$@OgB1Ylmn(8B1D z`96=ysdEz=oKVhkIb)9RvLOarm|(~@`41zWG+-txFtfRh>dcQ<_yx-uZm)}=3S0q6 z9ca2xv|>21wKs$P2V@wzqUaKsuW`Pl34O>bO}Z@5df_coXyN3<9EO?CpeVx-z%Bf( z!VDy-dl9LV+ZHGm$I^1T@ToG|QPVnjm(8whN->M(8h4a@#Vl|cXEqBXu<}k}DT_ef zoOt{ipbx#PA`7X!Cgm>##9pz~9cS+K59()}c)p#LMUc#LHenV}3&tuOqJ3K^-#MaR z*O76|D#qboJ)51HARhP%qdQ%CnPId#6Zb_sxp#i|a(2kK2X}+Nfd+UWAZ5*HzUww$ zE)A&FV&S0nA5(RWOhb~Ix2r9I2akVMS6XCk$s#zBOTXrJw_VsS-BDOu&kn6Q1C%-8_UdKYY-dM!3jqt}ZoneCHbJ9vagmjx6_HmlL#^64 zW_r~Flk~@(OQFjN8=o{YnjYwME%}C+mRpWVR6mKJ_Ii@`@_i3YYXz&jCrB()->E3O zOw}&!!AN=Bqt`N)`Jb?LiapTo+hNKKul`a@zJm3;(&N7F(F-bnv>Texd0*asyYH6W zE{N@{n6hQ&jEN7QI@~~E)_V8H@xl(0r6v%{qIuG~#c)YLzu-y~QuWZT^RfjOxdwP9~R2C2c&{N$uY28HwdE3Qw z)XF0_PBJyOnG!+m_yn#>P~ZQ_f-O8Yu=!pCzeBkc_qq!s6-X_@bjKbWZCKWIC7WV~ zlp;SgZSwdl)fEp+5@s6Uy9)ADPa~6Bk+Y`G>qiu0{2JABj}?+z zecUC?Xd>zYTmJM-56zNU5Y9_fU2#3D1^&KL9X}?&*Yyfp)#=(RYNW8#P3TlHZ53&y zU~$gRDhK2!AKpfmuXMN~rw%>48fpfM1`AVK?TV9n3seh5y0f&9v6=>mI1tO?P@XQ2CGv~EH+ zImDn!NI0r+^}5`j3&%&eZNqjt_JLMYVRMi_`;)rEi{f<%*$&}Mp+SVbgMYc(ri5X< z7Y~uPd2ajJS!oE>ogA4+kc^p3`b@IauaEF33wnKfCnkJ0-#Peo((`#nB1`%as>%G_ z41e`&f26Y}^_+2V~m#<A@T%;JCw8>P$wG%qOG!11)nOi_MB}6Jv6_sEa(Ug z*_r-n9n4ihlTgfpp3h=COA=u{Oe#k|Dg<6vz$+@p5IW{$oXq0qehV9EmJ71d558~_ z^gRjqvp!$6GqdA^D5BI-wtO6?(?fIiPaEf}$`%UXu;`)*FXHntgsKK3Wr6m28U5S; zzl&n~|EER|Xjn3i-_5%SuXd%po#+`nS}7pif#td|`tAoT`n3OeC4;f#{~D*@r@&Ss zwc0nT;9^Ca6Jtw2NVoV$aUwUZAL3gFYOA;Zn13(CPd{`8yl~SS)lSNG4NatSEyVmR zoIczB*a*C3wGA>Iu%#w&*r8&n^{pAw`))!91o9Jy;!l}kx$%p=RhOPYx(_T)q`z*v~?~h20G<@-_*7+I*03xOTer3gP^SZpjmaH{SCdo5=hfBG=>&`2_$z zJMt@_hQ$^1k<3DSe2{zL)$drk;^v-2zUR}d_kCP>-j$VfY>3ObZZ)|5OuP2J>0y!& zvNes0%)v2!NssFx{T)ks>hv>B*k<3S;DjiUrn>j0y!zUEwL!koJqfUXQGw;hp z)_ZyKXPV#Gz>d)_bX_=_X|VhL8)fmYcdynyj%FDYUT?Z{mQ_1wdbqnB$|n03c==xtj=ZR5t>XVXhJAs>*i%B{` zsfL_`y{m=)ql7F+qRS}`WL97YjSF_rN75{)(}Ta)_8e7`PP`5kifu}b3UYJuoNSd6 zx8!h5atL=8*uGpGhphXZB*E*#7)meV%c~Ffl;}dPYD&g8#f8*oiTTX;Yu^$5;vzWs zEF~saLtcbAcwGxqWAHNL>03W*;b%33!n-)yA6(?c6S+gd_P}RlG!|<-3JbHG6qj*m zO(8S0we-a^Wue5T)aamdbL8q!c>m9%D&BPD=|$S(tHp2)R!K(xQXO*R;xQ?T+-#+$ zNt35aqpe>W#nwzGk*-QkEZdm1_BeF9qsjgpK_biB^GsBq?W*oBP6=&=PKJ^uCmZ}W zaQsS$IhL>55Lln=Rv*9gOHw_ABy-j*{yglyP~xY+hmq|vYR$l#^sL|1`CWhqO!Q{K z)+hxFd3fRSN?ASyvD5BDx^^aZ^Nn!J!rUzc6LMq3Y&;3h4Yr#ZB}0|(V5P(m`?+*4 z6KIP<2^CVbwd4ho`X~h9z4)%&1K{AM&@Qx3^?J`Ez>-oS6_d+z4#S~8$3LrdylTAH z81KK!gn7RC4FGWDtua9_awjbrS_~0LFMww!6^`hRhbbRTauDj2I9|=yBJKa6^!S9- z0&t4P5SA{?QfW^vt8ky5)?bZyTXtL+RYsP1yuAWVGMRa)l4gw%nB80;(GfxJ zN1`F%I|)@KuP|eaTO86g94)CpeMmgEd-LpaF`~V_1cEj`j+J8w8}l<5V=*Fq0TERZ zJ)G}Pf_RHG{@&UADQUDl#IMll1EXw(iI)6pZ<)NCO>&Vah@r!?} zbRSk#2)%EA2j-mWybX#1Y*XSMV1RV62h1skf&)bzVWvVy`D8O+dV3w+B=!`90XC47 zjSo`)ksky|yM-WHS4goH(af~fOtN2!K}>N^&w-v7G37oB8I767+XAW}v0v9HtsAOh z!0Bc4c?@&B7@<%!_7>X<*k^Lg20~L=JCNgup|xB#aIZ9A}-07^o4pT6I1^J{aex&C{;PnaKVxZtB)i!^MTh( zjK)~}3|~OJReyP%t^x3Yry&fanJ#JYL-?kx;c zI6xM#@z3YR%B;4Ol2o@IO%F>TTiHem({q%Z*P>^vOdu!Xf z`rIGn;wy5H;c?*T=NBk!L@wZ^Mf)#!1^WHpYROlEC|1iM)4H;@K&#hg)`qZrEiPkjqF-!7GX{YA z^20B0Jp$hH5jNB}`YA>IEqWJz_%;kCSznE)%k^pg^;j7cl z)O}*4t&$Kxu)tJVP>;Gy^pd93{)YZR-mQE+(PGSTP6icac9BYaa6q|zWY_XHdHHIv z&6w<&Zf%b`5dr7Dg1jH15veq+0;d+QMxYc22~f zJ>eVa3OU%Qtu@Yr$!4UyWONC}a0%We%OlXtA+X>wR>&tX&w*(a#olIe!RTW@K~EmR zW+zgeLAx}Awh{uR$yu${lyO^|Sy}fIJ}F>#{;ouWxzBpO%9K3XZ9~Ie4J5&mmGNrO z`?M286^=Y>7Wr2{lR03H_tm=I$`|$aWOd0&mT}SeB~6wlM~dG8bF4*leTT=1l%Smh zFH?G?D_D-ksoTC5m;LcqpqWMvfyT4Y8Ya9Nrh%Xz3NvWfGgv7z24o|UoR~KZJZwP! z_KR8c={4w%cWG*OQ){E{E|NVSq<64t&xxIPSIP_)vGjAT1T2TrVaIz6Nbf@mQE3c41YD?75U2MGwN)~L+CGS~JBQ~j7WX;RIkd7YZy zd*XWnVZl208?kL^MRyfk-I@lZ#RZXYh2f-ypF8DI%&#jM{0MpdnVH++$yJg~SG%Y%;Wztv{UhK}K_es9Et22FT1>Gm- zT@`m~^+44P4-T3$QZ2946>OnOiT=pq>X^c5L+^assS$3PyKXh#cEpr3=^sejTTy5M zB+W?^S#*=x-|FN(JXICwSm5`T-ZL*O;W`LbHrk4vK&x?|c2IUdXs1jo8;Iu0>1>D$ zZMa-bOGcr|-+#Heu62wX6W`WQL%g5+%3xKn;FTa1#cF(ZicKnxbQ_(13`zGgvPC^R zk&tMy!A573+C4UcQ~#h5NR!g%LgD_+U85PSWKG}82pgpBhIqjC;qZ#p_0bWnofmoI zgH`r%F%CZt7s>RAVyXwaUNvAC#XMn;e8NAQ_vt#`r|YG@gwy*DBBj{X+|euC)gcb4 zm&U9=QcNRk!={tRg)#98s5I^gVmh8#7f61-t|mE{D=FxkH0q_Qv#{U(CDv5GFEbcX z%8dmR%5A54v-!1$2KkOqWStcr9Snl1bZ{o79za4jJ$7Nx$t=jV&WG7KMZnTfmH`1xKB8ZM`QSD(trZ|gTbK=*kdQcqgz2F zFSBgl)2FvolBTq*h5SX+R*@`*E@EhS8DXmsA{M6W7K!0@x%pjdjYC1^0#jMzOCD3x zPSbB>X#^^$Aeee^yb2~?LfSsim9HDceoo?OYRPQdUtBSU@yxd_GZbn$gG?o3ji&|cbpoz?wzdo_m;ma#k=0sGwBMd28pmrGWO zFRe1#mJ|=5;}76+4pwqotH}=D{h73EO=v-$F@TPT988WAPsiN?6kO3}j&=I)d)l?ZJxunZ zvMN#+*kZn$wXK$pnHZXQV&@2SFA^n*OYT$JT1pgD&RkTa1Xu6ZM#kJ;fGm!pO1v4A`jX{A4WWhJg``WX#3F60g_1SS zYBli?Pj2muQOp9--C!5GL9i4apPtFrOTO%u(q%IHH$qTxrbncB(d8403Tjmd&~ z-^(UQ5DyL!m;2jO{)hi~3TdBPoRJN16rYP=cNZ_pPp<7C;xHpU<=@7wcfF%?dypxn z2V0dD;b$up?ygD@2bldKY5Xr);|~wJw#&xEOhnnJpCpNsw+;Y+)3%`}fyoYr_<|Aa z{1N<;6GlkQh^rsVucBeEVqIH(K#p|gm7q6Sz=_wB#AQQ}16=pKc>S?T{Jp``fl6i; zq-HPo6G&0cQcHG3ilRwFhEi^T94`ZtGM!WhVP)9!G#Jskzr+qa&|^)gVNR&=`t||J zUjZG!UzIm9tg1DUu#cM$b{NDhg!Wq|pdh7t;V!d{f4l2bpGS&#n4z^G4m&>>5ru}H z6K&(S=!5G>?W^5Uu%8chp+U--63`v&iUph&a^t=>ZUKV^05 zZXfU(cZ(Pw@S5e{mL7>H{_V4uE+|3Xn2H+`J=)N^5}&g4jgs zz0m4V?mx6*+xc&;2v=hmvLhJQTZ|NuB7Y|U*?%Mek}rG%KRk#630{)Dsf=Pp!sLYCkG`!^(s2#2QCjod+d}APj%7ODrstinnfH++(i#R(b&z$6i+w4dh z0mKRhlj8#I0YTbeRM#i#I65Yj=O@Hc#L+Kgq{ph*aUr?z5)xGs#^``gku2f#?w~P3 z%0Ej8&4q1PZ8nn&6L=omc^2>lc}HB4qnc|ahu(lipI)$73+y}vfoXYwCtjbiYCx{Y zoqtxAT~?)6okl(_L|(FL&ZDv!R=fZG4u0tllNmt%gU3>6vEqaJb=_Rz|G*3pe?hLc z;+u_ArXn~`raz|so5>_g)njx$b12g>bxb|)neVL@x-~ef36pp8pUiHcu;GkjgJiNh z7mz4MC1!O8&o7pC=0ko;el~RzaO<^E#2++G1AsAUbzeV_?oZItT>6t@OI8_eX2+)S z1ZL5H(@#DUH{=Js_L0+HZ3xLQQC#i#4A<6<>+gV;EeYCTe1iHlanx6^ynF0WRYkl^ zAbWS6q{xvVd6z*FF03#;wW6ATvejFUOTa`B&)~OZ)|w+ z=<*lTOyDv4SNRO^V=}NOu4M+W&(vbqajWi=vRODErSePj^NM(5*{I4=JqmKw>LXqe z=%IS!oYd4J*C(7J5@{&nfJwlEZ(h|i)XiZUPp$>lEq zK#(WGmeYlMQC}G+*!VmXidRptZ5@gf^+p^S;yvhKH5|N>5*OXr+wxys;g!m(6j~y@ zZ(6eRqp&GeYjQkt4apJqpj4H*m?P}NGAt1G3V$gu4-n=f zM1f>|Puq-vEN!4#ftexVk=HyEsxb3d5f!Uq;Xk9i_l#k0(Cv+->skj>(5+0!-`0hs ze(KXA&|R_|ShDO3KMz-2m8tNQEmf5=8n*aUf>O_ZJ5)uD9&6<*Vg`-d3hfij*&Sd*BqKdzo|1W|djRh62(vnbXoc0YO zJFPORKu;E0l4<{*D;?wxY=OVWQJmO$|?tp*RAACgQ z9IGc}ZkY9jTvce0_e#DRQOtU>tCBp-B=wQ45$G>8a4K^NHFF3ph*n>Zq2rI?a*kJW z=OJ6+yR%mry+D7Fhx%BTE_ZcY^OvagsqcA6NmC-hdRf7U25y|9TV#cg3^XIyH6r-W zEvSny)62=+Xi&010co|A2`qYKpbn+Wm8E;Lsj)7BDD?FjqcYTEGh$1U@Q&s7@-x@z z=EVRDKUpWfw9YsYQEbeQoP3f+T7*eiNUBq8WvG-DJj3mrl_U{);LqU|iQ#p*WSv-~ zV6jesbocc_5iC0bi*LSS-dbD!(E>% zBW-y5QzQSvYofycR&TQf;zhi1sD-qG*tQx56fBRMQRrV+U~tgtCf7p=6J;+VMXL8` zj0tZ{u9OdgGG_0J`Tt86bCQI@V9AST(^V4hbuz~)AM38~w-?5l5<`Jo8h+BE;$#^h zfDFa0sYm&oUTBzJp~_y|SHNPKkIOu@a4G}&F4V3|(uzPvK*(5+4dIw1QCFdyMNc_i zdFA?lDdty!d1Q-SO_v~{L4ZPsmKIx%=oQJhKgB_dZt3i?X1y-=EW!Q+^s{*SOTV1B zARWzhtg)`~&x}YTi8r30K+wLQ`8Gi0!ra28i^vW*0F21+qVzY=Md>GNqQ@o?^Z(Qj z!wb#$=<~-sLh~Fo4G>c%5T@#iPAI_8PCnAVOr^zOPa@&S$Xh~6*9E0(wn&hW<}bFQ zP(T{;>gF%(nyDf~hE}(mJ)0sC93ml?FOm9q47usrG07*i5Ou%s+(jN>x`UMBSNl5; zE+vAQQT-kX5(*&_k=Kxx0*xCSvgvC{qn#E)*scsCrN;QLkpEAlF3aIOpbTy zM2OSIqX?Js;V26aIs0Tv46@zC1v5QPQ5e9 zN56}~)(VNr+G>IRd6WRx_W>PUHXKog=_pV!8aDN_{6&Z(bnU)B_s1MATvGp;_z!{D zeo6hs;_-La(Q0?QWm+@-a&}4i&6dbo3VLNK$4F$}M*}6Nos%S#RzzXH6F)uNj9NJh zH}d87+QQrjT%4i+mrGIju9^~Ua63(IwCJ_#PLahUXg1kc{+U(`@*{iY`|)&?9GH*S z)v2EqZIe7Wv(cdv8eeBOE#4Pz88DY-waS^=oP4}9E^0y!`5B$W@14nL;b(5*#LZ0w zPG1ETeDUK=21JW$v7-}3BBy%|oCwS-Ca_YRVhL0~0h)5ROIOnlo90duS2&6R#{$z3 z8$zu{n6cBCDD7Cr>G$z~{cCJqo7dIW?+4#Z^wp&oVe`W1YdGnissX3|6g1!f1a!1$ zD>9$*lgKpdp6rGfHZ5RzeZM0&rH}*;0p+H!^9eN09;$#t^|HOHaP}uE6T~S_Y0wwp z9~lQvY~1gYu{mt+!ba}5v&7o4IsiuLQ#t78z++DcXIGIMLAx}9w$f(H=@7g-M7hCo zO-I?PncV@SkMZFnczEH{Ln{;T#z~+_o|ebts7GCkm!^;S!m2hhHOvabQ5~5YOB6=8 z(W^kpA-3UAqRu(7yI%u-1wtZ=xnLR`v6q;@qM;R0><+=9DSyfm!A;AL;{C)DOQ4L> zE}s#pU6n)OD5(Y`fo5uG9y*>Lb*^BE=Ma&Tu0yV#veg+B5sYATegwxxsxNs{LYlBn+w$D=7rwUq2CD1_x(|(PD3O+yIf5-XL10d5bFT8 zzqF)KtNr7|&)hgl)iqGKcslaV3$5c+fCVZ;X4Qi@` z$}em`d|F#$YI=5z|)C2TB3FBZ?5)p`+bURmH9{OOi3KAVH{GQ0q@ zpcH>ZnN)+`J^@_r0F`pA_M$~azflW__={yVTFFYY<){3 zSdV!8Oc3U>M-d|DF=NHh@j0y*&eLUI@?fshv5j-Vh*U^P9DNNC zk+LEjCXnkIAILR6=xMB_!UP+yX>41b660xpARpUpSSHt?Pn*NQo5OJYi|1f8bv`8?F}08&+#g*=qv8M zJUQ(=IplL%vo1ibeweGFkw*#U>KqTUaPGo~12g6!-SO${TxDGEt+y z_P#B%v~pI)a1`Bh0&6VHhU1Ge9=p2S1lkHm4~QZeufCRSh=_u&Q)u+HUIsU2Cy?&1 zw(#TuzPYXfpXH(VEy0ClkJO{SaMBe%z6LdIv8m4;6l+WwM1Vte;J&#k72kPu?Bv9s zQpvv@NCez;$rW8Ur~tz$r5+8ASAR0ex-zjdm4osMkO(H408gJMyaExK;3<-IHC6Pn zz(N%4JQ52aFt4Y!|BEM2s#FoYq_sME@}iBEj)qcOTnhi*UL^)+I6$OG|KgZ_>(i{kjzSX$NaJl2D3!!Lfn3>DJEbwf>Lv0 zm&}?#1BN#`O~_G!?HD2=moMV2oGgOA^1*2`O`u<8LRMf%1^CFf7x<`Ufcii>?VZ(n zSFIa=(Sypa;J>IP*W5BWVFr526ADFnQkM)dlV37A1v_dr7(7abmfNsYNZqDlVZ!Kp zf9#g$a1FiqX>P(U%QEJ8)f0mwG#&BVOttr-wU#^$Grz>BY4^;y8ad;egKJ}@0E<*` zlWG9262VRCFgAyf{0vs=%+y$dDEi7xQJDnMXwHj!XBKd8`z)*m9b6bY%F%dnm56So zz-olpT)4Fytk9gmtt=j>85ZE)S&F+%R5nCZY5JyeW_tng2Ptl_P{96P7Px9o8lJ{s zSC9o^M7t`D2vJ&X)b^+3$5c$H z8_Q?UYjBYDsYkH+harVyU7z5h=pxW$^&9-Q;0B$26?u)0 zy!F;0O?P;)YVjT-^D(D8>L9HN5>_f;UeU!{Zw&)KCp>#LgX5Is#5|-t=if$15U>El6}bEc?Q4 zeE7OClGRC`x*g`hpzpPIXF#vajy4VFdnoehf@0i(8clVpbj#EF%X?+C()2~uZ(sW`X+yly|59l@Q;Ryao7KVmD>8G7TN-1=PGD;(KbiYoZ)4g#wR;siw;n=;q|ehn zV?bpVfXbw}Q9J~wh^*n7PLs`(Oh9ChzLvYmFkNz$VazyrB8Fh#H%{sfUIpgGiaaK$(+mo0@U-5dRWwm!*KA*<$_1}YsJVX79wUOzV|0;Azfv@x@xLspN-{7_>5R@KqaSkCdFy)bnvn>P=mPr*VC z18)qYuNrP7Tc+oI_%*z8)!$x}Wc;oHKGzJ9wn0Jm8*m=Romq+puBa=5Ls28Q;$g)ilE8Mz8C8KPe@1Sh7XeN`haLza5(#=6r+8`I9;Wio28`~ zMgw^4Jr^Uouz<x2tSO;Y zch3?xG4MC>IJc_Ut@UN8Zl8Xo(45O7jE3ICzwyWPx~P zNJ-|ykH0e6Qx^=#b^$X+r|_ukhF7c;Xna78y@kR{wVSa0LWrC57b7=6^ZhP0TjWG; zuKWXR_OICNH`FyNA>n(zctuW5%{??z5LDPTd%(jR>@AC|ZkMay)-0f1LXB}O+s_=e zOR230Fa~NM4(|*O+qmT#OZZwH;_MdSV7r}IWuTN(kwdL_dx2Q5m1(`}4#W)& z(=8OwO$yH!9FuhRrLqD^u`0jy64{A0su|BL7;lK9-(HS2ZST!QV*3=i^|PR2MXh!n z%=BpRYAaCJ76X4Gr#P0SY~?*vC8^qj9)-z`{|+4AvJ+Hvc(J~tYt z$wjme(1?&xOlEF;xe;ghqdRdKMijGPunq8XM7E3qJK{mW*WGY_$!M_sr!m%9Au#^{ z(^vzK9RiBWwZD1K@7upK<9Wj->^?0U$P56!J8s-QNN}a5z<&c7JTcTHfcu|f9{PU^ z=T}kP_#?%B3))=OLOuJm!h1og7iujNSd9OFqKO` zwP^d~(Hlg}sqFkt@_6aR8xyjlPg%~FvCIUyd|*&G@R?{A+GOGKCE)DsCvOW(782)q zVsXw4V~JPsn(gPoT+V?9x@8Ttn^RNTwlW!qV|O&!=DC$#91#xrVj9rc8uoi$>%wRofd}eM{znr07%fI{_<>e+VT`c8#bA3S=opg4 z7=w$Mr4=o>j@`KdE)o&2i-h!RJ(&qduF|yBGxHdIxz7#*1G;4Ju-;PZs{GHq)$ZIc zz2;WiuobjZllu{*^4o0{vzdhuST<8RKh0PfNYsUd-U<6echYSO+Ne=a4Yv>rwt3@7 zj$?ocbjKfN@z^Be168@>ijP=13+xPJCmSN|s-J$ahFFcSf84gf{(P7Ivgw7}e$)7L zZBX6BfEuw{>`d#=*pxr1tbVgH`Omup6!v$Y`x0O!K`^dl6B;&xNFA?(t_rv!g@LPF zn7C#>*0VusYlh$OQ3q-OhHQzic=ADhDEglXK7h5_1rR!BxnHU@$TQhHe60hjYwytH zL|)oIpxB?qk_tbj16)fikR59JoYk_H7+%s=>=Jx;)E&hKNlWTI{h#kLbey*9cu-SV zPe7W5g#P;@%|^+A=ybcHZYK=Gmw}va-rSRTXSil zr``PEDH)7-GZ-Z`Sf3S*2msFlIt+sGtP>S@@+Eol70vNufhP#2P0c_ndDvNJI_i*d zqkd2cZ3?;2)H6866j9)XfdM`y3qEEIe))^60O%!_x89xH7ECrr6rgT$r9(3z<4ZsLNc`@Vr zK)Uw`?5+wtoxBk-rn09aZc04wBx~|Dc?P9}VZB+Cy0m}OtRknsChjv0Pv|M%-w|Hzd#l!($Za`cM*tZp4l}+QS?i`8ArImPL)W>og;=mO%t`_ z>gfc51;CqVPUcX2k~U}N5S)9^qC;TqI!qealVj-Hp$P|p0eBUxcL}gVAgH|?z?`*c zWQvFp(H_bx{Wq3R&To$h0`P^B5FS*p`ypD6^{gt9O$7kwQ>lQ&8j`ocfeL%O0l;8$sTgiqU? zDZ?O3r)F*KLh#A+WK&OWw)am=2|1cQMaobnLhWpUBH!nEr)Y#9TXW_p3*B|Zu_Vz( z?h01ys!YMeC`Ie)aOdp0RX=1&qHao}&d5u8Pmdt8rBLE)o!Dq;&U|f~MhnOR#XNV% zmkHthE3ZI0F9dd}KFZE4SohQHxCzw_mB)p-)T39iA2jZHei?ppi{Kel-bFy!MbM#3 z77G8ZJ|GC1+j>k>+3v@NSnG(7=E6PYTlGnKvXTwOOm^V#-t8<+ zg&+~VO2Hhw`ouTy9jkY-#AtMf`&CLrbT=c5e_)pg<<#qjYurVZ)`o%9P-`hVG7G6z zmb2W6Rr(;YYlZg<3E`kBj&Mih;a(UnQ4=QY2yxwtJhei{>R+Twyr@lRYd2B>>I+DF zUg?d1K9Dxk93K$?wWf_U5)j$r^SMu00DNdxLb8aUCtP`eCcIj zY-0Dw)@I5-;7NdOg|(fXsQ_T%;~UPEeAsp%TF1CqY9^%>V!uPbD*`p%27bCg+09) zfQ!&e0}G;|h_O)Gp?gfOkxzJ(ml19*-$-57V+9#7pk_^JPLv4^GN-{-2cN@bfS2O{ zcsXWQw~f|$5N=uGazFkjCG0{d?Lc9=aA1(IRIzYc7!)-A3r@L?GAcgkz`_A43-twt zCJpvP7O}iamz8Tlg>aOGSB8NrFyP(~Hu%8mIh3T95#*K;?k(d^{gB~)AQCD*P4x$G z2$yWc?zH-IK|r@%XlHvFIg4Ffqp4y1dGK>zp_ z^5a{+HR1`saS6JLpfMUc`c&nr0NX4ra{>{xZo$XyVea{7J6e!1Ngs{KJA#|<=Cp|8 zHFgo3Rh_wcn((k`imF1uvFflOqbghT zA#Hui@%>3e{3!?V5p+LZUI75GyKCLEz}dhGqQa7i!h!FzWG2BSX<5A%bq+BKnIw`x zJNh@yuDK~q38r>Y$b^xw52%Jl6+VZ_RGXsyyV`GZg#RgtwJXp$-hA&Vxhx66WiBP` zRaAgMWSy!ESzG}ci2*LuYq?qpN4p<48c2fQS$UWqe;591FTdM_1pe4cIUcpnF{*33 z-76-T1F`DrTXD~Pmuz^5b>Ey>xJ#AvqKC*z`e&sr|~A9ZZ~2%!%=Xz zDPAz3%oLXuDVMWW#&tXj#%XE|RefOh_@)5()w>W}S{TFRd$wup-UpfQICjZVy!+8* zMH^RK{9(r2U{pVQtgelt7}U`Wn!?$u0*S_vqQ~eeOHc@lQ8K8y#nRJe>BoVS`Gso zVz5NVz~(#X)Q5FOt(cG+{T)|6;bUh6c$p}9t6S(=5PAxJ#HUifr=dz_(201M{QSd( zWGb{Fl)yS_V;*PX7k>54ejs(JOla+vEwE(1TIrwv% zWn;a=Yt6cy2yV6C+`-O7F8zJ{KXT6S47NtlHkiqc0BgNFln<|Ye((l0R0^$JOIZy) z^&xKJ+eGTPMC#x>{uoNf@2wQ~N~{vbKrxatpM~=s4QD?1Oucff z75Q?qg*@oaJ+kF>d%dqXYlW}pEHp!{$EHZpoIBFT99-_8$`lLVZoAIv6A1+;3;C@2 z?8ENFm`Os2oKKLo6{PAhdDNto@YUJxVs%J4EIj=*JvNrRxQs;Q6|808xmu<_1vKI& z>u-fX!W;u?f#l$q%KoajSnQ2l^RlXoBD-2Paq|;XV(9mxWwu%j}a!$2Ga03mjWl1z8CdW_OS4t zK)5-V)XQ`D8$yw9DhY#t4gS@~+@Lck%cS#hVKay7JeunAbYrz{F;xa0bH1EwAWR2P zhb%slVZ+?SZx@ohH7A!7$Qyk$>i}iIHU;L+2#G?@U}ka+1P)l}iCoUnJT?4i_I>nS zV1=}=W5ERK;j66Q7O_f`g4+>?v=ZQzgQ`~t4)dHNn;Xhz!}D#=UI_`c`ZIU9f|@t} zg5XDKz5A0jxa?-MI-SyXeyPkB7)oAGFs#c&7Clk4@3eL#>))(=*zvaN*a@qFMAw16 z>}P5&F?9=Qj$v7>&a6gOWp8tGE#PtW-1ds?lGWbFe}Jm&Iqlg0W+Ji3TP! zD%<2eS$zU> zg{3mb47N@pYU!nwb^`U|$ftpSSU5V@xTq&u&Y#sRAK9R@s}ZHwh?=4g;_LjQ_)i!n zH_e9Alv&JvCRe{49e_UgK`kqsk|)e6itXQ*bca;bxy~`2?PVnD2Q8qLFkJTE)KUWW zl()pxw{)oN2NfUG%IIz_Ilq7D=^-;`V!x{YlNU?uzn&k8qJ4VC6ZclcB2Ef4Ql;39 z2`V3+JI_;)gKiI&1nr~|XFU1Sdjl&^qy|<*X(yi|cciav3OQMae>$|j*LV?JkIH1D zTv;_+n$AY5^M-|HK*k$tK-EcAwu$NJx-fsBr`zGm?SA{1c*T6;N8HF^1!_qphq~2m z9isZb?%qgtZw6N1*Nr{?HKxDIR(<%ga^RUVPOQF9{s3D!hcybJ_&EVc2x!>{- z6oP=Sn1%U@QH~gb<~!pYgGytAn+u4^!h*L229X9D?u1in=}?reLcS@ZYLj;fp9#fQ zsXUEBp8SQp4I&d^Z$W}E=qPNhh5J%uKoN%slHsn{2b2#>1tA3TUS5OC(4Ef=st@x_ zpa7skAvO(C9pyob1Yucy&MIL^A57TFa8Por+Igfz@lG-)Uz39TEfkHVP)}$$B1RZk z|8*%+4Wwz4OxDZaRK4_bUf+HWtv%PwEf+P#?@eO_d0WXUSYd3xc`y4ElGdVgafY!7XdOiRP!Kav!wfTH{6gV9N4bE#NXmlTBbEH)~ zV+1g0$L53fS<9+ZFlUX~Q7tG7o07H@2%51gT%4{G9KAzcr|#-3@=DZntfWDMAWKcE zLM6qnv>ZOSjR?BF1z76#S6^Ei5HUe?h!Z1dF zN2mdmkhL#@sVqEib2;Z{I1!(@SAvVk-D+l6go-^rhQ~xN->%ZR=BIGoKM&d{AmNDz zYL5c{0OiMsdlCxj6a=70zy%5)sLE^8{b2C1;SsE$U^YpSKTE-7!`4}?;s@$y9Dk-6 zS?cx94as>?d3YjN3=2(ah%%5HXQ4wB0E{*az-X3n3l9czurr2gUkrkn$r&$Y{||C& zxNG&gf391w`|6PS&YmNL`(V?9j-Z6n3S*5Nuojmvv=Inq*kDB-7`ZhB z(7Ui+8Jj^b6$DkIP-DX*7&CuLGFC+P0q$VPZVj|B3LJj$!p5?I^Wc;B>jXE}L@-k0 zMZxC*oB2DJ zGmLBZ@(gT)U@SV4!>sVSQpT|+vR$j^Ug$y;VOMow7>dfF+ud)@8Yc(zdv)g-GxSca zO-Zz{NcHJERXuwt3IU7=Mw_FB@W&nmy^Otg=NVjK-e|1@Sa!rN@J9Lf;R!svi&7yb zHj9tS(?R}ZPF+U#Nt@J&euE}Hs$wc9EXzMl5|%v`G$E-6l}*BIzYeo1&!y!SJA|y; zy?Y1@aDRlRvV5a~1%68)3V|Y`LlN!#9OVtc)swYHoc z%yh~Q0!w(etz7KCR3|j5o$1 z=zj8d@3Qm9$YVf1B1I$RSokZJ>GOs42)VxdJ$nQMO9lWOo%EBcr>rN_I_I6(V$fM_wWgU%?nJf)0@_KzwtKwF=%We>OCs(dGgM0hq4` z0Z^4Ur`=d#P}n=DoN%=A?Z<(3?ytc##xqLie$HBkY3G1%$=4(-WO3~bO6 z%u0m;ytfR%dw-zP1Sa!%+ZyhQ<6g-!hUR$J`~=RaZEfWc!CFabdY zY5~!(fd^!5a{X6emeJ?VTNSl4sf*eqy4!_9RnOi;QZ6iqD{Y)Hp1QVfvF909%Ac3rh+>jDX=x-qCji zDS(+L&Qa5g@X8-=yRh2#0*jx<;G;I_|p77n8dE}vD-4w(s{oDof+T`f!$rVG1#9H>TswBTiyE=B&MZraLd zWbNdPD&b8st{4KxZrko!rE4ZVS%0S*ARS5+j=T+$7xUMZFp?Zve<~sx_u&L}VFY10 zR-$m|jH(@|11JnZHRfFObH1^IYf)Gs$gwmioST)d9WSh$M57B7H)@FvTYZb%kO_7d zQdOsolZVwESO$D4flq=ZR&vX@u&Tnps6B>J1GNg=B#`16PyweC4V9{d)nPytA%9A! zN%{Wod@V*A+{iUjgv0=OSWXoU{k_|$!jdJL4<~E#Mij3OvsXTi>Hyh{cR(`(eJ@h4 zPMl6M3B9*yGngt2+nQ2@(iIgZBlrm{@xEEN>l%EXrG4uDB7D7?HE3i7yV6++l_%QI z{ZjNzbujl&?f?erU-2H>7x5nX;Ad&}S0W|(tv$f)MO{Y7uV`2Nv&tA@V_G?dl3Z-TR@x-m7&|oX*;V4depC+SJsl>F z$}yb8oC~-G!O|%36-kQhGr`oj;V^v(!PJAjpsi``TX8C3Q_Y^`A8Tm`rcfxeFeWL; zuIMTM`IEI4e;=9Ds zT3ZY%Js{si%OyT)^`_t+I^g$fHO*2PmbSMa;?sEB(~kR@CssaA1?GZ_(Tm zBX7gT))0I`nWOmL;jQHQjFFmim9~Yps1G0P1u&2U{rLuTC+8x* z0h2$#viF|N_a_dst9M%&#%pUSCu%bTkESzvLB!iilT+Xav#_})Ws$x z77;+BA*pm0Y&xAuyabc%<3q{d}%AD%AD@ zejQEbRbPHze=$_^#qZZ@1dfRWcxBUq+If7QzyI;-AnbKblj~OkZq5bX`08*$Ex`Bcbn?O7U+eMC0VhYPPGSKUKbBTr;+R~% z2%mdWd0}$p`>E^m`AyWHa~8%IS{9Q#3kh8TK9x@tudd$f_40iW@W~dsnpf|ozfda{ z^^m;csV2KpmfdW-)EeC!hhCwMF8-2QT)focn!j*gd1FGh`)cp<;Bs~0WyjN#)x!sO z-&|=lZ@=nz>*xLPm8J2e+TrPVL2zIm{Dm*yCqoW^lh^j-O^U~`jZn@&7C zs&a<$ij=o>pZ`T%koG{aLBWl~JI;$I!=c-r4k|p~77=HS7=&tXHE`A<`Sx|^og4p9 zxDl69l_FK)?mDG9PvrdB@_Dbx7DKrag)h7D%s1VZ(y%)D2mv|9Cj2cjMNS!mVfO5m=|=6un)JH|xNBtGu}cB5F9Ztu)LZX8o-O60VkIe}VkK@x z$~wxo)A0(snM&u$idR8rXq*`1kl~J^zPfA{d-}vhA;%vV5!EwC=$RJY#}2|AA?g^by^cO@*zLagQyi$g;QW=LZ;`{#cJ2^rIDTg!-(Di+WUY6kyeFPS$GO6p*BHFidAvbq_2nJfYxjp1 z0)28tefNB9Bn{6tw=P-&EUV6K$^2<-KkyIi34iO59L^Q&f%v9$%q-Y{jp1y`qC-no zA?q>2uRcw#{A8A8T>;>f$`@fT>Gl&$yj`D{O%d7SaBkV2zA7o3-MD(k?$1d0AFuht z6`c#}xrczz(1`edds`eY>~(*sxeIX=3Q4(pDBmb=EpqFhY6Zx8af{aVu~{FZcg8ie zR?}9rVaU`8cW-WF`i1%7z6s7>$IJipF^We>$h}^Rs=B-2NrwN}`~{!8SN%|A?B3<+ zUf$g|Cvyuc&F2x^pF8H;MSV_}cLyUP;*U-IFD_RDuAKKSH}NAh$AaJ6i=)k@tp(zS zUkBe$PLI&8z&q4_HouDZYNk#X^1J-;#MjO3=+taHbOI>E3uS{yeQb) znMX}^$vYQ-qr`kjLfm$!?sWIg!qtxI#HY3kBE+Acth@*B@-%&V>~a~fCHa{XFLcJg z{e1Q4SWPV=LhWkha%J54b4UBrvR4;dUDQHe#~qhPp?FRvJL_oR@i#C|&X*6x>B!&s zzr8p=_#N2m&OV>I*CvmCEW43%-@|gxg&>dcTK{?=w$MJCllv|7 zxNUb%h^DSR;F8+z%h$DTYw#R;1PMB zEW)7+y*;R81viLn-h;z)^?v4Ya^3*@CNgozGlCj@Oi{#v%}}1N3bXA5!OJw!)dUlf z!xADv_X`Lj8APQRst7unypUCT(R^FkqK(%>4+gRbT;6)-@-VZxDN5?+;)dT*$o7&} zr;r_e986X_!^{jGi39+w-UYAe@spC2@Z7>2KT;|6J<^5 zYy)>XrQDHKC~ZFwaeaHMx83Sj+g@;9z}aSi(Z<76JLq2zBln-(uJ!R9uae9ge#OR<-(BxMcKhd|wS}BS6 zvff|q&t>cDdi)}b%J|RT;UvidkBs22>I{C$c0Ko=L-15OQv^tp9~me&`KM2M@!`zUlw_H|KWwJ% zoO0vPk|TYq-BDKl(Q`pyD5T0=-7i*D9z9iaLw|wAx9^vavoF{0Th8wY^Sa~;b%M7ArI&qmi z2r2OyBIq{6WQR$@ws8v-u=}&NaYq}l(F~V{?>t&h;CXo*=Ini{SJJwV&HAQFLa5FlGhQG?F|< zhqFH+t@l3D=4MQDtY`aHG+Bs|Bm?;<|I+%&w@9WJgITev{8+7i(|GY#AA_ATH`UI@ zs;w>Vj&Qd`HXjy-J#(`rY|@rM@thtjdDie`TFQ+jNy0(E!eYc#ksr--%5u8E)+~ba zi#1h47fIIVLLUi*uEAd3$sW04p#@=SmP-oJI)dV##NQrYtRCIIZ+}Fh1hu8Fnlw4V z=2Bh;;s_`s4QaqJoSvIawH53)fvVDY7;iURqDy&dCt3?nExO72@DFIPmEj++rPuY} zuUIEp3z&{98qpXgDI9{>^Y&KGFvo3WS&;IL#h)6AT#;Vg6i`jiN!_WRpyPS{l&$Ky z5y{4j`)6N^2s)JcS}Oa$)`8#bn&ncnFl4doNYY-;!N(az`_{0c(PHLH@p{tBoOV%& z)JpD-qH9!lVZ=Izz+PymEnC&1*wiX-2~fB_n|vFE-_;*Wj><_q-?S;}1Yye*X?SWEtV@iSp= z)1MX#GsEljoTOXY8^{JqBU`auUvPA5x!(VN+Aw)wPx_@Ft*)uYl^W{Hdu9|LC()VM-Tx zX*SYYEz|T?wQKVZ5f**K6YG?m6bUOYEd6&4lbxlz)f@FqfIlrh!E6e5{p5c5muzUS zMA9I9Zl!GZ`V|m0`@(9TuMHmKCQ7VzzVHRQEg~>ZpZ;ezL{t5>v6%^T&pzqbPw3j; zx+rUS;%3HvhfpEiNMM{+oVlL6LYarR7(x5a`9v`hT#%S z^X~f*S|2ufT6yrbI4~yjI?v^BYh1MgV{W}u*Bj1(h4z@l zgEn5U#~s+2!npX+-AAiN&B)B^M@uXiYRg;&`2A}&kThJauSr`C#e#%N!!79>v6~s1 ziWny{$6sszYj24%(hH0>a>BcVH3W42Dv(rNYIpbs^Kv|bDH^9RMAm@4zzE;0-b$!? zRsUrtTVG2)iQ8TJ5TEsh8*7^1Y5{lE?Ikf~zX{r;{&aQh^C5n6yX4%H#Bs2BYz@9} zTA;agGIdO1p^v0-VP+>%bi>pmQqPG(^P$1xTi-n>%^R1o$FgL0I*$ZWb(^J|%vK}_ z6+Y9BMfE07CJD^I99xpW`cj5O8l?UWivAUg2rI54OT>=-tnI0~*Q(?6YaF@Y{i!dJ zCQJ`?_)7Y}Hn5L_lLI0j_8~c}jg3f@nYyc}iXJM><={H5I*3Y741kWnSjtEXldkmw z=xwbIn@`EHG5lEoTa|xfIOUN#gR$GBas*t~$$fZmnvY0CEH6SJ&FM%l zphnX#fIakwRec8z&8-Dp0Rp7gnrYPZhXI)Mwt)0df)irWhm;4aN`}`7=4x(J0d?kj zKznUFe-_7P0&YJu+RUs!J+v{dI(KnVEuQQ(nnnlCfH}P);o7u;z}N1?o?276i;uV+ zMOml$rDdL3%9|J{c^%E|&2} z6r1rH5%>G+jreMw#@^j&yfxNFi@lmE;qI3{%+EKHHFU@RLzlj*vHT;y9WLqo`Jn5hYqKzZ8_8~AEzgV|tKp^@laecX;xTJqtf>@wqOkqq zKF=ZU7|FXW$5@r_S^Ktf-n9{BcOA`z}JS( zZ+N>3z%(M(g{{h|aaS72l_iO*#jZpq?h(F7fx_3wH9C%BmkUWA~s{CR5FRBxMrHrjW#AjwNbNnlI)k)Z~On-qGM`O z01L4c(GgrCZ7dtwc6hYSbD_o#Y{PD9dmC=z4-zQKp*2PH!H;-FNznwo#q2uCyydsI zmx)t8$xSQ8%i|lN&im5A zqCl4SRBpMpf)i;b`zzl7;~~bwBt_e`mHqFZ3y4hDuhDs5T2s}xZ1Luh?u{xhFsAuE zF<=^D3tE14@SI74%dx_7A-vUm!cjB$HQkQ(L)T&%pW;1Izx4gS=ODYutnBwH`$TJC z(>7S+vp7U|sB(w=b7AJ$y));hS`XQj$}X7J*LjJ&xgL@QL?>BHU})xgbN8_?VjL)b z#yI23_BoQCvgEeJ+DF1O4iEWZ9scnUiTlf%ms#7RcJ+r(dN3LVd=TGRa}N=lS8IE` zOqim8EFuGsmbVdFzXvRnSb>>J$x~y>k~pg8`1ak>*VQtD#8C8eJ^tX<1v!^*&ytdn z?x$(Dqne9O9`y0%)+ACzLr0jXKiTzI!=nc?+2;p9d~JhYb}dNxWg_bCrAwT@Thkt( z>R4>V9gBCtmRpI)O#Ie{86`%Lmb~IvyMoLWU@9XzXMB^{SWDx+y|cB3^ZP^cmT24j z91DieePKr}@BOGoLpNu6C((G*{U8V?j2m@%8mV060l%NGKpjgV;hCK@3ub5 zIu~0Je5$SS7P5~ynGn7?a4D>WmAgu%l%rA%@;VRTAmr04>SICdZ>{YAHYL!@YhBkj zqK*Z2)>*b4Ppg$_E%RlwALTVHZfo(q$sdF#3L*t)bKM}&CCU(qDXMP10yaTBo(V!7 z;w~(HO(@61gL`s6p31Zgh|94Q1A)NYAcSs9+gTrqK%jGh`6iH3UR#)Q+#~5+ACNVC zUHgTDN`U{f@y>T;{7Y%B(4X1{;w=crFgH0CbvNx$;!mgz$%}Br$b_G&R9r#GL|i29 zCm0JJK`<7+O(=7Jt79qz*(#U4;65{ToYhB6N+#ZDY)u(rBwx{F-FU8#;)Dv+xmg>q zlooyfGdZCtU-WJcf22jBmSdi2<(T%SAMs$SqB73+1tTS|OR8BvRRh;RT&s%`<`ZeV;K>5_mjJPRm!>Hap=J#5=p4VSr4`xw#$tHi|!0Sfd)w?%5 zO&|7)S|TD;XnETuK? z0Jf%>O;;07u2RM4J)}k8a%RdhsoE<0w5I~u@fIqt^3}|m3DhQtMGy6hVDDM zje0G<9>)5?tf9C^u;Xp}Q5&08(?;@&9muVIpQ#GSO(1)BmOY89&90;iICrrUh3!(7 z?Xg}u^X&u!oSua+%O%F$&L*Bz-4U*-+j3(z=~@?rUXAQ4*)vvR*+W1ITz)Vq+^>?K zQ6PFa9rnhe^&`c?l*2n%aw#TYVZ{4;cNPUTO4Ng;q+&%=h1(1m+}qO2V#bf+oVNe_ z7+(K-VP~4?|L;O?ub*J+e;<-V+4wJq`#GJLmAAZsDcb;3-mZh4=}=tcvf3FXjL#v< z6w0Es!cfk~tqEZFUx2;k0eh?ceVlZ&;l^ihMY#gfMUgH~8exeivNIoQ8Xt9VnxV27#5;&}Tv8Z1KgI;C#r&Qfh9!f8CbC z(GE4f54*0+bhj4VKihUI&s(ncw0g?d=D_^v_RvQd2XNuW*Clhb*I*cKdX$N@R?S>n z4X^}DPkq4Yu%N@cPmhPDW|(&Q|Ht}TjNixRAesq01AKED^R{s?E!Tu8Zy2#B?S3wo zfV_|=;vVp5+rX**wXj`dAAWF+yLI&@&9759jHZ`Fwswx!wQQ?}OcMt!E1>V7@no+e znNXj{-XINU6f=tnfW`P%KaKfDt@LJu>PwH3_c}mI&czvL0paXR=ihx<;BnjC{rv$W z@6Var$X<*?V^19RmgN_;Y>%pMEsAPKsc^PQKiSWyXRl*2QBW0~E6!`8De!BhsfyI2 zu~3K`3uzdOId)b_2iezdjT)$SbfA@zBIhhwsVv@*9shAVVETJ&+>Gelc4t!n2aq8b z5WB74jHHYckFjEf4e`|Ki~Cupp(;n^S+yIMp5T7ZD>lmSXXUBip!VP}6%XRsH|a}W zDjxDfv+gXIYnxZgw(1-1`HK`0LIu9u(6|)rHrx(pdlPZbA$6Cv$B>D6o0=JYZT@p| zE^bP>#`|0N&%B_^K~SfS}N&j(KS(%l>W&s8ak5uanYVqVe3tseSQ%o=(G$@gJk)es(b{@5Ned0WyQD6To9OssWNi;(Utj6>`7&& zzf}(<5F~18wz-${Fv-HsLAJ5k48^q1TRup^&FD8}WFqcV+0fNrqB>b@!E?{p5K9(B zbZ*|01?RWph=O9;C33k2Wj@_6yn!%Y+3Iw*e|8^%U|2DZu%7{(SG1zh&is+-W3gr7kp*$C+Aq+?6xot~#q!$%-f(TK`dX_;cq^Qi#4xLcXBhj!jmz9mgOZCNl zL=&zJFw2TTZTF6WF zl(vuk&j+i0!-VpjXqYFoZqvnLgJlHu1O`!2Hv>3@u--qh3eRC#w`df5iEbesyOELe zjsN5Gc6**5hG_kRL%tD{-}C{LE!jqww%(d$a{R(x!jiIgv779o-Mp;~;&h;`gf^tepEx zP>klvDN&Hr^Zg)6%#B?ZNPldqUL-Z{_|QybSPm9cwq6=oKop)1(>>Wx5{;IZ5jV~6 zdjSbq!z2`#Vg2DA$5#g$rmWlMcBN{urMwXMIbBRh(u8}!PPFIxMAyKHLT;HC=>J>b z@%#TxE@$Px$cZ!Zl5ZUC`X@=HJVt1NIv3T9$HMVfeR~uz9`Fpt)&L z2xZ{YHGg3O--^Df)Wql_9;T%VTXq+=O2Gf4=n{;d1}O`AB_+958&$rd_^+m6^H!oIs~KAWWVP0iKfv|s6DNXJCx zd!N0q2M7Hvk=@(3@d#(M-_~T!%=UiPf@&`>?q-0-?#bNYh&XUC^opv9#dAF zuKSm^q5pVKpJsYPh=y_x#c2gkVS&-jYhRG(wfyXs!1u3D48}>)p4v(ae3gY7&*o~a z_6-;0iW#Qsg*4aMQFBX#*5|u@K;OUecUu2|zjY$2*mcCbQ!8N$75wmpn#07HY1`}l zLZi`Y?at=&npDErB=!n%3+e|KAFlb1IhgcGl z7U?!a&trp>XZ^wn%cW=tur8;jY5FD-2=FXrQ|YsQ5a%hzMp~CRYzL8ejsVkK*xE=9 zQLYaV+v~!VROTl!i_ai)gZVk2u8#sjNk~(D51eSiQ{FT?o>{TZyus(A{^s*)CV(~^ z)ix{_<=XZ{%=Z-zn@+-LpSihZT5S}5jy+rVz|@}b)e+)}!Ekxo!)F1P8} zJATG;jwhkJi*7n}J?O+18o`xu^R91dQ1ByZZKxTUHs0W4T+sFKUkI6}4RBe&bQcQt zK|llP(T*Y^2un2CDkURs`Am8Xnou8)pZw!3ZVa`2P)5nsJq`+-zihM&AHoE@_kj2n zFlFnziptRljMf?z6`Hg5PlBrM{*RS9+(9G)IoWnwvd9h1ecLJEwtAPV6()rnjrL zLv1r6w|~v%J^=oZ@LpJMUg`Ys6nH+&#gc86V-lc1hC8=DP;>JjLXsY$%FvXA--*Gk z?&Hc}!?P$*2C+-)8xrIz%-98V;ZIPhd8Q{!2_C@?fyFqmj=ta|M;Z#8Xj_<}`C;-a z)Tq=5OW5Ajvd{7z>4{V$LhR0<hnqX>_hT7Jk7hVDWL(`h|EMjK+Jt-m9*b0d(1U>F@DFu@EH6CR$q?5Y#V9}|C# z>we6ij@fkQ^K5SFemyrX0XaMLKKk>Kf!W;ktVld9xT~MO@t3Rbtd1iAA;Fv@2m805 ztG|`~&QM@-jV6i&A_rns`;uvLS7ed>-9l9a>Hwu zI#Mqn{eAo=BP$D>KTgboLzxg#lId=ox{pMF3qOjlB?^%cooHBusAq`V-Eq?C$;+20Em5l^+r%#{ zzYo{M+18jFe|u&#Aq2>94rfp22ExBL$5GL=`y}cwx16yPYqcJ)<|iQ@Wr7@%F|9{? zPxE_w{N(PPPqH9H!8qkI0Hy`!6v#~|g#F)iff|lEPinhkhUYF*-o`U;>DsAJ#~T{q zp<-mptOW`os#^?;(tjieqI8*N?C-r%%0>PaOIQILUOnZQ5~z^cTItxLFP1vIaH;9( zI;z2(TEUa+c)qA~(byHjXIjuPYa$lP8_wo246K?)qe6M#c#&)B^U}_N3 zkrom$ysIde5gv6v*4FFc@AJL>#&xPdW?@zk33j(7LDYeA^I8(m!&;uY;(Gd*D8f>| z!Sbr}IJ*D0q5+l{aF`pRYY})j`0OK`y5>!MX*&AU{vZw6aG54l${6F;#|oD52C!#A~#3YntswY!{Y!yh2edvnjj zU%mFg=0V$e8{UA-Ge%1!&YnjW7YeY%6IdrTxHR*?uNSHC%KUa>TzjTOl8A!VY zU*{P_aIdik4c}{-bU%qcrI*B4m3Hl&f`h4LlhxXVg6xT*9K-WE#!gm4x-C^%Eau}E z=3hc59zRRAY$j7{8fRs;JsblA+)>-~i4Dot?-G8lmuT6dSwApiG3{ zslmh9$!Ma(^gCXRsYRi+ZqhAio56iwPO&?IK;8*UVD)Z|x`c=OdUAJ*GK(i?; zA+Mx62#u<*W5lnV!QW4fOeoNK;IM)oT#;YCBj)9|$9sP4F6Nc0=Zror{o+Y4PgrWu zk0;Y&NzoNvLq$*IXWw`^NO6Ilih$twEhN?#k-F{4oOpYdN>DMngGJYPGrgPG>ynlq zT!oCv-HQTo)Z;|cr$okpo0sYb8668g#t(R-(e8DO%Q+5F z!t&rSH`>I!Cq&+6R^<%Z=*E#a=W0D9&}4o!RJb#cnfH1A@dvasqn_iHk~>@axdiXj zW_NQ5j^;vaF=ahfH%j+%=ni`IJ+W(3ajSMRit* zi%cUq!DhF};L7{uO3T_vz&Nr+Vju#!R+h$E=|(}MLF5uCgV5miCOXZ!aE}a51n&nX z=+DMUTzN;nZOXEc39+C%?esemP%Vjv0>*ohFH&(oEe_%Dt2W8D(-%yM(H?!FEFBU% z{dQ06I8M*`jn+fMpV&k$pTzu;gQv=iPZYSow-?3A&`Zg(S!V*FAEUh*gz9DC#~4}q zQ#DfDL9(EL9QU3mCY}K*1OZ9b_83=2Kib$xK=3h=1~?;&Xa~s|{Gbd@yhu7b+VF0) z$bte~jTkJMlvb7FD1=+M#S1c+Kk;bFdroj8={ie&aqAh8Acl0faud>+v`FyPBadm% z3f1lIhLIp37Bq-O*7Dqtog|?K^x6NlI(V3)7V#sRrxf36ViE*2I=lb zK)O@9^AI8}-7Rql=@5`cKpN@pR_X5UmWKC$-}HH&-}T;qob}R~*`3eK?A|-~I-6!& z4Q!gX8nE;)jNQ-d-f{1-tycbkby$1ooahO^5bb>ULY55&r7;_<)^X&&{UY?Wl5k*H zh{VhOPewt?WV9WvaLBpy?8ua8xP^HGiemK0m6Yu)Iy2n{PR$d-ZXr4sSD*3*fnmy> zI>EFemedJ1Lj)0E956+#p+JS(%9z85T~?urg9*6eO3SwM@YN0I6d~eD08l#dn=&g@_jX z7{7WP1|kC%l;kJ*$l4b{0fDYy&wC8QU)~c~n{OVH?YtFqd5hPvl0^LOxyJJqNOTgJ zhG1L}ypU?dF=h&t1b_31SzGg2G1kpM(X`<9tR>_rkY2eEW)21e*)V&5!}70Y^MjAMH3G2 zxvY??BSJ>)56af&?_Ck50tfToSr}D?N>r&&Oi`3m=0h7s^@i1y67`g>rfUt7w5*z( zUhwK{6D-o5c2^%ynwF?>2`(3QUo6Zkmpg(kdwy8(&8}SGgo2mfL(eyDjdpXbA3vPF zOZ<2hte5C(&|SqSBa@1;c5snCrZ%DqN zQ>g}7B@SPbHpoUuX~v5I7KNs;dx&2JGdkT}e|QihGf5r*BD0_k>b%Yu{fwzp3#KOf zgPOl915$k4krrhBo~&Gq#!Mv;JS~A}A(_C0@Agns;v*@%#ZcST-Bn z6M3L#QWnLb467qFXykwv76qupX>%YP=n0;gFheOtSX0O_#mAJ9VW4Rqb$py3bY9~; zSQ_R+F`(sKV0I`9DOoMmeu0CV#u5K260J#wSxI}+C4-0cm8)=6krg6)3W&S;ruGAn z;k(DAA@aQ3?8pHt?9k&(L5mxfDbPKWQW?jJq4LaFsR~!L&u*+-C0uGQm{lgG6jzkH zm1dvF_y&jwr zODD&h_fy!$cs~)pI%{{?o-bj&z0gN+2+&X+JqLxnlC2O0zkSeyUuHldM>WcepWY)r z(?8xHq`$>xN_)2(pXK$9zM*QTzc^lNw-KY8e|csociw~295wIVvk`6DplkhtrsUi` zEFi5%Zpf?ieJvVu@MNq}8f_b6^u8n>*mMlCNIyqJj5^SMXFznAqdEM7A)G)TyxzrU z_-UvbGdL(Hi_z=%C4^{*tud0i&VFAkaZ)VS5%F_W#o~i=rV*;g^s zxZHDO`wNW1&^7tpW>Wq-V)QoPE_Et$Q&;0ytMn0Ia2lah^h$dh18T~sOyG+(KtHug z4R<>9{U%;KGnzXBef21PhSHdYpF;Ws6p$p0QitrF_zh^|x=i=iCGqS^IQp#X+;j4`L(MfMl5ZGr zRA)ZdNH8U+B)d#=-RHqOyLs0np>AA-Eraf^=}{95zjC&sil?~y>wPm7RH#YIt?ua@ z!D5R3i9d8CH3bJ4Dtw0=uq7i-gmMbUDn3U_XB(E2LT0gYH5Y^xl1WBLN!4Yn_3&=m zKM6Y#yQ9Fo@FNo|>)M+>a1#0(CTW5-07zyLIz0u=+A9$%yaOC$NU)uE9yu^(z~Lx- zH_GvbDG1$|Oq*On4gj3SCZ!^~Er#2ixbwD?wQ5m@u27&l!*nb;(G)B5>w4q{)c=_mH^i3L~TipTrCDx^%?$h)yGIMqe=*)tDsA!6=9eq z>l7Qqs4RyAzRZ*em6p%!9L&OaOx3L4dW<`UhMF^Why067Y6YBvY%cwaZ1ope#A6Q0 zR3|VgL>tHjPFb(wQ^FR^_WUWV|A`9TXBT`+0_DFcrBA`Bq*BiAKS*@kDS%4qy zbF(;sotUIlU~ti&E6EOa6NS`i11SUMW%K^%UXsB(6dG8#jqyA>oidCS2tpsIhGzwE zcFx)IJ!QU(<=9q5816A4Dv%!2h2YN@kHo|Hf00&oKBh(f_zc5Zna@hK|4FmgURaJ( z5BQe>u9hm0zlfU!p!Jdvh{G0G-|C@co6AM`2;?p&?ER-ogt=b-VAZhTicsoTfz$|%^nkj*x>9mvUX^)IAxxj z>s`KJBuc01C}o0pxTZQQFiV@1Dk~vreajEmB)gNODoyadcIYdAyfd*e>Cls2rU3E; zweX~T^^ivml`5SKda66Wb;sUo?S#PKk5)e-Fuog!H)%BO8II zP*9)?X7XA$2yCq;PF1!xvmOCC=XVd~_3Vs3y~)2eg3W%BJYgxLT_N|5pg6 zat2^$1qkqb9Pv+Nts=mQxqTBerBLYxYU~qTbnqwl$E=f9S4b$Lk2NuTvqX4k{x7tS zeumV2{%-Z1f@gw+Jr*Pf_QSFPsAP*dWjdzgpRhFElW*hiEeW0{Pp++}4kvz7`IYaY6K!;vXxwo=R(z0O zEFRpj(!Tc)TbmCc#U7Y^2Ycy*d>+2y`VjCWh_qxcf} zMiPX4{u)>CmVDp)Dlp>Ny;8(b+$D8bl1~U7b2&ik|TFU|<8S#mB?_($m4^VHXOstoQWR&h3rpA6q?`fi@1V1-Wv^z_nrpkfKSU zSairqkK*HwSF}YdNWVuk(oQo|(zSe{v$mP4=+lGsq64OM6Yd4xM3Iv)Q8(I!`LWp> zF`CFFqH$cezsEv$08rZf#Nt>B*2H5?dAE#{*r~tRBd2Gaaf=X3>pQ;<(#PCyd`6c? zkza4Rp2s*mW=51&(ingXU|rG}$QHo-F9_VH{L1n?S`(1k6WJdmb@gV@*<*8oH2d*W zv~~Io;E>EAZ<*gyfC{hSB`oddLEB|c<(jl8pu|Qb>#RHswdQ6!Cj8DuF!x-+IXm5~ za$uJf!e>Hh$VGV4^y}gj6)_?q{avIe8S&&{h8tuk#*uDf_G^AC3)x-9YImF@xC z)Mylg^(ecF>gk?Q>gJj{@Q9XeFo+~LA!vY;aPqqG;)7~h;^2lti7wm16RR{bpw#fo zEt&@m8w|~$mL*67>4pn6Ttv@Y{1nb(HEdP`Q>>>Z zwD4SQs=1s$6a*Bj;|^Dn5$(bifqHuVehbY~m>0$xhTC04hFcjzq4c=rO2Y!6sd2BQ z7gP+y&4%DG@<^M|jH%%+mVL>n^1NUWd!|ddzo16S>ib32xRMHx{->UuYGmyO4qa4M zMRsbV-hi3K@B0+|9UBxAIvQBkQ-HEUu|ZuY*88eG2B%MmO5E164Hv4tNT_+NG}9{M zQK2E9L+Cs}Ar+rN`Ny5zB-L6YFfsxW)&s!#L!LpXU|Ltqq?{%oFZsIEI4-2WG)l7h z=D}B;ilUl{w1Qq2fuasqp24b_lZ>A{Id62ZPk3^M6-4X9m#;j$2EZxlg$F1svqes2 z|DAF}CZ_lmD~OWQ5`-H7nI9TPdz0zJc!&J;k<1|E6E{ zIE%0d9~idBBvuu6ab!HrqV-B~@jF{H)7rk1USL!pHArZ|=cM0xV+k$)G6durm>&Xe+yeVn*aUVix9dV@tdera-u1H) zf(*4lBHu?mYdaY=)s+${l>iB1;+hy(#(gHo?C52fc&4E^UE z1hp|!Y1P0d;x0|LX|7HvO;C7+7$oPQGN`zn?Vbj1MR_KLlPD6itSE~~Hj9iQ6jVk* z*B#SWO^V&BY!XLFm&zpT<1fvb!=TdTM!JtOU^nPzisht*fo1e0x$CpNf2AAkr3@Zk?CzOG0m6!u$X*!nXJD_>7Gchjc{|v@WG^z zU{aKRJ6tF*07@8G!qTeGz|h8lZ7+z17)O>(qoheAbG`i|SC#1Vc>^!Wm#z?RA2^Zo zDkjoAM2`a7c=2iXC-4&%cs2z;}V`);mXDK)iWj6za48zlsMAt!02bG?W>q!+hIRaJDyQS{e zZk&{hNegzcQ$sDw7shxSXpc_Qr`m@76Z6R(%1tURPjL-t+4?cYJ6U84ULnfj?0nQ1 z2li+Ntsyad$sdR*VEg4cU{bxU=M3T!T3HOZX0()n704dQD;3y`-E1ZXhFao!336B) z?`tXO+GFx@WvOQ0YeL9I0}^We43pNgsz$cStlq~~>zKXopvy6Uquwc7E9{La#E>nN zNybv!cP7P*qys~Yh#a(jAl46yGQh%~Q8XU>-c$0(ROTV5>K{^&Zj8UyA?MP%k8C+iG%8($+c39Bfa#i zP$v#zOFa_;4>?XQ{x4JSI~yrMK9XXxgGrB+;*1EM^=sp*#T8_@WHI$y^cS%G?LABk zzr1J68#gx&62#_;Ok){uMAPvpFu#Zlj&|;qOP3lRWx2TGlOr{_9ttRe!n4Gn1hYHK zWo@0O)1-n95#7BIYzttTJc?yQRI#qIJS`YB&Qz-x1BKfCM0n?WY|9tFSMWgjA40xf zxVI8FfVn>ZYV9d+`a#xHJ!_)bM(Zn+7NUd5*hEa07^89+i@lgNmXnu=>L9fow)!aF zjOn*mbqxAvkcmePc<1{V-<4-3C)JyL`!i}>ri$qrp3{;!?!v#pN>#K3IEYADE(g-> z@cQK^Jx^lbdups~l`yk#)LLn{X>k#2F5kh{j@Nh8zPHAhE6g8=$j9ZT8kh?Ky)$OJ zXtN$bStN?EPsy#`TD1|}muXOw(mW$I;(w|1Atjj&YgxiHlt2Ywqgu_~17|~n4ZDiM z{orO}gy64J%*U``6|4Uf&F%{sIfm#3s1TPM$dG_-rDrDPLxvCGT( zx|dpMl4?PO4$($!Y+XV%oFI1HmAtT4yJWl7+2hosHK@}IGiB`(G(?y=Wl>n8~`qKmyHbETN9yP&7sWB!A-8WfrMuRmH$!MS2KXO}7Ii zrwfYcW8=yq865)!LY2<^xz~d7%2K5Rj2^1q%~{au(TCh(%4!I7S(%6LA-nRx^-2 z3{7)zazG4?19%WfV8SCn+0^y`y)J9s_U zaF~kY0<5G?J6LsUKYTO2cd)dT-F$a7qPe)`ZBD}?!BiYRT{B;TKPxp;ocUIN^heQK zHw5{UIW`lGk0ZDOG3$WwjaLjoHDkDaCn2l}>#WH)e%T2GMETtP)(I1ZP*|c(X_FE(;GlzC)&^7FJIxXjxB;PXYtc!mt*b6lDhc3D>+?v zM8CEV*}|h|Rj4?4E(KY+$E8p#^baxY@D_*Gy+e}bs0C-%!SLItCe#A3R=Z6;Z(O#b zY@g9^_cg|+XsOz8vUA&zhQZd*?btub!{E;9r$r)|IvBepDkDuJ>Y_@nc>>>TBZx6a zuT@=K&q}PTOi8OG$g^uwvtth8+|pp)YQC%naz~Q%3qEYPiZA4UIrLH z7^A}bOCFNnGb?b%R-_%!e;TtN1MEa#W4c(xB2Ps*g1zWgxBR^jRQ1Oe4XZj3rxK11 zrzzOk{!K>$rqk8_MQ2G+9kob0Q`qYpH3kkjE;?DTKN*r2&KJm6bX60SVwx4GA+kp0 z>Ag(^+TF*qo}?L%<9^kLH-bA^r}Snw77#J%Kefv@j#vwv`~z4LSXXYiqokB_^n%ft5e z!SUY}HTX-YL;?2$Cp*i_qlf7&jh9D9+jl*O2H!NY2GBJ6J({Z?Jdcmg4~~CsLq4y) z**&aD*KfX@-T!=OaG(BgPW*7;^YHzO;C6C(sML$Pae(Jpd&8|@`nEm$k6Fu<8?;5Q zW{=zR1G|guQSQO>3+B_IpX`Cx6+d`v76}s zBBEqWnJ3y~Q`8j9lStgeK zt4XA(8>Wqm<$Kf#=TM%(L{Jo$?kY=7T5R?V4MF%Q%S}qiRb0X@%{Gw^1%LQ z7qk!Qw&1cGEw|Szvj&M#pSWx{P}X7YbsLkpsBgklZi%oK&IVfU@3#-SMg^M}ydF+g z4-Ew8eQLexZ)#>=w=9CIudJ*t`XrMR-Hc84+ywXBeD)!s*bu&ZXt7>C{TO*1eAv8j z?|#8t^Pyz{T%BcQbeR|24PA)$SK9}ZvuF>s?u~cG-M5z;L>WYjK5=gM$48fmrU6&W50L-6S`)&r z8cdGnrq-svmB>-Bil91zfq%& zx>S)-(s{QAbA;>#fWNE`_TU|GukG}Y!y%lbvf>2hGPc+k?0LLI(Ucm=Uth#K6R6ws z5Xs^Yi_5KD|6X=fYU6V|jP;e$IMonsPo@05wl~AN$rn`&NM!PNq4IW!7ZTyrQtgx< zWJo0?m$)-?Bkb$+WzeO)n8guln|Sb}Av}CqE?3XdUO%{BQr_Oop5p2u`YF?n2?@Cw zh_@zWb_cD3L_(6yRSsT|&76?x_C~^9`knEE0s{#cTZ#m|-`>a|Sc4b0l5);H_v_f% zb=YNB(Vn&8GI;IciNf==_7+&hI?ygx{kcuk(Pu~+c*8tAoY^}Q-hZLL)GtNR`g(*Pw`@s&Ib-8cV|+82fox#V#@)}CX3=p{ zD$Gi`?Fyq;GR{4FI*lC#$o5chtyJIVfCTt&bVLgMKX{l=4E6h@GLq(b}y0j-0=9OXi0o#FGs}t5h?~&n0iGw9i zixnGk$1TvjM1k7Ufg==@j4snGYqj}87EL@&J8i)VMA8{d>^Q zlw)$20x{)bCO+NJ&nK}k=w2B0H`;`}x0{|@V=>6yniLkDGZoCJ?3A#V?q*8A31NLc zZM5nf9utZ*3%*PpD2QdOnbq6Sm4oEnx<@UhC;CFMzIx6Dp}OCz0(}nhii4IBJEWd{ zJyKi0V^F*04(|nNks9pSJjQ-t4mF)C_VP;AY}+kRb#{NM|7M_a`y7?}+h;Rd>D5;n6efpdO0yt!7tYeRG!H${8558|$VUg$bKx$-t53RHa7d zvwIz(O#}~?{JpcQ=QzRT(#QtmvB;1Nx}DM0$1h{kpW|H^bNDrRbZID%MK?qSavMQ? z3wNK|)>+=>;4w6E-Y8NXyJCBe=C=lH)TQrUZX{uMY$|^#iFLp^E0ylD`7CZ+8Xe6($)!d{Sh91$r)T@|KUg2*ag+q)Q%%J5k*mDs!d zow#^+eLcOwu%fei6K(noGq;xyi2fS5Ca}4#eDVTyvsu77{|}5Q{xgs zU(m9bkBWDRAjF(!Vk3&MBN?h7Ag3Fhrlj%A!}``Rb9-xO+Lxzz;7v&6Cd#{B17IlE z&d$QX#eigXrPJaPg*v1_BGoBs$?c9CD7jKrEX}kc9F`70i3Eb&U?-LJe++AgqlSO+ z{1&B1PU%KYC{ftX0nj^kDoq| z>j)-zDS(FvR#*{QL^}Jjh6DitG=zXa`L#eeIJ#MxIy^27^LqQX1k!j9k)01^_AtbB z7_+-hRu?OA-F-4raJ&WLB2cQWbir^^3CX9m|vP?djRE3pV6&hl5Kj?RA zb(Rmwm9d^H2207w^V4q{E19Jy8VE27jt2zTTQ)Bm2P@etN6%B>vNP?!f2D@DoMTec zpr`C2bSYjiY@B8Cx`=EZVW559gL?rk)W-_AsTPkkS`Ls8iH=Kf=Ib2qxPG`9u&5E1IHPJH~ zEnrV2Gx;$x%~^Vtn07A({0&&NDyM9MR~;>5PObTVW6WOv=J1R0&y{-neS*mnwFA0R z>E`P;na)Hx@Ar3^CyR|=;`)i0kVRx+fmIk0rFDM`2i5|7kkv3VPFzUQ(jcDyZi!Enm zo5rGky~yKs4AQT9GxhvPfJ$?;_s!VF9KB>fxoIrgK+%VzPkZy=kq4(E-lB(6I%;SY ztNc){8syVOP2>xF*Ji&Bz_Id3)(4F0L?kis&x?I~)}-v*^0rl^hqEwO?rCmdj#c0Xc2ux-C& z9P&bL+Q`*~t~_>$ffkK}Rd=TbUq_a}%0Ca9>~0AjOBx4q+$3Cs2Wk^n zi86~fMFD0z@>Y<3#aAtP?Zi$K3+3dkK9R$dWL~|+ob}0PbWLq`y-2tC#dk}w5$9eV z@8mp+ItaSFyf*EK=~`Il?9fl+Ln&fE)Vfb{p?;y0kM4U$HDULI9Ba!4ZZbu2kq_D) z4GK#K$=hOR;^T~kI{nw}7Z)pSwQq=$>{KcwcE7QKkBBWr-RtmNyw0Xq;Us9audJW2 z;?mJBmbuaeJ~aM3aMWg8(U;vDkjIKhmH&v9TZq~sn>WU7kX_ld)~tJ4ylyH`@}9>BMx$%-7dIwO?ett5wI`FHooWF?w^%;ls%Okh+8t zqC-X91Wm}U6`bv-=tMr71||0|3f`5{jWjY2nV88Oi41#FQPt%3AHmR7xiHPMO5BIx)B?<;Z<>(fQDn0L(xKGJ`Ke>YuVq zW;?F;jby`a{3&T>%kl!!K~9=`i2P0bOC&o9aIM4HU9qKM`Q!UkYlalzP+WxosCR>~ zlrcNF9nAR)ckiAx;n%@T;%nz-j*oM?qa`LSggFhR-k-ppZRW({qf1k;lVC`h3sFRm z`6?;Y7sME_2~ms#q$x%L2oz)Bc3kNUv!MIcNoWNI1;1rIJ4e7LPk@WI`2dQ537@og zL_EUC3wn%FGxV7*8n}d{jGiXKl#-5i5wjB>I0dxz-vJqio z>onhDN)wb%R_i3pM#__3eXxQ*&5Y-9QJs6p9gyj7^7fJIO$>x^7Cv%C_y%}qnOT-` zLe+f1y}9Y=IFys*%PSsbq{W1}bBsk@zQ55Sf_lj2wi;kL{1fkCJt z|Kz8dKMm@mfH)NrxjHZooTmp&d>gD+L?lyOIss&yI0)y5cx~9j6$lS)Qijrr1-~(X zz!obIwLIhvukxd@e z%N}|chJcaWpj~t%EC-Bw&*_4d)isdZUYoX=6yjN?nT=9mgB9i0S#adG44n(xkQs(h z0os$lEl;9RdO3+`d02)BpURn)gh`*dKG9HS5YQuERrV?-WMdd5#49n70l2Yz+N>%;T|rm%YbR*+4|f-M?4{5j5LmDf|It) z*g@}+!0(E5f;o*S#AO=CRK+O-0qNGM65}`JxCyg_WYI3-3xp1U+XmNIV#Jg+VM3;; zUNfzBq^Q#2x_kfj=3$+abU5#}lk4YU5}e{zrI(0OgMF)Yt`^2Rjs!k^&?{y%lty2) zG$fQWI&tWEQ0S6B>^H<0jD-9pOd*`_8}YfGnVIXdeObXSH|j>o0MLtn=vGYZ5KCi@ z&V#g}MPL+?7LNbW_u0>moKHBrLJ5ciFs1|WkxsLrVraucIp&8W=j3qs3$#wvjZn{_ zP|2mgHEeR71F$zplbZG>g1XDDe3!P!e{5=ax}7me_=<nF3?o0uVB2-egd^V^NH z>2!rp{2Rz2C2%Sw7ytxl0mtE8Ln_sg*6BL~&#PP7Lls9pwSIT=vYYPb^RHvCTlX%J z7K*pr%8vE?Ilk(Yu*^4stSC{gt^^}DE*@6TjWQGkN1Xc-=Gl>3SOrUfOwEm{o;FL2%XRT!$NGJ%_+%FKSX{LxNlk+CE-Q25{rjV z6S!L2+nT?+qmDY;B)*S#p}CgR1F?=_yt>>{ffOj-qp20w)|-1J(K>4vUKZej{a)d1 z!mamuFk$%?pK?H8p4$TVJp3+nP=qkXH?t2!o>yJuy~%Hg8xNgcr&piCtlOu1xnJ*% zPp`hACT{e)J`8?y*p&Kkoy1Mz9>*btr=lxzMm_~k)rMclRs+C=8P$vBa=1SGUb)yv ze+{o23Ns%Yh9gn=W3WG%1{cqc{o^a`hbtUAm6E!oPln~vS#J3*B0g4D1)-7ZiCpA; zMXy?f@koRcm2oT}BcWBhhsJV;U)bSR^hX9^yajcC0s-Ie5sPJwbS_Cyx;(FtMD1(E zc0t(8thev)UA4}~lb;En<#qvBw~emVON^DUoWM89WYc55`kwEL%?-`UyzKkliDXxF z-QQHr*@En~rQ*y5>g}80z8&Jm3kA40!6LP2!Z)AW-8bDkPy<68NSlnYn~d-0%$B4$ zFCcifrz1>f_^)s>cwk>SD5TqN)Vx@#&}8m|7f9k|bUSGfbO{%!ag0^)I#;A+L}U~Xh@ zYNFz3|5yq9aaT~RtMi&b8r$38?F00Q#f3E-m3D-BWozR;^VA(A&9MR*C3@GM`Ol%w zOQ0hO zE>@cw$OYGkF%JgiUavLZTQG3Pq&M?8?0!4DcwXo8u$%64=V6n>!pG@lxpOe+=uLLf z;z@cjzefDPqE9mz3E^DN65YVh=kYK*JlsAsd*z|>zSQhs^Rv;qAUoQD{80OYz@_(B zy9Z(K9ra~r0YQ($gRO}2a$AW*`T68;5p$_mhi7|Y2e#ZcYg9c*E>t~lsI^M_KK86; zSH`YpA2VNCx?Xo4S^i)QYQkyMU-wYM0-WufX}kF88tdq+Y5&k6pHxIr7eM@QUC6Yo z&aKZfjm~#G+kRJ&vZQ;YO!}}C>}i7mSy2mMf1LssBxf!Nk2piXwQnN%cBcG}PLNmC z$!uMI;!r%7y}H&^TW4MR-T zus*lylu$;?DKO_6_szs5s_>K_(EKa+g{unufdlH?ffAx_>8~w4i#v85T5vWsE8BRf zk0i&EKg{r720ToJ>yHVfTOg7!kMYl?N}gv|P8t?Wqdu$MzFfs$oag!yxzZXd{E*$I zR^de(-6c??)!SvAz&xMZg24^BD!fZEXA#?-!Iy2IKP{DA$2s+V`O4d_-o}}5jcScU z(U*jcRheuJ^UVFLHf;;q-Bzs$Orteylc|)^9$#1_V_ z`|UlILXv*G=tNIgQ>pA@xxn6Xsp%Op}oT1oY|`i{(X zK#b4=D3R(`d}2_^!IhJ)ZpBp@D($Vys-GFZ;($t_SMl{@U9>6d!hRRQg1Kf$bf%si z_L(f@xwq%t>e4Zc?x^9BG7K^YwJb}HIn>YZT1}FJShW%gVj~r#dY26r95vFtvEAs< z9Ae)vqTAA?0{ybygayXRiP?|9p)0eejkT$%x3;NKQP$OO0OozF-NY`UWAQ6d##>c8 z(k#*>Ie4a{;^fLNtWQJKDwr3T7L8+$ezYedv3`)k5QDUv83(=X2FZVo{8? zL6l4lT`nOHds0EV-B~fV&=i8KAf&LRXAk=W>^b%pyqDWKs3rQ^WE#nFYdcAhj?}XU zY`C5#$&ii<&1t%cu_&SE66t)MK~;kg&V9|U4W2F+KZn~B!`xt_D0^Sv%cdJ=n?e{y z_Cu6%Mebx0lp;(}8lSOEZGc^)(F`KYnyiI^9RiEH6t9&`>#b5w?2nBBD(h586G|0j zWUA@D2;4e%Gf`eMUsZhb+;0%I8=oMf6cF&Vg0bLY9k-Ug=FXb=j=}dJXZ-NG!t-t9 zL}yl<7t~{4({407yg_{5mL}xaOu_e6#At)`b4En0!kg92iNP;jJ^E6&vH}i@cP4Kq z3;FhP>^;jw8kqO75bzA+ILdDrQ0B=-k*pH;Y}ysB^ce=_U#&CNNL2(tbK zEMQFx_p;g9Ws$U$fS}3#X{u?*ZAzlN0%Ym{kq?P&NtNoSeoR*8)AYV#3jgqu#CvVn zHx8;exQK<24cDq2+P7lI^Ej2#jR^)18Ep`5*A|%yv3^JP-09Ih7G zN|F;K=-Se?nX;w?e+Ka?UZf@H@Ve+HX#6#-sa=_~C)pNL8$gJmR(uz&WQ_ zTv19VEQ2KyTexkGu|2X=?KG&I+?vr}Y=)Z{#^EbGJ~r{^*DmFm?laMARx)jk+RtE| zYv74ZV9A@bpHYr}5m#KYV)S2$DHg}AHB=(P7CYq6h*#@KgO>T2U9MP0FW=_PDpqdC zL5%1uUa=7AX=oB~0%=fbnrrwqjV?MYBZ>kT_ zIM&8Dlti=KgM&6D1O1VI4LY@yGv`&Pu4^ZL@h-{ocud9xU8PXtZXbWw%5BWTIY$m3 zevqT*m2at6V@?7pwdJss*-o75(maHxp1mtYKTZ&LOQlpt*n5iFiNMwb_q4!_sDoZ~ zDGd=t7SGjjl_E(I3i}G`XN8HR74W^O=m-oBA|V!Qa_~6~3hzmxzx66gNs2_Vd=C_A zrOPoV+gV?2t0!=YQh_rMJ|!1Go@)N((&i#cdY`P(UpA&V0XpU#*6#5 zG$iM2m$&mgExmF^$Mfx7O1U63Ti%ye`T&ns+1$vBb#VmS=JNENfHb}4JN#fZJ6?6M zOY*%3!m3q`j_1w;yeJdVwXetNwk{XL(A11B3lQHO8(xyh*bigQrj7}t)B8X`%bMvz z@ST!86L|2`11yAbdmgS<2nfS?Dsv|C6p0@}2qe7CH10VZ0>n1zuBM=o+GHTs!ZYP( zhtZXEFK{;quugKn`$4U^7SRXW1aTsNUPI$iQjN_Wutt-c3x1n$5iknquujqxUODC6 zK)W(e-v_+*UBbUKX~RanQYzG+9xeLOxXit4ut*T3Eq7z0oQJ)MrVJD8-I=#4<)oyQ zW)lmuV?!>>kYEa57G=!ZC$eLTu(ZlY@^kC6HCX_P=8v_0|51!N(cqrtX*$_6Pt=2Z z(fA;M945M}!}T_zjmPDR$}QRXDAud{z-MKhi!~!}V3#Z!Bd{Nun^?AN#rC~U1d>zt ze>%`bzA}pFAw_<_udd9$>vJ_aY5V|R&*G`ER8!VO#)5@>5{`M51gQ+{nb%7WQKe*EGUy~all zt>uT;0t(hd-|#j@GT=>OdlxQG-SM6YV}H-zl4wq@ybXjEl)Ht9d;H@-Mjd7 zd$Y;SuNe>0^>rHAibI71P-fHtl$n*UkJq-kk}x)tvE}ekXz!3CiA=ty%Uc?M-|S9( z{_F=+?)!^z3gj2e874M{bU$A9MKC7!j4+94Xc@L+K{Trx5sG^l_2uNfXz#p73hHy{ zTmErmiZJ6sf{l4fvxrq;&yljB-1c@eq^!`rM`o-^IgV!ImVlH$B#uh+BR&y6xy)XL zdsQ6b=NoCvQI;FalPTbEEq}aXL$J3>jJAc*&THjMvfN`=LZcwPL&je5W!4GTDGt1g z6DWl#LOvAtDN!q9;kBO>_2Z3K&Q*1F*A90cck7!QCve_kvGd61C`x-`D_!5jkj~Gh zuWu&L_e&R2YA^CQacp>C)|3Ox{Y7A!cJzCuWw!0@oGIerJbGWHu*1oFrxu{;NN<%! zi3nASb9hjAQM=+HQ@7oa;O)zI5Ow&B8bQ6@;vKlqtt63__)vR2xP`fXYApLP8^y`R z1#=bOF8gXkd#-fyrS#je`*G*RO1}Sn!~zy109gKJ-6C-)NS1!2(P>GL!Aen|S#q$vym_dLE;--`pgu#4uJ5_aXUe zBW2Okq=8_bM4vS;veDm3$zRB}*ST5g$kSDG-e0PyX&l;3)vo*;-7g0jmZPJnrswp`cEXf(}@)2Uv(|eg?Kc;zI*w; z@ygb=aQE91e{#0ycXs+U)#x-Qt0=7S0MG2H7W8v*SXiF#_D%u=hb}U~Ma5=}DB`;B zlT<)+>$)xP7?OK*6^KEU8ADe>qobScZPCLzUk9Xk11Yn1A1K&*I@c211UL<(>`xfK zxcqM{|2VGl-{6EpZ!SCs!zc+3F??_fPCxu2`)8m%q1zNAZyCsf9(4HrKA7bKzlu1n z;vI8t*`)Igw11?8`tv?H!P|=$uZpm+J)-rY4w2m!soAIZTW%D*fH_>Q&{{G6A_hT) z=MjDvs{=#iG{9Z@S(p#75)@N7lNt>gdkh1V_WMFIy07r;20LOWRC)IpDUF1f(|9`< zDtf23+7hT|Grovq-UEaR${bD+aD#kr%ICGu4QvH|I*Uec4n zcTCY%vbgezXZvURa-V#f9eFwu@3!cTu zf5H1798c^|*Jl0l;;23gaG@t5FwOzP{1bAhnQ^Z62=8@8uOZtf7#tf7>)xJRIMKXE ze&)WdG&>qw-4K>Oo?I!%ifir!4GM^`K@9M_7@ggLiNi#U+`ye`jfZibKOOzq%O1~5 zu^K0)CW8)bOuLPxwAcGdtfwJOrHzdS!_+#52 zcQ#t4%MYmsZp;PwgHH@$KHW8bKU4egMYSIq2UpMbJEHB-c2u{1U1{N}I6om{6Iz(1L zkh3@tF{H`qv5<{eC%t1{(;f7^;7yZcN{cWw#-~T&+WKHfhs{e>YU$qSRKf9)l6m%m zPW4;hMSUDuj8gO09r&2~?XPhesk*o^-}1dNJ3&B}du9^fZnHqWz;HTC9L+c)Vwz0^ z5hr`z_L74DcVZcsKFz>OCS;g(Odw&Zq(XG%DP1A~q}pq&{IOVyK+X2j%}T3nD30Jm z4^=g8Dkc`*(Ns4MH?09(1OrQL2^DK(XIrXlG!jf~h~X`((uT#ThkAKe1~G_pJm_M& zYO7_To0t!^!$0c%w9lY;MkJwKy_&pWs|I0~`rlvGIGj#2$On86r`gB4b(f9Gd(Bz% zSzxXae2c-{56RN?pxfiN-SqAyI7L}VD9opXP z0*I$$4^Myi99#@usD|r+$Pb3TWPGj)e@+a}H{;2=SW@Kmg=%~MQ+Y@5~9=R>R+<>Q!{v2%v z_;3H})Y#VE^uMuFw_4!cf!Vyl#E+rz`26Y|A3Qhz&FFzh9>L$oXshy}xn(cD3g33jChB|65S@ z(9;n9Ba#2Rgx}8s{VgG`?U#hVP6qv7`v2R-eKp89u>4*z8P`>^Wo zL;n4p{BHp*Gf(~g)9(M*piv(=pPomf{RAJG1-s}!7RUdK_i^$4^*r*vUi_W+&o`Za z>;C&<{3zj<;r;%Hgx{9t-?7Ngv$~eBgn;NDhI+aV^KXG<;3@9k>O6`1hbRAiAnf-` hHUE~P==fiyJiRL@%ECNNqc{*a5Sd``q*fmJ{vUo=2W0>N literal 0 HcmV?d00001 From 01603bb5ed2c62cc81c69ee75833a98d12fcc498 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 21 Aug 2020 14:01:06 +0800 Subject: [PATCH 056/360] =?UTF-8?q?=E4=B8=8B=E7=BA=A7=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E6=8C=87=E6=95=B0=E6=8E=92=E8=A1=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java | 2 +- .../datareport/service/screen/impl/IndexServiceImpl.java | 4 ++-- .../resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java index 0ff2012301..3410d0638f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java @@ -29,5 +29,5 @@ public class SubAgencyIndexRankFormDTO implements Serializable { @NotNull(message = "默认查询名次不能为空",groups = {SubAgencyIndexRank.class}) private Integer topNum; - private String monthId; + private String yearId; } 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/screen/impl/IndexServiceImpl.java index 50fa7cf4be..4b3bb3b350 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/screen/impl/IndexServiceImpl.java @@ -120,8 +120,8 @@ public class IndexServiceImpl implements IndexService { @Override public List subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO) { LocalDate now = LocalDate.now().minusMonths(NumConstant.ONE); - String monthId = now.toString().substring(NumConstant.ZERO,NumConstant.FOUR).concat(now.toString().substring(NumConstant.FIVE,NumConstant.SEVEN)); - subAgencyIndexRankFormDTO.setMonthId(monthId); + int yearId = now.getYear(); + subAgencyIndexRankFormDTO.setYearId(String.valueOf(yearId)); List subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectSubAgencyIndexRank(subAgencyIndexRankFormDTO); if (subAgencyIndexRankResultDTOS.size() == NumConstant.ZERO){ return new ArrayList<>(); 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 78d6ced4c1..21293ad4c6 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 @@ -45,11 +45,11 @@ party_dev_ablity AS partyDevAbility, service_ablity AS serviceAbility FROM - screen_index_data_monthly + screen_index_data_yearly WHERE del_flag = '0' AND parent_id = #{agencyId} - AND month_id = #{monthId} + AND year_id = #{yearId} ORDER BY index_total DESC LIMIT #{topNum} From 6626ce3a11e9afcaa629c08159b640e0592b33d6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 21 Aug 2020 14:38:31 +0800 Subject: [PATCH 057/360] =?UTF-8?q?screen=5Fpioneer=5Fdata=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2data=5Fend=5Ftime=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/screen/ScreenPioneerDataDao.xml | 2 ++ 1 file changed, 2 insertions(+) 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 58247ff1e3..5e509c8329 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 @@ -21,5 +21,7 @@ WHERE del_flag = '0' AND org_id = #{agencyId} + ORDER BY data_end_time DESC + LIMIT 1 \ No newline at end of file From 60a45cbc1ea8c8306f15a38861a36abcc7df654b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 21 Aug 2020 16:17:33 +0800 Subject: [PATCH 058/360] =?UTF-8?q?detail=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/controller/screen/ScreenProjectController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 2718fcca1e..8c508e5eda 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 @@ -32,7 +32,7 @@ public class ScreenProjectController { * @date 2020/8/19 4:36 下午 */ @ExternalAppRequestAuth - @PostMapping("deatil") + @PostMapping("detail") public Result projectDetail(@RequestBody ProjectDetailFormDTO projectDetailFormDTO){ ValidatorUtils.validateEntity(projectDetailFormDTO, ProjectDetailFormDTO.ProjectDetail.class); return new Result().ok(screenProjectService.projectDetail(projectDetailFormDTO)); From 7fbda69ed6385127db50667d38a686871a8eda19 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 21 Aug 2020 16:29:56 +0800 Subject: [PATCH 059/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/AdvanceBranchRankResultDTO.java | 53 +++++++ .../result/GovernCapacityRankResultDTO.java | 42 ++++++ .../dto/result/GovernCapacityResultDTO.java | 41 ++++++ .../dto/result/OrgRankDataResultDTO.java | 54 ++++++++ .../dto/result/PartyUserPointResultDTO.java | 31 +++++ .../dto/result/PublicPartiChartResultDTO.java | 38 +++++ .../result/PublicPartiProfileResultDTO.java | 19 +-- .../UserJoinIndicatorGrowthRateResultDTO.java | 47 +++++++ .../dto/result/UserJoinMonthlyResultDTO.java | 25 ++++ .../dao/screen/ScreenGovernRankDataDao.java | 15 +- .../dao/screen/ScreenOrgRankDataDao.java | 16 ++- .../dao/screen/ScreenPartyBranchDataDao.java | 2 - .../screen/ScreenPartyUserRankDataDao.java | 10 ++ .../dao/screen/ScreenUserJoinDao.java | 16 ++- .../screen/GrassRootsGovernService.java | 27 +++- .../screen/PartyMemberLeadService.java | 27 +++- .../impl/GrassRootsGovernServiceImpl.java | 131 ++++++++++++++---- .../impl/PartyMemberLeadServiceImpl.java | 69 +++++++++ .../com/epmet/datareport/utils/DateUtils.java | 46 +++++- .../mapper/screen/ScreenDifficultyDataDao.xml | 1 + .../mapper/screen/ScreenGovernRankDataDao.xml | 18 +++ .../mapper/screen/ScreenOrgRankDataDao.xml | 26 ++++ .../screen/ScreenPartyUserRankDataDao.xml | 20 ++- .../mapper/screen/ScreenUserJoinDao.xml | 29 +++- .../mapper/screen/ScreenUserTotalDataDao.xml | 13 +- 25 files changed, 751 insertions(+), 65 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java new file mode 100644 index 0000000000..912aedc1df --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java @@ -0,0 +1,53 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 4、先进排行榜单-先进支部排行 返参dto + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321539 + * @ClassName AdvanceBranchRankResultDTO + * @Auth wangc + * @Date 2020-08-21 10:47 + */ +@Data +public class AdvanceBranchRankResultDTO implements Serializable { + private static final long serialVersionUID = 330099297596334388L; + + /** + * 名称 XXXX社区党委 + * */ + private String name; + + /** + * 满意度 90.64% 返回字符串,前端直接显示 + * */ + private String satisfactionRatio; + + /** + * 结案率 94.3% 返回字符串,前端直接显示 + * */ + private String closedProjectRatio; + + /** + * 党员数 + * */ + private Integer partyMemberNum; + + /** + * 支部建设 GROUP_TOTAL + * */ + private Integer branchNum; + + /** + * 议题数 + * */ + private Integer issueNum; + + /** + * 项目数 + * */ + private Integer projectNum; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java new file mode 100644 index 0000000000..318b290840 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java @@ -0,0 +1,42 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 治理能力榜单返参dto + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321627 + * @ClassName GovernCapacityRankResultDTO + * @Auth wangc + * @Date 2020-08-20 17:30 + */ +@Data +public class GovernCapacityRankResultDTO implements Serializable { + private static final long serialVersionUID = -3891870459284304022L; + + /** + * 名称 + * */ + private String agencyName; + + /** + * 响应率 + * */ + private String responseRatio; + + /** + * 解决率 + * */ + private String resolvedRatio; + + /** + * 自治率 + * */ + private String governRatio; + + /** + * 满意率 + * */ + private String satisfactionRatio; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java new file mode 100644 index 0000000000..0c96a83129 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 治理能力查询结果dto + * @ClassName GovernCapacityResultDTO + * @Auth wangc + * @Date 2020-08-20 17:24 + */ +@Data +public class GovernCapacityResultDTO implements Serializable { + private static final long serialVersionUID = -2834039644611050304L; + + /** + * 名称 + * */ + private String agencyName; + + /** + * 响应率 + * */ + private Integer responseRatio; + + /** + * 解决率 + * */ + private Integer resolvedRatio; + + /** + * 自治率 + * */ + private Integer governRatio; + + /** + * 满意率 + * */ + private Integer satisfactionRatio; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java new file mode 100644 index 0000000000..87a8d482c9 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java @@ -0,0 +1,54 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Description 党建引领-组织先进排行榜 查询结果dto + * @ClassName OrgRankDataResultDTO + * @Auth wangc + * @Date 2020-08-21 11:16 + */ +@Data +public class OrgRankDataResultDTO implements Serializable { + + private static final long serialVersionUID = -2980098512184391207L; + + /** + * 名称 XXXX社区党委 + * */ + private String name; + + /** + * 满意度 90.64% 返回字符串,前端直接显示 + * */ + private BigDecimal satisfactionRatio; + + /** + * 结案率 94.3% 返回字符串,前端直接显示 + * */ + private BigDecimal closedProjectRatio; + + /** + * 党员数 + * */ + private Integer partyMemberNum; + + /** + * 支部建设 GROUP_TOTAL + * */ + private Integer branchNum; + + /** + * 议题数 + * */ + private Integer issueNum; + + /** + * 项目数 + * */ + private Integer projectNum; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java new file mode 100644 index 0000000000..5ae10cb73e --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 党员积分查询结果 dto 作为接口【5、先进排行榜单-先进党员排行】的返参对象 NEI地址: https://nei.netease.com/interface/detail/res/?pid=57068&id=321624 + * @ClassName PartyUserPointResultDTO + * @Auth wangc + * @Date 2020-08-21 14:18 + */ +@Data +public class PartyUserPointResultDTO implements Serializable { + private static final long serialVersionUID = -288523161283142460L; + + /** + * 用户Id + * */ + private String userId; + + /** + * 用户姓名 + * */ + private String name; + + /** + * 用户积分 + * */ + private Integer point; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java new file mode 100644 index 0000000000..45f4f801ce --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java @@ -0,0 +1,38 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @ClassName PublicPartiChartResultDTO + * @Auth wangc + * @Date 2020-08-21 09:16 + */ +@Data +public class PublicPartiChartResultDTO implements Serializable { + private static final long serialVersionUID = 8366701017042226713L; + + /** + * 横坐标:近一年(不包含当前月) + * */ + private List xAxis; + + /** + * 组织次数 + * */ + private List organizeNumList; + + /** + * 参与人数 + * */ + private List joinUserNumList; + + /** + * 平均参与人次 + * */ + private List averageJoinNumList; + +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java index 48782cd02c..52a127fd77 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.screen.dto.result; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -14,34 +15,34 @@ import java.io.Serializable; public class PublicPartiProfileResultDTO implements Serializable { private static final long serialVersionUID = 2520835419152912027L; - private Integer total; + private Integer total = NumConstant.ZERO; - private String monthIncr; + private String monthIncr = ""; /** * incr上升, decr下降 * */ - private String monthTrend; + private String monthTrend = ""; - private Integer averageIssue; + private Integer averageIssue = NumConstant.ZERO; /** * 较上月百分比 * */ - private String issueCompareLastestMonth; + private String issueCompareLatestMonth = ""; /** * 较上月趋势:incr上升,decr下降 * */ - private String issueCompareLatestTrend; + private String issueCompareLatestTrend = ""; /** * 平均参与度 * */ - private Integer averageJoin; + private Integer averageJoin = NumConstant.ZERO; - private String joinCompareLatestMonth; + private String joinCompareLatestMonth = ""; - private String joinCompareLatestTrend; + private String joinCompareLatestTrend = ""; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java new file mode 100644 index 0000000000..cf870c9b18 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java @@ -0,0 +1,47 @@ +package com.epmet.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Description 用户参与各项指标以及增长查询结果dto + * @ClassName UserJoinIndicatorGrowthRateResultDTO + * @Auth wangc + * @Date 2020-08-21 16:07 + */ +@Data +public class UserJoinIndicatorGrowthRateResultDTO implements Serializable { + private static final long serialVersionUID = -8830240350298414599L; + + private Integer total; + + private BigDecimal monthIncr; + + /** + * incr上升, decr下降 + * */ + private String monthTrend; + + private Integer averageIssue; + + /** + * 较上月百分比 + * */ + private BigDecimal issueCompareLatestMonth; + + /** + * 较上月趋势:incr上升,decr下降 + * */ + private String issueCompareLatestTrend; + + /** + * 平均参与度 + * */ + private Integer averageJoin; + + private BigDecimal joinCompareLatestMonth; + + private String joinCompareLatestTrend; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java new file mode 100644 index 0000000000..b35ce13c58 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.screen.dto.result; + + +import lombok.Data; +import java.io.Serializable; + + +/** + * @Description 阅读用户参与查询返参dto screen_user_join + * @ClassName UserJoinMonthlyResultDTO + * @Auth wangc + * @Date 2020-08-21 09:20 + */ +@Data +public class UserJoinMonthlyResultDTO implements Serializable { + private static final long serialVersionUID = 4078219053108425375L; + + private String monthId; + + private Integer organizeNum; + + private Integer joinUserNum; + + private Integer averageJoinNum; +} 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/screen/ScreenGovernRankDataDao.java index 9c08e1d226..3cf167fc5e 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/screen/ScreenGovernRankDataDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.GovernCapacityResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 基层治理-治理能力排行数据 @@ -27,5 +31,14 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenGovernRankDataDao{ - + + /** + * @Description 查询政府治理能力各项指标 + * @param monthId + * @param agencyId + * @return + * @author wangc + * @date 2020.08.20 17:34 + **/ + List selectGovernCapacityRatio(@Param("monthId") String monthId,@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/ScreenOrgRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java index 6369c71ee3..fbee5cd15c 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/screen/ScreenOrgRankDataDao.java @@ -17,7 +17,11 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.OrgRankDataResultDTO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 党建引领-组织排行榜 @@ -27,5 +31,15 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ScreenOrgRankDataDao{ - + + /** + * @Description 查询指定机关的直属网格月度数据 + * @param agencyId + * @param monthId + * @return + * @author wangc + * @date 2020.08.21 13:58 + **/ + List selectGridDataMonthly(@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/ScreenPartyBranchDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java index 4d706ec55f..0117eec4a7 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/screen/ScreenPartyBranchDataDao.java @@ -53,8 +53,6 @@ public interface ScreenPartyBranchDataDao { **/ List selectBranchDataByTypeAndTimeZone(@Param("agencyId") String agencyId , @Param("type") String type, @Param("category") String category, @Param("bottomMonthId") String bottomMonthId); - List selectBranchDataByTypeOrder(String agencyId,String category,String monthId,String bottomMonthId); - /** * @Description 查询党员志愿服务 * @param agencyId 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/screen/ScreenPartyUserRankDataDao.java index 7bfb9ef83f..946ac2a096 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/screen/ScreenPartyUserRankDataDao.java @@ -17,6 +17,7 @@ package com.epmet.datareport.dao.screen; +import com.epmet.screen.dto.result.PartyUserPointResultDTO; import com.epmet.screen.dto.result.UserPointResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -41,4 +42,13 @@ public interface ScreenPartyUserRankDataDao{ **/ List selectUserPointOrder(@Param("agencyId")String agencyId); + /** + * @Description 查询指定机关所属网格的党员积分排名 + * @param agencyId + * @return + * @author wangc + * @date 2020.08.21 14:32 + **/ + List selectPartymemberPointOrder(@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/screen/ScreenUserJoinDao.java index afa7186d21..0edee635d4 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/screen/ScreenUserJoinDao.java @@ -17,10 +17,13 @@ package com.epmet.datareport.dao.screen; -import com.epmet.screen.dto.result.PublicPartiProfileResultDTO; +import com.epmet.screen.dto.result.UserJoinIndicatorGrowthRateResultDTO; +import com.epmet.screen.dto.result.UserJoinMonthlyResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 基层治理-公众参与 * @@ -37,6 +40,15 @@ public interface ScreenUserJoinDao { * @author wangc * @date 2020.08.20 15:07 **/ - PublicPartiProfileResultDTO selectUserJoinData(@Param("agencyId") String agencyId, @Param("monthId")String monthId); + UserJoinIndicatorGrowthRateResultDTO selectUserJoinData(@Param("agencyId") String agencyId, @Param("monthId")String monthId); + /** + * @Description 查询月度用户参与数据 + * @param agencyId + * @param monthId + * @return + * @author wangc + * @date 2020.08.21 09:54 + **/ + List selectUserJoinDataMonthly(@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/service/screen/GrassRootsGovernService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java index be1c6f91d7..12315295b5 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/screen/GrassRootsGovernService.java @@ -3,10 +3,7 @@ package com.epmet.datareport.service.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.DifficultProjectResultDTO; -import com.epmet.screen.dto.result.PublicPartiProfileResultDTO; -import com.epmet.screen.dto.result.PublicPartiRankResultDTO; -import com.epmet.screen.dto.result.UserPointRankResultDTO; +import com.epmet.screen.dto.result.*; import java.util.List; @@ -49,7 +46,7 @@ public interface GrassRootsGovernService { PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param); /** - * @Description 公众参与-排行榜 + * @Description 4、公众参与-排行榜 * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321978 * @param param * @return @@ -57,4 +54,24 @@ public interface GrassRootsGovernService { * @date 2020.08.20 15:32 **/ List publicPartiRank(AgencyAndNumFormDTO param); + + /** + * @Description 5、治理能力榜单 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321627 + * @param param + * @return + * @author wangc + * @date 2020.08.20 17:46 + **/ + List governCapacityRank(AgencyAndNumFormDTO param); + + /** + * @Description 6、公众参与-柱状折线图 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=322434 + * @param param + * @return + * @author wangc + * @date 2020.08.21 09:58 + **/ + PublicPartiChartResultDTO publicPartiChart(AgencyFormDTO param); } 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/screen/PartyMemberLeadService.java index 85c25ec9eb..5f781b2622 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/screen/PartyMemberLeadService.java @@ -1,11 +1,12 @@ package com.epmet.datareport.service.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.ContactMassLineChartResultDTO; -import com.epmet.screen.dto.result.FineExampleResultDTO; -import com.epmet.screen.dto.result.VolunteerServiceResultDTO; +import com.epmet.screen.dto.result.*; + +import java.util.List; /** * 党建引领相关各指标查询 @@ -38,5 +39,25 @@ public interface PartyMemberLeadService { * @date 2020/8/20 3:19 下午 */ VolunteerServiceResultDTO volunteerService(VolunteerServiceFormDTO volunteerServiceFormDTO); + + /** + * @Description 4、先进排行榜单-先进支部排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321539 + * @param param + * @return + * @author wangc + * @date 2020.08.21 11:05 + **/ + List advancedBranchRank(AgencyAndNumFormDTO param); + + /** + * @Description 5、先进排行榜单-先进党员排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321624 + * @param param + * @return List + * @author wangc + * @date 2020.08.21 14:22 + **/ + List advancedPartymemberRank(AgencyAndNumFormDTO param); } 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 c24b870023..13366615a6 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 @@ -1,10 +1,8 @@ package com.epmet.datareport.service.screen.impl; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.datareport.dao.screen.ScreenDifficultyDataDao; -import com.epmet.datareport.dao.screen.ScreenPartyUserRankDataDao; -import com.epmet.datareport.dao.screen.ScreenUserJoinDao; -import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.datareport.dao.screen.*; import com.epmet.datareport.service.screen.GrassRootsGovernService; import com.epmet.datareport.utils.DateUtils; import com.epmet.datareport.utils.ModuleConstant; @@ -12,7 +10,6 @@ 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.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -21,6 +18,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -42,6 +40,8 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { private DateUtils dateUtils; @Autowired private ScreenUserTotalDataDao screenUserTotalDataDao; + @Autowired + private ScreenGovernRankDataDao screenGovernRankDataDao; /** * @Description 1、热心市民积分排行 * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321544 @@ -78,7 +78,6 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { if(null == param.getTopNum()){ param.setTopNum(NumConstant.TWO); } - PageHelper.startPage(NumConstant.ONE,param.getTopNum()); List result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType()); if(null == result) return new ArrayList<>(); @@ -96,32 +95,19 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { **/ @Override public PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param) { + String monthId = dateUtils.getPreviousMonthId(); - PublicPartiProfileResultDTO latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId); - if(null == latest) return null; - if(null == latest.getTotal()) latest.setTotal(NumConstant.ZERO); - if(null == latest.getAverageJoin()) latest.setAverageJoin(NumConstant.ZERO); - PublicPartiProfileResultDTO previous = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), dateUtils.getPreviousMonthIdByDest(null,monthId)); - Integer preTotal ; Integer preAvgJoin ; - if(null == previous){ preTotal = NumConstant.ZERO; preAvgJoin = NumConstant.ZERO;} - preTotal = null == previous.getTotal() ? NumConstant.ZERO : previous.getTotal(); - preAvgJoin = null == previous.getAverageJoin() ? NumConstant.ZERO : previous.getAverageJoin(); - if(latest.getTotal() >= preTotal){ - latest.setMonthTrend("incr"); - latest.setMonthIncr(convertPercentStr(new BigDecimal((latest.getTotal() - preTotal)/preTotal))); - } - if(latest.getAverageJoin() >= preAvgJoin){ - latest.setJoinCompareLatestTrend("incr"); - latest.setJoinCompareLatestMonth(convertPercentStr(new BigDecimal((latest.getAverageJoin() - preAvgJoin)/preAvgJoin))); - } - latest.setAverageIssue(screenUserTotalDataDao.selectAvgIssue(param.getAgencyId())); - latest.setIssueCompareLatestTrend("incr"); - latest.setIssueCompareLastestMonth(convertPercentStr(null)); - return null; + UserJoinIndicatorGrowthRateResultDTO 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)); + result.setJoinCompareLatestMonth(convertPercentStr(latest.getJoinCompareLatestMonth(),NumConstant.ZERO)); + result.setIssueCompareLatestMonth(convertPercentStr(latest.getIssueCompareLatestMonth(),NumConstant.ZERO)); + return result; } /** - * @Description 公众参与-排行榜 + * @Description 4、公众参与-排行榜 * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321978 * @param param * @return @@ -130,7 +116,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { **/ @Override public List publicPartiRank(AgencyAndNumFormDTO param) { - + 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()); @@ -138,12 +124,99 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { return result; } + /** + * @Description 5、治理能力榜单 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321627 + * @param param + * @return + * @author wangc + * @date 2020.08.20 17:46 + **/ + @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()); + List orderList = + screenGovernRankDataDao.selectGovernCapacityRatio(dateUtils.getPreviousMonthId(),param.getAgencyId()); + if(null == orderList || orderList.isEmpty()) return new ArrayList<>(); + List result = new LinkedList<>(); + orderList.forEach(o -> { + GovernCapacityRankResultDTO rank = new GovernCapacityRankResultDTO(); + rank.setAgencyName(o.getAgencyName()); + rank.setGovernRatio(convertPercentStr(new BigDecimal(o.getGovernRatio()))); + rank.setResolvedRatio(convertPercentStr(new BigDecimal(o.getResolvedRatio()))); + rank.setResponseRatio(convertPercentStr(new BigDecimal(o.getResponseRatio()))); + rank.setSatisfactionRatio(convertPercentStr(new BigDecimal(o.getSatisfactionRatio()))); + result.add(rank); + }); + return result; + } + + /** + * @Description 6、公众参与-柱状折线图 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=322434 + * @param param + * @return + * @author wangc + * @date 2020.08.21 09:58 + **/ + @Override + public PublicPartiChartResultDTO publicPartiChart(AgencyFormDTO param) { + Map Xaxis = dateUtils.getXpro(); + List monthlyData = screenUserJoinDao.selectUserJoinDataMonthly(param.getAgencyId(),Xaxis.keySet().iterator().next()); + PublicPartiChartResultDTO result = new PublicPartiChartResultDTO(); + result.setXAxis(Xaxis.values().stream().collect(Collectors.toList())); + List defaultData = new LinkedList<>(); + for(int i = NumConstant.ZERO ; i < NumConstant.TWELVE ; i++){ + defaultData.add(NumConstant.ZERO); + } + if(null == monthlyData || monthlyData.isEmpty()){ + result.setAverageJoinNumList(defaultData); + result.setJoinUserNumList(defaultData); + result.setOrganizeNumList(defaultData); + return result; + } + result.setOrganizeNumList(new ArrayList<>()); + result.setJoinUserNumList(new ArrayList<>()); + result.setAverageJoinNumList(new ArrayList<>()); + Map> dataMap = monthlyData.stream().collect(Collectors.groupingBy(UserJoinMonthlyResultDTO :: getMonthId)); + Xaxis.keySet().stream().forEach(monthId -> { + List data = dataMap.get(monthId); + if(null == data || data.isEmpty()){ + result.getOrganizeNumList().add(NumConstant.ZERO); + result.getJoinUserNumList().add(NumConstant.ZERO); + result.getAverageJoinNumList().add(NumConstant.ZERO); + }else{ + Integer o = NumConstant.ZERO; + Integer j = NumConstant.ZERO; + Integer a = NumConstant.ZERO; + for(UserJoinMonthlyResultDTO unit : data){ + o = null == unit.getOrganizeNum() ? NumConstant.ZERO : o + unit.getOrganizeNum(); + j = null == unit.getJoinUserNum() ? NumConstant.ZERO : o + unit.getJoinUserNum(); + a = null == unit.getAverageJoinNum() ? NumConstant.ZERO : o + unit.getAverageJoinNum(); + } + result.getOrganizeNumList().add(o); + result.getJoinUserNumList().add(j); + result.getAverageJoinNumList().add(a); + } + }); + + 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; + String percentStr = percent.setScale(digits, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString(); + return percentStr.concat(ModuleConstant.SYMBOL_PERCENT); + } + } 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/screen/impl/PartyMemberLeadServiceImpl.java index f5d2704990..7dee242571 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -1,15 +1,22 @@ package com.epmet.datareport.service.screen.impl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.ConvertUtils; +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.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.github.pagehelper.PageHelper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -19,6 +26,8 @@ import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Map; +import java.math.BigDecimal; +import java.util.*; import java.util.stream.Collectors; /** @@ -36,6 +45,12 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { private ScreenPartyBranchDataDao screenPartyBranchDataDao; @Autowired private ScreenPioneerDataDao screenPioneerDataDao; + @Autowired + private ScreenOrgRankDataDao screenOrgRankDataDao; + @Autowired + private DateUtils dateUtils; + @Autowired + private ScreenPartyUserRankDataDao screenPartyUserRankDataDao; /** * @Description 1、先锋模范 @@ -150,4 +165,58 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { } return xAxis; } + + /** + * @Description 4、先进排行榜单-先进支部排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321539 + * @param param + * @return + * @author wangc + * @date 2020.08.21 11:05 + **/ + @Override + public List advancedBranchRank(AgencyAndNumFormDTO param) { + if(null == param.getTopNum()){ + param.setTopNum(NumConstant.FIVE); + }else if(NumConstant.ZERO == param.getTopNum()){ + param.setTopNum(NumConstant.MAX); + } + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List gridData = + screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),dateUtils.getPreviousMonthId()); + List result = new LinkedList<>(); + if(null == gridData || gridData.isEmpty()) return result; + gridData.forEach( data -> { + AdvanceBranchRankResultDTO o = ConvertUtils.sourceToTarget(data,AdvanceBranchRankResultDTO.class); + o.setClosedProjectRatio(convertPercentStr(data.getClosedProjectRatio())); + o.setSatisfactionRatio(convertPercentStr(data.getSatisfactionRatio())); + result.add(o); + }); + + return result; + } + + /** + * @Description 5、先进排行榜单-先进党员排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321624 + * @param param + * @return List + * @author wangc + * @date 2020.08.21 14:22 + **/ + @Override + public List advancedPartymemberRank(AgencyAndNumFormDTO param) { + if(null == param.getTopNum()) param.setTopNum(NumConstant.TEN); + PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + List result = screenPartyUserRankDataDao.selectPartymemberPointOrder(param.getAgencyId()); + if(null == result) return new ArrayList<>(); + return result; + } + + + private String convertPercentStr(BigDecimal percent){ + if(null == percent || BigDecimal.ZERO == percent) return "0.0%"; + String percentStr = percent.setScale(NumConstant.ONE, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString(); + return percentStr.concat(ModuleConstant.SYMBOL_PERCENT); + } } 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 1ead9b3a73..6db1756fdb 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 @@ -6,10 +6,10 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.stream.Collectors; /** * @Description @@ -19,6 +19,8 @@ import java.util.Map; */ @Component public class DateUtils { + private static SimpleDateFormat defaultFormat = new SimpleDateFormat("yyyyMM"); + private static DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyyMM"); /** * @Description 返回当前月以及前十一个月,升序 * @param @@ -27,11 +29,10 @@ public class DateUtils { * @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()); + String currentMonth = defaultFormat.format(calendar.getTime()); Integer monthCounter = Integer.parseInt(currentMonth); Map monthMap = new HashMap<>(); int i = NumConstant.ONE; @@ -59,6 +60,21 @@ public class DateUtils { return result; } + public Map getXpro(){ + Map xAxis = new HashMap<>(); + LocalDate today = LocalDate.now(); + + for(int i = NumConstant.TWELVE;i >= NumConstant.ONE; i--){ + LocalDate localDate = today.minusMonths(i); + String s = localDate.getMonth().getValue() + "月"; + xAxis.put(localDate.format(fmt),s); + } + Map result = Maps.newLinkedHashMap(); + xAxis.entrySet().stream().sorted(Map.Entry.comparingByKey()) + .forEachOrdered((e -> result.put(e.getKey(),e.getValue()))); + return result; + } + /** * @Description 得到上个月的monthId * @param @@ -91,4 +107,22 @@ public class DateUtils { c.add(Calendar.MONTH, NumConstant.ONE_NEG); return format.format(c.getTime()); } + + public static void main(String[] args) { + DateUtils util = new DateUtils(); + Map result = util.getXpro(); + result.forEach((k,v) -> { + System.out.print(k); + System.out.print(" -> "); + System.out.print(v); + System.out.println(); + }); + + List xLine = result.values().stream().collect(Collectors.toList()); + xLine.forEach(x -> { + System.out.println(x); + }); + + result.keySet().forEach(key -> System.out.println(key)); + } } 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 1003feb9e2..d772ebb7e2 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 @@ -26,6 +26,7 @@ AND diff.ORG_ID = #{agencyId} ORDER BY CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME DESC + WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT DESC ELSE diss.EVENT_RE_ORG DESC END 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 bfca1475ee..3fb4174055 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 @@ -3,5 +3,23 @@ + + \ No newline at end of file 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 82ef7d71dc..f83ec244d7 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 @@ -3,6 +3,32 @@ + + \ No newline at end of file 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 924b709a8b..d798990b6b 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 @@ -3,7 +3,7 @@ - + + + + + \ 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 65102879bb..cb10ed2c0e 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 @@ -3,10 +3,18 @@ - SELECT JOIN_TOTAL AS total, - AVG_JOIN_USER AS averageJoin + AVG_JOIN_USER AS averageJoin, + JOIN_TOTAL_UP_RATE AS monthIncr, + JOIN_TOTAL_UP_FLAG AS monthTrend, + AVG_ISSUE AS averageIssue, + AVG_ISSUE_UP_RATE AS issueCompareLatestMonth, + AVG_ISSUE_UP_FLAG AS issueCompareLatestTrend, + AGVG_JOIN_UP_RATE AS joinCompareLatestMonth, + AGVG_JOIN_UP_FLAG AS joinCompareLatestTrend FROM screen_user_join WHERE @@ -15,4 +23,21 @@ AND ORG_ID = #{agencyId} 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/ScreenUserTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml index 250b308f76..34a19f1eb2 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 @@ -50,8 +50,8 @@ \ No newline at end of file From 55dcd6f89bc8849b08f40225cf8ed5d83f585604 Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 21 Aug 2020 16:59:45 +0800 Subject: [PATCH 060/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/GrassRootsGovernController.java | 94 +++++++++++++++++++ .../screen/GrassrootsPartyDevController.java | 55 ++++++++++- .../screen/PartyMemberLeadController.java | 40 ++++++-- 3 files changed, 182 insertions(+), 7 deletions(-) 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 f5400c31ed..325c4606c8 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,8 +1,21 @@ 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 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; + /** * 基层治理相关各指标查询 * @@ -12,4 +25,85 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/screen/grassrootsgovern") public class GrassRootsGovernController { + + @Autowired + private GrassRootsGovernService grassRootsGovernService; + + + + /** + * @Description 1、热心市民积分排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321544 + * @param param + * @return + * @author wangc + * @date 2020.08.20 11:16 + **/ + @ExternalAppRequestAuth + @PostMapping("userpointrank") + public Result userPointRank(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result().ok(grassRootsGovernService.userPointRank(param)); + } + + /** + * @Description 2、难点赌点-耗时最长|涉及部门最多|处理次数 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321614 + * @param param + * @return + * @author wangc + * @date 2020.08.20 13:55 + **/ + @ExternalAppRequestAuth + @PostMapping("difficultprojects") + public Result> difficultProject(@RequestBody AgencyNumTypeParamFormDTO param){ + ValidatorUtils.validateEntity(param, AgencyNumTypeParamFormDTO.AgencyNumTypeParamGroup.class); + return new Result>().ok(grassRootsGovernService.difficultProject(param)); + } + + /** + * @Description 3、公众参与概况 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321975 + * @param param + * @return + * @author wangc + * @date 2020.08.20 14:37 + **/ + @ExternalAppRequestAuth + @PostMapping("publicpartiprofile") + public Result publicPartiProfile(@RequestBody AgencyFormDTO param){ + ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result().ok(grassRootsGovernService.publicPartiProfile(param)); + } + + /** + * @Description 4、公众参与-排行榜 + * @NEI https://nei.netease.com/interface/detail/?pid=57068&id=321978 + * @param param + * @return + * @author wangc + * @date 2020.08.20 15:32 + **/ + @ExternalAppRequestAuth + @PostMapping("publicpartirank") + public Result> publicPartiRank(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result>().ok(grassRootsGovernService.publicPartiRank(param)); + } + + /** + * @Description 5、治理能力榜单 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321627 + * @param param + * @return + * @author wangc + * @date 2020.08.20 17:46 + **/ + @ExternalAppRequestAuth + @PostMapping("governcapacityrank") + public Result> governCapacityRank(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result>().ok(grassRootsGovernService.governCapacityRank(param)); + } + } 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 d5934455bb..4aaac7a152 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,13 +1,20 @@ 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.dao.screen.ScreenUserTotalDataDao; 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 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; @@ -32,10 +39,56 @@ public class GrassrootsPartyDevController { * @author wangc * @date 2020.08.18 16:59 **/ + @ExternalAppRequestAuth @PostMapping("basicinfo") - Result partymemberBaseInfo(ParymemberFormDTO param){ + public Result baseInfo(@RequestBody ParymemberFormDTO param){ ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class); return new Result().ok(grassrootsPartyDevService.partymemberBaseInfo(param)); } + /** + * @Description 2、党员基本情况-年龄分布 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321980 + * @param param + * @return + * @author wangc + * @date 2020.08.18 17:54 + **/ + @ExternalAppRequestAuth + @PostMapping("ageinfo") + public Result ageInfo(@RequestBody ParymemberFormDTO param){ + ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class); + return new Result().ok(grassrootsPartyDevService.partymemberAgeDistribution(param)); + } + + /** + * @Description 3、支部建设情况|联建共建情况-折线图 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321981 + * @param param + * @return BranchBuildTrendResultDTO + * @author wangc + * @date 2020.08.19 11:02 + **/ + @ExternalAppRequestAuth + @PostMapping("branchbuildtrend") + public Result branchBuildTrend(@RequestBody BranchBuildTrendFormDTO param){ + ValidatorUtils.validateEntity(param, BranchBuildTrendFormDTO.branchBuildTrendGroup.class); + return new Result().ok(grassrootsPartyDevService.branchBuildTrend(param)); + } + + /** + * @Description 4、支部建设情况|联建共建情况-排行 + * @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321982 + * @param param + * @return + * @author wangc + * @date 2020.08.19 15:25 + **/ + @ExternalAppRequestAuth + @PostMapping("branchbuildrank") + public Result branchBuildRank(@RequestBody BranchBuildRankFormDTO param){ + ValidatorUtils.validateEntity(param, BranchBuildRankFormDTO.BranchBuildRankGroup.class); + return new Result().ok(grassrootsPartyDevService.branchBuildRank(param)); + } + } 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 1401a7f036..5478956a32 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 @@ -4,18 +4,16 @@ 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.ContactMassLineChartFormDTO; -import com.epmet.screen.dto.form.FineExampleFormDTO; -import com.epmet.screen.dto.form.VolunteerServiceFormDTO; -import com.epmet.screen.dto.result.ContactMassLineChartResultDTO; -import com.epmet.screen.dto.result.FineExampleResultDTO; -import com.epmet.screen.dto.result.VolunteerServiceResultDTO; +import com.epmet.screen.dto.form.*; +import com.epmet.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * 党建引领相关各指标查询 * @@ -68,4 +66,34 @@ public class PartyMemberLeadController { return new Result().ok(partyMemberLeadService.volunteerService(volunteerServiceFormDTO)); } + /** + * @Description 4、先进排行榜单-先进支部排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321539 + * @param param + * @return + * @author wangc + * @date 2020.08.21 11:05 + **/ + @ExternalAppRequestAuth + @PostMapping("advancedbranchrank") + Result> advancedBranchRank(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result>().ok(partyMemberLeadService.advancedBranchRank(param)); + } + + /** + * @Description 5、先进排行榜单-先进党员排行 + * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321624 + * @param param + * @return List + * @author wangc + * @date 2020.08.21 14:22 + **/ + @ExternalAppRequestAuth + @PostMapping("advancedpartymemberrank") + Result> advancedPartymemberRank(@RequestBody AgencyAndNumFormDTO param){ + ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class); + return new Result>().ok(partyMemberLeadService.advancedPartymemberRank(param)); + } + } From 74b76f67a57625186cae33a8e313439cdd55a4db Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 21 Aug 2020 18:23:11 +0800 Subject: [PATCH 061/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86api=20=20=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/CompareConstant.java | 26 ++++ .../screencoll/form/CpcBaseDataFormDTO.java | 5 + .../form/CustomerAgencyFormDTO.java | 5 + .../screencoll/form/CustomerDeptFormDTO.java | 5 + .../screencoll/form/CustomerGridFormDTO.java | 5 + .../form/DifficultyDataFormDTO.java | 11 ++ .../dto/screencoll/form/EventDataFormDTO.java | 5 + .../form/IndexDataMonthlyFormDTO.java | 9 +- .../form/IndexDataYearlyFormDTO.java | 9 +- .../form/PartyLinkMassesDataFormDTO.java | 6 + .../form/PartyUserRankDataFormDTO.java | 38 +++--- .../screencoll/form/PioneerDataFormDTO.java | 5 + .../dto/screencoll/form/UserJoinFormDTO.java | 20 ++-- .../screencoll/form/UserTotalDataFormDTO.java | 15 +++ .../screen/ScreenPartyUserRankDataDao.java | 13 +- .../epmet/dao/screen/ScreenUserJoinDao.java | 19 ++- .../entity/screen/ScreenUserJoinEntity.java | 2 +- .../service/screen/ScreenCollService.java | 2 +- .../screen/impl/ScreenCollServiceImpl.java | 113 ++++++++++++++++-- .../V0.0.3__update_col_data_type.sql | 3 - .../mapper/screen/ScreenCpcBaseDataDao.xml | 2 + .../mapper/screen/ScreenCustomerAgencyDao.xml | 6 +- .../mapper/screen/ScreenCustomerDeptDao.xml | 6 +- .../mapper/screen/ScreenCustomerGridDao.xml | 6 +- .../mapper/screen/ScreenDifficultyDataDao.xml | 8 +- .../mapper/screen/ScreenEventDataDao.xml | 6 +- .../screen/ScreenPartyLinkMassesDataDao.xml | 6 +- .../screen/ScreenPartyUserRankDataDao.xml | 32 +++-- .../mapper/screen/ScreenPioneerDataDao.xml | 10 +- .../mapper/screen/ScreenUserJoinDao.xml | 48 ++++++-- .../mapper/screen/ScreenUserTotalDataDao.xml | 6 + 31 files changed, 358 insertions(+), 94 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CompareConstant.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__update_col_data_type.sql diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CompareConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CompareConstant.java new file mode 100644 index 0000000000..119cd1ca31 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/CompareConstant.java @@ -0,0 +1,26 @@ +package com.epmet.constant; + +/** + * 比较结果常量 + * + * @author yujintao + * @email yujintao@elink-cn.com + * @date 2019/8/19 10:28 + */ +public interface CompareConstant { + + /** + * 增加 + */ + String INCR_STR = "incr"; + + /** + * 下降 + */ + String DECR_STR = "decr"; + + /** + * 相等 + */ + String EQ_STR = "eq"; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java index 3ff8c4446a..ee1674ce96 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataFormDTO.java @@ -78,4 +78,9 @@ public class CpcBaseDataFormDTO implements Serializable { * 60+岁 */ private Integer ageLevel6; + + /** + * 数据更新至: 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/CustomerAgencyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java index de5dc8abdd..cebf258d31 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyFormDTO.java @@ -63,4 +63,9 @@ public class CustomerAgencyFormDTO implements Serializable { * 行政地区编码 */ private String areaCode; + + /** + * 数据更新至: 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/CustomerDeptFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java index 19f5f3fecd..a99713701a 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptFormDTO.java @@ -43,4 +43,9 @@ public class CustomerDeptFormDTO implements Serializable { * 部门所在位置 */ private String deptMark; + + /** + * 数据更新至: 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/CustomerGridFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java index 8935eaa156..38094a105a 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java @@ -43,4 +43,9 @@ public class CustomerGridFormDTO implements Serializable { * 党支部的位置!!! */ private String partyMark; + + /** + * 数据更新至: 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/DifficultyDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java index 14ef258fb8..7d136c4b27 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java @@ -88,4 +88,15 @@ public class DifficultyDataFormDTO implements Serializable { * 最近一次操作说明 eg: 转项目,结案,流转 */ private String latestOperateDesc; + + /** + * 事件被处理次数(08-21新增) + */ + private Integer eventHandledCount; + + + /** + * 数据更新至: 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/EventDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java index 5be17787cf..21e8ee718e 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java @@ -116,4 +116,9 @@ public class EventDataFormDTO implements Serializable { * 最近一次操作说明 eg: 转项目,结案,流转 */ private String latestOperateDesc; + + /** + * 数据更新至: yyyy|yyyMM|yyyyMMdd 8.21增加字段 + */ + private String dataEndTime; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java index 9c9ca798a5..c27f75db87 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.screencoll.form; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; /** * 1、指数_按月统计 入参 @@ -47,20 +48,20 @@ public class IndexDataMonthlyFormDTO implements Serializable { /** * 总指数 */ - private Integer indexTotal; + private BigDecimal indexTotal; /** * 党建能力指数 */ - private Integer partyDevAblity; + private BigDecimal partyDevAblity; /** * 服务能力指数 */ - private Integer serviceAblity; + private BigDecimal serviceAblity; /** * 治理能力指数 */ - private Integer governAblity; + private BigDecimal governAblity; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java index bd360a63fa..4eafd27be7 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataYearlyFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.screencoll.form; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; /** * 17、指数_按年统计 入参 @@ -42,20 +43,20 @@ public class IndexDataYearlyFormDTO implements Serializable { /** * 总指数 */ - private Integer indexTotal; + private BigDecimal indexTotal; /** * 党建能力指数 */ - private Integer partyDevAblity; + private BigDecimal partyDevAblity; /** * 服务能力指数 */ - private Integer serviceAblity; + private BigDecimal serviceAblity; /** * 治理能力指数 */ - private Integer governAblity; + private BigDecimal governAblity; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java index 8d1ae654a9..c57728d3fc 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataFormDTO.java @@ -43,4 +43,10 @@ public class PartyLinkMassesDataFormDTO implements Serializable { * 群成员总数 */ private Integer groupUserTotal; + + /** + * 数据更新至: 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/PartyUserRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java index b4e3884dae..29b35aa147 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java @@ -7,7 +7,7 @@ import java.io.Serializable; /** * 9、党建引领|基层治理-居民(党员)积分排行榜 入参 * @Auther: zhangyong - * @Date: 2020-08-18 09:59 + * @Date: 2020-08-21 09:59 */ @Data public class PartyUserRankDataFormDTO implements Serializable { @@ -15,39 +15,39 @@ public class PartyUserRankDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; /** - * 年Id :yyyy + * 数据更新至: yyyy|yyyyMM|yyyyMMdd */ - private String yearId; + private String dataEndTime; /** - * 月份Id :yyyyMM + * 组织类别 agency:组织;部门:department;网格:grid */ - private String monthId; + private String orgType; /** - * 组织类别 agency:组织;部门:department;网格:grid + * 用户所属网格id */ - private String orgType; + private String gridId; /** - * 组织Id 可以为网格,机关id + * 用户所属网格名称 */ - private String orgId; + private String gridName; /** - * 上级组织Id + * 网格所属的组织id */ - private String parentId; + private String orgId; /** - * 组织名称 + * 网格所属的组织名称 */ private String orgName; /** - * 用户身份 party:党员;resi:居民 + * 是否是党员标志:1是。0不是党员 */ - private String userType; + private String partyFlag; /** * 用户Id @@ -63,4 +63,14 @@ public class PartyUserRankDataFormDTO implements Serializable { * 用户积分 */ private Integer pointTotal; + + /** + * 姓 + */ + private String surname; + + /** + * 名 + */ + private String name; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java index 0efe2ff448..7e79fce0b8 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataFormDTO.java @@ -85,4 +85,9 @@ public class PioneerDataFormDTO implements Serializable { * 党员发布议题占比 */ private BigDecimal publishIssueRatio; + + /** + * 数据更新至: 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/UserJoinFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java index 48802ff6d1..9abd6012d6 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinFormDTO.java @@ -35,27 +35,27 @@ public class UserJoinFormDTO implements Serializable { private String orgName; /** - * 组织次数 + * 年Id :yyyy */ - private Integer organizeTotal; + private String yearId; /** - * 参与次数 + * 月份Id :yyyyMM */ - private Integer joinTotal; + private String monthId; /** - * 平均参与人数 + * 人均议题 */ - private Integer avgJoinUser; + private Integer avgIssue; /** - * 年Id :yyyy + * 总的参与次数 */ - private String yearId; + private Integer joinTotal; /** - * 月份Id :yyyyMM + * 平均参与度 */ - private String monthId; + private Integer avgJoin; } 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 42722f7111..14f4df673d 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 @@ -63,4 +63,19 @@ public class UserTotalDataFormDTO implements Serializable { * 项目总数 */ private Integer projectTotal; + + /** + * 数据更新至: 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/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java index de25a82b88..9e43669618 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java @@ -36,25 +36,24 @@ public interface ScreenPartyUserRankDataDao extends BaseDao { + /** + * 11、基层治理-公众参与 + * 0) 查询上月的基础数据,可用来计算本月的增长率 + * @param customerId + * @param yearId + * @param monthId + * @param orgIds 组织Id集合 + * @return java.util.List + * @Author zhangyong + * @Date 14:46 2020-08-21 + **/ + List selectLastMonthScreenUserJoinList(@Param("customerId") String customerId, + @Param("yearId") String yearId, + @Param("monthId") String monthId, + @Param("orgIds") String[] orgIds); + /** * 11、基层治理-公众参与 * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 @@ -59,5 +74,5 @@ public interface ScreenUserJoinDao extends BaseDao { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void batchInsertUserJoin(@Param("list") List list, @Param("customerId")String customerId); + void batchInsertUserJoin(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java index d67593a2f4..8a2009d9ca 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java @@ -77,7 +77,7 @@ public class ScreenUserJoinEntity extends BaseEpmetEntity { /** * 总的参与次数 */ - private String joinTotal; + private Integer joinTotal; /** * 总的参与次数较上月增长率(采集的时候后台自己计算) 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 8ee702178d..6ce2d9c3c8 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 @@ -14,7 +14,7 @@ public interface ScreenCollService { /** * 9、党建引领|基层治理-居民(党员)积分排行榜 - * 1) 根据CUSTOMER_ID、YEAR_ID、MONTH_ID、ORG_ID进行查询,如果有数据,则先进行物理删除 + * 1) 根据CUSTOMER_ID、GRID_ID、USER_ID进行查询,如果有数据,则先进行物理删除 * 2) 在新增 * * @param 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 899ebac605..bd277c3823 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 @@ -18,15 +18,21 @@ package com.epmet.service.screen.impl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.CompareConstant; import com.epmet.dao.screen.*; import com.epmet.dto.screencoll.form.*; import com.epmet.entity.screen.ScreenEventImgDataEntity; +import com.epmet.entity.screen.ScreenUserJoinEntity; import com.epmet.service.screen.ScreenCollService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Calendar; import java.util.List; /** @@ -76,14 +82,11 @@ public class ScreenCollServiceImpl implements ScreenCollService { @Transactional(rollbackFor = Exception.class) public void insertPartyUserRankData(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(); + screenPartyUserRankDataDao.deletePartyUserRankData(customerId, + formDTO.get(NumConstant.ZERO).getGridId(), + formDTO.get(NumConstant.ZERO).getUserId()); } - screenPartyUserRankDataDao.deletePartyUserRankData(customerId, - formDTO.get(NumConstant.ZERO).getYearId(), - formDTO.get(NumConstant.ZERO).getMonthId(), - orgIds); screenPartyUserRankDataDao.batchInsertPartyUserRankData(formDTO,customerId); } @@ -309,7 +312,103 @@ public class ScreenCollServiceImpl implements ScreenCollService { formDTO.get(NumConstant.ZERO).getMonthId(), orgIds); - screenUserJoinDao.batchInsertUserJoin(formDTO, customerId); + String[] lastMonth = this.lastMonthDate(); + // 获取上个月的基本数据 + List lastMonthJoinList = screenUserJoinDao.selectLastMonthScreenUserJoinList(customerId, + lastMonth[NumConstant.ZERO], + lastMonth[NumConstant.ONE], + orgIds); + + // 定义本月待添加数据的集合 + List curMonthJoinEntityList = new ArrayList<>(); + // 增加率计算 + if (null != lastMonthJoinList && lastMonthJoinList.size() > NumConstant.ZERO){ + // 存在上个月的数据 (本月-上月)/上月 *100 + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + for (int j = NumConstant.ZERO; j < lastMonthJoinList.size(); j++){ + if (formDTO.get(i).getOrgId().equals(lastMonthJoinList.get(j).getOrgId())){ + ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(formDTO.get(i), ScreenUserJoinEntity.class); + entity.setJoinTotalUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getJoinTotal(), formDTO.get(j).getJoinTotal())); + entity.setJoinTotalUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getJoinTotal(), formDTO.get(j).getJoinTotal())); + entity.setAvgIssueUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getAvgIssue(), formDTO.get(j).getAvgIssue())); + entity.setAvgIssueUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getAvgIssue(), formDTO.get(j).getAvgIssue())); + entity.setAgvgJoinUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getAvgJoin(), formDTO.get(j).getAvgJoin())); + entity.setAgvgJoinUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getAvgJoin(), formDTO.get(j).getAvgJoin())); + curMonthJoinEntityList.add(entity); + } + } + } + } else { + // 计算增长率后的 待新增数据 + BigDecimal zero = new BigDecimal(NumConstant.ZERO); + // 不存在上个月的数据 + for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ + ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(formDTO.get(i), ScreenUserJoinEntity.class); + entity.setJoinTotalUpRate(zero); + entity.setJoinTotalUpFlag(""); + entity.setAvgIssueUpRate(zero); + entity.setAvgIssueUpFlag(""); + entity.setAgvgJoinUpRate(zero); + entity.setAgvgJoinUpFlag(""); + curMonthJoinEntityList.add(entity); + } + } + screenUserJoinDao.batchInsertUserJoin(curMonthJoinEntityList, customerId); + } + } + + /** + * 获取当前日期的前一个月的日期 + * @param + * @return java.lang.String[] + * @Author zhangyong + * @Date 15:33 2020-08-21 + **/ + private String[] lastMonthDate(){ + String[] date = new String[NumConstant.TWO]; + //Java获取当前日期的前一个月的日期 + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.MONTH, NumConstant.ONE_NEG); + int year = calendar.get(Calendar.YEAR); + int month = calendar.get(Calendar.MONTH) + NumConstant.ONE; + date[NumConstant.ZERO] = String.valueOf(year); + date[NumConstant.ONE] = String.valueOf(month);; + if (NumConstant.TEN >= month){ + date[NumConstant.ONE] = NumConstant.ZERO_STR + month; + } + return date; + } + + /** + * 计算 本月数值 相较于 上月数值,的增长率 + * + * @param old 上月数值 + * @param now 本月数值 + * @return java.math.BigDecimal + * @Author zhangyong + * @Date 15:38 2020-08-21 + **/ + private BigDecimal calculateGrowthRateNumber(Integer old, Integer now){ + int number = (now - old) / old * NumConstant.ONE_HUNDRED; + return new BigDecimal(number); + } + + /** + * 计算 本月数值 相较于 上月数值,的增长率, 得出标识 + * + * @param old 上月数值 + * @param now 本月数值 + * @return java.util.String + * @Author zhangyong + * @Date 15:38 2020-08-21 + **/ + private String calculateGrowthRateFlag(Integer old, Integer now){ + if (old > now){ + return CompareConstant.DECR_STR; + } else if (old < now){ + return CompareConstant.INCR_STR; + } else { + return CompareConstant.EQ_STR; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__update_col_data_type.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__update_col_data_type.sql deleted file mode 100644 index 05b34b4833..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__update_col_data_type.sql +++ /dev/null @@ -1,3 +0,0 @@ -alter table fact_index_party_ablity_org_monthly MODIFY column DATA_TYPE VARCHAR(100) DEFAULT '' COMMENT '数据类型 allRegion:全区;community:社区;street:街道'; -alter table fact_index_service_ablity_org_monthly MODIFY column DATA_TYPE VARCHAR(100) DEFAULT '' COMMENT '数据类型 allRegion:全区;community:社区;street:街道'; -alter table fact_index_govrn_ablity_org_monthly MODIFY column DATA_TYPE VARCHAR(100) DEFAULT '' COMMENT '数据类型 allRegion:全区;community:社区;street:街道'; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml index a0adcc3b70..7f8ddaf4f0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml @@ -21,6 +21,7 @@ ORG_ID, PARENT_ID, ORG_NAME, + DATA_END_TIME, REGISTER_USER_COUNT, RESI_TOTAL, PARTY_MEMBER_COUNT, @@ -45,6 +46,7 @@ #{item.orgId}, #{item.parentId}, #{item.orgName}, + #{item.dataEndTime}, #{item.registerUserCount}, #{item.resiTotal}, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index 923a8410f0..a9c6911a70 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -32,7 +32,8 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + DATA_END_TIME ) values ( @@ -53,7 +54,8 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.dataEndTime} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml index 627b3b39c1..a3fedbf4d5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml @@ -28,7 +28,8 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + DATA_END_TIME ) values ( @@ -45,7 +46,8 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.dataEndTime} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 7a36507ce7..5381e9ddd2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -28,7 +28,8 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + DATA_END_TIME ) values ( @@ -45,7 +46,8 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.dataEndTime} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index 11451dc3ae..e26c43115c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -23,6 +23,7 @@ EVENT_CONTENT, EVENT_COST_TIME, EVENT_RE_ORG, + EVENT_HANDLED_COUNT, EVENT_CATEGORY_CODE, EVENT_CATEGORY_NAME, EVENT_STATUS_CODE, @@ -33,7 +34,8 @@ CREATED_TIME, UPDATED_BY, UPDATED_TIME, - LATEST_OPERATE_DESC + LATEST_OPERATE_DESC, + DATA_END_TIME ) values ( @@ -49,6 +51,7 @@ #{item.eventContent}, #{item.eventCostTime}, #{item.eventReOrg}, + #{item.eventHandledCount}, #{item.eventCategoryCode}, #{item.eventCategoryName}, #{item.eventStatusCode}, @@ -59,7 +62,8 @@ now(), 'APP_USER', now(), - #{item.latestOperateDesc} + #{item.latestOperateDesc}, + #{item.dataEndTime} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml index 1df8e0a068..be95b118df 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -37,7 +37,8 @@ UPDATED_TIME, EVENT_STATUS_CODE, EVENT_STATUS_DESC, - LATEST_OPERATE_DESC + LATEST_OPERATE_DESC, + DATA_END_TIME ) values ( @@ -67,7 +68,8 @@ now(), #{item.eventStatusCode}, #{item.eventStatusDesc}, - #{item.latestOperateDesc} + #{item.latestOperateDesc}, + #{item.dataEndTime} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml index 01a63f3a53..d317d97ee9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml @@ -28,7 +28,8 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + DATA_END_TIME ) values ( @@ -45,7 +46,8 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.dataEndTime} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 1de992bd4d..070e952878 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -5,11 +5,7 @@ delete from screen_party_user_rank_data - where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} - AND ORG_ID IN - - #{item} - + where CUSTOMER_ID = #{customerId} AND GRID_ID = #{gridId} AND USER_ID = #{userId} @@ -17,14 +13,14 @@ ( ID, CUSTOMER_ID, - YEAR_ID, - MONTH_ID, - ORG_TYPE, + GRID_ID, + GRID_NAME, ORG_ID, - PARENT_ID, ORG_NAME, - USER_TYPE, + PARTY_FLAG, USER_ID, + SURNAME, + `NAME`, USER_NAME, POINT_TOTAL, DEL_FLAG, @@ -32,20 +28,21 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + DATA_END_TIME ) values ( (SELECT REPLACE(UUID(), '-', '') AS id), #{customerId}, - #{item.yearId}, - #{item.monthId}, - #{item.orgType}, + #{item.gridId}, + #{item.gridName}, #{item.orgId}, - #{item.parentId}, #{item.orgName}, - #{item.userType}, + #{item.partyFlag}, #{item.userId}, + #{item.surname}, + #{item.name}, #{item.userName}, #{item.pointTotal}, 0, @@ -53,7 +50,8 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.dataEndTime} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml index c140b7d3f3..8142176bee 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml @@ -30,13 +30,14 @@ ISSUE_RATIO, TOPIC_RATIO, SHIFT_PROJECT_RATIO, - RESOLVED_PROJECT_TOTAL_RATIO, + RESOLVED_PROJECT_RATIO, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + DATA_END_TIME ) values ( @@ -52,17 +53,18 @@ #{item.shiftProjectTotal}, #{item.resolvedProjectTotal}, + #{item.publishIssueRatio}, #{item.issueRatio}, #{item.topicRatio}, #{item.shiftProjectRatio}, #{item.resolvedProjectRatio}, - #{item.publishIssueRatio}, 0, 0, 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.dataEndTime} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml index db7b626e27..9751293f5f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -3,6 +3,23 @@ + + delete from screen_user_join where CUSTOMER_ID = #{customerId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} @@ -17,15 +34,21 @@ ( ID, CUSTOMER_ID, - YEAR_ID, - MONTH_ID, ORG_TYPE, ORG_ID, PARENT_ID, ORG_NAME, - ORGANIZE_TOTAL, + YEAR_ID, + MONTH_ID, JOIN_TOTAL, - AVG_JOIN_USER, + JOIN_TOTAL_UP_RATE, + JOIN_TOTAL_UP_FLAG, + AVG_ISSUE, + AVG_ISSUE_UP_RATE, + AVG_ISSUE_UP_FLAG, + AVG_JOIN, + AGVG_JOIN_UP_RATE, + AGVG_JOIN_UP_FLAG, DEL_FLAG, REVISION, CREATED_BY, @@ -37,15 +60,24 @@ ( (SELECT REPLACE(UUID(), '-', '') AS id), #{customerId}, - #{item.yearId}, - #{item.monthId}, #{item.orgType}, #{item.orgId}, #{item.parentId}, #{item.orgName}, - #{item.organizeTotal}, + #{item.yearId}, + #{item.monthId}, + #{item.joinTotal}, - #{item.avgJoinUser}, + #{item.joinTotalUpRate}, + #{item.joinTotalUpFlag}, + + #{item.avgIssue}, + #{item.avgIssueUpRate}, + #{item.avgIssueUpFlag}, + + #{item.avgJoin}, + #{item.agvgJoinUpRate}, + #{item.agvgJoinUpFlag}, 0, 0, 'APP_USER', 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 a582bedbb7..a3f29dd5a6 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 @@ -21,12 +21,15 @@ ORG_ID, PARENT_ID, ORG_NAME, + DATA_END_TIME, USER_TOTAL, PARTY_TOTAL, GROUP_TOTAL, TOPIC_TOTAL, ISSUE_TOTAL, PROJECT_TOTAL, + REG_USER_TOTAL, + JOIN_USER_TOTAL, DEL_FLAG, REVISION, CREATED_BY, @@ -42,12 +45,15 @@ #{item.orgId}, #{item.parentId}, #{item.orgName}, + #{item.dataEndTime}, #{item.userTotal}, #{item.partyTotal}, #{item.groupTotal}, #{item.topicTotal}, #{item.issueTotal}, #{item.projectTotal}, + #{item.regUserTotal}, + #{item.joinUserTotal}, 0, 0, 'APP_USER', From 935a1296efbc2c663ba56fe478259c0e06e03b9b Mon Sep 17 00:00:00 2001 From: wangchao Date: Fri, 21 Aug 2020 18:25:53 +0800 Subject: [PATCH 062/360] ext govorg user +1 --- .../epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-ext/epmet-ext-server/pom.xml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-org/gov-org-server/pom.xml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml index e733e25d1b..3dbed877f2 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-ext-server: container_name: epmet-ext-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-ext-server:0.0.4 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-ext-server:0.0.5 ports: - "8113:8113" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-ext/epmet-ext-server/pom.xml b/epmet-module/epmet-ext/epmet-ext-server/pom.xml index fe31340f73..9baa7fbb51 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/pom.xml +++ b/epmet-module/epmet-ext/epmet-ext-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.4 + 0.0.5 com.epmet diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml index 080702e2ab..952b5c665f 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.86 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.87 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index b082115778..52560b39e2 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.86 + 0.3.87 com.epmet gov-org diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index b7e4db73ed..7f1bcc84c1 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.120 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.121 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 9bca6edc9e..8c0cb5aac6 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.120 + 0.3.121 com.epmet epmet-user From f9e1a07e7c60e53a96b6f016e088e9686301f03e Mon Sep 17 00:00:00 2001 From: wxz Date: Sun, 23 Aug 2020 00:06:45 +0800 Subject: [PATCH 063/360] =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90-=E6=94=AF=E6=8C=81=E5=8F=82=E6=95=B0=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E6=8C=87=E5=AE=9A=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-commons-dynamic-datasource/pom.xml | 6 +++ .../datasource/aspect/DataSourceAspect.java | 48 +++++++------------ .../datasource/config/DynamicDataSource.java | 8 +++- .../datasource/enums/DataSourceEnum.java | 43 +++++++++++++++++ .../util/AbstractDataSourceNameFetcher.java | 13 +++++ .../HttpRequestDataSourceNameFetcher.java | 44 +++++++++++++++++ .../epmet/constant/DataSourceConstant.java | 1 + .../com/epmet/controller/DemoController.java | 17 +++++++ .../stats/impl/DimAgencyServiceImpl.java | 3 ++ .../src/main/resources/bootstrap.yml | 10 ++++ .../resources/mapper/stats/DimAgencyDao.xml | 1 + 11 files changed, 163 insertions(+), 31 deletions(-) create mode 100644 epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java create mode 100644 epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/util/AbstractDataSourceNameFetcher.java create mode 100644 epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/util/HttpRequestDataSourceNameFetcher.java diff --git a/epmet-commons/epmet-commons-dynamic-datasource/pom.xml b/epmet-commons/epmet-commons-dynamic-datasource/pom.xml index 07f98a0b56..efb328a391 100644 --- a/epmet-commons/epmet-commons-dynamic-datasource/pom.xml +++ b/epmet-commons/epmet-commons-dynamic-datasource/pom.xml @@ -19,6 +19,12 @@ 2.0.0 provided + + + org.springframework.boot + spring-boot-starter-web + provided + diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/aspect/DataSourceAspect.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/aspect/DataSourceAspect.java index 45113847c6..080bda7565 100644 --- a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/aspect/DataSourceAspect.java +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/aspect/DataSourceAspect.java @@ -9,8 +9,8 @@ package com.epmet.commons.dynamic.datasource.aspect; import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.commons.dynamic.datasource.bean.DataSourceParam; import com.epmet.commons.dynamic.datasource.config.DynamicContextHolder; +import com.epmet.commons.dynamic.datasource.util.HttpRequestDataSourceNameFetcher; import org.apache.commons.lang3.StringUtils; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; @@ -19,12 +19,12 @@ import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import java.lang.reflect.Method; -import java.lang.reflect.Parameter; /** * 多数据源,切面处理类 @@ -38,6 +38,9 @@ import java.lang.reflect.Parameter; public class DataSourceAspect { protected Logger logger = LoggerFactory.getLogger(getClass()); + @Autowired + private HttpRequestDataSourceNameFetcher httpRequestDataSourceNameFetcher; + @Pointcut("@annotation(com.epmet.commons.dynamic.datasource.annotation.DataSource) " + "|| @within(com.epmet.commons.dynamic.datasource.annotation.DataSource)") public void dataSourcePointCut() { @@ -55,12 +58,14 @@ public class DataSourceAspect { if(targetDataSource != null || methodDataSource != null){ String value; if(methodDataSource != null){ - value = getDatasourceName(methodDataSource, signature.getMethod().getParameters(), point.getArgs()); + value = getDatasourceName(methodDataSource); }else { - value = getDatasourceName(targetDataSource, signature.getMethod().getParameters(), point.getArgs()); + value = getDatasourceName(targetDataSource); } - DynamicContextHolder.push(value); + if (StringUtils.isNotBlank(value)) { + DynamicContextHolder.push(value); + } logger.debug("set datasource is {}", value); } @@ -77,33 +82,16 @@ public class DataSourceAspect { * @param dataSource * @return */ - public String getDatasourceName(DataSource dataSource, Parameter[] methodParameters, Object[] methodArgValues) { + public String getDatasourceName(DataSource dataSource) { + String dataSourceName = null; if (dataSource.datasourceNameFromArg()) { - // 1.从参数中动态获取数据源名称 - String datasourceNameFromParam = getDatasourceNameFromArg(methodParameters, methodArgValues); - if (StringUtils.isNotBlank(datasourceNameFromParam)) { - // 如果有DatasourceParam类型的参数并且设置了datasourceName值,那么返回这个值,否则使用硬编码的 - return datasourceNameFromParam; - } + // 1.优先从http header中动态获取数据源名称 + dataSourceName = httpRequestDataSourceNameFetcher.fetchDataSourceName(); } - // 2.硬编码指定数据源名称 - return dataSource.value(); - } - - /** - * 从参数中取数据源名称 - * @param parameters - * @param argsObject - * @return - */ - public String getDatasourceNameFromArg(Parameter[] parameters, Object[] argsObject) { - for (int i = 0; i < parameters.length; i++) { - if (parameters[i].getType() == DataSourceParam.class) { - DataSourceParam param = (DataSourceParam) argsObject[i]; - return param.getDatasourceName(); - } + // 2.硬编码指定默认的数据源名称 + if (StringUtils.isBlank(dataSourceName)) { + dataSourceName = dataSource.value(); } - - return null; + return dataSourceName; } } diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java index 3fae7e003d..0a9d9adf91 100644 --- a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/config/DynamicDataSource.java @@ -8,6 +8,8 @@ package com.epmet.commons.dynamic.datasource.config; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; /** @@ -18,9 +20,13 @@ import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; */ public class DynamicDataSource extends AbstractRoutingDataSource { + private Logger logger = LoggerFactory.getLogger(getClass()); + @Override protected Object determineCurrentLookupKey() { - return DynamicContextHolder.peek(); + String datasourceName = DynamicContextHolder.peek(); + logger.info("使用的数据源名称为:{}", datasourceName); + return datasourceName; } } diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java new file mode 100644 index 0000000000..23ed9ba634 --- /dev/null +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java @@ -0,0 +1,43 @@ +package com.epmet.commons.dynamic.datasource.enums; + +/** + * 服务-数据源flag-数据源名称对应关系 + */ +public enum DataSourceEnum { + + DATA_STATISTICAL_REAL("data-statistical-server", "real", "stats"), + DATA_STATISTICAL_FAKE("data-statistical-server", "fake", "statsDisplay"), + ; + + private String serviceName; + private String flag; + private String dataSourceName; + + DataSourceEnum(String serviceName, String flag, String dataSourceName) { + this.serviceName = serviceName; + this.flag = flag; + this.dataSourceName = dataSourceName; + } + + public static DataSourceEnum getEnum(String serviceName, String flag) { + DataSourceEnum[] values = DataSourceEnum.values(); + for (DataSourceEnum value : values) { + if (value.serviceName.equals(serviceName) && value.flag.equals(flag)) { + return value; + } + } + return null; + } + + public String getServiceName() { + return serviceName; + } + + public String getFlag() { + return flag; + } + + public String getDataSourceName() { + return dataSourceName; + } +} diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/util/AbstractDataSourceNameFetcher.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/util/AbstractDataSourceNameFetcher.java new file mode 100644 index 0000000000..5069bd5958 --- /dev/null +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/util/AbstractDataSourceNameFetcher.java @@ -0,0 +1,13 @@ +package com.epmet.commons.dynamic.datasource.util; + +import com.epmet.commons.dynamic.datasource.enums.DataSourceEnum; + +public abstract class AbstractDataSourceNameFetcher { + + public abstract String fetchDataSourceName(); + + //protected String getDataSourceName(String dataType, String serviceName) { + // return DataSourceEnum.getEnum(serviceName, dataType) + //} + +} diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/util/HttpRequestDataSourceNameFetcher.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/util/HttpRequestDataSourceNameFetcher.java new file mode 100644 index 0000000000..df11b546bf --- /dev/null +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/util/HttpRequestDataSourceNameFetcher.java @@ -0,0 +1,44 @@ +package com.epmet.commons.dynamic.datasource.util; + +import com.epmet.commons.dynamic.datasource.enums.DataSourceEnum; +import com.epmet.commons.tools.exception.RenException; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.env.Environment; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +/** + * Http请求中获取数据源名称 + */ +@Component +public class HttpRequestDataSourceNameFetcher extends AbstractDataSourceNameFetcher { + + protected Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private Environment environment; + + @Override + public String fetchDataSourceName() { + ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + javax.servlet.http.HttpServletRequest request = requestAttributes.getRequest(); + String dataType = request.getHeader("Data-Type"); + + logger.info("HttpRequestDataSourceNameFetcher获取到的DataType为:{}", dataType); + if (StringUtils.isBlank(dataType)) { + return null; + } + + String serviceName = environment.getProperty("spring.application.name"); + DataSourceEnum dataSourceEnum = DataSourceEnum.getEnum(serviceName, dataType); + if (dataSourceEnum == null) { + throw new RenException(String.format("根据前端传入的DataType[%s]无法找到对应的数据源。", dataType)); + } + logger.info("HttpRequestDataSourceNameFetcher根据DataType:[{}]获取到的DataSourceEnum为{}", dataType, dataSourceEnum.getDataSourceName()); + return dataSourceEnum.getDataSourceName(); + } +} 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 920fc14e14..be529605de 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 @@ -4,6 +4,7 @@ public interface DataSourceConstant { String GOV_ORG = "govOrg"; String STATS = "stats"; + String STATS_DISPLAY = "statsDisplay"; String GOV_ISSUE = "govIssue"; String GOV_PROJECT = "govProject"; String GOV_VOICE = "govVoice"; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index b8f7c3e3d2..6ed40fc377 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -1,11 +1,15 @@ package com.epmet.controller; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.AgencySubTreeDto; +import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.service.StatsDemoService; +import com.epmet.service.stats.DimAgencyService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -26,6 +30,9 @@ public class DemoController { @Autowired private ExecutorService executorService; + @Autowired + private DimAgencyService dimAgencyService; + @GetMapping("testAlarm") public void testAlarm() { //for (int i = 0; i < 20; i++) { @@ -91,4 +98,14 @@ public class DemoController { List result = demoService.getAllAgency(); return result; } + + /** + * 参数指定数据源 + * @return + */ + @PostMapping("paramDataSource") + public Result paramDataSource() { + List list = dimAgencyService.getAgencyListByCustomerId("ba7c0b5b21e882b263ee8456e2cfb63e"); + return new Result().ok(list); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java index d40987c1bc..10d4ba7a44 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java @@ -19,12 +19,14 @@ package com.epmet.service.stats.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DimAgencyConstant; import com.epmet.constant.RobotConstant; import com.epmet.constant.StatsSubject; @@ -208,6 +210,7 @@ public class DimAgencyServiceImpl extends BaseServiceImpl getAgencyListByCustomerId(String customerId) { if (StringUtils.isBlank(customerId)){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml index a475fa198f..7ece13bb19 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml @@ -155,6 +155,16 @@ dynamic: url: @datasource.druid.user.url@ username: @datasource.druid.user.username@ password: @datasource.druid.user.password@ + stats: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.stats.url@ + username: @datasource.druid.stats.username@ + password: @datasource.druid.stats.password@ + statsDisplay: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.statsdisplay.url@ + username: @datasource.druid.statsdisplay.username@ + password: @datasource.druid.statsdisplay.password@ thread: # 线程池配置 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml index dedf82d8fe..3b7fb8b8ba 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/DimAgencyDao.xml @@ -128,6 +128,7 @@ ID, CUSTOMER_ID, PID, + AGENCY_NAME, LEVEL FROM dim_agency From 2f029dc8e338b7b3593c797eb7bafffe8da6f151 Mon Sep 17 00:00:00 2001 From: wxz Date: Sun, 23 Aug 2020 10:46:03 +0800 Subject: [PATCH 064/360] =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E2=80=94=E5=A2=9E=E5=8A=A0data-report=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=9A=84=E6=95=B0=E6=8D=AE=E6=BA=90=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/dynamic/datasource/enums/DataSourceEnum.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java index 23ed9ba634..7a3632db54 100644 --- a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java @@ -7,6 +7,8 @@ public enum DataSourceEnum { DATA_STATISTICAL_REAL("data-statistical-server", "real", "stats"), DATA_STATISTICAL_FAKE("data-statistical-server", "fake", "statsDisplay"), + DATA_REPORT_REAL("data-report-server", "real", "stats"), + DATA_REPORT_FAKE("data-report-server", "fake", "statsDisplay"), ; private String serviceName; From 7367601fb7629a86c7abdd4cf9dd621773541148 Mon Sep 17 00:00:00 2001 From: wxz Date: Sun, 23 Aug 2020 11:42:40 +0800 Subject: [PATCH 065/360] =?UTF-8?q?data-report=E5=A2=9E=E5=8A=A0=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E6=95=B0=E6=8D=AE=E6=BA=90demo(projectDetail)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/constant/DataSourceConstant.java | 3 +- .../data-report/data-report-server/pom.xml | 28 +++++++++---------- .../screen/impl/ScreenProjectServiceImpl.java | 3 ++ .../src/main/resources/bootstrap.yml | 21 ++++++++------ 4 files changed, 32 insertions(+), 23 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java index 3efb09b66c..b640b06b67 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java @@ -5,6 +5,7 @@ public interface DataSourceConstant { /** * 统计数据库 */ - String STATS_DISPLAY = "statsdisplay"; + String STATS = "stats"; + String STATS_DISPLAY = "statsDisplay"; } diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index c72d1167db..e2239a5081 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -110,17 +110,17 @@ dev - + - - epmet_data_statistical_user - EpmEt-db-UsEr + + epmet_data_statistical_user + EpmEt-db-UsEr - + - epmet_data_statistical_user + epmet_data_stats_display_user EpmEt-db-UsEr @@ -152,11 +152,11 @@ test - + - - epmet - elink@833066 + + epmet + elink@833066 0 @@ -187,11 +187,11 @@ prod - + - - epmet_data_statistical - EpmEt-db-UsEr + + epmet_data_statistical + EpmEt-db-UsEr 0 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/screen/impl/ScreenProjectServiceImpl.java index 411fd15230..dce609636d 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/screen/impl/ScreenProjectServiceImpl.java @@ -1,5 +1,7 @@ package com.epmet.datareport.service.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; @@ -30,6 +32,7 @@ public class ScreenProjectServiceImpl implements ScreenProjectService { * @author zxc * @date 2020/8/19 4:36 下午 */ + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override public ProjectDetailResultDTO projectDetail(ProjectDetailFormDTO projectDetailFormDTO) { ProjectDetailResultDTO projectDetailResultDTO = screenEventDataDao.selectEventDetail(projectDetailFormDTO.getProjectId()); 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 0d4f2911fd..d4db395aa8 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 @@ -24,9 +24,9 @@ spring: druid: #MySQL driver-class-name: com.mysql.cj.jdbc.Driver - url: @datasource.druid.url@ - username: @datasource.druid.username@ - password: @datasource.druid.password@ + url: @datasource.druid.stats.url@ + username: @datasource.druid.stats.username@ + password: @datasource.druid.stats.password@ cloud: nacos: discovery: @@ -53,11 +53,11 @@ spring: # 数据迁移工具flyway flyway: - enabled: false + enabled: @spring.flyway.enabled@ locations: classpath:db/migration - url: @datasource.druid.url@ - user: @datasource.druid.username@ - password: @datasource.druid.password@ + url: @datasource.druid.stats.url@ + user: @datasource.druid.stats.username@ + password: @datasource.druid.stats.password@ baseline-on-migrate: true baseline-version: 0 @@ -94,7 +94,12 @@ mybatis-plus: #动态数据源 dynamic: datasource: - statsdisplay: + stats: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.stats.url@ + username: @datasource.druid.stats.username@ + password: @datasource.druid.stats.password@ + statsDisplay: driver-class-name: com.mysql.cj.jdbc.Driver url: @datasource.druid.statsdisplay.url@ username: @datasource.druid.statsdisplay.username@ From 93ff9acbc17ea11e13d660937a3359f10b63ff7b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 24 Aug 2020 09:39:32 +0800 Subject: [PATCH 066/360] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9=20=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oper-crm/oper-crm-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-crm/oper-crm-server/pom.xml | 2 +- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml index d7be013098..1bc90fa0c0 100644 --- a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-crm-server: container_name: oper-crm-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.69 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-crm-server:0.3.70 ports: - "8090:8090" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-crm/oper-crm-server/pom.xml b/epmet-module/oper-crm/oper-crm-server/pom.xml index cd3d7832e0..80da83c9fc 100644 --- a/epmet-module/oper-crm/oper-crm-server/pom.xml +++ b/epmet-module/oper-crm/oper-crm-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.69 + 0.3.70 com.epmet oper-crm diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index 3b7127b0f4..38a888ae92 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.37 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.38 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 0cd9b6fb4a..795273b090 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.37 + 0.3.38 com.epmet oper-customize From 0825b501831e42d4f4b3785e3bde5177eb18f5ef Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 24 Aug 2020 09:48:48 +0800 Subject: [PATCH 067/360] =?UTF-8?q?11=E3=80=81=E5=9F=BA=E5=B1=82=E6=B2=BB?= =?UTF-8?q?=E7=90=86-=E5=85=AC=E4=BC=97=E5=8F=82=E4=B8=8E=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=9A=E5=A2=9E=E9=95=BF=E7=8E=87=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/screen/impl/ScreenCollServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java index bd277c3823..e67ebf4b60 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 @@ -389,8 +389,9 @@ public class ScreenCollServiceImpl implements ScreenCollService { * @Date 15:38 2020-08-21 **/ private BigDecimal calculateGrowthRateNumber(Integer old, Integer now){ - int number = (now - old) / old * NumConstant.ONE_HUNDRED; - return new BigDecimal(number); + BigDecimal bignum1 = new BigDecimal((now - old) * NumConstant.ONE_HUNDRED); + BigDecimal bignum2 = bignum1.divide(new BigDecimal(old),2,BigDecimal.ROUND_HALF_UP); + return bignum2; } /** From f2bfdd2fbe58563d8a42fa32d50f7cc60cf00c87 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 24 Aug 2020 10:17:16 +0800 Subject: [PATCH 068/360] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index 38a888ae92..1d0e33b1bc 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.38 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.39 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 795273b090..da4d684778 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.38 + 0.3.39 com.epmet oper-customize From 4b96b203579b8775b48df221817f67f12a5a4b39 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 24 Aug 2020 10:25:24 +0800 Subject: [PATCH 069/360] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=96=E9=83=A8?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=9B=B8=E5=85=B3=E7=9A=84=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datasource/enums/DataSourceEnum.java | 3 + .../resources/db/migration/V0.0.3__extApp.sql | 56 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.3__extApp.sql diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java index 7a3632db54..bca4441435 100644 --- a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java @@ -11,8 +11,11 @@ public enum DataSourceEnum { DATA_REPORT_FAKE("data-report-server", "fake", "statsDisplay"), ; + // 服务名 private String serviceName; + // 数据源标记 private String flag; + // 数据源,跟yml中的数据源名称保持一致 private String dataSourceName; DataSourceEnum(String serviceName, String flag, String dataSourceName) { diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.3__extApp.sql b/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.3__extApp.sql new file mode 100644 index 0000000000..8faeaf51f9 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.3__extApp.sql @@ -0,0 +1,56 @@ +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +CREATE TABLE `external_app` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `APP_NAME` varchar(64) NOT NULL COMMENT 'APP名字', + `CUSTOMER_ID` varchar(64) DEFAULT NULL COMMENT '客户ID', + `DEL_FLAG` tinyint(1) DEFAULT NULL COMMENT '是否删除,0:未删除,1:已删除', + `REVISION` int(10) DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) DEFAULT NULL COMMENT '创建者id', + `CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) DEFAULT NULL COMMENT '更新者id', + `UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='外部应用列表'; + +CREATE TABLE `external_app_secret` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `APP_ID` varchar(64) NOT NULL COMMENT 'APP ID', + `SECRET` varchar(255) NOT NULL COMMENT '秘钥', + `DEL_FLAG` tinyint(1) DEFAULT NULL COMMENT '是否删除,0:未删除,1:已删除', + `REVISION` int(10) DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) DEFAULT NULL COMMENT '创建者id', + `CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) DEFAULT NULL COMMENT '更新者id', + `UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='外部应用秘钥列表'; + +CREATE TABLE `external_customer` ( + `ID` varchar(64) NOT NULL COMMENT '客户ID', + `CUSTOMER_NAME` varchar(255) NOT NULL COMMENT '客户名称', + `DEL_FLAG` tinyint(1) DEFAULT NULL COMMENT '是否删除,0:未删除,1:已删除', + `REVISION` int(10) DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) DEFAULT NULL COMMENT '创建者id', + `CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) DEFAULT NULL COMMENT '更新者id', + `UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +BEGIN; +INSERT INTO `external_app` VALUES ('227fb75ae4baa820755aaf43bf7f0a69', '便捷通行', '7e07311f4c4a56c65fa1dd5d16e0b743', 0, 0, 'wxz', '2020-08-18 13:39:32', 'wxz', '2020-08-18 13:39:37'); +INSERT INTO `external_app` VALUES ('acc4ad66c82a7b46e741364b4c62dce2', '市北大屏', 'b09527201c4409e19d1dbc5e3c3429a1', 0, 0, 'wxz', '2020-08-18 13:39:32', 'wxz', '2020-08-18 13:39:37'); +INSERT INTO `external_app` VALUES ('dbfad3110c124c89948d16e8b06a8888', '数据采集', 'b09527201c4409e19d1dbc5e3c3429a1', 0, 0, 'wxz', '2020-08-18 13:39:32', 'wxz', '2020-08-18 13:39:37'); + +INSERT INTO `external_app_secret` VALUES ('44ed58fd256ae51b473b6ff8555c7131', '227fb75ae4baa820755aaf43bf7f0a69', 'a44a4fc41eb513cd93a0f957db3ef764e189e6aebb2369471396a8c3b32f61ed', 0, 0, 'wxz', '2020-08-18 13:40:03', 'xz', '2020-08-18 13:40:07'); +INSERT INTO `external_app_secret` VALUES ('95d16f5fe76d1139023107476871a077', 'dbfad3110c124c89948d16e8b06a8888', '0f7e983b017ac180b0da1877abe11bab22ab6288580e64d39b5e415dbb0fcc8f', 0, 0, 'wxz', '2020-08-18 13:40:03', 'xz', '2020-08-18 13:40:07'); +INSERT INTO `external_app_secret` VALUES ('9ca67b7b02dc2e80e9ba6ba4793aea54', 'acc4ad66c82a7b46e741364b4c62dce2', '612d304095c50369c3ef06e490f05779eeb8f19ff16566c73aeafafc5fa01970', 0, 0, 'wxz', '2020-08-18 13:40:03', 'xz', '2020-08-18 13:40:07'); + +INSERT INTO `external_customer` VALUES ('7e07311f4c4a56c65fa1dd5d16e0b743', '外挂功能', 0, 0, 'wxz', '2020-08-19 14:21:52', 'APP_USER', '2020-08-21 15:23:35'); +INSERT INTO `external_customer` VALUES ('b09527201c4409e19d1dbc5e3c3429a1', '市北党建', 0, 0, 'wxz', '2020-08-19 14:21:52', 'wxz', '2020-08-19 14:21:58'); + +COMMIT; + +SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file From 2a373d2d1b07660284ba2f112bde938d58e810c5 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 10:43:57 +0800 Subject: [PATCH 070/360] operaccess+1=>0.3.16 --- .../oper-access-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-access/oper-access-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml index d3dfe53760..5f428fb6f1 100644 --- a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-access-server: container_name: oper-access-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-access-server:0.3.15 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-access-server:0.3.16 ports: - "8093:8093" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-access/oper-access-server/pom.xml b/epmet-module/oper-access/oper-access-server/pom.xml index 5ef81d2ca5..52a4860f13 100644 --- a/epmet-module/oper-access/oper-access-server/pom.xml +++ b/epmet-module/oper-access/oper-access-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.15 + 0.3.16 oper-access com.epmet From 9b82d6679d13c625ffee6c1ec53edf7cfbc4effb Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 24 Aug 2020 10:45:49 +0800 Subject: [PATCH 071/360] =?UTF-8?q?third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index f745b5cfd0..c0110e464b 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.131 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.132 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index c0586fac7e..6c703dd85f 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.131 + 0.0.132 com.epmet From 512f360270722b81630f1efeb6f22520c278d551 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 11:00:26 +0800 Subject: [PATCH 072/360] operaccess+1=>0.3.17 --- .../oper-access-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-access/oper-access-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml index 5f428fb6f1..ea567d95a0 100644 --- a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-access-server: container_name: oper-access-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-access-server:0.3.16 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-access-server:0.3.17 ports: - "8093:8093" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-access/oper-access-server/pom.xml b/epmet-module/oper-access/oper-access-server/pom.xml index 52a4860f13..655da4f109 100644 --- a/epmet-module/oper-access/oper-access-server/pom.xml +++ b/epmet-module/oper-access/oper-access-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.16 + 0.3.17 oper-access com.epmet From 8c2d50b4e654aca1585c36296050382334a11a71 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 24 Aug 2020 11:04:19 +0800 Subject: [PATCH 073/360] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=8C=87=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/screen/IndexDictDTO.java | 97 ------------------- .../com/epmet/dto/screen/IndexGroupDTO.java | 92 ------------------ .../epmet/dto/screen/IndexGroupDetailDTO.java | 92 ------------------ .../screen/IndexGroupDetailTemplateDTO.java | 92 ------------------ .../screen/form/InitCustomerIndexForm.java | 18 ++++ .../java/com/epmet/DataStatsApplication.java | 1 + .../epmet/controller/IndexDictController.java | 27 +++++- .../com/epmet/dao/screen/IndexGroupDao.java | 3 +- .../screen/IndexGroupDetailTemplateDao.java | 4 + .../dao/screen/IndexGroupTemplateDao.java | 4 + .../entity/screen/IndexGroupDetailEntity.java | 5 + .../service/screen/IndexGroupService.java | 1 + .../screen/impl/IndexGroupServiceImpl.java | 49 ++++++++++ .../resources/mapper/screen/IndexGroupDao.xml | 4 +- .../screen/IndexGroupDetailTemplateDao.xml | 5 + .../mapper/screen/IndexGroupTemplateDao.xml | 5 + 16 files changed, 119 insertions(+), 380 deletions(-) delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexDictDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailTemplateDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/InitCustomerIndexForm.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexDictDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexDictDTO.java deleted file mode 100644 index 7ca7e42117..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexDictDTO.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dto.screen; - -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - - -/** - * 评价指标字典 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-19 - */ -@Data -public class IndexDictDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键id - */ - private String id; - - /** - * 指标编码(唯一) - */ - private String indexCode; - - /** - * 指标名 - */ - private String indexName; - - /** - * 指标描述 - */ - private String indexDesc; - - /** - * 父级指标id,如果是一级指标,PID=0 - */ - private String pid; - - /** - * 指标级别(1,2,3,4,5) - */ - private String level; - - /** - * 删除标识 0.未删除 1.已删除 - */ - private Integer delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDTO.java deleted file mode 100644 index 19ee948d15..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDTO.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dto.screen; - -import lombok.Data; - -import java.io.Serializable; -import java.util.Date; - - -/** - * 客户指标分组 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-19 - */ -@Data -public class IndexGroupDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键id - */ - private String id; - - /** - * 客户id - */ - private String customerId; - - /** - * 指标id - */ - private String indexCode; - - /** - * 是否启用:启用:enable 禁用:disabled - */ - private String status; - - /** - * 当前指标关联的上一级指标分组,如果没有上一级,则为0 - */ - private String parentIndexGroupId; - - /** - * 删除标识 0.未删除 1.已删除 - */ - private Integer delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java deleted file mode 100644 index e6335250eb..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dto.screen; - -import lombok.Data; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.Date; - -/** - * 客户指标详情 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-19 - */ -@Data -public class IndexGroupDetailDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键id - */ - private String id; - - /** - * index_group.id - */ - private String indexGroupId; - - /** - * 指标id - */ - private String indexCode; - - /** - * 权重(同一组权重总和=1) - */ - private BigDecimal weight; - - /** - * 是否启用:启用:enable 禁用:disabled - */ - private String status; - - /** - * 删除标识 0.未删除 1.已删除 - */ - private Integer delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailTemplateDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailTemplateDTO.java deleted file mode 100644 index e82b7b4588..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailTemplateDTO.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dto.screen; - -import lombok.Data; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.Date; - -/** - * 客户指标详情 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-19 - */ -@Data -public class IndexGroupDetailTemplateDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 主键id - */ - private String id; - - /** - * index_group.id - */ - private String indexGroupId; - - /** - * 指标id - */ - private String indexCode; - - /** - * 权重(同一组权重总和=1) - */ - private BigDecimal weight; - - /** - * 是否启用:启用:enable 禁用:disabled - */ - private String status; - - /** - * 删除标识 0.未删除 1.已删除 - */ - private Integer delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/InitCustomerIndexForm.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/InitCustomerIndexForm.java new file mode 100644 index 0000000000..4016a9656e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/InitCustomerIndexForm.java @@ -0,0 +1,18 @@ +package com.epmet.dto.screen.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * desc:初始化客户指标权重参数实体类 + * @author liujianjun + */ +@Data +public class InitCustomerIndexForm implements Serializable { + private static final long serialVersionUID = 3280392511156378209L; + /** + * desc:客户id + */ + private String customerId; +} 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 3b93ce39a3..21b5ea51b7 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 @@ -15,5 +15,6 @@ public class DataStatsApplication { public static void main(String[] args) { SpringApplication.run(DataStatsApplication.class ,args); + //HttpClientManager.getInstance().sendAlarmMsg("DataStatsApplication started!"); } } 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 217867ea32..0d0b21befc 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 @@ -3,18 +3,19 @@ package com.epmet.controller; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.ExcelReader; import com.alibaba.excel.read.metadata.ReadSheet; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.model.IndexExcelDataListener; import com.epmet.model.IndexModel; import com.epmet.service.screen.IndexDictService; import com.epmet.service.screen.IndexGroupDetailTemplateService; +import com.epmet.service.screen.IndexGroupService; import com.epmet.service.screen.IndexGroupTemplateService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; @@ -33,6 +34,8 @@ public class IndexDictController { @Autowired private IndexGroupTemplateService indexGroupTemplateService; @Autowired + private IndexGroupService indexGroupService; + @Autowired private IndexGroupDetailTemplateService indexGroupDetailTemplateService; /** @@ -63,6 +66,20 @@ public class IndexDictController { excelReader.finish(); } } - return new Result<>(); + return new Result<>(); + } + + /** + * desc: 初始化客户的评价指标数据 + * @param formDTO customerId + * @return + */ + @PostMapping("initCustomerIndex") + public Result initCustomerIndex(@RequestBody InitCustomerIndexForm formDTO){ + if (StringUtils.isBlank(formDTO.getCustomerId())){ + throw new RenException("参数错误"); + } + Boolean aBoolean = indexGroupService.initCustomerIndexGroup(formDTO.getCustomerId()); + return new Result().ok(aBoolean); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java index 10033b7456..5458720940 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java @@ -29,5 +29,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IndexGroupDao extends BaseDao { - + + int inertGroupFromTable(String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java index cfe5270615..29f074c13f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java @@ -22,6 +22,8 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 客户指标详情 * @@ -32,4 +34,6 @@ import org.apache.ibatis.annotations.Mapper; public interface IndexGroupDetailTemplateDao extends BaseDao { int deleteAll(); + + List selectAll(); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java index 6f64a61349..c1e14b531c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java @@ -21,6 +21,8 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.screen.IndexGroupTemplateEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 默认指标分组 * @@ -31,4 +33,6 @@ import org.apache.ibatis.annotations.Mapper; public interface IndexGroupTemplateDao extends BaseDao { int deleteAll(); + + List selectAll(); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java index e17ba9b2b2..c0088d5383 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java @@ -37,6 +37,11 @@ public class IndexGroupDetailEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; + /** + * 客户id + */ + private String customerId; + /** * index_group.id */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java index f2ee989bea..88c66b3da6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupService.java @@ -28,4 +28,5 @@ import com.epmet.entity.screen.IndexGroupEntity; */ public interface IndexGroupService extends BaseService { + Boolean initCustomerIndexGroup(String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java index 5d12ec33d1..65fc39f131 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java @@ -18,10 +18,25 @@ package com.epmet.service.screen.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.UniqueIdGenerator; import com.epmet.dao.screen.IndexGroupDao; +import com.epmet.dao.screen.IndexGroupDetailDao; +import com.epmet.dao.screen.IndexGroupDetailTemplateDao; +import com.epmet.dao.screen.IndexGroupTemplateDao; +import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; import com.epmet.entity.screen.IndexGroupEntity; +import com.epmet.entity.screen.IndexGroupTemplateEntity; import com.epmet.service.screen.IndexGroupService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; +import java.util.stream.Collectors; /** * 客户指标分组 @@ -31,5 +46,39 @@ import org.springframework.stereotype.Service; */ @Service public class IndexGroupServiceImpl extends BaseServiceImpl implements IndexGroupService { +@Autowired +private IndexGroupTemplateDao indexGroupTemplateDao; + @Autowired + private IndexGroupDetailTemplateDao indexGroupDetailTemplateDao; + + @Autowired + private IndexGroupDetailDao indexGroupDetailDao; + + @Transactional(rollbackFor = Exception.class) + @Override + public Boolean initCustomerIndexGroup(String customerId) { + List groupTempList = indexGroupTemplateDao.selectAll(); + List groupDetailTempList = indexGroupDetailTemplateDao.selectAll(); + if (CollectionUtils.isEmpty(groupTempList) || CollectionUtils.isEmpty(groupDetailTempList)){ + throw new RenException("没有需要初始化的数据"); + } + List groupEntityList = groupTempList.stream().map(groupTemp -> { + IndexGroupEntity entity = ConvertUtils.sourceToTarget(groupTemp, IndexGroupEntity.class); + entity.setId(UniqueIdGenerator.generate()); + entity.setCustomerId(customerId); + return entity; + }).collect(Collectors.toList()); + this.insertBatch(groupEntityList,10); + List groupTempEntityList = groupDetailTempList.stream().map(groupTemp -> { + IndexGroupDetailEntity entity = ConvertUtils.sourceToTarget(groupTemp, IndexGroupDetailEntity.class); + entity.setId(UniqueIdGenerator.generate()); + entity.setCustomerId(customerId); + return entity; + }).collect(Collectors.toList()); + groupTempEntityList.forEach(o->{ + indexGroupDetailDao.insert(o); + }); + return true; + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml index 06f0cf0198..4597456ae7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml @@ -3,5 +3,7 @@ - + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml index ddb138771e..c044654dd8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml @@ -6,4 +6,9 @@ delete from index_group_detail_template + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml index d527876c4d..6adfa4474b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml @@ -5,4 +5,9 @@ delete from index_group_template + + \ No newline at end of file From 66494bec2f78de0ad3435b0dea79b58e177d1b06 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 24 Aug 2020 11:10:44 +0800 Subject: [PATCH 074/360] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index 1d0e33b1bc..5c48c8a732 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.39 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.40 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index da4d684778..eebb296e73 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.39 + 0.3.40 com.epmet oper-customize From 4cb3ae5f54c46e8fc9b7b12314bccb1f92164e05 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 24 Aug 2020 11:18:47 +0800 Subject: [PATCH 075/360] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=A0=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/datareport/service/screen/impl/AgencyServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 941cba3477..432ae0059a 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 @@ -43,7 +43,7 @@ public class AgencyServiceImpl implements AgencyService { if (null == rootAgency){ return new TreeResultDTO(); } - List departmentList = this.getDepartmentList(("".equals(rootAgency.getPids()) ? "" : rootAgency.getPids() + ":") + rootAgency.getValue()); + List departmentList = this.getDepartmentList(("".equals(rootAgency.getPids()) ? "" : rootAgency.getPids() + ",") + rootAgency.getValue()); rootAgency.setChildren(departmentList); return rootAgency; } From a820f864f238dc772bc0f11f30357085768f9985 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 24 Aug 2020 12:01:07 +0800 Subject: [PATCH 076/360] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index 5c48c8a732..93d51e3f56 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.40 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.41 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index eebb296e73..e838582dc3 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.40 + 0.3.41 com.epmet oper-customize From d199f6e3f9a3d24f0b463fb12e551f4860003f54 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 24 Aug 2020 13:37:33 +0800 Subject: [PATCH 077/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86=E5=92=8C=E6=8C=87=E6=A0=87=E9=87=87=E9=9B=86?= =?UTF-8?q?=20=20=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/FactIndexCollectServiceImpl.java | 10 ++++++++++ .../screen/impl/ScreenCollServiceImpl.java | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java index ced6e555e2..cd767ff580 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcollect/impl/FactIndexCollectServiceImpl.java @@ -1,6 +1,8 @@ package com.epmet.service.indexcollect.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.indexcoll.*; import com.epmet.dto.indexcollect.form.*; import com.epmet.service.indexcollect.FactIndexCollectService; @@ -34,6 +36,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { @Autowired private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertGridPartyMemberData(List formDTO, String customerId) { @@ -47,6 +50,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertGridPartyAbility(List formDTO, String customerId) { @@ -60,6 +64,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertOrgPartyAbility(List formDTO, String customerId) { @@ -77,6 +82,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertGridServiceAbility(List formDTO, String customerId) { @@ -90,6 +96,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertOrgServiceAbility(List formDTO, String customerId) { @@ -107,6 +114,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertGridGovrnAbility(List formDTO, String customerId) { @@ -120,6 +128,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertOrgGovrnAbility(List formDTO, String customerId) { @@ -137,6 +146,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertDeptGovrnAbility(List formDTO, String customerId) { 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 e67ebf4b60..b5e65fd193 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 @@ -17,10 +17,12 @@ package com.epmet.service.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.commons.tools.utils.Result; import com.epmet.constant.CompareConstant; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.screen.*; import com.epmet.dto.screencoll.form.*; import com.epmet.entity.screen.ScreenEventImgDataEntity; @@ -78,6 +80,8 @@ public class ScreenCollServiceImpl implements ScreenCollService { private ScreenPioneerDataDao screenPioneerDataDao; @Autowired private ScreenIndexDataYearlyDao screenIndexDataYearlyDao; + + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertPartyUserRankData(List formDTO,String customerId) { @@ -92,6 +96,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertPartyLinkMassesData(List formDTO, String customerId) { @@ -106,6 +111,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertPartyBranchData(List formDTO, String customerId) { @@ -123,6 +129,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertOrgRankData(List formDTO, String customerId) { @@ -140,6 +147,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertGovernRankData(List formDTO, String customerId) { @@ -157,6 +165,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertEventData(List formDTO, String customerId) { @@ -184,6 +193,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertDifficultyData(List formDTO, String customerId) { @@ -196,6 +206,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertCpcbaseData(List formDTO, String customerId) { @@ -210,6 +221,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertIndexDataMonthly(List formDTO, String customerId) { @@ -227,6 +239,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertIndexDataYearly(List formDTO, String customerId) { @@ -243,6 +256,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertCustomerDept(List formDTO, String customerId) { @@ -257,6 +271,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertCustomerGrid(List formDTO, String customerId) { @@ -271,6 +286,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertCustomerAgency(List formDTO, String customerId) { @@ -285,6 +301,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertUserTotalData(List formDTO, String customerId) { @@ -299,6 +316,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertUserJoin(List formDTO, String customerId) { @@ -413,6 +431,7 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } + @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) public void insertPioneerData(List formDTO, String customerId) { From 892cde7e5432ff2ac638415ac00071b3c91dad5f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 24 Aug 2020 13:40:23 +0800 Subject: [PATCH 078/360] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E8=A7=A3=20?= =?UTF-8?q?@DataSource?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/service/screen/impl/AgencyServiceImpl.java | 4 ++++ .../service/screen/impl/DistributionServiceImpl.java | 7 +++++++ .../datareport/service/screen/impl/IndexServiceImpl.java | 7 ++++++- .../service/screen/impl/PartyMemberLeadServiceImpl.java | 5 +++++ 4 files changed, 22 insertions(+), 1 deletion(-) 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 432ae0059a..9ca543828c 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 @@ -1,7 +1,9 @@ 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; @@ -35,6 +37,7 @@ public class AgencyServiceImpl implements AgencyService { * @author zxc * @date 2020/8/18 2:04 下午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) { // 1. 查询客户根组织ID @@ -71,6 +74,7 @@ public class AgencyServiceImpl implements AgencyService { * @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()); 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/screen/impl/DistributionServiceImpl.java index a1d9025ead..97a627fb23 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/screen/impl/DistributionServiceImpl.java @@ -1,6 +1,8 @@ package com.epmet.datareport.service.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; @@ -40,6 +42,7 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/8/18 10:59 上午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public List branch(BranchFormDTO formDTO) { List branchResultDTOS = screenCustomerGridDao.selectBranch(formDTO.getAgencyId()); @@ -52,6 +55,7 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/8/18 11:10 上午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public UserResultDTO user(UserFormDTO userFormDTO) { UserResultDTO userResult = new UserResultDTO(); @@ -76,6 +80,7 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/8/18 11:20 上午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public ParymemberResultDTO parymember(ParymemberFormDTO parymemberFormDTO) { ParymemberResultDTO parymemberResult = new ParymemberResultDTO(); @@ -100,6 +105,7 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/8/19 1:29 下午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public List project(ProjectFormDTO projectFormDTO) { List projectResultDTOS = screenEventDataDao.selectEvent(projectFormDTO.getAgencyId()); @@ -115,6 +121,7 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/8/19 1:52 下午 */ + @DataSource(value = DataSourceConstant.STATS,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/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java index 4b3bb3b350..e106a07d45 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/screen/impl/IndexServiceImpl.java @@ -1,7 +1,9 @@ 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.ScreenIndexDataMonthlyDao; import com.epmet.datareport.dao.screen.ScreenIndexDataYearlyDao; import com.epmet.datareport.service.screen.IndexService; @@ -17,7 +19,6 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.Comparator; import java.util.List; -import java.util.Map; import java.util.stream.Collectors; /** @@ -42,6 +43,7 @@ public class IndexServiceImpl implements IndexService { * @author zxc * @date 2020/8/19 2:53 下午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO) { YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId()); @@ -57,6 +59,7 @@ public class IndexServiceImpl implements IndexService { * @author zxc * @date 2020/8/19 3:17 下午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) { MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId()); @@ -72,6 +75,7 @@ public class IndexServiceImpl implements IndexService { * @author zxc * @date 2020/8/19 5:27 下午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam) { String customerId = externalAppRequestParam.getCustomerId(); @@ -117,6 +121,7 @@ public class IndexServiceImpl implements IndexService { * @author zxc * @date 2020/8/20 10:04 上午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public List subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO) { LocalDate now = LocalDate.now().minusMonths(NumConstant.ONE); 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/screen/impl/PartyMemberLeadServiceImpl.java index 7dee242571..b49d6ed1f9 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -1,7 +1,9 @@ package com.epmet.datareport.service.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; @@ -58,6 +60,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author zxc * @date 2020/8/20 1:56 下午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO) { FineExampleResultDTO fineExampleResultDTO = screenPioneerDataDao.selectFineExample(fineExampleFormDTO.getAgencyId()); @@ -89,6 +92,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author zxc * @date 2020/8/20 2:35 下午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO) { ContactMassLineChartResultDTO result = new ContactMassLineChartResultDTO(); @@ -119,6 +123,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author zxc * @date 2020/8/20 3:19 下午 */ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public VolunteerServiceResultDTO volunteerService(VolunteerServiceFormDTO volunteerServiceFormDTO) { VolunteerServiceResultDTO result = new VolunteerServiceResultDTO(); From ed45452db5cd9db26df556452e718be1bd247d83 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 24 Aug 2020 13:48:56 +0800 Subject: [PATCH 079/360] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/screen/impl/PartyMemberLeadServiceImpl.java | 5 ----- 1 file changed, 5 deletions(-) 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/screen/impl/PartyMemberLeadServiceImpl.java index b49d6ed1f9..1757ca5062 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -24,11 +24,6 @@ import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.time.LocalDate; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.math.BigDecimal; import java.util.*; import java.util.stream.Collectors; From 313bcde7f19ebdd0434a5ee84e82c8a56ac0bdd1 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 24 Aug 2020 14:04:47 +0800 Subject: [PATCH 080/360] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index 93d51e3f56..fc836e6a15 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.41 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.42 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index e838582dc3..c1170d6d89 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.41 + 0.3.42 com.epmet oper-customize From 6bc0ab51e131f1f09b09c745ffa28c25b8f70f14 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 24 Aug 2020 14:09:39 +0800 Subject: [PATCH 081/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/GovernCapacityResultDTO.java | 9 ++-- .../screen/GrassrootsPartyDevController.java | 1 - .../impl/GrassRootsGovernServiceImpl.java | 8 +-- .../impl/GrassrootsPartyDevServiceImpl.java | 50 ++----------------- .../src/main/resources/logback-spring.xml | 1 + .../mapper/screen/ScreenDifficultyDataDao.xml | 9 ++-- .../screen/ScreenPartyBranchDataDao.xml | 8 +-- .../screen/ScreenPartyUserRankDataDao.xml | 4 +- .../mapper/screen/ScreenUserJoinDao.xml | 2 +- .../mapper/screen/ScreenUserTotalDataDao.xml | 2 +- 10 files changed, 26 insertions(+), 68 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java index 0c96a83129..dd2c09cd94 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.screen.dto.result; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; /** * @Description 治理能力查询结果dto @@ -22,20 +23,20 @@ public class GovernCapacityResultDTO implements Serializable { /** * 响应率 * */ - private Integer responseRatio; + private BigDecimal responseRatio; /** * 解决率 * */ - private Integer resolvedRatio; + private BigDecimal resolvedRatio; /** * 自治率 * */ - private Integer governRatio; + private BigDecimal governRatio; /** * 满意率 * */ - private Integer satisfactionRatio; + private BigDecimal satisfactionRatio; } 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 4aaac7a152..7c536869e9 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 @@ -3,7 +3,6 @@ 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.dao.screen.ScreenUserTotalDataDao; import com.epmet.datareport.service.screen.GrassrootsPartyDevService; import com.epmet.screen.dto.form.BranchBuildRankFormDTO; import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; 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 13366615a6..7a41593d68 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 @@ -144,10 +144,10 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { orderList.forEach(o -> { GovernCapacityRankResultDTO rank = new GovernCapacityRankResultDTO(); rank.setAgencyName(o.getAgencyName()); - rank.setGovernRatio(convertPercentStr(new BigDecimal(o.getGovernRatio()))); - rank.setResolvedRatio(convertPercentStr(new BigDecimal(o.getResolvedRatio()))); - rank.setResponseRatio(convertPercentStr(new BigDecimal(o.getResponseRatio()))); - rank.setSatisfactionRatio(convertPercentStr(new BigDecimal(o.getSatisfactionRatio()))); + rank.setGovernRatio(convertPercentStr(o.getGovernRatio(),NumConstant.ONE)); + rank.setResolvedRatio(convertPercentStr(o.getResolvedRatio(),NumConstant.ONE)); + rank.setResponseRatio(convertPercentStr(o.getResponseRatio(),NumConstant.ONE)); + rank.setSatisfactionRatio(convertPercentStr(o.getSatisfactionRatio(),NumConstant.ONE)); result.add(rank); }); 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 74fae27854..f37a0e7e99 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 @@ -63,7 +63,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService if(null == result.getPlatFormTotal() || NumConstant.ZERO == result.getPlatFormTotal()){ result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); }else{ - result.setPercentInPlatForm(convertPercentStr(new BigDecimal(result.getPartyMemberTotal()/result.getPlatFormTotal()))); + result.setPercentInPlatForm(convertPercentStr(new BigDecimal((result.getPartyMemberTotal().doubleValue()/result.getPlatFormTotal().doubleValue())))); } return result; } @@ -124,7 +124,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService List numArray = new LinkedList<>(); BranchTrendSeriesDataResultDTO data = new BranchTrendSeriesDataResultDTO(); data.setName(issue); - if(null != issueYearlyDataList && issueYearlyDataList.isEmpty()){ + if(null != issueYearlyDataList && !issueYearlyDataList.isEmpty()){ monthMap.keySet().forEach( monthId ->{ Optional optional = issueYearlyDataList.stream().filter(yearly -> StringUtils.equals(monthId,yearly.getMonthId())).findAny(); @@ -139,6 +139,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService numArray.add(NumConstant.ZERO); } } + data.setData(numArray); dataArray.add(data); }); } @@ -237,51 +238,6 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService } - public static void main(String[] args) { - 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()))); - - result.forEach((k,v) -> { - System.out.print(k); - System.out.print(" -> "); - System.out.print(v); - System.out.println(); - }); - - List xLine = result.values().stream().collect(Collectors.toList()); - xLine.forEach(x -> { - System.out.println(x); - }); - - result.keySet().forEach(key -> System.out.println(key)); - } - /** * @Description 得到上个月的monthId * @param 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 bfbabc6259..08a6a198d1 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 @@ -144,6 +144,7 @@ + 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 d772ebb7e2..ab381cebba 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 @@ -22,12 +22,13 @@ AND eve.DEL_FLAG = '0' WHERE diff.DEL_FLAG = '0' - AND diff.ORG_TYPE = 'agencyId' + AND diff.ORG_TYPE = 'agency' AND diff.ORG_ID = #{agencyId} ORDER BY - CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME DESC - WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT DESC - ELSE diss.EVENT_RE_ORG DESC END + CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME + WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT + ELSE diff.EVENT_RE_ORG END + DESC \ No newline at end of file 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 a8af55a171..8fbf102170 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 @@ -6,7 +6,7 @@ SELECT MONTH_ID, - ISSUE_CATEGORY_NAME AS issue, + MEET_CATEGORY_NAME AS issue, CASE #{type} WHEN 'organize' THEN ORGANIZE_COUNT WHEN 'joinuser' THEN JOIN_USER_COUNT WHEN 'averagejoinuser' THEN AVERAGE_JOIN_USER_COUNT @@ -35,7 +35,7 @@ AND MONTH_ID = ]]> #{bottomMonthId} ORDER BY MONTH_ID DESC , - ISSUE_CATEGORY_NAME + MEET_CATEGORY_NAME @@ -50,7 +50,7 @@ DEL_FLAG = '0' AND ORG_TYPE = 'agency' - AND ORG_ID = #{agencyId} + AND PARENT_ID = #{agencyId} AND TYPE = #{category} 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 d798990b6b..66fb4d6a80 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 @@ -6,7 +6,7 @@ SELECT USER_ID, - concat( SURNAME, '*' ) AS NAME, + concat( surname, CASE char_length( NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name, POINT_TOTAL AS point FROM screen_party_user_rank_data 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 cb10ed2c0e..8f17dc796a 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 @@ -7,7 +7,7 @@ \ No newline at end of file From a13898fdab45c95e1048cdf59048b12cfac1d848 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 24 Aug 2020 14:11:45 +0800 Subject: [PATCH 082/360] =?UTF-8?q?=E4=BD=BF=E7=94=A8@DataSource?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/screen/impl/GrassRootsGovernServiceImpl.java | 7 +++++++ .../service/screen/impl/GrassrootsPartyDevServiceImpl.java | 6 ++++++ .../service/screen/impl/PartyMemberLeadServiceImpl.java | 2 ++ 3 files changed, 15 insertions(+) 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 7a41593d68..8b0db2c65a 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 @@ -1,7 +1,9 @@ package com.epmet.datareport.service.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.utils.DateUtils; @@ -50,6 +52,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { * @author wangc * @date 2020.08.20 11:16 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public UserPointRankResultDTO userPointRank(AgencyAndNumFormDTO param) { //默认5 @@ -73,6 +76,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { * @author wangc * @date 2020.08.20 13:55 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public List difficultProject(AgencyNumTypeParamFormDTO param) { if(null == param.getTopNum()){ @@ -93,6 +97,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { * @author wangc * @date 2020.08.20 14:37 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param) { @@ -114,6 +119,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { * @author wangc * @date 2020.08.20 15:32 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public List publicPartiRank(AgencyAndNumFormDTO param) { if(null == param.getTopNum()) param.setTopNum(NumConstant.TWO); @@ -132,6 +138,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { * @author wangc * @date 2020.08.20 17:46 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public List governCapacityRank(AgencyAndNumFormDTO param) { if(null == param.getTopNum()) param.setTopNum(NumConstant.FIVE); 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 f37a0e7e99..51a7a49ff6 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 @@ -1,6 +1,8 @@ package com.epmet.datareport.service.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; @@ -50,6 +52,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService * @author wangc * @date 2020.08.18 14:58 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) { @@ -76,6 +79,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService * @author wangc * @date 2020.08.18 17:54 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param) { return screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId()); @@ -89,6 +93,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService * @author wangc * @date 2020.08.19 11:02 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public BranchBuildTrendResultDTO branchBuildTrend(BranchBuildTrendFormDTO param) { if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){ @@ -158,6 +163,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService * @author wangc * @date 2020.08.19 15:25 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public BranchBuildRankResultDTO branchBuildRank(BranchBuildRankFormDTO param) { if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){ 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/screen/impl/PartyMemberLeadServiceImpl.java index 1757ca5062..b1cecb92bb 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -174,6 +174,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author wangc * @date 2020.08.21 11:05 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public List advancedBranchRank(AgencyAndNumFormDTO param) { if(null == param.getTopNum()){ @@ -204,6 +205,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author wangc * @date 2020.08.21 14:22 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public List advancedPartymemberRank(AgencyAndNumFormDTO param) { if(null == param.getTopNum()) param.setTopNum(NumConstant.TEN); From 7b5b0f737e795d9effedc6621d5b8f9a4932ec4b Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 24 Aug 2020 14:18:47 +0800 Subject: [PATCH 083/360] =?UTF-8?q?=E5=85=AC=E5=BC=8F=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/screen/form/IndexCalculateForm.java | 23 +++ .../controller/IndexCalculateController.java | 154 ++++++++++++++++++ .../epmet/controller/IndexDictController.java | 1 + .../service/screen/IndexCalculateService.java | 17 ++ .../service/screen/ScreenCollService.java | 1 - .../impl/IndexCalculateServiceImpl.java | 14 ++ .../support/normalizing/Correlation.java | 17 ++ .../normalizing/DoubleScoreCalculator.java | 43 +++++ .../normalizing/IntegerScoreCalculator.java | 45 +++++ .../support/normalizing/ScoreCalculator.java | 114 +++++++++++++ 10 files changed, 428 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/IndexCalculateForm.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/Correlation.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/DoubleScoreCalculator.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/IntegerScoreCalculator.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreCalculator.java 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-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/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..e81e4497c3 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; 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..55ccf0bc2d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateServiceImpl.java @@ -0,0 +1,14 @@ +package com.epmet.service.screen.impl; + +import com.epmet.dto.screen.form.IndexCalculateForm; +import com.epmet.service.screen.IndexCalculateService; + +/** + * @author liujianjun + */ +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/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..87f34db1f9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/DoubleScoreCalculator.java @@ -0,0 +1,43 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; + +/** + * 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; + 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..333cd0a4a2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/IntegerScoreCalculator.java @@ -0,0 +1,45 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; + +/** + * 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; + 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..2fb3fab926 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreCalculator.java @@ -0,0 +1,114 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; +import java.math.MathContext; +import java.util.Arrays; + +/** + * 所有数据类型计算器的父类,实现算法骨架,数据类型转换方法则由子类实现 + * @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 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); + +} From 1b0ec6631ba6922eb31adffbeedf38923dea0f66 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 14:31:40 +0800 Subject: [PATCH 084/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=B1=95=E7=A4=BAapi?= =?UTF-8?q?,=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86api,=20?= =?UTF-8?q?=E6=8C=87=E6=A0=87=E9=87=87=E9=9B=86api=E9=A6=96=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-report/data-report-server/pom.xml | 2 +- .../data-statistical-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index 116fd812c5..92658e8199 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.27 + image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.28 ports: - "8109:8109" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index e2239a5081..9b2253722d 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.27 + 0.3.28 data-report-server diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index 0d7479b1ec..85fb72a7f6 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.42 + image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.43 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 95c74f75d1..a7b29a38c9 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.42 + 0.3.43 data-statistical com.epmet From 7a0766dbe1ed92548e4d8f615a38ca7bb50cf10e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 14:56:24 +0800 Subject: [PATCH 085/360] =?UTF-8?q?data=5Fstas=E6=B7=BB=E5=8A=A0stas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-statistical/data-statistical-server/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) 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 From dd014c3eb05b1421adf0d47346a408aa78d865d0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 15:02:12 +0800 Subject: [PATCH 086/360] data_stas 44 --- .../data-statistical-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index 85fb72a7f6..f5a9a4ce24 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.43 + image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.44 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 8d3f61099a..43750a69d6 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.43 + 0.3.44 data-statistical com.epmet From ff800b044cccd1654c398e90a7edb573db69e2e5 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 15:08:54 +0800 Subject: [PATCH 087/360] data_stas --- .../epmet/service/screen/impl/IndexCalculateServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) 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 index 55ccf0bc2d..7aff662edf 100644 --- 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 @@ -2,10 +2,12 @@ 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) { From 54cfd2710a8f16fe69d87933b28dd2da62111f8c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 15:09:43 +0800 Subject: [PATCH 088/360] data_stas 45 --- .../data-statistical-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index f5a9a4ce24..a34bca869d 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.44 + image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.45 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 43750a69d6..de8ffeaea8 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.44 + 0.3.45 data-statistical com.epmet From 4ea75104d860d0277c73827f7306532129370dfb Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 24 Aug 2020 15:55:11 +0800 Subject: [PATCH 089/360] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=88=86=E5=80=BC?= =?UTF-8?q?=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../normalizing/DoubleScoreCalculator.java | 2 +- .../normalizing/IntegerScoreCalculator.java | 2 +- .../support/normalizing/ScoreCalculator.java | 46 ++++++++++++++++++- 3 files changed, 47 insertions(+), 3 deletions(-) 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 index 87f34db1f9..c626602393 100644 --- 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 @@ -17,7 +17,7 @@ public class DoubleScoreCalculator extends ScoreCalculator { * @param correlation 相关性 */ public DoubleScoreCalculator(Double[] sourceArray, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { - this.sourceArrary = sourceArray; + this.sourceArrary = sourceArray.clone(); this.minScore = minScore; this.maxScore = maxScore; this.correlation = correlation; 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 index 333cd0a4a2..7708b83fc0 100644 --- 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 @@ -17,7 +17,7 @@ public class IntegerScoreCalculator extends ScoreCalculator { * @param correlation 相关性 */ public IntegerScoreCalculator(Integer[] sourceArray, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { - this.sourceArrary = sourceArray; + this.sourceArrary = sourceArray.clone(); this.minScore = minScore; this.maxScore = maxScore; this.correlation = correlation; 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 index 2fb3fab926..e3c98d5117 100644 --- 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 @@ -6,6 +6,7 @@ import java.util.Arrays; /** * 所有数据类型计算器的父类,实现算法骨架,数据类型转换方法则由子类实现 + * ☆☆☆ 如果需要保持传入的数组元素顺序不变,请在实现类的构造方法中将传入数组进行克隆 ☆☆☆ * @param 数据类型泛型 */ public abstract class ScoreCalculator { @@ -38,7 +39,7 @@ public abstract class ScoreCalculator { } /** - * 归一算法 + * 单值归一算法 * @return */ public BigDecimal normalize(T sourceValue) { @@ -66,6 +67,49 @@ public abstract class ScoreCalculator { } } + /** + * 单值归一算法,带权重 + * @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 Date: Mon, 24 Aug 2020 16:16:10 +0800 Subject: [PATCH 090/360] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/deploy/docker-compose-prod.yml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-prod.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-prod.yml b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-prod.yml index 0c08e7e115..e7aae13868 100644 --- a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-project-server: container_name: gov-project-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-project-server:0.3.40 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-project-server:0.3.43 ports: - "8102:8102" network_mode: host # 使用现有网络 diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml index a9847b773c..36ea6d03ac 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.118 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.120 ports: - "8087:8087" network_mode: host # 不会创建新的网络 From 24fce0d80817a3b201540df9e151a3a59575ae2d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 16:37:06 +0800 Subject: [PATCH 091/360] =?UTF-8?q?fact=5Findex=5Fparty=5Fablity=5Fcpc=5Fm?= =?UTF-8?q?onthly=E8=A1=A8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexPartyAblityCpcMonthlyEntity.java | 110 +++++++++--------- 1 file changed, 55 insertions(+), 55 deletions(-) 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; - } From b17b7c6c64e478de5130bde54b2c0b9deb013d6c Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 24 Aug 2020 16:49:59 +0800 Subject: [PATCH 092/360] =?UTF-8?q?1=E3=80=81=E5=85=9A=E5=BB=BA=E8=83=BD?= =?UTF-8?q?=E5=8A=9B-=E5=85=9A=E5=91=98=E7=9B=B8=E5=85=B3=E6=8C=87?= =?UTF-8?q?=E6=A0=87=E4=B8=8A=E6=8A=A5=20-=20=E6=8E=A5=E5=8F=A3=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcollect/form/GridPartyMemberDataFormDTO.java | 10 +++++----- .../indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) 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..ffdc7554cd 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 @@ -81,11 +81,6 @@ public class GridPartyMemberDataFormDTO implements Serializable { */ private BigDecimal topicToIssueRatio; - /** - * 提出的议题转项目数 - */ - private Integer issueToProjectCount; - /** * 用户id */ @@ -95,4 +90,9 @@ public class GridPartyMemberDataFormDTO implements Serializable { * 上级组织Id */ private String parentId; + + /** + * 党员自建群活跃群众人数(08-24) + */ + private Integer groupActiveUserCount; } 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..c967efd5fe 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 @@ -21,7 +21,7 @@ - + @@ -56,7 +56,7 @@ GROUP_USER_COUNT, GROUP_TOPIC_COUNT, TOPIC_TO_ISSUE_RATIO, - ISSUE_TO_PROJECT_COUNT, + GROUP_ACTIVE_USER_COUNT, DEL_FLAG, REVISION, CREATED_BY, @@ -83,7 +83,7 @@ #{item.groupUserCount}, #{item.groupTopicCount}, #{item.topicToIssueRatio}, - #{item.issueToProjectCount}, + #{item.groupActiveUserCount}, 0, 0, 'APP_USER', From 971d900b5ba7165a8f69a48ff1438e135ddf672d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 16:53:21 +0800 Subject: [PATCH 093/360] =?UTF-8?q?fact=5Findex=5Fparty=5Fablity=5Fcpc=5Fm?= =?UTF-8?q?onthly=E8=A1=A8=E8=B0=83=E6=95=B4,=E5=88=A0=E9=99=A4user=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java | 5 ----- 1 file changed, 5 deletions(-) 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 689c396b2a..af89b6d401 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 @@ -59,11 +59,6 @@ public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { */ private String gridId; - /** - * 用户Id: - */ - private String userId; - /** * 月维度Id: yyyMM */ From 49eb10c7d1eb8deb021274806980f373af9d5ec6 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 24 Aug 2020 17:00:41 +0800 Subject: [PATCH 094/360] =?UTF-8?q?1=E3=80=81=E5=85=9A=E5=BB=BA=E8=83=BD?= =?UTF-8?q?=E5=8A=9B-=E5=85=9A=E5=91=98=E7=9B=B8=E5=85=B3=E6=8C=87?= =?UTF-8?q?=E6=A0=87=E4=B8=8A=E6=8A=A5=20-=20=E6=8E=A5=E5=8F=A3=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=8F=98=E6=9B=B4=20-=20=E5=88=A0=E9=99=A4userId?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcollect/form/GridPartyMemberDataFormDTO.java | 5 ----- .../dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java | 4 +--- .../epmet/service/indexcollect/FactIndexCollectService.java | 2 +- .../indexcollect/impl/FactIndexCollectServiceImpl.java | 2 +- .../mapper/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml | 5 +---- 5 files changed, 4 insertions(+), 14 deletions(-) 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 ffdc7554cd..ed1fde8844 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 @@ -81,11 +81,6 @@ public class GridPartyMemberDataFormDTO implements Serializable { */ private BigDecimal topicToIssueRatio; - /** - * 用户id - */ - private String userId; - /** * 上级组织Id */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index 387a369af1..92c6c7a9e9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -36,12 +36,11 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(customerId, - formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getUserId(), + formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getYearId(), formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); } factIndexPartyAblityCpcMonthlyDao.batchInsertFactIndexPartyAblityCpcMonthly(formDTO, customerId); 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 c967efd5fe..e8f599bfd2 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 @@ - @@ -32,7 +31,7 @@ delete from fact_index_party_ablity_cpc_monthly - where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND USER_ID = #{userId} + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} @@ -44,7 +43,6 @@ AGENCY_ID, PARENT_ID, GRID_ID, - USER_ID, MONTH_ID, QUARTER_ID, YEAR_ID, @@ -71,7 +69,6 @@ #{item.agencyId}, #{item.parentId}, #{item.gridId}, - #{item.userId}, #{item.monthId}, #{item.quarterId}, #{item.yearId}, From c20a71b9790bcc09ffe2237ffe4a4ca65351c0bb Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 24 Aug 2020 17:10:17 +0800 Subject: [PATCH 095/360] =?UTF-8?q?web=E5=B7=A5=E4=BD=9C=E7=AB=AF-?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-access/gov-access-server/pom.xml | 6 + .../controller/OperLanguageController.java | 85 ++++++ .../epmet/controller/OperMenuController.java | 156 +++++++++++ .../controller/OperResourceController.java | 84 ++++++ .../epmet/controller/OperRoleController.java | 104 ++++++++ .../controller/OperRoleMenuController.java | 85 ++++++ .../controller/OperRoleUserController.java | 132 +++++++++ .../java/com/epmet/dao/OperLanguageDao.java | 28 ++ .../main/java/com/epmet/dao/OperMenuDao.java | 52 ++++ .../java/com/epmet/dao/OperResourceDao.java | 48 ++++ .../main/java/com/epmet/dao/OperRoleDao.java | 24 ++ .../java/com/epmet/dao/OperRoleMenuDao.java | 49 ++++ .../java/com/epmet/dao/OperRoleUserDao.java | 57 ++++ .../com/epmet/entity/OperLanguageEntity.java | 49 ++++ .../java/com/epmet/entity/OperMenuEntity.java | 64 +++++ .../com/epmet/entity/OperResourceEntity.java | 53 ++++ .../java/com/epmet/entity/OperRoleEntity.java | 44 +++ .../com/epmet/entity/OperRoleMenuEntity.java | 36 +++ .../com/epmet/entity/OperRoleUserEntity.java | 37 +++ .../com/epmet/feign/EpmetUserFeignClient.java | 13 + .../EpmetUserFeignClientFallback.java | 7 + .../com/epmet/redis/OperLanguageRedis.java | 47 ++++ .../java/com/epmet/redis/OperMenuRedis.java | 74 ++++++ .../com/epmet/redis/OperResourceRedis.java | 50 ++++ .../com/epmet/redis/OperRoleMenuRedis.java | 47 ++++ .../java/com/epmet/redis/OperRoleRedis.java | 47 ++++ .../com/epmet/redis/OperRoleUserRedis.java | 47 ++++ .../epmet/service/OperLanguageService.java | 105 ++++++++ .../com/epmet/service/OperMenuService.java | 144 ++++++++++ .../epmet/service/OperResourceService.java | 110 ++++++++ .../epmet/service/OperRoleMenuService.java | 125 +++++++++ .../com/epmet/service/OperRoleService.java | 95 +++++++ .../epmet/service/OperRoleUserService.java | 133 ++++++++++ .../service/impl/OperLanguageServiceImpl.java | 121 +++++++++ .../service/impl/OperMenuServiceImpl.java | 250 ++++++++++++++++++ .../service/impl/OperResourceServiceImpl.java | 143 ++++++++++ .../service/impl/OperRoleMenuServiceImpl.java | 150 +++++++++++ .../service/impl/OperRoleServiceImpl.java | 118 +++++++++ .../service/impl/OperRoleUserServiceImpl.java | 156 +++++++++++ .../main/resources/mapper/OperLanguageDao.xml | 21 ++ .../src/main/resources/mapper/OperMenuDao.xml | 42 +++ .../main/resources/mapper/OperResourceDao.xml | 25 ++ .../src/main/resources/mapper/OperRoleDao.xml | 6 + .../main/resources/mapper/OperRoleMenuDao.xml | 25 ++ .../main/resources/mapper/OperRoleUserDao.xml | 32 +++ 45 files changed, 3326 insertions(+) create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperLanguageController.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperMenuController.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperResourceController.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleController.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleMenuController.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleUserController.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperLanguageDao.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperMenuDao.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperResourceDao.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleDao.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleMenuDao.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleUserDao.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperLanguageEntity.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperMenuEntity.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperResourceEntity.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleEntity.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleMenuEntity.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleUserEntity.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperLanguageRedis.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperMenuRedis.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperResourceRedis.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleMenuRedis.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleRedis.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleUserRedis.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperLanguageService.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperMenuService.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperResourceService.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleMenuService.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleService.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleUserService.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperLanguageServiceImpl.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperMenuServiceImpl.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperResourceServiceImpl.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleMenuServiceImpl.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleServiceImpl.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleUserServiceImpl.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperLanguageDao.xml create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperMenuDao.xml create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperResourceDao.xml create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleDao.xml create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleMenuDao.xml create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleUserDao.xml diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index f8d9426042..b7bc8e27bc 100644 --- a/epmet-module/gov-access/gov-access-server/pom.xml +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -72,6 +72,12 @@ feign-httpclient 10.3.0 + + com.epmet + oper-access-client + 2.0.0 + compile + diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperLanguageController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperLanguageController.java new file mode 100644 index 0000000000..e14545c317 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperLanguageController.java @@ -0,0 +1,85 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.OperLanguageDTO; +import com.epmet.service.OperLanguageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 国际化 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@RestController +@RequestMapping("operlanguage") +public class OperLanguageController { + + @Autowired + private OperLanguageService operLanguageService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = operLanguageService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + OperLanguageDTO data = operLanguageService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody OperLanguageDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + operLanguageService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody OperLanguageDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + operLanguageService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + operLanguageService.delete(ids); + return new Result(); + } + + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperMenuController.java new file mode 100644 index 0000000000..b1f96c1692 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperMenuController.java @@ -0,0 +1,156 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.exception.ErrorCode; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.OperMenuDTO; +import com.epmet.dto.result.MenuResourceDTO; +import com.epmet.service.OperMenuService; +import com.epmet.service.OperResourceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * + * 菜单管理 + * + * @author zhaoqifeng + * @date 2020/3/17 16:35 + */ +@RestController +@RequestMapping("menu") +public class OperMenuController { + + @Autowired + private OperMenuService operMenuService; + + @Autowired + private OperResourceService operResourceService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = operMenuService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + OperMenuDTO data = operMenuService.get(id); + + //菜单资源列表 + List resourceList = operResourceService.getMenuResourceList(id); + + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody OperMenuDTO dto, @LoginUser TokenDto tokenDto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + operMenuService.save(dto,tokenDto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody OperMenuDTO dto, @LoginUser TokenDto tokenDto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + operMenuService.update(dto,tokenDto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + operMenuService.delete(ids); + return new Result(); + } + + @DeleteMapping("{id}") + public Result delete(@PathVariable("id") String id, @LoginUser TokenDto tokenDto){ + //效验数据 + AssertUtils.isNull(id, "id"); + + //判断是否有子菜单或按钮 + List list = operMenuService.getListPid(id); + if(list.size() > 0){ + return new Result().error(ErrorCode.SUB_MENU_EXIST); + } + + operMenuService.delete(id, tokenDto); + + return new Result(); + } + + + /** + * 获取菜单列表 + * @param type 类型 + * @return Result> + */ + @GetMapping("list") + public Result> list(Integer type){ + List list = operMenuService.getMenuList(type); + + return new Result>().ok(list); + } + + /** + * 导航 + * @param tokenDto token + * @return List + */ + @GetMapping("nav") + public Result> nav(@LoginUser TokenDto tokenDto){ + List list = operMenuService.getUserMenuNavList(tokenDto); + return new Result>().ok(list); + } + + /** + * 权限标识 + * @param tokenDto token + * @return Set + */ + @GetMapping("permissions") + public Result> permissions(@LoginUser TokenDto tokenDto){ + Set set = operMenuService.getUserPermissions(tokenDto); + return new Result>().ok(set); + } + + /** + * 角色菜单权限 + * @param tokenDto token + * @return + */ + @GetMapping("select") + public Result> select(@LoginUser TokenDto tokenDto){ + List list = operMenuService.getUserMenuList(tokenDto, null); + + return new Result>().ok(list); + } + + /** + * @param tokenDto + * @return com.epmet.commons.tools.utils.Result + * @Author yinzuomei + * @Description 运营端用户退出系统,清空菜单和操作权限 + * @Date 2020/5/21 18:07 + **/ + @GetMapping("clearoperuseraccess") + public Result clearOperUserAccess(@LoginUser TokenDto tokenDto) { + operMenuService.clearOperUserAccess(tokenDto.getApp(), tokenDto.getClient(), tokenDto.getUserId()); + return new Result(); + } +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperResourceController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperResourceController.java new file mode 100644 index 0000000000..8bda911e28 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperResourceController.java @@ -0,0 +1,84 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.OperResourceDTO; +import com.epmet.service.OperResourceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 资源管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@RestController +@RequestMapping("operresource") +public class OperResourceController { + + @Autowired + private OperResourceService operResourceService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = operResourceService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + OperResourceDTO data = operResourceService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody OperResourceDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + operResourceService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody OperResourceDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + operResourceService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + operResourceService.delete(ids); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleController.java new file mode 100644 index 0000000000..33659c8c03 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleController.java @@ -0,0 +1,104 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.OperRoleDTO; +import com.epmet.service.OperRoleMenuService; +import com.epmet.service.OperRoleService; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * 角色管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@RestController +@RequestMapping("operrole") +public class OperRoleController { + + @Autowired + private OperRoleService operRoleService; + @Autowired + private OperRoleMenuService operRoleMenuService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = operRoleService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + OperRoleDTO data = operRoleService.get(id); + + //查询角色对应的菜单 + List menuIdList = operRoleMenuService.getMenuIdList(id); + data.setMenuIdList(menuIdList); + + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody OperRoleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + operRoleService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody OperRoleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + operRoleService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + operRoleService.delete(ids); + return new Result(); + } + + + @GetMapping("list") + @ApiOperation("列表") + public Result> list(){ + List data = operRoleService.list(new HashMap<>(1)); + + return new Result>().ok(data); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleMenuController.java new file mode 100644 index 0000000000..6520623e16 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleMenuController.java @@ -0,0 +1,85 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.OperRoleMenuDTO; +import com.epmet.service.OperRoleMenuService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 角色菜单关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@RestController +@RequestMapping("operrolemenu") +public class OperRoleMenuController { + + @Autowired + private OperRoleMenuService operRoleMenuService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = operRoleMenuService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + OperRoleMenuDTO data = operRoleMenuService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody OperRoleMenuDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + operRoleMenuService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody OperRoleMenuDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + operRoleMenuService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + operRoleMenuService.delete(ids); + return new Result(); + } + + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleUserController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleUserController.java new file mode 100644 index 0000000000..b58bfd322b --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleUserController.java @@ -0,0 +1,132 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.dto.OperRoleUserDTO; +import com.epmet.service.OperRoleUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + + +/** + * 角色用户关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@RestController +@RequestMapping("operroleuser") +public class OperRoleUserController { + + @Autowired + private OperRoleUserService operRoleUserService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = operRoleUserService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + OperRoleUserDTO data = operRoleUserService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody OperRoleUserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + operRoleUserService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody OperRoleUserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + operRoleUserService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + operRoleUserService.delete(ids); + return new Result(); + } + + + /** + * 获取权限id列表 + * @param id 用户id + * @return List + * @author zhaoqifeng + */ + @GetMapping("getRoleIdList/{id}") + public Result>getRoleIdList(@PathVariable("id") String id) { + List list = operRoleUserService.getRoleIdList(id); + return new Result>().ok(list); + } + + /** + * 保存更新权限 + * @param userId 用户id + * @param roleIdList 权限列表 + * @author zhaoqifeng + */ + @PostMapping("saveOrUpdateRole") + public Result saveOrUpdate(@RequestParam("userId") String userId, @RequestBody List roleIdList) { + operRoleUserService.saveOrUpdate(userId, roleIdList); + return new Result(); + } + + /** + * 根据用户id,删除角色用户关系 + * @param id 用户id + * @return Result + */ + @PostMapping("deleteByUserId") + public Result deleteByUserId(String id) { + operRoleUserService.deleteByUserId(id); + return new Result(); + } + + /** + * 根据用户ids,删除角色用户关系 + * @param ids 用户ids + * @return Result + */ + @PostMapping("deleteByUserIds") + public Result deleteByUserIds(@RequestBody String[] ids) { + operRoleUserService.deleteByUserIds(ids); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperLanguageDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperLanguageDao.java new file mode 100644 index 0000000000..dfca54a9ab --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperLanguageDao.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.OperLanguageEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 国际化 + * + * @author Mark sunlightcs@gmail.com + */ +@Mapper +public interface OperLanguageDao extends BaseDao { + + OperLanguageEntity getLanguage(OperLanguageEntity entity); + + void updateLanguage(OperLanguageEntity entity); + + void insertOperLanguageEntity(OperLanguageEntity entity); +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperMenuDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperMenuDao.java new file mode 100644 index 0000000000..2858a76f24 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperMenuDao.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.OperMenuEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 菜单管理 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Mapper +public interface OperMenuDao extends BaseDao { + + OperMenuEntity getById(@Param("id") String id, @Param("language") String language); + + /** + * 查询所有菜单列表 + * + * @param type 菜单类型 + * @param language 语言 + */ + List getMenuList(@Param("type") Integer type, @Param("language") String language); + + /** + * 查询用户菜单列表 + * + * @param userId 用户ID + * @param type 菜单类型 + * @param language 语言 + */ + List getUserMenuList(@Param("userId") String userId, @Param("type") Integer type, @Param("language") String language); + + + /** + * 根据父菜单,查询子菜单 + * @param pid 父菜单ID + */ + List getListPid(String pid); +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperResourceDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperResourceDao.java new file mode 100644 index 0000000000..b92caee0d7 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperResourceDao.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.OperResourceEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 资源管理 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Mapper +public interface OperResourceDao extends BaseDao { + /** + * 根据资源编码,删除对应的资源 + * @param code 资源编码 + */ + void deleteByCode(String code); + + /** + * 获取资源列表 + * @param menuId 菜单ID + */ + List getMenuResourceList(String menuId); + + /** + * 获取所有资源列表 + */ + List getResourceList(); + + /** + * 获取用户资源列表 + * @param userId 用户ID + */ + List getUserResourceList(@Param("userId") String userId); +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleDao.java new file mode 100644 index 0000000000..408a5275f5 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleDao.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.OperRoleEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 角色管理 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Mapper +public interface OperRoleDao extends BaseDao { + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleMenuDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleMenuDao.java new file mode 100644 index 0000000000..005f9e44ac --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleMenuDao.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.OperRoleMenuEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 角色菜单关系 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Mapper +public interface OperRoleMenuDao extends BaseDao { + + /** + * 根据角色ID,获取菜单ID列表 + */ + List getMenuIdList(String roleId); + + /** + * 根据角色id,删除角色菜单关系 + * @param roleId 角色id + */ + void deleteByRoleId(String roleId); + + /** + * 根据菜单id,删除角色菜单关系 + * @param menuId 菜单id + */ + void deleteByMenuId(String menuId); + + + /** + * 根据角色ids,删除角色菜单关系 + * @param roleIds 角色ids + */ + void deleteByRoleIds(String[] roleIds); +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleUserDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleUserDao.java new file mode 100644 index 0000000000..f33c5a241a --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleUserDao.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.OperRoleUserEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 角色用户关系 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Mapper +public interface OperRoleUserDao extends BaseDao { + + /** + * 根据角色ids,删除角色用户关系 + * @param roleIds 角色ids + */ + void deleteByRoleIds(String[] roleIds); + + /** + * 根据用户ids,删除角色用户关系 + * @param userIds 用户ids + */ + void deleteByUserIds(String[] userIds); + + /** + * 根据角色id,删除角色用户关系 + * @param roleId 角色id + */ + void deleteByRoleId(String roleId); + + /** + * 根据用户id,删除角色用户关系 + * @param userId 用户id + */ + void deleteByUserId(String userId); + + /** + * 角色ID列表 + * @param userId 用户ID + * + * @return + */ + List getRoleIdList(String userId); +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperLanguageEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperLanguageEntity.java new file mode 100644 index 0000000000..3e822d5665 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperLanguageEntity.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +/** + * 国际化 + * + * @author Mark sunlightcs@gmail.com + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("oper_language") +public class OperLanguageEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 表名 + */ + private String tableName; + /** + * 表主键 + */ + private String tableId; + /** + * 字段名 + */ + private String fieldName; + /** + * 字段值 + */ + private String fieldValue; + /** + * 语言 + */ + private String language; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperMenuEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperMenuEntity.java new file mode 100644 index 0000000000..ba621edcc0 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperMenuEntity.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 菜单管理 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("oper_menu") +public class OperMenuEntity extends BaseEpmetEntity { + private static final long serialVersionUID = 1L; + + /** + * 上级ID,一级菜单为0 + */ + private String pid; + /** + * 菜单名称 + */ + @TableField(exist = false) + private String name; + /** + * 菜单URL + */ + private String url; + /** + * 类型 0:菜单 1:按钮 + */ + private Integer type; + /** + * 菜单图标 + */ + private String icon; + /** + * 权限标识,如:sys:menu:save + */ + private String permissions; + /** + * 排序 + */ + private Integer sort; + /** + * 上级菜单名称 + */ + @TableField(exist = false) + private String parentName; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperResourceEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperResourceEntity.java new file mode 100644 index 0000000000..7afd722bd2 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperResourceEntity.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 资源管理 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("oper_resource") +public class OperResourceEntity extends BaseEpmetEntity { + private static final long serialVersionUID = 1L; + + /** + * 资源编码,如菜单ID + */ + private String resourceCode; + /** + * 资源名称 + */ + private String resourceName; + /** + * 资源URL + */ + private String resourceUrl; + /** + * 请求方式(如:GET、POST、PUT、DELETE) + */ + private String resourceMethod; + /** + * 菜单标识 0:非菜单资源 1:菜单资源 + */ + private Integer menuFlag; + /** + * 认证等级 0:权限认证 1:登录认证 2:无需认证 + */ + private Integer authLevel; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleEntity.java new file mode 100644 index 0000000000..7fd5393e7e --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleEntity.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 角色管理 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("oper_role") +public class OperRoleEntity extends BaseEpmetEntity { + private static final long serialVersionUID = 1L; + + /** + * 角色名称 + */ + private String name; + /** + * 备注 + */ + private String remark; + /** + * 部门ID + */ + @TableField(fill = FieldFill.INSERT) + private Long deptId; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleMenuEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleMenuEntity.java new file mode 100644 index 0000000000..650619ffa9 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleMenuEntity.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 角色菜单关系 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("oper_role_menu") +public class OperRoleMenuEntity extends BaseEpmetEntity { + private static final long serialVersionUID = 1L; + /** + * 角色ID + */ + private String roleId; + /** + * 菜单ID + */ + private String menuId; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleUserEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleUserEntity.java new file mode 100644 index 0000000000..8eb9612417 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleUserEntity.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 角色用户关系 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("oper_role_user") +public class OperRoleUserEntity extends BaseEpmetEntity { + private static final long serialVersionUID = 1L; + + /** + * 角色ID + */ + private String roleId; + /** + * 用户ID + */ + private String userId; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java index eaabe43f49..d88b8358a3 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java @@ -3,6 +3,7 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.GovStaffRoleDTO; +import com.epmet.dto.OperUserDTO; import com.epmet.dto.form.LatestGridFormDTO; import com.epmet.dto.form.StaffGridVisitedFormDTO; import com.epmet.dto.form.StaffRoleFormDTO; @@ -60,5 +61,17 @@ public interface EpmetUserFeignClient { */ @PostMapping("/epmetuser/staffrole/staffroles") Result> getRolesOfStaff(StaffRoleFormDTO staffRoleFormDTO); + + /** + * + * 根据id查询运营人员详情 + * + * @param operUserId oper_user表主键 + * @return com.epmet.commons.tools.utils.Result> + * @author zhaoqifeng + * @date 2020/3/19 09:28 + **/ + @GetMapping("/operuser/queryOperUserDtoById/{operUserId}") + Result info(@PathVariable("operUserId") String operUserId); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java index 12a4b4e6c6..cd39c87452 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.GovStaffRoleDTO; +import com.epmet.dto.OperUserDTO; import com.epmet.dto.form.LatestGridFormDTO; import com.epmet.dto.form.StaffGridVisitedFormDTO; import com.epmet.dto.form.StaffRoleFormDTO; @@ -31,6 +32,12 @@ public class EpmetUserFeignClientFallback implements EpmetUserFeignClient { public Result> getRolesOfStaff(StaffRoleFormDTO staffRoleFormDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getRolesOfStaff"); } + + @Override + public Result info(String operUserId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "info", operUserId); + } + @Override public Result getStaffLatestGrid(LatestGridFormDTO latestGridFormDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffLatestGrid",latestGridFormDTO); diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperLanguageRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperLanguageRedis.java new file mode 100644 index 0000000000..fa479f92ca --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperLanguageRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 国际化 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Component +public class OperLanguageRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperMenuRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperMenuRedis.java new file mode 100644 index 0000000000..f1b568f33a --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperMenuRedis.java @@ -0,0 +1,74 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.commons.tools.utils.HttpContextUtils; +import com.epmet.dto.OperMenuDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Set; + +/** + * 菜单管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Component +public class OperMenuRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(String userId, String app, String client) { + redisUtils.deleteByPattern(RedisKeys.getUserMenuNavKey(userId, app, client, HttpContextUtils.getLanguage())); + redisUtils.delete(RedisKeys.getUserPermissionsKey(userId, app, client)); + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + + public void setUserMenuNavList(String userId, String app, String client, List menuList){ + String key = RedisKeys.getUserMenuNavKey(userId, app, client, HttpContextUtils.getLanguage()); + redisUtils.set(key, menuList); + } + + public List getUserMenuNavList(String userId, String app, String client){ + String key = RedisKeys.getUserMenuNavKey(userId, app, client, HttpContextUtils.getLanguage()); + return (List)redisUtils.get(key); + } + + public void setUserPermissions(String userId, String app, String client, Set permsSet){ + String key = RedisKeys.getUserPermissionsKey(userId, app, client); + redisUtils.set(key, permsSet); + } + + public Set getUserPermissions(String userId, String app, String client){ + String key = RedisKeys.getUserPermissionsKey(userId, app, client); + return (Set)redisUtils.get(key); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperResourceRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperResourceRedis.java new file mode 100644 index 0000000000..68ea39a15e --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperResourceRedis.java @@ -0,0 +1,50 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 资源管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Component +public class OperResourceRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete() { + String key = RedisKeys.getSysResourceKey(); + + redisUtils.delete(key); + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleMenuRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleMenuRedis.java new file mode 100644 index 0000000000..28f98c5615 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleMenuRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 角色菜单关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Component +public class OperRoleMenuRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleRedis.java new file mode 100644 index 0000000000..15e6682155 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 角色管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Component +public class OperRoleRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleUserRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleUserRedis.java new file mode 100644 index 0000000000..7f6df90fa3 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleUserRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 角色用户关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Component +public class OperRoleUserRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperLanguageService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperLanguageService.java new file mode 100644 index 0000000000..0f0ad555bc --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperLanguageService.java @@ -0,0 +1,105 @@ +/** + * 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.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.OperLanguageDTO; +import com.epmet.entity.OperLanguageEntity; + +import java.util.List; +import java.util.Map; + +/** + * 国际化 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +public interface OperLanguageService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return OperLanguageDTO + * @author generator + * @date 2020-03-18 + */ + OperLanguageDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void save(OperLanguageDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void update(OperLanguageDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-18 + */ + void delete(String[] ids); + + /** + * 保存或更新 + * @param tableName 表名 + * @param tableId 表主键 + * @param fieldName 字段名 + * @param fieldValue 字段值 + * @param language 语言 + */ + void saveOrUpdate(String tableName, String tableId, String fieldName, String fieldValue, String language); +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperMenuService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperMenuService.java new file mode 100644 index 0000000000..70794bc18b --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperMenuService.java @@ -0,0 +1,144 @@ +/** + * 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.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.dto.OperMenuDTO; +import com.epmet.entity.OperMenuEntity; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * 菜单管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +public interface OperMenuService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return OperMenuDTO + * @author generator + * @date 2020-03-18 + */ + OperMenuDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void save(OperMenuDTO dto, TokenDto tokenDto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void update(OperMenuDTO dto, TokenDto tokenDto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-18 + */ + void delete(String[] ids); + + /** + * 删除 + * + * @param id id + * @author generator + * @date 2020-03-18 + */ + void delete(String id, TokenDto tokenDto); + + /** + * 用户菜单列表 + * + * @param tokenDto 用户信息 + * @param type 菜单类型 + * @return java.util.List + */ + List getUserMenuList(TokenDto tokenDto, Integer type); + + /** + * 菜单列表 + * + * @param type 菜单类型 + */ + List getMenuList(Integer type); + + /** + * 用户菜单导航 + * @param tokenDto 用户信息 + * @return java.util.List + */ + List getUserMenuNavList(TokenDto tokenDto); + + /** + * 获取用户权限标识 + * @param tokenDto 用户信息 + * @return java.util.Set + */ + Set getUserPermissions(TokenDto tokenDto); + + /** + * 根据父菜单,查询子菜单 + * @param pid 父菜单ID + */ + List getListPid(String pid); + + void clearOperUserAccess(String app, String client, String userId); +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperResourceService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperResourceService.java new file mode 100644 index 0000000000..560e097c0b --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperResourceService.java @@ -0,0 +1,110 @@ +/** + * 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.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.OperResourceDTO; +import com.epmet.dto.result.MenuResourceDTO; +import com.epmet.entity.OperResourceEntity; + +import java.util.List; +import java.util.Map; + +/** + * 资源管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +public interface OperResourceService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return OperResourceDTO + * @author generator + * @date 2020-03-18 + */ + OperResourceDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void save(OperResourceDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void update(OperResourceDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-18 + */ + void delete(String[] ids); + + /** + * 保存菜单资源 + * @param menuId 菜单ID + * @param menuName 菜单名称 + * @param resourceList 资源列表 + */ + void saveMenuResource(String menuId, String menuName, List resourceList); + + /** + * 获取菜单资源列表 + * @param menuId 菜单ID + */ + List getMenuResourceList(String menuId); +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleMenuService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleMenuService.java new file mode 100644 index 0000000000..84cfe6d996 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleMenuService.java @@ -0,0 +1,125 @@ +/** + * 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.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.OperRoleMenuDTO; +import com.epmet.entity.OperRoleMenuEntity; + +import java.util.List; +import java.util.Map; + +/** + * 角色菜单关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +public interface OperRoleMenuService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return OperRoleMenuDTO + * @author generator + * @date 2020-03-18 + */ + OperRoleMenuDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void save(OperRoleMenuDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void update(OperRoleMenuDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-18 + */ + void delete(String[] ids); + + /** + * 根据角色ID,获取菜单ID列表 + */ + List getMenuIdList(String roleId); + + /** + * 保存或修改 + * @param roleId 角色ID + * @param menuIdList 菜单ID列表 + */ + void saveOrUpdate(String roleId, List menuIdList); + + /** + * 根据角色id,删除角色菜单关系 + * @param roleId 角色id + */ + void deleteByRoleId(String roleId); + + /** + * 根据角色ids,删除角色菜单关系 + * @param roleIds + */ + void deleteByRoleIds(String[] roleIds); + + /** + * 根据菜单id,删除角色菜单关系 + * @param menuId 菜单id + */ + void deleteByMenuId(String menuId); +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleService.java new file mode 100644 index 0000000000..b4368ca747 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleService.java @@ -0,0 +1,95 @@ +/** + * 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.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.OperRoleDTO; +import com.epmet.entity.OperRoleEntity; + +import java.util.List; +import java.util.Map; + +/** + * 角色管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +public interface OperRoleService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return OperRoleDTO + * @author generator + * @date 2020-03-18 + */ + OperRoleDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void save(OperRoleDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void update(OperRoleDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-18 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleUserService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleUserService.java new file mode 100644 index 0000000000..c2e323528c --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleUserService.java @@ -0,0 +1,133 @@ +/** + * 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.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.OperRoleUserDTO; +import com.epmet.entity.OperRoleUserEntity; + +import java.util.List; +import java.util.Map; + +/** + * 角色用户关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +public interface OperRoleUserService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-18 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-18 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return OperRoleUserDTO + * @author generator + * @date 2020-03-18 + */ + OperRoleUserDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void save(OperRoleUserDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-18 + */ + void update(OperRoleUserDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-18 + */ + void delete(String[] ids); + + /** + * 保存或修改 + * @param userId 用户ID + * @param roleIdList 角色ID列表 + */ + void saveOrUpdate(String userId, List roleIdList); + + /** + * 根据角色id,删除角色用户关系 + * @param roleId 角色id + */ + void deleteByRoleId(String roleId); + + /** + * 根据用户id,删除角色用户关系 + * @param userId 用户id + */ + void deleteByUserId(String userId); + + /** + * 角色ID列表 + * @param userId 用户ID + * @return List + */ + List getRoleIdList(String userId); + + /** + * 根据角色ids,删除角色用户关系 + * @param roleIds 角色ids + */ + void deleteByRoleIds(String[] roleIds); + + /** + * 根据用户ids,删除角色用户关系 + * @param userIds 用户ids + */ + void deleteByUserIds(String[] userIds); +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperLanguageServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperLanguageServiceImpl.java new file mode 100644 index 0000000000..bc07525c87 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperLanguageServiceImpl.java @@ -0,0 +1,121 @@ +/** + * 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.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.OperLanguageDao; +import com.epmet.dto.OperLanguageDTO; +import com.epmet.entity.OperLanguageEntity; +import com.epmet.redis.OperLanguageRedis; +import com.epmet.service.OperLanguageService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 国际化 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Service +public class OperLanguageServiceImpl extends BaseServiceImpl implements OperLanguageService { + + @Autowired + private OperLanguageRedis operLanguageRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, OperLanguageDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, OperLanguageDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public OperLanguageDTO get(String id) { + OperLanguageEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, OperLanguageDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(OperLanguageDTO dto) { + OperLanguageEntity entity = ConvertUtils.sourceToTarget(dto, OperLanguageEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(OperLanguageDTO dto) { + OperLanguageEntity entity = ConvertUtils.sourceToTarget(dto, OperLanguageEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public void saveOrUpdate(String tableName, String tableId, String fieldName, String fieldValue, String language) { + OperLanguageEntity entity = new OperLanguageEntity(); + entity.setTableName(tableName); + entity.setTableId(tableId); + entity.setFieldName(fieldName); + entity.setFieldValue(fieldValue); + entity.setLanguage(language); + + //判断是否有数据 + if(baseDao.getLanguage(entity) == null){ + baseDao.insertOperLanguageEntity(entity); + }else { + baseDao.updateLanguage(entity); + } + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperMenuServiceImpl.java new file mode 100644 index 0000000000..281192dbb8 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperMenuServiceImpl.java @@ -0,0 +1,250 @@ +/** + * 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.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.Constant; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.enums.SuperAdminEnum; +import com.epmet.commons.tools.exception.ErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.HttpContextUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.TreeUtils; +import com.epmet.dao.OperMenuDao; +import com.epmet.dto.OperMenuDTO; +import com.epmet.dto.OperUserDTO; +import com.epmet.entity.OperMenuEntity; +import com.epmet.enums.MenuTypeEnum; +import com.epmet.feign.EpmetUserFeignClient; +import com.epmet.redis.OperMenuRedis; +import com.epmet.service.OperLanguageService; +import com.epmet.service.OperMenuService; +import com.epmet.service.OperResourceService; +import com.epmet.service.OperRoleMenuService; +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.transaction.annotation.Transactional; + +import java.util.*; + +/** + * 菜单管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Service +public class OperMenuServiceImpl extends BaseServiceImpl implements OperMenuService { + protected Logger logger = LoggerFactory.getLogger(getClass()); + @Autowired + private OperMenuRedis operMenuRedis; + @Autowired + private EpmetUserFeignClient epmetUserFeignClient; + @Autowired + private OperRoleMenuService operRoleMenuService; + @Autowired + private OperResourceService operResourceService; + @Autowired + private OperLanguageService operLanguageService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, OperMenuDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, OperMenuDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public OperMenuDTO get(String id) { + OperMenuEntity entity = baseDao.getById(id, HttpContextUtils.getLanguage()); + + return ConvertUtils.sourceToTarget(entity, OperMenuDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(OperMenuDTO dto, TokenDto tokenDto) { + OperMenuEntity entity = ConvertUtils.sourceToTarget(dto, OperMenuEntity.class); + + //保存菜单 + insert(entity); + saveLanguage(entity.getId(), "name", entity.getName()); + + //保存菜单资源 + operResourceService.saveMenuResource(entity.getId(), entity.getName(), dto.getResourceList()); + + //清空当前用户,菜单导航、权限标识 + operMenuRedis.delete(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(OperMenuDTO dto, TokenDto tokenDto) { + OperMenuEntity entity = ConvertUtils.sourceToTarget(dto, OperMenuEntity.class); + + //上级菜单不能为自身 + if(entity.getId().equals(entity.getPid())){ + throw new RenException(ErrorCode.SUPERIOR_MENU_ERROR); + } + + //更新菜单 + updateById(entity); + saveLanguage(entity.getId(), "name", entity.getName()); + + //更新菜单资源 + operResourceService.saveMenuResource(entity.getId(), entity.getName(), dto.getResourceList()); + + //清空当前用户,菜单导航、权限标识 + operMenuRedis.delete(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String id, TokenDto tokenDto) { + //逻辑删除 + baseDao.deleteBatchIds(Collections.singletonList(id)); + //删除角色菜单关系 + operRoleMenuService.deleteByMenuId(id); + + //清空当前用户,菜单导航、权限标识 + operMenuRedis.delete(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); + } + + @Override + public List getUserMenuList(TokenDto tokenDto, Integer type) { + List menuList; + +// Result operUserDTOResult = epmetUserFeignClient.info(tokenDto.getUserId()); + +// //系统管理员,拥有最高权限 +// if(operUserDTOResult.getData().getSuperAdmin() == SuperAdminEnum.YES.value()){ + menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); +// }else { +// menuList = baseDao.getUserMenuList(tokenDto.getUserId(), type, HttpContextUtils.getLanguage()); +// } + + List dtoList = ConvertUtils.sourceToTarget(menuList, OperMenuDTO.class); + + return TreeUtils.buildTree(dtoList); + } + + @Override + public List getMenuList(Integer type) { + List menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); + + List dtoList = ConvertUtils.sourceToTarget(menuList, OperMenuDTO.class); + + return TreeUtils.buildTree(dtoList, Constant.OPER_MENU_ROOT); + } + + @Override + public List getUserMenuNavList(TokenDto tokenDto) { + List menuList = operMenuRedis.getUserMenuNavList(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); + if(menuList == null){ + menuList = getUserMenuList(tokenDto, MenuTypeEnum.MENU.value()); + + operMenuRedis.setUserMenuNavList(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient(), menuList); + } + + return menuList; + } + + @Override + public Set getUserPermissions(TokenDto tokenDto) { + //用户权限列表 + Set permsSet = operMenuRedis.getUserPermissions(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); + if(permsSet != null){ + return permsSet; + } + +// Result operUserDTOResult = epmetUserFeignClient.info(tokenDto.getUserId()); + + //超级管理员,拥有最高权限 + List menuList; +// if(operUserDTOResult.getData().getSuperAdmin() == SuperAdminEnum.YES.value()){ + menuList = baseDao.getMenuList(MenuTypeEnum.BUTTON.value(), HttpContextUtils.getLanguage()); +// }else{ +// menuList = baseDao.getUserMenuList(tokenDto.getUserId(), MenuTypeEnum.BUTTON.value(), HttpContextUtils.getLanguage()); +// } + + permsSet = new HashSet<>(); + for(OperMenuEntity menu : menuList){ + if(StringUtils.isNotBlank(menu.getPermissions())){ + permsSet.add(menu.getPermissions()); + } + } + + //保存到缓存 + operMenuRedis.setUserPermissions(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient(), permsSet); + + return permsSet; + } + + @Override + public List getListPid(String pid) { + List menuList = baseDao.getListPid(pid); + + return ConvertUtils.sourceToTarget(menuList, OperMenuDTO.class); + } + + @Override + public void clearOperUserAccess(String app, String client, String userId) { + //清空当前用户,菜单导航、权限标识 + operMenuRedis.delete(userId, app, client); + logger.info(String.format("运营端用户退出系统%s,清空菜单、权限成功",userId)); + } + + private void saveLanguage(String tableId, String fieldName, String fieldValue){ + operLanguageService.saveOrUpdate("oper_menu", tableId, fieldName, fieldValue, HttpContextUtils.getLanguage()); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperResourceServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperResourceServiceImpl.java new file mode 100644 index 0000000000..c12d519b2c --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperResourceServiceImpl.java @@ -0,0 +1,143 @@ +/** + * 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.service.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.enums.ResourceAuthEnum; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.OperResourceDao; +import com.epmet.dto.OperResourceDTO; +import com.epmet.dto.result.MenuResourceDTO; +import com.epmet.entity.OperResourceEntity; +import com.epmet.enums.MenuFlagEnum; +import com.epmet.redis.OperResourceRedis; +import com.epmet.service.OperResourceService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 资源管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Service +public class OperResourceServiceImpl extends BaseServiceImpl implements OperResourceService { + + @Autowired + private OperResourceRedis operResourceRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, OperResourceDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, OperResourceDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public OperResourceDTO get(String id) { + OperResourceEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, OperResourceDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(OperResourceDTO dto) { + OperResourceEntity entity = ConvertUtils.sourceToTarget(dto, OperResourceEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(OperResourceDTO dto) { + OperResourceEntity entity = ConvertUtils.sourceToTarget(dto, OperResourceEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public void saveMenuResource(String menuId, String menuName, List resourceList) { + //先删除菜单资源关系 + baseDao.deleteByCode(menuId+""); + + //删除缓存 + operResourceRedis.delete(); + + //菜单没有一个资源的情况 + if(CollUtil.isEmpty(resourceList)){ + return ; + } + + //保存菜单资源关系 + for(MenuResourceDTO dto : resourceList){ + OperResourceEntity entity = new OperResourceEntity(); + entity.setResourceCode(menuId+""); + entity.setResourceName(menuName); + entity.setResourceUrl(dto.getResourceUrl()); + entity.setResourceMethod(dto.getResourceMethod()); + entity.setAuthLevel(ResourceAuthEnum.PERMISSIONS_AUTH.value()); + entity.setMenuFlag(MenuFlagEnum.YES.value()); + + //保存 + insert(entity); + } + } + + @Override + public List getMenuResourceList(String menuId) { + List entityList = baseDao.getMenuResourceList(menuId+""); + + return ConvertUtils.sourceToTarget(entityList, MenuResourceDTO.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleMenuServiceImpl.java new file mode 100644 index 0000000000..f4206928b9 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleMenuServiceImpl.java @@ -0,0 +1,150 @@ +/** + * 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.service.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.OperRoleMenuDao; +import com.epmet.dto.OperRoleMenuDTO; +import com.epmet.entity.OperRoleMenuEntity; +import com.epmet.redis.OperRoleMenuRedis; +import com.epmet.service.OperRoleMenuService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 角色菜单关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Service +public class OperRoleMenuServiceImpl extends BaseServiceImpl implements OperRoleMenuService { + + @Autowired + private OperRoleMenuRedis operRoleMenuRedis; + @Autowired + private OperRoleMenuDao operRoleMenuDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, OperRoleMenuDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, OperRoleMenuDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public OperRoleMenuDTO get(String id) { + OperRoleMenuEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, OperRoleMenuDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(OperRoleMenuDTO dto) { + OperRoleMenuEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleMenuEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(OperRoleMenuDTO dto) { + OperRoleMenuEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleMenuEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List getMenuIdList(String roleId){ + return baseDao.getMenuIdList(roleId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveOrUpdate(String roleId, List menuIdList) { + //先删除角色菜单关系 + deleteByRoleId(roleId); + + //角色没有一个菜单权限的情况 + if(CollUtil.isEmpty(menuIdList)){ + return ; + } + + //保存角色菜单关系 + for(String menuId : menuIdList){ + OperRoleMenuEntity operRoleMenuEntity = new OperRoleMenuEntity(); + operRoleMenuEntity.setMenuId(menuId); + operRoleMenuEntity.setRoleId(roleId); + + //保存 + insert(operRoleMenuEntity); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByRoleId(String roleId) { + baseDao.deleteByRoleId(roleId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByRoleIds(String[] roleIds) { + operRoleMenuDao.deleteByRoleIds(roleIds); + } + + @Override + public void deleteByMenuId(String menuId) { + baseDao.deleteByMenuId(menuId); + } +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleServiceImpl.java new file mode 100644 index 0000000000..ba733194ad --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleServiceImpl.java @@ -0,0 +1,118 @@ +/** + * 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.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.OperRoleDao; +import com.epmet.dto.OperRoleDTO; +import com.epmet.entity.OperRoleEntity; +import com.epmet.redis.OperRoleRedis; +import com.epmet.service.OperRoleMenuService; +import com.epmet.service.OperRoleService; +import com.epmet.service.OperRoleUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 角色管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Service +public class OperRoleServiceImpl extends BaseServiceImpl implements OperRoleService { + + @Autowired + private OperRoleRedis operRoleRedis; + @Autowired + private OperRoleMenuService OperRoleMenuService; + @Autowired + private OperRoleUserService operRoleUserService; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, OperRoleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, OperRoleDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + String name = (String)params.get(FieldConstant.NAME_HUMP); + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id).like(StringUtils.isNotBlank(name), FieldConstant.NAME, name); + + return wrapper; + } + + @Override + public OperRoleDTO get(String id) { + OperRoleEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, OperRoleDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(OperRoleDTO dto) { + OperRoleEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleEntity.class); + insert(entity); + //保存角色菜单关系 + OperRoleMenuService.saveOrUpdate(entity.getId(), dto.getMenuIdList()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(OperRoleDTO dto) { + OperRoleEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleEntity.class); + updateById(entity); + //保存角色菜单关系 + OperRoleMenuService.saveOrUpdate(entity.getId(), dto.getMenuIdList()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + + OperRoleMenuService.deleteByRoleIds(ids); + + operRoleUserService.deleteByRoleIds(ids); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleUserServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleUserServiceImpl.java new file mode 100644 index 0000000000..3dddda0738 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleUserServiceImpl.java @@ -0,0 +1,156 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.OperRoleUserDao; +import com.epmet.dto.OperRoleUserDTO; +import com.epmet.entity.OperRoleUserEntity; +import com.epmet.redis.OperRoleUserRedis; +import com.epmet.service.OperRoleUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 角色用户关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Service +public class OperRoleUserServiceImpl extends BaseServiceImpl implements OperRoleUserService { + + @Autowired + private OperRoleUserRedis operRoleUserRedis; + @Autowired + private OperRoleUserDao operRoleUserDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, OperRoleUserDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, OperRoleUserDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public OperRoleUserDTO get(String id) { + OperRoleUserEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, OperRoleUserDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(OperRoleUserDTO dto) { + OperRoleUserEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleUserEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(OperRoleUserDTO dto) { + OperRoleUserEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleUserEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveOrUpdate(String userId, List roleIdList) { + //先删除角色用户关系 + deleteByUserId(userId); + + //用户没有一个角色权限的情况 + if(CollUtil.isEmpty(roleIdList)){ + return ; + } + + //保存角色用户关系 + for(String roleId : roleIdList){ + OperRoleUserEntity operRoleUserEntity = new OperRoleUserEntity(); + operRoleUserEntity.setUserId(userId); + operRoleUserEntity.setRoleId(roleId); + + //保存 + insert(operRoleUserEntity); + } + } + + @Override + public void deleteByRoleId(String roleId) { + operRoleUserDao.deleteByRoleId(roleId); + } + + @Override + public void deleteByUserId(String userId) { + operRoleUserDao.deleteByUserId(userId); + } + + @Override + public List getRoleIdList(String userId) { + + return baseDao.getRoleIdList(userId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByRoleIds(String[] roleIds) { + operRoleUserDao.deleteByRoleIds(roleIds); + } + + @Override + public void deleteByUserIds(String[] userIds) { + operRoleUserDao.deleteByUserIds(userIds); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperLanguageDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperLanguageDao.xml new file mode 100644 index 0000000000..a64735e21f --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperLanguageDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + INSERT INTO `oper_language` ( `table_name`, `table_id`, `field_name`, `field_value`, `language` ) + VALUES + ( #{tableName}, #{tableId}, #{fieldName}, #{fieldValue}, #{language} ) + + diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperMenuDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperMenuDao.xml new file mode 100644 index 0000000000..e3a61dbd36 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperMenuDao.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperResourceDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperResourceDao.xml new file mode 100644 index 0000000000..94c839c252 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperResourceDao.xml @@ -0,0 +1,25 @@ + + + + + + + delete from oper_resource where resource_code = #{value} + + + + + + + + + diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleDao.xml new file mode 100644 index 0000000000..e1df3a1038 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleDao.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleMenuDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleMenuDao.xml new file mode 100644 index 0000000000..b9075fceda --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleMenuDao.xml @@ -0,0 +1,25 @@ + + + + + + + + + update oper_role_menu set del_flag = 1 where del_flag = 0 and role_id in + + #{roleId} + + + + + update oper_role_menu set del_flag = 1 where role_id = #{value} and del_flag = 0 + + + + update oper_role_menu set del_flag = 1 where menu_id = #{value} and del_flag = 0 + + + diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleUserDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleUserDao.xml new file mode 100644 index 0000000000..005ef2451c --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleUserDao.xml @@ -0,0 +1,32 @@ + + + + + + + update oper_role_user set del_flag = 1 where del_flag = 0 and role_id in + + #{roleId} + + + + + update oper_role_user set del_flag = 1 where del_flag = 0 and user_id in + + #{userId} + + + + + update oper_role_user set del_flag = 1 where role_id = #{value} and del_flag = 0 + + + + update oper_role_user set del_flag = 1 where user_id = #{value} and del_flag = 0 + + + + + From a1b6a7a78d8a701b7db6de9f59116b172788620d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 17:22:46 +0800 Subject: [PATCH 096/360] =?UTF-8?q?fact=5Findex=5Fparty=5Fablity=5Fcpc=5Fm?= =?UTF-8?q?onthly=E6=81=A2=E5=A4=8DuserId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java | 5 +++++ 1 file changed, 5 insertions(+) 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 af89b6d401..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 @@ -59,6 +59,11 @@ public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { */ private String gridId; + /** + * 用户Id: + */ + private String userId; + /** * 月维度Id: yyyMM */ From d4391e875fa508b64bd6426e532c658f7c0928ee Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 24 Aug 2020 17:24:47 +0800 Subject: [PATCH 097/360] =?UTF-8?q?ExtToken=E5=A4=A7=E5=B1=8Ftoken?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java index 80d21ccde0..563d422650 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java @@ -75,11 +75,11 @@ public class ExtAppJwtTokenUtils { public static void genToken() { HashMap claim = new HashMap<>(); - claim.put("appId", "227fb75ae4baa820755aaf43bf7f0a69"); - claim.put("customerId", "b09527201c4409e19d1dbc5e3c3429a1 "); + claim.put("appId", "acc4ad66c82a7b46e741364b4c62dce2"); + claim.put("customerId", "b09527201c4409e19d1dbc5e3c3429a1"); claim.put("ts", System.currentTimeMillis() - 1000 * 60 * 4); - String abc = new ExtAppJwtTokenUtils().createToken(claim, "4a762660254c57996343f8ee42fbc0a6"); + String abc = new ExtAppJwtTokenUtils().createToken(claim, "612d304095c50369c3ef06e490f05779eeb8f19ff16566c73aeafafc5fa01970"); System.out.println(abc); } From 94f9e58e1561fc66ee7ac94caf1395ad234446a0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 17:32:29 +0800 Subject: [PATCH 098/360] =?UTF-8?q?screen=5Fuser=5Ftotal=5Fdata=E5=88=A0?= =?UTF-8?q?=E9=99=A4REG=5FUSER=5FTOTAL=E3=80=81JOIN=5FUSER=5FTOTAL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/screen/ScreenUserTotalDataEntity.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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; - } From 6cbd391c5a2812469d3ad5f721643f5028ca1821 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 24 Aug 2020 17:48:21 +0800 Subject: [PATCH 099/360] =?UTF-8?q?ext=20staff=20permission=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0level=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/ExtStaffPermissionResultDTO.java | 5 +++++ .../src/main/resources/mapper/CustomerAgencyDao.xml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtStaffPermissionResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtStaffPermissionResultDTO.java index 8408c42dbf..9aa4c9b982 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtStaffPermissionResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtStaffPermissionResultDTO.java @@ -26,6 +26,11 @@ public class ExtStaffPermissionResultDTO implements Serializable { * */ private String agencyName; + /** + * 机关级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province) + * */ + private String level; + /** * 直属机关直属网格列表 * */ diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index c2fb090e3f..3018846910 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -190,6 +190,7 @@ + @@ -221,6 +222,7 @@ SELECT agency.ID AS agencyId, agency.ORGANIZATION_NAME AS agencyName, + agency.LEVEL AS level, grid.ID AS gridId, grid.GRID_NAME AS gridName FROM @@ -247,6 +249,7 @@ SELECT agency.ID AS agencyId, agency.ORGANIZATION_NAME AS agencyName, + agency.LEVEL AS level, grid.ID AS gridId, grid.GRID_NAME AS gridName FROM From 6081ff05c51a9337ae400e6b17c7b7adf5984efc Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 24 Aug 2020 17:58:07 +0800 Subject: [PATCH 100/360] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4=20-=208.24?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/GridPartyMemberDataFormDTO.java | 5 ++ .../form/PublicPartiTotalDataFormDTO.java | 67 +++++++++++++++++++ .../screencoll/form/UserTotalDataFormDTO.java | 10 --- .../FactIndexPartyAblityCpcMonthlyDao.java | 4 +- .../indexcollect/FactIndexCollectService.java | 2 +- .../impl/FactIndexCollectServiceImpl.java | 2 +- .../FactIndexPartyAblityCpcMonthlyDao.xml | 7 +- .../mapper/screen/ScreenUserTotalDataDao.xml | 4 -- 8 files changed, 82 insertions(+), 19 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PublicPartiTotalDataFormDTO.java 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 ed1fde8844..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 @@ -90,4 +90,9 @@ public class GridPartyMemberDataFormDTO implements Serializable { * 党员自建群活跃群众人数(08-24) */ private Integer groupActiveUserCount; + + /** + * 用户id + */ + private String userId; } 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/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index 92c6c7a9e9..387a369af1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -36,11 +36,12 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao NumConstant.ZERO){ for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(customerId, - formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), + formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getUserId(), formDTO.get(i).getYearId(), formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); } factIndexPartyAblityCpcMonthlyDao.batchInsertFactIndexPartyAblityCpcMonthly(formDTO, customerId); 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 e8f599bfd2..e97ca8190e 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 @@ -27,6 +27,7 @@ + @@ -60,7 +61,8 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + USER_ID ) values ( @@ -86,7 +88,8 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.userId} ) 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', From 130ab7420ab8e38a937354a4aab1e69b034bc329 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 24 Aug 2020 17:59:20 +0800 Subject: [PATCH 101/360] ext govorg +1 --- .../epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-ext/epmet-ext-server/pom.xml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-org/gov-org-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml index 3dbed877f2..812a39470d 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-ext-server: container_name: epmet-ext-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-ext-server:0.0.5 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-ext-server:0.0.6 ports: - "8113:8113" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-ext/epmet-ext-server/pom.xml b/epmet-module/epmet-ext/epmet-ext-server/pom.xml index 9baa7fbb51..805fa21d3a 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/pom.xml +++ b/epmet-module/epmet-ext/epmet-ext-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.5 + 0.0.6 com.epmet diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml index 952b5c665f..4d59daef61 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.87 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.88 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 52560b39e2..937125d59c 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.87 + 0.3.88 com.epmet gov-org From 2101ade6dc076e75090f5d7a2e484043f8c2041b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 18:24:03 +0800 Subject: [PATCH 102/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9/data/report/screen/g?= =?UTF-8?q?rassrootsgovern/publicpartirank=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=9F=A5=E8=AF=A2screen=5Fpublic=5Fparti=5Ft?= =?UTF-8?q?otal=5Fdata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenPublicPartiTotalDataDao.java | 43 +++++++++ .../dao/screen/ScreenUserTotalDataDao.java | 9 -- .../impl/GrassRootsGovernServiceImpl.java | 17 +++- .../screen/ScreenPublicPartiTotalDataDao.xml | 29 ++++++ .../mapper/screen/ScreenUserTotalDataDao.xml | 23 ----- .../screen/ScreenPublicPartiTotalDataDao.java | 34 +++++++ .../ScreenPublicPartiTotalDataEntity.java | 96 +++++++++++++++++++ .../screen/ScreenPublicPartiTotalDataDao.xml | 28 ++++++ 8 files changed, 243 insertions(+), 36 deletions(-) create mode 100644 epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.java create mode 100644 epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml 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/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/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-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..5f3cbc0ef2 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 @@ -46,27 +46,4 @@ - - \ No newline at end of file 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..f703978057 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java @@ -0,0 +1,34 @@ +/** + * 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.entity.screen.ScreenPublicPartiTotalDataEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-24 + */ +@Mapper +public interface ScreenPublicPartiTotalDataDao extends BaseDao { + +} \ No newline at end of file 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/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..5fefac34e9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From fc0913430f210e0b523d504de24e11f873d0e862 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 22:41:38 +0800 Subject: [PATCH 103/360] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/HomeTemplateFormDTO.java | 20 ++++ .../ComponentListByCustomerResultDTO.java | 2 +- .../result/HomeDesignByCustomerResultDTO.java | 2 +- .../CustomerHomeTemplateController.java | 57 +++++++++++ .../CustomerHomeTemplateFormDTO.java | 28 ++++++ .../epmet/dao/CustomerHomeTemplateDao.java | 55 ++++++++++- .../service/CustomerHomeTemplateService.java | 30 ++++++ .../impl/CustomerHomeTemplateServiceImpl.java | 94 ++++++++++++++++++- .../mapper/CustomerHomeTemplateDao.xml | 86 +++++++++++++++++ 9 files changed, 370 insertions(+), 4 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeTemplateFormDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateFormDTO.java diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeTemplateFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeTemplateFormDTO.java new file mode 100644 index 0000000000..95bb7937ae --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeTemplateFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/24 21:59 + */ +@Data +public class HomeTemplateFormDTO implements Serializable { + /** + * 0居民端1政府端 + */ + private String clientType; + +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ComponentListByCustomerResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ComponentListByCustomerResultDTO.java index 9e1ccb1703..3765b404f8 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ComponentListByCustomerResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/ComponentListByCustomerResultDTO.java @@ -6,7 +6,7 @@ import java.io.Serializable; import java.util.List; /** - * @Description 运营端-客户定制化服务-获取客户可用组件列表-返参 + * @Description 运营端-客户定制化服务-获取客户可用组件列表-返参 小程序首页默认配置(/oper/customize/customerhometemplate/getcomponentlist)返参也用的这个DTO * @Author yinzuomei * @Date 2020/3/11 12:57 */ diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/HomeDesignByCustomerResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/HomeDesignByCustomerResultDTO.java index 64dbfdaa26..4c1ad37e76 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/HomeDesignByCustomerResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/HomeDesignByCustomerResultDTO.java @@ -7,7 +7,7 @@ import java.util.List; import java.util.Set; /** - * @Description 运营端-客户定制化服务-获取客户首页配置的设计稿返参 + * @Description 运营端-客户定制化服务-获取客户首页配置的设计稿返参 (/oper/customize/customerhometemplate/gethometemplate接口也用的此DTO) * @Author yang * @Date 2020/3/16 12:57 */ diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateController.java index e842ec2794..084384e457 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateController.java @@ -17,6 +17,8 @@ package com.epmet.controller; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; @@ -26,8 +28,11 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.CustomerHomeTemplateDTO; +import com.epmet.dto.result.ComponentListByCustomerResultDTO; +import com.epmet.dto.result.HomeDesignByCustomerResultDTO; import com.epmet.excel.CustomerHomeTemplateExcel; import com.epmet.service.CustomerHomeTemplateService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -91,4 +96,56 @@ public class CustomerHomeTemplateController { ExcelUtils.exportExcelToTarget(response, null, list, CustomerHomeTemplateExcel.class); } + /** + * @return com.epmet.commons.tools.utils.Result + * @param params clientType 所属端:0.居民端,1.领导端 + * @author yinzuomei + * @description 获取可用组件列表 + * @Date 2020/8/24 21:15 + **/ + @PostMapping("getcomponentlist") + public Result getComponetList(@RequestParam Map params) { + String clientType= (String) params.get("clientType"); + if(StringUtils.isBlank(clientType)){ + throw new ValidateException("clientType不能为空"); + } + if(!NumConstant.ZERO_STR.equals(clientType)&&!NumConstant.ONE_STR.equals(clientType)){ + throw new ValidateException("所属端类型0.居民端,1.政府端"); + } + return new Result().ok(customerHomeTemplateService.getComponentListByCustomer(clientType)); + } + + /** + * @param params clientType 所属端:0.居民端,1.领导端 + * @return com.epmet.commons.tools.utils.Result + * @author yinzuomei + * @description 获取小程序首页配置 + * @Date 2020/8/24 22:06 + **/ + @PostMapping("gethometemplate") + public Result getHomeTemplate(@RequestParam Map params) { + String clientType = (String) params.get("clientType"); + if (StringUtils.isBlank(clientType)) { + throw new ValidateException("clientType不能为空"); + } + if (!NumConstant.ZERO_STR.equals(clientType) && !NumConstant.ONE_STR.equals(clientType)) { + throw new ValidateException("所属端类型0.居民端,1.政府端"); + } + return new Result().ok(customerHomeTemplateService.getHomeTemplate(clientType)); + } + + /** + * @return com.epmet.commons.tools.utils.Result + * @param formDTO + * @author yinzuomei + * @description 保存小程序首页配置 + * @Date 2020/8/24 22:19 + **/ + @PostMapping("savecustomerhometemplate") + public Result saveCustomerHomeTemplate(@RequestBody CustomerHomeTemplateFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); + customerHomeTemplateService.saveCustomerHomeTemplate(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateFormDTO.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateFormDTO.java new file mode 100644 index 0000000000..9ee71fddd9 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateFormDTO.java @@ -0,0 +1,28 @@ +package com.epmet.controller; + +import com.epmet.dto.form.HomeComponentFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * 保存小程序首页配置 入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/24 22:18 + */ +@Data +public class CustomerHomeTemplateFormDTO implements Serializable { + /** + * 所属端类型 0:居民端 1:政府端 + */ + @NotBlank(message = "所属端类型不能为空") + private String clientType; + + /** + * 组件集合 + */ + private List componentList; +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java index 5e60376eb5..351a961d85 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java @@ -18,11 +18,18 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.ComponentListByCustomerFormDTO; +import com.epmet.dto.result.CommonComponentDesignResultDTO; +import com.epmet.dto.result.CommonComponentResultDTO; +import com.epmet.dto.result.FunctionComponentResultDTO; import com.epmet.entity.CustomerHomeTemplateEntity; 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-03-10 @@ -30,4 +37,50 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface CustomerHomeTemplateDao extends BaseDao { + /** + * @param clientType 所属端类型0.居民端,1.政府端 + * @return java.util.List + * @author yinzuomei + * @description 通用组件列表 + * @Date 2020/8/24 21:30 + **/ + List selectListCommonComponent(String clientType); + + /** + * @return java.util.List + * @author yinzuomei + * @description 功能组件列表(以功能分组) + * @Date 2020/8/24 21:30 + **/ + List selectListFunction(); + + /** + * @param functionId + * @param clientType + * @return java.util.List + * @author yinzuomei + * @description 根据功能,所属端,查询功能组件列表 + * @Date 2020/8/24 21:56 + **/ + List selectListFunctionComponent(@Param("functionId") String functionId, + @Param("clientType") String clientType); + + /** + * @return java.util.List + * @param clientType 所属端:0.居民端,1.领导端 + * @author yinzuomei + * @description 获取小程序首页配置 + * @Date 2020/8/24 22:12 + **/ + List selectCustomerTemplate(String clientType); + + /** + * @return int + * @param clientType + * @param userId + * @author yinzuomei + * @description 删除某一端的默认配置 + * @Date 2020/8/24 22:35 + **/ + int deleteByClientType(@Param("clientType") String clientType,@Param("userId") String userId); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerHomeTemplateService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerHomeTemplateService.java index 4482538067..c0b7d6f5db 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerHomeTemplateService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerHomeTemplateService.java @@ -19,7 +19,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.controller.CustomerHomeTemplateFormDTO; import com.epmet.dto.CustomerHomeTemplateDTO; +import com.epmet.dto.result.ComponentListByCustomerResultDTO; +import com.epmet.dto.result.HomeDesignByCustomerResultDTO; import com.epmet.entity.CustomerHomeTemplateEntity; import java.util.List; @@ -101,4 +104,31 @@ public interface CustomerHomeTemplateService extends BaseService */ List getTemplateByClient(Integer client); + + /** + * @return com.epmet.dto.result.ComponentListByCustomerResultDTO + * @param clientType + * @author yinzuomei + * @description 获取可用组件列表 + * @Date 2020/8/24 21:16 + **/ + ComponentListByCustomerResultDTO getComponentListByCustomer(String clientType); + + /** + * @return com.epmet.dto.result.HomeDesignByCustomerResultDTO + * @param clientType 所属端:0.居民端,1.领导端 + * @author yinzuomei + * @description + * @Date 2020/8/24 22:06 + **/ + HomeDesignByCustomerResultDTO getHomeTemplate(String clientType); + + /** + * @return void + * @param formDTO + * @author yinzuomei + * @description 保存小程序首页配置 + * @Date 2020/8/24 22:20 + **/ + void saveCustomerHomeTemplate(CustomerHomeTemplateFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerHomeTemplateServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerHomeTemplateServiceImpl.java index 220b1efc31..7bd87b2b41 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerHomeTemplateServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerHomeTemplateServiceImpl.java @@ -21,10 +21,20 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.OperCustomizeConstant; +import com.epmet.constant.ReginConstant; +import com.epmet.controller.CustomerHomeTemplateFormDTO; import com.epmet.dao.CustomerHomeTemplateDao; import com.epmet.dto.CustomerHomeTemplateDTO; +import com.epmet.dto.form.HomeComponentFormDTO; +import com.epmet.dto.result.CommonComponentDesignResultDTO; +import com.epmet.dto.result.ComponentListByCustomerResultDTO; +import com.epmet.dto.result.FunctionComponentResultDTO; +import com.epmet.dto.result.HomeDesignByCustomerResultDTO; import com.epmet.entity.CustomerHomeTemplateEntity; import com.epmet.redis.CustomerHomeTemplateRedis; import com.epmet.service.CustomerHomeTemplateService; @@ -33,6 +43,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -48,7 +59,8 @@ public class CustomerHomeTemplateServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -108,4 +120,84 @@ public class CustomerHomeTemplateServiceImpl extends BaseServiceImpl functionList = baseDao.selectListFunction(); + for (FunctionComponentResultDTO function : functionList) { + function.setComponentList(baseDao.selectListFunctionComponent(function.getFunctionId(), clientType)); + } + resultDTO.setFunctionList(functionList); + return resultDTO; + } + + /** + * @param clientType 所属端:0.居民端,1.领导端 + * @return com.epmet.dto.result.HomeDesignByCustomerResultDTO + * @author yinzuomei + * @description + * @Date 2020/8/24 22:06 + **/ + @Override + public HomeDesignByCustomerResultDTO getHomeTemplate(String clientType) { + HomeDesignByCustomerResultDTO resultDTO = new HomeDesignByCustomerResultDTO(); + //根据客户id,所属端获取客户首页配置的设计稿 + List list = baseDao.selectCustomerTemplate(clientType); + List titleList = new ArrayList<>(); + List topList = new ArrayList<>(); + List functionList = new ArrayList<>(); + List floatingList = new ArrayList<>(); + //使用过的组件集合 + List usedComponent = new ArrayList<>(); + for (CommonComponentDesignResultDTO c : list) { + usedComponent.add(c.getComponentId()); + //所属区域:0.标题区、1.置顶区、2.功能区、3.悬浮区 + if (ReginConstant.TITLE_LIST.equals(c.getRegion())) { + titleList.add(c); + } else if (ReginConstant.TOP_LIST.equals(c.getRegion())) { + topList.add(c); + } else if (ReginConstant.FUNCTION_LIST.equals(c.getRegion())) { + functionList.add(c); + } else if (ReginConstant.FLOATING_LIST.equals(c.getRegion())) { + floatingList.add(c); + } + } + resultDTO.setTitleList(titleList); + resultDTO.setTopList(topList); + resultDTO.setFloatingList(floatingList); + resultDTO.setFunctionList(functionList); + resultDTO.setUsedComponentIdList(usedComponent); + return resultDTO; + } + + /** + * @param formDTO + * @return void + * @author yinzuomei + * @description 保存小程序首页配置 + * @Date 2020/8/24 22:20 + **/ + @Override + public void saveCustomerHomeTemplate(CustomerHomeTemplateFormDTO formDTO) { + int deletedNum = baseDao.deleteByClientType(formDTO.getClientType(), loginUserUtil.getLoginUserId()); + for (HomeComponentFormDTO homeComponentFormDTO : formDTO.getComponentList()) { + CustomerHomeTemplateDTO customerHomeTemplateDTO = new CustomerHomeTemplateDTO(); + customerHomeTemplateDTO.setComponentId(homeComponentFormDTO.getComponentId()); + customerHomeTemplateDTO.setClientType(Integer.valueOf(formDTO.getClientType())); + customerHomeTemplateDTO.setRegion(homeComponentFormDTO.getRegion()); + customerHomeTemplateDTO.setConfiguration(homeComponentFormDTO.getConfiguration()); + customerHomeTemplateDTO.setDemoData(homeComponentFormDTO.getDemoData()); + customerHomeTemplateDTO.setDisplayOrder(homeComponentFormDTO.getDisplayOrder()); + save(customerHomeTemplateDTO); + } + } + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeTemplateDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeTemplateDao.xml index f6d4b056c1..3813fbd9ca 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeTemplateDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeTemplateDao.xml @@ -18,5 +18,91 @@ + + + + + + + + + + + + + UPDATE customer_home_template + SET DEL_FLAG = '1', + UPDATED_BY = #{userId}, + UPDATED_TIME = NOW() + WHERE + CLIENT_TYPE = #{clientType} + \ No newline at end of file From c9f7aa958ffabef0a825825b5e089fecbfaeea82 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 24 Aug 2020 22:43:37 +0800 Subject: [PATCH 104/360] oper-customize +1 --- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index fc836e6a15..b392052125 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.42 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.43 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index c1170d6d89..4aa3e88d8f 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.42 + 0.3.43 com.epmet oper-customize From 782043c328be0ebd86e076f8735f1a6f914ff0ef Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 25 Aug 2020 09:49:50 +0800 Subject: [PATCH 105/360] =?UTF-8?q?18=E3=80=81=E5=85=AC=E4=BC=97=E5=8F=82?= =?UTF-8?q?=E4=B8=8E=E5=90=84=E7=B1=BB=E6=80=BB=E6=95=B0=20=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/ScreenCollController.java | 17 +++++++++++++++++ .../epmet/service/screen/ScreenCollService.java | 13 +++++++++++++ .../screen/impl/ScreenCollServiceImpl.java | 15 +++++++++++++++ .../FactIndexPartyAblityCpcMonthlyDao.xml | 2 +- 4 files changed, 46 insertions(+), 1 deletion(-) 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..daeae95dba 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/service/screen/ScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java index e81e4497c3..33f4970deb 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 @@ -218,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/ScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/ScreenCollServiceImpl.java index b5e65fd193..bbac660e05 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 @@ -445,4 +445,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(); +// } +//// screenPioneerDataDao.deletePioneerData(customerId, orgIds); +// +//// screenPioneerDataDao.batchInsertPioneerData(formDTO, customerId); +// } +// } } 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 e97ca8190e..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 @@ -32,7 +32,7 @@ delete from fact_index_party_ablity_cpc_monthly - where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} + where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND USER_ID = #{userId} AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} From 0af8681f831c891981c53b4bd8d7f719a58ff713 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 Aug 2020 10:06:48 +0800 Subject: [PATCH 106/360] =?UTF-8?q?=E6=94=BE=E8=A1=8C-=20/data/report/scre?= =?UTF-8?q?en/**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/src/main/resources/bootstrap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From 0ea4254c7831b16bbe1c4229afed1cefb4d5e0a3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 Aug 2020 10:09:08 +0800 Subject: [PATCH 107/360] =?UTF-8?q?=E6=94=BE=E8=A1=8C-=20/data/report/scre?= =?UTF-8?q?en/**=20gateway+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/deploy/docker-compose-dev.yml | 2 +- epmet-gateway/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-gateway/deploy/docker-compose-dev.yml b/epmet-gateway/deploy/docker-compose-dev.yml index 82a1bb2c15..a07a2549c0 100644 --- a/epmet-gateway/deploy/docker-compose-dev.yml +++ b/epmet-gateway/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-gateway-server: container_name: epmet-gateway-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.32 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.33 ports: - "8080:8080" network_mode: host # 使用现有网络 diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index d595ba019c..6bb2a0889f 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.32 + 0.3.33 com.epmet epmet-cloud From b37f9e6c7fa8870d5dbc873b9b9368a78326b45f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 Aug 2020 10:12:36 +0800 Subject: [PATCH 108/360] report+1,stat+1 --- .../data-report-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-report/data-report-server/pom.xml | 2 +- .../data-statistical-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index 92658e8199..25f7ef5741 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.28 + image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.29 ports: - "8109:8109" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 9b2253722d..24a09c3c5e 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.28 + 0.3.29 data-report-server diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index a34bca869d..c2022a855b 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.45 + image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.46 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index de8ffeaea8..84e4b1810d 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.45 + 0.3.46 data-statistical com.epmet From d81a76400bf9eebb5cb8d25548319b2d1669bb62 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 25 Aug 2020 10:33:19 +0800 Subject: [PATCH 109/360] =?UTF-8?q?=E5=BD=92=E4=B8=80=E7=AE=97=E6=B3=95?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0list=E7=9A=84=E9=87=8D=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../normalizing/DoubleScoreCalculator.java | 9 +++++++++ .../normalizing/IntegerScoreCalculator.java | 10 ++++++++++ .../support/normalizing/ScoreCalculator.java | 20 +++++++++++++++++++ 3 files changed, 39 insertions(+) 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 index c626602393..01258d0f45 100644 --- 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 @@ -1,6 +1,7 @@ package com.epmet.support.normalizing; import java.math.BigDecimal; +import java.util.List; /** * Double的分值计算 @@ -24,6 +25,14 @@ public class DoubleScoreCalculator extends ScoreCalculator { 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; 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 index 7708b83fc0..98f837ab7e 100644 --- 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 @@ -1,6 +1,7 @@ package com.epmet.support.normalizing; import java.math.BigDecimal; +import java.util.List; /** * Integer的分值计算 @@ -26,6 +27,15 @@ public class IntegerScoreCalculator extends ScoreCalculator { } + 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; 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 index e3c98d5117..48692e92ce 100644 --- 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 @@ -3,6 +3,8 @@ 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; /** * 所有数据类型计算器的父类,实现算法骨架,数据类型转换方法则由子类实现 @@ -93,6 +95,15 @@ public abstract class ScoreCalculator { return scores; } + /** + * 批量归一算法,返回List + * @param sourceValues + * @return + */ + public List normalize(List sourceValues) { + return sourceValues.stream().map(s -> normalize(s)).collect(Collectors.toList()); + } + /** * 批量归一算法,带权重 * @param sourceValues @@ -110,6 +121,15 @@ public abstract class ScoreCalculator { return scores; } + /** + * 批量归一算法,返回List + * @param sourceValues + * @return + */ + public List normalize(List sourceValues, BigDecimal weight) { + return sourceValues.stream().map(s -> normalize(s).multiply(weight)).collect(Collectors.toList()); + } + /** * 校验数组 * @param sourceArray From 79648bf03c39283e2e439e2d14f833727a594e1e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 Aug 2020 10:58:28 +0800 Subject: [PATCH 110/360] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E9=A6=96=E9=A1=B5=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/HomeTemplateCommonFormDTO.java | 30 +++++++++++++++++++ .../CustomerHomeTemplateController.java | 27 +++++------------ .../epmet/dao/CustomerHomeTemplateDao.java | 4 +-- .../impl/CustomerHomeTemplateServiceImpl.java | 8 ++--- .../mapper/CustomerHomeTemplateDao.xml | 6 ++-- 5 files changed, 45 insertions(+), 30 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeTemplateCommonFormDTO.java diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeTemplateCommonFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeTemplateCommonFormDTO.java new file mode 100644 index 0000000000..d692367b38 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/HomeTemplateCommonFormDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 获取可用组件、获取小程序首页配置,入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/25 10:28 + */ +@Data +public class HomeTemplateCommonFormDTO implements Serializable { + public interface AddUserInternalGroup {} + /** + * 所属端类型 0:居民端 1:政府端 + */ + @NotBlank(message = "所属端类型不能为空",groups = {AddUserInternalGroup.class}) + private String clientType; + + public String getClientType() { + return clientType; + } + + public void setClientType(String clientType) { + this.clientType = clientType; + } +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateController.java index 084384e457..99fd872b92 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerHomeTemplateController.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.CustomerHomeTemplateDTO; +import com.epmet.dto.form.HomeTemplateCommonFormDTO; import com.epmet.dto.result.ComponentListByCustomerResultDTO; import com.epmet.dto.result.HomeDesignByCustomerResultDTO; import com.epmet.excel.CustomerHomeTemplateExcel; @@ -98,40 +99,26 @@ public class CustomerHomeTemplateController { /** * @return com.epmet.commons.tools.utils.Result - * @param params clientType 所属端:0.居民端,1.领导端 + * @param formDTO clientType 所属端:0.居民端,1.领导端 * @author yinzuomei * @description 获取可用组件列表 * @Date 2020/8/24 21:15 **/ @PostMapping("getcomponentlist") - public Result getComponetList(@RequestParam Map params) { - String clientType= (String) params.get("clientType"); - if(StringUtils.isBlank(clientType)){ - throw new ValidateException("clientType不能为空"); - } - if(!NumConstant.ZERO_STR.equals(clientType)&&!NumConstant.ONE_STR.equals(clientType)){ - throw new ValidateException("所属端类型0.居民端,1.政府端"); - } - return new Result().ok(customerHomeTemplateService.getComponentListByCustomer(clientType)); + public Result getComponetList(@RequestBody HomeTemplateCommonFormDTO formDTO) { + return new Result().ok(customerHomeTemplateService.getComponentListByCustomer(formDTO.getClientType())); } /** - * @param params clientType 所属端:0.居民端,1.领导端 + * @param formDTO clientType 所属端:0.居民端,1.领导端 * @return com.epmet.commons.tools.utils.Result * @author yinzuomei * @description 获取小程序首页配置 * @Date 2020/8/24 22:06 **/ @PostMapping("gethometemplate") - public Result getHomeTemplate(@RequestParam Map params) { - String clientType = (String) params.get("clientType"); - if (StringUtils.isBlank(clientType)) { - throw new ValidateException("clientType不能为空"); - } - if (!NumConstant.ZERO_STR.equals(clientType) && !NumConstant.ONE_STR.equals(clientType)) { - throw new ValidateException("所属端类型0.居民端,1.政府端"); - } - return new Result().ok(customerHomeTemplateService.getHomeTemplate(clientType)); + public Result getHomeTemplate(@RequestBody HomeTemplateCommonFormDTO formDTO) { + return new Result().ok(customerHomeTemplateService.getHomeTemplate(formDTO.getClientType())); } /** diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java index 351a961d85..f11dab0bc7 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerHomeTemplateDao.java @@ -44,7 +44,7 @@ public interface CustomerHomeTemplateDao extends BaseDao selectListCommonComponent(String clientType); + List selectListCommonComponent(@Param("clientType") String clientType); /** * @return java.util.List @@ -72,7 +72,7 @@ public interface CustomerHomeTemplateDao extends BaseDao selectCustomerTemplate(String clientType); + List selectCustomerTemplate(@Param("clientType") String clientType); /** * @return int diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerHomeTemplateServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerHomeTemplateServiceImpl.java index 7bd87b2b41..b94f5ad8c4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerHomeTemplateServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerHomeTemplateServiceImpl.java @@ -31,10 +31,7 @@ import com.epmet.controller.CustomerHomeTemplateFormDTO; import com.epmet.dao.CustomerHomeTemplateDao; import com.epmet.dto.CustomerHomeTemplateDTO; import com.epmet.dto.form.HomeComponentFormDTO; -import com.epmet.dto.result.CommonComponentDesignResultDTO; -import com.epmet.dto.result.ComponentListByCustomerResultDTO; -import com.epmet.dto.result.FunctionComponentResultDTO; -import com.epmet.dto.result.HomeDesignByCustomerResultDTO; +import com.epmet.dto.result.*; import com.epmet.entity.CustomerHomeTemplateEntity; import com.epmet.redis.CustomerHomeTemplateRedis; import com.epmet.service.CustomerHomeTemplateService; @@ -130,7 +127,8 @@ public class CustomerHomeTemplateServiceImpl extends BaseServiceImpl commonList=baseDao.selectListCommonComponent(clientType); + resultDTO.setCommonList(commonList); List functionList = baseDao.selectListFunction(); for (FunctionComponentResultDTO function : functionList) { function.setComponentList(baseDao.selectListFunctionComponent(function.getFunctionId(), clientType)); diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeTemplateDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeTemplateDao.xml index 3813fbd9ca..c47c431bb9 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeTemplateDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerHomeTemplateDao.xml @@ -19,10 +19,10 @@ - - SELECT cht.COMPONENT_ID, hc.COMPONENT_NAME, From f967d2377abef8424e8c913073aacbeb83fec9e7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 Aug 2020 10:59:35 +0800 Subject: [PATCH 111/360] =?UTF-8?q?130+1=20=E8=8E=B7=E5=8F=96=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E9=A6=96=E9=A1=B5=E9=85=8D=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index b392052125..dc9635f91c 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.43 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.44 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 4aa3e88d8f..c670b1e2a0 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.43 + 0.3.44 com.epmet oper-customize From db6683bd4dfb556c95e68fd0f3ca9c2774eaf7a7 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 25 Aug 2020 11:04:13 +0800 Subject: [PATCH 112/360] =?UTF-8?q?web=E5=B7=A5=E4=BD=9C=E7=AB=AF-?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-access/gov-access-client/pom.xml | 6 + .../java/com/epmet/dto/GovLanguageDTO.java | 61 +++++++++ .../main/java/com/epmet/dto/GovMenuDTO.java | 124 ++++++++++++++++++ .../java/com/epmet/dto/GovResourceDTO.java | 102 ++++++++++++++ .../main/java/com/epmet/dto/GovRoleDTO.java | 93 +++++++++++++ .../java/com/epmet/dto/GovRoleMenuDTO.java | 82 ++++++++++++ .../java/com/epmet/dto/GovRoleUserDTO.java | 82 ++++++++++++ .../com/epmet/dto/result/MenuResourceDTO.java | 29 ++++ .../java/com/epmet/enums/MenuFlagEnum.java | 36 +++++ .../java/com/epmet/enums/MenuTypeEnum.java | 36 +++++ .../java/com/epmet/enums/RegionLeafEnum.java | 29 ++++ .../java/com/epmet/enums/RegionLevelEnum.java | 30 +++++ .../java/com/epmet/enums/UserStatusEnum.java | 30 +++++ .../gov-access/gov-access-server/pom.xml | 6 - ...roller.java => GovLanguageController.java} | 30 ++--- ...Controller.java => GovMenuController.java} | 70 +++++----- ...roller.java => GovResourceController.java} | 32 ++--- ...Controller.java => GovRoleController.java} | 44 +++---- ...roller.java => GovRoleMenuController.java} | 32 ++--- ...roller.java => GovRoleUserController.java} | 40 +++--- ...erLanguageDao.java => GovLanguageDao.java} | 10 +- .../dao/{OperMenuDao.java => GovMenuDao.java} | 12 +- ...erResourceDao.java => GovResourceDao.java} | 10 +- .../dao/{OperRoleDao.java => GovRoleDao.java} | 4 +- ...erRoleMenuDao.java => GovRoleMenuDao.java} | 4 +- ...erRoleUserDao.java => GovRoleUserDao.java} | 4 +- ...uageEntity.java => GovLanguageEntity.java} | 4 +- ...OperMenuEntity.java => GovMenuEntity.java} | 4 +- ...urceEntity.java => GovResourceEntity.java} | 4 +- ...OperRoleEntity.java => GovRoleEntity.java} | 4 +- ...MenuEntity.java => GovRoleMenuEntity.java} | 4 +- ...UserEntity.java => GovRoleUserEntity.java} | 4 +- ...nguageRedis.java => GovLanguageRedis.java} | 2 +- .../{OperMenuRedis.java => GovMenuRedis.java} | 10 +- ...sourceRedis.java => GovResourceRedis.java} | 2 +- ...leMenuRedis.java => GovRoleMenuRedis.java} | 2 +- .../{OperRoleRedis.java => GovRoleRedis.java} | 2 +- ...leUserRedis.java => GovRoleUserRedis.java} | 2 +- ...geService.java => GovLanguageService.java} | 22 ++-- ...erMenuService.java => GovMenuService.java} | 36 ++--- ...ceService.java => GovResourceService.java} | 22 ++-- ...nuService.java => GovRoleMenuService.java} | 22 ++-- ...erRoleService.java => GovRoleService.java} | 22 ++-- ...erService.java => GovRoleUserService.java} | 22 ++-- ...eImpl.java => GovLanguageServiceImpl.java} | 46 +++---- ...rviceImpl.java => GovMenuServiceImpl.java} | 115 ++++++++-------- ...eImpl.java => GovResourceServiceImpl.java} | 50 +++---- ...eImpl.java => GovRoleMenuServiceImpl.java} | 56 ++++---- ...rviceImpl.java => GovRoleServiceImpl.java} | 60 ++++----- ...eImpl.java => GovRoleUserServiceImpl.java} | 62 ++++----- .../resources/db/migration/V0.0.2__add.sql | 91 +++++++++++++ ...OperLanguageDao.xml => GovLanguageDao.xml} | 12 +- .../src/main/resources/mapper/GovMenuDao.xml | 42 ++++++ .../main/resources/mapper/GovResourceDao.xml | 25 ++++ .../{OperRoleDao.xml => GovRoleDao.xml} | 2 +- ...OperRoleMenuDao.xml => GovRoleMenuDao.xml} | 10 +- ...OperRoleUserDao.xml => GovRoleUserDao.xml} | 12 +- .../src/main/resources/mapper/OperMenuDao.xml | 42 ------ .../main/resources/mapper/OperResourceDao.xml | 25 ---- 59 files changed, 1350 insertions(+), 528 deletions(-) create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovLanguageDTO.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovResourceDTO.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleDTO.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleMenuDTO.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleUserDTO.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/result/MenuResourceDTO.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/MenuFlagEnum.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/MenuTypeEnum.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/RegionLeafEnum.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/RegionLevelEnum.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/UserStatusEnum.java rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/{OperLanguageController.java => GovLanguageController.java} (70%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/{OperMenuController.java => GovMenuController.java} (55%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/{OperResourceController.java => GovResourceController.java} (69%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/{OperRoleController.java => GovRoleController.java} (66%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/{OperRoleMenuController.java => GovRoleMenuController.java} (69%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/{OperRoleUserController.java => GovRoleUserController.java} (73%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/{OperLanguageDao.java => GovLanguageDao.java} (52%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/{OperMenuDao.java => GovMenuDao.java} (61%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/{OperResourceDao.java => GovResourceDao.java} (70%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/{OperRoleDao.java => GovRoleDao.java} (76%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/{OperRoleMenuDao.java => GovRoleMenuDao.java} (88%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/{OperRoleUserDao.java => GovRoleUserDao.java} (90%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/{OperLanguageEntity.java => GovLanguageEntity.java} (89%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/{OperMenuEntity.java => GovMenuEntity.java} (93%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/{OperResourceEntity.java => GovResourceEntity.java} (91%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/{OperRoleEntity.java => GovRoleEntity.java} (90%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/{OperRoleMenuEntity.java => GovRoleMenuEntity.java} (87%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/{OperRoleUserEntity.java => GovRoleUserEntity.java} (87%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/{OperLanguageRedis.java => GovLanguageRedis.java} (97%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/{OperMenuRedis.java => GovMenuRedis.java} (90%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/{OperResourceRedis.java => GovResourceRedis.java} (97%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/{OperRoleMenuRedis.java => GovRoleMenuRedis.java} (97%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/{OperRoleRedis.java => GovRoleRedis.java} (97%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/{OperRoleUserRedis.java => GovRoleUserRedis.java} (97%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/{OperLanguageService.java => GovLanguageService.java} (80%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/{OperMenuService.java => GovMenuService.java} (74%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/{OperResourceService.java => GovResourceService.java} (81%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/{OperRoleMenuService.java => GovRoleMenuService.java} (82%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/{OperRoleService.java => GovRoleService.java} (79%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/{OperRoleUserService.java => GovRoleUserService.java} (83%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/{OperLanguageServiceImpl.java => GovLanguageServiceImpl.java} (65%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/{OperMenuServiceImpl.java => GovMenuServiceImpl.java} (56%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/{OperResourceServiceImpl.java => GovResourceServiceImpl.java} (68%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/{OperRoleMenuServiceImpl.java => GovRoleMenuServiceImpl.java} (65%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/{OperRoleServiceImpl.java => GovRoleServiceImpl.java} (58%) rename epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/{OperRoleUserServiceImpl.java => GovRoleUserServiceImpl.java} (63%) create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/db/migration/V0.0.2__add.sql rename epmet-module/gov-access/gov-access-server/src/main/resources/mapper/{OperLanguageDao.xml => GovLanguageDao.xml} (63%) create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovResourceDao.xml rename epmet-module/gov-access/gov-access-server/src/main/resources/mapper/{OperRoleDao.xml => GovRoleDao.xml} (77%) rename epmet-module/gov-access/gov-access-server/src/main/resources/mapper/{OperRoleMenuDao.xml => GovRoleMenuDao.xml} (57%) rename epmet-module/gov-access/gov-access-server/src/main/resources/mapper/{OperRoleUserDao.xml => GovRoleUserDao.xml} (58%) delete mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperMenuDao.xml delete mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperResourceDao.xml diff --git a/epmet-module/gov-access/gov-access-client/pom.xml b/epmet-module/gov-access/gov-access-client/pom.xml index b20a28582a..a0cf511f5f 100644 --- a/epmet-module/gov-access/gov-access-client/pom.xml +++ b/epmet-module/gov-access/gov-access-client/pom.xml @@ -17,5 +17,11 @@ epmet-commons-tools 2.0.0 + + io.swagger + swagger-annotations + 1.5.20 + compile + \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovLanguageDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovLanguageDTO.java new file mode 100644 index 0000000000..ed7f5924db --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovLanguageDTO.java @@ -0,0 +1,61 @@ +/** + * 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.dto; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 国际化 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Data +public class GovLanguageDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 表名 + */ + private String tableName; + + /** + * 表主键 + */ + private String tableId; + + /** + * 字段名 + */ + private String fieldName; + + /** + * 字段值 + */ + private String fieldValue; + + /** + * 语言 + */ + private String language; + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java new file mode 100644 index 0000000000..fb130e9c65 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovMenuDTO.java @@ -0,0 +1,124 @@ +/** + * 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.dto; + +import com.epmet.commons.tools.utils.TreeStringNode; +import com.epmet.dto.result.MenuResourceDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 菜单管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Data +public class GovMenuDTO extends TreeStringNode implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * id + */ + private String id; + + /** + * 上级ID,一级菜单为0 + */ + private String pid; + + /** + * 菜单名称 + */ + private String name; + + /** + * 菜单URL + */ + private String url; + + /** + * 类型 0:菜单 1:按钮 + */ + private Integer type; + + /** + * 菜单图标 + */ + private String icon; + + /** + * 权限标识,如:sys:menu:save + */ + private String permissions; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 菜单资源 + */ + private List resourceList; + + /** + * 上级菜单名称 + */ + private String parentName; + + /** + * 是否显示,1:显示 0不显示 + */ + private Integer showFlag; +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovResourceDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovResourceDTO.java new file mode 100644 index 0000000000..59a9576598 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovResourceDTO.java @@ -0,0 +1,102 @@ +/** + * 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.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 资源管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Data +public class GovResourceDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * id + */ + private String id; + + /** + * 资源编码,如菜单ID + */ + private String resourceCode; + + /** + * 资源名称 + */ + private String resourceName; + + /** + * 资源URL + */ + private String resourceUrl; + + /** + * 请求方式(如:GET、POST、PUT、DELETE) + */ + private String resourceMethod; + + /** + * 菜单标识 0:非菜单资源 1:菜单资源 + */ + private Integer menuFlag; + + /** + * 认证等级 0:权限认证 1:登录认证 2:无需认证 + */ + private Integer authLevel; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleDTO.java new file mode 100644 index 0000000000..efe6643df6 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleDTO.java @@ -0,0 +1,93 @@ +/** + * 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.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 角色管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Data +public class GovRoleDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * id + */ + private String id; + + /** + * 角色名称 + */ + private String name; + + /** + * 备注 + */ + private String remark; + + /** + * 部门ID + */ + private Long deptId; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 菜单ID列表 + */ + private List menuIdList; + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleMenuDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleMenuDTO.java new file mode 100644 index 0000000000..eacde30cf3 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleMenuDTO.java @@ -0,0 +1,82 @@ +/** + * 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.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 角色菜单关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Data +public class GovRoleMenuDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * id + */ + private String id; + + /** + * 角色ID + */ + private String roleId; + + /** + * 菜单ID + */ + private String menuId; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleUserDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleUserDTO.java new file mode 100644 index 0000000000..d3881edeb2 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/GovRoleUserDTO.java @@ -0,0 +1,82 @@ +/** + * 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.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 角色用户关系 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Data +public class GovRoleUserDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * id + */ + private String id; + + /** + * 角色ID + */ + private String roleId; + + /** + * 用户ID + */ + private String userId; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/result/MenuResourceDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/result/MenuResourceDTO.java new file mode 100644 index 0000000000..86df7d55ca --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/result/MenuResourceDTO.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.dto.result; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 菜单资源 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Data +@ApiModel(value = "菜单资源") +public class MenuResourceDTO { + @ApiModelProperty(value = "资源URL") + private String resourceUrl; + @ApiModelProperty(value = "请求方式(如:GET、POST、PUT、DELETE)") + private String resourceMethod; + +} diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/MenuFlagEnum.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/MenuFlagEnum.java new file mode 100644 index 0000000000..2a880a728a --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/MenuFlagEnum.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.enums; + +/** + * 菜单资源标识 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +public enum MenuFlagEnum { + /** + * 菜单资源 + */ + YES(1), + /** + * 非菜单资源 + */ + NO(0); + + private int value; + + MenuFlagEnum(int value) { + this.value = value; + } + + public int value() { + return this.value; + } +} diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/MenuTypeEnum.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/MenuTypeEnum.java new file mode 100644 index 0000000000..7132fa2ce3 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/MenuTypeEnum.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.enums; + +/** + * 菜单类型枚举 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +public enum MenuTypeEnum { + /** + * 菜单 + */ + MENU(0), + /** + * 按钮 + */ + BUTTON(1); + + private int value; + + MenuTypeEnum(int value) { + this.value = value; + } + + public int value() { + return this.value; + } +} diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/RegionLeafEnum.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/RegionLeafEnum.java new file mode 100644 index 0000000000..36300e201f --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/RegionLeafEnum.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2019 人人开源 All rights reserved. + *

+ * https://www.renren.io + *

+ * 版权所有,侵权必究! + */ + +package com.epmet.enums; + +/** + * 叶子节点枚举 + * + * @author Mark sunlightcs@gmail.com + */ +public enum RegionLeafEnum { + YES(1), + NO(0); + + private int value; + + RegionLeafEnum(int value) { + this.value = value; + } + + public int value() { + return this.value; + } +} diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/RegionLevelEnum.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/RegionLevelEnum.java new file mode 100644 index 0000000000..b29c456897 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/RegionLevelEnum.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2019 人人开源 All rights reserved. + *

+ * https://www.renren.io + *

+ * 版权所有,侵权必究! + */ + +package com.epmet.enums; + +/** + * 行政区域 级别枚举 + * + * @author Mark sunlightcs@gmail.com + */ +public enum RegionLevelEnum { + ONE(1), + TWO(2), + THREE(3); + + private int value; + + RegionLevelEnum(int value) { + this.value = value; + } + + public int value() { + return this.value; + } +} diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/UserStatusEnum.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/UserStatusEnum.java new file mode 100644 index 0000000000..dbc043f529 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/enums/UserStatusEnum.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + * + * https://www.renren.io + * + * 版权所有,侵权必究! + */ + +package com.epmet.enums; + +/** + * 用户状态 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +public enum UserStatusEnum { + DISABLE(0), + ENABLED(1); + + private int value; + + UserStatusEnum(int value) { + this.value = value; + } + + public int value() { + return this.value; + } +} diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index b7bc8e27bc..f8d9426042 100644 --- a/epmet-module/gov-access/gov-access-server/pom.xml +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -72,12 +72,6 @@ feign-httpclient 10.3.0 - - com.epmet - oper-access-client - 2.0.0 - compile - diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperLanguageController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovLanguageController.java similarity index 70% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperLanguageController.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovLanguageController.java index e14545c317..85e8bce73d 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperLanguageController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovLanguageController.java @@ -24,8 +24,8 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.OperLanguageDTO; -import com.epmet.service.OperLanguageService; +import com.epmet.dto.GovLanguageDTO; +import com.epmet.service.GovLanguageService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -40,36 +40,36 @@ import java.util.Map; */ @RestController @RequestMapping("operlanguage") -public class OperLanguageController { +public class GovLanguageController { @Autowired - private OperLanguageService operLanguageService; + private GovLanguageService govLanguageService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = operLanguageService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = govLanguageService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - OperLanguageDTO data = operLanguageService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + GovLanguageDTO data = govLanguageService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody OperLanguageDTO dto){ + public Result save(@RequestBody GovLanguageDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - operLanguageService.save(dto); + govLanguageService.save(dto); return new Result(); } @PutMapping - public Result update(@RequestBody OperLanguageDTO dto){ + public Result update(@RequestBody GovLanguageDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - operLanguageService.update(dto); + govLanguageService.update(dto); return new Result(); } @@ -77,7 +77,7 @@ public class OperLanguageController { public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); - operLanguageService.delete(ids); + govLanguageService.delete(ids); return new Result(); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java similarity index 55% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperMenuController.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java index b1f96c1692..d3a67c889f 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperMenuController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java @@ -10,10 +10,10 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.OperMenuDTO; +import com.epmet.dto.GovMenuDTO; import com.epmet.dto.result.MenuResourceDTO; -import com.epmet.service.OperMenuService; -import com.epmet.service.OperResourceService; +import com.epmet.service.GovMenuService; +import com.epmet.service.GovResourceService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -30,43 +30,43 @@ import java.util.Set; */ @RestController @RequestMapping("menu") -public class OperMenuController { +public class GovMenuController { @Autowired - private OperMenuService operMenuService; + private GovMenuService govMenuService; @Autowired - private OperResourceService operResourceService; + private GovResourceService govResourceService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = operMenuService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = govMenuService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - OperMenuDTO data = operMenuService.get(id); + public Result get(@PathVariable("id") String id){ + GovMenuDTO data = govMenuService.get(id); //菜单资源列表 - List resourceList = operResourceService.getMenuResourceList(id); + List resourceList = govResourceService.getMenuResourceList(id); - return new Result().ok(data); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody OperMenuDTO dto, @LoginUser TokenDto tokenDto){ + public Result save(@RequestBody GovMenuDTO dto, @LoginUser TokenDto tokenDto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - operMenuService.save(dto,tokenDto); + govMenuService.save(dto,tokenDto); return new Result(); } @PutMapping - public Result update(@RequestBody OperMenuDTO dto, @LoginUser TokenDto tokenDto){ + public Result update(@RequestBody GovMenuDTO dto, @LoginUser TokenDto tokenDto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - operMenuService.update(dto,tokenDto); + govMenuService.update(dto,tokenDto); return new Result(); } @@ -74,7 +74,7 @@ public class OperMenuController { public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); - operMenuService.delete(ids); + govMenuService.delete(ids); return new Result(); } @@ -84,12 +84,12 @@ public class OperMenuController { AssertUtils.isNull(id, "id"); //判断是否有子菜单或按钮 - List list = operMenuService.getListPid(id); + List list = govMenuService.getListPid(id); if(list.size() > 0){ return new Result().error(ErrorCode.SUB_MENU_EXIST); } - operMenuService.delete(id, tokenDto); + govMenuService.delete(id, tokenDto); return new Result(); } @@ -98,24 +98,24 @@ public class OperMenuController { /** * 获取菜单列表 * @param type 类型 - * @return Result> + * @return Result> */ @GetMapping("list") - public Result> list(Integer type){ - List list = operMenuService.getMenuList(type); + public Result> list(Integer type){ + List list = govMenuService.getMenuList(type); - return new Result>().ok(list); + return new Result>().ok(list); } /** * 导航 * @param tokenDto token - * @return List + * @return List */ @GetMapping("nav") - public Result> nav(@LoginUser TokenDto tokenDto){ - List list = operMenuService.getUserMenuNavList(tokenDto); - return new Result>().ok(list); + public Result> nav(@LoginUser TokenDto tokenDto){ + List list = govMenuService.getUserMenuNavList(tokenDto); + return new Result>().ok(list); } /** @@ -125,7 +125,7 @@ public class OperMenuController { */ @GetMapping("permissions") public Result> permissions(@LoginUser TokenDto tokenDto){ - Set set = operMenuService.getUserPermissions(tokenDto); + Set set = govMenuService.getUserPermissions(tokenDto); return new Result>().ok(set); } @@ -135,10 +135,10 @@ public class OperMenuController { * @return */ @GetMapping("select") - public Result> select(@LoginUser TokenDto tokenDto){ - List list = operMenuService.getUserMenuList(tokenDto, null); + public Result> select(@LoginUser TokenDto tokenDto){ + List list = govMenuService.getUserMenuList(tokenDto, null); - return new Result>().ok(list); + return new Result>().ok(list); } /** @@ -148,9 +148,9 @@ public class OperMenuController { * @Description 运营端用户退出系统,清空菜单和操作权限 * @Date 2020/5/21 18:07 **/ - @GetMapping("clearoperuseraccess") - public Result clearOperUserAccess(@LoginUser TokenDto tokenDto) { - operMenuService.clearOperUserAccess(tokenDto.getApp(), tokenDto.getClient(), tokenDto.getUserId()); + @GetMapping("cleargovuseraccess") + public Result clearGovUserAccess(@LoginUser TokenDto tokenDto) { + govMenuService.clearOperUserAccess(tokenDto.getApp(), tokenDto.getClient(), tokenDto.getUserId()); return new Result(); } } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperResourceController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovResourceController.java similarity index 69% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperResourceController.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovResourceController.java index 8bda911e28..72193db454 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperResourceController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovResourceController.java @@ -24,8 +24,8 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.OperResourceDTO; -import com.epmet.service.OperResourceService; +import com.epmet.dto.GovResourceDTO; +import com.epmet.service.GovResourceService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -39,37 +39,37 @@ import java.util.Map; * @since v1.0.0 2020-03-18 */ @RestController -@RequestMapping("operresource") -public class OperResourceController { +@RequestMapping("govresource") +public class GovResourceController { @Autowired - private OperResourceService operResourceService; + private GovResourceService govResourceService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = operResourceService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = govResourceService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - OperResourceDTO data = operResourceService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + GovResourceDTO data = govResourceService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody OperResourceDTO dto){ + public Result save(@RequestBody GovResourceDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - operResourceService.save(dto); + govResourceService.save(dto); return new Result(); } @PutMapping - public Result update(@RequestBody OperResourceDTO dto){ + public Result update(@RequestBody GovResourceDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - operResourceService.update(dto); + govResourceService.update(dto); return new Result(); } @@ -77,7 +77,7 @@ public class OperResourceController { public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); - operResourceService.delete(ids); + govResourceService.delete(ids); return new Result(); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java similarity index 66% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleController.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java index 33659c8c03..7a1ded893c 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java @@ -24,9 +24,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.OperRoleDTO; -import com.epmet.service.OperRoleMenuService; -import com.epmet.service.OperRoleService; +import com.epmet.dto.GovRoleDTO; +import com.epmet.service.GovRoleMenuService; +import com.epmet.service.GovRoleService; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -43,44 +43,44 @@ import java.util.Map; * @since v1.0.0 2020-03-18 */ @RestController -@RequestMapping("operrole") -public class OperRoleController { +@RequestMapping("govrole") +public class GovRoleController { @Autowired - private OperRoleService operRoleService; + private GovRoleService govRoleService; @Autowired - private OperRoleMenuService operRoleMenuService; + private GovRoleMenuService govRoleMenuService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = operRoleService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = govRoleService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - OperRoleDTO data = operRoleService.get(id); + public Result get(@PathVariable("id") String id){ + GovRoleDTO data = govRoleService.get(id); //查询角色对应的菜单 - List menuIdList = operRoleMenuService.getMenuIdList(id); + List menuIdList = govRoleMenuService.getMenuIdList(id); data.setMenuIdList(menuIdList); - return new Result().ok(data); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody OperRoleDTO dto){ + public Result save(@RequestBody GovRoleDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - operRoleService.save(dto); + govRoleService.save(dto); return new Result(); } @PutMapping - public Result update(@RequestBody OperRoleDTO dto){ + public Result update(@RequestBody GovRoleDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - operRoleService.update(dto); + govRoleService.update(dto); return new Result(); } @@ -88,17 +88,17 @@ public class OperRoleController { public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); - operRoleService.delete(ids); + govRoleService.delete(ids); return new Result(); } @GetMapping("list") @ApiOperation("列表") - public Result> list(){ - List data = operRoleService.list(new HashMap<>(1)); + public Result> list(){ + List data = govRoleService.list(new HashMap<>(1)); - return new Result>().ok(data); + return new Result>().ok(data); } } \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleMenuController.java similarity index 69% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleMenuController.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleMenuController.java index 6520623e16..8b8a7d8aed 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleMenuController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleMenuController.java @@ -24,8 +24,8 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.OperRoleMenuDTO; -import com.epmet.service.OperRoleMenuService; +import com.epmet.dto.GovRoleMenuDTO; +import com.epmet.service.GovRoleMenuService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -39,37 +39,37 @@ import java.util.Map; * @since v1.0.0 2020-03-18 */ @RestController -@RequestMapping("operrolemenu") -public class OperRoleMenuController { +@RequestMapping("govrolemenu") +public class GovRoleMenuController { @Autowired - private OperRoleMenuService operRoleMenuService; + private GovRoleMenuService govRoleMenuService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = operRoleMenuService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = govRoleMenuService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - OperRoleMenuDTO data = operRoleMenuService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + GovRoleMenuDTO data = govRoleMenuService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody OperRoleMenuDTO dto){ + public Result save(@RequestBody GovRoleMenuDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - operRoleMenuService.save(dto); + govRoleMenuService.save(dto); return new Result(); } @PutMapping - public Result update(@RequestBody OperRoleMenuDTO dto){ + public Result update(@RequestBody GovRoleMenuDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - operRoleMenuService.update(dto); + govRoleMenuService.update(dto); return new Result(); } @@ -77,7 +77,7 @@ public class OperRoleMenuController { public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); - operRoleMenuService.delete(ids); + govRoleMenuService.delete(ids); return new Result(); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleUserController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleUserController.java similarity index 73% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleUserController.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleUserController.java index b58bfd322b..fcd5733a4d 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/OperRoleUserController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleUserController.java @@ -24,8 +24,8 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; -import com.epmet.dto.OperRoleUserDTO; -import com.epmet.service.OperRoleUserService; +import com.epmet.dto.GovRoleUserDTO; +import com.epmet.service.GovRoleUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -40,37 +40,37 @@ import java.util.Map; * @since v1.0.0 2020-03-18 */ @RestController -@RequestMapping("operroleuser") -public class OperRoleUserController { +@RequestMapping("govroleuser") +public class GovRoleUserController { @Autowired - private OperRoleUserService operRoleUserService; + private GovRoleUserService govRoleUserService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = operRoleUserService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = govRoleUserService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - OperRoleUserDTO data = operRoleUserService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + GovRoleUserDTO data = govRoleUserService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody OperRoleUserDTO dto){ + public Result save(@RequestBody GovRoleUserDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - operRoleUserService.save(dto); + govRoleUserService.save(dto); return new Result(); } @PutMapping - public Result update(@RequestBody OperRoleUserDTO dto){ + public Result update(@RequestBody GovRoleUserDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - operRoleUserService.update(dto); + govRoleUserService.update(dto); return new Result(); } @@ -78,7 +78,7 @@ public class OperRoleUserController { public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); - operRoleUserService.delete(ids); + govRoleUserService.delete(ids); return new Result(); } @@ -91,7 +91,7 @@ public class OperRoleUserController { */ @GetMapping("getRoleIdList/{id}") public Result>getRoleIdList(@PathVariable("id") String id) { - List list = operRoleUserService.getRoleIdList(id); + List list = govRoleUserService.getRoleIdList(id); return new Result>().ok(list); } @@ -103,7 +103,7 @@ public class OperRoleUserController { */ @PostMapping("saveOrUpdateRole") public Result saveOrUpdate(@RequestParam("userId") String userId, @RequestBody List roleIdList) { - operRoleUserService.saveOrUpdate(userId, roleIdList); + govRoleUserService.saveOrUpdate(userId, roleIdList); return new Result(); } @@ -114,7 +114,7 @@ public class OperRoleUserController { */ @PostMapping("deleteByUserId") public Result deleteByUserId(String id) { - operRoleUserService.deleteByUserId(id); + govRoleUserService.deleteByUserId(id); return new Result(); } @@ -125,7 +125,7 @@ public class OperRoleUserController { */ @PostMapping("deleteByUserIds") public Result deleteByUserIds(@RequestBody String[] ids) { - operRoleUserService.deleteByUserIds(ids); + govRoleUserService.deleteByUserIds(ids); return new Result(); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperLanguageDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovLanguageDao.java similarity index 52% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperLanguageDao.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovLanguageDao.java index dfca54a9ab..acd505c019 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperLanguageDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovLanguageDao.java @@ -9,7 +9,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.OperLanguageEntity; +import com.epmet.entity.GovLanguageEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -18,11 +18,11 @@ import org.apache.ibatis.annotations.Mapper; * @author Mark sunlightcs@gmail.com */ @Mapper -public interface OperLanguageDao extends BaseDao { +public interface GovLanguageDao extends BaseDao { - OperLanguageEntity getLanguage(OperLanguageEntity entity); + GovLanguageEntity getLanguage(GovLanguageEntity entity); - void updateLanguage(OperLanguageEntity entity); + void updateLanguage(GovLanguageEntity entity); - void insertOperLanguageEntity(OperLanguageEntity entity); + void insertOperLanguageEntity(GovLanguageEntity entity); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperMenuDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java similarity index 61% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperMenuDao.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java index 2858a76f24..1e36bff758 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperMenuDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovMenuDao.java @@ -9,7 +9,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.OperMenuEntity; +import com.epmet.entity.GovMenuEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -22,9 +22,9 @@ import java.util.List; * @since 1.0.0 */ @Mapper -public interface OperMenuDao extends BaseDao { +public interface GovMenuDao extends BaseDao { - OperMenuEntity getById(@Param("id") String id, @Param("language") String language); + GovMenuEntity getById(@Param("id") String id, @Param("language") String language); /** * 查询所有菜单列表 @@ -32,7 +32,7 @@ public interface OperMenuDao extends BaseDao { * @param type 菜单类型 * @param language 语言 */ - List getMenuList(@Param("type") Integer type, @Param("language") String language); + List getMenuList(@Param("type") Integer type, @Param("language") String language); /** * 查询用户菜单列表 @@ -41,12 +41,12 @@ public interface OperMenuDao extends BaseDao { * @param type 菜单类型 * @param language 语言 */ - List getUserMenuList(@Param("userId") String userId, @Param("type") Integer type, @Param("language") String language); + List getUserMenuList(@Param("userId") String userId, @Param("type") Integer type, @Param("language") String language); /** * 根据父菜单,查询子菜单 * @param pid 父菜单ID */ - List getListPid(String pid); + List getListPid(String pid); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperResourceDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovResourceDao.java similarity index 70% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperResourceDao.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovResourceDao.java index b92caee0d7..4970d56e9c 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperResourceDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovResourceDao.java @@ -9,7 +9,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.OperResourceEntity; +import com.epmet.entity.GovResourceEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -22,7 +22,7 @@ import java.util.List; * @since 1.0.0 */ @Mapper -public interface OperResourceDao extends BaseDao { +public interface GovResourceDao extends BaseDao { /** * 根据资源编码,删除对应的资源 * @param code 资源编码 @@ -33,16 +33,16 @@ public interface OperResourceDao extends BaseDao { * 获取资源列表 * @param menuId 菜单ID */ - List getMenuResourceList(String menuId); + List getMenuResourceList(String menuId); /** * 获取所有资源列表 */ - List getResourceList(); + List getResourceList(); /** * 获取用户资源列表 * @param userId 用户ID */ - List getUserResourceList(@Param("userId") String userId); + List getUserResourceList(@Param("userId") String userId); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java similarity index 76% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleDao.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java index 408a5275f5..768fc42792 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java @@ -9,7 +9,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.OperRoleEntity; +import com.epmet.entity.GovRoleEntity; import org.apache.ibatis.annotations.Mapper; /** @@ -19,6 +19,6 @@ import org.apache.ibatis.annotations.Mapper; * @since 1.0.0 */ @Mapper -public interface OperRoleDao extends BaseDao { +public interface GovRoleDao extends BaseDao { } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleMenuDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleMenuDao.java similarity index 88% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleMenuDao.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleMenuDao.java index 005f9e44ac..dc0559acb3 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleMenuDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleMenuDao.java @@ -9,7 +9,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.OperRoleMenuEntity; +import com.epmet.entity.GovRoleMenuEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -21,7 +21,7 @@ import java.util.List; * @since 1.0.0 */ @Mapper -public interface OperRoleMenuDao extends BaseDao { +public interface GovRoleMenuDao extends BaseDao { /** * 根据角色ID,获取菜单ID列表 diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleUserDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleUserDao.java similarity index 90% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleUserDao.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleUserDao.java index f33c5a241a..bf400e0584 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/OperRoleUserDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleUserDao.java @@ -9,7 +9,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.OperRoleUserEntity; +import com.epmet.entity.GovRoleUserEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -21,7 +21,7 @@ import java.util.List; * @since 1.0.0 */ @Mapper -public interface OperRoleUserDao extends BaseDao { +public interface GovRoleUserDao extends BaseDao { /** * 根据角色ids,删除角色用户关系 diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperLanguageEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovLanguageEntity.java similarity index 89% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperLanguageEntity.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovLanguageEntity.java index 3e822d5665..ee84f846d9 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperLanguageEntity.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovLanguageEntity.java @@ -21,8 +21,8 @@ import java.io.Serializable; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("oper_language") -public class OperLanguageEntity implements Serializable { +@TableName("gov_language") +public class GovLanguageEntity implements Serializable { private static final long serialVersionUID = 1L; /** diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperMenuEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovMenuEntity.java similarity index 93% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperMenuEntity.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovMenuEntity.java index ba621edcc0..cfeef721b8 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperMenuEntity.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovMenuEntity.java @@ -22,8 +22,8 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("oper_menu") -public class OperMenuEntity extends BaseEpmetEntity { +@TableName("gov_menu") +public class GovMenuEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; /** diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperResourceEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovResourceEntity.java similarity index 91% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperResourceEntity.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovResourceEntity.java index 7afd722bd2..1d5d716c22 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperResourceEntity.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovResourceEntity.java @@ -21,8 +21,8 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("oper_resource") -public class OperResourceEntity extends BaseEpmetEntity { +@TableName("gov_resource") +public class GovResourceEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; /** diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovRoleEntity.java similarity index 90% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleEntity.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovRoleEntity.java index 7fd5393e7e..4bc4575836 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleEntity.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovRoleEntity.java @@ -23,8 +23,8 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("oper_role") -public class OperRoleEntity extends BaseEpmetEntity { +@TableName("gov_role") +public class GovRoleEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; /** diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleMenuEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovRoleMenuEntity.java similarity index 87% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleMenuEntity.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovRoleMenuEntity.java index 650619ffa9..6ea4d1f2a5 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleMenuEntity.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovRoleMenuEntity.java @@ -21,8 +21,8 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("oper_role_menu") -public class OperRoleMenuEntity extends BaseEpmetEntity { +@TableName("gov_role_menu") +public class GovRoleMenuEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; /** * 角色ID diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleUserEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovRoleUserEntity.java similarity index 87% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleUserEntity.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovRoleUserEntity.java index 8eb9612417..599ca7f3e2 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/OperRoleUserEntity.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovRoleUserEntity.java @@ -21,8 +21,8 @@ import lombok.EqualsAndHashCode; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("oper_role_user") -public class OperRoleUserEntity extends BaseEpmetEntity { +@TableName("gov_role_user") +public class GovRoleUserEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; /** diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperLanguageRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovLanguageRedis.java similarity index 97% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperLanguageRedis.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovLanguageRedis.java index fa479f92ca..8f9595582b 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperLanguageRedis.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovLanguageRedis.java @@ -28,7 +28,7 @@ import org.springframework.stereotype.Component; * @since v1.0.0 2020-03-18 */ @Component -public class OperLanguageRedis { +public class GovLanguageRedis { @Autowired private RedisUtils redisUtils; diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperMenuRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovMenuRedis.java similarity index 90% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperMenuRedis.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovMenuRedis.java index f1b568f33a..361d6c3014 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperMenuRedis.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovMenuRedis.java @@ -20,7 +20,7 @@ package com.epmet.redis; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.HttpContextUtils; -import com.epmet.dto.OperMenuDTO; +import com.epmet.dto.GovMenuDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -34,7 +34,7 @@ import java.util.Set; * @since v1.0.0 2020-03-18 */ @Component -public class OperMenuRedis { +public class GovMenuRedis { @Autowired private RedisUtils redisUtils; @@ -51,14 +51,14 @@ public class OperMenuRedis { return null; } - public void setUserMenuNavList(String userId, String app, String client, List menuList){ + public void setUserMenuNavList(String userId, String app, String client, List menuList){ String key = RedisKeys.getUserMenuNavKey(userId, app, client, HttpContextUtils.getLanguage()); redisUtils.set(key, menuList); } - public List getUserMenuNavList(String userId, String app, String client){ + public List getUserMenuNavList(String userId, String app, String client){ String key = RedisKeys.getUserMenuNavKey(userId, app, client, HttpContextUtils.getLanguage()); - return (List)redisUtils.get(key); + return (List)redisUtils.get(key); } public void setUserPermissions(String userId, String app, String client, Set permsSet){ diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperResourceRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovResourceRedis.java similarity index 97% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperResourceRedis.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovResourceRedis.java index 68ea39a15e..e21bd5095c 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperResourceRedis.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovResourceRedis.java @@ -29,7 +29,7 @@ import org.springframework.stereotype.Component; * @since v1.0.0 2020-03-18 */ @Component -public class OperResourceRedis { +public class GovResourceRedis { @Autowired private RedisUtils redisUtils; diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleMenuRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovRoleMenuRedis.java similarity index 97% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleMenuRedis.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovRoleMenuRedis.java index 28f98c5615..c778d22c7d 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleMenuRedis.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovRoleMenuRedis.java @@ -28,7 +28,7 @@ import org.springframework.stereotype.Component; * @since v1.0.0 2020-03-18 */ @Component -public class OperRoleMenuRedis { +public class GovRoleMenuRedis { @Autowired private RedisUtils redisUtils; diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovRoleRedis.java similarity index 97% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleRedis.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovRoleRedis.java index 15e6682155..3e87e447dd 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleRedis.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovRoleRedis.java @@ -28,7 +28,7 @@ import org.springframework.stereotype.Component; * @since v1.0.0 2020-03-18 */ @Component -public class OperRoleRedis { +public class GovRoleRedis { @Autowired private RedisUtils redisUtils; diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleUserRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovRoleUserRedis.java similarity index 97% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleUserRedis.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovRoleUserRedis.java index 7f6df90fa3..7a7aad6c8c 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/OperRoleUserRedis.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovRoleUserRedis.java @@ -28,7 +28,7 @@ import org.springframework.stereotype.Component; * @since v1.0.0 2020-03-18 */ @Component -public class OperRoleUserRedis { +public class GovRoleUserRedis { @Autowired private RedisUtils redisUtils; diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperLanguageService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovLanguageService.java similarity index 80% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperLanguageService.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovLanguageService.java index 0f0ad555bc..1f4a5e65e3 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperLanguageService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovLanguageService.java @@ -19,8 +19,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.OperLanguageDTO; -import com.epmet.entity.OperLanguageEntity; +import com.epmet.dto.GovLanguageDTO; +import com.epmet.entity.GovLanguageEntity; import java.util.List; import java.util.Map; @@ -31,37 +31,37 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-18 */ -public interface OperLanguageService extends BaseService { +public interface GovLanguageService extends BaseService { /** * 默认分页 * * @param params - * @return PageData + * @return PageData * @author generator * @date 2020-03-18 */ - PageData page(Map params); + PageData page(Map params); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator * @date 2020-03-18 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return OperLanguageDTO + * @return GovLanguageDTO * @author generator * @date 2020-03-18 */ - OperLanguageDTO get(String id); + GovLanguageDTO get(String id); /** * 默认保存 @@ -71,7 +71,7 @@ public interface OperLanguageService extends BaseService { * @author generator * @date 2020-03-18 */ - void save(OperLanguageDTO dto); + void save(GovLanguageDTO dto); /** * 默认更新 @@ -81,7 +81,7 @@ public interface OperLanguageService extends BaseService { * @author generator * @date 2020-03-18 */ - void update(OperLanguageDTO dto); + void update(GovLanguageDTO dto); /** * 批量删除 diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperMenuService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java similarity index 74% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperMenuService.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java index 70794bc18b..b5c0cf12a3 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperMenuService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovMenuService.java @@ -20,8 +20,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.dto.OperMenuDTO; -import com.epmet.entity.OperMenuEntity; +import com.epmet.dto.GovMenuDTO; +import com.epmet.entity.GovMenuEntity; import java.util.List; import java.util.Map; @@ -33,37 +33,37 @@ import java.util.Set; * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-18 */ -public interface OperMenuService extends BaseService { +public interface GovMenuService extends BaseService { /** * 默认分页 * * @param params - * @return PageData + * @return PageData * @author generator * @date 2020-03-18 */ - PageData page(Map params); + PageData page(Map params); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator * @date 2020-03-18 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return OperMenuDTO + * @return GovMenuDTO * @author generator * @date 2020-03-18 */ - OperMenuDTO get(String id); + GovMenuDTO get(String id); /** * 默认保存 @@ -73,7 +73,7 @@ public interface OperMenuService extends BaseService { * @author generator * @date 2020-03-18 */ - void save(OperMenuDTO dto, TokenDto tokenDto); + void save(GovMenuDTO dto, TokenDto tokenDto); /** * 默认更新 @@ -83,7 +83,7 @@ public interface OperMenuService extends BaseService { * @author generator * @date 2020-03-18 */ - void update(OperMenuDTO dto, TokenDto tokenDto); + void update(GovMenuDTO dto, TokenDto tokenDto); /** * 批量删除 @@ -109,28 +109,28 @@ public interface OperMenuService extends BaseService { * * @param tokenDto 用户信息 * @param type 菜单类型 - * @return java.util.List + * @return java.util.List */ - List getUserMenuList(TokenDto tokenDto, Integer type); + List getUserMenuList(TokenDto tokenDto, Integer type); /** * 菜单列表 * * @param type 菜单类型 */ - List getMenuList(Integer type); + List getMenuList(Integer type); /** * 用户菜单导航 * @param tokenDto 用户信息 - * @return java.util.List + * @return java.util.List */ - List getUserMenuNavList(TokenDto tokenDto); + List getUserMenuNavList(TokenDto tokenDto); /** * 获取用户权限标识 * @param tokenDto 用户信息 - * @return java.util.Set + * @return java.util.Set */ Set getUserPermissions(TokenDto tokenDto); @@ -138,7 +138,7 @@ public interface OperMenuService extends BaseService { * 根据父菜单,查询子菜单 * @param pid 父菜单ID */ - List getListPid(String pid); + List getListPid(String pid); void clearOperUserAccess(String app, String client, String userId); } \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperResourceService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovResourceService.java similarity index 81% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperResourceService.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovResourceService.java index 560e097c0b..8b6b8f5e6d 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperResourceService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovResourceService.java @@ -19,9 +19,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.OperResourceDTO; +import com.epmet.dto.GovResourceDTO; import com.epmet.dto.result.MenuResourceDTO; -import com.epmet.entity.OperResourceEntity; +import com.epmet.entity.GovResourceEntity; import java.util.List; import java.util.Map; @@ -32,37 +32,37 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-18 */ -public interface OperResourceService extends BaseService { +public interface GovResourceService extends BaseService { /** * 默认分页 * * @param params - * @return PageData + * @return PageData * @author generator * @date 2020-03-18 */ - PageData page(Map params); + PageData page(Map params); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator * @date 2020-03-18 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return OperResourceDTO + * @return GovResourceDTO * @author generator * @date 2020-03-18 */ - OperResourceDTO get(String id); + GovResourceDTO get(String id); /** * 默认保存 @@ -72,7 +72,7 @@ public interface OperResourceService extends BaseService { * @author generator * @date 2020-03-18 */ - void save(OperResourceDTO dto); + void save(GovResourceDTO dto); /** * 默认更新 @@ -82,7 +82,7 @@ public interface OperResourceService extends BaseService { * @author generator * @date 2020-03-18 */ - void update(OperResourceDTO dto); + void update(GovResourceDTO dto); /** * 批量删除 diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleMenuService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleMenuService.java similarity index 82% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleMenuService.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleMenuService.java index 84cfe6d996..7b0d2af34a 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleMenuService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleMenuService.java @@ -19,8 +19,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.OperRoleMenuDTO; -import com.epmet.entity.OperRoleMenuEntity; +import com.epmet.dto.GovRoleMenuDTO; +import com.epmet.entity.GovRoleMenuEntity; import java.util.List; import java.util.Map; @@ -31,37 +31,37 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-18 */ -public interface OperRoleMenuService extends BaseService { +public interface GovRoleMenuService extends BaseService { /** * 默认分页 * * @param params - * @return PageData + * @return PageData * @author generator * @date 2020-03-18 */ - PageData page(Map params); + PageData page(Map params); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator * @date 2020-03-18 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return OperRoleMenuDTO + * @return GovRoleMenuDTO * @author generator * @date 2020-03-18 */ - OperRoleMenuDTO get(String id); + GovRoleMenuDTO get(String id); /** * 默认保存 @@ -71,7 +71,7 @@ public interface OperRoleMenuService extends BaseService { * @author generator * @date 2020-03-18 */ - void save(OperRoleMenuDTO dto); + void save(GovRoleMenuDTO dto); /** * 默认更新 @@ -81,7 +81,7 @@ public interface OperRoleMenuService extends BaseService { * @author generator * @date 2020-03-18 */ - void update(OperRoleMenuDTO dto); + void update(GovRoleMenuDTO dto); /** * 批量删除 diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java similarity index 79% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleService.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java index b4368ca747..4fbf7e0f58 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java @@ -19,8 +19,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.OperRoleDTO; -import com.epmet.entity.OperRoleEntity; +import com.epmet.dto.GovRoleDTO; +import com.epmet.entity.GovRoleEntity; import java.util.List; import java.util.Map; @@ -31,37 +31,37 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-18 */ -public interface OperRoleService extends BaseService { +public interface GovRoleService extends BaseService { /** * 默认分页 * * @param params - * @return PageData + * @return PageData * @author generator * @date 2020-03-18 */ - PageData page(Map params); + PageData page(Map params); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator * @date 2020-03-18 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return OperRoleDTO + * @return GovRoleDTO * @author generator * @date 2020-03-18 */ - OperRoleDTO get(String id); + GovRoleDTO get(String id); /** * 默认保存 @@ -71,7 +71,7 @@ public interface OperRoleService extends BaseService { * @author generator * @date 2020-03-18 */ - void save(OperRoleDTO dto); + void save(GovRoleDTO dto); /** * 默认更新 @@ -81,7 +81,7 @@ public interface OperRoleService extends BaseService { * @author generator * @date 2020-03-18 */ - void update(OperRoleDTO dto); + void update(GovRoleDTO dto); /** * 批量删除 diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleUserService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleUserService.java similarity index 83% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleUserService.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleUserService.java index c2e323528c..ff67c7d239 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/OperRoleUserService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleUserService.java @@ -19,8 +19,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.OperRoleUserDTO; -import com.epmet.entity.OperRoleUserEntity; +import com.epmet.dto.GovRoleUserDTO; +import com.epmet.entity.GovRoleUserEntity; import java.util.List; import java.util.Map; @@ -31,37 +31,37 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2020-03-18 */ -public interface OperRoleUserService extends BaseService { +public interface GovRoleUserService extends BaseService { /** * 默认分页 * * @param params - * @return PageData + * @return PageData * @author generator * @date 2020-03-18 */ - PageData page(Map params); + PageData page(Map params); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator * @date 2020-03-18 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return OperRoleUserDTO + * @return GovRoleUserDTO * @author generator * @date 2020-03-18 */ - OperRoleUserDTO get(String id); + GovRoleUserDTO get(String id); /** * 默认保存 @@ -71,7 +71,7 @@ public interface OperRoleUserService extends BaseService { * @author generator * @date 2020-03-18 */ - void save(OperRoleUserDTO dto); + void save(GovRoleUserDTO dto); /** * 默认更新 @@ -81,7 +81,7 @@ public interface OperRoleUserService extends BaseService { * @author generator * @date 2020-03-18 */ - void update(OperRoleUserDTO dto); + void update(GovRoleUserDTO dto); /** * 批量删除 diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperLanguageServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovLanguageServiceImpl.java similarity index 65% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperLanguageServiceImpl.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovLanguageServiceImpl.java index bc07525c87..43e21684ef 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperLanguageServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovLanguageServiceImpl.java @@ -23,11 +23,11 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.dao.OperLanguageDao; -import com.epmet.dto.OperLanguageDTO; -import com.epmet.entity.OperLanguageEntity; -import com.epmet.redis.OperLanguageRedis; -import com.epmet.service.OperLanguageService; +import com.epmet.dao.GovLanguageDao; +import com.epmet.dto.GovLanguageDTO; +import com.epmet.entity.GovLanguageEntity; +import com.epmet.redis.GovLanguageRedis; +import com.epmet.service.GovLanguageService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -44,53 +44,53 @@ import java.util.Map; * @since v1.0.0 2020-03-18 */ @Service -public class OperLanguageServiceImpl extends BaseServiceImpl implements OperLanguageService { +public class GovLanguageServiceImpl extends BaseServiceImpl implements GovLanguageService { @Autowired - private OperLanguageRedis operLanguageRedis; + private GovLanguageRedis govLanguageRedis; @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, OperLanguageDTO.class); + return getPageData(page, GovLanguageDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, OperLanguageDTO.class); + return ConvertUtils.sourceToTarget(entityList, GovLanguageDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public OperLanguageDTO get(String id) { - OperLanguageEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, OperLanguageDTO.class); + public GovLanguageDTO get(String id) { + GovLanguageEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GovLanguageDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(OperLanguageDTO dto) { - OperLanguageEntity entity = ConvertUtils.sourceToTarget(dto, OperLanguageEntity.class); + public void save(GovLanguageDTO dto) { + GovLanguageEntity entity = ConvertUtils.sourceToTarget(dto, GovLanguageEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(OperLanguageDTO dto) { - OperLanguageEntity entity = ConvertUtils.sourceToTarget(dto, OperLanguageEntity.class); + public void update(GovLanguageDTO dto) { + GovLanguageEntity entity = ConvertUtils.sourceToTarget(dto, GovLanguageEntity.class); updateById(entity); } @@ -103,7 +103,7 @@ public class OperLanguageServiceImpl extends BaseServiceImpl implements OperMenuService { +public class GovMenuServiceImpl extends BaseServiceImpl implements GovMenuService { protected Logger logger = LoggerFactory.getLogger(getClass()); @Autowired - private OperMenuRedis operMenuRedis; + private GovMenuRedis govMenuRedis; @Autowired private EpmetUserFeignClient epmetUserFeignClient; @Autowired - private OperRoleMenuService operRoleMenuService; + private GovRoleMenuService govRoleMenuService; @Autowired - private OperResourceService operResourceService; + private GovResourceService govResourceService; @Autowired - private OperLanguageService operLanguageService; + private GovLanguageService govLanguageService; @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, OperMenuDTO.class); + return getPageData(page, GovMenuDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, OperMenuDTO.class); + return ConvertUtils.sourceToTarget(entityList, GovMenuDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public OperMenuDTO get(String id) { - OperMenuEntity entity = baseDao.getById(id, HttpContextUtils.getLanguage()); + public GovMenuDTO get(String id) { + GovMenuEntity entity = baseDao.getById(id, HttpContextUtils.getLanguage()); - return ConvertUtils.sourceToTarget(entity, OperMenuDTO.class); + return ConvertUtils.sourceToTarget(entity, GovMenuDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(OperMenuDTO dto, TokenDto tokenDto) { - OperMenuEntity entity = ConvertUtils.sourceToTarget(dto, OperMenuEntity.class); + public void save(GovMenuDTO dto, TokenDto tokenDto) { + GovMenuEntity entity = ConvertUtils.sourceToTarget(dto, GovMenuEntity.class); //保存菜单 insert(entity); saveLanguage(entity.getId(), "name", entity.getName()); //保存菜单资源 - operResourceService.saveMenuResource(entity.getId(), entity.getName(), dto.getResourceList()); + govResourceService.saveMenuResource(entity.getId(), entity.getName(), dto.getResourceList()); //清空当前用户,菜单导航、权限标识 - operMenuRedis.delete(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); + govMenuRedis.delete(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); } @Override @Transactional(rollbackFor = Exception.class) - public void update(OperMenuDTO dto, TokenDto tokenDto) { - OperMenuEntity entity = ConvertUtils.sourceToTarget(dto, OperMenuEntity.class); + public void update(GovMenuDTO dto, TokenDto tokenDto) { + GovMenuEntity entity = ConvertUtils.sourceToTarget(dto, GovMenuEntity.class); //上级菜单不能为自身 if(entity.getId().equals(entity.getPid())){ @@ -134,10 +131,10 @@ public class OperMenuServiceImpl extends BaseServiceImpl getUserMenuList(TokenDto tokenDto, Integer type) { - List menuList; + public List getUserMenuList(TokenDto tokenDto, Integer type) { + List menuList; -// Result operUserDTOResult = epmetUserFeignClient.info(tokenDto.getUserId()); +// Result govUserDTOResult = epmetUserFeignClient.info(tokenDto.getUserId()); // //系统管理员,拥有最高权限 -// if(operUserDTOResult.getData().getSuperAdmin() == SuperAdminEnum.YES.value()){ +// if(govUserDTOResult.getData().getSuperAdmin() == SuperAdminEnum.YES.value()){ menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); // }else { // menuList = baseDao.getUserMenuList(tokenDto.getUserId(), type, HttpContextUtils.getLanguage()); // } - List dtoList = ConvertUtils.sourceToTarget(menuList, OperMenuDTO.class); + List dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); return TreeUtils.buildTree(dtoList); } @Override - public List getMenuList(Integer type) { - List menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); + public List getMenuList(Integer type) { + List menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); - List dtoList = ConvertUtils.sourceToTarget(menuList, OperMenuDTO.class); + List dtoList = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); return TreeUtils.buildTree(dtoList, Constant.OPER_MENU_ROOT); } @Override - public List getUserMenuNavList(TokenDto tokenDto) { - List menuList = operMenuRedis.getUserMenuNavList(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); + public List getUserMenuNavList(TokenDto tokenDto) { + List menuList = govMenuRedis.getUserMenuNavList(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); if(menuList == null){ menuList = getUserMenuList(tokenDto, MenuTypeEnum.MENU.value()); - operMenuRedis.setUserMenuNavList(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient(), menuList); + govMenuRedis.setUserMenuNavList(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient(), menuList); } return menuList; @@ -201,50 +198,50 @@ public class OperMenuServiceImpl extends BaseServiceImpl getUserPermissions(TokenDto tokenDto) { //用户权限列表 - Set permsSet = operMenuRedis.getUserPermissions(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); + Set permsSet = govMenuRedis.getUserPermissions(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient()); if(permsSet != null){ return permsSet; } -// Result operUserDTOResult = epmetUserFeignClient.info(tokenDto.getUserId()); +// Result govUserDTOResult = epmetUserFeignClient.info(tokenDto.getUserId()); //超级管理员,拥有最高权限 - List menuList; -// if(operUserDTOResult.getData().getSuperAdmin() == SuperAdminEnum.YES.value()){ + List menuList; +// if(govUserDTOResult.getData().getSuperAdmin() == SuperAdminEnum.YES.value()){ menuList = baseDao.getMenuList(MenuTypeEnum.BUTTON.value(), HttpContextUtils.getLanguage()); // }else{ // menuList = baseDao.getUserMenuList(tokenDto.getUserId(), MenuTypeEnum.BUTTON.value(), HttpContextUtils.getLanguage()); // } permsSet = new HashSet<>(); - for(OperMenuEntity menu : menuList){ + for(GovMenuEntity menu : menuList){ if(StringUtils.isNotBlank(menu.getPermissions())){ permsSet.add(menu.getPermissions()); } } //保存到缓存 - operMenuRedis.setUserPermissions(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient(), permsSet); + govMenuRedis.setUserPermissions(tokenDto.getUserId(), tokenDto.getApp(), tokenDto.getClient(), permsSet); return permsSet; } @Override - public List getListPid(String pid) { - List menuList = baseDao.getListPid(pid); + public List getListPid(String pid) { + List menuList = baseDao.getListPid(pid); - return ConvertUtils.sourceToTarget(menuList, OperMenuDTO.class); + return ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); } @Override public void clearOperUserAccess(String app, String client, String userId) { //清空当前用户,菜单导航、权限标识 - operMenuRedis.delete(userId, app, client); + govMenuRedis.delete(userId, app, client); logger.info(String.format("运营端用户退出系统%s,清空菜单、权限成功",userId)); } private void saveLanguage(String tableId, String fieldName, String fieldValue){ - operLanguageService.saveOrUpdate("oper_menu", tableId, fieldName, fieldValue, HttpContextUtils.getLanguage()); + govLanguageService.saveOrUpdate("gov_menu", tableId, fieldName, fieldValue, HttpContextUtils.getLanguage()); } } \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperResourceServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovResourceServiceImpl.java similarity index 68% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperResourceServiceImpl.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovResourceServiceImpl.java index c12d519b2c..2cb1da7087 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperResourceServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovResourceServiceImpl.java @@ -25,13 +25,13 @@ import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.enums.ResourceAuthEnum; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.dao.OperResourceDao; -import com.epmet.dto.OperResourceDTO; +import com.epmet.dao.GovResourceDao; +import com.epmet.dto.GovResourceDTO; import com.epmet.dto.result.MenuResourceDTO; -import com.epmet.entity.OperResourceEntity; +import com.epmet.entity.GovResourceEntity; import com.epmet.enums.MenuFlagEnum; -import com.epmet.redis.OperResourceRedis; -import com.epmet.service.OperResourceService; +import com.epmet.redis.GovResourceRedis; +import com.epmet.service.GovResourceService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -48,53 +48,53 @@ import java.util.Map; * @since v1.0.0 2020-03-18 */ @Service -public class OperResourceServiceImpl extends BaseServiceImpl implements OperResourceService { +public class GovResourceServiceImpl extends BaseServiceImpl implements GovResourceService { @Autowired - private OperResourceRedis operResourceRedis; + private GovResourceRedis govResourceRedis; @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, OperResourceDTO.class); + return getPageData(page, GovResourceDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, OperResourceDTO.class); + return ConvertUtils.sourceToTarget(entityList, GovResourceDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public OperResourceDTO get(String id) { - OperResourceEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, OperResourceDTO.class); + public GovResourceDTO get(String id) { + GovResourceEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GovResourceDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(OperResourceDTO dto) { - OperResourceEntity entity = ConvertUtils.sourceToTarget(dto, OperResourceEntity.class); + public void save(GovResourceDTO dto) { + GovResourceEntity entity = ConvertUtils.sourceToTarget(dto, GovResourceEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(OperResourceDTO dto) { - OperResourceEntity entity = ConvertUtils.sourceToTarget(dto, OperResourceEntity.class); + public void update(GovResourceDTO dto) { + GovResourceEntity entity = ConvertUtils.sourceToTarget(dto, GovResourceEntity.class); updateById(entity); } @@ -111,7 +111,7 @@ public class OperResourceServiceImpl extends BaseServiceImpl getMenuResourceList(String menuId) { - List entityList = baseDao.getMenuResourceList(menuId+""); + List entityList = baseDao.getMenuResourceList(menuId+""); return ConvertUtils.sourceToTarget(entityList, MenuResourceDTO.class); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleMenuServiceImpl.java similarity index 65% rename from epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleMenuServiceImpl.java rename to epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleMenuServiceImpl.java index f4206928b9..ec31c69146 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/OperRoleMenuServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleMenuServiceImpl.java @@ -24,11 +24,11 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.dao.OperRoleMenuDao; -import com.epmet.dto.OperRoleMenuDTO; -import com.epmet.entity.OperRoleMenuEntity; -import com.epmet.redis.OperRoleMenuRedis; -import com.epmet.service.OperRoleMenuService; +import com.epmet.dao.GovRoleMenuDao; +import com.epmet.dto.GovRoleMenuDTO; +import com.epmet.entity.GovRoleMenuEntity; +import com.epmet.redis.GovRoleMenuRedis; +import com.epmet.service.GovRoleMenuService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -45,55 +45,55 @@ import java.util.Map; * @since v1.0.0 2020-03-18 */ @Service -public class OperRoleMenuServiceImpl extends BaseServiceImpl implements OperRoleMenuService { +public class GovRoleMenuServiceImpl extends BaseServiceImpl implements GovRoleMenuService { @Autowired - private OperRoleMenuRedis operRoleMenuRedis; + private GovRoleMenuRedis govRoleMenuRedis; @Autowired - private OperRoleMenuDao operRoleMenuDao; + private GovRoleMenuDao govRoleMenuDao; @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, OperRoleMenuDTO.class); + return getPageData(page, GovRoleMenuDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, OperRoleMenuDTO.class); + return ConvertUtils.sourceToTarget(entityList, GovRoleMenuDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public OperRoleMenuDTO get(String id) { - OperRoleMenuEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, OperRoleMenuDTO.class); + public GovRoleMenuDTO get(String id) { + GovRoleMenuEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GovRoleMenuDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(OperRoleMenuDTO dto) { - OperRoleMenuEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleMenuEntity.class); + public void save(GovRoleMenuDTO dto) { + GovRoleMenuEntity entity = ConvertUtils.sourceToTarget(dto, GovRoleMenuEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(OperRoleMenuDTO dto) { - OperRoleMenuEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleMenuEntity.class); + public void update(GovRoleMenuDTO dto) { + GovRoleMenuEntity entity = ConvertUtils.sourceToTarget(dto, GovRoleMenuEntity.class); updateById(entity); } @@ -122,12 +122,12 @@ public class OperRoleMenuServiceImpl extends BaseServiceImpl implements OperRoleService { +public class GovRoleServiceImpl extends BaseServiceImpl implements GovRoleService { @Autowired - private OperRoleRedis operRoleRedis; + private GovRoleRedis govRoleRedis; @Autowired - private OperRoleMenuService OperRoleMenuService; + private GovRoleMenuService govRoleMenuService; @Autowired - private OperRoleUserService operRoleUserService; + private GovRoleUserService govRoleUserService; @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, OperRoleDTO.class); + return getPageData(page, GovRoleDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, OperRoleDTO.class); + return ConvertUtils.sourceToTarget(entityList, GovRoleDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); String name = (String)params.get(FieldConstant.NAME_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id).like(StringUtils.isNotBlank(name), FieldConstant.NAME, name); return wrapper; } @Override - public OperRoleDTO get(String id) { - OperRoleEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, OperRoleDTO.class); + public GovRoleDTO get(String id) { + GovRoleEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GovRoleDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(OperRoleDTO dto) { - OperRoleEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleEntity.class); + public void save(GovRoleDTO dto) { + GovRoleEntity entity = ConvertUtils.sourceToTarget(dto, GovRoleEntity.class); insert(entity); //保存角色菜单关系 - OperRoleMenuService.saveOrUpdate(entity.getId(), dto.getMenuIdList()); + govRoleMenuService.saveOrUpdate(entity.getId(), dto.getMenuIdList()); } @Override @Transactional(rollbackFor = Exception.class) - public void update(OperRoleDTO dto) { - OperRoleEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleEntity.class); + public void update(GovRoleDTO dto) { + GovRoleEntity entity = ConvertUtils.sourceToTarget(dto, GovRoleEntity.class); updateById(entity); //保存角色菜单关系 - OperRoleMenuService.saveOrUpdate(entity.getId(), dto.getMenuIdList()); + govRoleMenuService.saveOrUpdate(entity.getId(), dto.getMenuIdList()); } @Override @@ -110,9 +110,9 @@ public class OperRoleServiceImpl extends BaseServiceImpl implements OperRoleUserService { +public class GovRoleUserServiceImpl extends BaseServiceImpl implements GovRoleUserService { @Autowired - private OperRoleUserRedis operRoleUserRedis; + private GovRoleUserRedis govRoleUserRedis; @Autowired - private OperRoleUserDao operRoleUserDao; + private GovRoleUserDao govRoleUserDao; @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, OperRoleUserDTO.class); + return getPageData(page, GovRoleUserDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, OperRoleUserDTO.class); + return ConvertUtils.sourceToTarget(entityList, GovRoleUserDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public OperRoleUserDTO get(String id) { - OperRoleUserEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, OperRoleUserDTO.class); + public GovRoleUserDTO get(String id) { + GovRoleUserEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, GovRoleUserDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(OperRoleUserDTO dto) { - OperRoleUserEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleUserEntity.class); + public void save(GovRoleUserDTO dto) { + GovRoleUserEntity entity = ConvertUtils.sourceToTarget(dto, GovRoleUserEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(OperRoleUserDTO dto) { - OperRoleUserEntity entity = ConvertUtils.sourceToTarget(dto, OperRoleUserEntity.class); + public void update(GovRoleUserDTO dto) { + GovRoleUserEntity entity = ConvertUtils.sourceToTarget(dto, GovRoleUserEntity.class); updateById(entity); } @@ -117,23 +117,23 @@ public class OperRoleUserServiceImpl extends BaseServiceImpl - + - + select * from gov_language where table_name=#{tableName} and table_id=#{tableId} and field_name=#{fieldName} and language=#{language} - - INSERT INTO `oper_language` ( `table_name`, `table_id`, `field_name`, `field_value`, `language` ) + + INSERT INTO `gov_language` ( `table_name`, `table_id`, `field_name`, `field_value`, `language` ) VALUES ( #{tableName}, #{tableId}, #{fieldName}, #{fieldValue}, #{language} ) diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml new file mode 100644 index 0000000000..90d0b8ee92 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovResourceDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovResourceDao.xml new file mode 100644 index 0000000000..8296d14065 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovResourceDao.xml @@ -0,0 +1,25 @@ + + + + + + + delete from gov_resource where resource_code = #{value} + + + + + + + + + diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovRoleDao.xml similarity index 77% rename from epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleDao.xml rename to epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovRoleDao.xml index e1df3a1038..2de28e07bf 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleDao.xml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovRoleDao.xml @@ -1,6 +1,6 @@ - + diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleMenuDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovRoleMenuDao.xml similarity index 57% rename from epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleMenuDao.xml rename to epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovRoleMenuDao.xml index b9075fceda..862679b5de 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleMenuDao.xml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovRoleMenuDao.xml @@ -1,25 +1,25 @@ - + - update oper_role_menu set del_flag = 1 where del_flag = 0 and role_id in + update gov_role_menu set del_flag = 1 where del_flag = 0 and role_id in #{roleId} - update oper_role_menu set del_flag = 1 where role_id = #{value} and del_flag = 0 + update gov_role_menu set del_flag = 1 where role_id = #{value} and del_flag = 0 - update oper_role_menu set del_flag = 1 where menu_id = #{value} and del_flag = 0 + update gov_role_menu set del_flag = 1 where menu_id = #{value} and del_flag = 0 diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleUserDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovRoleUserDao.xml similarity index 58% rename from epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleUserDao.xml rename to epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovRoleUserDao.xml index 005ef2451c..b5cb172451 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperRoleUserDao.xml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovRoleUserDao.xml @@ -1,32 +1,32 @@ - + - update oper_role_user set del_flag = 1 where del_flag = 0 and role_id in + update gov_role_user set del_flag = 1 where del_flag = 0 and role_id in #{roleId} - update oper_role_user set del_flag = 1 where del_flag = 0 and user_id in + update gov_role_user set del_flag = 1 where del_flag = 0 and user_id in #{userId} - update oper_role_user set del_flag = 1 where role_id = #{value} and del_flag = 0 + update gov_role_user set del_flag = 1 where role_id = #{value} and del_flag = 0 - update oper_role_user set del_flag = 1 where user_id = #{value} and del_flag = 0 + update gov_role_user set del_flag = 1 where user_id = #{value} and del_flag = 0 diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperMenuDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperMenuDao.xml deleted file mode 100644 index e3a61dbd36..0000000000 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperMenuDao.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperResourceDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperResourceDao.xml deleted file mode 100644 index 94c839c252..0000000000 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/OperResourceDao.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - delete from oper_resource where resource_code = #{value} - - - - - - - - - From b69555351602d821ecdc3fe21f6b94fdc9e2157d Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 25 Aug 2020 13:47:35 +0800 Subject: [PATCH 113/360] =?UTF-8?q?gov-access=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-access/gov-access-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-access/gov-access-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml index 0f0fd6fe31..b3786689c6 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-access-server: container_name: gov-access-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.38 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.39 ports: - "8099:8099" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index f8d9426042..cd6eeba1c8 100644 --- a/epmet-module/gov-access/gov-access-server/pom.xml +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.38 + 0.3.39 gov-access com.epmet From 0db16b793c4edf8825996542a8a931d1aeb88a3d Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 25 Aug 2020 13:50:45 +0800 Subject: [PATCH 114/360] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=99=BB=E9=99=86?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AE=A2=E6=88=B7=E5=88=97=E8=A1=A8=EF=BC=88?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=EF=BC=89=E3=80=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?pc=E5=B7=A5=E4=BD=9C=E7=AB=AF=E7=99=BB=E9=99=86=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=20=E6=8E=A5=E5=8F=A3=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/CustomerListFormDTO.java | 26 ++++++++++ .../dto/result/CustomerListResultDTO.java | 23 +++++++++ .../dto/result/StaffBasicInfoResultDTO.java | 48 +++++++++++++++++++ .../controller/CustomerStaffController.java | 29 +++++++++++ .../main/java/com/epmet/dao/StaffRoleDao.java | 20 ++++++-- .../epmet/service/CustomerStaffService.java | 24 +++++++++- .../impl/CustomerStaffServiceImpl.java | 46 +++++++++++++++++- .../main/resources/mapper/StaffRoleDao.xml | 14 +++++- 8 files changed, 223 insertions(+), 7 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerListFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerListResultDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerListFormDTO.java new file mode 100644 index 0000000000..696e5a890c --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerListFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 查询登陆用户客户列表(工作端) + * @CreateTime 2020/8/25 + */ +@Data +public class CustomerListFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + public interface UserIdGroup extends CustomerClientShowGroup{} + + /** + * 手机号 + */ + @NotBlank(message = "手机号不能为空",groups = UserIdGroup.class) + private String phone; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerListResultDTO.java new file mode 100644 index 0000000000..3c6189e8b2 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerListResultDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 查询登陆用户客户列表(工作端) + * @CreateTime 2020/8/25 + */ +@Data +public class CustomerListResultDTO implements Serializable { + + /** + * 客户Id + */ + private String customerId; + + /** + * 客户名称 + */ + private String customerName; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java new file mode 100644 index 0000000000..1f3388c4b1 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 获取pc工作端登陆用户信息 + * @CreateTime 2020/8/25 + */ +@Data +public class StaffBasicInfoResultDTO implements Serializable { + + /** + * 客户Id + */ + private String customerId; + + /** + * 用户Id + */ + private String userId; + + /** + * 真实姓名 + */ + private String realName; + + /** + * 性别0.未知,1男,2.女 + */ + private String gender; + + /** + * 邮箱 + */ + private String email; + + /** + * 手机号 + */ + private String mobile; + + /** + * 地址 + */ + private String address; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java index 08ed13c97a..a19e3eda52 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -359,4 +361,31 @@ public class CustomerStaffController { customerStaffService.updateRootManage(formDTO); return new Result(); } + + /** + * 查询登陆用户客户列表(工作端) + * 根据手机号查询customer_staff表数据,在根据查询到的数据的userId判断是不是根管理员,最后将同一手机号对应的客户列表且该手机都是根管理员的客户列表返给前端 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @Author zhangyong + * @Date 10:03 2020-08-25 + **/ + @PostMapping(value = "customerlist") + public Result> customerList(@RequestBody CustomerListFormDTO formDTO){ + return customerStaffService.selectCustomerList(formDTO); + } + + /** + * 获取pc工作端登陆用户信息 + * 根据token中userId,去查询登陆用户基本信息 + * @param tokenDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 11:09 2020-08-25 + **/ + @PostMapping(value = "staffbasicinfo") + public Result staffBasicInfo(@LoginUser TokenDto tokenDTO){ + return customerStaffService.selectStaffBasicInfo(tokenDTO.getUserId()); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java index 6de16bc4f8..02e7e6abd5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java @@ -17,17 +17,18 @@ package com.epmet.dao; -import com.epmet.commons.mybatis.annotation.DataFilter; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.entity.DataScope; import com.epmet.dto.StaffRoleDTO; import com.epmet.dto.form.CommonUserFormDTO; import com.epmet.dto.form.CustomerStaffRoleListFormDTO; -import com.epmet.dto.result.*; +import com.epmet.dto.result.CustomerStaffRoleListResultDTO; +import com.epmet.dto.result.CustomerStaffRoleResultDTO; +import com.epmet.dto.result.GovStaffRoleResultDTO; +import com.epmet.dto.result.StaffRolesResultDTO; import com.epmet.entity.StaffRoleEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.context.annotation.Scope; import java.util.List; @@ -100,4 +101,15 @@ public interface StaffRoleDao extends BaseDao { List selectStaffRoles(@Param("staffId") String staffId); List listStaffRoleEntytiesByStaffIdAndOrgId(@Param("agencyId") String agencyId, @Param("staffId") String staffId); -} \ No newline at end of file + + /** + * 根据用户id、角色id,查询 工作人员-角色关系表 + * + * @param staffId + * @param roleId + * @return com.epmet.dto.StaffRoleDTO + * @Author zhangyong + * @Date 10:45 2020-08-25 + **/ + StaffRoleDTO selectStaffRoleByStaffIdAndRoleId(@Param("staffId") String staffId, @Param("roleId") String roleId); +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java index 3a49fc6f2d..5614b57336 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java @@ -284,4 +284,26 @@ public interface CustomerStaffService extends BaseService { * @return com.epmet.dto.CustomerStaffDTO */ void updateRootManage(UpdateRootManageFormDTO formDTO); -} \ No newline at end of file + + /** + * 查询登陆用户客户列表(工作端) + * 根据手机号查询customer_staff表数据,在根据查询到的数据的userId判断是不是根管理员,最后将同一手机号对应的客户列表且该手机都是根管理员的客户列表返给前端 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @Author zhangyong + * @Date 10:03 2020-08-25 + **/ + Result> selectCustomerList(CustomerListFormDTO formDTO); + + /** + * 获取pc工作端登陆用户信息 + * 根据token中userId,去查询登陆用户基本信息 + * + * @param userId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 11:10 2020-08-25 + **/ + Result selectStaffBasicInfo(String userId); +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 030a917e71..c8126fb493 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -17,12 +17,14 @@ package com.epmet.service.impl; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.entity.DataScope; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; @@ -47,6 +49,7 @@ import com.epmet.entity.StaffRoleEntity; import com.epmet.entity.UserEntity; import com.epmet.feign.AuthFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.feign.OperCrmOpenFeignClient; import com.epmet.redis.CustomerStaffRedis; import com.epmet.service.CustomerStaffService; import com.epmet.service.GovStaffRoleService; @@ -99,6 +102,8 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl page(Map params) { @@ -611,4 +616,43 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl> selectCustomerList(CustomerListFormDTO formDTO) { + List listResultDTO = new ArrayList<>(); + CustomerListResultDTO resultDTO = new CustomerListResultDTO(); + CustomerDTO customerDTO = new CustomerDTO(); + // 1.根据手机号,去 customer_staff表,进行查询; 查询结果 多条:字段 customer_id,user_id + List customerStaffList = baseDao.selectListCustomerStaffDTO(formDTO.getPhone()); + + for (CustomerStaffDTO staffDTO : customerStaffList){ + // 2.根据 customer_id 去 gov_staff_role表,查询 customer_id + role_key = root_manager ,确定 根管理员的id,即roleId + GovStaffRoleDTO roleKey = govStaffRoleDao.getRoleByCustomerIdAndRoleKey(staffDTO.getCustomerId(), RoleKeyConstants.ROLE_KEY_ROOT_MANAGER); + // 3.根据roleId + staff_id(即 userId) 查 staff_role表的主键id, 如果查到了,那这个userId就是 根管理员 + StaffRoleDTO staffRoleDTO = staffRoleDao.selectStaffRoleByStaffIdAndRoleId(staffDTO.getUserId(), roleKey.getId()); + if (null != staffRoleDTO){ + // 4.如果userID是根管理员的话,则根据customerId 去 customer表 查询 id、customer_name + customerDTO.setId(staffDTO.getCustomerId()); + Result customerInfo = operCrmOpenFeignClient.getCustomerInfo(customerDTO); + if (!customerInfo.success()) { + logger.error(String.format("获取根管理员信息失败,调用%s服务查询客户名称失败,入参%s", ServiceConstant.OPER_CRM_SERVER, JSON.toJSONString(staffDTO.getCustomerId()))); + } else { + if (null != customerInfo.getData()){ + resultDTO.setCustomerId(customerInfo.getData().getId()); + resultDTO.setCustomerName(customerInfo.getData().getCustomerName()); + listResultDTO.add(resultDTO); + } + } + } + } + return new Result>().ok(listResultDTO); + } + + @Override + public Result selectStaffBasicInfo(String userId) { + CustomerStaffEntity staffEntity = baseDao.selectByUserId(userId); + StaffBasicInfoResultDTO resultDTO = ConvertUtils.sourceToTarget(staffEntity, StaffBasicInfoResultDTO.class); + resultDTO.setGender(String.valueOf(staffEntity.getGender())); + return new Result().ok(resultDTO); + } + +} diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml index b02425c697..5f4bba0d72 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml @@ -164,4 +164,16 @@ and sr.ORG_ID = #{agencyId} and sr.DEL_FLAG='0' - \ No newline at end of file + + + From f065779c75bc48f41e049f64da066d34350b3c33 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 25 Aug 2020 13:59:56 +0800 Subject: [PATCH 115/360] =?UTF-8?q?PC=E5=B7=A5=E4=BD=9C=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E7=AB=AF=E7=99=BB=E9=99=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/GovWebController.java | 39 ++++++ .../epmet/dto/form/GovWebLoginFormDTO.java | 46 +++++++ .../epmet/dto/form/LoginCommonFormDTO.java | 2 +- .../com/epmet/feign/EpmetUserFeignClient.java | 11 ++ .../EpmetUserFeignClientFallback.java | 6 + .../java/com/epmet/service/GovWebService.java | 19 +++ .../epmet/service/impl/GovWebServiceImpl.java | 124 ++++++++++++++++++ .../dto/form/QueryFunctionListFormDTO.java | 20 +++ .../epmet/controller/FunctionController.java | 5 +- .../main/java/com/epmet/dao/FunctionDao.java | 9 ++ .../com/epmet/service/FunctionService.java | 3 +- .../service/impl/FunctionServiceImpl.java | 5 +- .../src/main/resources/mapper/FunctionDao.xml | 14 ++ .../dto/form/GovWebOperLoginFormDTO.java | 21 +++ .../dto/result/GovWebOperLoginResultDTO.java | 16 +++ .../controller/CustomerStaffController.java | 13 ++ .../java/com/epmet/dao/CustomerStaffDao.java | 8 ++ .../epmet/service/CustomerStaffService.java | 9 ++ .../impl/CustomerStaffServiceImpl.java | 12 ++ .../resources/mapper/CustomerStaffDao.xml | 14 ++ 20 files changed, 390 insertions(+), 6 deletions(-) create mode 100644 epmet-auth/src/main/java/com/epmet/controller/GovWebController.java create mode 100644 epmet-auth/src/main/java/com/epmet/dto/form/GovWebLoginFormDTO.java create mode 100644 epmet-auth/src/main/java/com/epmet/service/GovWebService.java create mode 100644 epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/QueryFunctionListFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GovWebOperLoginFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovWebOperLoginResultDTO.java diff --git a/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java b/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java new file mode 100644 index 0000000000..e096c6a65a --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java @@ -0,0 +1,39 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.GovWebLoginFormDTO; +import com.epmet.dto.result.UserTokenResultDTO; +import com.epmet.service.GovWebService; +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; + +/** + * @Description PC工作端-登陆服务 + * @author sun + */ +@RestController +@RequestMapping("govweb") +public class GovWebController { + + @Autowired + private GovWebService govWebService; + + + /** + * @param formDTO + * @return + * @Author sun + * @Description PC工作端-工作人员登录 + **/ + @PostMapping("login") + public Result workLogin(@RequestBody GovWebLoginFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + return new Result().ok(govWebService.login(formDTO)); + } + + +} diff --git a/epmet-auth/src/main/java/com/epmet/dto/form/GovWebLoginFormDTO.java b/epmet-auth/src/main/java/com/epmet/dto/form/GovWebLoginFormDTO.java new file mode 100644 index 0000000000..22c87a0aed --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/dto/form/GovWebLoginFormDTO.java @@ -0,0 +1,46 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description PC工作端 手机号+密码登陆-接口入参 + * @Author sun + */ +@Data +public class GovWebLoginFormDTO extends LoginCommonFormDTO implements Serializable { + private static final long serialVersionUID = 7950477424010655108L; + + /** + * 客户Id + */ + @NotBlank(message = "客户Id不能为空",groups = {AddUserShowGroup.class}) + private String customerId; + + /** + * 手机号 + */ + @NotBlank(message = "手机号不能为空",groups = {AddUserShowGroup.class}) + private String phone; + + /** + * 密码 + */ + @NotBlank(message = "密码不能为空",groups = {AddUserShowGroup.class}) + private String password; + + /** + * 验证码 + */ + @NotBlank(message="验证码不能为空",groups = {AddUserShowGroup.class}) + private String captcha; + + /** + * 唯一标识 + */ + @NotBlank(message="唯一标识不能为空",groups = {AddUserInternalGroup.class}) + private String uuid; + +} diff --git a/epmet-auth/src/main/java/com/epmet/dto/form/LoginCommonFormDTO.java b/epmet-auth/src/main/java/com/epmet/dto/form/LoginCommonFormDTO.java index 7339592d7a..aae374df94 100644 --- a/epmet-auth/src/main/java/com/epmet/dto/form/LoginCommonFormDTO.java +++ b/epmet-auth/src/main/java/com/epmet/dto/form/LoginCommonFormDTO.java @@ -19,7 +19,7 @@ public class LoginCommonFormDTO implements Serializable { /** * 政府端:gov、居民端:resi、运营端:oper */ - @NotBlank(message = "app不能为空(政府端:gov、居民端:resi、运营端:oper)",groups ={AddUserInternalGroup.class} ) + @NotBlank(message = "app不能为空(工作端:gov、居民端:resi、运营端:oper)",groups ={AddUserInternalGroup.class} ) private String app; /** diff --git a/epmet-auth/src/main/java/com/epmet/feign/EpmetUserFeignClient.java b/epmet-auth/src/main/java/com/epmet/feign/EpmetUserFeignClient.java index 37312c17f6..44c7d9d3ab 100644 --- a/epmet-auth/src/main/java/com/epmet/feign/EpmetUserFeignClient.java +++ b/epmet-auth/src/main/java/com/epmet/feign/EpmetUserFeignClient.java @@ -7,6 +7,7 @@ import com.epmet.dto.GovStaffRoleDTO; import com.epmet.dto.UserDTO; import com.epmet.dto.UserWechatDTO; import com.epmet.dto.form.*; +import com.epmet.dto.result.GovWebOperLoginResultDTO; import com.epmet.dto.result.PasswordLoginUserInfoResultDTO; import com.epmet.dto.result.StaffLatestAgencyResultDTO; import com.epmet.feign.fallback.EpmetUserFeignClientFallback; @@ -115,4 +116,14 @@ public interface EpmetUserFeignClient { */ @PostMapping("/epmetuser/staffrole/staffroles") Result> getRolesOfStaff(StaffRoleFormDTO staffRoleFormDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description PC工作端登陆-根据客户Id和手机号查询登陆用户信息 + **/ + @PostMapping(value = "epmetuser/customerstaff/getstaffidandpwd", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getStaffIdAndPwd(@RequestBody GovWebOperLoginFormDTO formDTO); + } diff --git a/epmet-auth/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java b/epmet-auth/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java index 88ed4e42de..59623a7dc7 100644 --- a/epmet-auth/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java +++ b/epmet-auth/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java @@ -8,6 +8,7 @@ import com.epmet.dto.GovStaffRoleDTO; import com.epmet.dto.UserDTO; import com.epmet.dto.UserWechatDTO; import com.epmet.dto.form.*; +import com.epmet.dto.result.GovWebOperLoginResultDTO; import com.epmet.dto.result.PasswordLoginUserInfoResultDTO; import com.epmet.dto.result.StaffLatestAgencyResultDTO; import com.epmet.feign.EpmetUserFeignClient; @@ -68,4 +69,9 @@ public class EpmetUserFeignClientFallback implements EpmetUserFeignClient { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getRolesOfStaff", staffRoleFormDTO); } + @Override + public Result getStaffIdAndPwd(GovWebOperLoginFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffIdAndPwd", formDTO); + } + } diff --git a/epmet-auth/src/main/java/com/epmet/service/GovWebService.java b/epmet-auth/src/main/java/com/epmet/service/GovWebService.java new file mode 100644 index 0000000000..30f8d8ae4c --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/service/GovWebService.java @@ -0,0 +1,19 @@ +package com.epmet.service; + +import com.epmet.dto.form.GovWebLoginFormDTO; +import com.epmet.dto.result.UserTokenResultDTO; + +/** + * @Description 第三方-居民端、政府端登陆服务 + * @author sun + */ +public interface GovWebService { + + /** + * @param formDTO + * @return + * @Author sun + * @Description PC工作端-工作人员登录 + **/ + UserTokenResultDTO login(GovWebLoginFormDTO formDTO); +} diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java new file mode 100644 index 0000000000..12162bfbd3 --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java @@ -0,0 +1,124 @@ +package com.epmet.service.impl; + +import com.epmet.common.token.constant.LoginConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.security.password.PasswordUtils; +import com.epmet.commons.tools.utils.CpUserDetailRedis; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.GovWebLoginFormDTO; +import com.epmet.dto.form.GovWebOperLoginFormDTO; +import com.epmet.dto.form.LoginByPassWordFormDTO; +import com.epmet.dto.form.PasswordLoginUserInfoFormDTO; +import com.epmet.dto.result.GovWebOperLoginResultDTO; +import com.epmet.dto.result.PasswordLoginUserInfoResultDTO; +import com.epmet.dto.result.UserTokenResultDTO; +import com.epmet.feign.EpmetUserFeignClient; +import com.epmet.jwt.JwtTokenProperties; +import com.epmet.jwt.JwtTokenUtils; +import com.epmet.service.CaptchaService; +import com.epmet.service.GovWebService; +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author sun + * @Description 第三方-居民端、政府端登陆服务 + */ +@Slf4j +@Service +public class GovWebServiceImpl implements GovWebService { + + private static final Logger logger = LoggerFactory.getLogger(GovWebServiceImpl.class); + @Autowired + private CaptchaService captchaService; + @Autowired + private JwtTokenUtils jwtTokenUtils; + @Autowired + private JwtTokenProperties jwtTokenProperties; + @Autowired + private CpUserDetailRedis cpUserDetailRedis; + @Autowired + private EpmetUserFeignClient epmetUserFeignClient; + + /** + * @param formDTO + * @return + * @Author sun + * @Description PC工作端-工作人员登录 + **/ + @Override + public UserTokenResultDTO login(GovWebLoginFormDTO formDTO) { + //1.参数校验 + if (!(LoginConstant.APP_GOV.equals(formDTO.getApp()) && LoginConstant.CLIENT_WEB.equals(formDTO.getClient()))) { + logger.error("当前接口只适用于PC工作端运营管理后台"); + throw new RenException("当前接口只适用于PC工作端运营管理后台"); + } + //2.验证码校验 + boolean flag = captchaService.validate(formDTO.getUuid(), formDTO.getCaptcha()); + if (!flag) { + logger.error(String.format("用户%s登录,验证码输入错误,暂时放行", formDTO.getPhone())); + //暂时关闭验证码校验 TODO + //throw new RenException(EpmetErrorCode.ERR10019.getCode()); + } + //3.校验登陆账号是否存在 + //根据客户Id和手机号查询登陆用户信息(此处不需要判断登陆人是否是有效客户以及是否是客户的根管理员,前一接口获取登陆手机号对应客户列表已经判断了) + GovWebOperLoginFormDTO form = new GovWebOperLoginFormDTO(); + form.setCustomerId(formDTO.getCustomerId()); + form.setMobile(formDTO.getPhone()); + Result result = epmetUserFeignClient.getStaffIdAndPwd(form); + if (!result.success() || null == result.getData() || null == result.getData().getUserId()) { + logger.error("根据手机号查询PC工作端登陆人员信息失败,返回10003账号不存在"); + throw new RenException(EpmetErrorCode.ERR10003.getCode()); + } + GovWebOperLoginResultDTO resultDTO = result.getData(); + + //4.密码是否正确 + //密码错误 + if (!PasswordUtils.matches(formDTO.getPassword(), resultDTO.getPassWord())) { + logger.error("登陆密码错误"); + throw new RenException(EpmetErrorCode.ERR10004.getCode()); + } + + //5.生成token存到redis并返回 + UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO(); + userTokenResultDTO.setToken(this.packagingUserToken(formDTO, resultDTO.getUserId())); + return userTokenResultDTO; + + } + + /** + * 生成PC工作端token + * @author sun + */ + private String packagingUserToken(GovWebLoginFormDTO formDTO, String userId) { + // 生成token + Map map = new HashMap<>(); + map.put("app", formDTO.getApp()); + map.put("client", formDTO.getClient()); + map.put("userId", userId); + String token = jwtTokenUtils.createToken(map); + logger.info("app:" + formDTO.getApp() + ";client:" + formDTO.getClient() + ";userId:" + userId + ";生成token[" + token + "]"); + int expire = jwtTokenProperties.getExpire(); + TokenDto tokenDto = new TokenDto(); + tokenDto.setApp(formDTO.getApp()); + tokenDto.setClient(formDTO.getClient()); + tokenDto.setUserId(userId); + tokenDto.setToken(token); + tokenDto.setUpdateTime(System.currentTimeMillis()); + tokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime()); + cpUserDetailRedis.set(tokenDto, expire); + logger.info("截止时间:" + DateUtils.format(jwtTokenUtils.getExpiration(token), "yyyy-MM-dd HH:mm:ss")); + return token; + } + + +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/QueryFunctionListFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/QueryFunctionListFormDTO.java new file mode 100644 index 0000000000..9e30e726b1 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/QueryFunctionListFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 运营端-查询已上架功能列表-接口入参 + * @author sun + */ +@Data +public class QueryFunctionListFormDTO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 功能类型:0.默认功能,1.定制功能 + */ + private String functionGroup; +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionController.java index 1862cb7ceb..6be362acc0 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionController.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.FunctionDTO; +import com.epmet.dto.form.QueryFunctionListFormDTO; import com.epmet.excel.FunctionExcel; import com.epmet.service.FunctionService; import org.springframework.beans.factory.annotation.Autowired; @@ -101,8 +102,8 @@ public class FunctionController { * @Date 2020/3/23 22:11 **/ @GetMapping("queryFunctionList") - public Result> queryFunctionList() { - return functionService.queryFunctionList(); + public Result> queryFunctionList(QueryFunctionListFormDTO formDTO) { + return functionService.queryFunctionList(formDTO); } /** diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/FunctionDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/FunctionDao.java index 0ad172a342..f39d3bff0c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/FunctionDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/FunctionDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.FunctionDTO; +import com.epmet.dto.form.QueryFunctionListFormDTO; import com.epmet.entity.FunctionEntity; import org.apache.ibatis.annotations.Mapper; @@ -48,4 +49,12 @@ public interface FunctionDao extends BaseDao { * @Description 查询所有已上架功能列表(默认、定制功能) **/ List selectShopFunctionList(int shoppingStatus); + + /** + * @param + * @return java.util.List + * @Author sun + * @Description 查询已上架的所有功能,供下拉框使用 + **/ + List selectQueryFunctionList(QueryFunctionListFormDTO formDTO); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionService.java index 04da335ca9..6654db247e 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.FunctionDTO; +import com.epmet.dto.form.QueryFunctionListFormDTO; import com.epmet.entity.FunctionEntity; import java.util.List; @@ -101,7 +102,7 @@ public interface FunctionService extends BaseService { * @description 查询已上架的所有功能,供下拉框使用 * @Date 2020/3/23 22:10 **/ - Result> queryFunctionList(); + Result> queryFunctionList(QueryFunctionListFormDTO formDTO); /** * @param dto diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionServiceImpl.java index 8c65c5e64a..5f8344857a 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionServiceImpl.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dao.FunctionDao; import com.epmet.dto.CustomerDTO; import com.epmet.dto.FunctionDTO; +import com.epmet.dto.form.QueryFunctionListFormDTO; import com.epmet.entity.CustomerFunctionEntity; import com.epmet.entity.FunctionEntity; import com.epmet.feign.OperCrmOpenFeignClient; @@ -125,8 +126,8 @@ public class FunctionServiceImpl extends BaseServiceImpl> queryFunctionList() { - return new Result>().ok(baseDao.selectFunctionList()); + public Result> queryFunctionList(QueryFunctionListFormDTO formDTO) { + return new Result>().ok(baseDao.selectQueryFunctionList(formDTO)); } /** diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionDao.xml index 0a158f9cb4..363893a660 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionDao.xml @@ -38,4 +38,18 @@ AND shopping_status = #{shoppingStatus} + + diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GovWebOperLoginFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GovWebOperLoginFormDTO.java new file mode 100644 index 0000000000..5acbfd6b05 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GovWebOperLoginFormDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description PC工作端登陆获取登陆人信息-接口入参 + * @Author sun + */ +@Data +public class GovWebOperLoginFormDTO implements Serializable { + private static final long serialVersionUID = -6653010297552029277L; + + @NotBlank(message = "客户Id不能为空") + private String customerId; + + @NotBlank(message = "手机号不能为空") + private String mobile; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovWebOperLoginResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovWebOperLoginResultDTO.java new file mode 100644 index 0000000000..dc08614749 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/GovWebOperLoginResultDTO.java @@ -0,0 +1,16 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description PC工作端登陆获取登陆人信息-接口返参 + * @Author sun + */ +@Data +public class GovWebOperLoginResultDTO implements Serializable { + private static final long serialVersionUID = -5353521601282463394L; + private String userId; + private String passWord; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java index a19e3eda52..0075470f27 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java @@ -388,4 +388,17 @@ public class CustomerStaffController { public Result staffBasicInfo(@LoginUser TokenDto tokenDTO){ return customerStaffService.selectStaffBasicInfo(tokenDTO.getUserId()); } + + /** + * @param formDTO + * @return + * @Author sun + * @Description PC工作端登陆-根据客户Id和手机号查询登陆用户信息 + **/ + @PostMapping("getstaffidandpwd") + public Result getStaffIdAndPwd(@RequestBody GovWebOperLoginFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + return new Result().ok(customerStaffService.getStaffIdAndPwd(formDTO)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java index 41c7a550e6..1b7753ed18 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java @@ -172,4 +172,12 @@ public interface CustomerStaffDao extends BaseDao { * @return com.epmet.dto.CustomerStaffDTO */ CustomerStaffDTO selectRootManage(@Param("orgId") String orgId, @Param("roleKey") String roleKey); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 根据客户Id和手机号查询工作人员信息 + **/ + GovWebOperLoginResultDTO selectByCustomerIdAndPhone(GovWebOperLoginFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java index 5614b57336..996848c4ea 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java @@ -306,4 +306,13 @@ public interface CustomerStaffService extends BaseService { * @Date 11:10 2020-08-25 **/ Result selectStaffBasicInfo(String userId); + + /** + * @param formDTO + * @return + * @Author sun + * @Description PC工作端登陆-根据客户Id和手机号查询登陆用户信息 + **/ + GovWebOperLoginResultDTO getStaffIdAndPwd(GovWebOperLoginFormDTO formDTO); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index c8126fb493..2b401b76cd 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -655,4 +655,16 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl().ok(resultDTO); } + /** + * @param formDTO + * @return + * @Author sun + * @Description PC工作端登陆-根据客户Id和手机号查询登陆用户信息 + **/ + @Override + public GovWebOperLoginResultDTO getStaffIdAndPwd(GovWebOperLoginFormDTO formDTO) { + //1.根据客户Id和手机号查询用户信息 + return baseDao.selectByCustomerIdAndPhone(formDTO); + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml index 81c83553fd..703bab3351 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml @@ -295,4 +295,18 @@ AND r.DEL_FLAG = '0' AND S.DEL_FLAG = '0' + + \ No newline at end of file From a9d2bde5b9af40fc3da2084b30515f1965403b75 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 25 Aug 2020 14:03:32 +0800 Subject: [PATCH 116/360] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-auth/deploy/docker-compose-dev.yml | 2 +- epmet-auth/pom.xml | 2 +- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/epmet-auth/deploy/docker-compose-dev.yml b/epmet-auth/deploy/docker-compose-dev.yml index c26333a04a..f533348156 100644 --- a/epmet-auth/deploy/docker-compose-dev.yml +++ b/epmet-auth/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-auth-server: container_name: epmet-auth-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.68 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.69 ports: - "8081:8081" network_mode: host # 使用现有网络 diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index dc628f27e9..5d6058dbf7 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.68 + 0.3.69 com.epmet epmet-cloud diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index dc9635f91c..382b5a38b7 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.44 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.45 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index c670b1e2a0..0ff2561754 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.44 + 0.3.45 com.epmet oper-customize diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index 7f1bcc84c1..4f9f999ce0 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.121 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.122 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 8c0cb5aac6..9ec0765626 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.121 + 0.3.122 com.epmet epmet-user From 9b4c9231a9d169f48ed5bf9779bb6c972a0fc545 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 25 Aug 2020 14:14:57 +0800 Subject: [PATCH 117/360] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/service/screen/impl/AgencyServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } From 0c818a99e0ece15edb1bf00453567744f0f76005 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 25 Aug 2020 14:17:14 +0800 Subject: [PATCH 118/360] =?UTF-8?q?data-report=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-report/data-report-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index 25f7ef5741..5cee82ae1e 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.29 + image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.30 ports: - "8109:8109" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 24a09c3c5e..95ae747b2e 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.29 + 0.3.30 data-report-server From e8eb9eb58e497f306b458de350beb2f3984e7524 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 25 Aug 2020 14:24:08 +0800 Subject: [PATCH 119/360] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/FunctionController.java | 2 +- .../java/com/epmet/service/FunctionService.java | 11 ++++++++++- .../epmet/service/impl/FunctionServiceImpl.java | 15 +++++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionController.java index 6be362acc0..2973fbf1cd 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionController.java @@ -103,7 +103,7 @@ public class FunctionController { **/ @GetMapping("queryFunctionList") public Result> queryFunctionList(QueryFunctionListFormDTO formDTO) { - return functionService.queryFunctionList(formDTO); + return new Result>().ok(functionService.getFunctionList(formDTO)); } /** diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionService.java index 6654db247e..5f9bc6fad6 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionService.java @@ -102,7 +102,7 @@ public interface FunctionService extends BaseService { * @description 查询已上架的所有功能,供下拉框使用 * @Date 2020/3/23 22:10 **/ - Result> queryFunctionList(QueryFunctionListFormDTO formDTO); + Result> queryFunctionList(); /** * @param dto @@ -111,4 +111,13 @@ public interface FunctionService extends BaseService { * @Description 默认功能新增 **/ void saveFunction(FunctionDTO dto); + + /** + * @param + * @return java.util.List + * @Author sun + * @Description 查询已上架的所有功能,供下拉框使用 + **/ + List getFunctionList(QueryFunctionListFormDTO formDTO); + } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionServiceImpl.java index 5f8344857a..27f835593c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionServiceImpl.java @@ -126,8 +126,8 @@ public class FunctionServiceImpl extends BaseServiceImpl> queryFunctionList(QueryFunctionListFormDTO formDTO) { - return new Result>().ok(baseDao.selectQueryFunctionList(formDTO)); + public Result> queryFunctionList() { + return new Result>().ok(baseDao.selectFunctionList()); } /** @@ -162,4 +162,15 @@ public class FunctionServiceImpl extends BaseServiceImpl + * @Author sun + * @Description 查询已上架的所有功能,供下拉框使用 + **/ + @Override + public List getFunctionList(QueryFunctionListFormDTO formDTO) { + return baseDao.selectQueryFunctionList(formDTO); + } + } From 3cb5fde051752811537f332c3a4751217f548f2b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 25 Aug 2020 14:27:02 +0800 Subject: [PATCH 120/360] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index 382b5a38b7..615e3ac046 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.45 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.46 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 0ff2561754..47db6b2ee9 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.45 + 0.3.46 com.epmet oper-customize From 128dc3af007fd813aade723a0c64e6bd9797ce6b Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 25 Aug 2020 15:12:37 +0800 Subject: [PATCH 121/360] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3=E9=89=B4=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/screen/AgencyController.java | 11 +++-------- .../controller/screen/DistributionController.java | 6 +++--- .../controller/screen/GrassRootsGovernController.java | 11 +++++------ .../screen/GrassrootsPartyDevController.java | 9 ++++----- .../datareport/controller/screen/IndexController.java | 9 ++++----- .../controller/screen/PartyMemberLeadController.java | 11 +++++------ .../controller/screen/ScreenProjectController.java | 3 +-- 7 files changed, 25 insertions(+), 35 deletions(-) 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..2f57f282f6 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 @@ -3,9 +3,9 @@ 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 +33,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 +46,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); 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); From 4334b3dd918657ed02d1b83c4e771fba08083877 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 25 Aug 2020 15:13:13 +0800 Subject: [PATCH 122/360] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=99=BB=E9=99=86?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AE=A2=E6=88=B7=E5=88=97=E8=A1=A8=EF=BC=88?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=EF=BC=89=20=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/CustomerStaffServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 2b401b76cd..9d57e1c0dd 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -619,7 +619,6 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl> selectCustomerList(CustomerListFormDTO formDTO) { List listResultDTO = new ArrayList<>(); - CustomerListResultDTO resultDTO = new CustomerListResultDTO(); CustomerDTO customerDTO = new CustomerDTO(); // 1.根据手机号,去 customer_staff表,进行查询; 查询结果 多条:字段 customer_id,user_id List customerStaffList = baseDao.selectListCustomerStaffDTO(formDTO.getPhone()); @@ -637,6 +636,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl Date: Tue, 25 Aug 2020 15:13:46 +0800 Subject: [PATCH 123/360] =?UTF-8?q?=E5=8D=87=E7=BA=A7datareport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-report/data-report-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index 5cee82ae1e..afdebc0727 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.30 + image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.31 ports: - "8109:8109" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 95ae747b2e..fdfa7d573b 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.30 + 0.3.31 data-report-server From b9b7968abfe6b15e79f857f15fa1f37164eecf13 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 25 Aug 2020 15:15:16 +0800 Subject: [PATCH 124/360] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index 4f9f999ce0..de583485e1 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.122 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.123 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 9ec0765626..8c094c8805 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.122 + 0.3.123 com.epmet epmet-user From e6d3cd4d44df2edd72adc438fb0a64a88fd02083 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 25 Aug 2020 15:35:43 +0800 Subject: [PATCH 125/360] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3=E9=89=B4=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/screen/DistributionController.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 2f57f282f6..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,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.DistributionService; @@ -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); From 6cebb738938f8c5bf72ed2b1b823733dadb9d1e5 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 25 Aug 2020 15:36:27 +0800 Subject: [PATCH 126/360] =?UTF-8?q?=E5=8D=87=E7=BA=A7datareport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-report/data-report-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index afdebc0727..27b870a4e3 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.31 + image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.32 ports: - "8109:8109" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index fdfa7d573b..46bd5c480b 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.31 + 0.3.32 data-report-server From c59b013f73b808c7cd123d84114ff8e48f9f3497 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 25 Aug 2020 15:49:15 +0800 Subject: [PATCH 127/360] =?UTF-8?q?18=E3=80=81=E5=85=AC=E4=BC=97=E5=8F=82?= =?UTF-8?q?=E4=B8=8E=E5=90=84=E7=B1=BB=E6=80=BB=E6=95=B0=20=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ScreenCollController.java | 12 ++-- .../screen/ScreenPublicPartiTotalDataDao.java | 28 ++++++++- .../service/screen/ScreenCollService.java | 2 +- .../screen/impl/ScreenCollServiceImpl.java | 30 +++++----- .../screen/ScreenPublicPartiTotalDataDao.xml | 60 ++++++++++++++++++- 5 files changed, 108 insertions(+), 24 deletions(-) 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 daeae95dba..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 @@ -294,10 +294,10 @@ public class ScreenCollController { * @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(); -// } + @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 index f703978057..a4fdc9f221 100644 --- 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 @@ -18,10 +18,13 @@ 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; + /** * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 * @@ -31,4 +34,27 @@ import org.apache.ibatis.annotations.Param; @Mapper public interface ScreenPublicPartiTotalDataDao extends BaseDao { -} \ No newline at end of file + /** + * 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/service/screen/ScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/ScreenCollService.java index 33f4970deb..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 @@ -230,5 +230,5 @@ public interface ScreenCollService { * @Author zhangyong * @Date 09:44 2020-08-25 **/ -// void insertPublicPartiTotalData(List formDTO, String customerId); + void insertPublicPartiTotalData(List formDTO, String customerId); } 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 bbac660e05..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 @@ -446,18 +448,18 @@ public class ScreenCollServiceImpl implements ScreenCollService { } } -// @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(); -// } -//// screenPioneerDataDao.deletePioneerData(customerId, orgIds); -// -//// 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/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml index 5fefac34e9..c3a9200142 100644 --- 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 @@ -1,7 +1,7 @@ - + @@ -24,5 +24,61 @@ + + delete from screen_public_parti_total_data + where CUSTOMER_ID = #{customerId} + AND ORG_ID IN + + #{item} + + - \ No newline at end of file + + 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() + ) + + + + + From 3a5cd49e372a06c45ca1351f5377f86cbac50bb0 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 25 Aug 2020 15:53:25 +0800 Subject: [PATCH 128/360] =?UTF-8?q?=E6=94=BE=E8=A1=8C=E8=8E=B7=E5=8F=96pc?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=E6=89=8B=E6=9C=BA=E5=8F=B7=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=AE=A2=E6=88=B7=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/src/main/resources/bootstrap.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index a7b442dba7..f4d13d11eb 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -441,6 +441,7 @@ epmet: # url认证白名单,先判断白名单,在白名单中的url直接放行,不再判断上述需要认证的名单 urlWhiteList: - /data/report/test/test + - /epmetuser/customerstaff/customerlist swaggerUrls: From 987928b8ef877cded2d611c55e3a3bb42b9f5262 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 25 Aug 2020 15:55:49 +0800 Subject: [PATCH 129/360] =?UTF-8?q?=E6=94=BE=E8=A1=8C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/deploy/docker-compose-dev.yml | 2 +- epmet-gateway/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-gateway/deploy/docker-compose-dev.yml b/epmet-gateway/deploy/docker-compose-dev.yml index a07a2549c0..c091f72548 100644 --- a/epmet-gateway/deploy/docker-compose-dev.yml +++ b/epmet-gateway/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-gateway-server: container_name: epmet-gateway-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.33 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.34 ports: - "8080:8080" network_mode: host # 使用现有网络 diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index 6bb2a0889f..4f94446d0c 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.33 + 0.3.34 com.epmet epmet-cloud From 82533f8048e12f0b326059bfaadf116084123246 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 25 Aug 2020 16:13:47 +0800 Subject: [PATCH 130/360] =?UTF-8?q?data=20report=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=92=89=E9=92=89=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/enums/EnvEnum.java | 13 +++++++++++++ epmet-module/data-report/data-report-server/pom.xml | 12 ++++++++++++ .../main/java/com/epmet/DataReportApplication.java | 3 +++ .../screen/impl/GrassrootsPartyDevServiceImpl.java | 3 ++- .../src/main/resources/bootstrap.yml | 7 ++++++- .../src/main/resources/logback-spring.xml | 9 +++++++-- .../main/java/com/epmet/DataStatsApplication.java | 4 +++- 7 files changed, 46 insertions(+), 5 deletions(-) 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-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 46bd5c480b..ca8bdb7b84 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/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 51a7a49ff6..b2d5b0deaf 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; @@ -58,6 +58,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.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); return result; 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-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!"); } } From 11c3732ea1e684f665250b8c2432b894b4cd5087 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 25 Aug 2020 16:23:14 +0800 Subject: [PATCH 131/360] =?UTF-8?q?data=20report=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=92=89=E9=92=89=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/enums/EnvEnum.java | 13 +++++++++++++ epmet-module/data-report/data-report-server/pom.xml | 12 ++++++++++++ .../main/java/com/epmet/DataReportApplication.java | 3 +++ .../screen/impl/GrassrootsPartyDevServiceImpl.java | 3 ++- .../src/main/resources/bootstrap.yml | 7 ++++++- .../src/main/resources/logback-spring.xml | 9 +++++++-- .../main/java/com/epmet/DataStatsApplication.java | 4 +++- 7 files changed, 46 insertions(+), 5 deletions(-) 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-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/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 51a7a49ff6..b2d5b0deaf 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; @@ -58,6 +58,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.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); return result; 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-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!"); } } From 8e8c02954bc29edf77b92758a45263c8a7dd9470 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 25 Aug 2020 16:24:25 +0800 Subject: [PATCH 132/360] =?UTF-8?q?=E5=8D=87=E7=BA=A7datareport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-report/data-report-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index 27b870a4e3..629eae181a 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.32 + image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.33 ports: - "8109:8109" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index ca8bdb7b84..95bdfd4161 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.32 + 0.3.33 data-report-server From 4fb3f981cf815ab67dcd4d7f0cc286edaf8239f1 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 25 Aug 2020 18:13:33 +0800 Subject: [PATCH 133/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/screen/impl/GrassrootsPartyDevServiceImpl.java | 2 +- .../src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml | 3 +-- .../main/resources/mapper/screen/ScreenDifficultyDataDao.xml | 3 +-- .../main/resources/mapper/screen/ScreenGovernRankDataDao.xml | 1 - .../src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml | 1 - .../main/resources/mapper/screen/ScreenPartyBranchDataDao.xml | 2 +- .../src/main/resources/mapper/screen/ScreenUserJoinDao.xml | 4 ++-- .../main/resources/mapper/screen/ScreenUserTotalDataDao.xml | 4 +--- 8 files changed, 7 insertions(+), 13 deletions(-) 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 51a7a49ff6..4b31a1e02a 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 @@ -42,7 +42,6 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService private ScreenCpcBaseDataDao screenCpcBaseDataDao; @Autowired private ScreenPartyBranchDataDao screenPartyBranchDataDao; - private List issueGroup; /** * @Description 1、党员基本情况-饼状图概况 @@ -59,6 +58,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService PartymemberPercentResultDTO result = screenUserTotalDataDao.selectAgencyPartymemberPercent(param.getAgencyId()); if(null == result){ logger.warn("com.epmet.datareport.service.screen.impl.GrassrootsPartyDevServiceImpl.partymemberBaseInfo:未查询出指定agencyId下的党员基础信息数据,agencyId :: {}",param.getAgencyId()); + result = new PartymemberPercentResultDTO(); result.setPercentInPlatForm(convertPercentStr(BigDecimal.ZERO)); return result; } 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..ef851d6a08 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 @@ -15,8 +15,7 @@ screen_cpc_base_data WHERE DEL_FLAG = '0' - AND ORG_TYPE = 'agency' - AND ORG_ID = #{agencyId} + AND PARENT_ID = #{agencyId} \ 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..e77b00012b 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 @@ -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.PARENT_ID = #{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/ScreenGovernRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml index 3fb4174055..af49e77592 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 @@ -15,7 +15,6 @@ screen_govern_rank_data WHERE DEL_FLAG = '0' - AND ORG_TYPE = 'agency' AND ORG_ID = #{agencyId} AND MONTH_ID = #{monthId} ORDER BY 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..26007e2997 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 @@ -17,7 +17,6 @@ screen_org_rank_data WHERE DEL_FLAG = '0' - AND ORG_TYPE = 'grid' AND PARENT_ID = #{agencyId} AND MONTH_ID = #{monthId} ORDER BY 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..165b383a81 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 @@ -49,7 +49,7 @@ screen_party_branch_data DEL_FLAG = '0' - AND ORG_TYPE = 'agency' + AND PARENT_ID = #{agencyId} AND TYPE = #{category} 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..74a6e4e661 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 @@ -19,8 +19,8 @@ screen_user_join WHERE DEL_FLAG = '0' - AND ORG_TYPE = 'agency' - AND ORG_ID = #{agencyId} + + AND PARENT_ID = #{agencyId} AND MONTH_ID = #{monthId} 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..84e00a0f5d 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 @@ -12,8 +12,7 @@ screen_user_total_data WHERE DEL_FLAG = '0' - AND ORG_TYPE = 'agency' - AND ORG_ID = #{agencyId} + AND PARENT_ID = #{agencyId} @@ -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, From ebdc8226b8cae4a9a097178a0a63742b7e0dbc1c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 Aug 2020 18:18:17 +0800 Subject: [PATCH 134/360] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/utils/HttpContextUtils.java | 5 +++-- .../java/com/epmet/filter/CpAuthGatewayFilterFactory.java | 4 +++- .../java/com/epmet/service/impl/OperMenuServiceImpl.java | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpContextUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpContextUtils.java index 6a01fa6c0f..d27da23ab7 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpContextUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpContextUtils.java @@ -61,8 +61,9 @@ public class HttpContextUtils { } //请求语言 - defaultLanguage = request.getHeader(HttpHeaders.ACCEPT_LANGUAGE); - + if(StringUtils.isNotBlank(request.getHeader(HttpHeaders.ACCEPT_LANGUAGE))){ + defaultLanguage = request.getHeader(HttpHeaders.ACCEPT_LANGUAGE); + } return defaultLanguage; } } diff --git a/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java b/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java index 43fbf6d0cb..7c74fa6763 100644 --- a/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java +++ b/epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java @@ -135,7 +135,9 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory menuList; Result operUserDTOResult = epmetUserFeignClient.info(tokenDto.getUserId()); - + if(!operUserDTOResult.success()||null==operUserDTOResult.getData()){ + return new ArrayList<>(); + } //系统管理员,拥有最高权限 if(operUserDTOResult.getData().getSuperAdmin() == SuperAdminEnum.YES.value()){ menuList = baseDao.getMenuList(type, HttpContextUtils.getLanguage()); From f7045011b1c58a5a4d077d7cd3ab493fec771522 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 25 Aug 2020 18:20:55 +0800 Subject: [PATCH 135/360] =?UTF-8?q?130=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/deploy/docker-compose-dev.yml | 2 +- epmet-gateway/pom.xml | 2 +- .../data-report-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-report/data-report-server/pom.xml | 2 +- .../data-statistical-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- .../oper-access-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-access/oper-access-server/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-gateway/deploy/docker-compose-dev.yml b/epmet-gateway/deploy/docker-compose-dev.yml index c091f72548..3329f89b6d 100644 --- a/epmet-gateway/deploy/docker-compose-dev.yml +++ b/epmet-gateway/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-gateway-server: container_name: epmet-gateway-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.34 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.35 ports: - "8080:8080" network_mode: host # 使用现有网络 diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index 4f94446d0c..621e7c38f1 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.34 + 0.3.35 com.epmet epmet-cloud diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index 629eae181a..9dbdee6dca 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.33 + image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.34 ports: - "8109:8109" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 95bdfd4161..3ffa8051a8 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.33 + 0.3.34 data-report-server diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index c2022a855b..dd615ce5f1 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.46 + image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.47 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 84e4b1810d..aca19d6a19 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.46 + 0.3.47 data-statistical com.epmet diff --git a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml index ea567d95a0..1c81fdec99 100644 --- a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-access-server: container_name: oper-access-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-access-server:0.3.17 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-access-server:0.3.18 ports: - "8093:8093" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-access/oper-access-server/pom.xml b/epmet-module/oper-access/oper-access-server/pom.xml index 655da4f109..a1c28b8df8 100644 --- a/epmet-module/oper-access/oper-access-server/pom.xml +++ b/epmet-module/oper-access/oper-access-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.17 + 0.3.18 oper-access com.epmet From 8754dc9352734daf7d0386fdbb585c7e18072734 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 25 Aug 2020 21:43:26 +0800 Subject: [PATCH 136/360] =?UTF-8?q?=E5=BD=92=E4=B8=80=E5=8C=96=E7=AE=97?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=9F=BA=E4=BA=8E=E8=BE=B9?= =?UTF-8?q?=E7=95=8C=E5=80=BC=E7=9A=84=E9=83=A8=E5=88=86=E5=80=BC=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../normalizing/DoubleScoreCalculator.java | 25 ++++++- .../normalizing/IntegerScoreCalculator.java | 37 +++++++++-- .../support/normalizing/ScoreCalculator.java | 44 ++++++++++--- .../stats/test/normalizing/DemoScoreCal.java | 66 +++++++++++++++++++ 4 files changed, 155 insertions(+), 17 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java 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 index 01258d0f45..d919b2470f 100644 --- 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 @@ -22,7 +22,7 @@ public class DoubleScoreCalculator extends ScoreCalculator { this.minScore = minScore; this.maxScore = maxScore; this.correlation = correlation; - this.prepare(); + this.prepare4SourceArray(); } public DoubleScoreCalculator(List sourceArray, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { @@ -30,7 +30,28 @@ public class DoubleScoreCalculator extends ScoreCalculator { this.minScore = minScore; this.maxScore = maxScore; this.correlation = correlation; - this.prepare(); + this.prepare4SourceArray(); + } + + /** + * 初始化基于边界值的整数分值计算 + * @param minSourceValue 左边界值 + * @param maxSourceValue 右边界值 + * @param minScore 分值区间的左边界 + * @param maxScore 分值区间的右边界 + * @param correlation 相关性 + */ + public DoubleScoreCalculator(Double minSourceValue, Double maxSourceValue, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + BigDecimal minSourceValueBD = new BigDecimal(minSourceValue); + BigDecimal maxSourceValueBD = new BigDecimal(maxSourceValue); + + this.minScore = minScore; + this.maxScore = maxScore; + this.minValue = minSourceValueBD; + this.maxValue = maxSourceValueBD; + this.correlation = correlation; + prepare4BoundaryValue(); + System.out.println("最小值:"+minScore+";最大值:"+maxScore); } @Override 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 index 98f837ab7e..2114eee59e 100644 --- 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 @@ -10,9 +10,9 @@ import java.util.List; public class IntegerScoreCalculator extends ScoreCalculator { /** - * 初始化整数分值计算 + * 初始化基于原数组的整数分值计算 * ☆☆☆ 务必在该构造方法最后调用父类的prepare()方法 ☆☆☆ - * @param sourceArray 数据所在的数组 + * @param sourceArray 源数据完整数组 * @param minScore 分值区间的左边界 * @param maxScore 分值区间的右边界 * @param correlation 相关性 @@ -22,17 +22,44 @@ public class IntegerScoreCalculator extends ScoreCalculator { this.minScore = minScore; this.maxScore = maxScore; this.correlation = correlation; - this.prepare(); + prepare4SourceArray(); System.out.println("最小值:"+minScore+";最大值:"+maxScore); - } + /** + * 初始化基于原数组的整数分值计算 + * @param sourceList 源数据完整列表 + * @param minScore 分值区间的左边界 + * @param maxScore 分值区间的右边界 + * @param correlation 相关性 + */ 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(); + prepare4SourceArray(); + System.out.println("最小值:"+minScore+";最大值:"+maxScore); + } + + /** + * 初始化基于边界值的整数分值计算 + * @param minSourceValue 左边界值 + * @param maxSourceValue 右边界值 + * @param minScore 分值区间的左边界 + * @param maxScore 分值区间的右边界 + * @param correlation 相关性 + */ + public IntegerScoreCalculator(Integer minSourceValue, Integer maxSourceValue, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + BigDecimal minSourceValueBD = new BigDecimal(minSourceValue); + BigDecimal maxSourceValueBD = new BigDecimal(maxSourceValue); + + this.minScore = minScore; + this.maxScore = maxScore; + this.minValue = minSourceValueBD; + this.maxValue = maxSourceValueBD; + this.correlation = correlation; + prepare4BoundaryValue(); System.out.println("最小值:"+minScore+";最大值:"+maxScore); } 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 index 48692e92ce..0acb52daae 100644 --- 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 @@ -1,5 +1,7 @@ package com.epmet.support.normalizing; +import lombok.Data; + import java.math.BigDecimal; import java.math.MathContext; import java.util.Arrays; @@ -11,23 +13,40 @@ import java.util.stream.Collectors; * ☆☆☆ 如果需要保持传入的数组元素顺序不变,请在实现类的构造方法中将传入数组进行克隆 ☆☆☆ * @param 数据类型泛型 */ +@Data 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() { + protected BigDecimal maxValue; + protected BigDecimal minValue; + + /** + * 计算准备(基于sourceArray方式的) + */ + public void prepare4SourceArray() { // 校验数组 if (!validSourceArray(sourceArrary)) { throw new RuntimeException("入参数组错误:请设置非空数组"); @@ -37,7 +56,14 @@ public abstract class ScoreCalculator { minValue = getMinFromSourceArray(); //计算系数 System.out.println("最小值:"+minScore+";最大值:"+maxScore); - coefficient = getCoefficient(minValue, maxValue); + coefficient = calcuteCoefficient(minValue, maxValue); + } + + /** + * 计算准备(基于边界值的) + */ + public void prepare4BoundaryValue() { + coefficient = calcuteCoefficient(minValue, maxValue); } /** @@ -50,10 +76,6 @@ public abstract class ScoreCalculator { 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)); @@ -95,6 +117,8 @@ public abstract class ScoreCalculator { return scores; } + //---------------------批量------------------------- + /** * 批量归一算法,返回List * @param sourceValues @@ -147,7 +171,7 @@ public abstract class ScoreCalculator { * 计算系数 * @return */ - protected BigDecimal getCoefficient(BigDecimal min, BigDecimal max) { + protected BigDecimal calcuteCoefficient(BigDecimal min, BigDecimal max) { BigDecimal fenmu = max.subtract(min); if (fenmu.toString().equals("0"))return new BigDecimal(0); BigDecimal fenzi = maxScore.subtract(minScore); diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java new file mode 100644 index 0000000000..14ebc4685c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -0,0 +1,66 @@ +package com.epmet.stats.test.normalizing; + +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.DoubleScoreCalculator; +import com.epmet.support.normalizing.IntegerScoreCalculator; +import com.epmet.support.normalizing.ScoreCalculator; + +import java.math.BigDecimal; +import java.util.Arrays; + +public class DemoScoreCal { + + public static void main(String[] args) { + //demoInteger(); + demoIntegerPartical(); + //demoDouble(); + } + + /** + * 整数类型,完整源数据列表的归一算法 + */ + public static void demoInteger() { + Integer[] iArray = {4,8,1,3,2}; + BigDecimal minScore = new BigDecimal(5); + BigDecimal maxScore = new BigDecimal(10); + + ScoreCalculator sc = new IntegerScoreCalculator(iArray, minScore, maxScore, Correlation.NEGATIVE); + BigDecimal[] scores = sc.normalize(iArray); + Arrays.stream(scores).forEach(s -> System.out.println(s)); + } + + /** + * 整数类型,基于边界值的部分列表的的归一算法 + */ + public static void demoIntegerPartical() { + Integer[] iArray = {4,1,2}; + BigDecimal minScore = new BigDecimal(5); + BigDecimal maxScore = new BigDecimal(10); + + ScoreCalculator sc = new IntegerScoreCalculator(1, 8 ,minScore, maxScore, Correlation.NEGATIVE); + BigDecimal[] scores = sc.normalize(iArray);// 此处也可以直接使用list参数的重载方法,计算阶段没有任何区别,区别在于new IntegerScoreCalculator()阶段 + Arrays.stream(scores).forEach(s -> System.out.println(s)); + } + + /** + * double类型归一算法 + */ + public static void demoDouble() { + Double[] iArray = {1.9,8.9,1.0,3.0,2.0}; + BigDecimal minScore = new BigDecimal(5); + BigDecimal maxScore = new BigDecimal(10); + + ScoreCalculator sc = new DoubleScoreCalculator(iArray, minScore, maxScore, Correlation.POSITIVE); + BigDecimal normalize = sc.normalize(3.0); + System.out.println(normalize); + + /** + * 同一组数据内,只有被计算值变了的话,不需要重新new对象,直接重复调用即可 + */ + BigDecimal normalize2 = sc.normalize(2.0); + System.out.println(normalize2); + } + + + +} From 5b9a9721b49251a7d8dc73148746d5f39a8c2561 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 26 Aug 2020 09:39:40 +0800 Subject: [PATCH 137/360] =?UTF-8?q?=E5=85=88=E9=94=8B=E6=A8=A1=E8=8C=83?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BE=E5=88=86=E6=AF=94=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/screen/impl/PartyMemberLeadServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/screen/impl/PartyMemberLeadServiceImpl.java index b1cecb92bb..79868496d1 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -77,7 +77,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); } From 65d092f0f1c777b404c4600a74d41dad1aca792b Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 26 Aug 2020 09:52:22 +0800 Subject: [PATCH 138/360] =?UTF-8?q?web=E5=B7=A5=E4=BD=9C=E7=AB=AF-?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/entity/GovMenuEntity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovMenuEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovMenuEntity.java index cfeef721b8..fcb8a5fa38 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovMenuEntity.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/GovMenuEntity.java @@ -61,4 +61,9 @@ public class GovMenuEntity extends BaseEpmetEntity { @TableField(exist = false) private String parentName; + /** + * 是否显示,1:显示 0不显示 + */ + private Integer showFlag; + } From 9d50fecc328c8292641604934ca1d12dbb4a2907 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 26 Aug 2020 09:56:01 +0800 Subject: [PATCH 139/360] =?UTF-8?q?gov-access=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-access/gov-access-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-access/gov-access-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml index b3786689c6..6f7c7fe6d8 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-access-server: container_name: gov-access-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.39 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-server:0.3.40 ports: - "8099:8099" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index cd6eeba1c8..2475569eb2 100644 --- a/epmet-module/gov-access/gov-access-server/pom.xml +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.39 + 0.3.40 gov-access com.epmet From 2db816a362dbb6e7617f36b08964833f19232010 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 26 Aug 2020 09:57:11 +0800 Subject: [PATCH 140/360] =?UTF-8?q?data-report=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-report/data-report-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index 9dbdee6dca..7aad4da80b 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.34 + image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.35 ports: - "8109:8109" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 3ffa8051a8..790f5e77b4 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.34 + 0.3.35 data-report-server From 8241261ff6362a1295223b8bd567b8b81155a71b Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 26 Aug 2020 10:02:53 +0800 Subject: [PATCH 141/360] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=8F=82=E4=B8=8E=E5=BA=A6=E6=97=B6=EF=BC=8C=E5=8F=AA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9C=AC=E6=9C=BA=E5=85=B3=E7=9A=84=20agencyId=20=20?= =?UTF-8?q?=20=E4=B8=8D=E6=9F=A5parentId=EF=BC=8C=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E6=AF=8F=E4=B8=80=E6=9D=A1=E6=95=B0=E6=8D=AE=E9=83=BD=E6=9C=89?= =?UTF-8?q?=E7=99=BE=E5=88=86=E6=AF=94=EF=BC=8C=E5=A6=82=E6=9E=9C=E7=94=A8?= =?UTF-8?q?parentId=E6=9F=A5=E8=AF=A2=E4=BC=9A=E6=9F=A5=E5=87=BA=E5=A4=9A?= =?UTF-8?q?=E6=9D=A1=EF=BC=8C=E6=B1=82=E5=92=8C=E5=90=8E=E7=99=BE=E5=88=86?= =?UTF-8?q?=E6=AF=94=E4=BC=9A=E5=A4=A7=E4=BA=8E1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/screen/ScreenUserJoinDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 74a6e4e661..856330ecf2 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 @@ -20,7 +20,7 @@ WHERE DEL_FLAG = '0' - AND PARENT_ID = #{agencyId} + AND AGENCY_ID = #{agencyId} AND MONTH_ID = #{monthId} From 0b18608e6dac5da4f5109f7b2b9c9cdbbe47954b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 26 Aug 2020 10:13:25 +0800 Subject: [PATCH 142/360] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=A0=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/service/screen/impl/AgencyServiceImpl.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 cb7fd872a5..612239fc8d 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,11 +46,7 @@ public class AgencyServiceImpl implements AgencyService { if (null == rootAgency){ return new TreeResultDTO(); } - String sub = null; - if ("".equals(rootAgency.getPids()) || rootAgency.getPids().equals("0")){ - sub = rootAgency.getValue(); - } - List departmentList = this.getDepartmentList(sub); + 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; } From 3b8df373ecd789111df4057b0730cf8d660fb4c9 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 Aug 2020 10:15:29 +0800 Subject: [PATCH 143/360] =?UTF-8?q?=E5=85=AC=E5=BC=8F=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/enums/EnvEnum.java | 12 +++-- .../dto/screen/form/IndexCalculateForm.java | 5 +- .../controller/IndexCalculateController.java | 6 +-- .../FactIndexPartyAblityCpcMonthlyDao.java | 8 +-- .../service/screen/IndexCalculateService.java | 3 +- .../impl/IndexCalculateServiceImpl.java | 49 ++++++++++++++++++- .../src/main/resources/bootstrap.yml | 4 -- .../FactIndexPartyAblityCpcMonthlyDao.xml | 18 +++++++ .../EpmetCommonServiceOpenFeignClient.java | 7 +++ ...tCommonServiceOpenFeignClientFallback.java | 5 ++ .../controller/ExternalAppController.java | 12 +++++ .../java/com/epmet/dao/ExternalAppDao.java | 2 + .../com/epmet/service/ExternalAppService.java | 4 ++ .../service/impl/ExternalAppServiceImpl.java | 6 +++ .../main/resources/mapper/ExternalAppDao.xml | 4 ++ 15 files changed, 126 insertions(+), 19 deletions(-) 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 663731dc1b..0c3f798318 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 @@ -38,10 +38,14 @@ public enum EnvEnum { } public static EnvEnum getCurrentEnv(){ - Environment environment = SpringContextUtils.getBean(Environment.class); - String[] activeProfiles = environment.getActiveProfiles(); - if (activeProfiles != null && activeProfiles.length > 0) { - return getEnum(activeProfiles[0]); + try { + Environment environment = SpringContextUtils.getBean(Environment.class); + String[] activeProfiles = environment.getActiveProfiles(); + if (activeProfiles != null && activeProfiles.length > 0) { + return getEnum(activeProfiles[0]); + } + } catch (Exception e) { + e.printStackTrace(); } return EnvEnum.UN_KNOWN; } 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 index 49e30cdb21..af11109fa3 100644 --- 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 @@ -3,6 +3,7 @@ package com.epmet.dto.screen.form; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * desc:初始化客户指标权重参数实体类 @@ -12,9 +13,9 @@ import java.io.Serializable; public class IndexCalculateForm implements Serializable { private static final long serialVersionUID = 3280392511156378209L; /** - * desc:客户id + * desc:客户ids */ - private String customerId; + private List customerIds; /** * desc:月份id 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 index cba12740c5..6b9d8d45e1 100644 --- 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 @@ -1,6 +1,5 @@ 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; @@ -25,7 +24,7 @@ public class IndexCalculateController { private IndexCalculateService indexCalculateService; /** - * 1、党建能力-党员相关指标计算(按照月份) + * 1、按照客户计算指标(按照月份) * * @param externalAppRequestParam * @param formDTO @@ -33,10 +32,9 @@ public class IndexCalculateController { * @Author zhangyong * @Date 10:52 2020-08-20 **/ - @ExternalAppRequestAuth @PostMapping("cpc") public Result cpcIndexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody IndexCalculateForm formDTO) { - indexCalculateService.cpcIndexCalculate(formDTO); + indexCalculateService.indexCalculate(formDTO); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index 387a369af1..5d786e5113 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -36,7 +36,7 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao list, - @Param("customerId")String customerId); + @Param("customerId") String customerId); + + List getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); } 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 index a43dcc2907..70c49c77fe 100644 --- 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 @@ -12,6 +12,7 @@ public interface IndexCalculateService { /** * desc:计算党员相关指标 * @param formDTO + * @return */ - void cpcIndexCalculate(IndexCalculateForm formDTO); + Boolean indexCalculate(IndexCalculateForm formDTO); } 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 index 7aff662edf..4558c87927 100644 --- 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 @@ -1,16 +1,63 @@ package com.epmet.service.screen.impl; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; import com.epmet.dto.screen.form.IndexCalculateForm; +import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; +import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.service.screen.IndexCalculateService; +import com.epmet.util.DimIdGenerator; +import lombok.extern.slf4j.Slf4j; +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.util.Date; +import java.util.List; /** * @author liujianjun */ +@Slf4j @Service public class IndexCalculateServiceImpl implements IndexCalculateService { + @Autowired + private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; + @Autowired + private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; + @Override - public void cpcIndexCalculate(IndexCalculateForm formDTO) { + public Boolean indexCalculate(IndexCalculateForm formDTO) { + if (StringUtils.isBlank(formDTO.getMonthId())) { + //默认 当前月份-1 + formDTO.setMonthId(DimIdGenerator.getMonthDimId(DateUtils.addDateMonths(new Date(), -1))); + } + //按照客户分组 + if (CollectionUtils.isEmpty(formDTO.getCustomerIds())) { + Result> externalCustomerIdsResult = epmetCommonServiceOpenFeignClient.getExternalCustomerIds(); + if (!externalCustomerIdsResult.success()) { + log.error("cpcIndexCalculate epmetCommonServiceOpenFeignClient.getExternalCustomerIds return fail"); + return false; + } + formDTO.setCustomerIds(externalCustomerIdsResult.getData()); + } + formDTO.getCustomerIds().forEach(customerId -> { + //计算党员 + try { + List list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(customerId, formDTO.getMonthId()); + } catch (Exception e) { + + } + + //计算网格 + //TODO + + //计算社区 + //TODO + }); + return true; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml index 7ece13bb19..709e17ab36 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml @@ -174,7 +174,3 @@ thread: queueCapacity: @thread.pool.queue-capacity@ keepAlive: @thread.pool.keep-alive@ -dingTalk: - robot: - webHook: @dingTalk.robot.webHook@ - secret: @dingTalk.robot.secret@ \ No newline at end of file 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 c64ce8f35e..92b5a882fa 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 @@ -94,4 +94,22 @@ + + diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java index d23de0c0e2..caa9bd6301 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java @@ -39,4 +39,11 @@ public interface EpmetCommonServiceOpenFeignClient { */ @PostMapping("/commonservice/externalapp/auth") Result externalAppAuth(@RequestBody ExternalAppAuthFormDTO formDTO); + + /** + * 获取外部应用客户Id + * @return + */ + @PostMapping("/commonservice/externalapp/getcustomerids") + Result> getExternalCustomerIds(); } diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java index 555e502062..f21808fc8c 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java @@ -29,4 +29,9 @@ public class EpmetCommonServiceOpenFeignClientFallback implements EpmetCommonSer public Result externalAppAuth(ExternalAppAuthFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_COMMON_SERVICE, "externalAppAuth", formDTO); } + + @Override + public Result> getExternalCustomerIds() { + return ModuleUtils.feignConError(ServiceConstant.EPMET_COMMON_SERVICE, "getExternalCustomerIds", null); + } } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java index 976c4e4ef0..dfd846c5d0 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java @@ -19,6 +19,8 @@ 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; + @RestController @RequestMapping("/externalapp") public class ExternalAppController { @@ -95,4 +97,14 @@ public class ExternalAppController { return new Result>().ok(page); } + /** + * 获取客户ids + * @return + */ + @PostMapping("/getcustomerids") + public Result> list() { + List customerIds = externalAppService.getCustomerIds(); + return new Result>().ok(customerIds); + } + } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppDao.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppDao.java index 73f6bd3407..45dda5390a 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppDao.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppDao.java @@ -39,4 +39,6 @@ public interface ExternalAppDao extends BaseDao { ExternalAppResultDTO getByNameAndCustomerId(@Param("appName") String appName, @Param("customerId") String customerId); List list(@Param("customerId") String customerId); + + List getCustomerIds(); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java index dff718695f..7b714d18db 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java @@ -20,6 +20,8 @@ package com.epmet.service; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.result.ExternalAppResultDTO; +import java.util.List; + /** * 外部应用列表 * @@ -32,4 +34,6 @@ public interface ExternalAppService { ExternalAppResultDTO updateById(String appId, String appName, String customerId); PageData listPage(Integer pageNo, Integer pageSize, String customerId); + + List getCustomerIds(); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java index 5f92de268e..1968cd4f29 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java @@ -130,4 +130,10 @@ public class ExternalAppServiceImpl implements ExternalAppService { return new PageData<>(list, pageInfo.getTotal()); } + @Override + public List getCustomerIds() { + + return externalAppDao.getCustomerIds(); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppDao.xml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppDao.xml index 588f735da7..62d5823a96 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppDao.xml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppDao.xml @@ -60,5 +60,9 @@ AND DEL_FLAG = 0 + + \ No newline at end of file From 274e4c75e5e3b8aeb1372919ef9e72f6960a7ddd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 26 Aug 2020 10:19:16 +0800 Subject: [PATCH 144/360] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CustomerFunctionDetailDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml index 3f38163bde..134e3ad132 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml @@ -28,8 +28,8 @@ cfd.icon_large_img AS "iconLargeImg", cfd.icon_small_img AS "iconSmallImg", CONCAT( - 'https://', cfd.domain_name, + '/', cfd.target_link ) AS "url", cfd.display_order AS "dispalyOrder" From b4aebf6e404d73f119d0cee1948cee27623648d2 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 26 Aug 2020 10:23:07 +0800 Subject: [PATCH 145/360] =?UTF-8?q?=E8=8E=B7=E5=8F=96pc=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=AB=AF=E7=99=BB=E9=99=86=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=20=E6=8E=A5=E5=8F=A3=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/StaffBasicInfoResultDTO.java | 23 +++++++++++++--- .../java/com/epmet/dao/CustomerStaffDao.java | 13 +++++++++- .../impl/CustomerStaffServiceImpl.java | 4 +-- .../resources/mapper/CustomerStaffDao.xml | 26 ++++++++++++++++++- 4 files changed, 57 insertions(+), 9 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java index 1f3388c4b1..04962a5396 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfoResultDTO.java @@ -19,7 +19,7 @@ public class StaffBasicInfoResultDTO implements Serializable { /** * 用户Id */ - private String userId; + private String id; /** * 真实姓名 @@ -31,6 +31,11 @@ public class StaffBasicInfoResultDTO implements Serializable { */ private String gender; + /** + * 头像 + */ + private String headUrl; + /** * 邮箱 */ @@ -39,10 +44,20 @@ public class StaffBasicInfoResultDTO implements Serializable { /** * 手机号 */ - private String mobile; + private String phone; /** - * 地址 + * 微信openId */ - private String address; + private String wxOpenId; + + /** + * 超级管理员 0:否 1:是 + */ + private Integer superAdmin; + + /** + * 状态 0:停用 1:正常 + */ + private Integer status; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java index 1b7753ed18..2fdc573473 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java @@ -180,4 +180,15 @@ public interface CustomerStaffDao extends BaseDao { * @Description 根据客户Id和手机号查询工作人员信息 **/ GovWebOperLoginResultDTO selectByCustomerIdAndPhone(GovWebOperLoginFormDTO formDTO); -} \ No newline at end of file + + /** + * 获取pc工作端登陆用户信息 + * 根据token中userId,去查询登陆用户基本信息 + * + * @param userId + * @return com.epmet.dto.result.StaffBasicInfoResultDTO + * @Author zhangyong + * @Date 10:07 2020-08-26 + **/ + StaffBasicInfoResultDTO selectStaffBasicInfo(@Param("userId") String userId); +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index 9d57e1c0dd..72f9c416b2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -649,9 +649,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl selectStaffBasicInfo(String userId) { - CustomerStaffEntity staffEntity = baseDao.selectByUserId(userId); - StaffBasicInfoResultDTO resultDTO = ConvertUtils.sourceToTarget(staffEntity, StaffBasicInfoResultDTO.class); - resultDTO.setGender(String.valueOf(staffEntity.getGender())); + StaffBasicInfoResultDTO resultDTO = baseDao.selectStaffBasicInfo(userId); return new Result().ok(resultDTO); } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml index 703bab3351..94aaebe1a6 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml @@ -309,4 +309,28 @@ ORDER BY created_time DESC LIMIT 1 - \ No newline at end of file + + + From f2e107010bbf22bf7a95df62646ddd3d50198092 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 26 Aug 2020 10:24:21 +0800 Subject: [PATCH 146/360] =?UTF-8?q?data-report=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/data-report/data-report-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml index 7aad4da80b..2d85c451a1 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.35 + image: 192.168.1.130:10080/epmet-cloud-dev/data-report-server:0.3.36 ports: - "8109:8109" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 790f5e77b4..06716fe378 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.35 + 0.3.36 data-report-server From b760c2dfd787e7162d497a26f841abbc69fad66e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 26 Aug 2020 10:29:27 +0800 Subject: [PATCH 147/360] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CustomerFunctionDetailDao.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml index 134e3ad132..833bb0a9ff 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml @@ -29,7 +29,6 @@ cfd.icon_small_img AS "iconSmallImg", CONCAT( cfd.domain_name, - '/', cfd.target_link ) AS "url", cfd.display_order AS "dispalyOrder" From af61c7dccab4f6bf5c32b50012d45f7fc0f1a34f Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 26 Aug 2020 10:31:57 +0800 Subject: [PATCH 148/360] =?UTF-8?q?selectUserJoin=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/screen/ScreenUserJoinDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 856330ecf2..2fe2eb4337 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 @@ -20,7 +20,7 @@ WHERE DEL_FLAG = '0' - AND AGENCY_ID = #{agencyId} + AND ORG_ID = #{agencyId} AND MONTH_ID = #{monthId} From fa6aa48b937368bdcb2b5d6b02620ff05133689b Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 26 Aug 2020 10:32:25 +0800 Subject: [PATCH 149/360] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oper-customize-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml index 615e3ac046..91e39f33c5 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.46 + image: 192.168.1.130:10080/epmet-cloud-dev/oper-customize-server:0.3.47 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 47db6b2ee9..3cdbbd5b98 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.46 + 0.3.47 com.epmet oper-customize diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index de583485e1..e1af81c0ce 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.123 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.124 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 8c094c8805..55992afad3 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.123 + 0.3.124 com.epmet epmet-user From f6f9bded04d8e563b4531100f792b22a54bee3f4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 26 Aug 2020 12:51:11 +0800 Subject: [PATCH 150/360] =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=80=BC=E6=9C=80?= =?UTF-8?q?=E5=B0=8F=E5=80=BC=E9=80=9A=E7=94=A8dto,=E5=AE=A2=E6=88=B7id+mo?= =?UTF-8?q?nthId=E9=80=9A=E7=94=A8dto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcal/CalculateCommonFormDTO.java | 29 +++++++++++++++++++ .../dto/indexcal/ExtremeValueCommonDTO.java | 26 +++++++++++++++++ .../indexcal/GridCorreLationService.java | 21 ++++++++++++++ .../impl/GridCorreLationServiceImpl.java | 27 +++++++++++++++++ .../impl/IndexCalculateServiceImpl.java | 7 ++++- 5 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java new file mode 100644 index 0000000000..1d56dd17b1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 指标计算通用入参DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 10:49 + */ +@Data +public class CalculateCommonFormDTO implements Serializable { + /** + * 月份id: yyyyMM + */ + private String monthId; + + /** + * 客户id + */ + private String customerId; + + public CalculateCommonFormDTO(String customerId, String monthId) { + this.monthId=monthId; + this.customerId=customerId; + } +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java new file mode 100644 index 0000000000..63dbb58262 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 最值通用DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 10:39 + */ +@Data +public class ExtremeValueCommonDTO implements Serializable { + + /** + * 最小值 + */ + private BigDecimal minValue; + + /** + * 最小值 + */ + private BigDecimal maxValue; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java new file mode 100644 index 0000000000..89001f5d4f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java @@ -0,0 +1,21 @@ +package com.epmet.service.indexcal; + +import com.epmet.dto.indexcal.CalculateCommonFormDTO; + +/** + * 网格相关指标计算 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 10:34 + */ +public interface GridCorreLationService { + + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 网格相关,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java new file mode 100644 index 0000000000..70a6a9222b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -0,0 +1,27 @@ +package com.epmet.service.indexcal.impl; + +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.service.indexcal.GridCorreLationService; +import org.springframework.stereotype.Service; + +/** + * 网格相关service + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 10:35 + */ +@Service +public class GridCorreLationServiceImpl implements GridCorreLationService { + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 网格相关,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) { + return null; + } +} 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 index 4558c87927..54a368044b 100644 --- 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 @@ -3,9 +3,11 @@ package com.epmet.service.screen.impl; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.service.indexcal.GridCorreLationService; import com.epmet.service.screen.IndexCalculateService; import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; @@ -27,6 +29,8 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; + @Autowired + private GridCorreLationService gridCorreLationService; @Override public Boolean indexCalculate(IndexCalculateForm formDTO) { @@ -44,6 +48,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { formDTO.setCustomerIds(externalCustomerIdsResult.getData()); } formDTO.getCustomerIds().forEach(customerId -> { + CalculateCommonFormDTO calculateCommonFormDTO=new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); //计算党员 try { List list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(customerId, formDTO.getMonthId()); @@ -53,7 +58,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { //计算网格 //TODO - + gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO); //计算社区 //TODO From 8a8876eb7daa8fd7b6135572879d9e324d779bed Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 Aug 2020 12:55:00 +0800 Subject: [PATCH 151/360] =?UTF-8?q?=E6=8C=87=E6=A0=87=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-statistical-server/pom.xml | 5 + .../epmet/entity/screen/IndexGroupEntity.java | 5 + .../screen/IndexGroupTemplateEntity.java | 5 + .../epmet/model/IndexExcelDataListener.java | 5 + .../java/com/epmet/util/Pinyin4jUtil.java | 170 ++++++++++++++++++ .../src/main/resources/bootstrap.yml | 4 + .../mapper/screen/IndexGroupTemplateDao.xml | 2 +- 7 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index aca19d6a19..61af3816fc 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -93,6 +93,11 @@ easyexcel 2.2.6 + + io.github.wnjustdoit + pinyin4j + 2.6.0 + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java index 24df1ef18a..dcd8c63648 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java @@ -45,6 +45,11 @@ public class IndexGroupEntity extends BaseEpmetEntity { */ private String indexId; + /** + * 指标code + */ + private String indexCode; + /** * 是否启用:启用:enable 禁用:disabled */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java index 3348ebdeda..6a6408f7a1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java @@ -40,6 +40,11 @@ public class IndexGroupTemplateEntity extends BaseEpmetEntity { */ private String indexId; + /** + * 指标code + */ + private String indexCode; + /** * 是否启用:启用:enable 禁用:disabled */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 76f0897890..931b9afd55 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -10,6 +10,7 @@ import com.epmet.entity.screen.IndexGroupTemplateEntity; import com.epmet.service.screen.IndexDictService; import com.epmet.service.screen.IndexGroupDetailTemplateService; import com.epmet.service.screen.IndexGroupTemplateService; +import com.epmet.util.Pinyin4jUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -118,6 +119,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group1.setIndexId(indexDictEntity.getId()); group1.setParentIndexGroupId("0"); group1.setId(level1GroupId); + group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(index.getLevel1Index(), group1); } @@ -132,6 +134,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setIndexId(indexDictEntity.getId()); group2.setParentIndexGroupId(level1GroupId); group2.setId(level2GroupId); + group2.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(level4Index, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(level4Index); @@ -156,6 +159,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group1.setIndexId(indexDictEntity.getId()); group1.setParentIndexGroupId("0"); group1.setId(level1GroupId); + group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(index.getLevel1Index(), group1); } @@ -170,6 +174,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setIndexId(indexDictEntity.getId()); group2.setParentIndexGroupId(level1GroupId); group2.setId(level2GroupId); + group2.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(level2Index, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(level2Index); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java new file mode 100644 index 0000000000..5ea9d4b828 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java @@ -0,0 +1,170 @@ +package com.epmet.util; + +import net.sourceforge.pinyin4j.PinyinHelper; +import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; +import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; +import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; +import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; +import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + + +/** + * @author liujianjun + */ +public class Pinyin4jUtil { + private static Map duoyinMap; + static { + duoyinMap = new HashMap<>(); + duoyinMap.put('区',new String[]{"qu"}); + duoyinMap.put('系',new String[]{"xi"}); + } + + /** + * getFirstSpellPinYin:(多音字的时候获取第一个).
+ * + * @param src 传入的拼音字符串,以逗号隔开 + * @param isFullSpell 是否全拼,true:全拼,false:第一个汉字全拼(其它汉字取首字母) + * @return 第一个拼音 + */ + public static String getFirstSpellPinYin(String src, boolean isFullSpell) { + String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell)); + System.out.println(targetStr); + String[] split = targetStr.split(","); + if (split.length > 1) { + targetStr = split[0]; + } + return targetStr; + } + + /** + * makeStringByStringSet:(拼音字符串集合转换字符串(逗号分隔)).
+ * + * @param stringSet 拼音集合 + * @return 带逗号字符串 + */ + public static String makeStringByStringSet(Set stringSet) { + StringBuilder str = new StringBuilder(); + int i = 0; + if (stringSet.size() > 0) { + for (String s : stringSet) { + if (i == stringSet.size() - 1) { + str.append(s); + } else { + str.append(s + ","); + } + i++; + } + } + return str.toString().toLowerCase(); + } + + /** + * getPinyin:(获取汉字拼音).
+ * + * @param src 汉字 + * @param isFullSpell 是否全拼,如果为true:全拼,false:首字全拼 + * @return + */ + public static Set getPinyin(String src, boolean isFullSpell) { + if (src != null && !src.trim().equalsIgnoreCase("")) { + char[] srcChar; + srcChar = src.toCharArray(); + // 汉语拼音格式输出类 + HanyuPinyinOutputFormat hanYuPinOutputFormat = new HanyuPinyinOutputFormat(); + + // 输出设置,大小写,音标方式等 + hanYuPinOutputFormat.setCaseType(HanyuPinyinCaseType.LOWERCASE); + hanYuPinOutputFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE); + hanYuPinOutputFormat.setVCharType(HanyuPinyinVCharType.WITH_V); + + String[][] temp = new String[src.length()][]; + for (int i = 0; i < srcChar.length; i++) { + char c = srcChar[i]; + if (String.valueOf(c).matches("[\\u4E00-\\u9FA5]+")) {//中文 + try { + String[] py = duoyinMap.get(c); + if (py != null){ + temp[i] = py; + }else{ + temp[i] = PinyinHelper.toHanyuPinyinStringArray(srcChar[i], hanYuPinOutputFormat); + } + + if (!isFullSpell) { + if (i == 0) { + temp[i] = temp[i]; + } else { + String[] tTemps = new String[temp[i].length]; + for (int j = 0; j < temp[i].length; j++) { + char t = temp[i][j].charAt(0); + tTemps[j] = Character.toString(t); + } + temp[i] = tTemps; + } + } + } catch (BadHanyuPinyinOutputFormatCombination e) { + e.printStackTrace(); + } + } else if (((int) c >= 65 && (int) c <= 90) + || ((int) c >= 97 && (int) c <= 122)) {//英文 + temp[i] = new String[]{String.valueOf(srcChar[i])}; + } else { + temp[i] = new String[]{""}; + } + } + String[] pingyinArray = exchange(temp); + Set pinyinSet = new HashSet(); + for (int i = 0; i < pingyinArray.length; i++) { + pinyinSet.add(pingyinArray[i]); + } + return pinyinSet; + } + return null; + } + + /** + * 递归 + * + * @param strJaggedArray + * @return + */ + public static String[] exchange(String[][] strJaggedArray) { + String[][] temp = doExchange(strJaggedArray); + return temp[0]; + } + + /** + * 递归 + * + * @param strJaggedArray + * @return + */ + private static String[][] doExchange(String[][] strJaggedArray) { + int len = strJaggedArray.length; + if (len >= 2) { + int len1 = strJaggedArray[0].length; + int len2 = strJaggedArray[1].length; + int newlen = len1 * len2; + String[] temp = new String[newlen]; + int Index = 0; + for (int i = 0; i < len1; i++) { + for (int j = 0; j < len2; j++) { + temp[Index] = strJaggedArray[0][i] + strJaggedArray[1][j]; + Index++; + } + } + String[][] newArray = new String[len - 1][]; + for (int i = 2; i < len; i++) { + newArray[i - 1] = strJaggedArray[i]; + } + newArray[0] = temp; + return doExchange(newArray); + } else { + return strJaggedArray; + } + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml index 709e17ab36..ce995b962e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml @@ -174,3 +174,7 @@ thread: queueCapacity: @thread.pool.queue-capacity@ keepAlive: @thread.pool.keep-alive@ +dingTalk: + robot: + webHook: @dingTalk.robot.webHook@ + secret: @dingTalk.robot.secret@ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml index 6adfa4474b..29ff0c7e17 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupTemplateDao.xml @@ -7,7 +7,7 @@ \ No newline at end of file From 8a680c0cf6704a3fa44fc15e484c5a52798eb591 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 Aug 2020 13:36:10 +0800 Subject: [PATCH 152/360] =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E7=B1=BBcode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/eum/IndexCodeEnum.java | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java new file mode 100644 index 0000000000..29766018d8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -0,0 +1,56 @@ +package com.epmet.eum; + +/** + * 需要计算指标code枚举类 + * + * @author jianjun liu + * @date 2020-08-26 11:14 + **/ +public enum IndexCodeEnum { + DANG_YUAN_XIANG_GUAN("dangyuanxiangguan", "党员相关", 1), + WANG_GE_XIANG_GUAN("wangggexiangguan", "网格相关", 1), + SHE_QU_XIANG_GUAN("shequxiangguan", "社区相关", 1), + JIE_DAO_XIANG_GUAN("jiedaoxiangguan", "街道相关", 1), + QU_ZHI_BU_MEN("quzhibumen", "区直部门", 1), + QUAN_QU_XIANG_GUAN("quanquxiangguan", "全区相关", 1), + + DANG_JIAN_NENG_LI("dangjiannengli", "党建能力", 2), + ZHI_LI_NENG_LI("zhilinengli", "治理能力", 2), + FU_WU_NENG_LI("fuwunengli", "服务能力", 2), + + CAN_YU_YI_SHI("canyuyishi", "参与议事", 4), + DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4), + LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), + + ; + + private String code; + private String name; + private Integer level; + + + IndexCodeEnum(String code, String name, Integer level) { + this.code = code; + this.name = name; + this.level = level; + } + + public static IndexCodeEnum getEnum(String code) { + IndexCodeEnum[] values = IndexCodeEnum.values(); + for (IndexCodeEnum value : values) { + if (code != null && value.getCode().equals(code)) { + return value; + } + } + return null; + } + + + public String getCode() { + return code; + } + + public String getName() { + return name; + } +} From 03d56aa35459a2d05e1a6c0d9a2383dd6807e117 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 26 Aug 2020 14:45:20 +0800 Subject: [PATCH 153/360] =?UTF-8?q?NEI=E5=8F=82=E6=95=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/UpdateCustomerParameterFormDTO.java | 2 +- .../main/java/com/epmet/service/impl/CustomerServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateCustomerParameterFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateCustomerParameterFormDTO.java index f522bfab50..ddf4551a57 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateCustomerParameterFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateCustomerParameterFormDTO.java @@ -25,7 +25,7 @@ public class UpdateCustomerParameterFormDTO implements Serializable { /** * 最大允许创建网格数 */ - private Integer gridNumber; + private Integer maxGridNumber; public interface Customer{} } diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index 323388de35..759c1eeae2 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -691,7 +691,7 @@ public class CustomerServiceImpl extends BaseServiceImpl formDTO.getGridNumber()) { + if (entity.getGridNumber() > formDTO.getMaxGridNumber()) { throw new RenException(ModuleConstant.GRID_NUMBER_ERROR); } SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); @@ -703,7 +703,7 @@ public class CustomerServiceImpl extends BaseServiceImpl Date: Wed, 26 Aug 2020 14:45:22 +0800 Subject: [PATCH 154/360] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=A0=91=20=E5=86=99?= =?UTF-8?q?=E6=AD=BBcustomerId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/service/screen/impl/AgencyServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 612239fc8d..0e1d557215 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 @@ -41,7 +41,13 @@ public class AgencyServiceImpl implements AgencyService { @Override public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) { // 1. 查询客户根组织ID - String customerId = externalAppRequestParam.getCustomerId(); +// String customerId = externalAppRequestParam.getCustomerId(); + + + // 验签关闭,customerId无法获取,暂时写死 + String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + + TreeResultDTO rootAgency = screenCustomerAgencyDao.selectRootAgencyId(customerId); if (null == rootAgency){ return new TreeResultDTO(); From 6cab8cc3cab33c7be5ad7f3146f8e5aebb1d7dfb Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 26 Aug 2020 14:56:58 +0800 Subject: [PATCH 155/360] =?UTF-8?q?NEI=E5=8F=82=E6=95=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/UpdateCustomerParameterFormDTO.java | 0 .../main/java/com/epmet/controller/CustomerController.java | 5 ++++- .../src/main/java/com/epmet/service/CustomerService.java | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) rename epmet-module/{gov-org/gov-org-client => oper-crm/oper-crm-client}/src/main/java/com/epmet/dto/form/UpdateCustomerParameterFormDTO.java (100%) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateCustomerParameterFormDTO.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/UpdateCustomerParameterFormDTO.java similarity index 100% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/UpdateCustomerParameterFormDTO.java rename to epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/UpdateCustomerParameterFormDTO.java diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java index 30bde5bb69..e4ae80fc6e 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java @@ -31,7 +31,10 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.CustomerDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.*; +import com.epmet.dto.result.CustomerDetailResultDTO; +import com.epmet.dto.result.CustomerInfoResultDTO; +import com.epmet.dto.result.GridCountResultDTO; +import com.epmet.dto.result.ValidCustomerResultDTO; import com.epmet.excel.CustomerExcel; import com.epmet.feign.GovOrgFeignClient; import com.epmet.service.CustomerService; diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java index 6749bd9763..c9745552ed 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/CustomerService.java @@ -22,7 +22,10 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.*; +import com.epmet.dto.result.CustomerDetailResultDTO; +import com.epmet.dto.result.CustomerInfoResultDTO; +import com.epmet.dto.result.GridCountResultDTO; +import com.epmet.dto.result.ValidCustomerResultDTO; import com.epmet.entity.CustomerEntity; import java.text.ParseException; From b86bb0e139a51a1855ccb031e5066539ccea8683 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 26 Aug 2020 15:01:20 +0800 Subject: [PATCH 156/360] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/result/CustomerListResultDTO.java | 2 +- .../oper-crm-server/src/main/resources/mapper/CustomerDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerListResultDTO.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerListResultDTO.java index 3d08316bb9..e55e97197a 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerListResultDTO.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerListResultDTO.java @@ -34,7 +34,7 @@ public class CustomerListResultDTO implements Serializable { /** * 客户组织级别:0.省级,1市级,2.区县级,3.乡镇街道级 字典表key:organizationlevel */ - private String organizationLevels; + private String organizationLevel; /** * 客户logo */ diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerDao.xml b/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerDao.xml index b1d219013a..d50ab9ce85 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerDao.xml +++ b/epmet-module/oper-crm/oper-crm-server/src/main/resources/mapper/CustomerDao.xml @@ -110,7 +110,7 @@ CUSTOMER_NAME, TITLE, VALIDITY_TIME, - ORGANIZATION_LEVELS, + ORGANIZATION_LEVEL, LOGO, GRID_NUMBER FROM customer From 9cf5ada85baae40c26bcf5dbd62b7305c4548474 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 26 Aug 2020 15:15:50 +0800 Subject: [PATCH 157/360] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=BD=92?= =?UTF-8?q?=E4=B8=80=E5=8C=96=E7=AE=97=E6=B3=95=E6=89=B9=E9=87=8F=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../support/normalizing/ScoreCalculator.java | 2 +- .../support/normalizing/ScoreConstants.java | 13 +++++ .../batch/BatchScoreCalculator.java | 35 +++++++++++++ .../normalizing/batch/IndexInputVO.java | 39 ++++++++++++++ .../normalizing/batch/IndexOutputVO.java | 23 +++++++++ .../stats/test/normalizing/DemoScoreCal.java | 51 +++++++++++++++---- 6 files changed, 151 insertions(+), 12 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexOutputVO.java 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 index 0acb52daae..df84c2196c 100644 --- 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 @@ -79,7 +79,7 @@ public abstract class ScoreCalculator { if (correlation == Correlation.POSITIVE) { // 正相关 BigDecimal x = coefficient.multiply(convertValue2BigDecimal(sourceValue).subtract(minValue)); - BigDecimal score = minScore.add(x, MathContext.DECIMAL32); + BigDecimal score = minScore.add(x); return score; } else if (correlation == Correlation.NEGATIVE) { // 负相关 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java new file mode 100644 index 0000000000..1eecc8cf36 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java @@ -0,0 +1,13 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; + +/** + * 分值常量 + */ +public class ScoreConstants { + + public static final BigDecimal MIN_SCORE = new BigDecimal(0); + public static final BigDecimal MAX_SCORE = new BigDecimal(100); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java new file mode 100644 index 0000000000..85b8cf501d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -0,0 +1,35 @@ +package com.epmet.support.normalizing.batch; + +import com.epmet.support.normalizing.ScoreCalculator; + +import java.math.BigDecimal; +import java.util.List; +import java.util.stream.Collectors; + +public class BatchScoreCalculator { + + /** + * 每个指标都是一条数据,每一条数据中包含该指标的一组样本 + */ + private List indexVOS; + + /** + * 执行计算 + * @return 每一条都是一个指标的,所有样本对应的,得分值 + */ + public List exec(List indexVOS) { + this.indexVOS = indexVOS; + + return indexVOS.stream().map(i -> { + String indexId = i.getIndexId(); + List indexValues = i.getIndexValues(); + BigDecimal weight = i.getWeight(); + ScoreCalculator scoreCalculator = i.getScoreCalculator(); + + List scores4OneIndex = scoreCalculator.normalize(indexValues, weight); + + return new IndexOutputVO(indexId, scores4OneIndex); + }).collect(Collectors.toList()); + } + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java new file mode 100644 index 0000000000..984388d07d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java @@ -0,0 +1,39 @@ +package com.epmet.support.normalizing.batch; + +import com.epmet.support.normalizing.ScoreCalculator; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.List; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class IndexInputVO { + + /** + * 指标标记,由使用者传入,用以标记该条指标的独有特性,一般用id或者code + * 非必填 + */ + private String indexId; + + /** + * 指标的样本值 + */ + private List indexValues; + + /** + * 权重 + */ + private BigDecimal weight; + + private ScoreCalculator scoreCalculator; + + public IndexInputVO(List indexValues, BigDecimal weight, ScoreCalculator scoreCalculator) { + this.indexValues = indexValues; + this.weight = weight; + this.scoreCalculator = scoreCalculator; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexOutputVO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexOutputVO.java new file mode 100644 index 0000000000..ab85a8cabf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexOutputVO.java @@ -0,0 +1,23 @@ +package com.epmet.support.normalizing.batch; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Data +@AllArgsConstructor +public class IndexOutputVO { + + /** + * 指标标记,由使用者传入,用以标记该条指标的独有特性,一般用id或者code + * 非必填 + */ + private String indexId; + + /** + * 指标的样本值 + */ + private List indexScores; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index 14ebc4685c..178468b0a0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -1,26 +1,29 @@ package com.epmet.stats.test.normalizing; -import com.epmet.support.normalizing.Correlation; -import com.epmet.support.normalizing.DoubleScoreCalculator; -import com.epmet.support.normalizing.IntegerScoreCalculator; -import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.*; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import org.junit.Test; import java.math.BigDecimal; import java.util.Arrays; +import java.util.List; public class DemoScoreCal { public static void main(String[] args) { //demoInteger(); - demoIntegerPartical(); + //demoIntegerPartical(); //demoDouble(); } /** * 整数类型,完整源数据列表的归一算法 */ - public static void demoInteger() { - Integer[] iArray = {4,8,1,3,2}; + @Test + public void demoInteger() { + Integer[] iArray = {4, 8, 1, 3, 2}; BigDecimal minScore = new BigDecimal(5); BigDecimal maxScore = new BigDecimal(10); @@ -32,12 +35,13 @@ public class DemoScoreCal { /** * 整数类型,基于边界值的部分列表的的归一算法 */ - public static void demoIntegerPartical() { - Integer[] iArray = {4,1,2}; + @Test + public void demoIntegerPartical() { + Integer[] iArray = {4, 1, 8}; BigDecimal minScore = new BigDecimal(5); BigDecimal maxScore = new BigDecimal(10); - ScoreCalculator sc = new IntegerScoreCalculator(1, 8 ,minScore, maxScore, Correlation.NEGATIVE); + ScoreCalculator sc = new IntegerScoreCalculator(1, 8, minScore, maxScore, Correlation.NEGATIVE); BigDecimal[] scores = sc.normalize(iArray);// 此处也可以直接使用list参数的重载方法,计算阶段没有任何区别,区别在于new IntegerScoreCalculator()阶段 Arrays.stream(scores).forEach(s -> System.out.println(s)); } @@ -46,7 +50,7 @@ public class DemoScoreCal { * double类型归一算法 */ public static void demoDouble() { - Double[] iArray = {1.9,8.9,1.0,3.0,2.0}; + Double[] iArray = {1.9, 8.9, 1.0, 3.0, 2.0}; BigDecimal minScore = new BigDecimal(5); BigDecimal maxScore = new BigDecimal(10); @@ -61,6 +65,31 @@ public class DemoScoreCal { System.out.println(normalize2); } + /** + * 批量计算demo + */ + @Test + public void testBatchCalculate() throws InterruptedException { + //{4,8,1,3,2} + + // 每个指标需要单独的分支计算器,因为每个指标的最大最小值是不同的 + ScoreCalculator sc1 = new IntegerScoreCalculator(1, 8, ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); + ScoreCalculator sc2 = new IntegerScoreCalculator(1, 8, ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); + + // 每个指标的信息,包括样本列表,权重,指标标记 + IndexInputVO index1VO = new IndexInputVO<>("aaa", Arrays.asList(4, 1, 8), new BigDecimal(1), sc1); + IndexInputVO index2VO = new IndexInputVO<>("bbb", Arrays.asList(1, 8, 3), new BigDecimal(1), sc2); + + List indexInputVOS = Arrays.asList(index1VO, index2VO); + + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + List result = batchScoreCalculator.exec(indexInputVOS); + + System.err.println("--------------------------------"); + result.stream().forEach(r -> System.out.println(r)); + Thread.sleep(10); + System.err.println("--------------------------------"); + } } From 7acab40223d73184e6c9c9358d29ff48ac4c3382 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 26 Aug 2020 15:19:37 +0800 Subject: [PATCH 158/360] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E3=80=81?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6sql=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=85=9A?= =?UTF-8?q?=E5=91=98=E5=88=86=E5=B8=83=E3=80=81=E7=94=A8=E6=88=B7=E5=88=86?= =?UTF-8?q?=E5=B8=83=E9=9A=90=E8=97=8F=E5=AD=97=E6=AE=B5areaMarks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/screen/dto/result/ParymemberResultDTO.java | 1 + .../src/main/java/com/epmet/screen/dto/result/UserResultDTO.java | 1 + .../src/main/resources/mapper/screen/ScreenCustomerGridDao.xml | 1 + .../src/main/resources/mapper/screen/ScreenEventDataDao.xml | 1 + 4 files changed, 4 insertions(+) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java index 18bc33df48..710ce303aa 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java @@ -29,6 +29,7 @@ public class ParymemberResultDTO implements Serializable { /** * 当前所选组织的坐标区域 */ + @JsonIgnore private String areaMarks = ""; /** diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java index 179aa5bec2..cea3d4b7ad 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java @@ -29,6 +29,7 @@ public class UserResultDTO implements Serializable { /** * 当前所选组织的坐标区域 */ + @JsonIgnore private String areaMarks = ""; /** 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..1e45902a79 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 @@ -29,6 +29,7 @@ WHERE del_flag = 0 AND parent_agency_id = #{agencyId} + AND all_parent_ids LIKE concat('%', #{agencyId}, '%') 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..0b2e8698e2 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 @@ -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 From afe39de165c889437c328b47ceaef511921efa1f Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 26 Aug 2020 15:29:25 +0800 Subject: [PATCH 159/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86=20=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=85=A5?= =?UTF-8?q?=E5=8F=82=E5=A2=9E=E5=8A=A0=EF=BC=9AallParentIds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/screencoll/form/CustomerGridFormDTO.java | 5 +++++ .../epmet/dto/screencoll/form/DifficultyDataFormDTO.java | 6 +++++- .../com/epmet/dto/screencoll/form/EventDataFormDTO.java | 5 +++++ .../com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java | 5 +++++ .../epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java | 5 +++++ .../com/epmet/entity/screen/ScreenCustomerGridEntity.java | 4 ++++ .../com/epmet/entity/screen/ScreenDifficultyDataEntity.java | 4 ++++ .../java/com/epmet/entity/screen/ScreenEventDataEntity.java | 4 ++++ .../com/epmet/entity/screen/ScreenOrgRankDataEntity.java | 4 ++++ .../epmet/entity/screen/ScreenPartyUserRankDataEntity.java | 4 ++++ .../main/resources/mapper/screen/ScreenCustomerGridDao.xml | 6 ++++-- .../resources/mapper/screen/ScreenDifficultyDataDao.xml | 6 ++++-- .../src/main/resources/mapper/screen/ScreenEventDataDao.xml | 6 ++++-- .../main/resources/mapper/screen/ScreenOrgRankDataDao.xml | 6 ++++-- .../resources/mapper/screen/ScreenPartyUserRankDataDao.xml | 6 ++++-- 15 files changed, 65 insertions(+), 11 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java index 38094a105a..75eb13a0fa 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridFormDTO.java @@ -48,4 +48,9 @@ public class CustomerGridFormDTO implements Serializable { * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) */ private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java index 7d136c4b27..e446e073a3 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java @@ -94,9 +94,13 @@ public class DifficultyDataFormDTO implements Serializable { */ private Integer eventHandledCount; - /** * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) */ private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java index 21e8ee718e..6c2cbe43a5 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataFormDTO.java @@ -121,4 +121,9 @@ public class EventDataFormDTO implements Serializable { * 数据更新至: yyyy|yyyMM|yyyyMMdd 8.21增加字段 */ private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java index 8b0a753839..5e962e47bb 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataFormDTO.java @@ -79,4 +79,9 @@ public class OrgRankDataFormDTO implements Serializable { * 满意率,最大值100,保留小数点后四位 */ private BigDecimal satisfactionRatio; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java index 29b35aa147..5d9f5da32b 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataFormDTO.java @@ -73,4 +73,9 @@ public class PartyUserRankDataFormDTO implements Serializable { * 名 */ private String name; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java index 99b6c99553..62dddc6960 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java @@ -78,4 +78,8 @@ public class ScreenCustomerGridEntity extends BaseEpmetEntity { */ private String dataEndTime; + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java index 845bbb7db0..9a4d3af36b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java @@ -127,4 +127,8 @@ public class ScreenDifficultyDataEntity extends BaseEpmetEntity { */ private String dataEndTime; + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java index e666f852b0..0242ab8ce2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java @@ -144,4 +144,8 @@ public class ScreenEventDataEntity extends BaseEpmetEntity { */ private String dataEndTime; + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java index a732eda4b9..abbdbb7d20 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java @@ -109,4 +109,8 @@ public class ScreenOrgRankDataEntity extends BaseEpmetEntity { */ private BigDecimal satisfactionRatio; + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java index 702e184439..c542da7085 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java @@ -98,4 +98,8 @@ public class ScreenPartyUserRankDataEntity extends BaseEpmetEntity { */ private String dataEndTime; + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 5381e9ddd2..9a37bd23c0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -29,7 +29,8 @@ CREATED_TIME, UPDATED_BY, UPDATED_TIME, - DATA_END_TIME + DATA_END_TIME, + ALL_PARENT_IDS ) values ( @@ -47,7 +48,8 @@ now(), 'APP_USER', now(), - #{item.dataEndTime} + #{item.dataEndTime}, + #{item.allParentIds} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index e26c43115c..fb9a087e42 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -35,7 +35,8 @@ UPDATED_BY, UPDATED_TIME, LATEST_OPERATE_DESC, - DATA_END_TIME + DATA_END_TIME, + ALL_PARENT_IDS ) values ( @@ -63,7 +64,8 @@ 'APP_USER', now(), #{item.latestOperateDesc}, - #{item.dataEndTime} + #{item.dataEndTime}, + #{item.allParentIds} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml index be95b118df..9c950e18e1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -38,7 +38,8 @@ EVENT_STATUS_CODE, EVENT_STATUS_DESC, LATEST_OPERATE_DESC, - DATA_END_TIME + DATA_END_TIME, + ALL_PARENT_IDS ) values ( @@ -69,7 +70,8 @@ #{item.eventStatusCode}, #{item.eventStatusDesc}, #{item.latestOperateDesc}, - #{item.dataEndTime} + #{item.dataEndTime}, + #{item.allParentIds} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml index 4ebe5e2c28..345deacd5d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -35,7 +35,8 @@ CREATED_BY, CREATED_TIME, UPDATED_BY, - UPDATED_TIME + UPDATED_TIME, + ALL_PARENT_IDS ) values ( @@ -59,7 +60,8 @@ 'APP_USER', now(), 'APP_USER', - now() + now(), + #{item.allParentIds} ) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 070e952878..cf93e38a5f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -29,7 +29,8 @@ CREATED_TIME, UPDATED_BY, UPDATED_TIME, - DATA_END_TIME + DATA_END_TIME, + ALL_PARENT_IDS ) values ( @@ -51,7 +52,8 @@ now(), 'APP_USER', now(), - #{item.dataEndTime} + #{item.dataEndTime}, + #{item.allParentIds} ) From 389f2401dab5315c0dc4c84dba9ad07f96662da1 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 26 Aug 2020 15:29:30 +0800 Subject: [PATCH 160/360] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9->?= =?UTF-8?q?=20=E5=85=9A=E5=BB=BA=E5=BC=95=E9=A2=86=EF=BC=9A=204=E3=80=81?= =?UTF-8?q?=E5=85=88=E8=BF=9B=E6=8E=92=E8=A1=8C=E6=A6=9C=E5=8D=95-?= =?UTF-8?q?=E5=85=88=E8=BF=9B=E6=94=AF=E9=83=A8=E6=8E=92=E8=A1=8C=205?= =?UTF-8?q?=E3=80=81=E5=85=88=E8=BF=9B=E6=8E=92=E8=A1=8C=E6=A6=9C=E5=8D=95?= =?UTF-8?q?-=E5=85=88=E8=BF=9B=E5=85=9A=E5=91=98=E6=8E=92=E8=A1=8C=20?= =?UTF-8?q?=E5=9F=BA=E5=B1=82=E6=B2=BB=E7=90=86=EF=BC=9A=201=E3=80=81?= =?UTF-8?q?=E7=83=AD=E5=BF=83=E5=B8=82=E6=B0=91=E7=A7=AF=E5=88=86=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=202=E3=80=81=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9-?= =?UTF-8?q?=E8=80=97=E6=97=B6=E6=9C=80=E9=95=BF|=E6=B6=89=E5=8F=8A?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E6=9C=80=E5=A4=9A|=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=20=E4=BD=BF=E7=94=A8ALL=5FPARENT=5FIDS?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E6=A8=A1=E7=B3=8A=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenDifficultyDataDao.xml | 2 +- .../src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml | 2 +- .../resources/mapper/screen/ScreenPartyUserRankDataDao.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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 e77b00012b..77f6fb0108 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 @@ -22,7 +22,7 @@ AND eve.DEL_FLAG = '0' WHERE diff.DEL_FLAG = '0' - AND diff.PARENT_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/ScreenOrgRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml index 26007e2997..b15df8d588 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 @@ -17,7 +17,7 @@ screen_org_rank_data WHERE DEL_FLAG = '0' - 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/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 66fb4d6a80..a61e832fab 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 @@ -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 @@ -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 From e7866cd5f13ced39566c6d127baeadd6b97ffae7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 26 Aug 2020 15:39:57 +0800 Subject: [PATCH 161/360] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcal/CalculateCommonFormDTO.java | 1 + .../dto/indexcal/CustomerGridInfoDTO.java | 28 +++++ .../dto/indexcal/ExtremeValueCommonDTO.java | 1 + .../dto/screen/ScreenCustomerGridDTO.java | 116 ++++++++++++++++++ .../dao/screen/ScreenCustomerGridDao.java | 19 +++ .../indexcal/GridCorreLationService.java | 1 + .../impl/GridCorreLationServiceImpl.java | 39 +++++- .../mapper/screen/ScreenCustomerGridDao.xml | 23 ++++ 8 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java index 1d56dd17b1..4c43a57890 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java @@ -12,6 +12,7 @@ import java.io.Serializable; */ @Data public class CalculateCommonFormDTO implements Serializable { + private static final long serialVersionUID = -5689788391963427717L; /** * 月份id: yyyyMM */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java new file mode 100644 index 0000000000..16ede875bb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java @@ -0,0 +1,28 @@ +package com.epmet.dto.indexcal; + +import com.epmet.dto.ScreenCustomerGridDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 客户下所有网格 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 13:45 + */ +@Data +public class CustomerGridInfoDTO implements Serializable { + private static final long serialVersionUID = -3211409107659568304L; + + /** + * 网格总数 + */ + private Integer total; + + /** + * 网格列表 + */ + private List gridList; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java index 63dbb58262..fd383a61dd 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java @@ -14,6 +14,7 @@ import java.math.BigDecimal; @Data public class ExtremeValueCommonDTO implements Serializable { + private static final long serialVersionUID = -6295067080250068024L; /** * 最小值 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java new file mode 100644 index 0000000000..ee7863d40b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java @@ -0,0 +1,116 @@ +/** + * 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.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 网格(党支部)信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-26 + */ +@Data +public class ScreenCustomerGridDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键ID 主键ID + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 网格id + */ + private String gridId; + + /** + * 组织名称 + */ + private String gridName; + + /** + * 网格所属组织id + */ + private String parentAgencyId; + + /** + * 坐标区域 + */ + private String areaMarks; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 党支部(=网格)的位置 + */ + private String partyMark; + + /** + * 删除标识 0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java index c9fa856582..60f5a64ef4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.screencoll.form.CustomerGridFormDTO; import com.epmet.entity.screen.ScreenCustomerGridEntity; import org.apache.ibatis.annotations.Mapper; @@ -55,4 +56,22 @@ public interface ScreenCustomerGridDao extends BaseDao * @Date 10:52 2020-08-18 **/ void batchInsertCustomerGrid(@Param("list") List list, @Param("customerId")String customerId); + + /** + * @return java.lang.Integer + * @param customerId + * @author yinzuomei + * @description 查询客户下网格总数 + * @Date 2020/8/26 15:33 + **/ + Integer selectCountByCustomerId(@Param("customerId") String customerId); + + /** + * @return java.util.List + * @param customerId + * @author yinzuomei + * @description 查询客户下网格信息 + * @Date 2020/8/26 15:33 + **/ + List selectListByCustomerId(@Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java index 89001f5d4f..7b7905a535 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java @@ -1,5 +1,6 @@ package com.epmet.service.indexcal; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.indexcal.CalculateCommonFormDTO; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 70a6a9222b..a192fafc6a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,7 +1,18 @@ package com.epmet.service.indexcal.impl; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.dto.indexcal.CustomerGridInfoDTO; import com.epmet.service.indexcal.GridCorreLationService; +import io.swagger.annotations.Authorization; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** @@ -12,6 +23,16 @@ import org.springframework.stereotype.Service; */ @Service public class GridCorreLationServiceImpl implements GridCorreLationService { + private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); + @Autowired + private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; + @Autowired + private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao; + @Autowired + private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; + @Autowired + private ScreenCustomerGridDao screenCustomerGridDao; + /** * @param formDTO @@ -22,6 +43,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ @Override public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) { - return null; + return true; + } + + + + /** + * @return com.epmet.dto.indexcal.CustomerGridInfoDTO + * @param customerId + * @author yinzuomei + * @description 查询客户下网格信息 + * @Date 2020/8/26 15:37 + **/ + public CustomerGridInfoDTO queryCustomerGridInfo(String customerId){ + CustomerGridInfoDTO customerGridInfoDTO=new CustomerGridInfoDTO(); + customerGridInfoDTO.setTotal(screenCustomerGridDao.selectCountByCustomerId(customerId)); + customerGridInfoDTO.setGridList(screenCustomerGridDao.selectListByCustomerId(customerId)); + return customerGridInfoDTO; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 5381e9ddd2..80450ccb6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -52,4 +52,27 @@ + + + + + From 941b7ae0d7bd439ab9745a29d170cdee3552d533 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 26 Aug 2020 15:41:39 +0800 Subject: [PATCH 162/360] =?UTF-8?q?=E6=97=A7=E6=8E=A5=E5=8F=A3=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E5=AE=A2=E6=88=B7Id=E6=9F=A5=E8=AF=A2=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=BF=94=E5=8F=82logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/result/CustomerInfoDTO.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerInfoDTO.java b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerInfoDTO.java index 6c2bd282bf..6ef2596917 100644 --- a/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerInfoDTO.java +++ b/epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/result/CustomerInfoDTO.java @@ -6,4 +6,5 @@ import lombok.Data; public class CustomerInfoDTO { private String customerName; private String organizationLevel; + private String logo; } From cd41458c40f882c5196fa37b624655a64f91c46f Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 26 Aug 2020 15:43:42 +0800 Subject: [PATCH 163/360] =?UTF-8?q?compose=E7=89=88=E6=9C=AC=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oper-crm/oper-crm-server/deploy/docker-compose-prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml index 9a7eb3e9b9..aeefe23068 100644 --- a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml +++ b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-crm-server: container_name: oper-crm-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/oper-crm-server:0.3.66 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/oper-crm-server:0.3.70 ports: - "8090:8090" network_mode: host # 使用现有网络 From 3538826d9d63ee27cd540d785588976d7bce8d42 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 Aug 2020 16:13:01 +0800 Subject: [PATCH 164/360] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=A6=81=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E7=9A=84=E6=8C=87=E6=A0=87=E6=98=8E=E7=BB=86=E6=9D=83?= =?UTF-8?q?=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/screen/IndexGroupDetailDTO.java | 60 +++++++++++++++++++ .../screen/result/IndexGroupDetailResult.java | 28 +++++++++ .../com/epmet/dao/screen/IndexGroupDao.java | 4 ++ .../epmet/dao/screen/IndexGroupDetailDao.java | 6 +- .../entity/screen/IndexGroupDetailEntity.java | 10 ++++ .../IndexGroupDetailTemplateEntity.java | 5 ++ .../epmet/model/IndexExcelDataListener.java | 23 ++++--- .../screen/IndexGroupDetailService.java | 9 ++- .../impl/IndexCalculateServiceImpl.java | 6 ++ .../impl/IndexGroupDetailServiceImpl.java | 16 +++++ .../mapper/screen/IndexGroupDetailDao.xml | 5 ++ .../screen/IndexGroupDetailTemplateDao.xml | 2 +- 12 files changed, 162 insertions(+), 12 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/IndexGroupDetailResult.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.java new file mode 100644 index 0000000000..efe372f027 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/IndexGroupDetailDTO.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.dto.screen; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 客户指标详情 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-19 + */ +@Data +public class IndexGroupDetailDTO { + + private static final long serialVersionUID = 1L; + + /** + * index_group.id + */ + private String indexGroupId; + + /** + * 指标id + */ + private String indexId; + + /** + * 权重(同一组权重总和=1) + */ + private BigDecimal weight; + + /** + * 是否启用:启用:enable 禁用:disabled + */ + private String status; + + /** + * 阈值 如果是百分比 则为除以100以后的值 + */ + private BigDecimal threshold; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/IndexGroupDetailResult.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/IndexGroupDetailResult.java new file mode 100644 index 0000000000..0d6cea89c8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/IndexGroupDetailResult.java @@ -0,0 +1,28 @@ +package com.epmet.dto.screen.result; + +import com.epmet.dto.screen.IndexGroupDetailDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * desc:计算指标时 获取要计算的组的指标 + * + * @author liujianjun + */ +@Data +public class IndexGroupDetailResult implements Serializable { + private static final long serialVersionUID = 3937041236261115759L; + + /** + * 是否有下一组 + */ + private Boolean hasNextGroup; + + /** + * desc:指标详情列表 如果hasNextGroup是true则返回的是明细,否则返回的是上级的分组的指标明细 + * 例如:网格的三大能力上次已经返回完毕,下一次调用时返回的是网格相关的三大能力的 指标明细 + */ + private List indexGroupDetailList; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java index 5458720940..c873ffdb0b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java @@ -21,6 +21,8 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.screen.IndexGroupEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 客户指标分组 * @@ -31,4 +33,6 @@ import org.apache.ibatis.annotations.Mapper; public interface IndexGroupDao extends BaseDao { int inertGroupFromTable(String customerId); + + List getDetailByCode(String indexCode, Integer offset); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java index 1a7dd4a0a8..8c7a4e82fb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java @@ -20,6 +20,9 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.screen.IndexGroupDetailEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 客户指标详情 @@ -29,5 +32,6 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IndexGroupDetailDao extends BaseDao { - + + List getDetailListByParentCode(@Param("customerId") String customerId, @Param("indexCode") String indexCode); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java index c0088d5383..1336dd050f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java @@ -62,4 +62,14 @@ public class IndexGroupDetailEntity extends BaseEpmetEntity { */ private String status; + /** + * 阈值 如果是百分比 则为除以100以后的值 + */ + private BigDecimal threshold; + + /** + * 所有指标code拼接的字符串 冒号隔开 + */ + private String allParentIndexCode; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java index 569cda48d9..20162b1198 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java @@ -62,4 +62,9 @@ public class IndexGroupDetailTemplateEntity extends BaseEpmetEntity { */ private BigDecimal threshold; + /** + * 所有指标code拼接的字符串 冒号隔开 + */ + private String allParentIndexCode; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 931b9afd55..d19fb1d628 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -3,6 +3,7 @@ package com.epmet.model; import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.UniqueIdGenerator; import com.epmet.entity.screen.IndexDictEntity; import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; @@ -122,7 +123,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(index.getLevel1Index(), group1); } - + StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); String level2GroupId = UniqueIdGenerator.generate(); @@ -139,14 +140,16 @@ public class IndexExcelDataListener extends AnalysisEventListener { //构建 分组明细 templateEntity = indexGroupDetailMap.get(level4Index); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group1.getId(), 2); + buildIndexGroupDetail(indexDictEntity, index, group1, allIndexCodeSb.toString(), 2); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); + allIndexCodeSb.append(StrConstant.COLON); + allIndexCodeSb.append(group2.getIndexCode()); templateEntity = indexGroupDetailMap.get(index.getLevel5Index()); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group2.getId(), 5); + buildIndexGroupDetail(indexDictEntity, index, group2, allIndexCodeSb.toString(), 5); } } else { //todo 测试完去掉 @@ -162,7 +165,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupMap.put(index.getLevel1Index(), group1); } - + StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level2Index = index.getLevel2Index(); indexDictEntity = indexDicMap.get(level2Index); String level2GroupId = UniqueIdGenerator.generate(); @@ -179,14 +182,15 @@ public class IndexExcelDataListener extends AnalysisEventListener { //构建 分组明细 templateEntity = indexGroupDetailMap.get(level2Index); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group1.getId(), 2); + buildIndexGroupDetail(indexDictEntity, index, group1, allIndexCodeSb.toString(), 2); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); - + allIndexCodeSb.append(StrConstant.COLON); + allIndexCodeSb.append(group2.getIndexCode()); templateEntity = indexGroupDetailMap.get(index.getLevel5Index()); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group2.getId(), 5); + buildIndexGroupDetail(indexDictEntity, index, group2, allIndexCodeSb.toString(), 5); } } //} @@ -195,10 +199,11 @@ public class IndexExcelDataListener extends AnalysisEventListener { LOGGER.info("所有指标分组明细数据解析完成:{}", JSON.toJSONString(indexGroupDetailMap.values())); } - private void buildIndexGroupDetail(IndexDictEntity indexDictEntity, IndexModel index, String groupId, Integer level) { + private void buildIndexGroupDetail(IndexDictEntity indexDictEntity, IndexModel index, IndexGroupTemplateEntity parentGroup, String allIndexCode, Integer level) { IndexGroupDetailTemplateEntity templateEntity; templateEntity = new IndexGroupDetailTemplateEntity(); - templateEntity.setIndexGroupId(groupId); + templateEntity.setIndexGroupId(parentGroup.getId()); + templateEntity.setAllParentIndexCode(allIndexCode); templateEntity.setIndexId(indexDictEntity.getId()); if (level == 5) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java index ea03e298a1..aa69cba8e7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java @@ -20,6 +20,8 @@ package com.epmet.service.screen; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.entity.screen.IndexGroupDetailEntity; +import java.util.List; + /** * 客户指标详情 * @@ -27,5 +29,10 @@ import com.epmet.entity.screen.IndexGroupDetailEntity; * @since v1.0.0 2020-08-19 */ public interface IndexGroupDetailService extends BaseService { - + /** + * desc:根据all_parent_index_code 获取指标明细 + * @param customerId + * @param indexCode + */ + List getDetailListByParentCode(String customerId,String... indexCode); } \ No newline at end of file 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 index 54a368044b..d51cf3ea88 100644 --- 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 @@ -3,6 +3,8 @@ package com.epmet.service.screen.impl; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.screen.IndexGroupDao; +import com.epmet.dao.screen.IndexGroupDetailDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; @@ -31,6 +33,10 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @Autowired private GridCorreLationService gridCorreLationService; + @Autowired + private IndexGroupDao indexGroupDao; + @Autowired + private IndexGroupDetailDao indexGroupDetailDao; @Override public Boolean indexCalculate(IndexCalculateForm formDTO) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java index db9fe1f411..6c22b360d6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java @@ -18,11 +18,15 @@ package com.epmet.service.screen.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.dao.screen.IndexGroupDetailDao; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.service.screen.IndexGroupDetailService; import org.springframework.stereotype.Service; +import java.util.List; + /** * 客户指标详情 * @@ -33,4 +37,16 @@ import org.springframework.stereotype.Service; public class IndexGroupDetailServiceImpl extends BaseServiceImpl implements IndexGroupDetailService { + @Override + public List getDetailListByParentCode(String customerId,String... indexCode) { + if (indexCode == null || indexCode.length == 0){ + throw new RenException("参数错误"); + } + StringBuilder sb = new StringBuilder(); + for (String code:indexCode){ + sb.append(code).append(StrConstant.COLON); + } + sb = sb.deleteCharAt(sb.length()); + return baseDao.getDetailListByParentCode(customerId,sb.toString()); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml index b7854f3338..ac4ad73bd5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml @@ -3,4 +3,9 @@ + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml index c044654dd8..8ec562b386 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml @@ -7,7 +7,7 @@ delete from index_group_detail_template From 445fb28380aabe0f00416ed93147f06701649b71 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 26 Aug 2020 16:57:19 +0800 Subject: [PATCH 165/360] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9A=84=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=88=86=E6=94=AF=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../batch/BatchScoreCalculator.java | 14 +++++++++----- .../normalizing/batch/IndexInputVO.java | 6 +++--- .../normalizing/batch/IndexOutputVO.java | 4 ++-- .../normalizing/batch/SampleScore.java | 19 +++++++++++++++++++ .../normalizing/batch/SampleValue.java | 17 +++++++++++++++++ .../stats/test/normalizing/DemoScoreCal.java | 16 ++++++++-------- 6 files changed, 58 insertions(+), 18 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleScore.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleValue.java diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index 85b8cf501d..fb54b5960e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -17,16 +17,20 @@ public class BatchScoreCalculator { * 执行计算 * @return 每一条都是一个指标的,所有样本对应的,得分值 */ - public List exec(List indexVOS) { - this.indexVOS = indexVOS; + public List exec(List indexInputVOS) { + this.indexVOS = indexInputVOS; - return indexVOS.stream().map(i -> { + return indexInputVOS.stream().map(i -> { String indexId = i.getIndexId(); - List indexValues = i.getIndexValues(); + List indexValueVOs = i.getIndexValueVOs(); BigDecimal weight = i.getWeight(); ScoreCalculator scoreCalculator = i.getScoreCalculator(); - List scores4OneIndex = scoreCalculator.normalize(indexValues, weight); + // 循环同一个指标内的多个样本值的SampleValue列表 + List scores4OneIndex = indexValueVOs.stream().map(vo -> { + BigDecimal score = scoreCalculator.normalize(vo.getSampleValue(), weight); + return new SampleScore(vo.getSampleId(), score); + }).collect(Collectors.toList()); return new IndexOutputVO(indexId, scores4OneIndex); }).collect(Collectors.toList()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java index 984388d07d..94ea1ef0ad 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java @@ -22,7 +22,7 @@ public class IndexInputVO { /** * 指标的样本值 */ - private List indexValues; + private List> indexValueVOs; /** * 权重 @@ -31,8 +31,8 @@ public class IndexInputVO { private ScoreCalculator scoreCalculator; - public IndexInputVO(List indexValues, BigDecimal weight, ScoreCalculator scoreCalculator) { - this.indexValues = indexValues; + public IndexInputVO(List> indexValueVOs, BigDecimal weight, ScoreCalculator scoreCalculator) { + this.indexValueVOs = indexValueVOs; this.weight = weight; this.scoreCalculator = scoreCalculator; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexOutputVO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexOutputVO.java index ab85a8cabf..fdf0a3dea9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexOutputVO.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexOutputVO.java @@ -8,7 +8,7 @@ import java.util.List; @Data @AllArgsConstructor -public class IndexOutputVO { +public class IndexOutputVO { /** * 指标标记,由使用者传入,用以标记该条指标的独有特性,一般用id或者code @@ -19,5 +19,5 @@ public class IndexOutputVO { /** * 指标的样本值 */ - private List indexScores; + private List indexScoreVOs; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleScore.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleScore.java new file mode 100644 index 0000000000..bd677fc861 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleScore.java @@ -0,0 +1,19 @@ +package com.epmet.support.normalizing.batch; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 样本得分对象 + */ +@Data +@AllArgsConstructor +public class SampleScore { + + private String sampleId; + + private BigDecimal sampleScore; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleValue.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleValue.java new file mode 100644 index 0000000000..0818cc8d97 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleValue.java @@ -0,0 +1,17 @@ +package com.epmet.support.normalizing.batch; + +import lombok.AllArgsConstructor; +import lombok.Data; + +/** + * 样本值对象 + */ +@Data +@AllArgsConstructor +public class SampleValue { + + private String sampleId; + + private T sampleValue; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index 178468b0a0..1bb7514d5a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -4,6 +4,7 @@ import com.epmet.support.normalizing.*; import com.epmet.support.normalizing.batch.BatchScoreCalculator; import com.epmet.support.normalizing.batch.IndexInputVO; import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; import org.junit.Test; import java.math.BigDecimal; @@ -24,10 +25,8 @@ public class DemoScoreCal { @Test public void demoInteger() { Integer[] iArray = {4, 8, 1, 3, 2}; - BigDecimal minScore = new BigDecimal(5); - BigDecimal maxScore = new BigDecimal(10); - ScoreCalculator sc = new IntegerScoreCalculator(iArray, minScore, maxScore, Correlation.NEGATIVE); + ScoreCalculator sc = new IntegerScoreCalculator(iArray, ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); BigDecimal[] scores = sc.normalize(iArray); Arrays.stream(scores).forEach(s -> System.out.println(s)); } @@ -38,10 +37,8 @@ public class DemoScoreCal { @Test public void demoIntegerPartical() { Integer[] iArray = {4, 1, 8}; - BigDecimal minScore = new BigDecimal(5); - BigDecimal maxScore = new BigDecimal(10); - ScoreCalculator sc = new IntegerScoreCalculator(1, 8, minScore, maxScore, Correlation.NEGATIVE); + ScoreCalculator sc = new IntegerScoreCalculator(1, 8, ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); BigDecimal[] scores = sc.normalize(iArray);// 此处也可以直接使用list参数的重载方法,计算阶段没有任何区别,区别在于new IntegerScoreCalculator()阶段 Arrays.stream(scores).forEach(s -> System.out.println(s)); } @@ -76,9 +73,12 @@ public class DemoScoreCal { ScoreCalculator sc1 = new IntegerScoreCalculator(1, 8, ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); ScoreCalculator sc2 = new IntegerScoreCalculator(1, 8, ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); + List> index1SampleValues = Arrays.asList(new SampleValue<>("id1", 4), new SampleValue<>("id2", 1), new SampleValue<>("id3", 8)); + List> index2SampleValues = Arrays.asList(new SampleValue<>("id1", 1), new SampleValue<>("id2", 8), new SampleValue<>("id3", 3)); + // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO<>("aaa", Arrays.asList(4, 1, 8), new BigDecimal(1), sc1); - IndexInputVO index2VO = new IndexInputVO<>("bbb", Arrays.asList(1, 8, 3), new BigDecimal(1), sc2); + IndexInputVO index1VO = new IndexInputVO<>("aaa", index1SampleValues, new BigDecimal(1), sc1); + IndexInputVO index2VO = new IndexInputVO<>("bbb", index2SampleValues, new BigDecimal(1), sc2); List indexInputVOS = Arrays.asList(index1VO, index2VO); From c2fdea89767f1ae53093f697f852e19e4200ab07 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 26 Aug 2020 17:13:32 +0800 Subject: [PATCH 166/360] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../support/normalizing/batch/BatchScoreCalculator.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index fb54b5960e..9ce5ec4913 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -8,17 +8,11 @@ import java.util.stream.Collectors; public class BatchScoreCalculator { - /** - * 每个指标都是一条数据,每一条数据中包含该指标的一组样本 - */ - private List indexVOS; - /** * 执行计算 * @return 每一条都是一个指标的,所有样本对应的,得分值 */ public List exec(List indexInputVOS) { - this.indexVOS = indexInputVOS; return indexInputVOS.stream().map(i -> { String indexId = i.getIndexId(); From 6be7a5b8b5beefc0c643f887914f53010cb61d85 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 26 Aug 2020 17:35:00 +0800 Subject: [PATCH 167/360] =?UTF-8?q?EXT=20staffInfo=20=20=20=20staffPermiss?= =?UTF-8?q?ion=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dao/CustomerAgencyDao.java | 9 ++++++- .../impl/CustomerAgencyServiceImpl.java | 25 +++++++++---------- .../resources/mapper/CustomerAgencyDao.xml | 16 ++++++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 9 ------- .../EpmetUserOpenFeignClientFallback.java | 5 ---- .../StaffAgencyVisitedController.java | 12 --------- .../com/epmet/dao/StaffAgencyVisitedDao.java | 1 - .../service/StaffAgencyVisitedService.java | 8 ------ .../impl/StaffAgencyVisitedServiceImpl.java | 16 +----------- .../mapper/StaffAgencyVisitedDao.xml | 16 +----------- 10 files changed, 38 insertions(+), 79 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index 26ec50ed8e..613f4d82bb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -133,7 +133,14 @@ public interface CustomerAgencyDao extends BaseDao { * @date 2020.08.17 09:50 **/ ExtStaffInfoResultDTO selectAgencyAndGridInfoExt(@Param("gridId") String gridId); - + /** + * @Description 当没有工作人员最近访问的gridId时查询该用户所属的组织机关信息 + * @param staffId + * @return + * @author wangc + * @date 2020.08.17 09:50 + **/ + ExtStaffInfoResultDTO selectAgencyInfoWhenGridIdIsNull(@Param("staffId")String staffId); /** * @Description 根据agencyId查找指定机构的信息,直属网格、部门 * @param agencyId diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index c401f89afc..224a33571f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -848,8 +848,12 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl agency = - epmetUserOpenFeignClient.latestAgency(staffId); - if(agency.success() && StringUtils.isNotBlank(agency.getData())){ - //2.根据此agencyId查询数据权限 - ExtStaffPermissionResultDTO res = baseDao.selectAgencyById(agency.getData()); - return res; - }else{ - logger.error("com.epmet.service.impl.CustomerAgencyServiceImpl.staffPermissionExt,没有找到工作人员最近一次登陆的Agency信息,用户Id:{}",staffId); + + CustomerStaffAgencyDTO agency = customerStaffAgencyDao.selectLatestCustomerByStaff(staffId); + if(null == agency || StringUtils.isBlank(agency.getAgencyId())){ + logger.error("com.epmet.service.impl.CustomerAgencyServiceImpl.staffPermissionExt,没有找到工作人员所属的机关信息,用户Id:{}",staffId); ExtStaffPermissionResultDTO emptyResult = new ExtStaffPermissionResultDTO(); checkFieldAndSetDefault(emptyResult); return emptyResult; } - - + ExtStaffPermissionResultDTO res = baseDao.selectAgencyById(agency.getAgencyId()); + return res; } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 3018846910..106ff99da5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -169,6 +169,22 @@ ORDER BY created_time DESC + + + - SELECT - sav.CUSTOMER_ID, - sav.STAFF_ID, - sav.AGENCY_ID - FROM - staff_agency_visited sav - WHERE - sav.DEL_FLAG = '0' - AND sav.STAFF_ID =#{userId} - ORDER BY - sav.CREATED_TIME DESC - LIMIT 1 - + \ No newline at end of file From 362a930c476588e09b09395d8172840f3bc87dc9 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 26 Aug 2020 18:09:37 +0800 Subject: [PATCH 168/360] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=A0=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/result/TreeResultDTO.java | 14 ++++++ .../dao/screen/ScreenCustomerGridDao.java | 13 +++-- .../screen/impl/AgencyServiceImpl.java | 50 ++++++++++++++++--- .../mapper/screen/ScreenCustomerAgencyDao.xml | 8 ++- .../mapper/screen/ScreenCustomerGridDao.xml | 15 ++++++ 5 files changed, 88 insertions(+), 12 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java index b12a8f46f5..0f28cda5b2 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java @@ -29,6 +29,20 @@ public class TreeResultDTO implements Serializable { @JsonIgnore private String pids; + /** + * 中心点位 + */ + private List centerMark; + + /** + * 机关级别 + */ + @JsonIgnore + private String level; + + @JsonIgnore + private String centerMarkA; + /** * 子目录 */ 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/screen/ScreenCustomerGridDao.java index 4e57c2f71d..ec6a2e7ee1 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/screen/ScreenCustomerGridDao.java @@ -17,10 +17,7 @@ package com.epmet.datareport.dao.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.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/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 0e1d557215..8ee16c42f6 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 @@ -15,6 +15,7 @@ import com.epmet.datareport.service.screen.AgencyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** @@ -52,11 +53,37 @@ public class AgencyServiceImpl implements AgencyService { if (null == rootAgency){ return new TreeResultDTO(); } - List departmentList = this.getDepartmentList(("".equals(rootAgency.getPids()) || rootAgency.getPids().equals(NumConstant.ZERO_STR)) ? rootAgency.getValue():rootAgency.getPids().concat(",").concat(rootAgency.getValue())); - rootAgency.setChildren(departmentList); + 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) { + return new ArrayList<>(); + } + List result = new ArrayList<>(); + String substring = centerMark.substring(2, centerMark.length() - 2); + String[] split = substring.split(","); + for (String s : split) { + result.add(Double.valueOf(s)); + } + return result; + } + /** * @Description 递归查询填充下级 * @param subAgencyPids @@ -66,10 +93,21 @@ public class AgencyServiceImpl implements AgencyService { 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); - } + 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; } 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..f66aef3609 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 @@ -8,7 +8,9 @@ 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 @@ -22,7 +24,9 @@ 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 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 1e45902a79..123fbbbc75 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 @@ -67,4 +67,19 @@ AND scg.del_flag = 0 AND sutd.parent_id = #{parentId} + + + \ No newline at end of file From 50c45048fc3a901bddbe41b8e8ed1f6fa9caa038 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 Aug 2020 18:11:53 +0800 Subject: [PATCH 169/360] =?UTF-8?q?detail=E6=B7=BB=E5=8A=A0code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/indexcal/ExtremeValueDTO.java | 43 +++++++++++++++++++ .../controller/IndexCalculateController.java | 13 +++++- .../FactIndexPartyAblityCpcMonthlyDao.java | 4 ++ .../epmet/dao/screen/IndexCodeFieldReDao.java | 9 ++++ .../entity/screen/IndexCodeFieldReEntity.java | 12 ++++++ .../entity/screen/IndexGroupDetailEntity.java | 5 +++ .../IndexGroupDetailTemplateEntity.java | 5 +++ .../epmet/model/IndexExcelDataListener.java | 2 + .../screen/CpcIndexCalculateService.java | 18 ++++++++ .../impl/CpcIndexCalculateServiceImpl.java | 34 +++++++++++++++ .../FactIndexPartyAblityCpcMonthlyDao.xml | 32 ++++++++++++-- .../mapper/screen/IndexCodeFieIdReDao.xml | 6 +++ 12 files changed, 179 insertions(+), 4 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/CpcIndexCalculateService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueDTO.java new file mode 100644 index 0000000000..4dbabbf958 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueDTO.java @@ -0,0 +1,43 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 最值通用DTO + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/26 10:39 + */ +@Data +public class ExtremeValueDTO implements Serializable { + + private static final long serialVersionUID = -2227402439857459667L; + + /** + * 最小值 + */ + private BigDecimal minValue1; + private BigDecimal minValue2; + private BigDecimal minValue3; + private BigDecimal minValue4; + private BigDecimal minValue5; + private BigDecimal minValue6; + private BigDecimal minValue7; + private BigDecimal minValue8; + private BigDecimal minValue9; + private BigDecimal minValue10; + + private BigDecimal maxValue1; + private BigDecimal maxValue2; + private BigDecimal maxValue3; + private BigDecimal maxValue4; + private BigDecimal maxValue5; + private BigDecimal maxValue6; + private BigDecimal maxValue7; + private BigDecimal maxValue8; + private BigDecimal maxValue9; + private BigDecimal maxValue10; +} 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 index 6b9d8d45e1..4117f6dc75 100644 --- 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 @@ -2,7 +2,9 @@ package com.epmet.controller; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; +import com.epmet.service.screen.CpcIndexCalculateService; import com.epmet.service.screen.IndexCalculateService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -21,7 +23,10 @@ import org.springframework.web.bind.annotation.RestController; public class IndexCalculateController { @Autowired - private IndexCalculateService indexCalculateService; + private IndexCalculateService indexCalculateService; + + @Autowired + private CpcIndexCalculateService cpcIndexCalculateService; /** * 1、按照客户计算指标(按照月份) @@ -37,6 +42,12 @@ public class IndexCalculateController { indexCalculateService.indexCalculate(formDTO); return new Result(); } + @PostMapping("getMax") + public Result getMax(){ + CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO("c1","202008"); + cpcIndexCalculateService.cpcIndexCalculate(calculateCommonFormDTO); + return new Result(); + } /* *//** * 2、党建能力-网格相关指标上报(按照月份) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index 5d786e5113..7208c093aa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -23,7 +23,9 @@ import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.math.BigDecimal; import java.util.List; +import java.util.Map; /** * 党建能力-党员相关的事实表 @@ -69,4 +71,6 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); + + Map getExtremeValue(@Param("customerId") String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java new file mode 100644 index 0000000000..edd402249f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java @@ -0,0 +1,9 @@ +package com.epmet.dao.screen; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.screen.IndexCodeFieldReEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface IndexCodeFieldReDao extends BaseDao { +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java new file mode 100644 index 0000000000..1e563a118b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java @@ -0,0 +1,12 @@ +package com.epmet.entity.screen; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("index_code_field_re") +public class IndexCodeFieldReEntity extends BaseEpmetEntity { +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java index 1336dd050f..a789ae51e7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java @@ -52,6 +52,11 @@ public class IndexGroupDetailEntity extends BaseEpmetEntity { */ private String indexId; + /** + * 指标code + */ + private String indexCode; + /** * 权重(同一组权重总和=1) */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java index 20162b1198..d847f654c6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java @@ -47,6 +47,11 @@ public class IndexGroupDetailTemplateEntity extends BaseEpmetEntity { */ private String indexId; + /** + * 指标code + */ + private String indexCode; + /** * 权重(同一组权重总和=1) */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index d19fb1d628..6e747b0766 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -207,10 +207,12 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setIndexId(indexDictEntity.getId()); if (level == 5) { + templateEntity.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(index.getLevel5Index(),true)); String level5WeightStr = index.getLevel5Weight().replace("%", ""); templateEntity.setWeight(new BigDecimal(level5WeightStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); indexGroupDetailMap.put(index.getLevel5Index(), templateEntity); } else { + templateEntity.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); indexGroupDetailMap.put(indexDictEntity.getIndexName(), templateEntity); templateEntity.setWeight(new BigDecimal(index.getWeight()).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/CpcIndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/CpcIndexCalculateService.java new file mode 100644 index 0000000000..bb4bc6e397 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/CpcIndexCalculateService.java @@ -0,0 +1,18 @@ +package com.epmet.service.screen; + +import com.epmet.dto.indexcal.CalculateCommonFormDTO; + +/** + * 党员指标计算service + * + * @author liujianjun@elink-cn.com + * @date 2020/8/18 10:25 + */ +public interface CpcIndexCalculateService { + /** + * desc:计算党员相关指标 + * @param formDTO + * @return + */ + Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java new file mode 100644 index 0000000000..63a0105f28 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java @@ -0,0 +1,34 @@ +package com.epmet.service.screen.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; +import com.epmet.service.screen.CpcIndexCalculateService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +@Slf4j +@Service +public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { + @Autowired + private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; + @Override + public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) { + //计算最大最小值 + Map minAndMaxList = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); + if (CollectionUtils.isEmpty(minAndMaxList)){ + log.warn("customerId:{} have not any record",formDTO.getCustomerId()); + return false; + } + log.info(JSON.toJSONString(minAndMaxList)); + List list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); + return null; + } +} 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 92b5a882fa..115e0ae4e3 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 @@ -13,7 +13,7 @@ - + @@ -48,7 +48,7 @@ QUARTER_ID, YEAR_ID, CREATE_TOPIC_COUNT, - JOIN__TOPIC_COUNT, + JOIN_TOPIC_COUNT, SHIFT_ISSUE_COUNT, SHIFT_PROJECT_COUNT, JOIN_THREE_MEETS_COUNT, @@ -97,7 +97,7 @@ + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml new file mode 100644 index 0000000000..4186e0e155 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From c9fa62cc8b0597a71d615e72b544700aa3aa44b2 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 26 Aug 2020 18:16:44 +0800 Subject: [PATCH 170/360] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=A6=81=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E7=9A=84=E6=8C=87=E6=A0=87=E6=98=8E=E7=BB=86=E6=9D=83?= =?UTF-8?q?=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/entity/screen/IndexCodeFieldReEntity.java | 9 +++++++++ .../main/resources/mapper/screen/IndexGroupDetailDao.xml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java index 1e563a118b..7821fbe41b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java @@ -9,4 +9,13 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper=false) @TableName("index_code_field_re") public class IndexCodeFieldReEntity extends BaseEpmetEntity { + /** + * 指标code + */ + private String indexCode; + + /** + * 字段名 + */ + private String fieldId; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml index ac4ad73bd5..12eacafdd2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml @@ -5,7 +5,7 @@ \ No newline at end of file From 94f0f7716e37330a89d15830e94d0bd7e3ead9a9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 27 Aug 2020 08:58:54 +0800 Subject: [PATCH 171/360] =?UTF-8?q?getDetailListByParentCode=20sql?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/screen/IndexGroupDetailDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml index 12eacafdd2..0eeb130617 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml @@ -5,7 +5,7 @@ \ No newline at end of file From 6927d0c73b2123cc6f5a87de61108e0e31f17ee1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 27 Aug 2020 10:54:47 +0800 Subject: [PATCH 172/360] =?UTF-8?q?=E6=9C=88=E5=BA=A6=E6=8C=87=E6=95=B0?= =?UTF-8?q?=E5=88=86=E6=9E=90-=E6=9F=B1=E7=8A=B6=E5=9B=BE=20customerId?= =?UTF-8?q?=E5=86=99=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/service/screen/impl/IndexServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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/screen/impl/IndexServiceImpl.java index e106a07d45..cd7063f05e 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/screen/impl/IndexServiceImpl.java @@ -78,7 +78,11 @@ public class IndexServiceImpl implements IndexService { @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam) { - String customerId = externalAppRequestParam.getCustomerId(); + +// String customerId = externalAppRequestParam.getCustomerId(); + + // 验签关闭,customerId无法获取,暂时写死 + String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; MonthBarchartResultDTO result = new MonthBarchartResultDTO(); List serviceAbilityData = new ArrayList<>(); List partyDevAbilityData = new ArrayList<>(); From b835e8a888baef9bb5eaa38cc0aa774827379a14 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 27 Aug 2020 13:24:50 +0800 Subject: [PATCH 173/360] =?UTF-8?q?=E5=85=9A=E5=91=98=E5=88=86=E5=B8=83?= =?UTF-8?q?=E3=80=81=E7=94=A8=E6=88=B7=E5=88=86=E5=B8=83=E3=80=81=E6=9C=88?= =?UTF-8?q?=E5=BA=A6=E6=8C=87=E6=95=B0-=E6=9F=B1=E7=8A=B6=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ParymemberDistributionResultDTO.java | 2 ++ .../screen/dto/result/UserDistributionResultDTO.java | 2 ++ .../java/com/epmet/screen/dto/result/UserResultDTO.java | 2 +- .../datareport/controller/screen/IndexController.java | 4 ++-- .../datareport/dao/screen/ScreenIndexDataMonthlyDao.java | 3 +-- .../epmet/datareport/service/screen/IndexService.java | 3 +-- .../datareport/service/screen/impl/IndexServiceImpl.java | 9 ++------- .../mapper/screen/ScreenIndexDataMonthlyDao.xml | 1 - 8 files changed, 11 insertions(+), 15 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java index 397b53287b..180d6fd3c8 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.screen.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -31,6 +32,7 @@ public class ParymemberDistributionResultDTO implements Serializable { /** * 坐标区域 */ + @JsonIgnore private String areaMarks = ""; /** diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java index 15787f28ed..de772f423b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.screen.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -31,6 +32,7 @@ public class UserDistributionResultDTO implements Serializable { /** * 坐标区域 */ + @JsonIgnore private String areaMarks; /** diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java index cea3d4b7ad..592b3fd4af 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java @@ -30,7 +30,7 @@ public class UserResultDTO implements Serializable { * 当前所选组织的坐标区域 */ @JsonIgnore - private String areaMarks = ""; + private String areaMarks; /** * 机关级别 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 401ee272a9..ba4a24ec52 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 @@ -67,9 +67,9 @@ public class IndexController { */ //@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)); } /** 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/screen/ScreenIndexDataMonthlyDao.java index 2e18647c39..028fbf6142 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/screen/ScreenIndexDataMonthlyDao.java @@ -46,12 +46,11 @@ public interface ScreenIndexDataMonthlyDao{ /** * @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/service/screen/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java index 5c0b5e4ade..5f840c2369 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/screen/IndexService.java @@ -1,6 +1,5 @@ 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; @@ -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/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java index cd7063f05e..a747d93c31 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/screen/impl/IndexServiceImpl.java @@ -77,12 +77,7 @@ public class IndexServiceImpl implements IndexService { */ @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override - public MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO, ExternalAppRequestParam externalAppRequestParam) { - -// String customerId = externalAppRequestParam.getCustomerId(); - - // 验签关闭,customerId无法获取,暂时写死 - String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + public MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO) { MonthBarchartResultDTO result = new MonthBarchartResultDTO(); List serviceAbilityData = new ArrayList<>(); List partyDevAbilityData = new ArrayList<>(); @@ -91,7 +86,7 @@ public class IndexServiceImpl implements IndexService { // 1. x轴 result.setXAxis(partyMemberLeadServiceImpl.getXPro()); // 2. 查询近一年的指数值【不包括本月】 - List monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(customerId, monthBarchartFormDTO.getAgencyId()); + 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); 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..3adcde64e8 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 @@ -31,7 +31,6 @@ WHERE del_flag = '0' AND org_id = #{agencyId} - AND customer_id = #{customerId} ORDER BY MONTH_ID DESC LIMIT 12 From 5c9658ddc804dbcf035f66a5d0847b1b418ef8c6 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Thu, 27 Aug 2020 13:41:59 +0800 Subject: [PATCH 174/360] =?UTF-8?q?11=E3=80=81=E5=9F=BA=E5=B1=82=E6=B2=BB?= =?UTF-8?q?=E7=90=86-=E5=85=AC=E4=BC=97=E5=8F=82=E4=B8=8E=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=B9=B3=E5=9D=87=E7=8E=87=E8=AE=A1=E7=AE=97=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/screen/impl/ScreenCollServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 83162e601a..1411cd9c00 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 @@ -334,9 +334,10 @@ public class ScreenCollServiceImpl implements ScreenCollService { String[] lastMonth = this.lastMonthDate(); // 获取上个月的基本数据 + String moneth = lastMonth[NumConstant.ZERO] + lastMonth[NumConstant.ONE]; List lastMonthJoinList = screenUserJoinDao.selectLastMonthScreenUserJoinList(customerId, lastMonth[NumConstant.ZERO], - lastMonth[NumConstant.ONE], + moneth, orgIds); // 定义本月待添加数据的集合 From 1a0c352156e7ac5074d3318a46fb58c2a9681e2f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 27 Aug 2020 14:18:53 +0800 Subject: [PATCH 175/360] =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/screen/impl/PartyMemberLeadServiceImpl.java | 2 +- .../src/main/resources/mapper/screen/ScreenEventDataDao.xml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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/screen/impl/PartyMemberLeadServiceImpl.java index 79868496d1..c00487d080 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -158,7 +158,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { 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); 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 0b2e8698e2..a484d4549a 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 @@ -6,7 +6,7 @@ From 768eec9b7adb25138f67ce1e57da806fc3e773cc Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 27 Aug 2020 14:24:46 +0800 Subject: [PATCH 176/360] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E8=B0=83=E5=8A=A8=E7=9A=84=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/enums/RequirePermissionEnum.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java index bc4358bd93..284ef67e74 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java @@ -51,6 +51,7 @@ public enum RequirePermissionEnum { ORG_STAFF_CREATE("org_staff_create", "组织:工作人员:新增", "组织:工作人员:新增"), ORG_STAFF_UPDATE("org_staff_update", "组织:工作人员:编辑", "组织:工作人员:编辑"), ORG_STAFF_FORBIDDEN("org_staff_forbidden", "组织:工作人员:禁用", "组织:工作人员:禁用"), + ORG_STAFF_TRANSFER("org_staff_transfer", "组织:工作人员:调动", "组织:工作人员:调动"), /** * 组织-部门 From e12e6071b453173c99d3a492173dc3c12ea08ec1 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 27 Aug 2020 14:24:53 +0800 Subject: [PATCH 177/360] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=20->=E9=BB=98=E8=AE=A4=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=B8=8A=E4=B8=AA=E6=9C=88=E4=BB=A5=E5=8F=8A=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=9F=A5=E8=AF=A2=E6=88=AA=E8=87=B3=E4=B8=8A=E4=B8=AA?= =?UTF-8?q?=E6=9C=88=E7=9A=84=E6=95=B0=E6=8D=AE=EF=BC=8C=E6=94=B9=E6=88=90?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=9F=A5=E8=AF=A2=E6=9C=AC=E6=9C=88=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E9=BB=98=E8=AE=A4=E6=9F=A5=E8=AF=A2=E6=88=AA=E8=87=B3?= =?UTF-8?q?=E6=9C=AC=E6=9C=88=E7=9A=84=E6=95=B0=E6=8D=AE=EF=BC=9B=20->?= =?UTF-8?q?=E5=85=88=E8=BF=9B=E6=8E=92=E8=A1=8C=E6=A6=9C=E5=8D=95-?= =?UTF-8?q?=E5=85=88=E8=BF=9B=E7=BB=84=E7=BB=87=EF=BC=8C=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?agenyId=E6=9F=A5=E8=AF=A2=E4=B8=8B=E7=BA=A7=E6=9C=BA=E5=85=B3?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=EF=BC=8C=E5=BD=93=E5=89=8D=E6=9C=BA=E5=85=B3?= =?UTF-8?q?=E4=B8=BA=E7=A4=BE=E5=8C=BA=E6=97=B6=EF=BC=8C=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E6=8E=92=E8=A1=8C=EF=BC=9B=20->=E5=85=88?= =?UTF-8?q?=E8=BF=9B=E6=8E=92=E8=A1=8C=E6=A6=9C=E5=8D=95-=E5=85=88?= =?UTF-8?q?=E8=BF=9B=E5=85=9A=E5=91=98=EF=BC=8C=E6=9F=A5=E8=AF=A2=E6=89=80?= =?UTF-8?q?=E5=B1=9E=E6=9C=BA=E5=85=B3ORG=5FID=E4=B8=BA=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E6=9C=BA=E5=85=B3Id=E7=9A=84=E5=85=9A=E5=91=98=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=E6=83=85=E5=86=B5;=20->=E6=94=BF=E5=BA=9C=E6=B2=BB?= =?UTF-8?q?=E7=90=86=E8=83=BD=E5=8A=9B=E6=A6=9C=E5=8D=95=EF=BC=8C=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9C=AC=E6=9C=BA=E6=9C=BA=E5=85=B3=E7=9A=84=E4=B8=8B?= =?UTF-8?q?=E7=BA=A7=E6=9C=BA=E5=85=B3=EF=BC=8C=E5=BD=93=E5=89=8D=E6=9C=BA?= =?UTF-8?q?=E5=85=B3=E4=B8=BA=E7=A4=BE=E5=8C=BA=E6=97=B6=EF=BC=8C=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=BD=91=E6=A0=BC=E6=8E=92=E8=A1=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GrassRootsGovernServiceImpl.java | 4 ++-- .../impl/GrassrootsPartyDevServiceImpl.java | 7 +++++-- .../screen/impl/PartyMemberLeadServiceImpl.java | 2 +- .../com/epmet/datareport/utils/DateUtils.java | 17 +++++++++++++++-- .../mapper/screen/ScreenDifficultyDataDao.xml | 4 ++-- .../mapper/screen/ScreenGovernRankDataDao.xml | 2 +- .../mapper/screen/ScreenOrgRankDataDao.xml | 2 +- .../screen/ScreenPartyUserRankDataDao.xml | 4 ++-- 8 files changed, 29 insertions(+), 13 deletions(-) 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 2dd8233800..f798d5047e 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 @@ -104,7 +104,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { @Override public PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param) { - String monthId = dateUtils.getPreviousMonthId(); + String monthId = dateUtils.getCurrentMonthId(); UserJoinIndicatorGrowthRateResultDTO latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId); if(null == latest) return new PublicPartiProfileResultDTO(); PublicPartiProfileResultDTO result = ConvertUtils.sourceToTarget(latest,PublicPartiProfileResultDTO.class); @@ -154,7 +154,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX); PageHelper.startPage(NumConstant.ONE,param.getTopNum()); List orderList = - screenGovernRankDataDao.selectGovernCapacityRatio(dateUtils.getPreviousMonthId(),param.getAgencyId()); + screenGovernRankDataDao.selectGovernCapacityRatio(dateUtils.getCurrentMonthId(),param.getAgencyId()); if(null == orderList || orderList.isEmpty()) return new ArrayList<>(); List result = new LinkedList<>(); orderList.forEach(o -> { 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 3cbb95a0db..aa1b23a448 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 @@ -7,6 +7,7 @@ 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.DateUtils; import com.epmet.datareport.utils.ModuleConstant; import com.epmet.screen.dto.form.BranchBuildRankFormDTO; import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; @@ -42,6 +43,8 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService private ScreenCpcBaseDataDao screenCpcBaseDataDao; @Autowired private ScreenPartyBranchDataDao screenPartyBranchDataDao; + @Autowired + private DateUtils dateUtils; /** * @Description 1、党员基本情况-饼状图概况 @@ -178,7 +181,7 @@ 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()); @@ -215,7 +218,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); 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 = format.format(calendar.getTime()); Integer monthCounter = Integer.parseInt(currentMonth); Map monthMap = new HashMap<>(); 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/screen/impl/PartyMemberLeadServiceImpl.java index 79868496d1..8580503f88 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -184,7 +184,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { } PageHelper.startPage(NumConstant.ONE,param.getTopNum()); List gridData = - screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),dateUtils.getPreviousMonthId()); + screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),dateUtils.getCurrentMonthId()); List result = new LinkedList<>(); if(null == gridData || gridData.isEmpty()) return result; gridData.forEach( data -> { 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/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index 77f6fb0108..8b98c54ebe 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 @@ -7,9 +7,9 @@ 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 a484d4549a..750439bb3e 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 @@ -16,8 +16,7 @@ screen_event_data WHERE del_flag = '0' - AND parent_id = #{parentId} - AND all_parent_ids LIKE concat('%', #{agencyId}, '%') + AND all_parent_ids LIKE concat('%', #{parentId}, '%') From b5adf11f74ad60e8446c0db44202ba3918912d04 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 27 Aug 2020 14:57:42 +0800 Subject: [PATCH 179/360] =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=80=BC=E6=9C=80?= =?UTF-8?q?=E5=B0=8F=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcal/PageQueryGridFormDTO.java | 33 +++ .../FactIndexGovrnAblityGridMonthlyDTO.java | 142 ++++++++++++ .../FactIndexPartyAblityGridMonthlyDTO.java | 167 ++++++++++++++ .../FactIndexServiceAblityGridMonthlyDTO.java | 117 ++++++++++ .../data-statistical-server/pom.xml | 2 +- .../FactIndexGovrnAblityGridMonthlyDao.java | 21 ++ .../FactIndexPartyAblityGridMonthlyDao.java | 22 ++ .../FactIndexServiceAblityGridMonthlyDao.java | 22 ++ .../dao/screen/ScreenCustomerGridDao.java | 10 + .../indexcal/GridCorreLationService.java | 24 ++ .../impl/GridCorreLationServiceImpl.java | 210 +++++++++++++++++- .../FactIndexGovrnAblityGridMonthlyDao.xml | 51 +++++ .../FactIndexPartyAblityGridMonthlyDao.xml | 68 ++++++ .../FactIndexServiceAblityGridMonthlyDao.xml | 37 +++ .../mapper/screen/ScreenCustomerGridDao.xml | 15 ++ 15 files changed, 933 insertions(+), 8 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexGovrnAblityGridMonthlyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexPartyAblityGridMonthlyDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexServiceAblityGridMonthlyDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java new file mode 100644 index 0000000000..51f5244294 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import javax.validation.constraints.Min; +import java.io.Serializable; + +/** + * 分页查询网格列表 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/27 14:37 + */ +@Data +public class PageQueryGridFormDTO implements Serializable { + /** + * 客户id + */ + private String customerId; + + /** + * 页码 + * */ + @Min(1) + private Integer pageNo; + + /** + * 每页多少条 + * */ + private Integer pageSize = 10; + + private Integer pageIndex; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexGovrnAblityGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexGovrnAblityGridMonthlyDTO.java new file mode 100644 index 0000000000..80ec8c7100 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexGovrnAblityGridMonthlyDTO.java @@ -0,0 +1,142 @@ +/** + * 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.dto.indexcollect; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 治理能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-26 + */ +@Data +public class FactIndexGovrnAblityGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格所属机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id:yyyy + */ + private String yearId; + + /** + * 网格总议题数 + */ + private Integer issueTotal; + + /** + * 网格人均议题数目 + */ + private Integer avgIssueCount; + + /** + * 网格议题转项目率 + */ + private BigDecimal avgShiftProjectRatio; + + /** + * 网格总项目数 + */ + private Integer projectTotal; + + /** + * 网格自治项目数 统计期网格自身内办结的项目数目 + */ + private Integer selfSolveProjectCount; + + /** + * 网格办结项目数 统计期内办结的项目数目 + */ + private Integer resolveProjectCount; + + /** + * 网格吹哨部门准确率 + */ + private BigDecimal transferRightRatio; + + /** + * 网格内解决的项目的满意度 + */ + private BigDecimal satisfactionRatio; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexPartyAblityGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexPartyAblityGridMonthlyDTO.java new file mode 100644 index 0000000000..901ff46b9e --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexPartyAblityGridMonthlyDTO.java @@ -0,0 +1,167 @@ +/** + * 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.dto.indexcollect; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 党建能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-26 + */ +@Data +public class FactIndexPartyAblityGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Idyyyy + */ + private String yearId; + + /** + * 网格群众用户数 + */ + private Integer userCount; + + /** + * 网格党员用户数 + */ + private Integer partyCount; + + /** + * 网格活跃群众用户数 + */ + private Integer activeUserCount; + + /** + * 网格活跃党员用户数 + */ + private Integer activePartyCount; + + /** + * 网格党员人均提出话题数 + */ + private Integer partyAvgTopicCount; + + /** + * 网格群众人均提出话题数 + */ + private Integer userAvgTopicCount; + + /** + * 网格党员人均提出的议题转项目数 + */ + private Integer partyAvgShiftProjectCount; + + /** + * 网格群众人均提出的议题转项目数 + */ + private Integer userAvgShiftProjectCount; + + /** + * 建群党员数(累计值) 去重 + */ + private Integer createGroupPartyCount; + + /** + * 网格发文数 + */ + private Integer publishArticleCount; + + /** + * 网格议题转项目率 + */ + private BigDecimal issueToProjectRatio; + + /** + * 组织三会一课次数 + */ + private Integer createThreeMeetsCount; + + /** + * 党员参加三会一课人次 + */ + private Integer joinThreeMeetsCount; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexServiceAblityGridMonthlyDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexServiceAblityGridMonthlyDTO.java new file mode 100644 index 0000000000..decd896d03 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/FactIndexServiceAblityGridMonthlyDTO.java @@ -0,0 +1,117 @@ +/** + * 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.dto.indexcollect; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 服务能力-网格相关事实表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-26 + */ +@Data +public class FactIndexServiceAblityGridMonthlyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格所属组织Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id:yyyyMM + */ + private String monthId; + + /** + * 季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4 + */ + private String quarterId; + + /** + * 年Id: yyyy + */ + private String yearId; + + /** + * 网格活动组织次数 爱心活动 + */ + private Integer activityCount; + + /** + * 网格志愿者占比 + */ + private BigDecimal volunteerRatio; + + /** + * 网格党员志愿者率 + */ + private BigDecimal partyVolunteerRatio; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 8d0e953c05..a805e4a53c 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -195,7 +195,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index e591ba928d..11cb3fbe03 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -24,6 +24,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 治理能力-网格相关事实表 @@ -64,4 +65,24 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao list, @Param("customerId")String customerId); + + /** + * @param customerId 客户id + * @param monthId yyyyMM + * @return java.util.List + * @author yinzuomei + * @description 当前客户下,所有网格的治理能力相关五级指标 + * @Date 2020/8/26 15:58 + **/ + List> selectListGovrnAblityGrid(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @return java.util.Map + * @param customerId + * @param monthId + * @author yinzuomei + * @description 查询治理能力,网格相关,各五级指标最大值,最小值 + * @Date 2020/8/27 13:10 + **/ + Map selectGovrnAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index b5cb8d2c5e..0aff70aece 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -18,12 +18,14 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 党建能力-网格相关事实表 @@ -64,4 +66,24 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao list, @Param("customerId")String customerId); + + /** + * @param customerId 客户id + * @param monthId yyyyMM + * @return java.util.List + * @author yinzuomei + * @description 当前客户下,所有网格的党建能力相关五级指标 + * @Date 2020/8/26 15:57 + **/ + List> selectListPartyAblityGrid(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @return java.util.Map + * @param customerId + * @param monthId + * @author yinzuomei + * @description 查询党建能力,网格相关,各五级指标最大值,最小值 + * @Date 2020/8/27 12:51 + **/ + Map selectPartyAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java index 9eb7051762..a2b2eb78f8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -18,12 +18,14 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 服务能力-网格相关事实表 @@ -63,4 +65,24 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao list, @Param("customerId")String customerId); + + /** + * @return java.util.List + * @param customerId + * @param monthId + * @author yinzuomei + * @description 当前客户下,所有网格的治理能力相关五级指标 + * @Date 2020/8/26 15:59 + **/ + List> selectListServiceAblityGrid(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @return java.util.Map + * @param customerId + * @param monthId + * @author yinzuomei + * @description 查询 服务能力,网格相关,各五级指标最大值,最小值 + * @Date 2020/8/27 13:15 + **/ + Map selectServiceAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java index 60f5a64ef4..dfb0d95a84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java @@ -19,6 +19,7 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ScreenCustomerGridDTO; +import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.screencoll.form.CustomerGridFormDTO; import com.epmet.entity.screen.ScreenCustomerGridEntity; import org.apache.ibatis.annotations.Mapper; @@ -74,4 +75,13 @@ public interface ScreenCustomerGridDao extends BaseDao * @Date 2020/8/26 15:33 **/ List selectListByCustomerId(@Param("customerId")String customerId); + + /** + * @return java.util.List + * @param formDTO + * @author yinzuomei + * @description 分页查询网格列表 + * @Date 2020/8/27 14:42 + **/ + List pageListByCustomerId(PageQueryGridFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java index 7b7905a535..225ae2bb80 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java @@ -1,7 +1,12 @@ package com.epmet.service.indexcal; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.dto.indexcal.PageQueryGridFormDTO; + +import java.util.List; +import java.util.Map; /** * 网格相关指标计算 @@ -19,4 +24,23 @@ public interface GridCorreLationService { * @Date 2020/8/26 10:51 **/ Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO); + + /** + * @return java.util.List> + * @param customerId + * @param monthId + * @author yinzuomei + * @description 党建能力-网格相关事实表 当前客户下,所有网格的党建能力相关五级指标 + * @Date 2020/8/27 14:48 + **/ + List> queryListPartyAblityGrid(String customerId, String monthId); + + /** + * @return java.util.List + * @param formDTO + * @author yinzuomei + * @description 分页查询网格列表 + * @Date 2020/8/27 14:48 + **/ + List pageGridList(PageQueryGridFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index a192fafc6a..96b82127c6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,6 +1,6 @@ package com.epmet.service.indexcal.impl; -import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; @@ -8,12 +8,23 @@ import com.epmet.dao.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CustomerGridInfoDTO; +import com.epmet.dto.indexcal.PageQueryGridFormDTO; +import com.epmet.dto.indexcollect.FactIndexGovrnAblityGridMonthlyDTO; +import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO; +import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; +import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; import com.epmet.service.indexcal.GridCorreLationService; -import io.swagger.annotations.Authorization; +import com.epmet.service.screen.IndexGroupDetailService; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; /** * 网格相关service @@ -32,7 +43,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; @Autowired private ScreenCustomerGridDao screenCustomerGridDao; - + @Autowired + private IndexGroupDetailService indexGroupDetailService; /** * @param formDTO @@ -43,22 +55,206 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ @Override public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) { - return true; + boolean resultFlag = false; + List dangJianNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), + IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if(!CollectionUtils.isEmpty(dangJianNengLiList)){ + //1、计算网格相关-党建能力 + calculateGridCorreLationDangJian(formDTO,dangJianNengLiList); + } + List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if(!CollectionUtils.isEmpty(zhiLiNengLiList)){ + //2、计算网格相关-治理能力 + calculateGridCorreLationZhiLi(formDTO,zhiLiNengLiList); + } + List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), + IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if(!CollectionUtils.isEmpty(fuWuNengLiList)){ + //3、计算网格相关-服务能力 + calculateGridCorreLationFuWu(formDTO,fuWuNengLiList); + } + //计算网格相关总分 + List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); + if(!CollectionUtils.isEmpty(wgxgList)){ + calculateGridCorreLationTotal(formDTO,wgxgList); + } + resultFlag = true; + return resultFlag; + } + + /** + * @return void + * @param formDTO + * @param indexList + * @author yinzuomei + * @description 计算网格相关-党建能力 + * @Date 2020/8/26 16:47 + **/ + private void calculateGridCorreLationDangJian(CalculateCommonFormDTO formDTO,List indexList){ + //分页查询网格列表 + //查询五级指标 + + } + + /** + * @return void + * @param formDTO + * @param indexList + * @author yinzuomei + * @description 计算网格相关-治理能力 + * @Date 2020/8/26 16:47 + **/ + private void calculateGridCorreLationZhiLi(CalculateCommonFormDTO formDTO,List indexList){ + + } + + /** + * @return void + * @param formDTO + * @param indexList + * @author yinzuomei + * @description 计算网格相关-服务能力 + * @Date 2020/8/26 16:48 + **/ + private void calculateGridCorreLationFuWu(CalculateCommonFormDTO formDTO,List indexList){ + + } + + /** + * @return void + * @param formDTO + * @param indexList + * @author yinzuomei + * @description 计算网格相关总分 + * @Date 2020/8/26 16:50 + **/ + private void calculateGridCorreLationTotal(CalculateCommonFormDTO formDTO,List indexList){ + } /** - * @return com.epmet.dto.indexcal.CustomerGridInfoDTO * @param customerId + * @return com.epmet.dto.indexcal.CustomerGridInfoDTO * @author yinzuomei * @description 查询客户下网格信息 * @Date 2020/8/26 15:37 **/ - public CustomerGridInfoDTO queryCustomerGridInfo(String customerId){ - CustomerGridInfoDTO customerGridInfoDTO=new CustomerGridInfoDTO(); + public CustomerGridInfoDTO queryCustomerGridInfo(String customerId) { + CustomerGridInfoDTO customerGridInfoDTO = new CustomerGridInfoDTO(); customerGridInfoDTO.setTotal(screenCustomerGridDao.selectCountByCustomerId(customerId)); customerGridInfoDTO.setGridList(screenCustomerGridDao.selectListByCustomerId(customerId)); return customerGridInfoDTO; } + + /** + * @return + * @param formDTO + * @author yinzuomei + * @description 分页查询网格列表 + * @Date 2020/8/27 14:42 + **/ + public List pageGridList(PageQueryGridFormDTO formDTO){ + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageIndex(pageIndex); + return screenCustomerGridDao.pageListByCustomerId(formDTO); + } + + + /** + * @param customerId + * @param monthId + * @return java.util.List + * @author yinzuomei + * @description 党建能力-网格相关事实表 当前客户下,所有网格的党建能力相关五级指标 + * @Date 2020/8/26 15:52 + **/ + @Override + public List> queryListPartyAblityGrid(String customerId, String monthId) { + return factIndexPartyAblityGridMonthlyDao.selectListPartyAblityGrid(customerId, monthId); + } + + /*网格群众用户数 + 网格党员用户数 + 网格活跃群众用户数 + 网格活跃党员用户数 + 网格党员人均提出话题数 + 网格群众人均提出话题数 + 网格党员人均提出的议题转项目数 + 网格群众人均提出的议题转项目数 + 建群党员数 + 组织内党员的联系群众能力考评分(平均值) + 网格的发文数量 + 网格议题转项目率 + 组织“三会一课”次数 + 党员参加“三会一课”人次*/ + /** + * @return java.util.Map + * @param customerId + * @param monthId + * @author yinzuomei + * @description 查询党建能力,网格相关,各五级指标最大值,最小值 + * @Date 2020/8/27 12:47 + **/ + public Map queryPartyAblityGridMinAndMax(String customerId, String monthId){ + return factIndexPartyAblityGridMonthlyDao.selectPartyAblityGridMinAndMax(customerId,monthId); + } + + + /** + * @param customerId + * @param monthId + * @return java.util.List + * @author yinzuomei + * @description 当前客户下,所有网格的治理能力相关五级指标 + * @Date 2020/8/26 15:55 + **/ + public List> queryListGovrnAblityGrid(String customerId, String monthId) { + return factIndexGovrnAblityGridMonthlyDao.selectListGovrnAblityGrid(customerId, monthId); + } + + + /** + * @param customerId + * @param monthId + * @return java.util.Map + * @author yinzuomei + * @description 查询治理能力,网格相关,各五级指标最大值,最小值 + * @Date 2020/8/27 12:48 + **/ + public Map queryGovrnAblityGridMinAndMax(String customerId, String monthId) { + return factIndexGovrnAblityGridMonthlyDao.selectGovrnAblityGridMinAndMax(customerId, monthId); + } + + /** + * @param customerId + * @param monthId + * @return java.util.List + * @author yinzuomei + * @description 当前客户下,所有网格的服务能力相关五级指标 + * @Date 2020/8/26 15:55 + **/ + public List> queryListServiceAblityGrid(String customerId, String monthId) { + return factIndexServiceAblityGridMonthlyDao.selectListServiceAblityGrid(customerId, monthId); + } + + /** + * @return java.util.Map + * @param customerId + * @param monthId + * @author yinzuomei + * @description 查询 服务能力,网格相关,各五级指标最大值,最小值 + * @Date 2020/8/27 12:50 + **/ + public Map queryServiceAblityGridMinAndMax(String customerId, String monthId) { + return factIndexServiceAblityGridMonthlyDao.selectServiceAblityGridMinAndMax(customerId, monthId); + } + + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml index ed0f65cc79..504ed412e1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -85,4 +85,55 @@ + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml index e51a7d4f7f..e0ca717e07 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml @@ -99,4 +99,72 @@ ) + + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml index bc4348ea56..fb3c488e9e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml @@ -69,4 +69,41 @@ ) + + + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 1cf2922cd9..a5bee6054f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -77,4 +77,19 @@ m.DEL_FLAG = '0' AND m.CUSTOMER_ID = #{customerId} + + + From f0807beb94b65a3340ee251147c601ce69a926b4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 27 Aug 2020 14:58:42 +0800 Subject: [PATCH 180/360] =?UTF-8?q?=E6=89=93=E5=BC=80nacos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index a805e4a53c..8d0e953c05 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -195,7 +195,7 @@ 6379 123456 - false + true 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 From 9233c82076d3b0300275580c9c60e3f386ae27ee Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 27 Aug 2020 15:10:39 +0800 Subject: [PATCH 181/360] staffGridVisited --- .../com/epmet/dao/StaffGridVisitedDao.java | 9 +++++++++ .../resources/mapper/StaffGridVisitedDao.xml | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffGridVisitedDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffGridVisitedDao.java index 6869f1a5bf..38a2781abb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffGridVisitedDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffGridVisitedDao.java @@ -41,4 +41,13 @@ public interface StaffGridVisitedDao extends BaseDao { **/ String selectStaffLatestGrid(LatestGridFormDTO latestGridFormDTO); + /** + * @Description 根据staffId和customerId查询当前用户上一次登陆的网格信息 + * @param latestGridFormDTO + * @return StaffGridVisitedEntity + * @author wangc + * @date 2020.08.27 15:05 + **/ + StaffGridVisitedEntity selectVistedRecordByStaffId(LatestGridFormDTO latestGridFormDTO); + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffGridVisitedDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffGridVisitedDao.xml index 73978e23f3..8c84188b9f 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffGridVisitedDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffGridVisitedDao.xml @@ -33,4 +33,22 @@ LIMIT 1 + + \ No newline at end of file From e04900df19da478d1004b066336f10d4e9d05f91 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 27 Aug 2020 15:13:48 +0800 Subject: [PATCH 182/360] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E8=B5=8C=E7=82=B9?= =?UTF-8?q?=EF=BC=8C=E6=80=BB=E5=85=B1=E8=80=97=E6=97=B6=E6=8D=A2=E7=AE=97?= =?UTF-8?q?=E6=88=90=E5=B0=8F=E6=97=B6=E8=88=8D=E5=BC=83=E7=B2=BE=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenDifficultyDataDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8b98c54ebe..7d166fc31f 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 @@ -9,7 +9,7 @@ diff.EVENT_ID AS projectId, diff.EVENT_CONTENT AS title, diff.EVENT_STATUS_CODE AS STATUS, - FORMAT(diff.EVENT_COST_TIME/60,2) AS totalHours, + FORMAT(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, From 585e640f969b2269288ecaa719f11fa6ed744ed0 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 27 Aug 2020 15:24:32 +0800 Subject: [PATCH 183/360] =?UTF-8?q?=E5=85=88=E8=BF=9B=E6=94=AF=E9=83=A8?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=20=E5=8F=AA=E5=8F=96=E7=BD=91=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenDifficultyDataDao.xml | 2 +- .../src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 7d166fc31f..630befedcd 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 @@ -9,7 +9,7 @@ diff.EVENT_ID AS projectId, diff.EVENT_CONTENT AS title, diff.EVENT_STATUS_CODE AS STATUS, - FORMAT(diff.EVENT_COST_TIME/60,0) 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, 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 619d47ae48..3d6719522e 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 @@ -17,6 +17,7 @@ screen_org_rank_data WHERE DEL_FLAG = '0' + AND ORG_TYPE = 'grid' AND PARENT_ID = #{agencyId} AND MONTH_ID = #{monthId} ORDER BY From 8f01c746b920ea78f109cfeb2b0fa02d81241162 Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 27 Aug 2020 15:39:03 +0800 Subject: [PATCH 184/360] =?UTF-8?q?=E5=85=88=E8=BF=9B=E6=8E=92=E8=A1=8C=20?= =?UTF-8?q?=E5=85=9A=E5=91=98=E3=80=81=E6=94=AF=E9=83=A8=20=20=20=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=9F=A5=E8=AF=A2=E6=89=80=E6=9C=89=E4=B8=8B=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml | 2 +- .../main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 3d6719522e..97292b4797 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 @@ -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/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 8c6354bd54..80aee4ece5 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 @@ -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 From ce18a79262db121333588f9fb704f5419fbc1409 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 27 Aug 2020 16:06:46 +0800 Subject: [PATCH 185/360] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E8=B0=83=E5=8A=A8=E8=AE=B0=E5=BD=95=E8=A1=A8=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/StaffTransferRecordDTO.java | 101 +++++++++++++++++ .../StaffTransferRecordController.java | 94 ++++++++++++++++ .../com/epmet/dao/StaffTransferRecordDao.java | 33 ++++++ .../entity/StaffTransferRecordEntity.java | 71 ++++++++++++ .../epmet/excel/StaffTransferRecordExcel.java | 74 +++++++++++++ .../epmet/redis/StaffTransferRecordRedis.java | 47 ++++++++ .../service/StaffTransferRecordService.java | 95 ++++++++++++++++ .../impl/StaffTransferRecordServiceImpl.java | 104 ++++++++++++++++++ .../V0.0.2__staff_transfer_record.sql | 16 +++ .../mapper/StaffTransferRecordDao.xml | 8 ++ 10 files changed, 643 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/StaffTransferRecordDTO.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffTransferRecordController.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/StaffTransferRecordDao.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/StaffTransferRecordEntity.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/StaffTransferRecordExcel.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/StaffTransferRecordRedis.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffTransferRecordService.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffTransferRecordServiceImpl.java create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.2__staff_transfer_record.sql create mode 100644 epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffTransferRecordDao.xml diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/StaffTransferRecordDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/StaffTransferRecordDTO.java new file mode 100644 index 0000000000..79899e2e05 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/StaffTransferRecordDTO.java @@ -0,0 +1,101 @@ +/** + * 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.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 工作人员调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Data +public class StaffTransferRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 调动人员Id(操作人) + */ + private String operateStaffId; + + /** + * 被调动人员Id + */ + private String operatedStaffId; + + /** + * 调动前组织Id + */ + private String oldAgencyId; + + /** + * 调动后组织Id + */ + private String agencyId; + + /** + * 备注说明 + */ + private String remarks; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffTransferRecordController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffTransferRecordController.java new file mode 100644 index 0000000000..4cd9ea0e05 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffTransferRecordController.java @@ -0,0 +1,94 @@ +/** + * 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.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.StaffTransferRecordDTO; +import com.epmet.excel.StaffTransferRecordExcel; +import com.epmet.service.StaffTransferRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 工作人员调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@RestController +@RequestMapping("stafftransferrecord") +public class StaffTransferRecordController { + + @Autowired + private StaffTransferRecordService staffTransferRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = staffTransferRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + StaffTransferRecordDTO data = staffTransferRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody StaffTransferRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + staffTransferRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody StaffTransferRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + staffTransferRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + staffTransferRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = staffTransferRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, StaffTransferRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/StaffTransferRecordDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/StaffTransferRecordDao.java new file mode 100644 index 0000000000..73b5217498 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/StaffTransferRecordDao.java @@ -0,0 +1,33 @@ +/** + * 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; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.StaffTransferRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工作人员调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Mapper +public interface StaffTransferRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/StaffTransferRecordEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/StaffTransferRecordEntity.java new file mode 100644 index 0000000000..b52c91c45e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/StaffTransferRecordEntity.java @@ -0,0 +1,71 @@ +/** + * 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; + +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-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("staff_transfer_record") +public class StaffTransferRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 调动人员Id(操作人) + */ + private String operateStaffId; + + /** + * 被调动人员Id + */ + private String operatedStaffId; + + /** + * 调动前组织Id + */ + private String oldAgencyId; + + /** + * 调动后组织Id + */ + private String agencyId; + + /** + * 备注说明 + */ + private String remarks; + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/StaffTransferRecordExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/StaffTransferRecordExcel.java new file mode 100644 index 0000000000..6729be83f9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/StaffTransferRecordExcel.java @@ -0,0 +1,74 @@ +/** + * 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.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 工作人员调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Data +public class StaffTransferRecordExcel { + + @Excel(name = "ID") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "调动人员Id(操作人)") + private String operateStaffId; + + @Excel(name = "被调动人员Id") + private String operatedStaffId; + + @Excel(name = "调动前组织Id") + private String oldAgencyId; + + @Excel(name = "调动后组织Id") + private String agencyId; + + @Excel(name = "备注说明") + private String remarks; + + @Excel(name = "删除标识") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/StaffTransferRecordRedis.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/StaffTransferRecordRedis.java new file mode 100644 index 0000000000..deb0f9f76a --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/StaffTransferRecordRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 工作人员调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Component +public class StaffTransferRecordRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffTransferRecordService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffTransferRecordService.java new file mode 100644 index 0000000000..8f326cdb27 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffTransferRecordService.java @@ -0,0 +1,95 @@ +/** + * 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.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.StaffTransferRecordDTO; +import com.epmet.entity.StaffTransferRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 工作人员调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +public interface StaffTransferRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-08-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-08-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return StaffTransferRecordDTO + * @author generator + * @date 2020-08-27 + */ + StaffTransferRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-08-27 + */ + void save(StaffTransferRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-08-27 + */ + void update(StaffTransferRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-08-27 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffTransferRecordServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffTransferRecordServiceImpl.java new file mode 100644 index 0000000000..6ef500a018 --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffTransferRecordServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.StaffTransferRecordDao; +import com.epmet.dto.StaffTransferRecordDTO; +import com.epmet.entity.StaffTransferRecordEntity; +import com.epmet.redis.StaffTransferRecordRedis; +import com.epmet.service.StaffTransferRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 工作人员调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Service +public class StaffTransferRecordServiceImpl extends BaseServiceImpl implements StaffTransferRecordService { + + @Autowired + private StaffTransferRecordRedis staffTransferRecordRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, StaffTransferRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, StaffTransferRecordDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public StaffTransferRecordDTO get(String id) { + StaffTransferRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, StaffTransferRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(StaffTransferRecordDTO dto) { + StaffTransferRecordEntity entity = ConvertUtils.sourceToTarget(dto, StaffTransferRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(StaffTransferRecordDTO dto) { + StaffTransferRecordEntity entity = ConvertUtils.sourceToTarget(dto, StaffTransferRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.2__staff_transfer_record.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.2__staff_transfer_record.sql new file mode 100644 index 0000000000..3b447e519e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.2__staff_transfer_record.sql @@ -0,0 +1,16 @@ +CREATE TABLE `staff_transfer_record` ( + `ID` varchar(64) NOT NULL COMMENT 'ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `OPERATE_STAFF_ID` varchar(64) NOT NULL COMMENT '调动人员Id(操作人)', + `OPERATED_STAFF_ID` varchar(64) NOT NULL COMMENT '被调动人员Id', + `OLD_AGENCY_ID` varchar(64) NOT NULL COMMENT '调动前组织Id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '调动后组织Id', + `REMARKS` varchar(255) DEFAULT NULL COMMENT '备注说明', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', + `REVISION` int(10) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='工作人员调动记录表'; \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffTransferRecordDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffTransferRecordDao.xml new file mode 100644 index 0000000000..7a9e787e1c --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffTransferRecordDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 1762cb64d6b73a5eb623f0cecf535d2460a3088a Mon Sep 17 00:00:00 2001 From: wangchao Date: Thu, 27 Aug 2020 17:19:07 +0800 Subject: [PATCH 186/360] getStaffLasrGridVisitedId --- .../service/impl/StaffAgencyServiceImpl.java | 8 ++++ .../com/epmet/dao/StaffGridVisitedDao.java | 16 +++++++- .../impl/StaffGridVisitedServiceImpl.java | 24 ++++++++++-- .../resources/mapper/StaffGridVisitedDao.xml | 39 ++++++++++++------- 4 files changed, 68 insertions(+), 19 deletions(-) diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java index de87b9eea4..6c42e6e7dc 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java +++ b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/StaffAgencyServiceImpl.java @@ -220,6 +220,14 @@ public class StaffAgencyServiceImpl implements StaffAgencyService { Result staffGridResult = govOrgFeignClient.getStaffGrid(latestGridFormDTO); if (staffGridResult.success() && null != staffGridResult.getData() && StringUtils.isNotBlank(staffGridResult.getData().getGridId())) { + StaffGridVisitedFormDTO gridRecordParam = new StaffGridVisitedFormDTO(); + gridRecordParam.setGridId(staffGridResult.getData().getGridId()); + gridRecordParam.setCustomerId(latestGridFormDTO.getCustomerId()); + gridRecordParam.setStaffId(latestGridFormDTO.getStaffId()); + Result writeRecordResult = epmetUserFeignClient.saveStaffGridVisitedRecord(gridRecordParam); + if(writeRecordResult.success()){ + logger.warn("com.epmet.service.impl.StaffAgencyServiceImpl.getLatestGrid,工作人员网格访问网格写入失败,staffId:{},gridId:{}",latestGridFormDTO.getStaffId(),staffGridResult.getData().getGridId()); + } return staffGridResult; } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffGridVisitedDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffGridVisitedDao.java index 38a2781abb..554da4a12d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffGridVisitedDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffGridVisitedDao.java @@ -23,6 +23,8 @@ import com.epmet.dto.form.LatestGridFormDTO; import com.epmet.entity.StaffGridVisitedEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.Date; + /** * 工作人员进入网格日志表 * @@ -42,12 +44,22 @@ public interface StaffGridVisitedDao extends BaseDao { String selectStaffLatestGrid(LatestGridFormDTO latestGridFormDTO); /** - * @Description 根据staffId和customerId查询当前用户上一次登陆的网格信息 + * @Description 根据staffId和customerId查询当前用户上一次登陆的网格Id,Id,创建时间 * @param latestGridFormDTO * @return StaffGridVisitedEntity * @author wangc * @date 2020.08.27 15:05 **/ - StaffGridVisitedEntity selectVistedRecordByStaffId(LatestGridFormDTO latestGridFormDTO); + StaffGridVisitedEntity selectVisitedRecordByStaffId(LatestGridFormDTO latestGridFormDTO); + + /** + * @Description 更新工作人员网格登陆记录的时间 + * @param id + * @param date + * @return + * @author wangc + * @date 2020.08.27 16:28 + **/ + void updateRecordTime(String id, Date date); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffGridVisitedServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffGridVisitedServiceImpl.java index 5b0ab6bf60..d76e08c884 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffGridVisitedServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffGridVisitedServiceImpl.java @@ -43,9 +43,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; /** * 工作人员进入网格日志表 @@ -124,10 +122,28 @@ public class StaffGridVisitedServiceImpl extends BaseServiceImpl getStaffLatestGrid(LatestGridFormDTO latestGridFormDTO) { + Calendar currentCal = Calendar.getInstance(); + currentCal.setTime(new Date()); CustomerGridByUserIdResultDTO gridResult = new CustomerGridByUserIdResultDTO(); - String gridId = baseDao.selectStaffLatestGrid(latestGridFormDTO); + StaffGridVisitedEntity recordEntity = baseDao.selectVisitedRecordByStaffId(latestGridFormDTO); + String gridId = null == recordEntity ? null : recordEntity.getGridId(); if(StringUtils.isNotBlank(gridId)){ + Calendar recordCal = Calendar.getInstance(); + recordCal.setTime(recordEntity.getCreatedTime()); + if(currentCal.get(Calendar.YEAR) == recordCal.get(Calendar.YEAR) && + currentCal.get(Calendar.DAY_OF_YEAR) == recordCal.get(Calendar.DAY_OF_YEAR) + && StringUtils.isNotBlank(recordEntity.getId())){ + //同一天 更新 + baseDao.updateRecordTime(recordEntity.getId(),currentCal.getTime()); + }else{ + //非同一天 新增 + recordEntity.setCustomerId(latestGridFormDTO.getCustomerId()); + recordEntity.setStaffId(latestGridFormDTO.getStaffId()); + recordEntity.setId(null); + recordEntity.setCreatedTime(null); + baseDao.insert(recordEntity); + } CustomerGridFormDTO param = new CustomerGridFormDTO(); param.setGridId(gridId); Result gridInfoResult = diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffGridVisitedDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffGridVisitedDao.xml index 8c84188b9f..8805ed9dab 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffGridVisitedDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffGridVisitedDao.xml @@ -33,22 +33,35 @@ LIMIT 1 - - SELECT - ID, - GRID_ID, - CREATED_TIME + ID, + GRID_ID, + CREATED_TIME FROM - STAFF_GRID_VISITED + STAFF_GRID_VISITED WHERE - DEL_FLAG = '0' - AND - CUSTOMER_ID = #{customerId} - AND - STAFF_ID = #{staffId} + DEL_FLAG = '0' + AND CUSTOMER_ID = #{customerId} + + AND STAFF_ID = #{staffId} + ORDER BY - CREATED_TIME DESC - LIMIT 1 + CREATED_TIME DESC + LIMIT 1 + + + + UPDATE + STAFF_GRID_VISITED + SET + CREATED_TIME = #{date}, + UPDATED_TIME = #{date} + WHERE + DEL_FLAG = '0' + AND + ID = #{id} + \ No newline at end of file From 6e4a7dff4149be933ff98f751833422b278461e0 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 27 Aug 2020 17:19:44 +0800 Subject: [PATCH 187/360] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=8C=87=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/screen/IndexGroupDao.java | 4 - .../epmet/model/IndexExcelDataListener.java | 92 +++++++++++-------- .../impl/CpcIndexCalculateServiceImpl.java | 17 +++- .../screen/impl/IndexGroupServiceImpl.java | 40 +++++++- .../java/com/epmet/util/Pinyin4jUtil.java | 32 ++++++- .../FactIndexPartyAblityCpcMonthlyDao.xml | 36 ++++---- .../mapper/screen/IndexGroupDetailDao.xml | 8 +- .../screen/IndexGroupDetailTemplateDao.xml | 2 +- 8 files changed, 161 insertions(+), 70 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java index c873ffdb0b..5458720940 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java @@ -21,8 +21,6 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.screen.IndexGroupEntity; import org.apache.ibatis.annotations.Mapper; -import java.util.List; - /** * 客户指标分组 * @@ -33,6 +31,4 @@ import java.util.List; public interface IndexGroupDao extends BaseDao { int inertGroupFromTable(String customerId); - - List getDetailByCode(String indexCode, Integer offset); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 6e747b0766..a4993cf00b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -112,85 +112,109 @@ public class IndexExcelDataListener extends AnalysisEventListener { List collect = indexModelList.stream().sorted(Comparator.comparing(IndexModel::getLevel1Index)).collect(Collectors.toList()); collect.forEach(index -> { if (index.getLevel1Index().equals("党员相关")) { + IndexDictEntity indexDictEntity = indexDicMap.get(index.getLevel1Index()); - String level1GroupId = UniqueIdGenerator.generate(); IndexGroupTemplateEntity group1 = indexGroupMap.get(index.getLevel1Index()); if (group1 == null) { group1 = new IndexGroupTemplateEntity(); group1.setIndexId(indexDictEntity.getId()); group1.setParentIndexGroupId("0"); - group1.setId(level1GroupId); - group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); + group1.setId(UniqueIdGenerator.generate()); + group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),true,4)); indexGroupMap.put(index.getLevel1Index(), group1); } StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); - String level2GroupId = UniqueIdGenerator.generate(); - IndexGroupTemplateEntity group2 = indexGroupMap.get(level4Index); + IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index()+level4Index); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); group2.setIndexId(indexDictEntity.getId()); - group2.setParentIndexGroupId(level1GroupId); - group2.setId(level2GroupId); - group2.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); - indexGroupMap.put(level4Index, group2); + group2.setParentIndexGroupId(group1.getId()); + group2.setId(UniqueIdGenerator.generate()); + group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 )); + indexGroupMap.put(index.getLevel1Index()+level4Index, group2); //构建 分组明细 - templateEntity = indexGroupDetailMap.get(level4Index); + templateEntity = indexGroupDetailMap.get(index.getLevel1Index()+level4Index); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group1, allIndexCodeSb.toString(), 2); + templateEntity = new IndexGroupDetailTemplateEntity(); + templateEntity.setIndexGroupId(group1.getId()); + templateEntity.setIndexId(indexDictEntity.getId()); + templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); + templateEntity.setId(UniqueIdGenerator.generate()); + buildIndexGroupDetail(templateEntity,indexDictEntity, index, group1, 2); + indexGroupDetailMap.put(index.getLevel1Index()+level4Index,templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(index.getLevel1Index()+index.getLevel5Index()); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group2, allIndexCodeSb.toString(), 5); + templateEntity = new IndexGroupDetailTemplateEntity(); + templateEntity.setIndexGroupId(group2.getId()); + System.out.println("=========="+group2.getId()); + templateEntity.setIndexId(indexDictEntity.getId()); + templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); + templateEntity.setId(UniqueIdGenerator.generate()); + buildIndexGroupDetail(templateEntity,indexDictEntity, index, group2, 5); + indexGroupDetailMap.put(index.getLevel1Index()+index.getLevel5Index(),templateEntity); } } else { //todo 测试完去掉 //if ("街道相关".equals(index.getLevel1Index())) { IndexDictEntity indexDictEntity = indexDicMap.get(index.getLevel1Index()); - String level1GroupId = UniqueIdGenerator.generate(); IndexGroupTemplateEntity group1 = indexGroupMap.get(index.getLevel1Index()); if (group1 == null) { group1 = new IndexGroupTemplateEntity(); group1.setIndexId(indexDictEntity.getId()); group1.setParentIndexGroupId("0"); - group1.setId(level1GroupId); - group1.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); + group1.setId(UniqueIdGenerator.generate()); + group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 )); indexGroupMap.put(index.getLevel1Index(), group1); } StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level2Index = index.getLevel2Index(); indexDictEntity = indexDicMap.get(level2Index); - String level2GroupId = UniqueIdGenerator.generate(); - - IndexGroupTemplateEntity group2 = indexGroupMap.get(level2Index); + String groupMapKey = index.getLevel1Index() + level2Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(groupMapKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); group2.setIndexId(indexDictEntity.getId()); - group2.setParentIndexGroupId(level1GroupId); - group2.setId(level2GroupId); - group2.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); - indexGroupMap.put(level2Index, group2); + group2.setParentIndexGroupId(group1.getId()); + group2.setId(UniqueIdGenerator.generate()); + group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 )); + + indexGroupMap.put(groupMapKey, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(level2Index); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group1, allIndexCodeSb.toString(), 2); + templateEntity = new IndexGroupDetailTemplateEntity(); + templateEntity.setIndexGroupId(group2.getId()); + templateEntity.setIndexId(indexDictEntity.getId()); + templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); + templateEntity.setId(UniqueIdGenerator.generate()); + buildIndexGroupDetail(templateEntity,indexDictEntity, index, group1, 2); + indexGroupDetailMap.put(level2Index,templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(index.getLevel1Index()+index.getLevel5Index()); if (templateEntity == null) { - buildIndexGroupDetail(indexDictEntity, index, group2, allIndexCodeSb.toString(), 5); + templateEntity = new IndexGroupDetailTemplateEntity(); + templateEntity.setIndexGroupId(group2.getId()); + templateEntity.setIndexId(indexDictEntity.getId()); + templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); + templateEntity.setId(UniqueIdGenerator.generate()); + + buildIndexGroupDetail(templateEntity, indexDictEntity, index, group2, 5); + indexGroupDetailMap.put(index.getLevel1Index()+index.getLevel5Index(),templateEntity); } } //} @@ -199,24 +223,16 @@ public class IndexExcelDataListener extends AnalysisEventListener { LOGGER.info("所有指标分组明细数据解析完成:{}", JSON.toJSONString(indexGroupDetailMap.values())); } - private void buildIndexGroupDetail(IndexDictEntity indexDictEntity, IndexModel index, IndexGroupTemplateEntity parentGroup, String allIndexCode, Integer level) { - IndexGroupDetailTemplateEntity templateEntity; - templateEntity = new IndexGroupDetailTemplateEntity(); - templateEntity.setIndexGroupId(parentGroup.getId()); - templateEntity.setAllParentIndexCode(allIndexCode); - templateEntity.setIndexId(indexDictEntity.getId()); - + private void buildIndexGroupDetail( IndexGroupDetailTemplateEntity templateEntity,IndexDictEntity indexDictEntity, IndexModel index, IndexGroupTemplateEntity parentGroup, Integer level) { if (level == 5) { - templateEntity.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(index.getLevel5Index(),true)); + templateEntity.setIndexCode(Pinyin4jUtil.getSpellPinYin(index.getLevel5Index(),false,4 )); String level5WeightStr = index.getLevel5Weight().replace("%", ""); templateEntity.setWeight(new BigDecimal(level5WeightStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); - indexGroupDetailMap.put(index.getLevel5Index(), templateEntity); } else { - templateEntity.setIndexCode(Pinyin4jUtil.getFirstSpellPinYin(indexDictEntity.getIndexName(),true)); - indexGroupDetailMap.put(indexDictEntity.getIndexName(), templateEntity); + templateEntity.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 )); templateEntity.setWeight(new BigDecimal(index.getWeight()).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); } - templateEntity.setId(UniqueIdGenerator.generate()); + if (StringUtils.isNotBlank(index.getThreshold())) { String thresholdStr = index.getThreshold().replace("%", ""); templateEntity.setThreshold(new BigDecimal(thresholdStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java index 63a0105f28..4b26ff128c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java @@ -2,8 +2,12 @@ package com.epmet.service.screen.impl; import com.alibaba.fastjson.JSON; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.dao.screen.IndexGroupDetailDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; +import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; import com.epmet.service.screen.CpcIndexCalculateService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -19,14 +23,25 @@ import java.util.Map; public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; + @Autowired + private IndexCodeFieldReDao indexCodeFieldReDao; + @Autowired + private IndexGroupDetailDao indexGroupDetailDao; @Override public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) { //计算最大最小值 Map minAndMaxList = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxList)){ - log.warn("customerId:{} have not any record",formDTO.getCustomerId()); + log.warn("customerId:{} have not any fact record",formDTO.getCustomerId()); return false; } + //获取指标权重信息 + List indexDetails = indexGroupDetailDao.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + if (CollectionUtils.isEmpty(indexDetails)){ + log.warn("customerId:{} have not any indexGroupDetail",formDTO.getCustomerId()); + return false; + } + log.info(JSON.toJSONString(minAndMaxList)); List list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); return null; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java index 65fc39f131..a575ed7b72 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.screen.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; @@ -35,7 +36,9 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -62,13 +65,44 @@ private IndexGroupTemplateDao indexGroupTemplateDao; if (CollectionUtils.isEmpty(groupTempList) || CollectionUtils.isEmpty(groupDetailTempList)){ throw new RenException("没有需要初始化的数据"); } - List groupEntityList = groupTempList.stream().map(groupTemp -> { + Map groupMap = groupTempList.stream().collect(Collectors.toMap(IndexGroupTemplateEntity::getId, o -> o)); + Map groupEntityMap = new HashMap<>(); + + groupDetailTempList.forEach(groupDetailTemp->{ + String indexGroupId = groupDetailTemp.getIndexGroupId(); + IndexGroupTemplateEntity group = groupMap.get(indexGroupId); + if (group == null){ + System.out.println(JSON.toJSONString(groupDetailTemp)); + } + + IndexGroupEntity groupEntity = groupEntityMap.get(indexGroupId); + if (groupEntity == null){ + groupEntity = ConvertUtils.sourceToTarget(group, IndexGroupEntity.class); + String groupId = UniqueIdGenerator.generate(); + groupEntity.setId(groupId); + groupEntity.setCustomerId(customerId); + groupEntityMap.put(indexGroupId,groupEntity); + } + + IndexGroupDetailEntity entity = ConvertUtils.sourceToTarget(groupDetailTemp, IndexGroupDetailEntity.class); + entity.setId(UniqueIdGenerator.generate()); + entity.setIndexGroupId(groupEntity.getId()); + entity.setCustomerId(customerId); + indexGroupDetailDao.insert(entity); + }); + this.insertBatch(groupEntityMap.values(),10); + + + /* List groupEntityList = groupTempList.stream().map(groupTemp -> { IndexGroupEntity entity = ConvertUtils.sourceToTarget(groupTemp, IndexGroupEntity.class); entity.setId(UniqueIdGenerator.generate()); entity.setCustomerId(customerId); return entity; }).collect(Collectors.toList()); - this.insertBatch(groupEntityList,10); + + groupEntityList.forEach(group->{ + + }); List groupTempEntityList = groupDetailTempList.stream().map(groupTemp -> { IndexGroupDetailEntity entity = ConvertUtils.sourceToTarget(groupTemp, IndexGroupDetailEntity.class); @@ -78,7 +112,7 @@ private IndexGroupTemplateDao indexGroupTemplateDao; }).collect(Collectors.toList()); groupTempEntityList.forEach(o->{ indexGroupDetailDao.insert(o); - }); + });*/ return true; } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java index 5ea9d4b828..c6e61ffb01 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java @@ -22,6 +22,9 @@ public class Pinyin4jUtil { duoyinMap = new HashMap<>(); duoyinMap.put('区',new String[]{"qu"}); duoyinMap.put('系',new String[]{"xi"}); + duoyinMap.put('率',new String[]{"lv"}); + duoyinMap.put('员',new String[]{"yuan"}); + duoyinMap.put('提',new String[]{"ti"}); } /** @@ -32,7 +35,24 @@ public class Pinyin4jUtil { * @return 第一个拼音 */ public static String getFirstSpellPinYin(String src, boolean isFullSpell) { - String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell)); + String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, 1)); + System.out.println(targetStr); + String[] split = targetStr.split(","); + if (split.length > 1) { + targetStr = split[0]; + } + return targetStr; + } + + /** + * getFirstSpellPinYin:(多音字的时候获取第一个).
+ * + * @param src 传入的拼音字符串,以逗号隔开 + * @param isFullSpell 是否全拼,true:全拼,false:第一个汉字全拼(其它汉字取首字母) + * @return 第一个拼音 + */ + public static String getSpellPinYin(String src, boolean isFullSpell,Integer preFont) { + String targetStr = Pinyin4jUtil.makeStringByStringSet(Pinyin4jUtil.getPinyin(src, isFullSpell, preFont)); System.out.println(targetStr); String[] split = targetStr.split(","); if (split.length > 1) { @@ -68,9 +88,10 @@ public class Pinyin4jUtil { * * @param src 汉字 * @param isFullSpell 是否全拼,如果为true:全拼,false:首字全拼 + * @param preFont isFullSpell =true时,前几个字全拼 * @return */ - public static Set getPinyin(String src, boolean isFullSpell) { + public static Set getPinyin(String src, boolean isFullSpell, int preFont) { if (src != null && !src.trim().equalsIgnoreCase("")) { char[] srcChar; srcChar = src.toCharArray(); @@ -95,7 +116,7 @@ public class Pinyin4jUtil { } if (!isFullSpell) { - if (i == 0) { + if (i < preFont) { temp[i] = temp[i]; } else { String[] tTemps = new String[temp[i].length]; @@ -167,4 +188,9 @@ public class Pinyin4jUtil { return strJaggedArray; } } + + public static void main(String[] args) { + System.out.println(getFirstSpellPinYin("区直部门",false)); + System.out.println(getSpellPinYin("党员提出话题数",false,4)); + } } 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 115e0ae4e3..a1694d1104 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 @@ -114,24 +114,24 @@ - select ID, INDEX_GROUP_ID, INDEX_ID, INDEX_CODE, WEIGHT, THRESHOLD FROM index_group_detail - where STATUS = 'enable' and DEL_FLAG = '0' + select + ID, INDEX_GROUP_ID, INDEX_ID, INDEX_CODE, WEIGHT, THRESHOLD + FROM index_group_detail + WHERE + CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0' + and ALL_PARENT_INDEX_CODE = #{indexCode,jdbcType=VARCHAR} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml index 8ec562b386..5aacdd4b1b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailTemplateDao.xml @@ -7,7 +7,7 @@ delete from index_group_detail_template From 470b205d4bdcacb4c9728c16c9bd14da5678dbce Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 27 Aug 2020 17:32:28 +0800 Subject: [PATCH 188/360] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98=E6=89=80=E5=B1=9E?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=8F=8A=E4=B8=8B=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/AgencyResultDTO.java | 6 +++ .../result/StaffInAgencyListResultDTO.java | 44 +++++++++++++++++++ .../constant/CustomerAgencyConstant.java | 4 ++ .../controller/CustomerAgencyController.java | 13 ++++++ .../java/com/epmet/dao/CustomerAgencyDao.java | 7 +++ .../epmet/service/CustomerAgencyService.java | 8 ++++ .../impl/CustomerAgencyServiceImpl.java | 24 ++++++++++ .../resources/mapper/CustomerAgencyDao.xml | 14 ++++++ 8 files changed, 120 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInAgencyListResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyResultDTO.java index a02fdb01ee..e4592c5b0b 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyResultDTO.java @@ -17,6 +17,7 @@ package com.epmet.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -40,4 +41,9 @@ public class AgencyResultDTO implements Serializable { * 机关组织名称 */ private String agencyName = ""; + /** + * 所有上级组织机构ID(以英文:隔开) + */ + @JsonIgnore + private String pids = ""; } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInAgencyListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInAgencyListResultDTO.java new file mode 100644 index 0000000000..52261bc95a --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/StaffInAgencyListResultDTO.java @@ -0,0 +1,44 @@ +/** + * 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.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + + +/** + * 工作端-查询当前人员所属组织及所有下级组织--接口返参 + * + * @author sun + */ +@Data +public class StaffInAgencyListResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 当前组织信息 + */ + private AgencyResultDTO agencyList; + /** + * 下级组织信息(递归) + */ + private List subAgencyList; +} \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java index b1a42c4209..da89288f00 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java @@ -67,4 +67,8 @@ public interface CustomerAgencyConstant { * 网格党建指导员角色 */ String GRID_PARTY_DIRECTOR = "grid_party_director"; + /** + * 获取工作人员组织信息失败 + */ + String SELECT_STAFF_AGENCY_EXCEPTION = "获取工作人员组织信息失败"; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index fb76995133..c8b2350e16 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -229,4 +231,15 @@ public class CustomerAgencyController { Result userInfoExt(@RequestBody ExtUserInfoResultDTO result){ return new Result().ok(customerAgencyService.extUserInfo(result)); } + + /** + * @param tokenDTO + * @return + * @Author sun + * @Description 工作端-查询当前人员所属组织及所有下级组织 + **/ + @PostMapping("staffinagencylist") + public Result staffInAgencyList(@LoginUser TokenDto tokenDTO) { + return new Result().ok(customerAgencyService.staffInAgencyList(tokenDTO.getUserId())); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index 26ec50ed8e..63f48f3c13 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -161,4 +161,11 @@ public interface CustomerAgencyDao extends BaseDao { **/ List selectDeptList(@Param("agencyId") String agencyId); + /** + * @param staffId + * @return + * @Author sun + * @Description 查询工作人员所属组织信息 + **/ + AgencyResultDTO selectAgencyByStaffId(@Param("staffId") String staffId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index 02d05a373c..b7a556c5b0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -205,4 +205,12 @@ public interface CustomerAgencyService extends BaseService * @date 2020.08.21 17:31 **/ ExtUserInfoResultDTO extUserInfo(ExtUserInfoResultDTO result); + + /** + * @param staffId + * @return + * @Author sun + * @Description 工作端-查询当前人员所属组织及所有下级组织 + **/ + StaffInAgencyListResultDTO staffInAgencyList(String staffId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index c401f89afc..0dc4569cc4 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -971,4 +971,28 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl%s", staffId)); + throw new RenException(CustomerAgencyConstant.SELECT_STAFF_AGENCY_EXCEPTION); + } + resultDTO.setAgencyList(agencyList); + + //2.递归查询所有下级组织信息 + List subAgencyList = getDepartmentList(("".equals(agencyList.getPids()) ? "" : agencyList.getPids() + ":") + agencyList.getAgencyId()); + resultDTO.setSubAgencyList(subAgencyList); + + return resultDTO; + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index c2fb090e3f..5e6cf088ac 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -258,4 +258,18 @@ AND agency.PID = #{pid} + + \ No newline at end of file From c3ea5ca22b8e8dad84e556756643d2927a6a3c65 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 27 Aug 2020 17:35:16 +0800 Subject: [PATCH 189/360] =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/screen/impl/IndexGroupDetailServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java index 6c22b360d6..0225c956c5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java @@ -46,7 +46,6 @@ public class IndexGroupDetailServiceImpl extends BaseServiceImpl Date: Thu, 27 Aug 2020 17:39:33 +0800 Subject: [PATCH 190/360] =?UTF-8?q?11=E3=80=81=E5=9F=BA=E5=B1=82=E6=B2=BB?= =?UTF-8?q?=E7=90=86-=E5=85=AC=E4=BC=97=E5=8F=82=E4=B8=8E=20=E9=99=A4?= =?UTF-8?q?=E6=95=B0bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/screen/impl/ScreenCollServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) 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 1411cd9c00..c7650aa185 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 @@ -410,6 +410,9 @@ public class ScreenCollServiceImpl implements ScreenCollService { * @Date 15:38 2020-08-21 **/ private BigDecimal calculateGrowthRateNumber(Integer old, Integer now){ + if (NumConstant.ZERO == old){ + return new BigDecimal(now * NumConstant.ONE_HUNDRED); + } BigDecimal bignum1 = new BigDecimal((now - old) * NumConstant.ONE_HUNDRED); BigDecimal bignum2 = bignum1.divide(new BigDecimal(old),2,BigDecimal.ROUND_HALF_UP); return bignum2; From 1b8070b3f33f2b63e5c0cd5a08e1de8cbb95b838 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 27 Aug 2020 21:22:36 +0800 Subject: [PATCH 191/360] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=AD=A3=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=20=E9=BB=98=E8=AE=A4=E6=AD=A3=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=AD=89=E6=96=87=E4=BB=B6=E7=94=9F=E6=88=90=E5=90=8E=E5=86=8D?= =?UTF-8?q?=E5=A4=84=E7=90=86=E8=B4=9F=E7=9B=B8=E5=85=B3=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexPartyAblityCpcMonthlyDao.java | 2 +- .../com/epmet/entity/screen/IndexDictEntity.java | 4 ++++ .../entity/screen/IndexGroupDetailEntity.java | 5 +++++ .../screen/IndexGroupDetailTemplateEntity.java | 5 +++++ .../com/epmet/model/IndexExcelDataListener.java | 15 +++++++++++++-- .../src/main/java/com/epmet/model/IndexModel.java | 5 +++++ .../screen/impl/CpcIndexCalculateServiceImpl.java | 3 +-- .../screen/impl/IndexCalculateServiceImpl.java | 5 +++-- .../FactIndexPartyAblityCpcMonthlyDao.xml | 2 +- 9 files changed, 38 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index 7208c093aa..f9c0ad1af2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -70,7 +70,7 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao list, @Param("customerId") String customerId); - List getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); + Map getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); Map getExtremeValue(@Param("customerId") String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java index 2ea5745dba..299a1dca5c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java @@ -50,4 +50,8 @@ public class IndexDictEntity extends BaseEpmetEntity { */ private String level; + /** + * 正相关:positive;负相关:negative + */ + private String correlation; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java index a789ae51e7..ba9d1a3b09 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java @@ -77,4 +77,9 @@ public class IndexGroupDetailEntity extends BaseEpmetEntity { */ private String allParentIndexCode; + /** + * 正相关:positive;负相关:negative + */ + private String correlation; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java index d847f654c6..bedab6e7f7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java @@ -72,4 +72,9 @@ public class IndexGroupDetailTemplateEntity extends BaseEpmetEntity { */ private String allParentIndexCode; + /** + * 正相关:positive;负相关:negative + */ + private String correlation; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index a4993cf00b..24770d1bd2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -29,6 +29,7 @@ import java.util.stream.Collectors; */ public class IndexExcelDataListener extends AnalysisEventListener { private static final Logger LOGGER = LoggerFactory.getLogger(IndexExcelDataListener.class); + private String POSITIVE = "positive"; /** * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 */ @@ -85,6 +86,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { data.setWeight(preWheight); } LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data)); + //TODO 默认正相关 + data.setCorrelation(POSITIVE); IndexDictEntity entity = new IndexDictEntity(); IndexDictEntity entity2 = new IndexDictEntity(); @@ -144,6 +147,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setIndexId(indexDictEntity.getId()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setId(UniqueIdGenerator.generate()); + templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity,indexDictEntity, index, group1, 2); indexGroupDetailMap.put(index.getLevel1Index()+level4Index,templateEntity); } @@ -156,10 +160,10 @@ public class IndexExcelDataListener extends AnalysisEventListener { if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); - System.out.println("=========="+group2.getId()); templateEntity.setIndexId(indexDictEntity.getId()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setId(UniqueIdGenerator.generate()); + templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity,indexDictEntity, index, group2, 5); indexGroupDetailMap.put(index.getLevel1Index()+index.getLevel5Index(),templateEntity); } @@ -198,6 +202,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setIndexId(indexDictEntity.getId()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setId(UniqueIdGenerator.generate()); + templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity,indexDictEntity, index, group1, 2); indexGroupDetailMap.put(level2Index,templateEntity); } @@ -212,7 +217,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setIndexId(indexDictEntity.getId()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setId(UniqueIdGenerator.generate()); - + templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, group2, 5); indexGroupDetailMap.put(index.getLevel1Index()+index.getLevel5Index(),templateEntity); } @@ -240,33 +245,39 @@ public class IndexExcelDataListener extends AnalysisEventListener { } private void buildIndexDicEntity(IndexModel data, IndexDictEntity entity, IndexDictEntity entity2, IndexDictEntity entity3, IndexDictEntity entity4, IndexDictEntity entity5) { + if (!indexDicMap.containsKey(data.getLevel1Index())) { entity.setId(UniqueIdGenerator.generate()); entity.setIndexName(data.getLevel1Index()); + entity.setCorrelation(data.getCorrelation()); entity.setLevel("1"); indexDicMap.put(data.getLevel1Index(), entity); } if (!indexDicMap.containsKey(data.getLevel2Index())) { entity2.setId(UniqueIdGenerator.generate()); entity2.setIndexName(data.getLevel2Index()); + entity2.setCorrelation(data.getCorrelation()); entity2.setLevel("2"); indexDicMap.put(data.getLevel2Index(), entity2); } if (!indexDicMap.containsKey(data.getLevel3Index())) { entity3.setId(UniqueIdGenerator.generate()); entity3.setIndexName(data.getLevel3Index()); + entity3.setCorrelation(data.getCorrelation()); entity3.setLevel("3"); indexDicMap.put(data.getLevel3Index(), entity3); } if (!indexDicMap.containsKey(data.getLevel4Index())) { entity4.setId(UniqueIdGenerator.generate()); entity4.setIndexName(data.getLevel4Index()); + entity4.setCorrelation(data.getCorrelation()); entity4.setLevel("4"); indexDicMap.put(data.getLevel4Index(), entity4); } if (!indexDicMap.containsKey(data.getLevel5Index())) { entity5.setId(UniqueIdGenerator.generate()); entity5.setIndexName(data.getLevel5Index()); + entity5.setCorrelation(data.getCorrelation()); entity5.setLevel("5"); indexDicMap.put(data.getLevel5Index(), entity5); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java index f264a2c39e..5ff0b19267 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java @@ -23,4 +23,9 @@ public class IndexModel { private String level5Weight; @ExcelProperty(value = "阈值") private String threshold; + /** + * 正相关:positive;负相关:negative + */ + @ExcelProperty(value = "相关性") + private String correlation; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java index 4b26ff128c..476eacb60c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java @@ -5,7 +5,6 @@ import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; import com.epmet.dao.screen.IndexCodeFieldReDao; import com.epmet.dao.screen.IndexGroupDetailDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.screen.CpcIndexCalculateService; @@ -43,7 +42,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } log.info(JSON.toJSONString(minAndMaxList)); - List list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); + Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); return null; } } 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 index d51cf3ea88..4163ea074c 100644 --- 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 @@ -7,7 +7,6 @@ import com.epmet.dao.screen.IndexGroupDao; import com.epmet.dao.screen.IndexGroupDetailDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; -import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.service.indexcal.GridCorreLationService; import com.epmet.service.screen.IndexCalculateService; @@ -18,8 +17,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; import java.util.Date; import java.util.List; +import java.util.Map; /** * @author liujianjun @@ -57,7 +58,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { CalculateCommonFormDTO calculateCommonFormDTO=new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); //计算党员 try { - List list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(customerId, formDTO.getMonthId()); + Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(customerId, formDTO.getMonthId()); } catch (Exception e) { } 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 a1694d1104..769689fa7f 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 @@ -94,7 +94,7 @@ - SELECT CREATE_TOPIC_COUNT, JOIN_TOPIC_COUNT, From 589ad1879ec5890672f5e48069650538c88097bf Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 27 Aug 2020 22:01:45 +0800 Subject: [PATCH 192/360] =?UTF-8?q?=E6=96=B0=E5=A2=9EBigDecimal=E5=88=86?= =?UTF-8?q?=E5=80=BC=E8=AE=A1=E7=AE=97=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BigDecimalScoreCalculator.java | 80 +++++++++++++++++++ .../stats/test/normalizing/DemoScoreCal.java | 26 ++++++ 2 files changed, 106 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java new file mode 100644 index 0000000000..1655c73a6d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java @@ -0,0 +1,80 @@ +package com.epmet.support.normalizing; + +import java.math.BigDecimal; +import java.util.List; + +/** + * BigDecimal的分值计算 + * 每一种数据类型的计算都要继承ScoreCalculator并且实现其抽象方法,实现数据类型的转换 + */ +public class BigDecimalScoreCalculator extends ScoreCalculator { + + /** + * 初始化基于原数组的整数分值计算 + * ☆☆☆ 务必在该构造方法最后调用父类的prepare()方法 ☆☆☆ + * @param sourceArray 源数据完整数组 + * @param minScore 分值区间的左边界 + * @param maxScore 分值区间的右边界 + * @param correlation 相关性 + */ + public BigDecimalScoreCalculator(BigDecimal[] sourceArray, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + this.sourceArrary = sourceArray.clone(); + this.minScore = minScore; + this.maxScore = maxScore; + this.correlation = correlation; + prepare4SourceArray(); + System.out.println("最小值:"+minScore+";最大值:"+maxScore); + } + + /** + * 初始化基于原数组的整数分值计算 + * @param sourceList 源数据完整列表 + * @param minScore 分值区间的左边界 + * @param maxScore 分值区间的右边界 + * @param correlation 相关性 + */ + public BigDecimalScoreCalculator(List sourceList, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + this.sourceArrary = sourceList.toArray(); + this.minScore = minScore; + this.maxScore = maxScore; + this.correlation = correlation; + prepare4SourceArray(); + System.out.println("最小值:"+minScore+";最大值:"+maxScore); + } + + /** + * 初始化基于边界值的整数分值计算 + * @param minSourceValue 左边界值 + * @param maxSourceValue 右边界值 + * @param minScore 分值区间的左边界 + * @param maxScore 分值区间的右边界 + * @param correlation 相关性 + */ + public BigDecimalScoreCalculator(BigDecimal minSourceValue, BigDecimal maxSourceValue, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { + + this.minScore = minScore; + this.maxScore = maxScore; + this.minValue = minSourceValue; + this.maxValue = maxSourceValue; + this.correlation = correlation; + prepare4BoundaryValue(); + System.out.println("最小值:"+minScore+";最大值:"+maxScore); + } + + @Override + public BigDecimal getMaxFromSourceArray() { + BigDecimal[] intSourceArrary = (BigDecimal[]) this.sourceArrary; + return intSourceArrary[intSourceArrary.length - 1]; + } + + @Override + public BigDecimal getMinFromSourceArray() { + BigDecimal[] intSourceArrary = (BigDecimal[]) this.sourceArrary; + return intSourceArrary[0]; + } + + @Override + public BigDecimal convertValue2BigDecimal(Object sourceValue) { + return (BigDecimal) sourceValue; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index 1bb7514d5a..fb3f1246d4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -91,5 +91,31 @@ public class DemoScoreCal { System.err.println("--------------------------------"); } + @Test + public void testBigDecimalBatchCalculate() throws InterruptedException { + //{4,8,1,3,2} + + // 每个指标需要单独的分支计算器,因为每个指标的最大最小值是不同的 + ScoreCalculator sc1 = new BigDecimalScoreCalculator(new BigDecimal(1), new BigDecimal(8), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); + ScoreCalculator sc2 = new BigDecimalScoreCalculator(new BigDecimal(1), new BigDecimal(8), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); + + List index1SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(4)), new SampleValue<>("id2", new BigDecimal(1)), new SampleValue<>("id3", new BigDecimal(8))); + List index2SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(1)), new SampleValue<>("id2", new BigDecimal(8)), new SampleValue<>("id3", new BigDecimal(3))); + + // 每个指标的信息,包括样本列表,权重,指标标记 + IndexInputVO index1VO = new IndexInputVO("aaa", index1SampleValues, new BigDecimal(1), sc1); + IndexInputVO index2VO = new IndexInputVO("bbb", index2SampleValues, new BigDecimal(1), sc2); + + List indexInputVOS = Arrays.asList(index1VO, index2VO); + + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + List result = batchScoreCalculator.exec(indexInputVOS); + + System.err.println("--------------------------------"); + result.stream().forEach(r -> System.out.println(r)); + Thread.sleep(10); + System.err.println("--------------------------------"); + } + } From 68b450936f64ecbd10f3c69e5b3656cb8ec3cfaf Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 28 Aug 2020 09:36:29 +0800 Subject: [PATCH 193/360] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=A0=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/screen/constant/ScreenConstant.java | 4 ++++ .../datareport/service/screen/impl/AgencyServiceImpl.java | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java index b03dbe6466..b1a25cf947 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java @@ -12,4 +12,8 @@ public interface ScreenConstant { String RATIO = "%"; + String SQUARE_BRACKETS = "[]"; + + String COMMA = ","; + } 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 8ee16c42f6..0727ebfbde 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 @@ -72,12 +72,12 @@ public class AgencyServiceImpl implements AgencyService { * @date 2020/8/26 5:18 下午 */ public List getCenterMark(String centerMark){ - if (centerMark.length() == NumConstant.ZERO) { + if (centerMark.length() == NumConstant.ZERO || centerMark.equals(ScreenConstant.SQUARE_BRACKETS)) { return new ArrayList<>(); } List result = new ArrayList<>(); - String substring = centerMark.substring(2, centerMark.length() - 2); - String[] split = substring.split(","); + 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)); } From bba89ee8ca908d7aabf00aa847b503ded5976589 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 28 Aug 2020 10:40:40 +0800 Subject: [PATCH 194/360] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/screen/dto/form/ProjectDetailFormDTO.java | 6 ++++++ .../com/epmet/datareport/dao/screen/ScreenEventDataDao.java | 2 +- .../service/screen/impl/ScreenProjectServiceImpl.java | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java index 32359cb03e..88744ad004 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java @@ -21,4 +21,10 @@ public class ProjectDetailFormDTO implements Serializable { */ @NotBlank(message = "项目ID不能为空",groups = {ProjectDetail.class}) private String projectId; + + /** + * 机关iD + */ + @NotBlank(message = "机关ID不能为空",groups = {ProjectDetail.class}) + private String agencyId; } 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/screen/ScreenEventDataDao.java index 92f1641cce..24604bf1de 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/screen/ScreenEventDataDao.java @@ -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/service/screen/impl/ScreenProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java index dce609636d..e617449458 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/screen/impl/ScreenProjectServiceImpl.java @@ -35,7 +35,7 @@ public class ScreenProjectServiceImpl implements ScreenProjectService { @DataSource(value = DataSourceConstant.STATS, 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(); } From 56c41e64d88db22488d6c8fbbec1f1ecba516476 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 28 Aug 2020 11:17:57 +0800 Subject: [PATCH 195/360] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E8=B0=83=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 2 ++ .../epmet/dto/form/StaffTransferFormDTO.java | 30 ++++++++++++++++ .../com/epmet/controller/StaffController.java | 15 ++++++++ .../java/com/epmet/service/StaffService.java | 12 +++++++ .../epmet/service/impl/StaffServiceImpl.java | 36 +++++++++++++++++-- .../feign/GovProjectOpenFeignClient.java | 16 +++++++++ .../GovProjectOpenFeignClientFallback.java | 11 ++++++ .../epmet/controller/ProjectController.java | 20 +++++++++++ .../com/epmet/service/ProjectService.java | 1 + 9 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffTransferFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index d3d2b8ccd1..d6ca03a428 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -77,6 +77,8 @@ public enum EpmetErrorCode { CANNOT_DISABLE_YOURSELF(8405,"您不能禁用自己"), NO_SET_GRID_COUNT(8406,"您还未设置创建网格数量上限,请联系管理员设置"), GRID_COUNT_UP(8407,"您的创建网格数量已到达上限,请联系管理员设置"), + EXIT_PEND_PROJECT(8408,"该工作人员有项目尚在处理,处理完毕方可操作"), + EXIT_PUBLISHED_ACTIVITY(8409,"该工作人员有活动尚在进行,等活动完成方可操作"), ALREADY_EVALUATE(8501,"您已评价"), ALREADY_VOTE(8502,"您已表态"), diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffTransferFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffTransferFormDTO.java new file mode 100644 index 0000000000..fad8bc2dd9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/StaffTransferFormDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.form; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @author zhaoqifeng + * @dscription + * @date 2020/8/27 16:05 + */ +@NoArgsConstructor +@Data +public class StaffTransferFormDTO implements Serializable { + + private static final long serialVersionUID = -9011669876505775874L; + /** + * 被调动工作人员Id + */ + private String staffId; + /** + * 调动后组织Id + */ + private String agencyId; + /** + * 备注说明 + */ + private String remarks; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java index 664f425aee..8eea5b3461 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java @@ -10,6 +10,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.StaffInfoFromDTO; import com.epmet.dto.form.StaffSubmitFromDTO; +import com.epmet.dto.form.StaffTransferFormDTO; import com.epmet.dto.form.StaffsInAgencyFromDTO; import com.epmet.dto.result.*; import com.epmet.service.StaffService; @@ -135,4 +136,18 @@ public class StaffController { public Result mine(@RequestBody StaffInfoFromDTO fromDTO){ return new Result().ok(staffService.mine(fromDTO)); } + + /** + * 工作人员调动 + * + * @author zhaoqifeng + * @date 2020/8/27 16:12 + * @param tokenDto + * @param fromDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("stafftransfer") + public Result staffTransfer(@LoginUser TokenDto tokenDto, @RequestBody StaffTransferFormDTO fromDTO){ + return new Result(); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java index 22f423738a..dab238f3fb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.StaffInfoFromDTO; import com.epmet.dto.form.StaffSubmitFromDTO; +import com.epmet.dto.form.StaffTransferFormDTO; import com.epmet.dto.form.StaffsInAgencyFromDTO; import com.epmet.dto.result.*; @@ -84,11 +85,22 @@ public interface StaffService { /** * 我的基本信息 + * * @author zhaoqifeng * @date 2020/5/22 16:57 * @param fromDTO * @return com.epmet.dto.result.MineResultDTO */ MineResultDTO mine(StaffInfoFromDTO fromDTO); + + /** + * 工作人员调动 + * @author zhaoqifeng + * @date 2020/8/27 16:13 + * @param tokenDto + * @param fromDTO + * @return void + */ + void staffTransfer(TokenDto tokenDto, StaffTransferFormDTO fromDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java index eea0a80d21..53cf6d9b14 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java @@ -1,18 +1,19 @@ package com.epmet.service.impl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.CustomerStaffAgencyDTO; import com.epmet.dto.CustomerStaffDTO; -import com.epmet.dto.form.StaffInfoFromDTO; -import com.epmet.dto.form.StaffSubmitFromDTO; -import com.epmet.dto.form.StaffsInAgencyFromDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.CustomerStaffAgencyEntity; import com.epmet.feign.EpmetUserFeignClient; +import com.epmet.feign.GovProjectOpenFeignClient; import com.epmet.feign.OperCrmFeignClient; import com.epmet.service.CustomerAgencyService; import com.epmet.service.CustomerStaffAgencyService; @@ -40,6 +41,8 @@ public class StaffServiceImpl implements StaffService { private CustomerAgencyService customerAgencyService; @Autowired private CustomerStaffAgencyService customerStaffAgencyService; + @Autowired + private GovProjectOpenFeignClient govProjectOpenFeignClient; @Override public Result getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { @@ -183,4 +186,31 @@ public class StaffServiceImpl implements StaffService { } return result; } + + @Override + public void staffTransfer(TokenDto tokenDto, StaffTransferFormDTO fromDTO) { + //1.获取工作人员与机关关系 + CustomerStaffAgencyDTO staffAgencyDTO = customerStaffAgencyService.getInfoByUserId(fromDTO.getStaffId()); + String oldAgency = staffAgencyDTO.getAgencyId(); + //2.查询是否有未处理项目 + ProjectListFromDTO projectFromDTO = new ProjectListFromDTO(); + projectFromDTO.setCustomerId(staffAgencyDTO.getCustomerId()); + projectFromDTO.setUserId(fromDTO.getStaffId()); + projectFromDTO.setPageNo(1); + projectFromDTO.setPageSize(10); + Result> pendResult = govProjectOpenFeignClient.getPendProjectList(projectFromDTO); + if (!pendResult.success()) { + throw new RenException(pendResult.getCode(), pendResult.getMsg()); + } + if (null != pendResult.getData() && pendResult.getData().size() > NumConstant.ZERO) { + throw new RenException(EpmetErrorCode.EXIT_PEND_PROJECT.getCode()); + } + //3.查询是否有活动未结束 + + //4.修改人员所属组织 + + //5.逻辑删除工作人员原组织加入的部门、网格,组织人员总数旧的减1新的加1,部门、网格总人数减1 + + //6.操作记录表新增调动记录 + } } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java index b2e6b7f32c..c16b8da399 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java @@ -1,9 +1,16 @@ package com.epmet.feign; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.ProjectListFromDTO; +import com.epmet.dto.result.PendProjectListResultDTO; import org.springframework.cloud.openfeign.FeignClient; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -13,4 +20,13 @@ import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback; */ @FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectOpenFeignClientFallback.class) public interface GovProjectOpenFeignClient { + /** + * 待处理项目列表 + * @author zhaoqifeng + * @date 2020/8/27 16:56 + * @param fromDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("gov/project/project/pendprojectlist") + Result> getPendProjectList(@RequestBody ProjectListFromDTO fromDTO); } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java index 4b8c2cd82b..aa84f509c5 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java @@ -1,8 +1,15 @@ package com.epmet.feign.fallback; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.ProjectListFromDTO; +import com.epmet.dto.result.PendProjectListResultDTO; import com.epmet.feign.GovProjectOpenFeignClient; import org.springframework.stereotype.Component; +import java.util.List; + /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 * @@ -11,4 +18,8 @@ import org.springframework.stereotype.Component; */ @Component public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignClient { + @Override + public Result> getPendProjectList(ProjectListFromDTO fromDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "getPendProjectList", fromDTO); + } } diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index ad3faa944b..5ccc25b279 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -17,7 +17,11 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.annotation.RequirePermission; +import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -27,10 +31,12 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.ProjectDTO; import com.epmet.dto.form.LatestListFormDTO; +import com.epmet.dto.form.ProjectListFromDTO; import com.epmet.dto.form.ShiftProjectFormDTO; import com.epmet.dto.form.ShiftProjectsFromDTO; import com.epmet.dto.result.IssueProjectResultDTO; import com.epmet.dto.result.LatestListResultDTO; +import com.epmet.dto.result.PendProjectListResultDTO; import com.epmet.dto.result.ShiftProjectResultDTO; import com.epmet.excel.ProjectExcel; import com.epmet.service.ProjectService; @@ -132,4 +138,18 @@ public class ProjectController { return new Result>().ok(projectService.getClosedProjectList(formDTO)); } + + /** + * 获取待处理项目列表 + * @author zhaoqifeng + * @date 2020/8/27 16:55 + * @param fromDTO + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("pendprojectlist") + public Result> getPendProjectList(@RequestBody ProjectListFromDTO fromDTO) { + List result = projectService.getPendProjectList(fromDTO); + return new Result>().ok(result); + } + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index e34e2ecd21..9f3bfa8bf1 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -106,6 +106,7 @@ public interface ProjectService extends BaseService { */ List getPendProjectList(ProjectListFromDTO fromDTO); + /** * 我发起的项目列表 * From d4306676d4f3be1aa626c32c53c32b6eefa233e1 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 28 Aug 2020 14:05:05 +0800 Subject: [PATCH 196/360] =?UTF-8?q?=E6=8C=87=E6=A0=87=E8=AE=A1=E7=AE=97red?= =?UTF-8?q?iskey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/redis/RedisKeys.java | 8 +++ .../controller/IndexCalculateController.java | 2 +- .../epmet/dao/screen/IndexCodeFieldReDao.java | 4 ++ .../epmet/redis/IndexCodeFieldReRedis.java | 54 +++++++++++++++++++ .../CpcIndexCalculateService.java | 2 +- .../indexcal/IndexCodeFieldReService.java | 17 ++++++ .../impl/CpcIndexCalculateServiceImpl.java | 11 ++-- .../impl/GridCorreLationServiceImpl.java | 5 +- .../impl/IndexCodeFieldReServiceImpl.java | 28 ++++++++++ .../mapper/screen/IndexCodeFieIdReDao.xml | 4 ++ 10 files changed, 124 insertions(+), 11 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/{screen => indexcal}/CpcIndexCalculateService.java (90%) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/{screen => indexcal}/impl/CpcIndexCalculateServiceImpl.java (79%) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index a5be29eb58..0d623e2010 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -297,4 +297,12 @@ public class RedisKeys { public static String getExternalAppSecretKey(String appId) { return String.format(rootPrefix+"externalapp:secret:%s",appId); } + + /** + * 计算指标时获取指标code和fields关系缓存Key + * @return + */ + public static String getIndexCodeFieldReKey() { + return rootPrefix.concat("data:index:indexcode:field"); + } } 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 index 4117f6dc75..c2211c0d80 100644 --- 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 @@ -4,7 +4,7 @@ import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; -import com.epmet.service.screen.CpcIndexCalculateService; +import com.epmet.service.indexcal.CpcIndexCalculateService; import com.epmet.service.screen.IndexCalculateService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java index edd402249f..3088f29531 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java @@ -4,6 +4,10 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.screen.IndexCodeFieldReEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.Map; + @Mapper public interface IndexCodeFieldReDao extends BaseDao { + Map getAllData(); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java new file mode 100644 index 0000000000..2863952420 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java @@ -0,0 +1,54 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisKeys; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.HashOperations; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Component; + +import java.util.Map; +import java.util.concurrent.TimeUnit; + +@Slf4j +@Component +public class IndexCodeFieldReRedis { + @Autowired + private RedisTemplate redisTemplate; + + + /** + * @Description 获取指标code和字段Id的关系 + */ + public Map getIndexCodeFiledReMap() { + HashOperations hashOperations = redisTemplate.opsForHash(); + Map values = hashOperations.entries(RedisKeys.getIndexCodeFieldReKey()); + return values; + } + + /** + * @Description 存入指标code和字段Id的关系 + */ + public void setIndexCodeFiledReMap(Map records) { + HashOperations hashOperations = redisTemplate.opsForHash(); + hashOperations.putAll(RedisKeys.getIndexCodeFieldReKey(), records); + redisTemplate.expire(RedisKeys.getIndexCodeFieldReKey(), 1, TimeUnit.DAYS); + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/CpcIndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/CpcIndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java index bb4bc6e397..d65f6d43db 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/CpcIndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.service.indexcal; import com.epmet.dto.indexcal.CalculateCommonFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java new file mode 100644 index 0000000000..d8a40a8a52 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java @@ -0,0 +1,17 @@ +package com.epmet.service.indexcal; + +import java.util.Map; + +/** + * 党员指标计算service + * + * @author liujianjun@elink-cn.com + * @date 2020/8/18 10:25 + */ +public interface IndexCodeFieldReService { + /** + * desc:获取指标code对应的字段值 + * @return + */ + Map getIndexCodeFieldReList(); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java similarity index 79% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index 476eacb60c..46a25bb129 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,13 +1,13 @@ -package com.epmet.service.screen.impl; +package com.epmet.service.indexcal.impl; import com.alibaba.fastjson.JSON; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; import com.epmet.dao.screen.IndexCodeFieldReDao; -import com.epmet.dao.screen.IndexGroupDetailDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.screen.CpcIndexCalculateService; +import com.epmet.service.indexcal.CpcIndexCalculateService; +import com.epmet.service.screen.IndexGroupDetailService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -25,7 +25,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private IndexCodeFieldReDao indexCodeFieldReDao; @Autowired - private IndexGroupDetailDao indexGroupDetailDao; + private IndexGroupDetailService getDetailListByParentCode; @Override public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) { //计算最大最小值 @@ -35,12 +35,13 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { return false; } //获取指标权重信息 - List indexDetails = indexGroupDetailDao.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + List indexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),IndexCodeEnum.CAN_YU_YI_SHI.getCode()); if (CollectionUtils.isEmpty(indexDetails)){ log.warn("customerId:{} have not any indexGroupDetail",formDTO.getCustomerId()); return false; } + log.info(JSON.toJSONString(minAndMaxList)); Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); return null; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 96b82127c6..8a922020fa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -9,9 +9,6 @@ import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CustomerGridInfoDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexGovrnAblityGridMonthlyDTO; -import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO; -import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.indexcal.GridCorreLationService; @@ -22,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import java.math.BigDecimal; import java.util.List; import java.util.Map; @@ -160,6 +156,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description 分页查询网格列表 * @Date 2020/8/27 14:42 **/ + @Override public List pageGridList(PageQueryGridFormDTO formDTO){ int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); formDTO.setPageIndex(pageIndex); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java new file mode 100644 index 0000000000..047973e066 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java @@ -0,0 +1,28 @@ +package com.epmet.service.indexcal.impl; + +import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.redis.IndexCodeFieldReRedis; +import com.epmet.service.indexcal.IndexCodeFieldReService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.Map; + +@Service +public class IndexCodeFieldReServiceImpl implements IndexCodeFieldReService { + @Autowired + private IndexCodeFieldReDao indexCodeFieldReDao; + + @Autowired + private IndexCodeFieldReRedis indexCodeFieldReRedis; + @Override + public Map getIndexCodeFieldReList() { + Map indexCodeFiledReMap = indexCodeFieldReRedis.getIndexCodeFiledReMap(); + if (CollectionUtils.isEmpty(indexCodeFiledReMap)){ + indexCodeFiledReMap = indexCodeFieldReDao.getAllData(); + indexCodeFieldReRedis.setIndexCodeFiledReMap(indexCodeFiledReMap); + } + return indexCodeFiledReMap; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml index 4186e0e155..c903e17583 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml @@ -3,4 +3,8 @@ + + \ No newline at end of file From 515652ea8128ce102c7d61f4deaf012f17632b2a Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 28 Aug 2020 14:08:57 +0800 Subject: [PATCH 197/360] =?UTF-8?q?=E6=8C=87=E6=A0=87=E8=AE=A1=E7=AE=97red?= =?UTF-8?q?iskey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/indexcal/IndexCodeFieldReService.java | 2 +- .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 7 +++++++ .../service/indexcal/impl/IndexCodeFieldReServiceImpl.java | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java index d8a40a8a52..ef21e6d023 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java @@ -13,5 +13,5 @@ public interface IndexCodeFieldReService { * desc:获取指标code对应的字段值 * @return */ - Map getIndexCodeFieldReList(); + Map getIndexCodeFieldReMap(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index 46a25bb129..8a6de15483 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -7,6 +7,7 @@ import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.indexcal.CpcIndexCalculateService; +import com.epmet.service.indexcal.IndexCodeFieldReService; import com.epmet.service.screen.IndexGroupDetailService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -26,6 +27,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { private IndexCodeFieldReDao indexCodeFieldReDao; @Autowired private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; @Override public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) { //计算最大最小值 @@ -40,7 +43,11 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { log.warn("customerId:{} have not any indexGroupDetail",formDTO.getCustomerId()); return false; } + Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); + if (CollectionUtils.isEmpty(indexCodeFieldReList)) + indexDetails.forEach(indexDetail->{ + }); log.info(JSON.toJSONString(minAndMaxList)); Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java index 047973e066..bc89fd6121 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java @@ -17,7 +17,7 @@ public class IndexCodeFieldReServiceImpl implements IndexCodeFieldReService { @Autowired private IndexCodeFieldReRedis indexCodeFieldReRedis; @Override - public Map getIndexCodeFieldReList() { + public Map getIndexCodeFieldReMap() { Map indexCodeFiledReMap = indexCodeFieldReRedis.getIndexCodeFiledReMap(); if (CollectionUtils.isEmpty(indexCodeFiledReMap)){ indexCodeFiledReMap = indexCodeFieldReDao.getAllData(); From 756be3e5f0e3147633d8531c55f234d5e0f4327d Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 28 Aug 2020 14:19:14 +0800 Subject: [PATCH 198/360] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=8C=87=E6=A0=87cod?= =?UTF-8?q?e=E8=8E=B7=E5=8F=96feild?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/indexcal/IndexCodeFieldReService.java | 7 +++++++ .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 9 ++++++--- .../indexcal/impl/IndexCodeFieldReServiceImpl.java | 12 +++++++++++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java index ef21e6d023..e54f182903 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java @@ -14,4 +14,11 @@ public interface IndexCodeFieldReService { * @return */ Map getIndexCodeFieldReMap(); + + /** + * desc:根据指标code获取 对应的字段 + * @param indexCode + * @return + */ + String getFieldNameByIndexCode(String indexCode); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index 8a6de15483..b03b0f948d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -34,17 +34,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //计算最大最小值 Map minAndMaxList = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxList)){ - log.warn("customerId:{} have not any fact record",formDTO.getCustomerId()); + log.warn("cpcIndexCalculate customerId:{} have not any fact record",formDTO.getCustomerId()); return false; } //获取指标权重信息 List indexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),IndexCodeEnum.CAN_YU_YI_SHI.getCode()); if (CollectionUtils.isEmpty(indexDetails)){ - log.warn("customerId:{} have not any indexGroupDetail",formDTO.getCustomerId()); + log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail",formDTO.getCustomerId()); return false; } Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)) + if (CollectionUtils.isEmpty(indexCodeFieldReList)){ + log.warn("cpcIndexCalculate have any indexcodefieldre"); + return false; + } indexDetails.forEach(indexDetail->{ }); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java index bc89fd6121..46ecffbcae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java @@ -16,13 +16,23 @@ public class IndexCodeFieldReServiceImpl implements IndexCodeFieldReService { @Autowired private IndexCodeFieldReRedis indexCodeFieldReRedis; + @Override public Map getIndexCodeFieldReMap() { Map indexCodeFiledReMap = indexCodeFieldReRedis.getIndexCodeFiledReMap(); - if (CollectionUtils.isEmpty(indexCodeFiledReMap)){ + if (CollectionUtils.isEmpty(indexCodeFiledReMap)) { indexCodeFiledReMap = indexCodeFieldReDao.getAllData(); indexCodeFieldReRedis.setIndexCodeFiledReMap(indexCodeFiledReMap); } return indexCodeFiledReMap; } + + @Override + public String getFieldNameByIndexCode(String indexCode) { + Map indexCodeFieldReMap = this.getIndexCodeFieldReMap(); + if (CollectionUtils.isEmpty(indexCodeFieldReMap)) { + return null; + } + return indexCodeFieldReMap.get(indexCode); + } } From 59ddb2ef4e1cbd626b21528e1734f88aff2be662 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 28 Aug 2020 14:44:06 +0800 Subject: [PATCH 199/360] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E6=8C=87=E6=A0=87cod?= =?UTF-8?q?e=E8=8E=B7=E5=8F=96feild?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dao/screen/IndexCodeFieldReDao.java | 4 ++-- .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 8 ++++++-- .../indexcal/impl/IndexCodeFieldReServiceImpl.java | 10 +++++++++- .../indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml | 4 ++++ .../resources/mapper/screen/IndexCodeFieIdReDao.xml | 5 +++-- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java index 3088f29531..25e10869ed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java @@ -4,10 +4,10 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.screen.IndexCodeFieldReEntity; import org.apache.ibatis.annotations.Mapper; -import java.util.Map; +import java.util.List; @Mapper public interface IndexCodeFieldReDao extends BaseDao { - Map getAllData(); + List getAllData(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index b03b0f948d..0367e90137 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -48,9 +48,13 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { log.warn("cpcIndexCalculate have any indexcodefieldre"); return false; } - indexDetails.forEach(indexDetail->{ + String indexCode = null; + String fieldName = null; + for (IndexGroupDetailEntity indexDetail : indexDetails) { + indexCode = indexDetail.getIndexCode(); + fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); - }); + } log.info(JSON.toJSONString(minAndMaxList)); Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java index 46ecffbcae..94189a9c77 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCodeFieldReServiceImpl.java @@ -1,13 +1,17 @@ package com.epmet.service.indexcal.impl; import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.entity.screen.IndexCodeFieldReEntity; import com.epmet.redis.IndexCodeFieldReRedis; import com.epmet.service.indexcal.IndexCodeFieldReService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.stream.Collectors; @Service public class IndexCodeFieldReServiceImpl implements IndexCodeFieldReService { @@ -21,7 +25,11 @@ public class IndexCodeFieldReServiceImpl implements IndexCodeFieldReService { public Map getIndexCodeFieldReMap() { Map indexCodeFiledReMap = indexCodeFieldReRedis.getIndexCodeFiledReMap(); if (CollectionUtils.isEmpty(indexCodeFiledReMap)) { - indexCodeFiledReMap = indexCodeFieldReDao.getAllData(); + List allData = indexCodeFieldReDao.getAllData(); + if (CollectionUtils.isEmpty(allData)){ + return new HashMap<>(); + } + indexCodeFiledReMap = allData.stream().collect(Collectors.toMap(IndexCodeFieldReEntity::getIndexCode, o -> o.getFieldId())); indexCodeFieldReRedis.setIndexCodeFiledReMap(indexCodeFiledReMap); } return indexCodeFiledReMap; 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 769689fa7f..41946192dd 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 @@ -96,6 +96,10 @@ - SELECT INDEX_CODE,FIELD_ID FROM index_code_field_re WHERE DEL_FLAG = '0'; + + \ No newline at end of file From c1193a6f82540e3c625fd8ad26c9e971174c29a7 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 28 Aug 2020 15:32:32 +0800 Subject: [PATCH 200/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/V0.0.5__up_function_customized_visited.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__up_function_customized_visited.sql diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__up_function_customized_visited.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__up_function_customized_visited.sql new file mode 100644 index 0000000000..e6bf92320c --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__up_function_customized_visited.sql @@ -0,0 +1,7 @@ +ALTER TABLE `function_customized_visited` +MODIFY COLUMN `MSG` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '原因 失败的原因(例:请求超时、404、500等)' AFTER `RESULT`; + + +ALTER TABLE `function_customized_visited` +MODIFY COLUMN `URL` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求地址 访问的url地址' AFTER `FUNCTION_ID`; + From 8cc20b87391d1064e30f1e0d95314a15d06c02fe Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 28 Aug 2020 16:40:28 +0800 Subject: [PATCH 201/360] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexCommunityGovrnFiveScoreDTO.java | 107 ++++++++++ .../FactIndexCommunityPartyFiveScoreDTO.java | 98 +++++++++ .../screen/FactIndexCommunityScoreDTO.java | 107 ++++++++++ ...FactIndexCommunityServiceFiveScoreDTO.java | 107 ++++++++++ .../dto/screen/FactIndexGridScoreDTO.java | 112 ++++++++++ ...munityGovernAbilityCalculateResultDTO.java | 45 ++++ .../CommunityGovernAbilityResultDTO.java | 68 ++++++ ...PublishArticleCountCalculateResultDTO.java | 45 ++++ ...CommunityPublishArticleCountResultDTO.java | 54 +++++ .../result/MaxAndMinDoubleResultDTO.java | 25 +++ .../result/MaxAndMinIntegerResultDTO.java | 25 +++ .../result/SubGridPartyAvgResultDTO.java | 47 +++++ .../java/com/epmet/DataStatsApplication.java | 2 +- .../com/epmet/controller/DemoController.java | 10 + .../FactIndexGovrnAblityOrgMonthlyDao.java | 10 + .../FactIndexPartyAblityOrgMonthlyDao.java | 10 + .../FactIndexCommunityGovrnFiveScoreDao.java | 33 +++ .../FactIndexCommunityPartyFiveScoreDao.java | 45 ++++ .../screen/FactIndexCommunityScoreDao.java | 33 +++ ...FactIndexCommunityServiceFiveScoreDao.java | 33 +++ .../dao/screen/FactIndexGridScoreDao.java | 46 +++++ ...actIndexCommunityGovrnFiveScoreEntity.java | 77 +++++++ ...actIndexCommunityPartyFiveScoreEntity.java | 77 +++++++ .../screen/FactIndexCommunityScoreEntity.java | 77 +++++++ ...tIndexCommunityServiceFiveScoreEntity.java | 77 +++++++ .../screen/FactIndexGridScoreEntity.java | 82 ++++++++ .../IndexCalculateCommunityService.java | 32 +++ .../IndexCalculateCommunityServiceImpl.java | 194 ++++++++++++++++++ .../FactIndexGovrnAblityOrgMonthlyDao.xml | 23 +++ .../FactIndexPartyAblityOrgMonthlyDao.xml | 18 ++ .../FactIndexCommunityGovrnFiveScoreDao.xml | 6 + .../FactIndexCommunityPartyFiveScoreDao.xml | 27 +++ .../screen/FactIndexCommunityScoreDao.xml | 6 + .../FactIndexCommunityServiceFiveScoreDao.xml | 6 + .../mapper/screen/FactIndexGridScoreDao.xml | 20 ++ 35 files changed, 1783 insertions(+), 1 deletion(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityGovernAbilityCalculateResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityGovernAbilityResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountCalculateResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinDoubleResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinIntegerResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityGovrnFiveScoreDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityPartyFiveScoreDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityServiceFiveScoreDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityGovrnFiveScoreEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityPartyFiveScoreEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityServiceFiveScoreEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityGovrnFiveScoreDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityServiceFiveScoreDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexGridScoreDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java new file mode 100644 index 0000000000..bfa52ac370 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java @@ -0,0 +1,107 @@ +/** + * 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.dto.screen; + +import java.io.Serializable; +import lombok.Data; + +/** + * 社区相关-治理能力【五级权重】分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Data +public class FactIndexCommunityGovrnFiveScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 机关iD + */ + private String agencyId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 指标ID + */ + private String indexId; + + /** + * 分数 + */ + private Double score; + + /** + * 社区被吹哨次数:transfered,社区办结项目数:closed_project,社区项目响应度:resp_project_ratio,社区超期项目率:overdue_project_ratio,社区办结项目率:closed_project_ratio,社区办结项目满意度:satisfaction_ratio + */ + private String type; + + /** + * 删除状态,0正常,1删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 更新人 + */ + private String updatedBy ; + + public FactIndexCommunityGovrnFiveScoreDTO() { + this.agencyId = ""; + this.monthId = ""; + this.quarterId = ""; + this.yearId = ""; + this.indexId = ""; + this.score = 0.00; + this.type = ""; + this.delFlag = 0; + this.revision = 0; + this.createdBy = "APP_USER"; + this.updatedBy = "APP_USER"; + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java new file mode 100644 index 0000000000..9ab8f8f744 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java @@ -0,0 +1,98 @@ +/** + * 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.dto.screen; + +import java.io.Serializable; +import java.math.BigDecimal; + +import lombok.Data; + +/** + * 社区相关-党建能力【五级权重】分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Data +public class FactIndexCommunityPartyFiveScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * id + */ + private String id; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 指标ID + */ + private String indexId; + + /** + * 分数 + */ + private BigDecimal score; + + /** + * 发文数量:publish_article + */ + private String type; + + /** + * 删除状态,0正常,1删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 更新人 + */ + private String updatedBy; + + public FactIndexCommunityPartyFiveScoreDTO() { + this.agencyId = ""; + this.monthId = ""; + this.indexId = ""; + this.score = BigDecimal.valueOf(0); + this.type = ""; + this.delFlag = 0; + this.revision = 0; + this.createdBy = "APP_USER"; + this.updatedBy = "APP_USER"; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java new file mode 100644 index 0000000000..805e28ef7f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java @@ -0,0 +1,107 @@ +/** + * 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.dto.screen; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 社区相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Data +public class FactIndexCommunityScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 指标ID + */ + private String indexId; + + /** + * 分数 + */ + private BigDecimal score; + + /** + * 党建能力:party,治理能力:govrn,服务能力:service + */ + private String type; + + /** + * 删除状态,0正常,1删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java new file mode 100644 index 0000000000..a781ad0e4d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java @@ -0,0 +1,107 @@ +/** + * 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.dto.screen; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 社区相关-服务能力【五级权重】分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Data +public class FactIndexCommunityServiceFiveScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 指标ID + */ + private String indexId; + + /** + * 分数 + */ + private BigDecimal score; + + /** + * 社区活动组织次数:activity + */ + private String type; + + /** + * 删除状态,0正常,1删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java new file mode 100644 index 0000000000..6590da34cb --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java @@ -0,0 +1,112 @@ +/** + * 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.dto.screen; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 网格相关分值 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-28 + */ +@Data +public class FactIndexGridScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格所属的机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 总指数分值 + */ + private BigDecimal totalScore; + + /** + * 党建能力分值 + */ + private BigDecimal partyAblityScore; + + /** + * 治理能力分值 + */ + private BigDecimal govrnAblityScore; + + /** + * 服务能力分值 + */ + private BigDecimal serviceAblityScore; + + /** + * 删除标识 0未删除;1已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityGovernAbilityCalculateResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityGovernAbilityCalculateResultDTO.java new file mode 100644 index 0000000000..84ab47503d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityGovernAbilityCalculateResultDTO.java @@ -0,0 +1,45 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/26 1:21 下午 + */ +@Data +public class CommunityGovernAbilityCalculateResultDTO implements Serializable { + + private static final long serialVersionUID = 3766218681545581100L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 分数 + */ + private Double score; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityGovernAbilityResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityGovernAbilityResultDTO.java new file mode 100644 index 0000000000..92b80e3ecf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityGovernAbilityResultDTO.java @@ -0,0 +1,68 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/26 11:20 上午 + */ +@Data +public class CommunityGovernAbilityResultDTO implements Serializable { + + /** + * 机关ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 社区被吹哨次数 + */ + private Integer transferedCount; + + /** + * 社区办结项目数 + */ + private Integer closedProjectCount; + + /** + * 社区项目响应度 + */ + private Double respProjectRatio; + + /** + * 社区项目超期率 + */ + private Double overDueProjectRatio; + + /** + * 社区办结项目率 + */ + private Double closedProjectRatio; + + /** + * 社区办结项目满意度 + */ + private Double satisfactionRatio; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountCalculateResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountCalculateResultDTO.java new file mode 100644 index 0000000000..148d6abd80 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountCalculateResultDTO.java @@ -0,0 +1,45 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:43 上午 + */ +@Data +public class CommunityPublishArticleCountCalculateResultDTO implements Serializable { + + private static final long serialVersionUID = 3527690541253204132L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 分数 + */ + private Double score; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountResultDTO.java new file mode 100644 index 0000000000..fe50bbf597 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountResultDTO.java @@ -0,0 +1,54 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:37 上午 + */ +@Data +public class CommunityPublishArticleCountResultDTO implements Serializable { + + private static final long serialVersionUID = -8260746179353253237L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 发文数 + */ + public Integer publishArticleCount; + + public CommunityPublishArticleCountResultDTO() { + this.agencyId = ""; + this.parentId = ""; + this.monthId = ""; + this.quarterId = ""; + this.yearId = ""; + this.publishArticleCount = 0; + } +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinDoubleResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinDoubleResultDTO.java new file mode 100644 index 0000000000..32b429f188 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinDoubleResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/28 9:51 上午 + */ +@Data +public class MaxAndMinDoubleResultDTO implements Serializable { + + private static final long serialVersionUID = -3927045097012156582L; + + /** + * 最小值 + */ + private Double min; + + /** + * 最大值 + */ + private Double max; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinIntegerResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinIntegerResultDTO.java new file mode 100644 index 0000000000..d807e42344 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinIntegerResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/28 9:49 上午 + */ +@Data +public class MaxAndMinIntegerResultDTO implements Serializable { + + private static final long serialVersionUID = 5845694081181431599L; + + /** + * 最小值 + */ + private Integer min; + + /** + * 最大值 + */ + private Integer max; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java new file mode 100644 index 0000000000..38263c4dc1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Author zxc + * @DateTime 2020/8/28 3:15 下午 + */ +@Data +public class SubGridPartyAvgResultDTO implements Serializable { + + private static final long serialVersionUID = 1592381327492545907L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 分数 + */ + private BigDecimal score; + +} 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 eee1f3bca7..b11253b6e4 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 @@ -17,6 +17,6 @@ public class DataStatsApplication { public static void main(String[] args) { SpringApplication.run(DataStatsApplication.class ,args); - HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() +" 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/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 6ed40fc377..4932fb509e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.AgencySubTreeDto; import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.service.StatsDemoService; +import com.epmet.service.screen.IndexCalculateCommunityService; import com.epmet.service.stats.DimAgencyService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -32,6 +33,8 @@ public class DemoController { @Autowired private DimAgencyService dimAgencyService; + @Autowired + private IndexCalculateCommunityService indexCalculateCommunityService; @GetMapping("testAlarm") public void testAlarm() { @@ -108,4 +111,11 @@ public class DemoController { List list = dimAgencyService.getAgencyListByCustomerId("ba7c0b5b21e882b263ee8456e2cfb63e"); return new Result().ok(list); } + + @PostMapping("zxc") + public Result getZxc(){ +// indexCalculateCommunityService.communityPublishArticleCountCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + indexCalculateCommunityService.communityPublishArticleCountCalculate("","202008"); + return new Result(); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java index 9013d4f9cf..fa9b8569b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java @@ -19,6 +19,7 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgGovrnAbilityFormDTO; +import com.epmet.dto.screen.result.CommunityGovernAbilityResultDTO; import com.epmet.entity.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -61,4 +62,13 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao list, @Param("customerId")String customerId); + + /** + * @Description 社区治理能力各个参数查询【被吹哨次数、办结项目数、项目响应度、超期项目率、办结项目率、办结项目满意度】 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + List selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 73a73a1c50..144ecd1d0a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -19,6 +19,7 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgPartyAbilityFormDTO; +import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; import com.epmet.entity.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -62,4 +63,13 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao list, @Param("customerId")String customerId); + + /** + * @Description 查询社区下的发文数 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 10:49 上午 + */ + List selectPublishArticleCount(@Param("customerId")String customerId, @Param("monthId")String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityGovrnFiveScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityGovrnFiveScoreDao.java new file mode 100644 index 0000000000..52cd149927 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityGovrnFiveScoreDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.FactIndexCommunityGovrnFiveScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 社区相关-治理能力【五级权重】分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Mapper +public interface FactIndexCommunityGovrnFiveScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityPartyFiveScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityPartyFiveScoreDao.java new file mode 100644 index 0000000000..4c628a1ec0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityPartyFiveScoreDao.java @@ -0,0 +1,45 @@ +/** + * 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.screen.FactIndexCommunityPartyFiveScoreDTO; +import com.epmet.entity.screen.FactIndexCommunityPartyFiveScoreEntity; +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-27 + */ +@Mapper +public interface FactIndexCommunityPartyFiveScoreDao extends BaseDao { + + /** + * @Description 党建能力【社区】中间表插入 + * @param lists + * @author zxc + * @date 2020/8/27 5:05 下午 + */ + void insertCommunityPartyRecord(@Param("lists")List lists); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java new file mode 100644 index 0000000000..9ea796d24a --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.FactIndexCommunityScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 社区相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Mapper +public interface FactIndexCommunityScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityServiceFiveScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityServiceFiveScoreDao.java new file mode 100644 index 0000000000..97a03ad2c9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityServiceFiveScoreDao.java @@ -0,0 +1,33 @@ +/** + * 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.entity.screen.FactIndexCommunityServiceFiveScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 社区相关-服务能力【五级权重】分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Mapper +public interface FactIndexCommunityServiceFiveScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java new file mode 100644 index 0000000000..b95b41ff55 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java @@ -0,0 +1,46 @@ +/** + * 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.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.entity.screen.FactIndexGridScoreEntity; +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-28 + */ +@Mapper +public interface FactIndexGridScoreDao extends BaseDao { + + /** + * @Description 下属所有网格的党建能力平均值 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/28 3:20 下午 + */ + List selectSubGridPartyAvgScore(@Param("customerId")String customerId,@Param("monthId")String monthId); + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityGovrnFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityGovrnFiveScoreEntity.java new file mode 100644 index 0000000000..bf0bcbeac0 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityGovrnFiveScoreEntity.java @@ -0,0 +1,77 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 社区相关-治理能力【五级权重】分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_community_govrn_five_score") +public class FactIndexCommunityGovrnFiveScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 机关iD + */ + private String agencyId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 指标ID + */ + private String indexId; + + /** + * 分数 + */ + private BigDecimal score; + + /** + * 社区被吹哨次数:transfered,社区办结项目数:closed_project,社区项目响应度:resp_project_ratio,社区超期项目率:overdue_project_ratio,社区办结项目率:closed_project_ratio,社区办结项目满意度:satisfaction_ratio + */ + private String type; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityPartyFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityPartyFiveScoreEntity.java new file mode 100644 index 0000000000..c42849dd0b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityPartyFiveScoreEntity.java @@ -0,0 +1,77 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 社区相关-党建能力【五级权重】分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_community_party_five_score") +public class FactIndexCommunityPartyFiveScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 指标ID + */ + private String indexId; + + /** + * 分数 + */ + private BigDecimal score; + + /** + * 发文数量:publish_article + */ + private String type; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java new file mode 100644 index 0000000000..1c3899ef2d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java @@ -0,0 +1,77 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 社区相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_community_score") +public class FactIndexCommunityScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 月份ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 指标ID + */ + private String indexId; + + /** + * 分数 + */ + private BigDecimal score; + + /** + * 党建能力:party,治理能力:govrn,服务能力:service + */ + private String type; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityServiceFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityServiceFiveScoreEntity.java new file mode 100644 index 0000000000..8d0fb8857f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityServiceFiveScoreEntity.java @@ -0,0 +1,77 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 社区相关-服务能力【五级权重】分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_community_service_five_score") +public class FactIndexCommunityServiceFiveScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 指标ID + */ + private String indexId; + + /** + * 分数 + */ + private BigDecimal score; + + /** + * 社区活动组织次数:activity + */ + private String type; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java new file mode 100644 index 0000000000..99bc4d0ed1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java @@ -0,0 +1,82 @@ +/** + * 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.math.BigDecimal; +import java.util.Date; + +/** + * 网格相关分值 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-28 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_grid_score") +public class FactIndexGridScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格所属的机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 总指数分值 + */ + private BigDecimal totalScore; + + /** + * 党建能力分值 + */ + private BigDecimal partyAblityScore; + + /** + * 治理能力分值 + */ + private BigDecimal govrnAblityScore; + + /** + * 服务能力分值 + */ + private BigDecimal serviceAblityScore; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java new file mode 100644 index 0000000000..daf11c1519 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java @@ -0,0 +1,32 @@ +package com.epmet.service.screen; + +import com.epmet.dto.screen.result.CommunityGovernAbilityCalculateResultDTO; +import com.epmet.dto.screen.result.CommunityPublishArticleCountCalculateResultDTO; + +import java.util.List; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:33 上午 + */ +public interface IndexCalculateCommunityService { + + /** + * @Description 社区名义发文数量计算 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + void communityPublishArticleCountCalculate(String customerId, String monthId); + + /** + * @Description 社区治理能力 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + void CommunityGovernAbilityCalculate(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..543def9d3b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,194 @@ +package com.epmet.service.screen.impl; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dao.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.screen.*; +import com.epmet.dto.indexcal.ExtremeValueCommonDTO; +import com.epmet.dto.screen.FactIndexCommunityPartyFiveScoreDTO; +import com.epmet.dto.screen.result.*; +import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.indexcal.IndexCodeFieldReService; +import com.epmet.service.screen.IndexCalculateCommunityService; +import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.IntegerScoreCalculator; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import io.swagger.models.auth.In; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityPartyFiveScoreDao factIndexCommunityPartyFiveScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + @Autowired + private FactIndexCommunityServiceFiveScoreDao factIndexCommunityServiceFiveScoreDao; + @Autowired + private FactIndexCommunityGovrnFiveScoreDao factIndexCommunityGovrnFiveScoreDao; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + + /** + * @Description 社区名义发文数量计算【党建能力】 + * @param customerId + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void communityPublishArticleCountCalculate(String customerId, String monthId) { + customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(),IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + + List subAllGridList = new ArrayList<>(); + List communityPublishArticle = new ArrayList<>(); + + // todo 下属所有网格的党建能力平均值 + String finalCustomerId = customerId; + detailListByParentCode.forEach(indexGroup -> { + if (indexGroup.getIndexCode().equals("xiazhusuoyouwgddjnlpjz")){ + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(finalCustomerId, monthId); + subGridPartyAvgScore.forEach(subGridParty -> { + BigDecimal multiply = subGridParty.getScore().multiply(indexGroup.getWeight()); + subGridParty.setScore(multiply); + FactIndexCommunityPartyFiveScoreDTO dto = new FactIndexCommunityPartyFiveScoreDTO(); + BeanUtils.copyProperties(subGridParty,dto); + dto.setType("sub_all_grid_party_avg"); + dto.setIndexId(indexGroup.getIndexId()); + subAllGridList.add(dto); + }); + factIndexCommunityPartyFiveScoreDao.insertCommunityPartyRecord(subAllGridList); + } + }); + + List publishArticleCounts = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCount(customerId, monthId); + detailListByParentCode.forEach(indexGroup -> { + if (indexGroup.getIndexCode().equals("shequmingyifwsl")) { + if (publishArticleCounts.size() == NumConstant.ONE) { + //TODO 计算之后的分数 + FactIndexCommunityPartyFiveScoreDTO dto = new FactIndexCommunityPartyFiveScoreDTO(); + BeanUtils.copyProperties(detailListByParentCode.get(NumConstant.ZERO), dto); + dto.setScore(BigDecimal.valueOf(50.00)); + dto.setType("publish_article_count"); + dto.setIndexId(detailListByParentCode.get(NumConstant.ZERO).getIndexId()); + communityPublishArticle.add(dto); + factIndexCommunityPartyFiveScoreDao.insertCommunityPartyRecord(communityPublishArticle); + } else if (publishArticleCounts.size() != NumConstant.ZERO) { + Integer indexStart = NumConstant.ZERO; + Integer indexEnd = NumConstant.TEN; + List collect; + MaxAndMinIntegerResultDTO maxAndMinInteger = this.getMaxAndMinInteger(publishArticleCounts.stream().map(CommunityPublishArticleCountResultDTO::getPublishArticleCount).collect(Collectors.toList())); + do { + collect = publishArticleCounts.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); + ScoreCalculator sc1 = new IntegerScoreCalculator(maxAndMinInteger.getMin(), maxAndMinInteger.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List> ll = new ArrayList<>(); + collect.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getPublishArticleCount()); + ll.add(s); + }); + IndexInputVO index1VO = new IndexInputVO<>(indexGroup.getIndexId(), ll, indexGroup.getWeight(), sc1); + List indexInputVOS = Arrays.asList(index1VO); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + List result = batchScoreCalculator.exec(indexInputVOS); + + indexStart++; + } while (collect.size() == 10); + } + } + }); + + + + } + + /** + * @Description 社区治理能力 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void CommunityGovernAbilityCalculate(String customerId, String monthId) { + List communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId); + if (communityGovernAbility.size() == NumConstant.ONE){ + List result = new ArrayList<>(); + CommunityGovernAbilityCalculateResultDTO governAbility = new CommunityGovernAbilityCalculateResultDTO(); + BeanUtils.copyProperties(communityGovernAbility.get(NumConstant.ZERO),governAbility); + + // TODO 计算之后的分数 + + result.add(governAbility); + + } + + } + + /** + * @Description Integer类型获取最大数和最小数 + * @param list + * @author zxc + * @date 2020/8/27 1:30 下午 + */ + public MaxAndMinIntegerResultDTO getMaxAndMinInteger(List list){ + Integer max = Collections.max(list); + Integer min = Collections.min(list); + MaxAndMinIntegerResultDTO result = new MaxAndMinIntegerResultDTO(); + result.setMax(max); + result.setMin(min); + return result; + } + + /** + * @Description Double类型获取最大数和最小数 + * @param list + * @author zxc + * @date 2020/8/27 1:32 下午 + */ + public MaxAndMinDoubleResultDTO getMaxAndMinDouble(List list){ + Double max = Collections.max(list); + Double min = Collections.min(list); + MaxAndMinDoubleResultDTO result = new MaxAndMinDoubleResultDTO(); + result.setMax(max); + result.setMin(min); + return result; + } + + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index 36e4d07b3a..11b87f6eb8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -85,4 +85,27 @@ ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 758a686052..ff41b99bd4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -71,4 +71,22 @@ + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityGovrnFiveScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityGovrnFiveScoreDao.xml new file mode 100644 index 0000000000..721b8181ef --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityGovrnFiveScoreDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml new file mode 100644 index 0000000000..f2bab458f6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml @@ -0,0 +1,27 @@ + + + + + + + + INSERT INTO fact_index_community_party_five_score ( ID, AGENCY_ID, MONTH_ID, INDEX_ID, SCORE, TYPE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + VALUES + + ( + REPLACE ( UUID(), '-', '' ), + #{item.agencyId}, + #{item.monthId}, + #{item.indexId}, + #{item.score}, + #{item.type}, + #{item.delFlag}, + #{item.revision}, + #{item.createdBy}, + NOW(), + #{item.updatedBy}, + NOW() + ) + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml new file mode 100644 index 0000000000..54611e0f02 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityServiceFiveScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityServiceFiveScoreDao.xml new file mode 100644 index 0000000000..509f723548 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityServiceFiveScoreDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexGridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexGridScoreDao.xml new file mode 100644 index 0000000000..7e4ad04732 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexGridScoreDao.xml @@ -0,0 +1,20 @@ + + + + + + + + \ No newline at end of file From 2f199563266d8df935c582d756f8b653d88e73e4 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 28 Aug 2020 17:38:14 +0800 Subject: [PATCH 202/360] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E8=B0=83=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/EpmetHeartOpenFeignClient.java | 13 +++++ .../EpmetHeartOpenFeignClientFallback.java | 6 +++ .../controller/ResiActListController.java | 13 +++++ .../main/java/com/epmet/dao/ActInfoDao.java | 9 ++++ .../com/epmet/service/ActInfoService.java | 9 ++++ .../service/impl/ActInfoServiceImpl.java | 5 ++ .../src/main/resources/mapper/ActInfoDao.xml | 8 +++ epmet-module/gov-org/gov-org-server/pom.xml | 6 +++ .../com/epmet/dao/CustomerDepartmentDao.java | 9 ++++ .../java/com/epmet/dao/CustomerGridDao.java | 18 +++++++ .../service/CustomerDepartmentService.java | 10 ++++ .../epmet/service/CustomerGridService.java | 9 ++++ .../impl/CustomerDepartmentServiceImpl.java | 24 +++++++++ .../service/impl/CustomerGridServiceImpl.java | 13 +++++ .../epmet/service/impl/StaffServiceImpl.java | 52 +++++++++++++++---- .../mapper/CustomerDepartmentDao.xml | 5 ++ .../main/resources/mapper/CustomerGridDao.xml | 17 ++++++ 17 files changed, 216 insertions(+), 10 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index 267de1b18d..8043413311 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -2,9 +2,11 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.ActInfoDTO; import com.epmet.dto.form.CommonCustomerFormDTO; import com.epmet.feign.fallback.EpmetHeartOpenFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -28,4 +30,15 @@ public interface EpmetHeartOpenFeignClient { **/ @PostMapping("/heart/resi/volunteer/volunteeruserids") Result> volunteerUserIds(@RequestBody CommonCustomerFormDTO customerFormDTO); + + /** + * 查询用户创建的未结束的活动 + * + * @author zhaoqifeng + * @date 2020/8/28 14:38 + * @param staffId + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("/heart/resi/act/published/{staffId}") + Result> getPublishedAct(@PathVariable String staffId); } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index 7208b30d92..8c4f0be34a 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -3,6 +3,7 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.ActInfoDTO; import com.epmet.dto.form.CommonCustomerFormDTO; import com.epmet.feign.EpmetHeartOpenFeignClient; import org.springframework.stereotype.Component; @@ -29,4 +30,9 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli public Result> volunteerUserIds(CommonCustomerFormDTO customerFormDTO) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "volunteerUserIds", customerFormDTO); } + + @Override + public Result> getPublishedAct(String staffId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getPublishedAct", staffId); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java index e0f41b198d..73fe6adeb8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java @@ -3,6 +3,7 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.ActInfoDTO; import com.epmet.dto.form.resi.*; import com.epmet.dto.result.resi.*; import com.epmet.service.*; @@ -331,4 +332,16 @@ public class ResiActListController { ValidatorUtils.validateEntity(formDTO, ResiActContentFormDTO.AddUserInternalGroup.class); return actInfoService.checkSignInTime(formDTO); } + + /** + * 查询用户创建的未结束的活动 + * @author zhaoqifeng + * @date 2020/8/28 14:37 + * @param staffId + * @return com.epmet.commons.tools.utils.Result> + */ + @PostMapping("published/{staffId}") + public Result> getPublishedAct(@PathVariable String staffId) { + return new Result>().ok(actInfoService.getPublishedAct(staffId)); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java index b4fea5476a..2a1522348e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java @@ -310,4 +310,13 @@ public interface ActInfoDao extends BaseDao { * @Date 11:00 2020-07-20 **/ List selectListLookBackActAssembly(ResiLatestActFormDTO formDTO); + + /** + * 查询用户创建的未结束的活动 + * @author zhaoqifeng + * @date 2020/8/28 14:27 + * @param staffId + * @return java.util.List + */ + List selectPublishedAct(@Param("staffId") String staffId); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActInfoService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActInfoService.java index d1f698480d..dc36ccda4f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActInfoService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActInfoService.java @@ -245,4 +245,13 @@ public interface ActInfoService extends BaseService { * @Date 15:03 2020-08-05 **/ Result checkSignInTime(ResiActContentFormDTO formDTO); + + /** + * 查询用户创建的未结束的活动 + * @author zhaoqifeng + * @date 2020/8/28 14:32 + * @param staffId + * @return java.util.List + */ + List getPublishedAct(String staffId); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java index 0691836f68..9f3649d421 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java @@ -416,4 +416,9 @@ public class ActInfoServiceImpl extends BaseServiceImpl().ok(resultDTO); } + + @Override + public List getPublishedAct(String staffId) { + return baseDao.selectPublishedAct(staffId); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index 20bc885ec1..4ce15b04c7 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -758,4 +758,12 @@ ORDER BY a.CREATED_TIME DESC LIMIT 0, #{num} + diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index d7a0b5fc61..a9856a4056 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -89,6 +89,12 @@ 2.0.0 compile + + com.epmet + epmet-heart-client + 2.0.0 + compile + diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java index 2debda4fce..12d2b81c7e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java @@ -84,4 +84,13 @@ public interface CustomerDepartmentDao extends BaseDao * @Description 查询机关下部门列表信息 **/ List selectAgencyDeptMsgList(@Param("agencyId") String agencyId); + + /** + * 删除工作人员与部门关联 + * @author zhaoqifeng + * @date 2020/8/28 15:12 + * @param staffId + * @return void + */ + void deleteStaffDep(@Param("staffId") String staffId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java index 1d50d1453a..ec450bfa63 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java @@ -224,4 +224,22 @@ public interface CustomerGridDao extends BaseDao { * @date 2020/8/12 5:10 下午 */ Integer selectGridCount(@Param("customerId")String customerId); + + /** + * 删除工作人员与网格关联 + * @author zhaoqifeng + * @date 2020/8/28 15:32 + * @param staffId + * @return void + */ + void deleteGridStaff(@Param("staffId") String staffId); + + /** + * 查询工作人员所在网格 + * @author zhaoqifeng + * @date 2020/8/28 15:41 + * @param staffId + * @return java.util.List + */ + List selectGridByStaff(@Param("staffId") String staffId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerDepartmentService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerDepartmentService.java index 9722ca82af..bcb0267e38 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerDepartmentService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerDepartmentService.java @@ -92,4 +92,14 @@ public interface CustomerDepartmentService extends BaseService { * @date 2020/8/14 9:31 上午 */ CustomerGridCountResultDTO selectGridCount( CustomerIdFormDTO customerIdFormDTO); + + /** + * 更新网格工作人员关系 + * @author zhaoqifeng + * @date 2020/8/28 15:36 + * @param staffId + * @return void + */ + void updateGrid(String staffId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerDepartmentServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerDepartmentServiceImpl.java index e3b81d7432..a236f77464 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerDepartmentServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerDepartmentServiceImpl.java @@ -20,11 +20,13 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.CustomerDepartmentDao; import com.epmet.dto.CustomerDepartmentDTO; +import com.epmet.dto.result.DepartmentListResultDTO; import com.epmet.entity.CustomerDepartmentEntity; import com.epmet.redis.CustomerDepartmentRedis; import com.epmet.service.CustomerDepartmentService; @@ -33,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -101,4 +104,25 @@ public class CustomerDepartmentServiceImpl extends BaseServiceImpl list = baseDao.listDepartmentListByStaffId(staffId); + if (null != list && list.size() > NumConstant.ZERO) { + List entityList = new ArrayList<>(); + for (DepartmentListResultDTO dto : list) { + CustomerDepartmentEntity entity = new CustomerDepartmentEntity(); + entity.setId(dto.getDepartmentId()); + entity.setTotalUser(dto.getTotalUser() - NumConstant.ONE); + entityList.add(entity); + } + //更新部门总人数 + updateBatchById(entityList); + //删除工作人员与部门关联 + baseDao.deleteStaffDep(staffId); + } + } + + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java index afece523c4..215e32b471 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java @@ -649,4 +649,17 @@ public class CustomerGridServiceImpl extends BaseServiceImpl gridList = baseDao.selectGridByStaff(staffId); + if(null != gridList && gridList.size() > NumConstant.ZERO) { + gridList.forEach(entity -> { + entity.setTotalUser(entity.getTotalUser() - 1); + }); + updateBatchById(gridList); + baseDao.deleteGridStaff(staffId); + } + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java index 53cf6d9b14..cae5e05475 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java @@ -5,19 +5,16 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.CustomerAgencyDTO; -import com.epmet.dto.CustomerStaffAgencyDTO; -import com.epmet.dto.CustomerStaffDTO; +import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.CustomerStaffAgencyEntity; +import com.epmet.feign.EpmetHeartOpenFeignClient; import com.epmet.feign.EpmetUserFeignClient; import com.epmet.feign.GovProjectOpenFeignClient; import com.epmet.feign.OperCrmFeignClient; -import com.epmet.service.CustomerAgencyService; -import com.epmet.service.CustomerStaffAgencyService; -import com.epmet.service.StaffService; +import com.epmet.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -43,6 +40,14 @@ public class StaffServiceImpl implements StaffService { private CustomerStaffAgencyService customerStaffAgencyService; @Autowired private GovProjectOpenFeignClient govProjectOpenFeignClient; + @Autowired + private EpmetHeartOpenFeignClient epmetHeartOpenFeignClient; + @Autowired + private CustomerDepartmentService customerDepartmentService; + @Autowired + private CustomerGridService customerGridService; + @Autowired + private StaffTransferRecordService staffTransferRecordService; @Override public Result getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { @@ -188,6 +193,7 @@ public class StaffServiceImpl implements StaffService { } @Override + @Transactional(rollbackFor = Exception.class) public void staffTransfer(TokenDto tokenDto, StaffTransferFormDTO fromDTO) { //1.获取工作人员与机关关系 CustomerStaffAgencyDTO staffAgencyDTO = customerStaffAgencyService.getInfoByUserId(fromDTO.getStaffId()); @@ -206,11 +212,37 @@ public class StaffServiceImpl implements StaffService { throw new RenException(EpmetErrorCode.EXIT_PEND_PROJECT.getCode()); } //3.查询是否有活动未结束 - + Result> actInfoResult = epmetHeartOpenFeignClient.getPublishedAct(fromDTO.getStaffId()); + if (!actInfoResult.success()) { + throw new RenException(actInfoResult.getCode(), actInfoResult.getMsg()); + } + if (null != actInfoResult.getData() && actInfoResult.getData().size() > NumConstant.ZERO) { + throw new RenException(EpmetErrorCode.EXIT_PUBLISHED_ACTIVITY.getCode()); + } //4.修改人员所属组织 - - //5.逻辑删除工作人员原组织加入的部门、网格,组织人员总数旧的减1新的加1,部门、网格总人数减1 - + CustomerStaffAgencyDTO staffAgency = new CustomerStaffAgencyDTO(); + staffAgency.setId(staffAgencyDTO.getId()); + staffAgency.setAgencyId(fromDTO.getAgencyId()); + customerStaffAgencyService.update(staffAgency); + //原来组织总人数减一 + CustomerAgencyDTO oldAgencyDTO = customerAgencyService.get(oldAgency); + oldAgencyDTO.setTotalUser(oldAgencyDTO.getTotalUser() - NumConstant.ONE); + customerAgencyService.update(oldAgencyDTO); + //新组织总人数加一 + CustomerAgencyDTO newAgencyDTO = customerAgencyService.get(fromDTO.getAgencyId()); + newAgencyDTO.setTotalUser(newAgencyDTO.getTotalUser() - NumConstant.ONE); + customerAgencyService.update(newAgencyDTO); + //5.逻辑删除工作人员原组织加入的部门、网格,部门、网格总人数减1 + customerDepartmentService.updateDepartment(fromDTO.getStaffId()); + customerGridService.updateGrid(fromDTO.getStaffId()); //6.操作记录表新增调动记录 + StaffTransferRecordDTO staffTransferRecordDTO = new StaffTransferRecordDTO(); + staffTransferRecordDTO.setCustomerId(tokenDto.getCustomerId()); + staffTransferRecordDTO.setOperateStaffId(tokenDto.getUserId()); + staffTransferRecordDTO.setOperatedStaffId(fromDTO.getStaffId()); + staffTransferRecordDTO.setOldAgencyId(oldAgency); + staffTransferRecordDTO.setAgencyId(fromDTO.getAgencyId()); + staffTransferRecordDTO.setRemarks(fromDTO.getRemarks()); + staffTransferRecordService.save(staffTransferRecordDTO); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml index a31747facc..bf175e9127 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml @@ -2,6 +2,10 @@ + + UPDATE customer_staff_department SET DEL_FLAG = '1' + WHERE USER_ID = #{staffId} AND DEL_FLAG = '0' + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index b9a98117e1..422984c415 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -2,6 +2,10 @@ + + UPDATE customer_staff_grid SET DEL_FLAG = '1' + WHERE USER_ID = #{staffId} AND DEL_FLAG = '0' + + \ No newline at end of file From 1485154ea3c9a0268859b59a3f2bcf5d3e4e626a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 28 Aug 2020 17:57:40 +0800 Subject: [PATCH 203/360] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexCommunityGovrnFiveScoreDTO.java | 30 +++++++------ .../FactIndexCommunityPartyFiveScoreDTO.java | 24 ++++++++--- ...FactIndexCommunityServiceFiveScoreDTO.java | 20 ++++----- .../IndexCalculateCommunityServiceImpl.java | 43 +++++++++++++------ .../FactIndexCommunityPartyFiveScoreDao.xml | 6 +-- 5 files changed, 76 insertions(+), 47 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java index bfa52ac370..5f2fbf85b7 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java @@ -18,6 +18,8 @@ package com.epmet.dto.screen; import java.io.Serializable; +import java.math.BigDecimal; + import lombok.Data; /** @@ -47,29 +49,29 @@ public class FactIndexCommunityGovrnFiveScoreDTO implements Serializable { private String monthId; /** - * 季度ID + * 指标ID */ - private String quarterId; + private String indexId; /** - * 年度ID + * 总指数分值 */ - private String yearId; + private BigDecimal totalScore; /** - * 指标ID + * 党建能力分值 */ - private String indexId; + private BigDecimal partyAbilityScore; /** - * 分数 + * 治理能力分值 */ - private Double score; + private BigDecimal govrnAbilityScore; /** - * 社区被吹哨次数:transfered,社区办结项目数:closed_project,社区项目响应度:resp_project_ratio,社区超期项目率:overdue_project_ratio,社区办结项目率:closed_project_ratio,社区办结项目满意度:satisfaction_ratio + * 服务能力分值 */ - private String type; + private BigDecimal serviceAbilityScore; /** * 删除状态,0正常,1删除 @@ -94,11 +96,11 @@ public class FactIndexCommunityGovrnFiveScoreDTO implements Serializable { public FactIndexCommunityGovrnFiveScoreDTO() { this.agencyId = ""; this.monthId = ""; - this.quarterId = ""; - this.yearId = ""; this.indexId = ""; - this.score = 0.00; - this.type = ""; + this.totalScore = new BigDecimal(0); + this.partyAbilityScore = new BigDecimal(0); + this.govrnAbilityScore = new BigDecimal(0); + this.serviceAbilityScore = new BigDecimal(0); this.delFlag = 0; this.revision = 0; this.createdBy = "APP_USER"; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java index 9ab8f8f744..79024c60ca 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java @@ -54,14 +54,24 @@ public class FactIndexCommunityPartyFiveScoreDTO implements Serializable { private String indexId; /** - * 分数 + * 总指数分值 */ - private BigDecimal score; + private BigDecimal totalScore; /** - * 发文数量:publish_article + * 党建能力分值 */ - private String type; + private BigDecimal partyAbilityScore; + + /** + * 治理能力分值 + */ + private BigDecimal govrnAbilityScore; + + /** + * 服务能力分值 + */ + private BigDecimal serviceAbilityScore; /** * 删除状态,0正常,1删除 @@ -87,8 +97,10 @@ public class FactIndexCommunityPartyFiveScoreDTO implements Serializable { this.agencyId = ""; this.monthId = ""; this.indexId = ""; - this.score = BigDecimal.valueOf(0); - this.type = ""; + this.totalScore = new BigDecimal(0); + this.partyAbilityScore = new BigDecimal(0); + this.govrnAbilityScore = new BigDecimal(0); + this.serviceAbilityScore = new BigDecimal(0); this.delFlag = 0; this.revision = 0; this.createdBy = "APP_USER"; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java index a781ad0e4d..1eb6386bcc 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java @@ -50,29 +50,29 @@ public class FactIndexCommunityServiceFiveScoreDTO implements Serializable { private String monthId; /** - * 季度ID + * 指标ID */ - private String quarterId; + private String indexId; /** - * 年度ID + * 总指数分值 */ - private String yearId; + private BigDecimal totalScore; /** - * 指标ID + * 党建能力分值 */ - private String indexId; + private BigDecimal partyAbilityScore; /** - * 分数 + * 治理能力分值 */ - private BigDecimal score; + private BigDecimal govrnAbilityScore; /** - * 社区活动组织次数:activity + * 服务能力分值 */ - private String type; + private BigDecimal serviceAbilityScore; /** * 删除状态,0正常,1删除 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java index 543def9d3b..31a1cfe543 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java @@ -72,27 +72,31 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni @Override public void communityPublishArticleCountCalculate(String customerId, String monthId) { customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + + // 党建能力 // 根据all_parent_index_code 获取指标明细 List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(),IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); List subAllGridList = new ArrayList<>(); List communityPublishArticle = new ArrayList<>(); - // todo 下属所有网格的党建能力平均值 + //下属所有网格的党建能力平均值 String finalCustomerId = customerId; detailListByParentCode.forEach(indexGroup -> { if (indexGroup.getIndexCode().equals("xiazhusuoyouwgddjnlpjz")){ List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(finalCustomerId, monthId); - subGridPartyAvgScore.forEach(subGridParty -> { - BigDecimal multiply = subGridParty.getScore().multiply(indexGroup.getWeight()); - subGridParty.setScore(multiply); - FactIndexCommunityPartyFiveScoreDTO dto = new FactIndexCommunityPartyFiveScoreDTO(); - BeanUtils.copyProperties(subGridParty,dto); - dto.setType("sub_all_grid_party_avg"); - dto.setIndexId(indexGroup.getIndexId()); - subAllGridList.add(dto); - }); - factIndexCommunityPartyFiveScoreDao.insertCommunityPartyRecord(subAllGridList); + if (subGridPartyAvgScore.size() != NumConstant.ZERO){ + subGridPartyAvgScore.forEach(subGridParty -> { + BigDecimal multiply = subGridParty.getScore().multiply(indexGroup.getWeight()); + subGridParty.setScore(multiply); + FactIndexCommunityPartyFiveScoreDTO dto = new FactIndexCommunityPartyFiveScoreDTO(); + BeanUtils.copyProperties(subGridParty,dto); + dto.setIndexId(indexGroup.getIndexId()); + dto.setTotalScore(dto.getPartyAbilityScore()); + subAllGridList.add(dto); + }); + factIndexCommunityPartyFiveScoreDao.insertCommunityPartyRecord(subAllGridList); + } } }); @@ -103,8 +107,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni //TODO 计算之后的分数 FactIndexCommunityPartyFiveScoreDTO dto = new FactIndexCommunityPartyFiveScoreDTO(); BeanUtils.copyProperties(detailListByParentCode.get(NumConstant.ZERO), dto); - dto.setScore(BigDecimal.valueOf(50.00)); - dto.setType("publish_article_count"); + dto.setPartyAbilityScore(BigDecimal.valueOf(50.00)); dto.setIndexId(detailListByParentCode.get(NumConstant.ZERO).getIndexId()); communityPublishArticle.add(dto); factIndexCommunityPartyFiveScoreDao.insertCommunityPartyRecord(communityPublishArticle); @@ -120,14 +123,26 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni collect.forEach(c -> { SampleValue s = new SampleValue(c.getAgencyId(), c.getPublishArticleCount()); ll.add(s); + FactIndexCommunityPartyFiveScoreDTO publishArticle = new FactIndexCommunityPartyFiveScoreDTO(); + BeanUtils.copyProperties(c,publishArticle); + communityPublishArticle.add(publishArticle); }); IndexInputVO index1VO = new IndexInputVO<>(indexGroup.getIndexId(), ll, indexGroup.getWeight(), sc1); List indexInputVOS = Arrays.asList(index1VO); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); List result = batchScoreCalculator.exec(indexInputVOS); - + result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { + communityPublishArticle.forEach(publish -> { + if (publish.getAgencyId().equals(agency.getSampleId())){ + publish.setIndexId(indexGroup.getIndexId()); + publish.setPartyAbilityScore(agency.getSampleScore()); + publish.setTotalScore(agency.getSampleScore()); + } + }); + }); indexStart++; } while (collect.size() == 10); + factIndexCommunityPartyFiveScoreDao.insertCommunityPartyRecord(communityPublishArticle); } } }); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml index f2bab458f6..7110ba2c04 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml @@ -5,7 +5,7 @@ - INSERT INTO fact_index_community_party_five_score ( ID, AGENCY_ID, MONTH_ID, INDEX_ID, SCORE, TYPE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + INSERT INTO fact_index_community_party_five_score ( ID, AGENCY_ID, MONTH_ID, INDEX_ID, TOTAL_SCORE, PARTY_ABILITY_SCORE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) VALUES ( @@ -13,8 +13,8 @@ #{item.agencyId}, #{item.monthId}, #{item.indexId}, - #{item.score}, - #{item.type}, + #{item.totalScore}, + #{item.partyAbilityScore}, #{item.delFlag}, #{item.revision}, #{item.createdBy}, From 5ea4120539007b533147c4fefc7c72e348101b66 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Sun, 30 Aug 2020 22:58:26 +0800 Subject: [PATCH 204/360] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3-?= =?UTF-8?q?=E5=85=9A=E5=BB=BA=E8=83=BD=E5=8A=9B=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/StrConstant.java | 4 + .../com/epmet/constant/IndexCalConstant.java | 18 ++ .../dto/indexcal/PageQueryGridFormDTO.java | 17 +- .../com/epmet/controller/DemoController.java | 13 + .../FactIndexGovrnAblityGridMonthlyDao.java | 6 +- .../FactIndexPartyAblityGridMonthlyDao.java | 9 +- .../FactIndexServiceAblityGridMonthlyDao.java | 6 +- .../java/com/epmet/eum/IndexCodeEnum.java | 6 +- .../indexcal/GridCorreLationService.java | 5 +- .../impl/GridCorreLationServiceImpl.java | 260 ++++++++++++++---- .../support/normalizing/Correlation.java | 29 ++ .../support/normalizing/ScoreCalculator.java | 2 +- .../FactIndexGovrnAblityGridMonthlyDao.xml | 4 +- .../FactIndexPartyAblityGridMonthlyDao.xml | 15 +- .../FactIndexServiceAblityGridMonthlyDao.xml | 4 +- 15 files changed, 331 insertions(+), 67 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java index 655635e6d7..03233b7c47 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java @@ -77,4 +77,8 @@ public interface StrConstant { String NULL_STR="null"; String NOT_FILLED = "无"; + + String MIN="MIN"; + + String MAX="MAX"; } 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..0cfcdcc2a7 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -0,0 +1,18 @@ +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 CUSTOMER_ID="CUSTOMER_ID"; + + String MONTH_ID="MONTH_ID"; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java index 51f5244294..3db0986065 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/PageQueryGridFormDTO.java @@ -18,6 +18,11 @@ public class PageQueryGridFormDTO implements Serializable { */ private String customerId; + /** + * yyyyMM + */ + private String monthId; + /** * 页码 * */ @@ -27,7 +32,17 @@ public class PageQueryGridFormDTO implements Serializable { /** * 每页多少条 * */ - private Integer pageSize = 10; + private Integer pageSize; private Integer pageIndex; + + + public PageQueryGridFormDTO(String customerId,String monthId,int pageIndex,int pageNo,int pageSize){ + this.customerId=customerId; + this.monthId=monthId; + this.pageIndex=pageIndex; + this.pageNo=pageNo; + this.pageSize=pageSize; + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 4932fb509e..5f18b920f9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -1,10 +1,13 @@ package com.epmet.controller; +import com.baomidou.mybatisplus.extension.api.R; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.AgencySubTreeDto; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.service.StatsDemoService; +import com.epmet.service.indexcal.GridCorreLationService; import com.epmet.service.screen.IndexCalculateCommunityService; import com.epmet.service.stats.DimAgencyService; import lombok.extern.slf4j.Slf4j; @@ -35,6 +38,8 @@ public class DemoController { private DimAgencyService dimAgencyService; @Autowired private IndexCalculateCommunityService indexCalculateCommunityService; + @Autowired + private GridCorreLationService gridCorreLationService; @GetMapping("testAlarm") public void testAlarm() { @@ -118,4 +123,12 @@ public class DemoController { indexCalculateCommunityService.communityPublishArticleCountCalculate("","202008"); return new Result(); } + + @PostMapping("testcalculategridcorrelation") + public Result testcalculateGridCorreLation(){ + CalculateCommonFormDTO formDTO=new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); + gridCorreLationService.calculateGridCorreLation(formDTO); + return new Result(); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index 11cb3fbe03..90c9a3ea6e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; @@ -67,14 +68,13 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao list, @Param("customerId")String customerId); /** - * @param customerId 客户id - * @param monthId yyyyMM + * @param formDTO * @return java.util.List * @author yinzuomei * @description 当前客户下,所有网格的治理能力相关五级指标 * @Date 2020/8/26 15:58 **/ - List> selectListGovrnAblityGrid(@Param("customerId") String customerId, @Param("monthId") String monthId); + List> selectListGovrnAblityGrid(PageQueryGridFormDTO formDTO); /** * @return java.util.Map diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index 0aff70aece..a2fe8dc821 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -18,6 +18,8 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; @@ -68,14 +70,13 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao list, @Param("customerId")String customerId); /** - * @param customerId 客户id - * @param monthId yyyyMM + * @param formDTO * @return java.util.List * @author yinzuomei * @description 当前客户下,所有网格的党建能力相关五级指标 * @Date 2020/8/26 15:57 **/ - List> selectListPartyAblityGrid(@Param("customerId") String customerId, @Param("monthId") String monthId); + List> selectListPartyAblityGrid(PageQueryGridFormDTO formDTO); /** * @return java.util.Map @@ -86,4 +87,6 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao selectPartyAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + + Integer selectCount(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java index a2b2eb78f8..7357c0cedc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; @@ -68,13 +69,12 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao - * @param customerId - * @param monthId + * @param formDTO * @author yinzuomei * @description 当前客户下,所有网格的治理能力相关五级指标 * @Date 2020/8/26 15:59 **/ - List> selectListServiceAblityGrid(@Param("customerId") String customerId, @Param("monthId") String monthId); + List> selectListServiceAblityGrid(PageQueryGridFormDTO formDTO); /** * @return java.util.Map diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index 29766018d8..71ef0303d4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -1,5 +1,7 @@ package com.epmet.eum; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; + /** * 需要计算指标code枚举类 * @@ -8,7 +10,7 @@ package com.epmet.eum; **/ public enum IndexCodeEnum { DANG_YUAN_XIANG_GUAN("dangyuanxiangguan", "党员相关", 1), - WANG_GE_XIANG_GUAN("wangggexiangguan", "网格相关", 1), + WANG_GE_XIANG_GUAN("wanggexiangguan", "网格相关", 1), SHE_QU_XIANG_GUAN("shequxiangguan", "社区相关", 1), JIE_DAO_XIANG_GUAN("jiedaoxiangguan", "街道相关", 1), QU_ZHI_BU_MEN("quzhibumen", "区直部门", 1), @@ -21,7 +23,7 @@ public enum IndexCodeEnum { CAN_YU_YI_SHI("canyuyishi", "参与议事", 4), DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4), LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), - + ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), ; private String code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java index 225ae2bb80..6648205d5c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java @@ -27,13 +27,12 @@ public interface GridCorreLationService { /** * @return java.util.List> - * @param customerId - * @param monthId + * @param formDTO * @author yinzuomei * @description 党建能力-网格相关事实表 当前客户下,所有网格的党建能力相关五级指标 * @Date 2020/8/27 14:48 **/ - List> queryListPartyAblityGrid(String customerId, String monthId); + List> queryListPartyAblityGrid(PageQueryGridFormDTO formDTO); /** * @return java.util.List diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 8a922020fa..8b052d2638 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,6 +1,8 @@ package com.epmet.service.indexcal.impl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; @@ -12,15 +14,21 @@ import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.indexcal.GridCorreLationService; +import com.epmet.service.indexcal.IndexCodeFieldReService; import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.*; +import com.epmet.support.normalizing.batch.*; +import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import java.util.List; -import java.util.Map; +import java.math.BigDecimal; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; /** * 网格相关service @@ -41,6 +49,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private ScreenCustomerGridDao screenCustomerGridDao; @Autowired private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; /** * @param formDTO @@ -55,86 +65,242 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { List dangJianNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); - if(!CollectionUtils.isEmpty(dangJianNengLiList)){ + if (!CollectionUtils.isEmpty(dangJianNengLiList)) { //1、计算网格相关-党建能力 - calculateGridCorreLationDangJian(formDTO,dangJianNengLiList); + calculateGridCorreLationDangJian(formDTO, dangJianNengLiList); } - List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), + /* List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); - if(!CollectionUtils.isEmpty(zhiLiNengLiList)){ + if (!CollectionUtils.isEmpty(zhiLiNengLiList)) { //2、计算网格相关-治理能力 - calculateGridCorreLationZhiLi(formDTO,zhiLiNengLiList); + calculateGridCorreLationZhiLi(formDTO, zhiLiNengLiList); } List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); - if(!CollectionUtils.isEmpty(fuWuNengLiList)){ + if (!CollectionUtils.isEmpty(fuWuNengLiList)) { //3、计算网格相关-服务能力 - calculateGridCorreLationFuWu(formDTO,fuWuNengLiList); + calculateGridCorreLationFuWu(formDTO, fuWuNengLiList); } //计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); - if(!CollectionUtils.isEmpty(wgxgList)){ - calculateGridCorreLationTotal(formDTO,wgxgList); - } + if (!CollectionUtils.isEmpty(wgxgList)) { + calculateGridCorreLationTotal(formDTO, wgxgList); + }*/ resultFlag = true; return resultFlag; } /** - * @return void * @param formDTO * @param indexList + * @return void * @author yinzuomei * @description 计算网格相关-党建能力 - * @Date 2020/8/26 16:47 + * @Date 2020/8/26 16:47 **/ - private void calculateGridCorreLationDangJian(CalculateCommonFormDTO formDTO,List indexList){ - //分页查询网格列表 - //查询五级指标 + private void calculateGridCorreLationDangJian(CalculateCommonFormDTO formDTO, List indexList) { + //查询总记录数 + int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); + if (NumConstant.ZERO == total) { + logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + return; + } + //总页数,进行批量查询,批量计算 + int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); + logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + //每一组指标的最大值,key:code_MIN/MAX + Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); + //指标集合 + Map> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap); + //分页查询采集记录 + for (int pageNo = 1; pageNo <= totalPage; pageNo++) { + int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; + //前10条 + List> recordList = queryListPartyAblityGrid(new PageQueryGridFormDTO(formDTO.getCustomerId(), + formDTO.getMonthId(), + pageIndex, + pageNo, + IndexCalConstant.PAGE_SIZE)); + //遍历每一个网格的记录 + recordList.forEach(recordMap -> { + //遍历所有的指标 + indexMap.forEach((key, value) -> { + //列名不为空 + if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); + } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + //组织内党员的联系群众能力考评分(平均值) TODO + logger.info("组织内党员的联系群众能力考评分(平均值) TODO"); + //网格内党员的联系群众能力考评分(平均值) + /* BigDecimal contactResiAblity = null; + SampleValue contactResiAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactResiAblity); + value.getIndexValueVOs().add(contactResiAblityValue);*/ + } + }); + }); + List result = calculate(indexMap); + // TODO 处理结果 + saveGridCorreLationDangJian(formDTO, indexList, result); + + try { + for (IndexOutputVO m : result) { + logger.info("indexId=" + m.getIndexId()); + for (SampleScore sampleScore : m.getIndexScoreVOs()) { + logger.info(String.format("网格id:%s,得分:%s", sampleScore.getSampleId(), sampleScore.getSampleScore())); + } + } + } catch (Exception e) { + } + } } /** + * @param formDTO 客户id 月份id: yyyyMM + * @param indexList 指标集合 + * @param indexOutputVOList * @return void + * @author yinzuomei + * @description 保存网格相关五级指标分值 + * @Date 2020/8/30 22:50 + **/ + private void saveGridCorreLationDangJian(CalculateCommonFormDTO formDTO, + List indexList, + List indexOutputVOList) { + Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); + + + } + + /** + * @param indexMap + * @return java.util.List + * @author yinzuomei + * @description + * @Date 2020/8/30 21:40 + **/ + private List calculate(Map> indexMap) { + //构造入参 + List indexInputVOS = this.getIndexInputVOList(indexMap); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + return batchScoreCalculator.exec(indexInputVOS); + } + + /** + * @param indexMap + * @return java.util.List + * @author yinzuomei + * @description + * @Date 2020/8/30 18:34 + **/ + private List getIndexInputVOList(Map> indexMap) { + List list = new ArrayList<>(); + //遍历所有的指标 + indexMap.forEach((key, indexInputVO) -> { + list.add(indexInputVO); + }); + return list; + } + + + /** + * @param indexList 指标集合 + * @param minAndMaxMap 最大值最小值集合 + * @return java.util.Map + * @author yinzuomei + * @description + * @Date 2020/8/30 15:56 + **/ + private Map> getIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { + Map> map = new HashMap<>(); + for (int indexNum = 0; indexNum < indexList.size(); indexNum++) { + IndexGroupDetailEntity index = indexList.get(indexNum); + IndexInputVO indexInputVO = new IndexInputVO(); + // 指标code + indexInputVO.setIndexId(index.getIndexCode()); + //权重 + indexInputVO.setWeight(index.getWeight()); + BigDecimal minValue = null; + BigDecimal maxValue = null; + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { + //组织内党员的联系群众能力考评分(平均值) TODO 获取最大值,最小值 + logger.info("组织内党员的联系群众能力考评分(平均值) TODO"); + /*Map contactResiAblityMap=; + minValue=contactResiAblityMap.get(StrConstant.MIN); + maxValue=contactResiAblityMap.get(StrConstant.MAX);*/ + continue; + } else { + //获取指标对应的列名 + String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); +// logger.info("fieldName=" + fieldName + ";index.getIndexCode()=" + index.getIndexCode()); + //最小值key + String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); + //最大值key + String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); + } +// logger.info("minValue="+minValue+";maxValue="+maxValue); + //分值计算器 + ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, + maxValue, + ScoreConstants.MIN_SCORE, + ScoreConstants.MAX_SCORE, + Correlation.getCorrelation(index.getCorrelation()) + ); + indexInputVO.setScoreCalculator(scoreCalculator); + List> sampleValueList = new ArrayList<>(); + indexInputVO.setIndexValueVOs(sampleValueList); + + map.put(index.getIndexCode(), indexInputVO); + } + return map; + } + + /** * @param formDTO * @param indexList + * @return void * @author yinzuomei * @description 计算网格相关-治理能力 - * @Date 2020/8/26 16:47 + * @Date 2020/8/26 16:47 **/ - private void calculateGridCorreLationZhiLi(CalculateCommonFormDTO formDTO,List indexList){ + private void calculateGridCorreLationZhiLi(CalculateCommonFormDTO formDTO, List indexList) { } /** - * @return void * @param formDTO * @param indexList + * @return void * @author yinzuomei - * @description 计算网格相关-服务能力 - * @Date 2020/8/26 16:48 + * @description 计算网格相关-服务能力 + * @Date 2020/8/26 16:48 **/ - private void calculateGridCorreLationFuWu(CalculateCommonFormDTO formDTO,List indexList){ + private void calculateGridCorreLationFuWu(CalculateCommonFormDTO formDTO, List indexList) { } /** - * @return void * @param formDTO * @param indexList + * @return void * @author yinzuomei * @description 计算网格相关总分 * @Date 2020/8/26 16:50 **/ - private void calculateGridCorreLationTotal(CalculateCommonFormDTO formDTO,List indexList){ + private void calculateGridCorreLationTotal(CalculateCommonFormDTO formDTO, List indexList) { } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO @@ -150,14 +316,14 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } /** - * @return * @param formDTO + * @return * @author yinzuomei * @description 分页查询网格列表 * @Date 2020/8/27 14:42 **/ @Override - public List pageGridList(PageQueryGridFormDTO formDTO){ + public List pageGridList(PageQueryGridFormDTO formDTO) { int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); formDTO.setPageIndex(pageIndex); return screenCustomerGridDao.pageListByCustomerId(formDTO); @@ -165,16 +331,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { /** - * @param customerId - * @param monthId + * @param formDTO * @return java.util.List * @author yinzuomei * @description 党建能力-网格相关事实表 当前客户下,所有网格的党建能力相关五级指标 * @Date 2020/8/26 15:52 **/ @Override - public List> queryListPartyAblityGrid(String customerId, String monthId) { - return factIndexPartyAblityGridMonthlyDao.selectListPartyAblityGrid(customerId, monthId); + public List> queryListPartyAblityGrid(PageQueryGridFormDTO formDTO) { + return factIndexPartyAblityGridMonthlyDao.selectListPartyAblityGrid(formDTO); } /*网格群众用户数 @@ -191,29 +356,29 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { 网格议题转项目率 组织“三会一课”次数 党员参加“三会一课”人次*/ + /** - * @return java.util.Map * @param customerId * @param monthId + * @return java.util.Map * @author yinzuomei * @description 查询党建能力,网格相关,各五级指标最大值,最小值 - * @Date 2020/8/27 12:47 + * @Date 2020/8/27 12:47 **/ - public Map queryPartyAblityGridMinAndMax(String customerId, String monthId){ - return factIndexPartyAblityGridMonthlyDao.selectPartyAblityGridMinAndMax(customerId,monthId); + public Map queryPartyAblityGridMinAndMax(String customerId, String monthId) { + return factIndexPartyAblityGridMonthlyDao.selectPartyAblityGridMinAndMax(customerId, monthId); } - - + + /** - * @param customerId - * @param monthId + * @param formDTO * @return java.util.List * @author yinzuomei * @description 当前客户下,所有网格的治理能力相关五级指标 * @Date 2020/8/26 15:55 **/ - public List> queryListGovrnAblityGrid(String customerId, String monthId) { - return factIndexGovrnAblityGridMonthlyDao.selectListGovrnAblityGrid(customerId, monthId); + public List> queryListGovrnAblityGrid(PageQueryGridFormDTO formDTO) { + return factIndexGovrnAblityGridMonthlyDao.selectListGovrnAblityGrid(formDTO); } @@ -230,23 +395,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } /** - * @param customerId - * @param monthId + * @param formDTO * @return java.util.List * @author yinzuomei * @description 当前客户下,所有网格的服务能力相关五级指标 * @Date 2020/8/26 15:55 **/ - public List> queryListServiceAblityGrid(String customerId, String monthId) { - return factIndexServiceAblityGridMonthlyDao.selectListServiceAblityGrid(customerId, monthId); + public List> queryListServiceAblityGrid(PageQueryGridFormDTO formDTO) { + return factIndexServiceAblityGridMonthlyDao.selectListServiceAblityGrid(formDTO); } /** - * @return java.util.Map * @param customerId * @param monthId + * @return java.util.Map * @author yinzuomei - * @description 查询 服务能力,网格相关,各五级指标最大值,最小值 + * @description 查询 服务能力,网格相关,各五级指标最大值,最小值 * @Date 2020/8/27 12:50 **/ public Map queryServiceAblityGridMinAndMax(String customerId, String monthId) { 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 index f7a31b1436..acacce6f1a 100644 --- 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 @@ -14,4 +14,33 @@ public enum Correlation { this.code = code; this.desc = desc; } + + public static Correlation getCorrelation(String code){ + if (code == null) { + return Correlation.POSITIVE; + } + Correlation[] values = Correlation.values(); + for (Correlation correlation : values) { + if (code.equals(correlation.getCode())) { + return correlation; + } + } + return Correlation.POSITIVE; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getDesc() { + return desc; + } + + public void setDesc(String desc) { + this.desc = desc; + } } 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 index df84c2196c..0eab3dcf4b 100644 --- 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 @@ -173,7 +173,7 @@ public abstract class ScoreCalculator { */ protected BigDecimal calcuteCoefficient(BigDecimal min, BigDecimal max) { BigDecimal fenmu = max.subtract(min); - if (fenmu.toString().equals("0"))return new BigDecimal(0); + if (fenmu.compareTo(BigDecimal.ZERO)==0)return new BigDecimal(0); BigDecimal fenzi = maxScore.subtract(minScore); BigDecimal divide = fenzi.divide(fenmu, MathContext.DECIMAL32); System.out.println("分子:"+fenzi+"分母:"+fenmu+"系数:"+divide.toString()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml index 504ed412e1..e5780e24fa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -86,7 +86,7 @@ - SELECT m.CUSTOMER_ID, m.GRID_ID, @@ -105,6 +105,8 @@ m.DEL_FLAG = '0' and m.CUSTOMER_ID=#{customerId} and m.MONTH_ID=#{monthId} + order by m.GRID_ID asc + LIMIT #{pageIndex}, #{pageSize} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml index e0ca717e07..f0d83bf06c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml @@ -102,7 +102,7 @@ - SELECT m.CUSTOMER_ID, m.GRID_ID, @@ -126,6 +126,8 @@ m.DEL_FLAG = '0' AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + order by m.GRID_ID asc + LIMIT #{pageIndex}, #{pageSize} @@ -167,4 +169,15 @@ AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID =#{monthId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml index fb3c488e9e..1ab7d916d0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml @@ -71,7 +71,7 @@ - SELECT m.CUSTOMER_ID, m.GRID_ID, @@ -85,6 +85,8 @@ m.DEL_FLAG = '0' and m.CUSTOMER_ID=#{customerId} and m.MONTH_ID=#{monthId} + order by m.GRID_ID asc + LIMIT #{pageIndex}, #{pageSize} From f79cfd7fd54ab789ecad1cc3806bbc0e7b165a85 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 31 Aug 2020 09:43:21 +0800 Subject: [PATCH 205/360] =?UTF-8?q?=E7=A6=85=E9=81=93bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CustomerFunctionDetailDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml index 833bb0a9ff..d99e372006 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml @@ -41,7 +41,7 @@ AND f.del_flag = '0' AND fc.del_flag = '0' AND f.function_group = '1' - AND f.shopping_status = '1' + AND cfd.shopping_status = '1' AND cfd.customer_id = #{customerId} AND fc.from_app = #{clientType} ORDER BY From 33bb7ebfe0dc718d41d05b7db9279e09343cd080 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 31 Aug 2020 10:05:49 +0800 Subject: [PATCH 206/360] =?UTF-8?q?=E6=89=B9=E9=87=8F=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=88=86=E5=80=BC=EF=BC=9A=E6=96=B0=E5=A2=9E=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E8=AE=A1=E7=AE=97=E6=AF=8F=E4=B8=AA=E6=A0=B7=E6=9C=AC?= =?UTF-8?q?=E7=9A=84=E6=89=80=E6=9C=89=E6=8C=87=E6=A0=87=E7=9A=84=E6=80=BB?= =?UTF-8?q?=E5=BE=97=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GridCorreLationServiceImpl.java | 2 +- .../IndexCalculateCommunityServiceImpl.java | 2 +- .../batch/BatchScoreCalculator.java | 36 +++++++++++++++++-- .../stats/test/normalizing/DemoScoreCal.java | 32 +++++++++++++++-- 4 files changed, 66 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 8b052d2638..03bce4449b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -190,7 +190,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - return batchScoreCalculator.exec(indexInputVOS); + return batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java index 31a1cfe543..15e0b36ff7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java @@ -130,7 +130,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni IndexInputVO index1VO = new IndexInputVO<>(indexGroup.getIndexId(), ll, indexGroup.getWeight(), sc1); List indexInputVOS = Arrays.asList(index1VO); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - List result = batchScoreCalculator.exec(indexInputVOS); + List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { communityPublishArticle.forEach(publish -> { if (publish.getAgencyId().equals(agency.getSampleId())){ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index 9ce5ec4913..d42ae98562 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -3,18 +3,20 @@ package com.epmet.support.normalizing.batch; import com.epmet.support.normalizing.ScoreCalculator; import java.math.BigDecimal; +import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; public class BatchScoreCalculator { /** - * 执行计算 + * 执行计算,每个指标中每个样本的得分明细 * @return 每一条都是一个指标的,所有样本对应的,得分值 */ - public List exec(List indexInputVOS) { + public List getScoreDetailOfIndexId(List indexInputVOS) { return indexInputVOS.stream().map(i -> { + // 每个指标循环一次 String indexId = i.getIndexId(); List indexValueVOs = i.getIndexValueVOs(); BigDecimal weight = i.getWeight(); @@ -30,4 +32,34 @@ public class BatchScoreCalculator { }).collect(Collectors.toList()); } + /** + * 执行计算,以样本的所有指标总得分 + * @param indexInputVOS + * @return + */ + public HashMap getScoreCountOfSampleId(List indexInputVOS) { + + // 每个样本的总得分 + HashMap scoreCountOfSamples = new HashMap<>(); + + for (IndexInputVO idx : indexInputVOS) { + // 每个指标循环一次 + List indexValueVOs = idx.getIndexValueVOs(); + BigDecimal weight = idx.getWeight(); + ScoreCalculator scoreCalculator = idx.getScoreCalculator(); + + for (SampleValue vo : indexValueVOs) { + String sampleId = vo.getSampleId(); + BigDecimal score = scoreCalculator.normalize(vo.getSampleValue(), weight); + if (scoreCountOfSamples.containsKey(sampleId)) { + BigDecimal newScore = scoreCountOfSamples.get(sampleId).add(score); + scoreCountOfSamples.put(sampleId, newScore); + } else { + scoreCountOfSamples.put(sampleId, score); + } + } + } + + return scoreCountOfSamples; + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index fb3f1246d4..c080ffc296 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -9,6 +9,7 @@ import org.junit.Test; import java.math.BigDecimal; import java.util.Arrays; +import java.util.HashMap; import java.util.List; public class DemoScoreCal { @@ -83,7 +84,7 @@ public class DemoScoreCal { List indexInputVOS = Arrays.asList(index1VO, index2VO); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - List result = batchScoreCalculator.exec(indexInputVOS); + List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); System.err.println("--------------------------------"); result.stream().forEach(r -> System.out.println(r)); @@ -109,7 +110,7 @@ public class DemoScoreCal { List indexInputVOS = Arrays.asList(index1VO, index2VO); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - List result = batchScoreCalculator.exec(indexInputVOS); + List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); System.err.println("--------------------------------"); result.stream().forEach(r -> System.out.println(r)); @@ -117,5 +118,32 @@ public class DemoScoreCal { System.err.println("--------------------------------"); } + @Test + public void testBigDecimalBatchCalculateGroupBySampleId() throws InterruptedException { + //{4,8,1,3,2} + + // 每个指标需要单独的分支计算器,因为每个指标的最大最小值是不同的 + ScoreCalculator sc1 = new BigDecimalScoreCalculator(new BigDecimal(1), new BigDecimal(8), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); + ScoreCalculator sc2 = new BigDecimalScoreCalculator(new BigDecimal(1), new BigDecimal(8), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); + + List index1SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(4)), new SampleValue<>("id2", new BigDecimal(1)), new SampleValue<>("id3", new BigDecimal(8))); + List index2SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(1)), new SampleValue<>("id2", new BigDecimal(8)), new SampleValue<>("id3", new BigDecimal(3))); + + // 每个指标的信息,包括样本列表,权重,指标标记 + IndexInputVO index1VO = new IndexInputVO("aaa", index1SampleValues, new BigDecimal(1), sc1); + IndexInputVO index2VO = new IndexInputVO("bbb", index2SampleValues, new BigDecimal(1), sc2); + + List indexInputVOS = Arrays.asList(index1VO, index2VO); + + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap result = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + + System.err.println("--------------------------------"); + result.forEach((key, value) -> { + System.out.println(key.concat("的得分为:").concat(value.toString())); + }); + System.err.println("--------------------------------"); + } + } From 8ebe8b6b731bf7393f10f26ee8512432d3b0b40b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 31 Aug 2020 10:08:53 +0800 Subject: [PATCH 207/360] =?UTF-8?q?=E7=94=9F=E6=88=90fact=5Findex=5Fcpc=5F?= =?UTF-8?q?score=E3=80=81fact=5Findex=5Fgrid=5Fscore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/indexscore/CpcScoreDao.java | 33 +++++++ .../epmet/dao/indexscore/GridScoreDao.java | 33 +++++++ .../entity/indexscore/CpcScoreEntity.java | 87 ++++++++++++++++++ .../entity/indexscore/GridScoreEntity.java | 92 +++++++++++++++++++ .../impl/GridCorreLationServiceImpl.java | 47 +++++++--- .../mapper/indexscore/CpcScoreDao.xml | 26 ++++++ .../mapper/indexscore/GridScoreDao.xml | 27 ++++++ 7 files changed, 333 insertions(+), 12 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java new file mode 100644 index 0000000000..74628e78e8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexscore; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexscore.CpcScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党员相关分值 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-31 + */ +@Mapper +public interface CpcScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java new file mode 100644 index 0000000000..77de72959f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexscore; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexscore.GridScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 网格相关分值 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-31 + */ +@Mapper +public interface GridScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java new file mode 100644 index 0000000000..59c4269a3b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java @@ -0,0 +1,87 @@ +/** + * 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.indexscore; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 党员相关分值 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_cpc_score") +public class CpcScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格所属的机关Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 用户id + */ + private String userId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 党建能力分值 + */ + private BigDecimal partyAblityScore; + + /** + * 参与议事分值 + */ + private BigDecimal joinIssueScore; + + /** + * 党务活动分值 + */ + private BigDecimal partyWorkActScore; + + /** + * 联系群众分值 + */ + private BigDecimal contactMassesScore; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java new file mode 100644 index 0000000000..3b4b4c44c9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java @@ -0,0 +1,92 @@ +/** + * 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.indexscore; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 网格相关分值 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-08-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_grid_score") +public class GridScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 网格所属的机关Id + */ + private String agencyId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 总指数分值 + */ + private BigDecimal totalScore; + + /** + * 党建能力分值 + */ + private BigDecimal partyAblityScore; + + /** + * 治理能力分值 + */ + private BigDecimal govrnAblityScore; + + /** + * 服务能力分值 + */ + private BigDecimal serviceAblityScore; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 8b052d2638..d06d57ee21 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -136,12 +136,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { - //组织内党员的联系群众能力考评分(平均值) TODO - logger.info("组织内党员的联系群众能力考评分(平均值) TODO"); + //组织内党员的联系群众能力考评分(平均值) + logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) - /* BigDecimal contactResiAblity = null; - SampleValue contactResiAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactResiAblity); - value.getIndexValueVOs().add(contactResiAblityValue);*/ + String gridId=(String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -162,6 +163,29 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } + /** + * @return java.util.Map + * @param formDTO + * @author yinzuomei + * @description TODO + * @Date 2020/8/31 9:51 + **/ + private Map contactMassesAblityMap(CalculateCommonFormDTO formDTO) { + + return null; + } + + /** + * @return java.math.BigDecimal + * @param gridId 网格id + * @author yinzuomei TODO + * @description 获取网格(组织)内党员的联系群众能力考评分(平均值) + * @Date 2020/8/31 9:50 + **/ + private BigDecimal getGridContactMassesAvgValue(String gridId) { + return null; + } + /** * @param formDTO 客户id 月份id: yyyyMM * @param indexList 指标集合 @@ -230,12 +254,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { - //组织内党员的联系群众能力考评分(平均值) TODO 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) TODO"); - /*Map contactResiAblityMap=; - minValue=contactResiAblityMap.get(StrConstant.MIN); - maxValue=contactResiAblityMap.get(StrConstant.MAX);*/ - continue; + //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 + logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); + Map contactMassesAblityMap= this.contactMassesAblityMap(formDTO); + minValue=contactMassesAblityMap.get(StrConstant.MIN); + maxValue=contactMassesAblityMap.get(StrConstant.MAX); } else { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); @@ -267,7 +290,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { /** * @param formDTO * @param indexList - * @return void + * @return void TODO * @author yinzuomei * @description 计算网格相关-治理能力 * @Date 2020/8/26 16:47 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml new file mode 100644 index 0000000000..3a17dcc82b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml new file mode 100644 index 0000000000..4b1d7f6fcc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 1fcdaf2b137481b78658646ed753271fa08ae99e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 31 Aug 2020 10:12:56 +0800 Subject: [PATCH 208/360] =?UTF-8?q?=E5=B1=8F=E8=94=BD=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=8F=90=E4=BA=A4=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E9=AA=8C=E8=AF=81=E7=A0=81=E7=9A=84?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java index 0f2a2ab82d..75453a1d22 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java @@ -82,7 +82,7 @@ public class InfoSubmitFromDTO implements Serializable { /** * 手机验证码 */ - //@NotBlank(message = "手机验证码不能为空") + // @NotBlank(message = "手机验证码不能为空") @Length(max=6,message = "手机验证码不能超过6位") private String mobileCode; From 2c354ad1af543b451b6985856672618a97d2de5e Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 31 Aug 2020 10:28:52 +0800 Subject: [PATCH 209/360] =?UTF-8?q?=E6=94=AF=E9=83=A8=E5=BB=BA=E8=AE=BE?= =?UTF-8?q?=E6=83=85=E5=86=B5|=E8=81=94=E5=BB=BA=E5=85=B1=E5=BB=BA?= =?UTF-8?q?=E6=83=85=E5=86=B5-=E6=8A=98=E7=BA=BF=E5=9B=BE=20=E5=85=9A?= =?UTF-8?q?=E5=91=98=E5=BF=97=E6=84=BF=E6=9C=8D=E5=8A=A1=20=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=8F=82=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E5=B1=9E=E6=80=A7=EF=BC=8C=E6=80=BB=E5=8F=82?= =?UTF-8?q?=E4=B8=8E=E6=95=B0=E5=92=8C=E6=80=BB=E7=BB=84=E7=BB=87=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/BranchBuildTrendResultDTO.java | 11 +++++++++++ .../dto/result/VolunteerServiceResultDTO.java | 10 ++++++++++ .../dao/screen/ScreenPartyBranchDataDao.java | 12 ++++++++++++ .../impl/GrassrootsPartyDevServiceImpl.java | 7 ++++++- .../screen/impl/PartyMemberLeadServiceImpl.java | 7 +++++++ .../epmet/datareport/utils/ModuleConstant.java | 10 ++++++++++ .../mapper/screen/ScreenPartyBranchDataDao.xml | 16 +++++++++++++++- 7 files changed, 71 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java index 58a277322f..ee30981a68 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.screen.dto.result; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -28,4 +29,14 @@ public class BranchBuildTrendResultDTO implements Serializable { private List seriesData; + /** + * 总组织次数 + * */ + private Integer totalOrganizationCount = NumConstant.ZERO; + + /** + * 总参与人数 + * */ + private Integer totalJoinUserCount = NumConstant.ZERO; + } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java index 18331f9ca7..d856e5081c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java @@ -33,4 +33,14 @@ public class VolunteerServiceResultDTO implements Serializable { * 平均参与人次 */ private List averageJoinUserData; + + /** + * 总组织次数 + * */ + private Integer totalOrganizationCount; + + /** + * 总参与人数 + * */ + private Integer totalJoinUserCount; } 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/screen/ScreenPartyBranchDataDao.java index 0117eec4a7..f28a23354b 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/screen/ScreenPartyBranchDataDao.java @@ -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/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 aa1b23a448..4fa8a23c20 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 @@ -155,7 +155,12 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService result.setSeriesData(dataArray); result.setLegend(null == result.getLegend() ? new ArrayList<>() : result.getLegend()); - + //总组织次数 + Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,param.getAgencyId(),monthMap.keySet().iterator().next()); + //总参与人数 + Integer totalJoinUserCount = screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,param.getAgencyId(),monthMap.keySet().iterator().next()); + result.setTotalOrganizationCount(null == totalOrganizationCount ? NumConstant.ZERO : totalOrganizationCount); + result.setTotalJoinUserCount(null == totalJoinUserCount ? NumConstant.ZERO : totalJoinUserCount); return result; } 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/screen/impl/PartyMemberLeadServiceImpl.java index a1031a9494..8af422652a 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -147,6 +147,13 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { result.setOrganizeData(organizeData); result.setJoinData(joinData); result.setAverageJoinUserData(averageJoinUserData); + String bottomMonthId = collect.get(collect.size() - NumConstant.ONE).getMonthId(); + //总组织次数 + Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId); + //总参与人数 + Integer totalJoinUserCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId); + result.setTotalOrganizationCount(totalOrganizationCount); + result.setTotalJoinUserCount(totalJoinUserCount); return result; } 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/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml index 165b383a81..013f43c74b 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 @@ -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} @@ -85,4 +84,19 @@ LIMIT 12 + + \ No newline at end of file From 239520b4f5944e62ebe9bd9afff0a941cddd54af Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 31 Aug 2020 10:29:30 +0800 Subject: [PATCH 210/360] =?UTF-8?q?=E5=8F=96=E6=9C=88=E4=BB=BD=E5=8C=BA?= =?UTF-8?q?=E9=97=B4=E7=9A=84=E5=B7=A6=E5=8C=BA=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/screen/impl/PartyMemberLeadServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/screen/impl/PartyMemberLeadServiceImpl.java index 8af422652a..2cf28aca5a 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -147,7 +147,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { result.setOrganizeData(organizeData); result.setJoinData(joinData); result.setAverageJoinUserData(averageJoinUserData); - String bottomMonthId = collect.get(collect.size() - NumConstant.ONE).getMonthId(); + String bottomMonthId = collect.get(NumConstant.ZERO).getMonthId(); //总组织次数 Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId); //总参与人数 From be6217395d0be4c1f25fae4a56c40d6aeeebf08d Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 31 Aug 2020 10:37:13 +0800 Subject: [PATCH 211/360] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=85=9A=E5=91=98?= =?UTF-8?q?=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/IndexCalConstant.java | 2 + .../FactIndexPartyAblityCpcMonthlyDao.java | 5 +- .../impl/CpcIndexCalculateServiceImpl.java | 166 +++++++++++++++--- .../impl/IndexCalculateServiceImpl.java | 2 +- .../FactIndexPartyAblityCpcMonthlyDao.xml | 74 +++----- 5 files changed, 174 insertions(+), 75 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 0cfcdcc2a7..aff436ff3d 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -15,4 +15,6 @@ public interface IndexCalConstant { String CUSTOMER_ID="CUSTOMER_ID"; String MONTH_ID="MONTH_ID"; + + String USER_ID="USER_ID"; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index f9c0ad1af2..cdecd48f51 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -23,7 +23,6 @@ import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import java.math.BigDecimal; import java.util.List; import java.util.Map; @@ -70,7 +69,7 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao list, @Param("customerId") String customerId); - Map getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId); + List> getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize); - Map getExtremeValue(@Param("customerId") String customerId); + Map getExtremeValue(@Param("customerId") String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index 0367e90137..c427a81eb9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.indexcal.impl; -import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; import com.epmet.dao.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; @@ -9,14 +10,24 @@ import com.epmet.eum.IndexCodeEnum; import com.epmet.service.indexcal.CpcIndexCalculateService; import com.epmet.service.indexcal.IndexCodeFieldReService; import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.*; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; @Slf4j @Service @@ -29,35 +40,144 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { private IndexGroupDetailService getDetailListByParentCode; @Autowired private IndexCodeFieldReService indexCodeFieldReService; + @Override public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) { - //计算最大最小值 - Map minAndMaxList = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); - if (CollectionUtils.isEmpty(minAndMaxList)){ - log.warn("cpcIndexCalculate customerId:{} have not any fact record",formDTO.getCustomerId()); - return false; - } - //获取指标权重信息 - List indexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),IndexCodeEnum.CAN_YU_YI_SHI.getCode()); - if (CollectionUtils.isEmpty(indexDetails)){ - log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail",formDTO.getCustomerId()); + + //获取指标权重信息 -参与议事 + List indexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.CAN_YU_YI_SHI.getCode()); + if (CollectionUtils.isEmpty(indexDetails)) { + log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); return false; } + + canyuyishi(formDTO, indexDetails); + + + //log.info(JSON.toJSONString(minAndMaxList)); + return null; + } + + private void canyuyishi(CalculateCommonFormDTO formDTO, List indexDetails) { Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)){ - log.warn("cpcIndexCalculate have any indexcodefieldre"); - return false; + if (CollectionUtils.isEmpty(indexCodeFieldReList)) { + log.error("cpcIndexCalculate have any indexcodefieldre"); + return; } - String indexCode = null; - String fieldName = null; - for (IndexGroupDetailEntity indexDetail : indexDetails) { - indexCode = indexDetail.getIndexCode(); - fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); - + //计算最大最小值 + Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); + if (CollectionUtils.isEmpty(minAndMaxMap)) { + log.warn("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); + return; } + //指标集合 + Map> indexMap = getIndexInputVO(indexDetails, minAndMaxMap); + List> list = null; + int pageNo = 1; + int pageSize = 10; + do { + String fieldName = null; + list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); + if (!CollectionUtils.isEmpty(list)) { + //遍历指标 进行计算 + for (Map.Entry> entry : indexMap.entrySet()) { + String indexCode = entry.getKey(); + IndexInputVO value = entry.getValue(); + fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); + if (StringUtils.isBlank(fieldName)) { + log.error("cpcIndexCalculate fieldName error"); + continue; + } + for (Map cpcIndex : list) { + //对应的数值 + String sampleValueStr = String.valueOf(cpcIndex.get(indexCodeFieldReService.getFieldNameByIndexCode(fieldName))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) cpcIndex.get(IndexCalConstant.USER_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); + } - log.info(JSON.toJSONString(minAndMaxList)); - Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); - return null; + } + } + + List result = calculate(indexMap); + // TODO 处理结果 + saveGridCorreLationDangJian(formDTO, indexDetails, result); + + try { + for (IndexOutputVO m : result) { + log.info("indexId=" + m.getIndexId()); + for (SampleScore sampleScore : m.getIndexScoreVOs()) { + log.info(String.format("网格id:%s,得分:%s", sampleScore.getSampleId(), sampleScore.getSampleScore())); + } + } + } catch (Exception e) { + } + + } while (!CollectionUtils.isEmpty(list) && pageNo++ > 0); + + } + + @Transactional(rollbackFor = Exception.class) + public void saveGridCorreLationDangJian(CalculateCommonFormDTO formDTO, List indexDetails, List result) { + + } + + /** + * @param indexMap + * @return java.util.List + * @author yinzuomei + * @description + * @Date 2020/8/30 21:40 + **/ + private List calculate(Map> indexMap) { + //构造入参 + List indexInputVOS = indexMap.values().stream().collect(Collectors.toList()); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + return batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + } + + /** + * @param indexList 指标集合 + * @param minAndMaxMap 最大值最小值集合 + * @return java.util.Map + * @author yinzuomei + * @description + * @Date 2020/8/30 15:56 + **/ + private Map> getIndexInputVO(List indexList, Map minAndMaxMap) { + Map> map = new HashMap<>(); + for (int indexNum = 0; indexNum < indexList.size(); indexNum++) { + IndexGroupDetailEntity index = indexList.get(indexNum); + IndexInputVO indexInputVO = new IndexInputVO(); + // 指标code + indexInputVO.setIndexId(index.getIndexCode()); + //权重 + indexInputVO.setWeight(index.getWeight()); + BigDecimal minValue = null; + BigDecimal maxValue = null; + + //获取指标对应的列名 + String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + //最小值key + String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); + //最大值key + String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); + + //分值计算器 + ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, + maxValue, + ScoreConstants.MIN_SCORE, + ScoreConstants.MAX_SCORE, + Correlation.getCorrelation(index.getCorrelation()) + ); + indexInputVO.setScoreCalculator(scoreCalculator); + List> sampleValueList = new ArrayList<>(); + indexInputVO.setIndexValueVOs(sampleValueList); + + map.put(index.getIndexCode(), indexInputVO); + } + return map; } } 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 index 4163ea074c..fa6c520c96 100644 --- 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 @@ -58,7 +58,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { CalculateCommonFormDTO calculateCommonFormDTO=new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); //计算党员 try { - Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(customerId, formDTO.getMonthId()); + Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(customerId, formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); } catch (Exception e) { } 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 41946192dd..beb5b42a4e 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 @@ -3,33 +3,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - delete from fact_index_party_ablity_cpc_monthly where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND USER_ID = #{userId} @@ -94,27 +67,7 @@ - + + + + From c19aa75b8c1569d0d3b34d6c885d8e63082c96c4 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 31 Aug 2020 10:54:24 +0800 Subject: [PATCH 212/360] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E8=B0=83=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/StaffServiceImpl.java | 14 +++++++++----- .../com/epmet/feign/EpmetUserOpenFeignClient.java | 15 +++++++++++---- .../EpmetUserOpenFeignClientFallback.java | 10 ++++++---- .../com/epmet/controller/StaffRoleController.java | 14 ++++++++++++++ .../src/main/java/com/epmet/dao/StaffRoleDao.java | 9 +++++++++ .../java/com/epmet/service/StaffRoleService.java | 9 +++++++++ .../epmet/service/impl/StaffRoleServiceImpl.java | 6 ++++++ .../src/main/resources/mapper/StaffRoleDao.xml | 5 +++++ 8 files changed, 69 insertions(+), 13 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java index cae5e05475..170c17fbec 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java @@ -10,10 +10,7 @@ import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.CustomerStaffAgencyEntity; -import com.epmet.feign.EpmetHeartOpenFeignClient; -import com.epmet.feign.EpmetUserFeignClient; -import com.epmet.feign.GovProjectOpenFeignClient; -import com.epmet.feign.OperCrmFeignClient; +import com.epmet.feign.*; import com.epmet.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -48,6 +45,8 @@ public class StaffServiceImpl implements StaffService { private CustomerGridService customerGridService; @Autowired private StaffTransferRecordService staffTransferRecordService; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Override public Result getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { @@ -235,7 +234,12 @@ public class StaffServiceImpl implements StaffService { //5.逻辑删除工作人员原组织加入的部门、网格,部门、网格总人数减1 customerDepartmentService.updateDepartment(fromDTO.getStaffId()); customerGridService.updateGrid(fromDTO.getStaffId()); - //6.操作记录表新增调动记录 + //6.更改工作人员组织角色 + StaffRoleDTO staffRoleDTO = new StaffRoleDTO(); + staffRoleDTO.setOrgId(fromDTO.getAgencyId()); + staffRoleDTO.setStaffId(fromDTO.getStaffId()); + epmetUserOpenFeignClient.changeRoleOrg(staffRoleDTO); + //7.操作记录表新增调动记录 StaffTransferRecordDTO staffTransferRecordDTO = new StaffTransferRecordDTO(); staffTransferRecordDTO.setCustomerId(tokenDto.getCustomerId()); staffTransferRecordDTO.setOperateStaffId(tokenDto.getUserId()); diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 63e3380b6b..f7584e5ea0 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -4,10 +4,7 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.CustomerStaffDTO; -import com.epmet.dto.GovStaffRoleDTO; -import com.epmet.dto.UserBaseInfoDTO; -import com.epmet.dto.UserDTO; +import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.fallback.EpmetUserOpenFeignClientFallback; @@ -308,4 +305,14 @@ public interface EpmetUserOpenFeignClient { **/ @PostMapping("/epmetuser/userbaseinfo/extuserinfo") Result extUserInfo( @RequestBody CommonUserIdFormDTO param); + + /** + * 更改角色所属组织 + * @author zhaoqifeng + * @date 2020/8/31 10:36 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("epmetuser/staffrole/changeroleorg") + Result changeRoleOrg(@RequestBody StaffRoleDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 480ba8862e..6aba501d25 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -4,10 +4,7 @@ import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.CustomerStaffDTO; -import com.epmet.dto.GovStaffRoleDTO; -import com.epmet.dto.UserBaseInfoDTO; -import com.epmet.dto.UserDTO; +import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.EpmetUserOpenFeignClient; @@ -208,4 +205,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result extUserInfo(CommonUserIdFormDTO param) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "extUserInfo", param); } + + @Override + public Result changeRoleOrg(StaffRoleDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "changeRoleOrg", formDTO); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java index 2eada17f01..60b4d5400e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java @@ -5,6 +5,7 @@ import com.epmet.commons.mybatis.entity.DataScope; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.GovStaffRoleDTO; +import com.epmet.dto.StaffRoleDTO; import com.epmet.dto.form.CommonUserFormDTO; import com.epmet.dto.form.CustomerRoleFormDTO; import com.epmet.dto.form.RolesUsersListFormDTO; @@ -167,4 +168,17 @@ public class StaffRoleController { public Result> getStaffRoles(@PathVariable String staffId) { return new Result>().ok(staffRoleService.getStaffRoles(staffId)); } + + /** + * 更改角色所属组织 + * @author zhaoqifeng + * @date 2020/8/31 10:29 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("changeroleorg") + public Result changeRoleOrg(@RequestBody StaffRoleDTO formDTO) { + staffRoleService.changeRoleOrg(formDTO); + return new Result(); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java index 6de16bc4f8..31dce8b029 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java @@ -100,4 +100,13 @@ public interface StaffRoleDao extends BaseDao { List selectStaffRoles(@Param("staffId") String staffId); List listStaffRoleEntytiesByStaffIdAndOrgId(@Param("agencyId") String agencyId, @Param("staffId") String staffId); + + /** + * 更改角色所属组织 + * @author zhaoqifeng + * @date 2020/8/31 10:33 + * @param dto + * @return void + */ + void updateStaffRoleOrgId(StaffRoleDTO dto); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java index e6c238a53f..5e260dd3c3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java @@ -150,4 +150,13 @@ public interface StaffRoleService extends BaseService { List getStaffRoles(String staffId); List getStaffRoleEntytiesByStaffIdAndOrgId(String agencyId, String staffId); + + /** + * 更改角色组织 + * @author zhaoqifeng + * @date 2020/8/31 10:31 + * @param formDTO + * @return void + */ + void changeRoleOrg(StaffRoleDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java index 231ab010ea..bb85550f3c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java @@ -182,4 +182,10 @@ public class StaffRoleServiceImpl extends BaseServiceImpl + + UPDATE staff_role SET ORG_ID = #{orgId} + WHERE STAFF_ID = #{staffId} + AND DEL_FLAG = '0' + From 00324ad1c760545e702120b5cc170539fde9a423 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 31 Aug 2020 13:33:56 +0800 Subject: [PATCH 213/360] =?UTF-8?q?=E9=94=99=E8=AF=AF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dao/screen/IndexGroupDetailDao.java | 2 + .../impl/CpcIndexCalculateServiceImpl.java | 79 ++++++++++--------- .../screen/IndexGroupDetailService.java | 8 ++ .../impl/IndexCalculateServiceImpl.java | 4 +- .../impl/IndexGroupDetailServiceImpl.java | 5 ++ .../mapper/screen/IndexGroupDetailDao.xml | 9 +++ 6 files changed, 66 insertions(+), 41 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java index 8c7a4e82fb..8982bc5f29 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java @@ -34,4 +34,6 @@ import java.util.List; public interface IndexGroupDetailDao extends BaseDao { List getDetailListByParentCode(@Param("customerId") String customerId, @Param("indexCode") String indexCode); + + List getDetailListLikeParentCode(@Param("customerId") String customerId, @Param("parentIndexCode") String parentIndexCode); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index c427a81eb9..521c9dd631 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.indexcal.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; @@ -14,7 +15,9 @@ import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; import com.epmet.support.normalizing.ScoreConstants; -import com.epmet.support.normalizing.batch.*; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -45,7 +48,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) { //获取指标权重信息 -参与议事 - List indexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.CAN_YU_YI_SHI.getCode()); + List indexDetails = getDetailListByParentCode.getDetailListLikeParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(indexDetails)) { log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); return false; @@ -53,7 +56,6 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { canyuyishi(formDTO, indexDetails); - //log.info(JSON.toJSONString(minAndMaxList)); return null; } @@ -71,54 +73,55 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { return; } //指标集合 - Map> indexMap = getIndexInputVO(indexDetails, minAndMaxMap); + //对指标进行分组 + Map> groupIndexDetailsMap = indexDetails.stream().collect(Collectors.groupingBy(IndexGroupDetailEntity::getAllParentIndexCode)); + + + List> list = null; int pageNo = 1; int pageSize = 10; do { - String fieldName = null; list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); if (!CollectionUtils.isEmpty(list)) { - //遍历指标 进行计算 - for (Map.Entry> entry : indexMap.entrySet()) { - String indexCode = entry.getKey(); - IndexInputVO value = entry.getValue(); - fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); - if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); - continue; - } - for (Map cpcIndex : list) { - //对应的数值 - String sampleValueStr = String.valueOf(cpcIndex.get(indexCodeFieldReService.getFieldNameByIndexCode(fieldName))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) cpcIndex.get(IndexCalConstant.USER_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } - - } - } - List result = calculate(indexMap); - // TODO 处理结果 - saveGridCorreLationDangJian(formDTO, indexDetails, result); + //遍历指标分组 计算分数 + List> finalList = list; + groupIndexDetailsMap.forEach((parentIndex, indexDetailList)->{ + Map> indexMap = getIndexInputVO(indexDetailList, minAndMaxMap); + //遍历指标 进行计算 + for (Map.Entry> entry : indexMap.entrySet()) { + String indexCode = entry.getKey(); + IndexInputVO value = entry.getValue(); + String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); + if (StringUtils.isBlank(fieldName)) { + log.error("cpcIndexCalculate fieldName error"); + continue; + } + for (Map cpcIndex : finalList) { + //对应的数值 + String sampleValueStr = String.valueOf(cpcIndex.get(indexCodeFieldReService.getFieldNameByIndexCode(fieldName))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) cpcIndex.get(IndexCalConstant.USER_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); + } + } + HashMap result = calculate(indexMap); + // TODO 处理结果 + saveGridCorreLationDangJian(formDTO, indexDetails, result); - try { - for (IndexOutputVO m : result) { - log.info("indexId=" + m.getIndexId()); - for (SampleScore sampleScore : m.getIndexScoreVOs()) { - log.info(String.format("网格id:%s,得分:%s", sampleScore.getSampleId(), sampleScore.getSampleScore())); + try { + System.out.println( JSON.toJSONString(result)); + } catch (Exception e) { } - } - } catch (Exception e) { + }); } - } while (!CollectionUtils.isEmpty(list) && pageNo++ > 0); } @Transactional(rollbackFor = Exception.class) - public void saveGridCorreLationDangJian(CalculateCommonFormDTO formDTO, List indexDetails, List result) { + public void saveGridCorreLationDangJian(CalculateCommonFormDTO formDTO, List indexDetails, HashMap result) { } @@ -129,11 +132,11 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { * @description * @Date 2020/8/30 21:40 **/ - private List calculate(Map> indexMap) { + private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = indexMap.values().stream().collect(Collectors.toList()); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - return batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java index aa69cba8e7..888b36725d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexGroupDetailService.java @@ -35,4 +35,12 @@ public interface IndexGroupDetailService extends BaseService getDetailListByParentCode(String customerId,String... indexCode); + + /** + * desc:获取所有 包含该指标code的 + * @param customerId + * @param parentIndexCode + * @return + */ + List getDetailListLikeParentCode(String customerId, String parentIndexCode); } \ No newline at end of file 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 index fa6c520c96..611ad18f4e 100644 --- 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 @@ -17,10 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import java.math.BigDecimal; import java.util.Date; import java.util.List; -import java.util.Map; /** * @author liujianjun @@ -58,7 +56,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { CalculateCommonFormDTO calculateCommonFormDTO=new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); //计算党员 try { - Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(customerId, formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); + //Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(customerId, formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); } catch (Exception e) { } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java index 0225c956c5..1135b023c8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexGroupDetailServiceImpl.java @@ -48,4 +48,9 @@ public class IndexGroupDetailServiceImpl extends BaseServiceImpl getDetailListLikeParentCode(String customerId, String parentIndexCode) { + return baseDao.getDetailListLikeParentCode(customerId,parentIndexCode); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml index 6038ecbfeb..bb4e5636ae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDetailDao.xml @@ -12,4 +12,13 @@ CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0' and ALL_PARENT_INDEX_CODE = #{indexCode,jdbcType=VARCHAR} + + \ No newline at end of file From 66bac5d2091e4989fe698fcd7ba43188c0159fb8 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 31 Aug 2020 13:38:05 +0800 Subject: [PATCH 214/360] =?UTF-8?q?=E5=AE=9A=E5=88=B6=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=94=AF=E6=8C=81=E6=A8=A1=E7=B3=8A=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/FunctionCustomizedDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml index e1ad29efb4..cf95c91a43 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml @@ -63,7 +63,7 @@ WHERE f.DEL_FLAG = '0' AND cu.DEL_FLAG = '0' - AND cu.CUSTOMIZED_NAME = #{customizedName} + AND cu.CUSTOMIZED_NAME like concat('%', #{customizedName}, '%') AND cu.FROM_APP = 'gov' @@ -81,7 +81,7 @@ WHERE f.DEL_FLAG = '0' AND cu.DEL_FLAG = '0' - AND cu.CUSTOMIZED_NAME = #{customizedName} + AND cu.CUSTOMIZED_NAME like concat('%', #{customizedName}, '%') AND cu.FROM_APP = 'gov' From 9bbf3c7853020db2849fe0bbe335aaf66be72079 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 31 Aug 2020 14:01:27 +0800 Subject: [PATCH 215/360] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E8=B0=83=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/controller/StaffController.java | 5 +++-- .../main/java/com/epmet/service/impl/StaffServiceImpl.java | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java index 8eea5b3461..c3187e3e8e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java @@ -143,11 +143,12 @@ public class StaffController { * @author zhaoqifeng * @date 2020/8/27 16:12 * @param tokenDto - * @param fromDTO + * @param formDTO * @return com.epmet.commons.tools.utils.Result */ @PostMapping("stafftransfer") - public Result staffTransfer(@LoginUser TokenDto tokenDto, @RequestBody StaffTransferFormDTO fromDTO){ + public Result staffTransfer(@LoginUser TokenDto tokenDto, @RequestBody StaffTransferFormDTO formDTO){ + staffService.staffTransfer(tokenDto, formDTO); return new Result(); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java index 170c17fbec..9cae28ab76 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java @@ -238,7 +238,10 @@ public class StaffServiceImpl implements StaffService { StaffRoleDTO staffRoleDTO = new StaffRoleDTO(); staffRoleDTO.setOrgId(fromDTO.getAgencyId()); staffRoleDTO.setStaffId(fromDTO.getStaffId()); - epmetUserOpenFeignClient.changeRoleOrg(staffRoleDTO); + Result result = epmetUserOpenFeignClient.changeRoleOrg(staffRoleDTO); + if (!result.success()) { + throw new RenException(result.getCode(), result.getMsg()); + } //7.操作记录表新增调动记录 StaffTransferRecordDTO staffTransferRecordDTO = new StaffTransferRecordDTO(); staffTransferRecordDTO.setCustomerId(tokenDto.getCustomerId()); From ac1b8df349d28010118e2f88f607f18cea84f258 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 31 Aug 2020 15:38:51 +0800 Subject: [PATCH 216/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=9A=E5=91=98?= =?UTF-8?q?=E5=BF=97=E6=84=BF=E8=80=85=E6=9C=8D=E5=8A=A1=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PartyMemberLeadServiceImpl.java | 27 ++++++++++++++++++- .../screen/ScreenPartyBranchDataDao.xml | 8 +++--- 2 files changed, 31 insertions(+), 4 deletions(-) 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/screen/impl/PartyMemberLeadServiceImpl.java index 2cf28aca5a..1ed8a24261 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -19,6 +19,7 @@ import com.epmet.screen.dto.form.VolunteerServiceFormDTO; import com.epmet.screen.dto.result.*; import com.epmet.screen.constant.*; import com.github.pagehelper.PageHelper; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -126,6 +127,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,16 +146,33 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { result.setAverageJoinUserData(averageJoinUserData); return result; } + + 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; + //VolunteerServiceResult find = Optional.ofNullable(opt.isPresent() ? opt.get() : null).orElse(defaultObj); + organizeData.add(find.getOrganizeData()); + joinData.add(find.getJoinData()); + averageJoinUserData.add(find.getAverageJoinUserData()); + }); + + + /* 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()); }); + */ + + result.setOrganizeData(organizeData); result.setJoinData(joinData); result.setAverageJoinUserData(averageJoinUserData); - String bottomMonthId = collect.get(NumConstant.ZERO).getMonthId(); + String bottomMonthId = yyyyMMList.iterator().next(); //总组织次数 Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId); //总参与人数 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 013f43c74b..2b20c44880 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 @@ -72,14 +72,16 @@ From 9d507ee0331fc04df60e696c01e37dfd668b68ad Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 31 Aug 2020 15:46:42 +0800 Subject: [PATCH 217/360] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-user/epmet-user-server/deploy/docker-compose-prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml index 36ea6d03ac..66f5e1a8b4 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.120 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.121 ports: - "8087:8087" network_mode: host # 不会创建新的网络 From 28f20e7c1c6cc5c1c1dbe3cc9d969df20caf0da4 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 31 Aug 2020 15:55:38 +0800 Subject: [PATCH 218/360] =?UTF-8?q?=E5=85=9A=E5=91=98=E5=BF=97=E6=84=BF?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=20=E6=8E=A5=E5=8F=A3=20=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E8=AE=BE=E7=BD=AE=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/screen/impl/PartyMemberLeadServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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/screen/impl/PartyMemberLeadServiceImpl.java index 1ed8a24261..902861f5e2 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -177,8 +177,8 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId); //总参与人数 Integer totalJoinUserCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId); - result.setTotalOrganizationCount(totalOrganizationCount); - result.setTotalJoinUserCount(totalJoinUserCount); + result.setTotalOrganizationCount(null == totalOrganizationCount ? NumConstant.ZERO : totalOrganizationCount); + result.setTotalJoinUserCount(null == totalJoinUserCount ? NumConstant.ZERO : totalJoinUserCount); return result; } From a89a053552bc4494656cf32ae0d717c86b597d9f Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 31 Aug 2020 16:11:37 +0800 Subject: [PATCH 219/360] =?UTF-8?q?=E5=85=9A=E5=91=98=E5=BF=97=E6=84=BF?= =?UTF-8?q?=E8=80=85=E6=9C=8D=E5=8A=A1=E8=BF=94=E5=8F=82DTO=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/screen/dto/result/VolunteerServiceResultDTO.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java index d856e5081c..e255f61124 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.screen.dto.result; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -37,10 +38,10 @@ public class VolunteerServiceResultDTO implements Serializable { /** * 总组织次数 * */ - private Integer totalOrganizationCount; + private Integer totalOrganizationCount = NumConstant.ZERO; /** * 总参与人数 * */ - private Integer totalJoinUserCount; + private Integer totalJoinUserCount = NumConstant.ZERO; } From 4d7a82b68038d5078d4d8ef2b62cdf1870f46a6e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 31 Aug 2020 16:47:26 +0800 Subject: [PATCH 220/360] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3-?= =?UTF-8?q?=E6=9A=82=E5=AD=98V2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/indexcal/GridScoreDTO.java | 52 ++++ .../dto/indexcal/GridScoreDetailDTO.java | 30 ++ .../FactIndexGovrnAblityGridMonthlyDao.java | 10 + .../com/epmet/dao/indexscore/CpcScoreDao.java | 48 ++- .../epmet/dao/indexscore/GridScoreDao.java | 38 ++- .../dao/screen/ScreenCustomerGridDao.java | 10 + .../entity/indexscore/GridScoreEntity.java | 74 ++--- .../java/com/epmet/eum/IndexCodeEnum.java | 1 + .../impl/GridCorreLationServiceImpl.java | 292 ++++++++++++++---- .../FactIndexGovrnAblityGridMonthlyDao.xml | 11 + .../mapper/indexscore/CpcScoreDao.xml | 61 ++++ .../mapper/indexscore/GridScoreDao.xml | 65 +++- .../mapper/screen/ScreenCustomerGridDao.xml | 13 + 13 files changed, 606 insertions(+), 99 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDetailDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDTO.java new file mode 100644 index 0000000000..5e3b4096f2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDTO.java @@ -0,0 +1,52 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 网格相关分值 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/31 16:38 + */ +@Data +public class GridScoreDTO implements Serializable { + /** + * 网格Id + */ + private String gridId; + + /** + * 客户Id + */ + private String customerId; + + /** + * 网格所属的机关Id + */ + private String agencyId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + private List detailList; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDetailDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDetailDTO.java new file mode 100644 index 0000000000..e2573fbfd9 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/GridScoreDetailDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 网格相关分值 + * + * @author yinzuomei@elink-cn.com + * @date 2020/8/31 16:39 + */ +@Data +public class GridScoreDetailDTO implements Serializable { + /** + * 1:总分;0不是 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan + */ + private String indexCode; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index 90c9a3ea6e..b3002609d1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; @@ -85,4 +86,13 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao selectGovrnAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @return int + * @param formDTO + * @author yinzuomei + * @description 查询当前月共上传了多少条记录治理能力-网格相关事实表 + * @Date 2020/8/31 14:31 + **/ + int selectCount(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java index 74628e78e8..f93338307f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java @@ -18,8 +18,13 @@ package com.epmet.dao.indexscore; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.entity.indexscore.CpcScoreEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.math.BigDecimal; +import java.util.List; /** * 党员相关分值 @@ -29,5 +34,46 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface CpcScoreDao extends BaseDao { - + + /** + * @return java.math.BigDecimal + * @param customerId + * @param monthId + * @param gridId + * @author yinzuomei + * @description 获取网格内党员的联系群众能力考评分(平均值) + * @Date 2020/8/31 10:56 + **/ + BigDecimal selectGridContactMassesAvgValue(@Param("customerId") String customerId, + @Param("monthId") String monthId, + @Param("gridId") String gridId); + + /** + * @return java.util.List + * @param formDTO + * @author yinzuomei + * @description 获取网格内党员的联系群众能力考评分(平均值)的最大值,最小值 + * @Date 2020/8/31 12:10 + **/ + List selectListGridContactMassesAvgValue(CalculateCommonFormDTO formDTO); + + /** + * @return java.util.List + * @param calculateCommonFormDTO + * @author yinzuomei + * @description 网格内党员的参与议事能力考评分(平均值) 最大值最小值 + * @Date 2020/8/31 14:42 + **/ + List selectListJoinIssueAvgValue(CalculateCommonFormDTO calculateCommonFormDTO); + + /** + * @param customerId + * @param monthId + * @param gridId + * @return java.math.BigDecimal + * @author yinzuomei + * @description 组织内党员的参与议事能力考评分(平均值) + * @Date 2020/8/31 15:51 + **/ + BigDecimal selectGridJoinIssueAvgValue(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("gridId") String gridId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java index 77de72959f..30196d21f9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java @@ -18,8 +18,13 @@ package com.epmet.dao.indexscore; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.dto.indexcal.GridScoreDTO; import com.epmet.entity.indexscore.GridScoreEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 网格相关分值 @@ -29,5 +34,36 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface GridScoreDao extends BaseDao { - + /** + * @param customerId + * @param monthId + * @param indexCode + * @param isTotal + * @return int + * @author yinzuomei + * @description + * @Date 2020/8/31 14:00 + **/ + int deleteByCusAndMonthId(@Param("customerId") String customerId, + @Param("monthId") String monthId, + @Param("indexCode") String indexCode, + @Param("isTotal") String isTotal); + + /** + * @return int + * @param gridScoreEntityList + * @author yinzuomei + * @description + * @Date 2020/8/31 14:01 + **/ + int insertBatches(List gridScoreEntityList); + + /** + * @return java.util.List + * @param formDTO + * @author yinzuomei + * @description + * @Date 2020/8/31 16:42 + **/ + List selectList(CalculateCommonFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java index dfb0d95a84..b826b7cbcc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java @@ -84,4 +84,14 @@ public interface ScreenCustomerGridDao extends BaseDao * @Date 2020/8/27 14:42 **/ List pageListByCustomerId(PageQueryGridFormDTO formDTO); + + /** + * @param customerId 客户id + * @param gridId 网格id + * @return java.lang.String + * @author yinzuomei + * @description 查询网格所属的组织id + * @Date 2020/8/31 12:35 + **/ + ScreenCustomerGridDTO selectParentAgencyId(@Param("customerId") String customerId, @Param("gridId") String gridId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java index 3b4b4c44c9..9b1bdf2f73 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java @@ -39,54 +39,54 @@ public class GridScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; - /** - * 客户Id - */ + /** + * 客户Id + */ private String customerId; - /** - * 网格Id - */ + /** + * 网格Id + */ private String gridId; - /** - * 网格所属的机关Id - */ + /** + * 网格所属的机关Id + */ private String agencyId; - /** - * 季度ID - */ + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ private String quarterId; - /** - * 年度ID - */ + /** + * 年度ID: yyyy + */ private String yearId; - /** - * 月维度Id: yyyyMM - */ + /** + * 月维度Id: yyyyMM + */ private String monthId; - /** - * 总指数分值 - */ - private BigDecimal totalScore; - - /** - * 党建能力分值 - */ - private BigDecimal partyAblityScore; - - /** - * 治理能力分值 - */ - private BigDecimal govrnAblityScore; - - /** - * 服务能力分值 - */ - private BigDecimal serviceAblityScore; + /** + * 1:总分;0不是 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan + */ + private String indexCode; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index 71ef0303d4..620175e5c5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -24,6 +24,7 @@ public enum IndexCodeEnum { DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4), LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), + ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydsyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), ; private String code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 556d31f85c..0700e33f7b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -2,15 +2,20 @@ package com.epmet.service.indexcal.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.indexscore.CpcScoreDao; +import com.epmet.dao.indexscore.GridScoreDao; import com.epmet.dao.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CustomerGridInfoDTO; +import com.epmet.dto.indexcal.GridScoreDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; +import com.epmet.entity.indexscore.GridScoreEntity; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.indexcal.GridCorreLationService; @@ -23,12 +28,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; /** * 网格相关service @@ -51,6 +55,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private IndexGroupDetailService indexGroupDetailService; @Autowired private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private CpcScoreDao cpcScoreDao; + @Autowired + private GridScoreDao gridScoreDao; + /** * @param formDTO @@ -67,28 +76,28 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (!CollectionUtils.isEmpty(dangJianNengLiList)) { //1、计算网格相关-党建能力 - calculateGridCorreLationDangJian(formDTO, dangJianNengLiList); + calculateGridDangJian(formDTO, dangJianNengLiList); } - /* List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), + List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (!CollectionUtils.isEmpty(zhiLiNengLiList)) { //2、计算网格相关-治理能力 - calculateGridCorreLationZhiLi(formDTO, zhiLiNengLiList); + calculateGridZhiLi(formDTO, zhiLiNengLiList); } List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (!CollectionUtils.isEmpty(fuWuNengLiList)) { //3、计算网格相关-服务能力 - calculateGridCorreLationFuWu(formDTO, fuWuNengLiList); + calculateGridFuWu(formDTO, fuWuNengLiList); } //计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (!CollectionUtils.isEmpty(wgxgList)) { - calculateGridCorreLationTotal(formDTO, wgxgList); - }*/ + calculateGridTotal(formDTO, wgxgList); + } resultFlag = true; return resultFlag; } @@ -101,7 +110,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description 计算网格相关-党建能力 * @Date 2020/8/26 16:47 **/ - private void calculateGridCorreLationDangJian(CalculateCommonFormDTO formDTO, List indexList) { + @Transactional(rollbackFor = Exception.class) + public void calculateGridDangJian(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { @@ -115,6 +125,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); //指标集合 Map> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap); + List> resultMapList=new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; @@ -140,67 +151,136 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId=(String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(gridId); + BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO,gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); - List result = calculate(indexMap); - // TODO 处理结果 - saveGridCorreLationDangJian(formDTO, indexList, result); - - try { - for (IndexOutputVO m : result) { - logger.info("indexId=" + m.getIndexId()); - for (SampleScore sampleScore : m.getIndexScoreVOs()) { - logger.info(String.format("网格id:%s,得分:%s", sampleScore.getSampleId(), sampleScore.getSampleScore())); - } - } - } catch (Exception e) { - } - + HashMap resultMap = calculate(indexMap); + resultMapList.add(resultMap); } + // 保存中间表 + saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),NumConstant.ZERO_STR); } /** * @return java.util.Map - * @param formDTO + * @param calculateCommonFormDTO * @author yinzuomei - * @description TODO + * @description 获取网格内党员的联系群众能力考评分(平均值)的最大值,最小值 * @Date 2020/8/31 9:51 **/ - private Map contactMassesAblityMap(CalculateCommonFormDTO formDTO) { - - return null; + private Map getContactMassesAblityMap(CalculateCommonFormDTO calculateCommonFormDTO) { + Map map=new HashMap<>(); + List list=cpcScoreDao.selectListGridContactMassesAvgValue(calculateCommonFormDTO); + if(!CollectionUtils.isEmpty(list)){ + BigDecimal minValue=Collections.min(list); + BigDecimal maxValue=Collections.max(list); + map.put(StrConstant.MIN,minValue); + map.put(StrConstant.MAX,maxValue); + return map; + } + map.put(StrConstant.MIN,new BigDecimal(NumConstant.ZERO_STR)); + map.put(StrConstant.MAX,new BigDecimal(NumConstant.ZERO_STR)); + return map; } /** * @return java.math.BigDecimal + * @param calculateCommonFormDTO * @param gridId 网格id - * @author yinzuomei TODO + * @author yinzuomei * @description 获取网格(组织)内党员的联系群众能力考评分(平均值) * @Date 2020/8/31 9:50 **/ - private BigDecimal getGridContactMassesAvgValue(String gridId) { - return null; + private BigDecimal getGridContactMassesAvgValue(CalculateCommonFormDTO calculateCommonFormDTO,String gridId) { + BigDecimal result=cpcScoreDao.selectGridContactMassesAvgValue(calculateCommonFormDTO.getCustomerId(),calculateCommonFormDTO.getMonthId(),gridId); + if(null==result){ + return new BigDecimal(NumConstant.ZERO_STR); + } + return result; } /** - * @param formDTO 客户id 月份id: yyyyMM - * @param indexList 指标集合 - * @param indexOutputVOList + * @return java.math.BigDecimal + * @param formDTO + * @param gridId + * @author yinzuomei + * @description 组织内党员的参与议事能力考评分(平均值) + * @Date 2020/8/31 15:51 + **/ + private BigDecimal getGridJoinIssueAvgValue(CalculateCommonFormDTO formDTO, String gridId) { + BigDecimal result=cpcScoreDao.selectGridJoinIssueAvgValue(formDTO.getCustomerId(),formDTO.getMonthId(),gridId); + if(null==result){ + return new BigDecimal(NumConstant.ZERO_STR); + } + return result; + } + + /** + * @return java.util.Map + * @param calculateCommonFormDTO + * @author yinzuomei + * @description 网格内党员的参与议事能力考评分(平均值) 最大值最小值 + * @Date 2020/8/31 14:41 + **/ + private Map getJoinIssueAblityMap(CalculateCommonFormDTO calculateCommonFormDTO){ + Map map=new HashMap<>(); + List list=cpcScoreDao.selectListJoinIssueAvgValue(calculateCommonFormDTO); + if(!CollectionUtils.isEmpty(list)){ + BigDecimal minValue=Collections.min(list); + BigDecimal maxValue=Collections.max(list); + map.put(StrConstant.MIN,minValue); + map.put(StrConstant.MAX,maxValue); + return map; + } + map.put(StrConstant.MIN,new BigDecimal(NumConstant.ZERO_STR)); + map.put(StrConstant.MAX,new BigDecimal(NumConstant.ZERO_STR)); + return map; + } + + /** + * @param formDTO 客户id 月份id: yyyyMM + * @param resultMapList + * @param indexCode 指标编码 + * @param isTotal 1:总分;0不是 * @return void * @author yinzuomei - * @description 保存网格相关五级指标分值 + * @description 保存网格相关三大能力值 * @Date 2020/8/30 22:50 **/ private void saveGridCorreLationDangJian(CalculateCommonFormDTO formDTO, - List indexList, - List indexOutputVOList) { - Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); - - + List> resultMapList, + String indexCode, + String isTotal) { + List gridScoreEntityList = new ArrayList<>(); + String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); + String yearId = DateUtils.getYearId(formDTO.getMonthId()); + for (HashMap resultMap : resultMapList) { + resultMap.forEach((gridId, partyAblityScore) -> { + logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + GridScoreEntity gridScoreEntity = new GridScoreEntity(); + gridScoreEntity.setCustomerId(formDTO.getCustomerId()); + gridScoreEntity.setGridId(gridId); + gridScoreEntity.setIsTotal(isTotal); + gridScoreEntity.setIndexCode(indexCode); + ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); + if (null != screenCustomerGridDTO) { + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } + gridScoreEntity.setQuarterId(quarterId); + gridScoreEntity.setYearId(yearId); + gridScoreEntity.setMonthId(formDTO.getMonthId()); + gridScoreEntity.setScore(partyAblityScore); + gridScoreEntityList.add(gridScoreEntity); + }); + } + if (!CollectionUtils.isEmpty(gridScoreEntityList)) { + gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode,isTotal); + gridScoreDao.insertBatches(gridScoreEntityList); + } } /** @@ -210,11 +290,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description * @Date 2020/8/30 21:40 **/ - private List calculate(Map> indexMap) { + private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - return batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); } /** @@ -256,23 +336,29 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); - Map contactMassesAblityMap= this.contactMassesAblityMap(formDTO); + Map contactMassesAblityMap= this.getContactMassesAblityMap(formDTO); minValue=contactMassesAblityMap.get(StrConstant.MIN); maxValue=contactMassesAblityMap.get(StrConstant.MAX); + }else if(IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())){ + logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + Map joinIssueAblityMap= this.getJoinIssueAblityMap(formDTO); + minValue=joinIssueAblityMap.get(StrConstant.MIN); + maxValue=joinIssueAblityMap.get(StrConstant.MAX); } else { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); -// logger.info("fieldName=" + fieldName + ";index.getIndexCode()=" + index.getIndexCode()); - //最小值key + if(StringUtils.isBlank(fieldName)){ + logger.error("index_code:"+index.getIndexCode()+"not find field_name"); + continue; + } + logger.info("INDEX_CODE=" + index.getIndexCode()+";FIELD_ID=" + fieldName ); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); - //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } -// logger.info("minValue="+minValue+";maxValue="+maxValue); //分值计算器 - ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, + ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, @@ -290,15 +376,63 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { /** * @param formDTO * @param indexList - * @return void TODO + * @return void * @author yinzuomei * @description 计算网格相关-治理能力 * @Date 2020/8/26 16:47 **/ - private void calculateGridCorreLationZhiLi(CalculateCommonFormDTO formDTO, List indexList) { - + private void calculateGridZhiLi(CalculateCommonFormDTO formDTO, List indexList) { + //查询总记录数 + int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + if (NumConstant.ZERO == total) { + logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + return; + } + //总页数,进行批量查询,批量计算 + int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); + logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + //每一组指标的最大值,key:code_MIN/MAX + Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); + //指标集合 + Map> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap); + List> resultMapList=new ArrayList<>(); + //分页查询采集记录 + for (int pageNo = 1; pageNo <= totalPage; pageNo++) { + int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; + //前10条 + List> recordList = queryListGovrnAblityGrid(new PageQueryGridFormDTO(formDTO.getCustomerId(), + formDTO.getMonthId(), + pageIndex, + pageNo, + IndexCalConstant.PAGE_SIZE)); + //遍历每一个网格的记录 + recordList.forEach(recordMap -> { + //遍历所有的指标 + indexMap.forEach((key, value) -> { + //列名不为空 + if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); + } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { + logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId=(String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO,gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + } + }); + }); + HashMap resultMap = calculate(indexMap); + resultMapList.add(resultMap); + } + // 保存中间表 + saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),NumConstant.ZERO_STR); } + /** * @param formDTO * @param indexList @@ -307,8 +441,51 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description 计算网格相关-服务能力 * @Date 2020/8/26 16:48 **/ - private void calculateGridCorreLationFuWu(CalculateCommonFormDTO formDTO, List indexList) { - + private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { + //查询总记录数 + int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + if (NumConstant.ZERO == total) { + logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + return; + } + //总页数,进行批量查询,批量计算 + int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); + logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + //每一组指标的最大值,key:code_MIN/MAX + Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); + //指标集合 + Map> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap); + List> resultMapList=new ArrayList<>(); + //分页查询采集记录 + for (int pageNo = 1; pageNo <= totalPage; pageNo++) { + int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; + //前10条 + List> recordList = queryListServiceAblityGrid(new PageQueryGridFormDTO(formDTO.getCustomerId(), + formDTO.getMonthId(), + pageIndex, + pageNo, + IndexCalConstant.PAGE_SIZE)); + //遍历每一个网格的记录 + recordList.forEach(recordMap -> { + //遍历所有的指标 + indexMap.forEach((key, value) -> { + //列名不为空 + if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); + }else{ + logger.error("index_code:"+key+" not find field_name"); + } + }); + }); + HashMap resultMap = calculate(indexMap); + resultMapList.add(resultMap); + } + // 保存中间表 + saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.FU_WU_NENG_LI.getCode(),NumConstant.ZERO_STR); } /** @@ -319,8 +496,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description 计算网格相关总分 * @Date 2020/8/26 16:50 **/ - private void calculateGridCorreLationTotal(CalculateCommonFormDTO formDTO, List indexList) { - + private void calculateGridTotal(CalculateCommonFormDTO formDTO, List indexList) { + //查询总记录数 + List gridScoreDTOList=gridScoreDao.selectList(formDTO); + // 保存中间表 TODO +// saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),NumConstant.ONE_STR); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml index e5780e24fa..11c10755fa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -138,4 +138,15 @@ and m.CUSTOMER_ID=#{customerId} and m.MONTH_ID=#{monthId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml index 3a17dcc82b..f4866aaffd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml @@ -23,4 +23,65 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml index 4b1d7f6fcc..6f739c3e36 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml @@ -8,13 +8,13 @@ + - - - - + + + @@ -23,5 +23,62 @@ + + DELETE + FROM + fact_index_grid_score + WHERE + CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + AND INDEX_CODE = #{indexCode} + and IS_TOTAL=#{isTotal} + + + INSERT INTO `fact_index_grid_score` ( + `ID`, + `CUSTOMER_ID`, + `GRID_ID`, + `AGENCY_ID`, + `ALL_PARENT_IDS`, + `QUARTER_ID`, + `YEAR_ID`, + `MONTH_ID`, + `IS_TOTAL`, + `SCORE`, + `INDEX_CODE`, + `DEL_FLAG`, + `REVISION`, + `CREATED_BY`, + `CREATED_TIME`, + `UPDATED_BY`, + `UPDATED_TIME` + ) + VALUES + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.gridId}, + #{item.agencyId}, + #{item.allParentIds}, + #{item.quarterId}, + #{item.yearId}, + #{item.monthId}, + #{item.isTotal}, + #{item.score}, + #{item.indexCode}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index a5bee6054f..a00e0e750a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -92,4 +92,17 @@ order by m.GRID_ID asc LIMIT #{pageIndex}, #{pageSize} + + + From 13a5e793404576377d5b4e9342dee779cbbd42ce Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 31 Aug 2020 16:49:07 +0800 Subject: [PATCH 221/360] =?UTF-8?q?=E6=BC=8F=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/utils/DateUtils.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java index 0a45a6b290..75174f4216 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java @@ -9,6 +9,7 @@ package com.epmet.commons.tools.utils; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; import org.joda.time.LocalDate; @@ -33,6 +34,11 @@ public class DateUtils { public static final List Q3Months = Arrays.asList(7, 8, 9); public static final List Q4Months = Arrays.asList(10, 11, 12); + public static final List Q1MonthsStrList = Arrays.asList("1", "2", "3","01","02","03"); + public static final List Q2MonthsStrList = Arrays.asList("4", "5", "6","04", "05", "06"); + public static final List Q3MonthsStrList = Arrays.asList("7", "8", "9","07", "08", "09"); + public static final List Q4MonthsStrList = Arrays.asList("10", "11", "12"); + /** 时间格式(yyyy-MM-dd) */ public final static String DATE_PATTERN = "yyyy-MM-dd"; /** 时间格式(yyyy-MM-dd HH:mm:ss) */ @@ -298,6 +304,29 @@ public class DateUtils { return 4; } + /** + * 获取季度 + * @param monthId yyyyMM + * @return yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + public static String getQuarterId(String monthId) { + String year = monthId.substring(0, 4); + String month = monthId.substring(4, 6); + if (Q1MonthsStrList.contains(month)) { + return year.concat("Q1"); + } + if (Q2MonthsStrList.contains(month)) { + return year.concat("Q2"); + } + if (Q3MonthsStrList.contains(month)) { + return year.concat("Q3"); + } + if(Q4MonthsStrList.contains(month)){ + return year.concat("Q4"); + } + return StrConstant.EPMETY_STR; + } + /** * 根据季度查询季度的月份列表 * @param quarterIndex @@ -557,4 +586,11 @@ public class DateUtils { System.out.println(comparteDate(yesterDay,today)); System.out.println(comparteDate(tomorrow,today)); } + + public static String getYearId(String monthId) { + if (StringUtils.isNotBlank(monthId) && monthId.length() > 4) { + return monthId.substring(NumConstant.ZERO, NumConstant.FOUR); + } + return StrConstant.EPMETY_STR; + } } From c1ea0143db61542b5712f32d3c84c15d1e5ca165 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 31 Aug 2020 16:57:48 +0800 Subject: [PATCH 222/360] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml index a2a223a704..eede66ca29 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.135 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.136 ports: - "8110:8110" network_mode: host # 使用现有网络 From b50af788474380c675b9dcd47f83e6de38205387 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 31 Aug 2020 17:09:30 +0800 Subject: [PATCH 223/360] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=BE=AE=E4=BF=A1=E7=94=A8=E6=88=B7=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ThirdLoginController.java | 21 ++++++++-- .../epmet/dto/form/GetResiWxPhoneFormDTO.java | 39 +++++++++++++++++++ .../com/epmet/service/ThirdLoginService.java | 9 +++++ .../service/impl/ThirdLoginServiceImpl.java | 38 ++++++++++++++++++ 4 files changed, 103 insertions(+), 4 deletions(-) create mode 100644 epmet-auth/src/main/java/com/epmet/dto/form/GetResiWxPhoneFormDTO.java diff --git a/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java b/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java index 924c1a4070..00770d82bb 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java @@ -2,13 +2,11 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.dto.form.LoginFormDTO; -import com.epmet.dto.form.StaffOrgsFormDTO; -import com.epmet.dto.form.ThirdStaffOrgsFormDTO; -import com.epmet.dto.form.ThirdWxmpEnteOrgFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.StaffOrgsResultDTO; import com.epmet.dto.result.UserTokenResultDTO; import com.epmet.service.ThirdLoginService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -91,4 +89,19 @@ public class ThirdLoginController { return new Result>().ok(staffOrgs); } + /** + * @param formDTO + * @return + * @author sun + * @description 单客户-获取微信用户手机号 + **/ + @PostMapping("getresiwxphone") + public Result getResiWxPhone(@RequestBody GetResiWxPhoneFormDTO formDTO) { + String phone = thirdLoginService.getResiWxPhone(formDTO); + if (StringUtils.isNotBlank(phone) && !"null".equals(phone)) { + return new Result().ok(phone); + } + return new Result().ok(""); + } + } diff --git a/epmet-auth/src/main/java/com/epmet/dto/form/GetResiWxPhoneFormDTO.java b/epmet-auth/src/main/java/com/epmet/dto/form/GetResiWxPhoneFormDTO.java new file mode 100644 index 0000000000..30e7d947d6 --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/dto/form/GetResiWxPhoneFormDTO.java @@ -0,0 +1,39 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 单客户-获取微信用户手机号 + * + * @author sun + */ +@Data +public class GetResiWxPhoneFormDTO implements Serializable { + private static final long serialVersionUID = 4381236451736209332L; + /** + * 小程序appId + */ + @NotBlank(message = "appId不能为空",groups = {AddUserInternalGroup.class}) + private String appId; + /** + * 微信code + */ + @NotBlank(message = "wxCode不能为空",groups = {AddUserInternalGroup.class}) + private String wxCode; + /** + * 用户信息 + */ + @NotBlank(message = "encryptedData不能为空",groups = {AddUserInternalGroup.class}) + private String encryptedData; + /** + * 加密算法的初始向量 + */ + @NotBlank(message = "iv不能为空",groups = {AddUserInternalGroup.class}) + private String iv; + + public interface AddUserInternalGroup {} + +} diff --git a/epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java b/epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java index b343bf5a22..3d9c60cc64 100644 --- a/epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java +++ b/epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java @@ -1,5 +1,6 @@ package com.epmet.service; +import com.epmet.dto.form.GetResiWxPhoneFormDTO; import com.epmet.dto.form.LoginFormDTO; import com.epmet.dto.form.ThirdStaffOrgsFormDTO; import com.epmet.dto.form.ThirdWxmpEnteOrgFormDTO; @@ -53,4 +54,12 @@ public interface ThirdLoginService { * @description 单客户-手机号密码获取组织 **/ List getMyOrgByPassword(ThirdStaffOrgsFormDTO formDTO); + + /** + * @param formDTO + * @return + * @author sun + * @description 单客户-获取微信用户手机号 + **/ + String getResiWxPhone(GetResiWxPhoneFormDTO formDTO); } diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index a7980eebe1..9e50e6b796 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -1,6 +1,8 @@ package com.epmet.service.impl; import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; +import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; +import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.epmet.common.token.constant.LoginConstant; @@ -549,4 +551,40 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { return userWechatDTO; } + /** + * @param formDTO + * @return + * @author sun + * @description 单客户-获取微信用户手机号 + * 【此接口只适配第三方客户,对于党群e事通客户还是走原接口】 + **/ + @Override + public String getResiWxPhone(GetResiWxPhoneFormDTO formDTO) { + String phone = ""; + try { + //1.根据wxcode获取sessionKey + WxLoginFormDTO resiLoginFormDTO = new WxLoginFormDTO(); + resiLoginFormDTO.setAppId(formDTO.getAppId()); + resiLoginFormDTO.setWxCode(formDTO.getWxCode()); + //此方法会校验appId是否授权,然后在判断客户是否存在,之后才是获取sessionKey,如果只想获取sessionKey需要写新接口 + UserWechatDTO userWechatDTO = this.getUserWeChat(resiLoginFormDTO); + if (null == userWechatDTO || null == userWechatDTO.getSessionKey()) { + logger.error(String.format("调用生成third服务wxcode获取sessionKey失败,对应appId->" + formDTO.getAppId())); + throw new RenException("获取本机号码失败"); + } + + //2.使用sessionKey解密获取手机号 + WxMaPhoneNumberInfo phoneNoInfo = WxMaPhoneNumberInfo.fromJson(WxMaCryptUtils.decrypt(userWechatDTO.getSessionKey(), + formDTO.getEncryptedData(), + formDTO.getIv())); + if (null != phoneNoInfo) { + phone = phoneNoInfo.getPurePhoneNumber(); + } + } catch (Exception e) { + e.printStackTrace(); + log.error(String.format("获取用户微信绑定的手机号接口异常%s", e.getMessage())); + } + return phone; + } + } From 180053a363fb787ed2af83ee55e028ec8afc6244 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 31 Aug 2020 17:11:27 +0800 Subject: [PATCH 224/360] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/IndexCalConstant.java | 2 + .../data-statistical-server/pom.xml | 2 +- .../controller/IndexCalculateController.java | 2 +- .../com/epmet/dao/indexscore/CpcScoreDao.java | 5 + .../entity/indexscore/CpcScoreEntity.java | 35 ++-- .../impl/CpcIndexCalculateServiceImpl.java | 158 +++++++++++++----- .../java/com/epmet/util/Pinyin4jUtil.java | 3 + .../mapper/indexscore/CpcScoreDao.xml | 15 +- .../mapper/screen/IndexGroupDetailDao.xml | 6 +- 9 files changed, 155 insertions(+), 73 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index aff436ff3d..79321c6026 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -12,6 +12,8 @@ public interface IndexCalConstant { String GRID_ID="GRID_ID"; + String AGENCY_ID="AGENCY_ID"; + String CUSTOMER_ID="CUSTOMER_ID"; String MONTH_ID="MONTH_ID"; diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 8d0e953c05..a805e4a53c 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -195,7 +195,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 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 index c2211c0d80..9dab47c148 100644 --- 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 @@ -44,7 +44,7 @@ public class IndexCalculateController { } @PostMapping("getMax") public Result getMax(){ - CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO("c1","202008"); + CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); cpcIndexCalculateService.cpcIndexCalculate(calculateCommonFormDTO); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java index f93338307f..2bab7efa56 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java @@ -25,6 +25,7 @@ import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.List; +import java.util.Map; /** * 党员相关分值 @@ -76,4 +77,8 @@ public interface CpcScoreDao extends BaseDao { * @Date 2020/8/31 15:51 **/ BigDecimal selectGridJoinIssueAvgValue(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("gridId") String gridId); + + int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode); + + List> getPartScoreByPage(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") int offset, @Param("pageSize") int pageSize); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java index 59c4269a3b..a9781ea496 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java @@ -18,13 +18,11 @@ package com.epmet.entity.indexscore; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党员相关分值 @@ -54,34 +52,29 @@ public class CpcScoreEntity extends BaseEpmetEntity { */ private String gridId; - /** - * 用户id - */ - private String userId; /** - * 月维度Id: yyyyMM + * 年维度Id: yyyy */ - private String monthId; + private String yearId; - /** - * 党建能力分值 - */ - private BigDecimal partyAblityScore; + /** + * 月维度Id: yyyyMM + */ + private String monthId; - /** - * 参与议事分值 - */ - private BigDecimal joinIssueScore; + /** + * 用户id + */ + private String userId; /** - * 党务活动分值 + * 分值 */ - private BigDecimal partyWorkActScore; + private BigDecimal score; /** - * 联系群众分值 + * 指标code */ - private BigDecimal contactMassesScore; - + private String indexCode; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index 521c9dd631..ee7d161ecb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,11 +1,13 @@ package com.epmet.service.indexcal.impl; -import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.indexscore.CpcScoreDao; import com.epmet.dao.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.indexscore.CpcScoreEntity; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.indexcal.CpcIndexCalculateService; @@ -18,6 +20,7 @@ import com.epmet.support.normalizing.ScoreConstants; import com.epmet.support.normalizing.batch.BatchScoreCalculator; import com.epmet.support.normalizing.batch.IndexInputVO; import com.epmet.support.normalizing.batch.SampleValue; +import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -26,10 +29,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; @Slf4j @@ -43,24 +43,53 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { private IndexGroupDetailService getDetailListByParentCode; @Autowired private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private CpcScoreDao cpcScoreDao; @Override public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) { - //获取指标权重信息 -参与议事 - List indexDetails = getDetailListByParentCode.getDetailListLikeParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); - if (CollectionUtils.isEmpty(indexDetails)) { + + calculatePartScore(formDTO); + calculateTotalScore(formDTO); + + + return null; + } + + /** + * desc: 计算总分 + * @param formDTO + */ + private void calculateTotalScore(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); - return false; + return; } + //获取数据 + List> list = null; + int pageNo = 1; + int pageSize = 10; + do { - canyuyishi(formDTO, indexDetails); + list = cpcScoreDao.getPartScoreByPage(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); + if (!CollectionUtils.isEmpty(list)) { + list.forEach(partScore->{ + partScore.get(IndexCalConstant.USER_ID) + }); + //遍历指标分组 计算分数 + List> finalList = list; + groupIndexDetailsMap.forEach((parentIndexCode, details) -> { + calculate(formDTO, details, finalList, minAndMaxMap, parentIndexCode); + }); + } + } while (!CollectionUtils.isEmpty(list) && pageNo++ > 0); - //log.info(JSON.toJSONString(minAndMaxList)); - return null; } - private void canyuyishi(CalculateCommonFormDTO formDTO, List indexDetails) { + private void calculatePartScore(CalculateCommonFormDTO formDTO) { Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); if (CollectionUtils.isEmpty(indexCodeFieldReList)) { log.error("cpcIndexCalculate have any indexcodefieldre"); @@ -74,9 +103,29 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } //指标集合 //对指标进行分组 - Map> groupIndexDetailsMap = indexDetails.stream().collect(Collectors.groupingBy(IndexGroupDetailEntity::getAllParentIndexCode)); + //Map> groupIndexDetailsMap = indexDetails.stream().collect(Collectors.groupingBy(IndexGroupDetailEntity::getAllParentIndexCode)); + //获取指标权重信息 -参与议事 + List canyuyishiIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.CAN_YU_YI_SHI.getCode()); + if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) { + log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + return; + } + List dangwuhongdongIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_WU_HUO_DONG.getCode()); + if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) { + log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + return; + } + List lianxiqunzhongIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.LIAN_XI_QUN_ZHONG.getCode()); + if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) { + log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + return; + } + Map> groupIndexDetailsMap = new HashMap<>(); + groupIndexDetailsMap.put(IndexCodeEnum.CAN_YU_YI_SHI.getCode(), canyuyishiIndexDetails); + groupIndexDetailsMap.put(IndexCodeEnum.DANG_WU_HUO_DONG.getCode(), dangwuhongdongIndexDetails); + groupIndexDetailsMap.put(IndexCodeEnum.LIAN_XI_QUN_ZHONG.getCode(), lianxiqunzhongIndexDetails); List> list = null; int pageNo = 1; @@ -87,42 +136,65 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //遍历指标分组 计算分数 List> finalList = list; - groupIndexDetailsMap.forEach((parentIndex, indexDetailList)->{ - Map> indexMap = getIndexInputVO(indexDetailList, minAndMaxMap); - //遍历指标 进行计算 - for (Map.Entry> entry : indexMap.entrySet()) { - String indexCode = entry.getKey(); - IndexInputVO value = entry.getValue(); - String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); - if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); - continue; - } - for (Map cpcIndex : finalList) { - //对应的数值 - String sampleValueStr = String.valueOf(cpcIndex.get(indexCodeFieldReService.getFieldNameByIndexCode(fieldName))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) cpcIndex.get(IndexCalConstant.USER_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } - } - HashMap result = calculate(indexMap); - // TODO 处理结果 - saveGridCorreLationDangJian(formDTO, indexDetails, result); - - try { - System.out.println( JSON.toJSONString(result)); - } catch (Exception e) { - } + groupIndexDetailsMap.forEach((parentIndexCode, details) -> { + calculate(formDTO, details, finalList, minAndMaxMap, parentIndexCode); }); } } while (!CollectionUtils.isEmpty(list) && pageNo++ > 0); } - @Transactional(rollbackFor = Exception.class) - public void saveGridCorreLationDangJian(CalculateCommonFormDTO formDTO, List indexDetails, HashMap result) { + private void calculate(CalculateCommonFormDTO formDTO, List indexDetailList, List> finalList, Map minAndMaxMap, String parentIndexCode) { + Map> indexMap = getIndexInputVO(indexDetailList, minAndMaxMap); + Map scoreEntityMap = new HashMap<>(); + //遍历指标 进行计算 + for (Map.Entry> entry : indexMap.entrySet()) { + String indexCode = entry.getKey(); + IndexInputVO value = entry.getValue(); + String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); + if (StringUtils.isBlank(fieldName)) { + log.error("cpcIndexCalculate fieldName error"); + continue; + } + + for (Map cpcCount : finalList) { + //对应的数值 + String userId = String.valueOf(cpcCount.get(IndexCalConstant.USER_ID)); + String sampleValueStr = String.valueOf(cpcCount.get(fieldName)); + + CpcScoreEntity cpcScoreEntity = new CpcScoreEntity(); + cpcScoreEntity.setYearId(DimIdGenerator.getYearDimId(DateUtils.addDateMonths(new Date(), -1))); + cpcScoreEntity.setCustomerId(formDTO.getCustomerId()); + cpcScoreEntity.setAgencyId(String.valueOf(cpcCount.get(IndexCalConstant.AGENCY_ID))); + cpcScoreEntity.setGridId(String.valueOf(cpcCount.get(IndexCalConstant.GRID_ID))); + cpcScoreEntity.setUserId(userId); + cpcScoreEntity.setMonthId(formDTO.getMonthId()); + cpcScoreEntity.setScore(new BigDecimal(0)); + cpcScoreEntity.setIndexCode(parentIndexCode); + scoreEntityMap.put(userId, cpcScoreEntity); + + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) cpcCount.get(IndexCalConstant.USER_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); + } + } + log.warn("计算的参数:{}", indexMap); + HashMap result = calculate(indexMap); + + //处理结果 + saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); + } + + + @Transactional(rollbackFor = Exception.class) + public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { + cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + result.forEach((userId, score) -> { + CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); + cpcScoreEntity.setScore(score); + cpcScoreDao.insert(cpcScoreEntity); + }); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java index c6e61ffb01..bedaf09f1b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java @@ -25,6 +25,8 @@ public class Pinyin4jUtil { duoyinMap.put('率',new String[]{"lv"}); duoyinMap.put('员',new String[]{"yuan"}); duoyinMap.put('提',new String[]{"ti"}); + duoyinMap.put('被',new String[]{"bei"}); + duoyinMap.put('期',new String[]{"qi"}); } /** @@ -192,5 +194,6 @@ public class Pinyin4jUtil { public static void main(String[] args) { System.out.println(getFirstSpellPinYin("区直部门",false)); System.out.println(getSpellPinYin("党员提出话题数",false,4)); + System.out.println(getSpellPinYin("社区超期项目数",false,4)); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml index f4866aaffd..9696bf3702 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml @@ -10,10 +10,6 @@ - - - - @@ -22,6 +18,17 @@ + + delete from fact_index_cpc_score where CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and MONTH_ID = #{monthId,jdbcType=VARCHAR} and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} + + + + select - ID, INDEX_GROUP_ID, INDEX_ID, INDEX_CODE, WEIGHT, THRESHOLD + ID,CUSTOMER_ID, INDEX_GROUP_ID, INDEX_ID, INDEX_CODE, WEIGHT, THRESHOLD, ALL_PARENT_INDEX_CODE FROM index_group_detail WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0' @@ -15,10 +15,10 @@ \ No newline at end of file From e5df941b4b7d2762c67f68d3c067dd5278e61625 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 31 Aug 2020 17:13:23 +0800 Subject: [PATCH 225/360] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dao/indexscore/CpcScoreDao.java | 3 +-- .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 10 +++------- .../main/resources/mapper/indexscore/CpcScoreDao.xml | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java index 2bab7efa56..99303193bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java @@ -25,7 +25,6 @@ import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.List; -import java.util.Map; /** * 党员相关分值 @@ -80,5 +79,5 @@ public interface CpcScoreDao extends BaseDao { int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode); - List> getPartScoreByPage(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") int offset, @Param("pageSize") int pageSize); + List getPartScoreByPage(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") int offset, @Param("pageSize") int pageSize); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index ee7d161ecb..b9338e4d32 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -69,7 +69,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { return; } //获取数据 - List> list = null; + List list = null; int pageNo = 1; int pageSize = 10; do { @@ -77,13 +77,9 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { list = cpcScoreDao.getPartScoreByPage(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); if (!CollectionUtils.isEmpty(list)) { list.forEach(partScore->{ - partScore.get(IndexCalConstant.USER_ID) - }); - //遍历指标分组 计算分数 - List> finalList = list; - groupIndexDetailsMap.forEach((parentIndexCode, details) -> { - calculate(formDTO, details, finalList, minAndMaxMap, parentIndexCode); + }); + } } while (!CollectionUtils.isEmpty(list) && pageNo++ > 0); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml index 9696bf3702..3694e52024 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml @@ -22,7 +22,7 @@ delete from fact_index_cpc_score where CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and MONTH_ID = #{monthId,jdbcType=VARCHAR} and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} - select CUSTOMER_ID,AGENCY_ID,GRID_ID,USER_ID,SCORE,INDEX_CODE FROM fact_index_cpc_score WHERE From 7f7e904c5648f1c8b7215a476b051d97c13f489e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 31 Aug 2020 17:38:32 +0800 Subject: [PATCH 226/360] =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E3=80=81=E5=85=9A=E5=91=98=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=20=E6=89=8B=E6=9C=BA=E5=8F=B7=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=94=B9=E4=B8=BA=E9=9D=9E=E5=BF=85=E9=A1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PartyMemberConfirmServiceImpl.java | 19 ++++++++++--------- .../service/impl/UserResiInfoServiceImpl.java | 16 +++++++++------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java index 8a0958ff8b..93aa5af28c 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java @@ -173,15 +173,16 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService Result result = new Result(); //校验手机验证码是否正常 - //TODO 党员认证信息提交暂时注释验证码校验 - /*String code = partyMemberInfoRedis.getUserMobileCode(partyMemberInfoDTO.getUserId(), - partyMemberInfoDTO.getMobile(), - partyMemberInfoDTO.getCode()); - if (null == code) { - saveOrUpdateVisit(partyMemberInfoDTO.getPartymemberVisitId(), null, - PartyMemberConstant.OPERATE_AUTO_FAILED); - return new Result().error(EpmetErrorCode.MOBILE_CODE_ERROR.getCode()); - }*/ + if (StringUtils.isNotBlank(partyMemberInfoDTO.getCode())) { + String code = partyMemberInfoRedis.getUserMobileCode(partyMemberInfoDTO.getUserId(), + partyMemberInfoDTO.getMobile(), + partyMemberInfoDTO.getCode()); + if (null == code) { + saveOrUpdateVisit(partyMemberInfoDTO.getPartymemberVisitId(), null, + PartyMemberConstant.OPERATE_AUTO_FAILED); + return new Result().error(EpmetErrorCode.MOBILE_CODE_ERROR.getCode()); + } + } //获取党员基本信息(匹配) PartymemberConfirmAutoDTO confirmAutoDTO = diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java index fd7b3a0072..e8148b7418 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java @@ -162,13 +162,15 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl Date: Mon, 31 Aug 2020 17:59:49 +0800 Subject: [PATCH 227/360] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=85=9A=E5=91=98?= =?UTF-8?q?=E6=80=BB=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/indexscore/CpcScoreDao.java | 13 ++++-- .../entity/indexscore/CpcScoreEntity.java | 5 ++ .../impl/CpcIndexCalculateServiceImpl.java | 45 +++++++++++++----- .../mapper/indexscore/CpcScoreDao.xml | 46 ++++++++++++++++++- 4 files changed, 90 insertions(+), 19 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java index 99303193bf..2142128e3b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java @@ -24,6 +24,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; +import java.util.Collection; import java.util.List; /** @@ -36,10 +37,10 @@ import java.util.List; public interface CpcScoreDao extends BaseDao { /** - * @return java.math.BigDecimal * @param customerId * @param monthId * @param gridId + * @return java.math.BigDecimal * @author yinzuomei * @description 获取网格内党员的联系群众能力考评分(平均值) * @Date 2020/8/31 10:56 @@ -49,17 +50,17 @@ public interface CpcScoreDao extends BaseDao { @Param("gridId") String gridId); /** - * @return java.util.List * @param formDTO + * @return java.util.List * @author yinzuomei - * @description 获取网格内党员的联系群众能力考评分(平均值)的最大值,最小值 + * @description 获取网格内党员的联系群众能力考评分(平均值)的最大值,最小值 * @Date 2020/8/31 12:10 **/ List selectListGridContactMassesAvgValue(CalculateCommonFormDTO formDTO); /** - * @return java.util.List * @param calculateCommonFormDTO + * @return java.util.List * @author yinzuomei * @description 网格内党员的参与议事能力考评分(平均值) 最大值最小值 * @Date 2020/8/31 14:42 @@ -79,5 +80,7 @@ public interface CpcScoreDao extends BaseDao { int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode); - List getPartScoreByPage(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") int offset, @Param("pageSize") int pageSize); + List getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId); + + int insertBatch(@Param("list") Collection values); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java index a9781ea496..cca1b90ff2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java @@ -77,4 +77,9 @@ public class CpcScoreEntity extends BaseEpmetEntity { * 指标code */ private String indexCode; + + /** + * 是否是总分 1是0不是 + */ + private String isTotal; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index b9338e4d32..1293e23dc9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,6 +1,8 @@ package com.epmet.service.indexcal.impl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; @@ -53,12 +55,12 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { calculatePartScore(formDTO); calculateTotalScore(formDTO); - - return null; + return true; } /** * desc: 计算总分 + * * @param formDTO */ private void calculateTotalScore(CalculateCommonFormDTO formDTO) { @@ -70,19 +72,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } //获取数据 List list = null; - int pageNo = 1; - int pageSize = 10; - do { + Map cpcScoreTotalMap = new HashMap<>(); + Map indexWeightMap = parentIndexDetails.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o)); + + list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId()); + if (!CollectionUtils.isEmpty(list)) { + Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId)); + userGroupMap.forEach((userId, partScoreList) -> { + CpcScoreEntity totalEntity = null; + for (CpcScoreEntity part : partScoreList) { + IndexGroupDetailEntity indexGroupDetailEntity = indexWeightMap.get(part.getIndexCode()); + if (totalEntity == null) { + totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); + totalEntity.setIsTotal(NumConstant.ONE_STR); + totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + cpcScoreTotalMap.put(userId, totalEntity); + } + BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); + totalEntity.setScore(totalEntity.getScore().add(total)); + } + }); + } - list = cpcScoreDao.getPartScoreByPage(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); - if (!CollectionUtils.isEmpty(list)) { - list.forEach(partScore->{ + insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); - }); - } - } while (!CollectionUtils.isEmpty(list) && pageNo++ > 0); + } + private void insertBatch(Collection values) { + cpcScoreDao.insertBatch(values); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { @@ -165,6 +183,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { cpcScoreEntity.setAgencyId(String.valueOf(cpcCount.get(IndexCalConstant.AGENCY_ID))); cpcScoreEntity.setGridId(String.valueOf(cpcCount.get(IndexCalConstant.GRID_ID))); cpcScoreEntity.setUserId(userId); + cpcScoreEntity.setIsTotal(NumConstant.ZERO_STR); cpcScoreEntity.setMonthId(formDTO.getMonthId()); cpcScoreEntity.setScore(new BigDecimal(0)); cpcScoreEntity.setIndexCode(parentIndexCode); @@ -186,11 +205,13 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); - cpcScoreDao.insert(cpcScoreEntity); + list.add(cpcScoreEntity); }); + this.insertBatch(list); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml index 3694e52024..c3b2529e0c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml @@ -22,9 +22,9 @@ delete from fact_index_cpc_score where CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and MONTH_ID = #{monthId,jdbcType=VARCHAR} and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} - select - CUSTOMER_ID,AGENCY_ID,GRID_ID,USER_ID,SCORE,INDEX_CODE FROM fact_index_cpc_score + CUSTOMER_ID,AGENCY_ID,GRID_ID,YEAR_ID,MONTH_ID,USER_ID,SCORE,INDEX_CODE FROM fact_index_cpc_score WHERE CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and MONTH_ID = #{monthId,jdbcType=VARCHAR} AND IS_TOTAL = '0' @@ -91,4 +91,46 @@ GROUP BY m.GRID_ID + + + INSERT INTO `fact_index_cpc_score` ( + `ID`, + `CUSTOMER_ID`, + `GRID_ID`, + `AGENCY_ID`, + `YEAR_ID`, + `MONTH_ID`, + `USER_ID`, + `IS_TOTAL`, + `SCORE`, + `INDEX_CODE`, + `DEL_FLAG`, + `REVISION`, + `CREATED_BY`, + `CREATED_TIME`, + `UPDATED_BY`, + `UPDATED_TIME` + ) + VALUES + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{item.customerId}, + #{item.gridId}, + #{item.agencyId}, + #{item.yearId}, + #{item.monthId}, + #{item.userId}, + #{item.isTotal}, + #{item.score}, + #{item.indexCode}, + '0', + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + \ No newline at end of file From 4d6adb90b30943ce7c55580d14b152ff4f8ea251 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 31 Aug 2020 18:10:07 +0800 Subject: [PATCH 228/360] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3-?= =?UTF-8?q?=E6=9A=82=E5=AD=98V3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dao/indexscore/GridScoreDao.java | 2 +- .../impl/GridCorreLationServiceImpl.java | 47 +++++++++++++++---- .../mapper/indexscore/GridScoreDao.xml | 35 +++++++++++++- 3 files changed, 71 insertions(+), 13 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java index 30196d21f9..71316cf4f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java @@ -38,7 +38,7 @@ public interface GridScoreDao extends BaseDao { * @param customerId * @param monthId * @param indexCode - * @param isTotal + * @param isTotal 1:总分;0不是 * @return int * @author yinzuomei * @description diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 0700e33f7b..74afb589f3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -11,10 +11,7 @@ import com.epmet.dao.indexscore.CpcScoreDao; import com.epmet.dao.indexscore.GridScoreDao; import com.epmet.dao.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; -import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.dto.indexcal.CustomerGridInfoDTO; -import com.epmet.dto.indexcal.GridScoreDTO; -import com.epmet.dto.indexcal.PageQueryGridFormDTO; +import com.epmet.dto.indexcal.*; import com.epmet.entity.indexscore.GridScoreEntity; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; @@ -33,6 +30,8 @@ import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; /** * 网格相关service @@ -96,7 +95,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (!CollectionUtils.isEmpty(wgxgList)) { - calculateGridTotal(formDTO, wgxgList); + calculateGridTotal(formDTO, wgxgList,IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); } resultFlag = true; return resultFlag; @@ -496,14 +495,42 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description 计算网格相关总分 * @Date 2020/8/26 16:50 **/ - private void calculateGridTotal(CalculateCommonFormDTO formDTO, List indexList) { + private void calculateGridTotal(CalculateCommonFormDTO formDTO, List indexList, String indexCode) { //查询总记录数 - List gridScoreDTOList=gridScoreDao.selectList(formDTO); - // 保存中间表 TODO -// saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),NumConstant.ONE_STR); + List gridScoreDTOList = gridScoreDao.selectList(formDTO); + Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); + List gridScoreEntityList = new ArrayList<>(); + gridScoreDTOList.forEach(gridScoreDTO -> { + GridScoreEntity gridScoreEntity = new GridScoreEntity(); + gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); + gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + gridScoreEntity.setIsTotal(NumConstant.ONE_STR); + gridScoreEntity.setIndexCode(indexCode); + gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); + gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); + gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); + gridScoreEntity.setYearId(gridScoreDTO.getYearId()); + gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); + gridScoreEntity.setScore(BigDecimal.ZERO); + for(GridScoreDetailDTO gridScoreDetailDTO:gridScoreDTO.getDetailList()){ + BigDecimal indexScore=gridScoreDetailDTO.getScore().multiply(indexMap.get(gridScoreDetailDTO.getIndexCode()).getWeight()); + gridScoreEntity.setScore(gridScoreEntity.getScore().add(indexScore)); + } + gridScoreEntityList.add(gridScoreEntity); + }); + if (!CollectionUtils.isEmpty(gridScoreEntityList)) { + gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, NumConstant.ONE_STR); + gridScoreDao.insertBatches(gridScoreEntityList); + } } - + public static void main(String[] args) { + BigDecimal totalScore=BigDecimal.ZERO; + for(int i=1;i<5;i++){ + totalScore=totalScore.add(new BigDecimal("1.00")); + } + System.out.println(totalScore); + } /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml index 6f739c3e36..35a12160ce 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/GridScoreDao.xml @@ -78,7 +78,38 @@ - + SELECT + m.GRID_ID, + m.CUSTOMER_ID, + m.AGENCY_ID, + m.ALL_PARENT_IDS, + m.QUARTER_ID, + m.YEAR_ID, + m.MONTH_ID, + m.IS_TOTAL, + M.SCORE, + M.INDEX_CODE + FROM + fact_index_grid_score m + WHERE + m.DEL_FLAG = '0' + AND m.IS_TOTAL='0' + AND m.CUSTOMER_ID =#{customerId} + AND m.MONTH_ID =#{monthId} \ No newline at end of file From 255971ad11aa3d5556f6e711d11dc96a3060da27 Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 31 Aug 2020 18:19:48 +0800 Subject: [PATCH 229/360] =?UTF-8?q?=E5=88=86=E5=80=BC=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=99=A8=E4=BF=9D=E7=95=996=E4=BD=8D=E5=B0=8F=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E5=9B=9B=E8=88=8D=E4=BA=94=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../support/normalizing/batch/BatchScoreCalculator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index d42ae98562..361d81f95f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -3,6 +3,7 @@ package com.epmet.support.normalizing.batch; import com.epmet.support.normalizing.ScoreCalculator; import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; @@ -24,7 +25,7 @@ public class BatchScoreCalculator { // 循环同一个指标内的多个样本值的SampleValue列表 List scores4OneIndex = indexValueVOs.stream().map(vo -> { - BigDecimal score = scoreCalculator.normalize(vo.getSampleValue(), weight); + BigDecimal score = scoreCalculator.normalize(vo.getSampleValue(), weight).setScale(6, RoundingMode.HALF_UP);; return new SampleScore(vo.getSampleId(), score); }).collect(Collectors.toList()); @@ -52,9 +53,10 @@ public class BatchScoreCalculator { String sampleId = vo.getSampleId(); BigDecimal score = scoreCalculator.normalize(vo.getSampleValue(), weight); if (scoreCountOfSamples.containsKey(sampleId)) { - BigDecimal newScore = scoreCountOfSamples.get(sampleId).add(score); + BigDecimal newScore = scoreCountOfSamples.get(sampleId).add(score).setScale(6, RoundingMode.HALF_UP); scoreCountOfSamples.put(sampleId, newScore); } else { + score.setScale(6, RoundingMode.HALF_UP); scoreCountOfSamples.put(sampleId, score); } } From 93fdcc50e97815fb9af9e516569884133d7d765d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 31 Aug 2020 18:46:31 +0800 Subject: [PATCH 230/360] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3-?= =?UTF-8?q?=E6=9A=82=E5=AD=98V3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GridCorreLationServiceImpl.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 74afb589f3..7897c2560b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -123,7 +123,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); //指标集合 - Map> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap); + Map> indexMap = getGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); List> resultMapList=new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { @@ -318,10 +318,10 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @param minAndMaxMap 最大值最小值集合 * @return java.util.Map * @author yinzuomei - * @description + * @description 构造网格相关 指标计算参数 * @Date 2020/8/30 15:56 **/ - private Map> getIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { + private Map> getGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (int indexNum = 0; indexNum < indexList.size(); indexNum++) { IndexGroupDetailEntity index = indexList.get(indexNum); @@ -347,7 +347,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if(StringUtils.isBlank(fieldName)){ - logger.error("index_code:"+index.getIndexCode()+"not find field_name"); + logger.error("index_code:"+index.getIndexCode()+" not find field_name"); continue; } logger.info("INDEX_CODE=" + index.getIndexCode()+";FIELD_ID=" + fieldName ); @@ -393,7 +393,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); //指标集合 - Map> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap); + Map> indexMap = getGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); List> resultMapList=new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { @@ -453,7 +453,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); //指标集合 - Map> indexMap = getIndexInputVO(formDTO, indexList, minAndMaxMap); + Map> indexMap = getGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); List> resultMapList=new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { @@ -500,7 +500,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { List gridScoreDTOList = gridScoreDao.selectList(formDTO); Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); - gridScoreDTOList.forEach(gridScoreDTO -> { + for(GridScoreDTO gridScoreDTO:gridScoreDTOList){ GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); gridScoreEntity.setGridId(gridScoreDTO.getGridId()); @@ -512,12 +512,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setYearId(gridScoreDTO.getYearId()); gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); + if(!CollectionUtils.isEmpty(gridScoreDTO.getDetailList())&&gridScoreDTO.getDetailList().size()!=3){ + logger.error("customerId:"+gridScoreDTO.getCustomerId()+";gridId:"+gridScoreDTO.getGridId()+";monthId:"+gridScoreDTO.getMonthId()+"能力值缺失,无法计算总值"); + continue; + } for(GridScoreDetailDTO gridScoreDetailDTO:gridScoreDTO.getDetailList()){ BigDecimal indexScore=gridScoreDetailDTO.getScore().multiply(indexMap.get(gridScoreDetailDTO.getIndexCode()).getWeight()); gridScoreEntity.setScore(gridScoreEntity.getScore().add(indexScore)); } gridScoreEntityList.add(gridScoreEntity); - }); + } if (!CollectionUtils.isEmpty(gridScoreEntityList)) { gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, NumConstant.ONE_STR); gridScoreDao.insertBatches(gridScoreEntityList); From 19634b110b9ede3a5548162e6e65e0218e082c42 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 31 Aug 2020 21:19:33 +0800 Subject: [PATCH 231/360] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=85=9A=E5=91=98?= =?UTF-8?q?=E6=80=BB=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/indexcal/impl/CpcIndexCalculateServiceImpl.java | 3 ++- .../src/main/resources/mapper/indexscore/CpcScoreDao.xml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index 1293e23dc9..214076fc6a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -89,6 +89,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { cpcScoreTotalMap.put(userId, totalEntity); } BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); + log.warn("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); totalEntity.setScore(totalEntity.getScore().add(total)); } }); @@ -147,7 +148,6 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { do { list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); if (!CollectionUtils.isEmpty(list)) { - //遍历指标分组 计算分数 List> finalList = list; groupIndexDetailsMap.forEach((parentIndexCode, details) -> { @@ -196,6 +196,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } log.warn("计算的参数:{}", indexMap); HashMap result = calculate(indexMap); + log.warn("计算的结果:{}", result); //处理结果 saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml index c3b2529e0c..c3483cbc32 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml @@ -124,8 +124,8 @@ #{item.isTotal}, #{item.score}, #{item.indexCode}, - '0', - 0, + 0, + 0, 'APP_USER', now(), 'APP_USER', From cbf7212c686f0f1bc2acc03462abaa8d1b6de4bc Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 31 Aug 2020 22:09:06 +0800 Subject: [PATCH 232/360] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/IndexCalConstant.java | 1 + .../impl/CpcIndexCalculateServiceImpl.java | 184 ++++++++++-------- .../FactIndexPartyAblityCpcMonthlyDao.xml | 3 + 3 files changed, 108 insertions(+), 80 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 79321c6026..13b27760a5 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -19,4 +19,5 @@ public interface IndexCalConstant { String MONTH_ID="MONTH_ID"; String USER_ID="USER_ID"; + String YEAR_ID = "YEAR_ID"; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index 214076fc6a..c15620850d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -2,8 +2,8 @@ package com.epmet.service.indexcal.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; import com.epmet.dao.indexscore.CpcScoreDao; @@ -22,7 +22,6 @@ import com.epmet.support.normalizing.ScoreConstants; import com.epmet.support.normalizing.batch.BatchScoreCalculator; import com.epmet.support.normalizing.batch.IndexInputVO; import com.epmet.support.normalizing.batch.SampleValue; -import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -50,11 +49,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Override public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) { - - calculatePartScore(formDTO); calculateTotalScore(formDTO); - return true; } @@ -68,36 +64,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(parentIndexDetails)) { log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); - return; + throw new RenException("客户【党员相关】指标权重信息不存在"); } - //获取数据 - List list = null; Map cpcScoreTotalMap = new HashMap<>(); Map indexWeightMap = parentIndexDetails.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o)); - list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId()); - if (!CollectionUtils.isEmpty(list)) { - Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId)); - userGroupMap.forEach((userId, partScoreList) -> { - CpcScoreEntity totalEntity = null; - for (CpcScoreEntity part : partScoreList) { - IndexGroupDetailEntity indexGroupDetailEntity = indexWeightMap.get(part.getIndexCode()); - if (totalEntity == null) { - totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); - totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); - cpcScoreTotalMap.put(userId, totalEntity); - } - BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); - log.warn("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); - totalEntity.setScore(totalEntity.getScore().add(total)); - } - }); + //获取数据 + List list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId()); + if (CollectionUtils.isEmpty(list)) { + log.error("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + throw new RenException("客户四级指标分值记录不存在"); } - + Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId)); + userGroupMap.forEach((userId, partScoreList) -> { + CpcScoreEntity totalEntity = null; + for (CpcScoreEntity part : partScoreList) { + IndexGroupDetailEntity indexGroupDetailEntity = indexWeightMap.get(part.getIndexCode()); + if (totalEntity == null) { + totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); + totalEntity.setIsTotal(NumConstant.ONE_STR); + totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + cpcScoreTotalMap.put(userId, totalEntity); + } + //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); + log.debug("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); + totalEntity.setScore(totalEntity.getScore().add(total)); + } + }); insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); - - } private void insertBatch(Collection values) { @@ -113,56 +108,44 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - log.warn("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); + log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); return; } //指标集合 - //对指标进行分组 - //Map> groupIndexDetailsMap = indexDetails.stream().collect(Collectors.groupingBy(IndexGroupDetailEntity::getAllParentIndexCode)); - - //获取指标权重信息 -参与议事 - List canyuyishiIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.CAN_YU_YI_SHI.getCode()); - if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) { - log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); - return; - } - List dangwuhongdongIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_WU_HUO_DONG.getCode()); - if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) { - log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); - return; - } - List lianxiqunzhongIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.LIAN_XI_QUN_ZHONG.getCode()); - if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) { - log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); + if (groupIndexDetailsMap == null) { return; } - Map> groupIndexDetailsMap = new HashMap<>(); - groupIndexDetailsMap.put(IndexCodeEnum.CAN_YU_YI_SHI.getCode(), canyuyishiIndexDetails); - groupIndexDetailsMap.put(IndexCodeEnum.DANG_WU_HUO_DONG.getCode(), dangwuhongdongIndexDetails); - groupIndexDetailsMap.put(IndexCodeEnum.LIAN_XI_QUN_ZHONG.getCode(), lianxiqunzhongIndexDetails); - - List> list = null; int pageNo = 1; int pageSize = 10; + //分页查询 要计算的原始数据 + List> list = null; do { list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); if (!CollectionUtils.isEmpty(list)) { //遍历指标分组 计算分数 List> finalList = list; groupIndexDetailsMap.forEach((parentIndexCode, details) -> { - calculate(formDTO, details, finalList, minAndMaxMap, parentIndexCode); + calculateScore(formDTO, details, finalList, minAndMaxMap, parentIndexCode); }); } } while (!CollectionUtils.isEmpty(list) && pageNo++ > 0); - } - private void calculate(CalculateCommonFormDTO formDTO, List indexDetailList, List> finalList, Map minAndMaxMap, String parentIndexCode) { - Map> indexMap = getIndexInputVO(indexDetailList, minAndMaxMap); + /** + * desc:计算并保存中间结果 + * + * @param formDTO + * @param indexDetailList + * @param finalList + * @param minAndMaxMap + * @param parentIndexCode remark:1.遍历指标和原始数据;2.构建指标归一算法计算器,计算分值;3.将分值保存到中间表 + */ + private void calculateScore(CalculateCommonFormDTO formDTO, List indexDetailList, List> finalList, Map minAndMaxMap, String parentIndexCode) { + Map> indexMap = buildIndexInputVO(indexDetailList, minAndMaxMap); Map scoreEntityMap = new HashMap<>(); //遍历指标 进行计算 - for (Map.Entry> entry : indexMap.entrySet()) { String indexCode = entry.getKey(); IndexInputVO value = entry.getValue(); @@ -175,10 +158,10 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { for (Map cpcCount : finalList) { //对应的数值 String userId = String.valueOf(cpcCount.get(IndexCalConstant.USER_ID)); - String sampleValueStr = String.valueOf(cpcCount.get(fieldName)); + BigDecimal sampleValue = new BigDecimal(String.valueOf(cpcCount.get(fieldName))); CpcScoreEntity cpcScoreEntity = new CpcScoreEntity(); - cpcScoreEntity.setYearId(DimIdGenerator.getYearDimId(DateUtils.addDateMonths(new Date(), -1))); + cpcScoreEntity.setYearId(String.valueOf(cpcCount.get(IndexCalConstant.YEAR_ID))); cpcScoreEntity.setCustomerId(formDTO.getCustomerId()); cpcScoreEntity.setAgencyId(String.valueOf(cpcCount.get(IndexCalConstant.AGENCY_ID))); cpcScoreEntity.setGridId(String.valueOf(cpcCount.get(IndexCalConstant.GRID_ID))); @@ -187,22 +170,30 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { cpcScoreEntity.setMonthId(formDTO.getMonthId()); cpcScoreEntity.setScore(new BigDecimal(0)); cpcScoreEntity.setIndexCode(parentIndexCode); + scoreEntityMap.put(userId, cpcScoreEntity); //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) cpcCount.get(IndexCalConstant.USER_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); + SampleValue currentUserIndexValue = new SampleValue(userId, sampleValue); + value.getIndexValueVOs().add(currentUserIndexValue); } } log.warn("计算的参数:{}", indexMap); - HashMap result = calculate(indexMap); + HashMap result = calculateScore(indexMap); log.warn("计算的结果:{}", result); //处理结果 saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); } - + /** + * desc:保存分值 到中间表 + * + * @param formDTO + * @param indexDetails + * @param parentIndexCode + * @param result + */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); @@ -215,21 +206,10 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { this.insertBatch(list); } - /** - * @param indexMap - * @return java.util.List - * @author yinzuomei - * @description - * @Date 2020/8/30 21:40 - **/ - private HashMap calculate(Map> indexMap) { - //构造入参 - List indexInputVOS = indexMap.values().stream().collect(Collectors.toList()); - BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - } /** + * desc:构建分值计算器 + * * @param indexList 指标集合 * @param minAndMaxMap 最大值最小值集合 * @return java.util.Map @@ -237,10 +217,9 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { * @description * @Date 2020/8/30 15:56 **/ - private Map> getIndexInputVO(List indexList, Map minAndMaxMap) { + private Map> buildIndexInputVO(List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); - for (int indexNum = 0; indexNum < indexList.size(); indexNum++) { - IndexGroupDetailEntity index = indexList.get(indexNum); + for (IndexGroupDetailEntity index : indexList) { IndexInputVO indexInputVO = new IndexInputVO(); // 指标code indexInputVO.setIndexId(index.getIndexCode()); @@ -273,4 +252,49 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { } return map; } + + /** + * desc:调用计算器计算每个人的分数值 + * + * @param indexMap + * @return + */ + private HashMap calculateScore(Map> indexMap) { + //构造入参 + List indexInputVOS = indexMap.values().stream().collect(Collectors.toList()); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + } + + + /** + * desc:构建党员相关4级指标明细map + * + * @param formDTO + * @return + */ + private Map> getIndexDetailMap(CalculateCommonFormDTO formDTO) { + //获取指标权重信息 -参与议事 + List canyuyishiIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.CAN_YU_YI_SHI.getCode()); + if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) { + log.error("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + return null; + } + List dangwuhongdongIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_WU_HUO_DONG.getCode()); + if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) { + log.error("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + return null; + } + List lianxiqunzhongIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.LIAN_XI_QUN_ZHONG.getCode()); + if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) { + log.error("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + return null; + } + + Map> groupIndexDetailsMap = new HashMap<>(); + groupIndexDetailsMap.put(IndexCodeEnum.CAN_YU_YI_SHI.getCode(), canyuyishiIndexDetails); + groupIndexDetailsMap.put(IndexCodeEnum.DANG_WU_HUO_DONG.getCode(), dangwuhongdongIndexDetails); + groupIndexDetailsMap.put(IndexCodeEnum.LIAN_XI_QUN_ZHONG.getCode(), lianxiqunzhongIndexDetails); + return groupIndexDetailsMap; + } } 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 beb5b42a4e..c9f807d881 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 @@ -101,6 +101,9 @@ AGENCY_ID, PARENT_ID, GRID_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, USER_ID, CREATE_TOPIC_COUNT, JOIN_TOPIC_COUNT, From 82b959325b6d243dcdfe8192b488d3f57ff8a82f Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 1 Sep 2020 09:09:21 +0800 Subject: [PATCH 233/360] =?UTF-8?q?=E6=89=93=E5=BC=80nacos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index a805e4a53c..8d0e953c05 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -195,7 +195,7 @@ 6379 123456 - false + true 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 From 9f9a3903cebbbf4acbc9e5fedc762ac5a689fe5f Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 1 Sep 2020 09:57:01 +0800 Subject: [PATCH 234/360] =?UTF-8?q?=E5=88=86=E6=94=AF=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=98=88=E5=80=BC?= =?UTF-8?q?=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../batch/BatchScoreCalculator.java | 23 +++++++++++++++++-- .../normalizing/batch/IndexInputVO.java | 7 +++++- .../stats/test/normalizing/DemoScoreCal.java | 12 +++++----- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index 361d81f95f..6c17298ad6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -22,10 +22,11 @@ public class BatchScoreCalculator { List indexValueVOs = i.getIndexValueVOs(); BigDecimal weight = i.getWeight(); ScoreCalculator scoreCalculator = i.getScoreCalculator(); + BigDecimal threshold = i.getThreshold(); // 循环同一个指标内的多个样本值的SampleValue列表 List scores4OneIndex = indexValueVOs.stream().map(vo -> { - BigDecimal score = scoreCalculator.normalize(vo.getSampleValue(), weight).setScale(6, RoundingMode.HALF_UP);; + BigDecimal score = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold), weight).setScale(6, RoundingMode.HALF_UP);; return new SampleScore(vo.getSampleId(), score); }).collect(Collectors.toList()); @@ -48,10 +49,11 @@ public class BatchScoreCalculator { List indexValueVOs = idx.getIndexValueVOs(); BigDecimal weight = idx.getWeight(); ScoreCalculator scoreCalculator = idx.getScoreCalculator(); + BigDecimal threshold = idx.getThreshold(); for (SampleValue vo : indexValueVOs) { String sampleId = vo.getSampleId(); - BigDecimal score = scoreCalculator.normalize(vo.getSampleValue(), weight); + BigDecimal score = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold), weight); if (scoreCountOfSamples.containsKey(sampleId)) { BigDecimal newScore = scoreCountOfSamples.get(sampleId).add(score).setScale(6, RoundingMode.HALF_UP); scoreCountOfSamples.put(sampleId, newScore); @@ -64,4 +66,21 @@ public class BatchScoreCalculator { return scoreCountOfSamples; } + + /** + * 获取最终样本值 + * @param realValue + * @param threshold + * @return + */ + public BigDecimal getFinalSampleValue(Object realValue, BigDecimal threshold) { + BigDecimal bdRealValue = new BigDecimal(realValue.toString()); + if (threshold.equals(-1)) { + // -1表示不使用阈值 + return bdRealValue; + } + return (bdRealValue.compareTo(threshold) < 0) || (bdRealValue.equals(threshold)) + ? bdRealValue + : threshold ; + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java index 94ea1ef0ad..47ca728d5a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java @@ -11,7 +11,7 @@ import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor -public class IndexInputVO { +public class IndexInputVO { /** * 指标标记,由使用者传入,用以标记该条指标的独有特性,一般用id或者code @@ -24,6 +24,11 @@ public class IndexInputVO { */ private List> indexValueVOs; + /** + * 样本阈值 + */ + private BigDecimal threshold; + /** * 权重 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index c080ffc296..6da70db9c8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -78,8 +78,8 @@ public class DemoScoreCal { List> index2SampleValues = Arrays.asList(new SampleValue<>("id1", 1), new SampleValue<>("id2", 8), new SampleValue<>("id3", 3)); // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO<>("aaa", index1SampleValues, new BigDecimal(1), sc1); - IndexInputVO index2VO = new IndexInputVO<>("bbb", index2SampleValues, new BigDecimal(1), sc2); + IndexInputVO index1VO = new IndexInputVO<>("aaa", index1SampleValues, new BigDecimal(10), new BigDecimal(1), sc1); + IndexInputVO index2VO = new IndexInputVO<>("bbb", index2SampleValues, new BigDecimal(10), new BigDecimal(1), sc2); List indexInputVOS = Arrays.asList(index1VO, index2VO); @@ -104,8 +104,8 @@ public class DemoScoreCal { List index2SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(1)), new SampleValue<>("id2", new BigDecimal(8)), new SampleValue<>("id3", new BigDecimal(3))); // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO("aaa", index1SampleValues, new BigDecimal(1), sc1); - IndexInputVO index2VO = new IndexInputVO("bbb", index2SampleValues, new BigDecimal(1), sc2); + IndexInputVO index1VO = new IndexInputVO("aaa", index1SampleValues, new BigDecimal(6), new BigDecimal(1), sc1); + IndexInputVO index2VO = new IndexInputVO("bbb", index2SampleValues, new BigDecimal(6), new BigDecimal(1), sc2); List indexInputVOS = Arrays.asList(index1VO, index2VO); @@ -130,8 +130,8 @@ public class DemoScoreCal { List index2SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(1)), new SampleValue<>("id2", new BigDecimal(8)), new SampleValue<>("id3", new BigDecimal(3))); // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO("aaa", index1SampleValues, new BigDecimal(1), sc1); - IndexInputVO index2VO = new IndexInputVO("bbb", index2SampleValues, new BigDecimal(1), sc2); + IndexInputVO index1VO = new IndexInputVO("aaa", index1SampleValues, new BigDecimal(6), new BigDecimal(1), sc1); + IndexInputVO index2VO = new IndexInputVO("bbb", index2SampleValues, new BigDecimal(6), new BigDecimal(1), sc2); List indexInputVOS = Arrays.asList(index1VO, index2VO); From e8c33cf1fe306abd3bdcf84cfd00b5eab5ba0be8 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 1 Sep 2020 10:10:02 +0800 Subject: [PATCH 235/360] =?UTF-8?q?=E6=80=BB=E5=88=86=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/model/IndexExcelDataListener.java | 48 +++++++++---------- .../impl/CpcIndexCalculateServiceImpl.java | 5 +- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 24770d1bd2..9267d562a8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -123,49 +123,49 @@ public class IndexExcelDataListener extends AnalysisEventListener { group1.setIndexId(indexDictEntity.getId()); group1.setParentIndexGroupId("0"); group1.setId(UniqueIdGenerator.generate()); - group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),true,4)); + group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), true, 4)); indexGroupMap.put(index.getLevel1Index(), group1); } StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); - IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index()+level4Index); + IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index() + level4Index); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); group2.setIndexId(indexDictEntity.getId()); group2.setParentIndexGroupId(group1.getId()); group2.setId(UniqueIdGenerator.generate()); - group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 )); - indexGroupMap.put(index.getLevel1Index()+level4Index, group2); + group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); + indexGroupMap.put(index.getLevel1Index() + level4Index, group2); //构建 分组明细 - templateEntity = indexGroupDetailMap.get(index.getLevel1Index()+level4Index); + templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index); if (templateEntity == null) { - templateEntity = new IndexGroupDetailTemplateEntity(); + templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group1.getId()); templateEntity.setIndexId(indexDictEntity.getId()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); - buildIndexGroupDetail(templateEntity,indexDictEntity, index, group1, 2); - indexGroupDetailMap.put(index.getLevel1Index()+level4Index,templateEntity); + buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); + indexGroupDetailMap.put(index.getLevel1Index() + level4Index, templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index()+index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); if (templateEntity == null) { - templateEntity = new IndexGroupDetailTemplateEntity(); + templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); templateEntity.setIndexId(indexDictEntity.getId()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); - buildIndexGroupDetail(templateEntity,indexDictEntity, index, group2, 5); - indexGroupDetailMap.put(index.getLevel1Index()+index.getLevel5Index(),templateEntity); + buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); + indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); } } else { //todo 测试完去掉 @@ -177,7 +177,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group1.setIndexId(indexDictEntity.getId()); group1.setParentIndexGroupId("0"); group1.setId(UniqueIdGenerator.generate()); - group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 )); + group1.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); indexGroupMap.put(index.getLevel1Index(), group1); } StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); @@ -191,35 +191,35 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setIndexId(indexDictEntity.getId()); group2.setParentIndexGroupId(group1.getId()); group2.setId(UniqueIdGenerator.generate()); - group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 )); + group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); indexGroupMap.put(groupMapKey, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(level2Index); if (templateEntity == null) { - templateEntity = new IndexGroupDetailTemplateEntity(); + templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); templateEntity.setIndexId(indexDictEntity.getId()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); - buildIndexGroupDetail(templateEntity,indexDictEntity, index, group1, 2); - indexGroupDetailMap.put(level2Index,templateEntity); + buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); + indexGroupDetailMap.put(groupMapKey, templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index()+index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); if (templateEntity == null) { - templateEntity = new IndexGroupDetailTemplateEntity(); + templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); templateEntity.setIndexId(indexDictEntity.getId()); templateEntity.setAllParentIndexCode(allIndexCodeSb.toString()); templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); - buildIndexGroupDetail(templateEntity, indexDictEntity, index, group2, 5); - indexGroupDetailMap.put(index.getLevel1Index()+index.getLevel5Index(),templateEntity); + buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); + indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); } } //} @@ -228,13 +228,13 @@ public class IndexExcelDataListener extends AnalysisEventListener { LOGGER.info("所有指标分组明细数据解析完成:{}", JSON.toJSONString(indexGroupDetailMap.values())); } - private void buildIndexGroupDetail( IndexGroupDetailTemplateEntity templateEntity,IndexDictEntity indexDictEntity, IndexModel index, IndexGroupTemplateEntity parentGroup, Integer level) { + private void buildIndexGroupDetail(IndexGroupDetailTemplateEntity templateEntity, IndexDictEntity indexDictEntity, IndexModel index, Integer level) { if (level == 5) { - templateEntity.setIndexCode(Pinyin4jUtil.getSpellPinYin(index.getLevel5Index(),false,4 )); + templateEntity.setIndexCode(Pinyin4jUtil.getSpellPinYin(index.getLevel5Index(), false, 4)); String level5WeightStr = index.getLevel5Weight().replace("%", ""); templateEntity.setWeight(new BigDecimal(level5WeightStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); } else { - templateEntity.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(),false,4 )); + templateEntity.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); templateEntity.setWeight(new BigDecimal(index.getWeight()).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index c15620850d..aa937dc3d6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -84,11 +84,12 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); - log.debug("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); + log.info("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); totalEntity.setScore(totalEntity.getScore().add(total)); } }); @@ -225,6 +226,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { indexInputVO.setIndexId(index.getIndexCode()); //权重 indexInputVO.setWeight(index.getWeight()); + //阈值 + indexInputVO.setThreshold(index.getThreshold()); BigDecimal minValue = null; BigDecimal maxValue = null; From 73012448d1869eab543f0bae61b7dd5e34529540 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 1 Sep 2020 10:17:02 +0800 Subject: [PATCH 236/360] =?UTF-8?q?=E5=88=86=E5=80=BC=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=EF=BC=8C=E5=8E=BB=E6=8E=89=E6=97=A0=E5=8F=82?= =?UTF-8?q?=E6=9E=84=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/support/normalizing/batch/IndexInputVO.java | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java index 47ca728d5a..abf62aef2b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java @@ -10,7 +10,6 @@ import java.util.List; @Data @AllArgsConstructor -@NoArgsConstructor public class IndexInputVO { /** From 358ced173b7f1851514f797be1a96aa402a11ce7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 1 Sep 2020 10:20:39 +0800 Subject: [PATCH 237/360] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=98=88=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GridCorreLationServiceImpl.java | 208 ++++++++++-------- 1 file changed, 121 insertions(+), 87 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 7897c2560b..98a35e93fe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.service.indexcal.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; @@ -70,33 +71,45 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { @Override public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) { boolean resultFlag = false; + //1、计算网格相关-党建能力 List dangJianNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); - if (!CollectionUtils.isEmpty(dangJianNengLiList)) { - //1、计算网格相关-党建能力 - calculateGridDangJian(formDTO, dangJianNengLiList); + if (CollectionUtils.isEmpty(dangJianNengLiList)) { + logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } + calculateGridDangJian(formDTO, dangJianNengLiList); + + //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); - if (!CollectionUtils.isEmpty(zhiLiNengLiList)) { - //2、计算网格相关-治理能力 - calculateGridZhiLi(formDTO, zhiLiNengLiList); + if (CollectionUtils.isEmpty(zhiLiNengLiList)) { + logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } + calculateGridZhiLi(formDTO, zhiLiNengLiList); + + //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); - if (!CollectionUtils.isEmpty(fuWuNengLiList)) { - //3、计算网格相关-服务能力 - calculateGridFuWu(formDTO, fuWuNengLiList); + if (CollectionUtils.isEmpty(fuWuNengLiList)) { + logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } - //计算网格相关总分 + calculateGridFuWu(formDTO, fuWuNengLiList); + + //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); - if (!CollectionUtils.isEmpty(wgxgList)) { - calculateGridTotal(formDTO, wgxgList,IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); + if (CollectionUtils.isEmpty(wgxgList)) { + logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【网格相关】指标权重信息不存在"); } + calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); + resultFlag = true; return resultFlag; } @@ -122,9 +135,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); + if (CollectionUtils.isEmpty(minAndMaxMap)) { + logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + return; + } //指标集合 - Map> indexMap = getGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); - List> resultMapList=new ArrayList<>(); + Map> indexMap = buildGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); + List> resultMapList = new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; @@ -149,8 +166,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //组织内党员的联系群众能力考评分(平均值) logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) - String gridId=(String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO,gridId); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); } @@ -160,96 +177,96 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { resultMapList.add(resultMap); } // 保存中间表 - saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),NumConstant.ZERO_STR); + saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } /** - * @return java.util.Map * @param calculateCommonFormDTO + * @return java.util.Map * @author yinzuomei * @description 获取网格内党员的联系群众能力考评分(平均值)的最大值,最小值 * @Date 2020/8/31 9:51 **/ private Map getContactMassesAblityMap(CalculateCommonFormDTO calculateCommonFormDTO) { - Map map=new HashMap<>(); - List list=cpcScoreDao.selectListGridContactMassesAvgValue(calculateCommonFormDTO); - if(!CollectionUtils.isEmpty(list)){ - BigDecimal minValue=Collections.min(list); - BigDecimal maxValue=Collections.max(list); - map.put(StrConstant.MIN,minValue); - map.put(StrConstant.MAX,maxValue); + Map map = new HashMap<>(); + List list = cpcScoreDao.selectListGridContactMassesAvgValue(calculateCommonFormDTO); + if (!CollectionUtils.isEmpty(list)) { + BigDecimal minValue = Collections.min(list); + BigDecimal maxValue = Collections.max(list); + map.put(StrConstant.MIN, minValue); + map.put(StrConstant.MAX, maxValue); return map; } - map.put(StrConstant.MIN,new BigDecimal(NumConstant.ZERO_STR)); - map.put(StrConstant.MAX,new BigDecimal(NumConstant.ZERO_STR)); + map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); + map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); return map; } /** - * @return java.math.BigDecimal * @param calculateCommonFormDTO - * @param gridId 网格id + * @param gridId 网格id + * @return java.math.BigDecimal * @author yinzuomei * @description 获取网格(组织)内党员的联系群众能力考评分(平均值) * @Date 2020/8/31 9:50 **/ - private BigDecimal getGridContactMassesAvgValue(CalculateCommonFormDTO calculateCommonFormDTO,String gridId) { - BigDecimal result=cpcScoreDao.selectGridContactMassesAvgValue(calculateCommonFormDTO.getCustomerId(),calculateCommonFormDTO.getMonthId(),gridId); - if(null==result){ + private BigDecimal getGridContactMassesAvgValue(CalculateCommonFormDTO calculateCommonFormDTO, String gridId) { + BigDecimal result = cpcScoreDao.selectGridContactMassesAvgValue(calculateCommonFormDTO.getCustomerId(), calculateCommonFormDTO.getMonthId(), gridId); + if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } return result; } /** - * @return java.math.BigDecimal * @param formDTO * @param gridId + * @return java.math.BigDecimal * @author yinzuomei - * @description 组织内党员的参与议事能力考评分(平均值) + * @description 组织内党员的参与议事能力考评分(平均值) * @Date 2020/8/31 15:51 **/ private BigDecimal getGridJoinIssueAvgValue(CalculateCommonFormDTO formDTO, String gridId) { - BigDecimal result=cpcScoreDao.selectGridJoinIssueAvgValue(formDTO.getCustomerId(),formDTO.getMonthId(),gridId); - if(null==result){ + BigDecimal result = cpcScoreDao.selectGridJoinIssueAvgValue(formDTO.getCustomerId(), formDTO.getMonthId(), gridId); + if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } return result; } - + /** - * @return java.util.Map * @param calculateCommonFormDTO + * @return java.util.Map * @author yinzuomei * @description 网格内党员的参与议事能力考评分(平均值) 最大值最小值 * @Date 2020/8/31 14:41 **/ - private Map getJoinIssueAblityMap(CalculateCommonFormDTO calculateCommonFormDTO){ - Map map=new HashMap<>(); - List list=cpcScoreDao.selectListJoinIssueAvgValue(calculateCommonFormDTO); - if(!CollectionUtils.isEmpty(list)){ - BigDecimal minValue=Collections.min(list); - BigDecimal maxValue=Collections.max(list); - map.put(StrConstant.MIN,minValue); - map.put(StrConstant.MAX,maxValue); + private Map getJoinIssueAblityMap(CalculateCommonFormDTO calculateCommonFormDTO) { + Map map = new HashMap<>(); + List list = cpcScoreDao.selectListJoinIssueAvgValue(calculateCommonFormDTO); + if (!CollectionUtils.isEmpty(list)) { + BigDecimal minValue = Collections.min(list); + BigDecimal maxValue = Collections.max(list); + map.put(StrConstant.MIN, minValue); + map.put(StrConstant.MAX, maxValue); return map; } - map.put(StrConstant.MIN,new BigDecimal(NumConstant.ZERO_STR)); - map.put(StrConstant.MAX,new BigDecimal(NumConstant.ZERO_STR)); + map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); + map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); return map; } /** - * @param formDTO 客户id 月份id: yyyyMM + * @param formDTO 客户id 月份id: yyyyMM * @param resultMapList - * @param indexCode 指标编码 - * @param isTotal 1:总分;0不是 + * @param indexCode 指标编码: 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli; + * @param isTotal 1:总分;0不是 * @return void * @author yinzuomei * @description 保存网格相关三大能力值 * @Date 2020/8/30 22:50 **/ - private void saveGridCorreLationDangJian(CalculateCommonFormDTO formDTO, + private void saveGridCorreLationResult(CalculateCommonFormDTO formDTO, List> resultMapList, String indexCode, String isTotal) { @@ -277,7 +294,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { }); } if (!CollectionUtils.isEmpty(gridScoreEntityList)) { - gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode,isTotal); + gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, isTotal); gridScoreDao.insertBatches(gridScoreEntityList); } } @@ -286,21 +303,24 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @param indexMap * @return java.util.List * @author yinzuomei - * @description + * @description 调用计算器计算每个指标下,各个网格的总分 * @Date 2020/8/30 21:40 **/ private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); + logger.info("计算的参数:{}", indexInputVOS); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + logger.info("计算的结果:{}", resultMap); + return resultMap; } /** * @param indexMap * @return java.util.List * @author yinzuomei - * @description + * @description map遍历,转为List * @Date 2020/8/30 18:34 **/ private List getIndexInputVOList(Map> indexMap) { @@ -321,13 +341,14 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description 构造网格相关 指标计算参数 * @Date 2020/8/30 15:56 **/ - private Map> getGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { + private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); - for (int indexNum = 0; indexNum < indexList.size(); indexNum++) { - IndexGroupDetailEntity index = indexList.get(indexNum); + for (IndexGroupDetailEntity index : indexList) { IndexInputVO indexInputVO = new IndexInputVO(); // 指标code indexInputVO.setIndexId(index.getIndexCode()); + //阈值 + indexInputVO.setThreshold(index.getThreshold()); //权重 indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; @@ -335,22 +356,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); - Map contactMassesAblityMap= this.getContactMassesAblityMap(formDTO); - minValue=contactMassesAblityMap.get(StrConstant.MIN); - maxValue=contactMassesAblityMap.get(StrConstant.MAX); - }else if(IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())){ + Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); + minValue = contactMassesAblityMap.get(StrConstant.MIN); + maxValue = contactMassesAblityMap.get(StrConstant.MAX); + } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - Map joinIssueAblityMap= this.getJoinIssueAblityMap(formDTO); - minValue=joinIssueAblityMap.get(StrConstant.MIN); - maxValue=joinIssueAblityMap.get(StrConstant.MAX); + Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); + minValue = joinIssueAblityMap.get(StrConstant.MIN); + maxValue = joinIssueAblityMap.get(StrConstant.MAX); } else { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); - if(StringUtils.isBlank(fieldName)){ - logger.error("index_code:"+index.getIndexCode()+" not find field_name"); + if (StringUtils.isBlank(fieldName)) { + logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); continue; } - logger.info("INDEX_CODE=" + index.getIndexCode()+";FIELD_ID=" + fieldName ); + logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); @@ -392,9 +413,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); + if (CollectionUtils.isEmpty(minAndMaxMap)) { + logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + return; + } //指标集合 - Map> indexMap = getGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); - List> resultMapList=new ArrayList<>(); + Map> indexMap = buildGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); + List> resultMapList = new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; @@ -417,8 +442,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { value.getIndexValueVOs().add(currentGridIndexValue); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId=(String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO,gridId); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); } @@ -428,7 +453,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { resultMapList.add(resultMap); } // 保存中间表 - saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),NumConstant.ZERO_STR); + saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), NumConstant.ZERO_STR); } @@ -452,9 +477,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); + if (CollectionUtils.isEmpty(minAndMaxMap)) { + logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + return; + } //指标集合 - Map> indexMap = getGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); - List> resultMapList=new ArrayList<>(); + Map> indexMap = buildGridCorrelationIndexInputVO(formDTO, indexList, minAndMaxMap); + List> resultMapList = new ArrayList<>(); //分页查询采集记录 for (int pageNo = 1; pageNo <= totalPage; pageNo++) { int pageIndex = (pageNo - NumConstant.ONE) * IndexCalConstant.PAGE_SIZE; @@ -475,8 +504,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - }else{ - logger.error("index_code:"+key+" not find field_name"); + } else { + logger.error("index_code:" + key + " not find field_name"); } }); }); @@ -484,7 +513,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { resultMapList.add(resultMap); } // 保存中间表 - saveGridCorreLationDangJian(formDTO, resultMapList,IndexCodeEnum.FU_WU_NENG_LI.getCode(),NumConstant.ZERO_STR); + saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.FU_WU_NENG_LI.getCode(), NumConstant.ZERO_STR); } /** @@ -498,9 +527,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private void calculateGridTotal(CalculateCommonFormDTO formDTO, List indexList, String indexCode) { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); + if(CollectionUtils.isEmpty(gridScoreDTOList)){ + logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + throw new RenException("客户一级指标分值记录不存在"); + } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); - for(GridScoreDTO gridScoreDTO:gridScoreDTOList){ + for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); gridScoreEntity.setGridId(gridScoreDTO.getGridId()); @@ -512,12 +545,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setYearId(gridScoreDTO.getYearId()); gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); - if(!CollectionUtils.isEmpty(gridScoreDTO.getDetailList())&&gridScoreDTO.getDetailList().size()!=3){ - logger.error("customerId:"+gridScoreDTO.getCustomerId()+";gridId:"+gridScoreDTO.getGridId()+";monthId:"+gridScoreDTO.getMonthId()+"能力值缺失,无法计算总值"); + if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { + logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } - for(GridScoreDetailDTO gridScoreDetailDTO:gridScoreDTO.getDetailList()){ - BigDecimal indexScore=gridScoreDetailDTO.getScore().multiply(indexMap.get(gridScoreDetailDTO.getIndexCode()).getWeight()); + for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { + BigDecimal indexScore = gridScoreDetailDTO.getScore().multiply(indexMap.get(gridScoreDetailDTO.getIndexCode()).getWeight()); gridScoreEntity.setScore(gridScoreEntity.getScore().add(indexScore)); } gridScoreEntityList.add(gridScoreEntity); @@ -529,12 +562,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } public static void main(String[] args) { - BigDecimal totalScore=BigDecimal.ZERO; - for(int i=1;i<5;i++){ - totalScore=totalScore.add(new BigDecimal("1.00")); + BigDecimal totalScore = BigDecimal.ZERO; + for (int i = 1; i < 5; i++) { + totalScore = totalScore.add(new BigDecimal("1.00")); } System.out.println(totalScore); } + /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO From 1f62005bcb953122426798719abbec0f3b3b3a1b Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 1 Sep 2020 10:21:34 +0800 Subject: [PATCH 238/360] =?UTF-8?q?=E5=88=86=E5=80=BC=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=EF=BC=8C=E5=8E=BB=E6=8E=89=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=9E=84=E9=80=A0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/support/normalizing/batch/IndexInputVO.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java index abf62aef2b..c67b1c494d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java @@ -34,10 +34,4 @@ public class IndexInputVO { private BigDecimal weight; private ScoreCalculator scoreCalculator; - - public IndexInputVO(List> indexValueVOs, BigDecimal weight, ScoreCalculator scoreCalculator) { - this.indexValueVOs = indexValueVOs; - this.weight = weight; - this.scoreCalculator = scoreCalculator; - } } From 10fa49c2b23c86fdc80f5d2afdd4743fb3ca861e Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 1 Sep 2020 10:27:37 +0800 Subject: [PATCH 239/360] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/IndexCalConstant.java | 14 + .../FactIndexCommunityGovrnFiveScoreDTO.java | 109 ----- .../FactIndexCommunityPartyFiveScoreDTO.java | 110 ------ .../screen/FactIndexCommunityScoreDTO.java | 55 ++- ...FactIndexCommunityServiceFiveScoreDTO.java | 107 ----- .../CommunityActivityCountResultDTO.java | 59 +++ ...CommunityPublishArticleCountResultDTO.java | 5 + .../result/MaxAndMinBigDecimalResultDTO.java | 21 + .../result/SubGridGovernAvgResultDTO.java | 46 +++ .../result/SubGridPartyAvgResultDTO.java | 5 + .../result/SubGridServiceAvgResultDTO.java | 51 +++ .../com/epmet/controller/DemoController.java | 20 +- .../FactIndexGovrnAblityOrgMonthlyDao.java | 3 +- .../FactIndexServiceAblityOrgMonthlyDao.java | 11 + .../FactIndexCommunityGovrnFiveScoreDao.java | 33 -- .../FactIndexCommunityPartyFiveScoreDao.java | 45 --- .../screen/FactIndexCommunityScoreDao.java | 35 +- ...FactIndexCommunityServiceFiveScoreDao.java | 33 -- .../dao/screen/FactIndexGridScoreDao.java | 20 + ...=> FactIndexCommunityFiveScoreEntity.java} | 4 +- ...actIndexCommunityGovrnFiveScoreEntity.java | 77 ---- .../screen/FactIndexCommunityScoreEntity.java | 34 +- ...tIndexCommunityServiceFiveScoreEntity.java | 77 ---- .../IndexCalculateCommunityService.java | 23 +- .../IndexCalculateCommunityServiceImpl.java | 373 +++++++++++++++--- .../FactIndexGovrnAblityOrgMonthlyDao.xml | 24 +- .../FactIndexPartyAblityOrgMonthlyDao.xml | 3 +- .../FactIndexServiceAblityOrgMonthlyDao.xml | 19 + .../FactIndexCommunityGovrnFiveScoreDao.xml | 6 - .../FactIndexCommunityPartyFiveScoreDao.xml | 27 -- .../screen/FactIndexCommunityScoreDao.xml | 56 +++ .../FactIndexCommunityServiceFiveScoreDao.xml | 6 - .../mapper/screen/FactIndexGridScoreDao.xml | 44 ++- 33 files changed, 819 insertions(+), 736 deletions(-) delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityActivityCountResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinBigDecimalResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridGovernAvgResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridServiceAvgResultDTO.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityGovrnFiveScoreDao.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityPartyFiveScoreDao.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityServiceFiveScoreDao.java rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/{FactIndexCommunityPartyFiveScoreEntity.java => FactIndexCommunityFiveScoreEntity.java} (92%) delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityGovrnFiveScoreEntity.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityServiceFiveScoreEntity.java delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityGovrnFiveScoreDao.xml delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml delete mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityServiceFiveScoreDao.xml diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 13b27760a5..12b5c2a136 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -20,4 +20,18 @@ public interface IndexCalConstant { String USER_ID="USER_ID"; String YEAR_ID = "YEAR_ID"; + + String COMMUNITY_GOVERN = "zhilinengli"; + + String COMMUNITY_PARTY = "dangjiannengli"; + + String COMMUNITY_SERVICE = "fuwunengli"; + + String COMMUNITY_SERVICE_AVG = "shequxiajisywgfwnldfpjz"; + + String COMMUNITY_GOVERN_AVG = "shequxiashusywgzlnlhzpyz"; + + String COMMUNITY_PARTY_AVG = "xiazhusuoyouwgddjnlpjz"; + + String COMMUNITY_RELATE = "shequxiangguan"; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java deleted file mode 100644 index 5f2fbf85b7..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityGovrnFiveScoreDTO.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dto.screen; - -import java.io.Serializable; -import java.math.BigDecimal; - -import lombok.Data; - -/** - * 社区相关-治理能力【五级权重】分数表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-27 - */ -@Data -public class FactIndexCommunityGovrnFiveScoreDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * - */ - private String id; - - /** - * 机关iD - */ - private String agencyId; - - /** - * 月份ID - */ - private String monthId; - - /** - * 指标ID - */ - private String indexId; - - /** - * 总指数分值 - */ - private BigDecimal totalScore; - - /** - * 党建能力分值 - */ - private BigDecimal partyAbilityScore; - - /** - * 治理能力分值 - */ - private BigDecimal govrnAbilityScore; - - /** - * 服务能力分值 - */ - private BigDecimal serviceAbilityScore; - - /** - * 删除状态,0正常,1删除 - */ - private Integer delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 更新人 - */ - private String updatedBy ; - - public FactIndexCommunityGovrnFiveScoreDTO() { - this.agencyId = ""; - this.monthId = ""; - this.indexId = ""; - this.totalScore = new BigDecimal(0); - this.partyAbilityScore = new BigDecimal(0); - this.govrnAbilityScore = new BigDecimal(0); - this.serviceAbilityScore = new BigDecimal(0); - this.delFlag = 0; - this.revision = 0; - this.createdBy = "APP_USER"; - this.updatedBy = "APP_USER"; - } -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java deleted file mode 100644 index 79024c60ca..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityPartyFiveScoreDTO.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dto.screen; - -import java.io.Serializable; -import java.math.BigDecimal; - -import lombok.Data; - -/** - * 社区相关-党建能力【五级权重】分数表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-27 - */ -@Data -public class FactIndexCommunityPartyFiveScoreDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * id - */ - private String id; - - /** - * 机关ID - */ - private String agencyId; - - /** - * 月度ID - */ - private String monthId; - - /** - * 指标ID - */ - private String indexId; - - /** - * 总指数分值 - */ - private BigDecimal totalScore; - - /** - * 党建能力分值 - */ - private BigDecimal partyAbilityScore; - - /** - * 治理能力分值 - */ - private BigDecimal govrnAbilityScore; - - /** - * 服务能力分值 - */ - private BigDecimal serviceAbilityScore; - - /** - * 删除状态,0正常,1删除 - */ - private Integer delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 更新人 - */ - private String updatedBy; - - public FactIndexCommunityPartyFiveScoreDTO() { - this.agencyId = ""; - this.monthId = ""; - this.indexId = ""; - this.totalScore = new BigDecimal(0); - this.partyAbilityScore = new BigDecimal(0); - this.govrnAbilityScore = new BigDecimal(0); - this.serviceAbilityScore = new BigDecimal(0); - this.delFlag = 0; - this.revision = 0; - this.createdBy = "APP_USER"; - this.updatedBy = "APP_USER"; - } - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java index 805e28ef7f..8ad2ec6658 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java @@ -27,7 +27,7 @@ import java.math.BigDecimal; * 社区相关分数表 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-27 + * @since v1.0.0 2020-08-31 */ @Data public class FactIndexCommunityScoreDTO implements Serializable { @@ -35,49 +35,59 @@ public class FactIndexCommunityScoreDTO implements Serializable { private static final long serialVersionUID = 1L; /** - * + * ID 主键 */ private String id; /** - * 机关ID + * 客户Id + */ + private String customerId; + + /** + * 组织id */ private String agencyId; /** - * 月份ID + * 社区上一级组织id */ - private String monthId; + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; /** - * 季度ID + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 */ private String quarterId; /** - * 年度ID + * 月维度Id: yyyyMM */ - private String yearId; + private String monthId; /** - * 指标ID + * 1:总分;0不是;默认0 */ - private String indexId; + private String isTotal; /** - * 分数 + * 分值 */ private BigDecimal score; /** - * 党建能力:party,治理能力:govrn,服务能力:service + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan */ - private String type; + private String indexCode; /** - * 删除状态,0正常,1删除 + * 删除状态 */ - private Integer delFlag; + private Integer delFlag; /** * 乐观锁 @@ -104,4 +114,19 @@ public class FactIndexCommunityScoreDTO implements Serializable { */ private Date updatedTime; + public FactIndexCommunityScoreDTO() { + this.customerId = ""; + this.agencyId = ""; + this.parentAgencyId = ""; + this.yearId = ""; + this.quarterId = ""; + this.monthId = ""; + this.isTotal = "0"; + this.score = new BigDecimal(0); + this.indexCode = ""; + this.delFlag = 0; + this.revision = 0; + this.createdBy = "APP_USER"; + this.updatedBy = "APP_USER"; + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java deleted file mode 100644 index 1eb6386bcc..0000000000 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityServiceFiveScoreDTO.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dto.screen; - -import java.io.Serializable; -import java.util.Date; -import lombok.Data; - -import java.math.BigDecimal; - -/** - * 社区相关-服务能力【五级权重】分数表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-27 - */ -@Data -public class FactIndexCommunityServiceFiveScoreDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * - */ - private String id; - - /** - * 机关ID - */ - private String agencyId; - - /** - * 月度ID - */ - private String monthId; - - /** - * 指标ID - */ - private String indexId; - - /** - * 总指数分值 - */ - private BigDecimal totalScore; - - /** - * 党建能力分值 - */ - private BigDecimal partyAbilityScore; - - /** - * 治理能力分值 - */ - private BigDecimal govrnAbilityScore; - - /** - * 服务能力分值 - */ - private BigDecimal serviceAbilityScore; - - /** - * 删除状态,0正常,1删除 - */ - private Integer delFlag; - - /** - * 乐观锁 - */ - private Integer revision; - - /** - * 创建人 - */ - private String createdBy; - - /** - * 创建时间 - */ - private Date createdTime; - - /** - * 更新人 - */ - private String updatedBy; - - /** - * 更新时间 - */ - private Date updatedTime; - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityActivityCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityActivityCountResultDTO.java new file mode 100644 index 0000000000..ec3b17f615 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityActivityCountResultDTO.java @@ -0,0 +1,59 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/8/31 2:12 下午 + */ +@Data +public class CommunityActivityCountResultDTO implements Serializable { + + private static final long serialVersionUID = -6623426101220283941L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 发文数 + */ + public Integer activityCount; + + public CommunityActivityCountResultDTO() { + this.agencyId = ""; + this.parentId = ""; + this.monthId = ""; + this.quarterId = ""; + this.yearId = ""; + this.activityCount = 0; + } +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountResultDTO.java index fe50bbf597..cf29133001 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/CommunityPublishArticleCountResultDTO.java @@ -13,6 +13,11 @@ public class CommunityPublishArticleCountResultDTO implements Serializable { private static final long serialVersionUID = -8260746179353253237L; + /** + * 客户ID + */ + private String customerId; + /** * 机关ID */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinBigDecimalResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinBigDecimalResultDTO.java new file mode 100644 index 0000000000..aa9f471405 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/MaxAndMinBigDecimalResultDTO.java @@ -0,0 +1,21 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Author zxc + * @DateTime 2020/8/30 8:11 下午 + */ +@Data +public class MaxAndMinBigDecimalResultDTO implements Serializable { + + private static final long serialVersionUID = 76227645470470839L; + + private BigDecimal min; + + private BigDecimal max; + +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridGovernAvgResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridGovernAvgResultDTO.java new file mode 100644 index 0000000000..64f3cc7319 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridGovernAvgResultDTO.java @@ -0,0 +1,46 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Author zxc + * @DateTime 2020/8/31 9:11 上午 + */ +@Data +public class SubGridGovernAvgResultDTO implements Serializable { + + private static final long serialVersionUID = -1354963771895272899L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 分数 + */ + private BigDecimal score; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java index 38263c4dc1..48b4501606 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java @@ -19,6 +19,11 @@ public class SubGridPartyAvgResultDTO implements Serializable { */ private String agencyId; + /** + * 客户ID + */ + private String customerId; + /** * 上级组织ID */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridServiceAvgResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridServiceAvgResultDTO.java new file mode 100644 index 0000000000..ba6329aef1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridServiceAvgResultDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.screen.result; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Author zxc + * @DateTime 2020/8/31 1:53 下午 + */ +@Data +public class SubGridServiceAvgResultDTO implements Serializable { + + private static final long serialVersionUID = -405197363477213644L; + + /** + * + */ + private String customerId; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 分数 + */ + private BigDecimal score; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 5f18b920f9..2b88f53f42 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -120,7 +120,25 @@ public class DemoController { @PostMapping("zxc") public Result getZxc(){ // indexCalculateCommunityService.communityPublishArticleCountCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); - indexCalculateCommunityService.communityPublishArticleCountCalculate("","202008"); + indexCalculateCommunityService.communityGovernAbilityCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + return new Result(); + } + + @PostMapping("zxc1") + public Result getZxc1(){ + indexCalculateCommunityService.communityPartyCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + return new Result(); + } + + @PostMapping("zxc2") + public Result getZxc2(){ + indexCalculateCommunityService.communityServiceAbilityCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + return new Result(); + } + + @PostMapping("zxcAll") + public Result getZxcAll(){ + indexCalculateCommunityService.communityRelate("b09527201c4409e19d1dbc5e3c3429a1","202008"); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java index fa9b8569b9..f28e6a2fd3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java @@ -25,6 +25,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 治理能力-街道及社区相关数据 @@ -70,5 +71,5 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId); + List> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index 31c268cd75..261fb8b945 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -19,6 +19,8 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgServiceAbilityFormDTO; +import com.epmet.dto.screen.result.CommunityActivityCountResultDTO; +import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; import com.epmet.entity.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -62,4 +64,13 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao list, @Param("customerId")String customerId); + + /** + * @Description 社区活动组织次数 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/31 2:15 下午 + */ + List selectActivityCount(@Param("customerId")String customerId, @Param("monthId")String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityGovrnFiveScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityGovrnFiveScoreDao.java deleted file mode 100644 index 52cd149927..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityGovrnFiveScoreDao.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dao.screen; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.FactIndexCommunityGovrnFiveScoreEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * 社区相关-治理能力【五级权重】分数表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-27 - */ -@Mapper -public interface FactIndexCommunityGovrnFiveScoreDao extends BaseDao { - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityPartyFiveScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityPartyFiveScoreDao.java deleted file mode 100644 index 4c628a1ec0..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityPartyFiveScoreDao.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dao.screen; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.screen.FactIndexCommunityPartyFiveScoreDTO; -import com.epmet.entity.screen.FactIndexCommunityPartyFiveScoreEntity; -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-27 - */ -@Mapper -public interface FactIndexCommunityPartyFiveScoreDao extends BaseDao { - - /** - * @Description 党建能力【社区】中间表插入 - * @param lists - * @author zxc - * @date 2020/8/27 5:05 下午 - */ - void insertCommunityPartyRecord(@Param("lists")List lists); - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java index 9ea796d24a..607132ea18 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java @@ -18,16 +18,47 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.entity.screen.FactIndexCommunityScoreEntity; 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-27 + * @since v1.0.0 2020-08-31 */ @Mapper public interface FactIndexCommunityScoreDao extends BaseDao { - + + /** + * @Description 党建能力【社区】中间表插入 + * @param lists + * @author zxc + * @date 2020/8/27 5:05 下午 + */ + void insertCommunityPartyRecord(@Param("lists") List lists); + + /** + * @Description 删除旧记录 + * @param customerId + * @param monthId + * @param indexCode + * @author zxc + * @date 2020/9/1 9:03 上午 + */ + void deleteOldRecord(@Param("customerId") String customerId,@Param("monthId")String monthId,@Param("indexCode")String indexCode); + + /** + * @Description 查询社区相关信息 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 9:41 上午 + */ + List selectCommunityInfo(@Param("customerId") String customerId,@Param("monthId")String monthId); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityServiceFiveScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityServiceFiveScoreDao.java deleted file mode 100644 index 97a03ad2c9..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityServiceFiveScoreDao.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.dao.screen; - -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.FactIndexCommunityServiceFiveScoreEntity; -import org.apache.ibatis.annotations.Mapper; - -/** - * 社区相关-服务能力【五级权重】分数表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-27 - */ -@Mapper -public interface FactIndexCommunityServiceFiveScoreDao extends BaseDao { - -} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java index b95b41ff55..223a297db4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java @@ -18,7 +18,9 @@ package com.epmet.dao.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; import com.epmet.entity.screen.FactIndexGridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -43,4 +45,22 @@ public interface FactIndexGridScoreDao extends BaseDao */ List selectSubGridPartyAvgScore(@Param("customerId")String customerId,@Param("monthId")String monthId); + /** + * @Description 社区下属所有网格治理能力汇总平均值 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/31 9:19 上午 + */ + List selectSubGridGovernAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 社区下级所有网格服务能力得分平均值 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/31 1:51 下午 + */ + List selectSubGridServiceAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId); + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityPartyFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityPartyFiveScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java index c42849dd0b..b43e51ad7c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityPartyFiveScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java @@ -34,8 +34,8 @@ import java.util.Date; */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("fact_index_community_party_five_score") -public class FactIndexCommunityPartyFiveScoreEntity extends BaseEpmetEntity { +@TableName("fact_index_community_five_score") +public class FactIndexCommunityFiveScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityGovrnFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityGovrnFiveScoreEntity.java deleted file mode 100644 index bf0bcbeac0..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityGovrnFiveScoreEntity.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.entity.screen; - -import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; -import java.util.Date; - -/** - * 社区相关-治理能力【五级权重】分数表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-27 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("fact_index_community_govrn_five_score") -public class FactIndexCommunityGovrnFiveScoreEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 机关iD - */ - private String agencyId; - - /** - * 月份ID - */ - private String monthId; - - /** - * 季度ID - */ - private String quarterId; - - /** - * 年度ID - */ - private String yearId; - - /** - * 指标ID - */ - private String indexId; - - /** - * 分数 - */ - private BigDecimal score; - - /** - * 社区被吹哨次数:transfered,社区办结项目数:closed_project,社区项目响应度:resp_project_ratio,社区超期项目率:overdue_project_ratio,社区办结项目率:closed_project_ratio,社区办结项目满意度:satisfaction_ratio - */ - private String type; - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java index 1c3899ef2d..01b0ff363f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java @@ -30,7 +30,7 @@ import java.util.Date; * 社区相关分数表 * * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-27 + * @since v1.0.0 2020-08-31 */ @Data @EqualsAndHashCode(callSuper=false) @@ -40,38 +40,48 @@ public class FactIndexCommunityScoreEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; /** - * 机关ID + * 客户Id + */ + private String customerId; + + /** + * 组织id */ private String agencyId; /** - * 月份ID + * 社区上一级组织id */ - private String monthId; + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; /** - * 季度ID + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 */ private String quarterId; /** - * 年度ID + * 月维度Id: yyyyMM */ - private String yearId; + private String monthId; /** - * 指标ID + * 1:总分;0不是;默认0 */ - private String indexId; + private String isTotal; /** - * 分数 + * 分值 */ private BigDecimal score; /** - * 党建能力:party,治理能力:govrn,服务能力:service + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan */ - private String type; + private String indexCode; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityServiceFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityServiceFiveScoreEntity.java deleted file mode 100644 index 8d0fb8857f..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityServiceFiveScoreEntity.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

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

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

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.epmet.entity.screen; - -import com.baomidou.mybatisplus.annotation.TableName; - -import com.epmet.commons.mybatis.entity.BaseEpmetEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; -import java.util.Date; - -/** - * 社区相关-服务能力【五级权重】分数表 - * - * @author generator generator@elink-cn.com - * @since v1.0.0 2020-08-27 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@TableName("fact_index_community_service_five_score") -public class FactIndexCommunityServiceFiveScoreEntity extends BaseEpmetEntity { - - private static final long serialVersionUID = 1L; - - /** - * 机关ID - */ - private String agencyId; - - /** - * 月度ID - */ - private String monthId; - - /** - * 季度ID - */ - private String quarterId; - - /** - * 年度ID - */ - private String yearId; - - /** - * 指标ID - */ - private String indexId; - - /** - * 分数 - */ - private BigDecimal score; - - /** - * 社区活动组织次数:activity - */ - private String type; - -} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java index daf11c1519..f597e3748f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java @@ -12,13 +12,13 @@ import java.util.List; public interface IndexCalculateCommunityService { /** - * @Description 社区名义发文数量计算 + * @Description 社区党建能力 * @param customerId * @param monthId * @author zxc * @date 2020/8/26 10:46 上午 */ - void communityPublishArticleCountCalculate(String customerId, String monthId); + void communityPartyCalculate(String customerId, String monthId); /** * @Description 社区治理能力 @@ -27,6 +27,23 @@ public interface IndexCalculateCommunityService { * @author zxc * @date 2020/8/26 1:40 下午 */ - void CommunityGovernAbilityCalculate(String customerId, String monthId); + void communityGovernAbilityCalculate(String customerId, String monthId); + /** + * @Description 社区服务能力 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + void communityServiceAbilityCalculate(String customerId, String monthId); + + /** + * @Description 社区相关计算 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + void communityRelate(String customerId, String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java index 15e0b36ff7..89554a0cf2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java @@ -1,30 +1,25 @@ package com.epmet.service.screen.impl; +import com.alibaba.druid.util.StringUtils; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; import com.epmet.dao.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.indexcoll.FactIndexServiceAblityOrgMonthlyDao; import com.epmet.dao.screen.*; -import com.epmet.dto.indexcal.ExtremeValueCommonDTO; -import com.epmet.dto.screen.FactIndexCommunityPartyFiveScoreDTO; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.dto.screen.result.*; import com.epmet.entity.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.indexcal.IndexCodeFieldReService; import com.epmet.service.screen.IndexCalculateCommunityService; import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.Correlation; -import com.epmet.support.normalizing.IntegerScoreCalculator; -import com.epmet.support.normalizing.ScoreCalculator; -import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.*; import com.epmet.support.normalizing.batch.BatchScoreCalculator; import com.epmet.support.normalizing.batch.IndexInputVO; import com.epmet.support.normalizing.batch.IndexOutputVO; import com.epmet.support.normalizing.batch.SampleValue; -import com.github.pagehelper.Page; -import com.github.pagehelper.PageHelper; -import io.swagger.models.auth.In; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -48,19 +43,15 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni @Autowired private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired private IndexGroupDetailService indexGroupDetailService; @Autowired private IndexCodeFieldReService indexCodeFieldReService; @Autowired - private FactIndexCommunityPartyFiveScoreDao factIndexCommunityPartyFiveScoreDao; + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; @Autowired private FactIndexGridScoreDao factIndexGridScoreDao; - @Autowired - private FactIndexCommunityServiceFiveScoreDao factIndexCommunityServiceFiveScoreDao; - @Autowired - private FactIndexCommunityGovrnFiveScoreDao factIndexCommunityGovrnFiveScoreDao; - @Autowired - private FactIndexCommunityScoreDao factIndexCommunityScoreDao; /** * @Description 社区名义发文数量计算【党建能力】 @@ -70,32 +61,48 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni */ @Transactional(rollbackFor = Exception.class) @Override - public void communityPublishArticleCountCalculate(String customerId, String monthId) { + public void communityPartyCalculate(String customerId, String monthId) { customerId = "b09527201c4409e19d1dbc5e3c3429a1"; // 党建能力 // 根据all_parent_index_code 获取指标明细 List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(),IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); - - List subAllGridList = new ArrayList<>(); - List communityPublishArticle = new ArrayList<>(); - + List subAllGridList = new ArrayList<>(); + List communityPublishArticle = new ArrayList<>(); //下属所有网格的党建能力平均值 String finalCustomerId = customerId; detailListByParentCode.forEach(indexGroup -> { - if (indexGroup.getIndexCode().equals("xiazhusuoyouwgddjnlpjz")){ + if (indexGroup.getIndexCode().equals(IndexCalConstant.COMMUNITY_PARTY_AVG)){ List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(finalCustomerId, monthId); if (subGridPartyAvgScore.size() != NumConstant.ZERO){ - subGridPartyAvgScore.forEach(subGridParty -> { - BigDecimal multiply = subGridParty.getScore().multiply(indexGroup.getWeight()); - subGridParty.setScore(multiply); - FactIndexCommunityPartyFiveScoreDTO dto = new FactIndexCommunityPartyFiveScoreDTO(); - BeanUtils.copyProperties(subGridParty,dto); - dto.setIndexId(indexGroup.getIndexId()); - dto.setTotalScore(dto.getPartyAbilityScore()); - subAllGridList.add(dto); - }); - factIndexCommunityPartyFiveScoreDao.insertCommunityPartyRecord(subAllGridList); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexStart = NumConstant.ZERO; + Integer indexEnd = NumConstant.TEN; + List collect; + do { + collect = subGridPartyAvgScore.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + collect.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + FactIndexCommunityScoreDTO dto = new FactIndexCommunityScoreDTO(); + BeanUtils.copyProperties(c,dto); + subAllGridList.add(dto); + }); + IndexInputVO index1VO = new IndexInputVO(indexGroup.getIndexId(), index1SampleValues,indexGroup.getThreshold(), indexGroup.getWeight(), sc1); + List indexInputVOS = Arrays.asList(index1VO); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { + subAllGridList.forEach(grid -> { + if (grid.getAgencyId().equals(agency.getSampleId())){ + grid.setScore(agency.getSampleScore()); + } + }); + }); + indexStart++; + }while (collect.size() == NumConstant.TEN); } } }); @@ -105,13 +112,13 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (indexGroup.getIndexCode().equals("shequmingyifwsl")) { if (publishArticleCounts.size() == NumConstant.ONE) { //TODO 计算之后的分数 - FactIndexCommunityPartyFiveScoreDTO dto = new FactIndexCommunityPartyFiveScoreDTO(); + FactIndexCommunityScoreDTO dto = new FactIndexCommunityScoreDTO(); BeanUtils.copyProperties(detailListByParentCode.get(NumConstant.ZERO), dto); - dto.setPartyAbilityScore(BigDecimal.valueOf(50.00)); - dto.setIndexId(detailListByParentCode.get(NumConstant.ZERO).getIndexId()); + dto.setScore(BigDecimal.valueOf(50.00)); + dto.setIndexCode(detailListByParentCode.get(NumConstant.ZERO).getIndexCode()); communityPublishArticle.add(dto); - factIndexCommunityPartyFiveScoreDao.insertCommunityPartyRecord(communityPublishArticle); - } else if (publishArticleCounts.size() != NumConstant.ZERO) { + factIndexCommunityScoreDao.insertCommunityPartyRecord(communityPublishArticle); + } else if (publishArticleCounts.size() > NumConstant.ONE) { Integer indexStart = NumConstant.ZERO; Integer indexEnd = NumConstant.TEN; List collect; @@ -123,32 +130,37 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni collect.forEach(c -> { SampleValue s = new SampleValue(c.getAgencyId(), c.getPublishArticleCount()); ll.add(s); - FactIndexCommunityPartyFiveScoreDTO publishArticle = new FactIndexCommunityPartyFiveScoreDTO(); + FactIndexCommunityScoreDTO publishArticle = new FactIndexCommunityScoreDTO(); BeanUtils.copyProperties(c,publishArticle); communityPublishArticle.add(publishArticle); }); - IndexInputVO index1VO = new IndexInputVO<>(indexGroup.getIndexId(), ll, indexGroup.getWeight(), sc1); + IndexInputVO index1VO = new IndexInputVO<>(indexGroup.getIndexId(), ll,indexGroup.getThreshold(), indexGroup.getWeight(), sc1); List indexInputVOS = Arrays.asList(index1VO); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { communityPublishArticle.forEach(publish -> { if (publish.getAgencyId().equals(agency.getSampleId())){ - publish.setIndexId(indexGroup.getIndexId()); - publish.setPartyAbilityScore(agency.getSampleScore()); - publish.setTotalScore(agency.getSampleScore()); + publish.setIndexCode(indexGroup.getIndexCode()); + publish.setScore(agency.getSampleScore()); } }); }); indexStart++; - } while (collect.size() == 10); - factIndexCommunityPartyFiveScoreDao.insertCommunityPartyRecord(communityPublishArticle); + } while (collect.size() == NumConstant.TEN); } } }); - - - + subAllGridList.forEach(grid -> { + communityPublishArticle.forEach(publish -> { + if (grid.getAgencyId().equals(publish.getAgencyId())){ + grid.setScore(grid.getScore().add(publish.getScore())); + grid.setIndexCode(IndexCalConstant.COMMUNITY_PARTY); + } + }); + }); + factIndexCommunityScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.COMMUNITY_PARTY); + factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); } /** @@ -160,21 +172,260 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni */ @Transactional(rollbackFor = Exception.class) @Override - public void CommunityGovernAbilityCalculate(String customerId, String monthId) { - List communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId); + public void communityGovernAbilityCalculate(String customerId, String monthId) { + customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + + List subAllGridList = new ArrayList<>(); + + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + + String finalCustomerId = customerId; + detailListByParentCode.forEach(detail -> { + if (detail.getIndexCode().equals(IndexCalConstant.COMMUNITY_GOVERN_AVG)){ + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(finalCustomerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE){ + + // TODO + + }else if (subGridGovernAvg.size() > NumConstant.ONE){ + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexStart = NumConstant.ZERO; + Integer indexEnd = NumConstant.TEN; + List collect; + do { + collect = subGridGovernAvg.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + collect.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + FactIndexCommunityScoreDTO dto = new FactIndexCommunityScoreDTO(); + BeanUtils.copyProperties(c,dto); + subAllGridList.add(dto); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold() ,detail.getWeight(), sc1); + List indexInputVOS = Arrays.asList(index1VO); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + scoreCountOfSampleId.forEach((key,value) -> { + subAllGridList.forEach(grid -> { + if (grid.getAgencyId().equals(key)){ + grid.setScore(value); + } + }); + }); + indexStart++; + }while (collect.size() == NumConstant.TEN); + } + } + else { + + } + }); + + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(finalCustomerId, monthId); if (communityGovernAbility.size() == NumConstant.ONE){ - List result = new ArrayList<>(); - CommunityGovernAbilityCalculateResultDTO governAbility = new CommunityGovernAbilityCalculateResultDTO(); - BeanUtils.copyProperties(communityGovernAbility.get(NumConstant.ZERO),governAbility); - // TODO 计算之后的分数 + // TODO - result.add(governAbility); + }else if (communityGovernAbility.size() > NumConstant.ONE){ + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (!StringUtils.isEmpty(fieldNameByIndexCode)){ + if (communityGovernAbility.get(NumConstant.ZERO).containsKey(fieldNameByIndexCode)) { + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + Integer indexStart = NumConstant.ZERO; + Integer indexEnd = NumConstant.TEN; + List> collect; + do { + collect = communityGovernAbility.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + collect.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + } while (collect.size() == NumConstant.TEN); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + scoreCountOfSampleId.forEach((key,value) -> { + subAllGridList.forEach(grid -> { + if (key.equals(grid.getAgencyId())) { + grid.setCustomerId(finalCustomerId); + grid.setIndexCode(IndexCalConstant.COMMUNITY_GOVERN); + grid.setScore(grid.getScore().add(value)); + } + }); + }); + } + } + }); } + factIndexCommunityScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.COMMUNITY_GOVERN); + factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); } + /** + * @Description 社区服务能力 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void communityServiceAbilityCalculate(String customerId, String monthId) { + + + List subAllGridList = new ArrayList<>(); + List communityPublishArticle = new ArrayList<>(); + + + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + detailListByParentCode.forEach(detail -> { + switch (detail.getIndexCode()){ + case IndexCalConstant.COMMUNITY_SERVICE_AVG: + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE){ + + // TODO 只有一条记录时 + + }else if (subGridServiceAvg.size() > NumConstant.ONE ){ + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexStart = NumConstant.ZERO; + Integer indexEnd = NumConstant.TEN; + List collect; + do { + collect = subGridServiceAvg.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + collect.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + FactIndexCommunityScoreDTO dto = new FactIndexCommunityScoreDTO(); + BeanUtils.copyProperties(c,dto); + subAllGridList.add(dto); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues,detail.getThreshold(), detail.getWeight(), sc1); + List indexInputVOS = Arrays.asList(index1VO); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { + subAllGridList.forEach(grid -> { + if (grid.getAgencyId().equals(agency.getSampleId())){ + grid.setScore(agency.getSampleScore()); + } + }); + }); + indexStart++; + }while (collect.size() == NumConstant.TEN); + } + break; + case "shequhuodongzzcs": + List communityActivityCount = factIndexServiceAblityOrgMonthlyDao.selectActivityCount(customerId, monthId); + if (communityActivityCount.size() == NumConstant.ONE){ + + // TODO + + }else if (communityActivityCount.size() > NumConstant.ONE){ + Integer indexStart = NumConstant.ZERO; + Integer indexEnd = NumConstant.TEN; + List collect; + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(communityActivityCount.stream().map(o -> new BigDecimal(o.getActivityCount())).collect(Collectors.toList())); + do { + collect = communityActivityCount.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List> ll = new ArrayList<>(); + collect.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getActivityCount()); + ll.add(s); + FactIndexCommunityScoreDTO publishArticle = new FactIndexCommunityScoreDTO(); + BeanUtils.copyProperties(c,publishArticle); + communityPublishArticle.add(publishArticle); + }); + IndexInputVO index1VO = new IndexInputVO<>(detail.getIndexId(), ll, detail.getThreshold(),detail.getWeight(), sc1); + List indexInputVOS = Arrays.asList(index1VO); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { + communityPublishArticle.forEach(publish -> { + if (publish.getAgencyId().equals(agency.getSampleId())){ + publish.setScore(agency.getSampleScore()); + } + }); + }); + indexStart++; + } while (collect.size() == NumConstant.TEN); + } + break; + default: + } + }); + subAllGridList.forEach(grid -> { + grid.setIndexCode(IndexCalConstant.COMMUNITY_SERVICE); + communityPublishArticle.forEach(publish -> { + if (grid.getAgencyId().equals(publish.getAgencyId())){ + grid.setScore(grid.getScore().add(publish.getScore())); + grid.setCustomerId(customerId); + } + }); + }); + factIndexCommunityScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.COMMUNITY_SERVICE); + factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); + + } + + /** + * @Description 社区相关计算 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + @Override + public void communityRelate(String customerId, String monthId) { + + this.communityPartyCalculate(customerId, monthId); //党建能力 + this.communityGovernAbilityCalculate(customerId, monthId); // 治理能力 + this.communityServiceAbilityCalculate(customerId, monthId); // 服务能力 + + List communityPublishArticle = new ArrayList<>(); + + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List factIndexCommunityScoreEntities = factIndexCommunityScoreDao.selectCommunityInfo(customerId, monthId); + detailListByParentCode.forEach(detail -> { + factIndexCommunityScoreEntities.forEach(community -> { + if (detail.getIndexCode().equals(community.getIndexCode())){ + community.setScore(community.getScore().multiply(detail.getWeight())); + } + }); + }); + + Map> collect = factIndexCommunityScoreEntities.stream().collect(Collectors.groupingBy(FactIndexCommunityScoreDTO::getAgencyId)); + List result = new ArrayList<>(); + collect.forEach((key,value) -> { + FactIndexCommunityScoreDTO score = new FactIndexCommunityScoreDTO(); + score.setIsTotal(NumConstant.ONE_STR); + score.setCustomerId(customerId); + score.setAgencyId(key); + score.setMonthId(monthId); + score.setYearId(DateUtils.getYearId(monthId)); + score.setQuarterId(DateUtils.getQuarterId(monthId)); + factIndexCommunityScoreEntities.forEach(community -> { + score.setScore(score.getScore().add(community.getScore())); + }); + result.add(score); + }); + factIndexCommunityScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.COMMUNITY_RELATE); + factIndexCommunityScoreDao.insertCommunityPartyRecord(result); + } + /** * @Description Integer类型获取最大数和最小数 * @param list @@ -190,6 +441,16 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni return result; } + + public MaxAndMinBigDecimalResultDTO getMaxAndMinBigDecimal(List list){ + BigDecimal max = Collections.max(list); + BigDecimal min = Collections.min(list); + MaxAndMinBigDecimalResultDTO result = new MaxAndMinBigDecimalResultDTO(); + result.setMax(max); + result.setMin(min); + return result; + } + /** * @Description Double类型获取最大数和最小数 * @param list diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index 11b87f6eb8..76d61d7b83 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -87,19 +87,19 @@ - SELECT - agency_id AS agencyId, - parent_id AS parentId, - month_id AS monthId, - quarter_id AS quarterId, - year_id AS yearId, - transfered_count AS transferedCount, - closed_project_count AS closedProjectCount, - resp_project_ratio AS respProjectRatio, - overdue_project_ratio AS overDueProjectRatio, - closed_project_ratio AS closedProjectRatio, - satisfaction_ratio AS satisfactionRatio + AGENCY_ID, + PARENT_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + TRANSFERED_COUNT, + CLOSED_PROJECT_COUNT, + RESP_PROJECT_RATIO, + OVERDUE_PROJECT_RATIO, + CLOSED_PROJECT_RATIO, + SATISFACTION_RATIO FROM fact_index_govrn_ablity_org_monthly WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index ff41b99bd4..4e6bd0cd6c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -79,7 +79,8 @@ month_id, quarter_id, year_id, - publish_article_count + publish_article_count, + customer_id FROM fact_index_party_ablity_org_monthly WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml index c475e2aca1..d223423e17 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -70,4 +70,23 @@ ) + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityGovrnFiveScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityGovrnFiveScoreDao.xml deleted file mode 100644 index 721b8181ef..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityGovrnFiveScoreDao.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml deleted file mode 100644 index 7110ba2c04..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityPartyFiveScoreDao.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - INSERT INTO fact_index_community_party_five_score ( ID, AGENCY_ID, MONTH_ID, INDEX_ID, TOTAL_SCORE, PARTY_ABILITY_SCORE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) - VALUES - - ( - REPLACE ( UUID(), '-', '' ), - #{item.agencyId}, - #{item.monthId}, - #{item.indexId}, - #{item.totalScore}, - #{item.partyAbilityScore}, - #{item.delFlag}, - #{item.revision}, - #{item.createdBy}, - NOW(), - #{item.updatedBy}, - NOW() - ) - - - \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml index 54611e0f02..91bebf545b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml @@ -3,4 +3,60 @@ + + + INSERT INTO fact_index_community_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, IS_TOTAL, SCORE, INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + VALUES + + ( + REPLACE(UUID(),'-',''), + #{item.customerId}, + #{item.agencyId}, + #{item.parentAgencyId}, + #{item.yearId}, + #{item.quarterId}, + #{item.monthId}, + #{item.isTotal}, + #{item.score}, + #{item.indexCode}, + #{item.delFlag}, + #{item.revision}, + #{item.createdBy}, + NOW(), + #{item.updatedBy}, + NOW() + ) + + + + + + DELETE + FROM + fact_index_community_score + WHERE + del_flag = '0' + AND customer_id = #{customerId} + AND month_id = #{monthId} + AND index_code = #{indexCode} + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityServiceFiveScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityServiceFiveScoreDao.xml deleted file mode 100644 index 509f723548..0000000000 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityServiceFiveScoreDao.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexGridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexGridScoreDao.xml index 7e4ad04732..b38cf57c0a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexGridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexGridScoreDao.xml @@ -8,13 +8,55 @@ SELECT agency_id, month_id, - AVG( party_ablity_score ) AS score + quarter_id, + year_id, + AVG( score ) AS score, + customer_id FROM fact_index_grid_score WHERE del_flag = '0' AND customer_id = #{customerId} AND month_id = #{monthId} + AND index_code = 'dangjiannengli' GROUP BY agency_id + + + + + + \ No newline at end of file From ee00f86b5b6aa0f2725e3bb43eaf5acae8df134b Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 1 Sep 2020 10:27:51 +0800 Subject: [PATCH 240/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=BD=92=E4=B8=80=E7=AE=97=E6=B3=95=E6=9E=84=E9=80=A0?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/CpcIndexCalculateServiceImpl.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index aa937dc3d6..26ed23abaa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -221,13 +221,6 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { private Map> buildIndexInputVO(List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { - IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code - indexInputVO.setIndexId(index.getIndexCode()); - //权重 - indexInputVO.setWeight(index.getWeight()); - //阈值 - indexInputVO.setThreshold(index.getThreshold()); BigDecimal minValue = null; BigDecimal maxValue = null; @@ -247,10 +240,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - indexInputVO.setScoreCalculator(scoreCalculator); - List> sampleValueList = new ArrayList<>(); - indexInputVO.setIndexValueVOs(sampleValueList); - + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList>(),index.getWeight(),index.getThreshold(),scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; From ea5250d1f9572fc1bd4ab2c68a7877aae5a80839 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 1 Sep 2020 10:28:04 +0800 Subject: [PATCH 241/360] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=98=88=E5=80=BCv1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GridCorreLationServiceImpl.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 98a35e93fe..7fa8281f15 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -344,13 +344,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { - IndexInputVO indexInputVO = new IndexInputVO(); +// IndexInputVO indexInputVO = new IndexInputVO(); // 指标code - indexInputVO.setIndexId(index.getIndexCode()); +// indexInputVO.setIndexId(index.getIndexCode()); //阈值 - indexInputVO.setThreshold(index.getThreshold()); +// indexInputVO.setThreshold(index.getThreshold()); //权重 - indexInputVO.setWeight(index.getWeight()); +// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { @@ -384,11 +384,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - indexInputVO.setScoreCalculator(scoreCalculator); +// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); - indexInputVO.setIndexValueVOs(sampleValueList); - - map.put(index.getIndexCode(), indexInputVO); +// indexInputVO.setIndexValueVOs(sampleValueList); + IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), + sampleValueList, + index.getThreshold(), + index.getWeight(), + scoreCalculator); + map.put(index.getIndexCode(), indexInputVO1); } return map; } From 4581826873537ce0faa0e916715a71dda1b3bbd4 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 1 Sep 2020 10:32:12 +0800 Subject: [PATCH 242/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=BD=92=E4=B8=80=E7=AE=97=E6=B3=95=E6=9E=84=E9=80=A0?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/indexcal/impl/CpcIndexCalculateServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index 26ed23abaa..c2d8a924cb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -240,7 +240,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList>(),index.getWeight(),index.getThreshold(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; From 990a81c5f9bfa3d5c1c7c8cc3b2b52e54f298f88 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 1 Sep 2020 10:57:16 +0800 Subject: [PATCH 243/360] =?UTF-8?q?=E5=85=9A=E5=91=98=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E7=BE=A4=E4=BC=97=E6=9F=B1=E7=8A=B6=E5=9B=BE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=80=BB=E5=92=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/ContactMassLineChartResultDTO.java | 10 ++++++++++ .../screen/impl/PartyMemberLeadServiceImpl.java | 2 ++ 2 files changed, 12 insertions(+) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java index e57b0cc54f..17e31e33ee 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java @@ -28,4 +28,14 @@ public class ContactMassLineChartResultDTO implements Serializable { * 群成员数 */ private List groupMemberData; + + /** + * 党员建群数 + **/ + private Integer groupTotal; + + /** + * 党成员数 + * */ + private Integer groupMemberTotal; } 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/screen/impl/PartyMemberLeadServiceImpl.java index 902861f5e2..b895b49651 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/screen/impl/PartyMemberLeadServiceImpl.java @@ -110,6 +110,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; } From 5d41c26b04503b9ee92abc67493b149342faa972 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 1 Sep 2020 11:04:02 +0800 Subject: [PATCH 244/360] =?UTF-8?q?=E5=85=9A=E5=91=98=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E7=BE=A4=E4=BC=97=E6=9F=B1=E7=8A=B6=E5=9B=BE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=BF=94=E5=8F=82dto=E8=AE=BE=E7=BD=AE=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/result/ContactMassLineChartResultDTO.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java index 17e31e33ee..5a2b93acd9 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.screen.dto.result; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -32,10 +33,10 @@ public class ContactMassLineChartResultDTO implements Serializable { /** * 党员建群数 **/ - private Integer groupTotal; + private Integer groupTotal = NumConstant.ZERO; /** * 党成员数 * */ - private Integer groupMemberTotal; + private Integer groupMemberTotal = NumConstant.ZERO; } From cd78c492d046f7ea9af7369b7dae33b810a99b6e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 1 Sep 2020 11:14:31 +0800 Subject: [PATCH 245/360] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/GridCorreLationServiceImpl.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..c6c160509e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,9 +1,11 @@ package com.epmet.service.indexcal.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; @@ -68,6 +70,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description 网格相关,分值计算 * @Date 2020/8/26 10:51 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) { boolean resultFlag = false; @@ -127,7 +130,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + logger.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; } //总页数,进行批量查询,批量计算 @@ -155,6 +158,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { + logger.info("index_code :{}",key); //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 @@ -371,7 +375,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); @@ -409,7 +413,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + logger.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; } //总页数,进行批量查询,批量计算 @@ -473,7 +477,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + logger.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; } //总页数,进行批量查询,批量计算 From 159c10703727ce252e8a76373d31cfd7946f060a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 1 Sep 2020 11:17:41 +0800 Subject: [PATCH 246/360] =?UTF-8?q?=E9=87=87=E9=9B=86=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A412=E4=B8=AA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerFunctionCollectResultDTO.java | 25 +++++++++++++++++++ .../CustomerFunctionDetailController.java | 3 +-- .../epmet/dao/CustomerFunctionDetailDao.java | 10 ++++++++ .../CustomerFunctionDetailService.java | 2 +- .../CustomerFunctionDetailServiceImpl.java | 15 +++++++---- .../mapper/CustomerFunctionDetailDao.xml | 24 ++++++++++++++++++ 6 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionCollectResultDTO.java diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionCollectResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionCollectResultDTO.java new file mode 100644 index 0000000000..b1d9b1afe0 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionCollectResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 运营端-定制功能采集-接口返参 + * @Author sun + */ +@Data +public class CustomerFunctionCollectResultDTO implements Serializable { + private static final long serialVersionUID = 2971689193155710437L; + + /** + * 客户某一端定制功能总数 + */ + private Integer num; + + /** + * 所属端中文名称 + */ + private String fromAppName; + +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java index 42f69d00e2..245d5018a2 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java @@ -188,8 +188,7 @@ public class CustomerFunctionDetailController { @PostMapping("customerfunctioncollect") public Result customerFunctionCollect(@LoginUser TokenDto tokenDto, @RequestBody CustomerFunctionCollectFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, CustomerFunctionCollectFormDTO.AddUserInternalGroup.class, CustomerFunctionCollectFormDTO.AddUserShowGroup.class); - customerFunctionDetailService.customerFunctionCollect(formDTO); - return new Result(); + return customerFunctionDetailService.customerFunctionCollect(formDTO); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java index 1a6572179d..bfbefc518d 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java @@ -19,9 +19,11 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.CustomerFunctionDetailDTO; +import com.epmet.dto.form.CustomerFunctionCollectFormDTO; import com.epmet.dto.form.FunctionDetailFromDTO; import com.epmet.dto.form.UpdateCustomerFunctionFormDTO; import com.epmet.dto.form.UpdateShoppingStatusFormDTO; +import com.epmet.dto.result.CustomerFunctionCollectResultDTO; import com.epmet.dto.result.CustomerResultDTO; import com.epmet.dto.result.FunctionDetailResultDTO; import com.epmet.entity.CustomerFunctionDetailEntity; @@ -101,4 +103,12 @@ public interface CustomerFunctionDetailDao extends BaseDao= NumConstant.ONE) { + return new Result().error(8000, String.format("当前客户在[%s]已存在12个上线功能,不允许再次采集!", dto.getFromAppName())); + } + //1.查询定制功能详细信息 FunctionCustomizedDTO functionDTO = functionCustomizedDao.selectByFunctionId(formDTO.getFunctionId()); if(functionDTO == null){ @@ -259,6 +263,7 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl + + + UPDATE customer_function_detail SET From dc44aab8fb68744e3523604e6138a8edf7bd9a65 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 1 Sep 2020 11:53:43 +0800 Subject: [PATCH 247/360] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AE=9A=E5=88=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=B8=8A=E6=9E=B6=EF=BC=8C=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E8=B6=85=E8=BF=8712=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CustomerFunctionDetailServiceImpl.java | 13 +++++++++++++ .../service/impl/FunctionCustomizedServiceImpl.java | 1 + 2 files changed, 14 insertions(+) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java index 1d5650fbae..7d4a668843 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java @@ -153,6 +153,19 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl Date: Tue, 1 Sep 2020 13:28:48 +0800 Subject: [PATCH 248/360] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/CustomerFunctionDetailServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java index 7d4a668843..2b599a211a 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java @@ -233,7 +233,7 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl= NumConstant.ONE) { + if (dto.getNum() >= NumConstant.TWELVE) { return new Result().error(8000, String.format("当前客户在[%s]已存在12个上线功能,不允许再次采集!", dto.getFromAppName())); } From f1bfcf2678245081c7b39aa06828dfe5ce647fc3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 1 Sep 2020 14:18:14 +0800 Subject: [PATCH 249/360] =?UTF-8?q?bug=E4=BF=AE=E6=94=B91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GridCorreLationServiceImpl.java | 54 ++++++++++--------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index c6c160509e..9bb3560246 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -4,6 +4,7 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; @@ -160,13 +161,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { indexMap.forEach((key, value) -> { logger.info("index_code :{}",key); //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) @@ -174,6 +169,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + logger.info("===================="+sampleValueStr); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -287,8 +289,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -442,18 +448,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //遍历所有的指标 indexMap.forEach((key, value) -> { //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -542,16 +548,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); +// gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); +// gridScoreEntity.setGridId(gridScoreDTO.getGridId()); +// gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); +// gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); +// gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); +// gridScoreEntity.setYearId(gridScoreDTO.getYearId()); +// gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); From f880ce436fc1c593b0f10b2615f700c37f84296b Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 1 Sep 2020 14:24:10 +0800 Subject: [PATCH 250/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=98=88=E5=80=BC?= =?UTF-8?q?=E5=BC=95=E8=B5=B7=E7=9A=84=E5=A4=8D=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/support/normalizing/batch/BatchScoreCalculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index 6c17298ad6..1ede9a4aae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -75,7 +75,7 @@ public class BatchScoreCalculator { */ public BigDecimal getFinalSampleValue(Object realValue, BigDecimal threshold) { BigDecimal bdRealValue = new BigDecimal(realValue.toString()); - if (threshold.equals(-1)) { + if (threshold.compareTo(new BigDecimal(-1)) == 0) { // -1表示不使用阈值 return bdRealValue; } From a0dcbd07b6ae4a466d6c4733052a60b48d081cfb Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 1 Sep 2020 15:06:53 +0800 Subject: [PATCH 251/360] =?UTF-8?q?=E5=AE=9A=E5=88=B6=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=B8=8A=E6=9E=B6=20-=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CustomerFunctionDetailServiceImpl.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java index 2b599a211a..d57623db5d 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/CustomerFunctionDetailServiceImpl.java @@ -155,15 +155,13 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl Date: Tue, 1 Sep 2020 15:44:25 +0800 Subject: [PATCH 252/360] =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CpcIndexCalculateServiceImpl.java | 2 +- .../BigDecimalScoreCalculator.java | 22 ++++++-- .../support/normalizing/ScoreCalculator.java | 3 +- .../normalizing/batch/IndexInputVO.java | 5 +- .../normalizing/batch/SampleValue.java | 5 +- .../FactIndexPartyAblityCpcMonthlyDao.xml | 2 +- .../stats/test/normalizing/DemoScoreCal.java | 56 +++++++++++++++---- 7 files changed, 73 insertions(+), 22 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index c2d8a924cb..b7370217ed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -240,7 +240,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java index 1655c73a6d..fe0412ba3f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java @@ -1,6 +1,9 @@ package com.epmet.support.normalizing; +import com.alibaba.fastjson.JSON; + import java.math.BigDecimal; +import java.util.Arrays; import java.util.List; /** @@ -9,14 +12,14 @@ import java.util.List; */ public class BigDecimalScoreCalculator extends ScoreCalculator { - /** + /* *//** * 初始化基于原数组的整数分值计算 * ☆☆☆ 务必在该构造方法最后调用父类的prepare()方法 ☆☆☆ * @param sourceArray 源数据完整数组 * @param minScore 分值区间的左边界 * @param maxScore 分值区间的右边界 * @param correlation 相关性 - */ + *//* public BigDecimalScoreCalculator(BigDecimal[] sourceArray, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { this.sourceArrary = sourceArray.clone(); this.minScore = minScore; @@ -26,13 +29,13 @@ public class BigDecimalScoreCalculator extends ScoreCalculator { System.out.println("最小值:"+minScore+";最大值:"+maxScore); } - /** + *//** * 初始化基于原数组的整数分值计算 * @param sourceList 源数据完整列表 * @param minScore 分值区间的左边界 * @param maxScore 分值区间的右边界 * @param correlation 相关性 - */ + *//* public BigDecimalScoreCalculator(List sourceList, BigDecimal minScore, BigDecimal maxScore, Correlation correlation) { this.sourceArrary = sourceList.toArray(); this.minScore = minScore; @@ -40,7 +43,7 @@ public class BigDecimalScoreCalculator extends ScoreCalculator { this.correlation = correlation; prepare4SourceArray(); System.out.println("最小值:"+minScore+";最大值:"+maxScore); - } + }*/ /** * 初始化基于边界值的整数分值计算 @@ -77,4 +80,13 @@ public class BigDecimalScoreCalculator extends ScoreCalculator { public BigDecimal convertValue2BigDecimal(Object sourceValue) { return (BigDecimal) sourceValue; } + + public static void main(String[] args) { + BigDecimal minScore = new BigDecimal(0); + BigDecimal maxScore = new BigDecimal(100); + ScoreCalculator sc = new BigDecimalScoreCalculator(new BigDecimal("0.1"),new BigDecimal("1"), minScore, maxScore, Correlation.POSITIVE); + List ts = Arrays.asList(new BigDecimal("0.1"),new BigDecimal("1")); + List normalize = sc.normalize(ts); + System.out.println(JSON.toJSONString(normalize)); + } } 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 index 0eab3dcf4b..07407d5032 100644 --- 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 @@ -55,8 +55,8 @@ public abstract class ScoreCalculator { maxValue = getMaxFromSourceArray(); minValue = getMinFromSourceArray(); //计算系数 - System.out.println("最小值:"+minScore+";最大值:"+maxScore); coefficient = calcuteCoefficient(minValue, maxValue); + //System.out.println("最小分值:"+minScore+";最大分值:"+maxScore+";系数:"+coefficient); } /** @@ -176,7 +176,6 @@ public abstract class ScoreCalculator { if (fenmu.compareTo(BigDecimal.ZERO)==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; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java index c67b1c494d..57c6fbc396 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexInputVO.java @@ -3,15 +3,16 @@ package com.epmet.support.normalizing.batch; import com.epmet.support.normalizing.ScoreCalculator; import lombok.AllArgsConstructor; import lombok.Data; -import lombok.NoArgsConstructor; +import java.io.Serializable; import java.math.BigDecimal; import java.util.List; @Data @AllArgsConstructor -public class IndexInputVO { +public class IndexInputVO implements Serializable { + private static final long serialVersionUID = -4855313801481921595L; /** * 指标标记,由使用者传入,用以标记该条指标的独有特性,一般用id或者code * 非必填 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleValue.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleValue.java index 0818cc8d97..5a42508e64 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleValue.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/SampleValue.java @@ -3,13 +3,16 @@ package com.epmet.support.normalizing.batch; import lombok.AllArgsConstructor; import lombok.Data; +import java.io.Serializable; + /** * 样本值对象 */ @Data @AllArgsConstructor -public class SampleValue { +public class SampleValue implements Serializable { + private static final long serialVersionUID = 8661385412757324539L; private String sampleId; private T sampleValue; 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 c9f807d881..edd55c90ea 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 @@ -73,7 +73,7 @@ SELECT MIN( CREATE_TOPIC_COUNT ) CREATE_TOPIC_COUNT_MIN, MAX( CREATE_TOPIC_COUNT ) CREATE_TOPIC_COUNT_MAX, - MAX( JOIN_TOPIC_COUNT ) JOIN_TOPIC_COUNT_MIN, + MIN( JOIN_TOPIC_COUNT ) JOIN_TOPIC_COUNT_MIN, MAX( JOIN_TOPIC_COUNT ) JOIN_TOPIC_COUNT_MAX, MIN( SHIFT_ISSUE_COUNT ) SHIFT_ISSUE_COUNT_MIN, MAX( SHIFT_ISSUE_COUNT ) SHIFT_ISSUE_COUNT_MAX, diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java index 6da70db9c8..443055b1f9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java +++ b/epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java @@ -122,27 +122,63 @@ public class DemoScoreCal { public void testBigDecimalBatchCalculateGroupBySampleId() throws InterruptedException { //{4,8,1,3,2} - // 每个指标需要单独的分支计算器,因为每个指标的最大最小值是不同的 - ScoreCalculator sc1 = new BigDecimalScoreCalculator(new BigDecimal(1), new BigDecimal(8), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); - ScoreCalculator sc2 = new BigDecimalScoreCalculator(new BigDecimal(1), new BigDecimal(8), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.NEGATIVE); + //分值计算器 每个指标需要单独的分值计算器,因为每个指标的最大最小值是不同的 + ScoreCalculator sc1 = new BigDecimalScoreCalculator(new BigDecimal(50), new BigDecimal(100), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + ScoreCalculator sc2 = new BigDecimalScoreCalculator(new BigDecimal(20), new BigDecimal(100), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + ScoreCalculator sc3 = new BigDecimalScoreCalculator(new BigDecimal(20), new BigDecimal(40), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + ScoreCalculator sc4 = new BigDecimalScoreCalculator(new BigDecimal(10), new BigDecimal(100), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + + //每个指标的数值 比如 a指标里有5条数据 + List index1SampleValues = Arrays.asList( + new SampleValue<>("id1", new BigDecimal(100)), + new SampleValue<>("id2", new BigDecimal(50)), + new SampleValue<>("id3", new BigDecimal(60)), + new SampleValue<>("id4", new BigDecimal(80)), + new SampleValue<>("id5", new BigDecimal(80)) + ); + + List index1SampleValues2 = Arrays.asList( + new SampleValue<>("id1", new BigDecimal(100)), + new SampleValue<>("id2", new BigDecimal(80)), + new SampleValue<>("id3", new BigDecimal(80)), + new SampleValue<>("id4", new BigDecimal(20)), + new SampleValue<>("id5", new BigDecimal(20)) + ); + + List index1SampleValues3 = Arrays.asList( + new SampleValue<>("id1", new BigDecimal(40)), + new SampleValue<>("id2", new BigDecimal(20)), + new SampleValue<>("id3", new BigDecimal(40)), + new SampleValue<>("id4", new BigDecimal(30)), + new SampleValue<>("id5", new BigDecimal(20)) + ); + + List index1SampleValues4 = Arrays.asList( + new SampleValue<>("id1", new BigDecimal(20)), + new SampleValue<>("id2", new BigDecimal(100)), + new SampleValue<>("id3", new BigDecimal(10)), + new SampleValue<>("id4", new BigDecimal(50)), + new SampleValue<>("id5", new BigDecimal(20)) + ); - List index1SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(4)), new SampleValue<>("id2", new BigDecimal(1)), new SampleValue<>("id3", new BigDecimal(8))); - List index2SampleValues = Arrays.asList(new SampleValue<>("id1", new BigDecimal(1)), new SampleValue<>("id2", new BigDecimal(8)), new SampleValue<>("id3", new BigDecimal(3))); // 每个指标的信息,包括样本列表,权重,指标标记 - IndexInputVO index1VO = new IndexInputVO("aaa", index1SampleValues, new BigDecimal(6), new BigDecimal(1), sc1); - IndexInputVO index2VO = new IndexInputVO("bbb", index2SampleValues, new BigDecimal(6), new BigDecimal(1), sc2); + IndexInputVO index1VO = new IndexInputVO("aaa1", index1SampleValues, new BigDecimal(-1), new BigDecimal(0.2), sc1); + IndexInputVO index2VO = new IndexInputVO("aaa2", index1SampleValues2, new BigDecimal(-1), new BigDecimal(0.15), sc2); + IndexInputVO index3VO = new IndexInputVO("aaa3", index1SampleValues3, new BigDecimal(-1), new BigDecimal(0.15), sc3); + IndexInputVO index4VO = new IndexInputVO("aaa4", index1SampleValues4, new BigDecimal(-1), new BigDecimal(0.5), sc4); - List indexInputVOS = Arrays.asList(index1VO, index2VO); + + List indexInputVOS = Arrays.asList(index1VO, index2VO,index3VO,index4VO); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); HashMap result = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - System.err.println("--------------------------------"); + System.err.println("----------------1----------------"); result.forEach((key, value) -> { System.out.println(key.concat("的得分为:").concat(value.toString())); }); - System.err.println("--------------------------------"); + System.err.println("-----------------2---------------"); } From c87d2ef361515f6f27dcfd154d0f3fe7560c6935 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 1 Sep 2020 16:11:50 +0800 Subject: [PATCH 253/360] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/DemoController.java | 2 +- .../FactIndexServiceAblityOrgMonthlyDao.java | 2 + .../IndexCalculateCommunityService.java | 9 +- .../IndexCalculateCommunityServiceImpl.java | 265 +++++++----------- .../support/normalizing/ScoreConstants.java | 2 +- .../FactIndexServiceAblityOrgMonthlyDao.xml | 19 ++ .../screen/FactIndexCommunityScoreDao.xml | 1 + 7 files changed, 133 insertions(+), 167 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 2b88f53f42..f8274a7f10 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -132,7 +132,7 @@ public class DemoController { @PostMapping("zxc2") public Result getZxc2(){ - indexCalculateCommunityService.communityServiceAbilityCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + indexCalculateCommunityService.calAll("b09527201c4409e19d1dbc5e3c3429a1","202008"); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index 261fb8b945..c557c74ac2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -26,6 +26,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 服务能力-组织(街道|社区|全区)相关事实表 @@ -73,4 +74,5 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao selectActivityCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + List> selectActivityCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java index f597e3748f..dee16a06f7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java @@ -38,12 +38,5 @@ public interface IndexCalculateCommunityService { */ void communityServiceAbilityCalculate(String customerId, String monthId); - /** - * @Description 社区相关计算 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/9/1 9:21 上午 - */ - void communityRelate(String customerId, String monthId); + void calAll(String customerId, String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java index 89554a0cf2..cdd6470ccf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java @@ -62,7 +62,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni @Transactional(rollbackFor = Exception.class) @Override public void communityPartyCalculate(String customerId, String monthId) { - customerId = "b09527201c4409e19d1dbc5e3c3429a1"; // 党建能力 // 根据all_parent_index_code 获取指标明细 @@ -70,10 +69,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List subAllGridList = new ArrayList<>(); List communityPublishArticle = new ArrayList<>(); //下属所有网格的党建能力平均值 - String finalCustomerId = customerId; detailListByParentCode.forEach(indexGroup -> { if (indexGroup.getIndexCode().equals(IndexCalConstant.COMMUNITY_PARTY_AVG)){ - List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(finalCustomerId, monthId); + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); if (subGridPartyAvgScore.size() != NumConstant.ZERO){ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); Integer indexStart = NumConstant.ZERO; @@ -81,7 +79,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List collect; do { collect = subGridPartyAvgScore.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); - BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); collect.forEach(c -> { SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); @@ -90,14 +87,11 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni BeanUtils.copyProperties(c,dto); subAllGridList.add(dto); }); - IndexInputVO index1VO = new IndexInputVO(indexGroup.getIndexId(), index1SampleValues,indexGroup.getThreshold(), indexGroup.getWeight(), sc1); - List indexInputVOS = Arrays.asList(index1VO); - BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); - result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { + HashMap result = this.getCalResult(maxAndMinBigDecimal, index1SampleValues, indexGroup); + result.forEach((key,value) -> { subAllGridList.forEach(grid -> { - if (grid.getAgencyId().equals(agency.getSampleId())){ - grid.setScore(agency.getSampleScore()); + if (grid.getAgencyId().equals(key)){ + grid.setScore(value); } }); }); @@ -122,11 +116,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni Integer indexStart = NumConstant.ZERO; Integer indexEnd = NumConstant.TEN; List collect; - MaxAndMinIntegerResultDTO maxAndMinInteger = this.getMaxAndMinInteger(publishArticleCounts.stream().map(CommunityPublishArticleCountResultDTO::getPublishArticleCount).collect(Collectors.toList())); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(publishArticleCounts.stream().map(o -> new BigDecimal(o.getPublishArticleCount())).collect(Collectors.toList())); do { collect = publishArticleCounts.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); - ScoreCalculator sc1 = new IntegerScoreCalculator(maxAndMinInteger.getMin(), maxAndMinInteger.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); - List> ll = new ArrayList<>(); + List ll = new ArrayList<>(); collect.forEach(c -> { SampleValue s = new SampleValue(c.getAgencyId(), c.getPublishArticleCount()); ll.add(s); @@ -134,15 +127,12 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni BeanUtils.copyProperties(c,publishArticle); communityPublishArticle.add(publishArticle); }); - IndexInputVO index1VO = new IndexInputVO<>(indexGroup.getIndexId(), ll,indexGroup.getThreshold(), indexGroup.getWeight(), sc1); - List indexInputVOS = Arrays.asList(index1VO); - BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); - result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { + HashMap result = this.getCalResult(maxAndMinBigDecimal, ll, indexGroup); + result.forEach((key,value) -> { communityPublishArticle.forEach(publish -> { - if (publish.getAgencyId().equals(agency.getSampleId())){ + if (publish.getAgencyId().equals(key)){ publish.setIndexCode(indexGroup.getIndexCode()); - publish.setScore(agency.getSampleScore()); + publish.setScore(value); } }); }); @@ -163,6 +153,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); } + public HashMap getCalResult(MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal,List ll, IndexGroupDetailEntity indexGroup){ + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + IndexInputVO index1VO = new IndexInputVO(indexGroup.getIndexId(), ll,indexGroup.getThreshold(), indexGroup.getWeight(), sc); + List indexInputVOS = Arrays.asList(index1VO); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + } + /** * @Description 社区治理能力 * @param customerId @@ -173,16 +171,11 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni @Transactional(rollbackFor = Exception.class) @Override public void communityGovernAbilityCalculate(String customerId, String monthId) { - customerId = "b09527201c4409e19d1dbc5e3c3429a1"; - List subAllGridList = new ArrayList<>(); - List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); - - String finalCustomerId = customerId; detailListByParentCode.forEach(detail -> { if (detail.getIndexCode().equals(IndexCalConstant.COMMUNITY_GOVERN_AVG)){ - List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(finalCustomerId, monthId); + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); if (subGridGovernAvg.size() == NumConstant.ONE){ // TODO @@ -194,7 +187,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List collect; do { collect = subGridGovernAvg.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); - BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); collect.forEach(c -> { SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); @@ -203,11 +195,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni BeanUtils.copyProperties(c,dto); subAllGridList.add(dto); }); - IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold() ,detail.getWeight(), sc1); - List indexInputVOS = Arrays.asList(index1VO); - BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - scoreCountOfSampleId.forEach((key,value) -> { + HashMap result = this.getCalResult(maxAndMinBigDecimal, index1SampleValues, detail); + result.forEach((key,value) -> { subAllGridList.forEach(grid -> { if (grid.getAgencyId().equals(key)){ grid.setScore(value); @@ -218,12 +207,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }while (collect.size() == NumConstant.TEN); } } - else { - - } }); - List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(finalCustomerId, monthId); + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId); if (communityGovernAbility.size() == NumConstant.ONE){ // TODO @@ -250,21 +236,20 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); indexInputVOS.add(index1VO); } while (collect.size() == NumConstant.TEN); - BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - scoreCountOfSampleId.forEach((key,value) -> { - subAllGridList.forEach(grid -> { - if (key.equals(grid.getAgencyId())) { - grid.setCustomerId(finalCustomerId); - grid.setIndexCode(IndexCalConstant.COMMUNITY_GOVERN); - grid.setScore(grid.getScore().add(value)); - } - }); - }); } } }); - + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + scoreCountOfSampleId.forEach((key,value) -> { + subAllGridList.forEach(grid -> { + if (key.equals(grid.getAgencyId())) { + grid.setCustomerId(customerId); + grid.setIndexCode(IndexCalConstant.COMMUNITY_GOVERN); + grid.setScore(grid.getScore().add(value)); + } + }); + }); } factIndexCommunityScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.COMMUNITY_GOVERN); factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); @@ -289,82 +274,75 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); detailListByParentCode.forEach(detail -> { - switch (detail.getIndexCode()){ - case IndexCalConstant.COMMUNITY_SERVICE_AVG: - List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); - if (subGridServiceAvg.size() == NumConstant.ONE){ + String indexCode = detail.getIndexCode(); + if (indexCode.equals(IndexCalConstant.COMMUNITY_SERVICE_AVG)){ + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE){ - // TODO 只有一条记录时 + // TODO 只有一条记录时 - }else if (subGridServiceAvg.size() > NumConstant.ONE ){ - MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); - Integer indexStart = NumConstant.ZERO; - Integer indexEnd = NumConstant.TEN; - List collect; - do { - collect = subGridServiceAvg.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); - BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); - List index1SampleValues = new ArrayList<>(); - collect.forEach(c -> { - SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); - index1SampleValues.add(s); - FactIndexCommunityScoreDTO dto = new FactIndexCommunityScoreDTO(); - BeanUtils.copyProperties(c,dto); - subAllGridList.add(dto); - }); - IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues,detail.getThreshold(), detail.getWeight(), sc1); - List indexInputVOS = Arrays.asList(index1VO); - BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); - result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { - subAllGridList.forEach(grid -> { - if (grid.getAgencyId().equals(agency.getSampleId())){ - grid.setScore(agency.getSampleScore()); - } - }); + }else if (subGridServiceAvg.size() > NumConstant.ONE ){ + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexStart = NumConstant.ZERO; + Integer indexEnd = NumConstant.TEN; + List collect; + do { + collect = subGridServiceAvg.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + collect.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + FactIndexCommunityScoreDTO dto = new FactIndexCommunityScoreDTO(); + BeanUtils.copyProperties(c,dto); + subAllGridList.add(dto); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues,detail.getThreshold(), detail.getWeight(), sc1); + List indexInputVOS = Arrays.asList(index1VO); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { + subAllGridList.forEach(grid -> { + if (grid.getAgencyId().equals(agency.getSampleId())){ + grid.setScore(agency.getSampleScore()); + } }); - indexStart++; - }while (collect.size() == NumConstant.TEN); - } - break; - case "shequhuodongzzcs": - List communityActivityCount = factIndexServiceAblityOrgMonthlyDao.selectActivityCount(customerId, monthId); - if (communityActivityCount.size() == NumConstant.ONE){ + }); + indexStart++; + }while (collect.size() == NumConstant.TEN); + } + }else{ + List communityActivityCount = factIndexServiceAblityOrgMonthlyDao.selectActivityCount(customerId, monthId); + if (communityActivityCount.size() == NumConstant.ONE){ - // TODO + // TODO - }else if (communityActivityCount.size() > NumConstant.ONE){ - Integer indexStart = NumConstant.ZERO; - Integer indexEnd = NumConstant.TEN; - List collect; - MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(communityActivityCount.stream().map(o -> new BigDecimal(o.getActivityCount())).collect(Collectors.toList())); - do { - collect = communityActivityCount.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); - ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); - List> ll = new ArrayList<>(); - collect.forEach(c -> { - SampleValue s = new SampleValue(c.getAgencyId(), c.getActivityCount()); - ll.add(s); - FactIndexCommunityScoreDTO publishArticle = new FactIndexCommunityScoreDTO(); - BeanUtils.copyProperties(c,publishArticle); - communityPublishArticle.add(publishArticle); - }); - IndexInputVO index1VO = new IndexInputVO<>(detail.getIndexId(), ll, detail.getThreshold(),detail.getWeight(), sc1); - List indexInputVOS = Arrays.asList(index1VO); - BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - List result = batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); - result.get(NumConstant.ZERO).getIndexScoreVOs().forEach(agency -> { - communityPublishArticle.forEach(publish -> { - if (publish.getAgencyId().equals(agency.getSampleId())){ - publish.setScore(agency.getSampleScore()); - } - }); + }else if (communityActivityCount.size() > NumConstant.ONE){ + Integer indexStart = NumConstant.ZERO; + Integer indexEnd = NumConstant.TEN; + List collect; + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(communityActivityCount.stream().map(o -> new BigDecimal(o.getActivityCount())).collect(Collectors.toList())); + do { + collect = communityActivityCount.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); + List ll = new ArrayList<>(); + collect.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getActivityCount()); + ll.add(s); + FactIndexCommunityScoreDTO publishArticle = new FactIndexCommunityScoreDTO(); + BeanUtils.copyProperties(c,publishArticle); + communityPublishArticle.add(publishArticle); + }); + HashMap result = this.getCalResult(maxAndMinBigDecimal, ll, detail); + result.forEach((k,v) -> { + communityPublishArticle.forEach(publish -> { + if (publish.getAgencyId().equals(k)){ + publish.setScore(v); + } }); - indexStart++; - } while (collect.size() == NumConstant.TEN); - } - break; - default: + }); + indexStart++; + } while (collect.size() == NumConstant.TEN); + } } }); subAllGridList.forEach(grid -> { @@ -388,15 +366,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @author zxc * @date 2020/9/1 9:21 上午 */ - @Override public void communityRelate(String customerId, String monthId) { - - this.communityPartyCalculate(customerId, monthId); //党建能力 - this.communityGovernAbilityCalculate(customerId, monthId); // 治理能力 - this.communityServiceAbilityCalculate(customerId, monthId); // 服务能力 - - List communityPublishArticle = new ArrayList<>(); - List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); List factIndexCommunityScoreEntities = factIndexCommunityScoreDao.selectCommunityInfo(customerId, monthId); detailListByParentCode.forEach(detail -> { @@ -406,7 +376,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } }); }); - Map> collect = factIndexCommunityScoreEntities.stream().collect(Collectors.groupingBy(FactIndexCommunityScoreDTO::getAgencyId)); List result = new ArrayList<>(); collect.forEach((key,value) -> { @@ -417,7 +386,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni score.setMonthId(monthId); score.setYearId(DateUtils.getYearId(monthId)); score.setQuarterId(DateUtils.getQuarterId(monthId)); - factIndexCommunityScoreEntities.forEach(community -> { + score.setIndexCode(IndexCalConstant.COMMUNITY_RELATE); + value.forEach(community -> { score.setScore(score.getScore().add(community.getScore())); }); result.add(score); @@ -426,22 +396,20 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni factIndexCommunityScoreDao.insertCommunityPartyRecord(result); } + public void calAll(String customerId,String monthId){ + this.communityPartyCalculate(customerId, monthId); //党建能力 + this.communityGovernAbilityCalculate(customerId, monthId); // 治理能力 + this.communityServiceAbilityCalculate(customerId, monthId); // 服务能力 + + communityRelate(customerId, monthId); + } + /** - * @Description Integer类型获取最大数和最小数 + * @Description BigDecimal类型获取最大数和最小数 * @param list * @author zxc * @date 2020/8/27 1:30 下午 */ - public MaxAndMinIntegerResultDTO getMaxAndMinInteger(List list){ - Integer max = Collections.max(list); - Integer min = Collections.min(list); - MaxAndMinIntegerResultDTO result = new MaxAndMinIntegerResultDTO(); - result.setMax(max); - result.setMin(min); - return result; - } - - public MaxAndMinBigDecimalResultDTO getMaxAndMinBigDecimal(List list){ BigDecimal max = Collections.max(list); BigDecimal min = Collections.min(list); @@ -450,21 +418,4 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni result.setMin(min); return result; } - - /** - * @Description Double类型获取最大数和最小数 - * @param list - * @author zxc - * @date 2020/8/27 1:32 下午 - */ - public MaxAndMinDoubleResultDTO getMaxAndMinDouble(List list){ - Double max = Collections.max(list); - Double min = Collections.min(list); - MaxAndMinDoubleResultDTO result = new MaxAndMinDoubleResultDTO(); - result.setMax(max); - result.setMin(min); - return result; - } - - } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java index 1eecc8cf36..43688efa21 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java @@ -7,7 +7,7 @@ import java.math.BigDecimal; */ public class ScoreConstants { - public static final BigDecimal MIN_SCORE = new BigDecimal(0); + public static final BigDecimal MIN_SCORE = new BigDecimal(1); public static final BigDecimal MAX_SCORE = new BigDecimal(100); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml index d223423e17..8315280f89 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -89,4 +89,23 @@ AND customer_id = #{customerId} AND month_id = #{monthId} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml index 91bebf545b..68b9d5344b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/FactIndexCommunityScoreDao.xml @@ -57,6 +57,7 @@ del_flag = 0 AND CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + AND INDEX_CODE != "shequxiangguan" \ No newline at end of file From c3385bee816fd9dfe861d1333ca5ee7cb284d467 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 1 Sep 2020 16:15:38 +0800 Subject: [PATCH 254/360] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/DemoController.java | 6 ------ .../screen/IndexCalculateCommunityService.java | 7 +++++++ .../impl/IndexCalculateCommunityServiceImpl.java | 16 ++++++++-------- .../support/normalizing/ScoreConstants.java | 2 +- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index f8274a7f10..bccb9ad479 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -136,12 +136,6 @@ public class DemoController { return new Result(); } - @PostMapping("zxcAll") - public Result getZxcAll(){ - indexCalculateCommunityService.communityRelate("b09527201c4409e19d1dbc5e3c3429a1","202008"); - return new Result(); - } - @PostMapping("testcalculategridcorrelation") public Result testcalculateGridCorreLation(){ CalculateCommonFormDTO formDTO=new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java index dee16a06f7..5a6f1bbaa9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java @@ -38,5 +38,12 @@ public interface IndexCalculateCommunityService { */ void communityServiceAbilityCalculate(String customerId, String monthId); + /** + * @Description 计算社区相关 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 4:12 下午 + */ void calAll(String customerId, String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java index cdd6470ccf..4ff69ef236 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java @@ -153,14 +153,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); } - public HashMap getCalResult(MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal,List ll, IndexGroupDetailEntity indexGroup){ - BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); - IndexInputVO index1VO = new IndexInputVO(indexGroup.getIndexId(), ll,indexGroup.getThreshold(), indexGroup.getWeight(), sc); - List indexInputVOS = Arrays.asList(index1VO); - BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); - return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - } - /** * @Description 社区治理能力 * @param customerId @@ -418,4 +410,12 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni result.setMin(min); return result; } + + public HashMap getCalResult(MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal,List ll, IndexGroupDetailEntity indexGroup){ + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + IndexInputVO index1VO = new IndexInputVO(indexGroup.getIndexId(), ll,indexGroup.getThreshold(), indexGroup.getWeight(), sc); + List indexInputVOS = Arrays.asList(index1VO); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java index 43688efa21..1eecc8cf36 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java @@ -7,7 +7,7 @@ import java.math.BigDecimal; */ public class ScoreConstants { - public static final BigDecimal MIN_SCORE = new BigDecimal(1); + public static final BigDecimal MIN_SCORE = new BigDecimal(0); public static final BigDecimal MAX_SCORE = new BigDecimal(100); } From a4a50b60a5979dc5754c463a25dfe95a57a5d1c7 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 1 Sep 2020 16:23:48 +0800 Subject: [PATCH 255/360] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/redis/IndexCodeFieldReRedis.java | 8 ++ .../impl/CpcIndexCalculateServiceImpl.java | 12 +-- .../impl/IndexCalculateServiceImpl.java | 85 ++++++++++++------- .../BigDecimalScoreCalculator.java | 6 ++ 4 files changed, 74 insertions(+), 37 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java index 2863952420..8a99d62890 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java @@ -51,4 +51,12 @@ public class IndexCodeFieldReRedis { hashOperations.putAll(RedisKeys.getIndexCodeFieldReKey(), records); redisTemplate.expire(RedisKeys.getIndexCodeFieldReKey(), 1, TimeUnit.DAYS); } + + /** + * desc:删除指标字段关系缓存 + * @return + */ + public Boolean deleteIndexCodeFromRedis() { + return redisTemplate.delete(RedisKeys.getIndexCodeFieldReKey()); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index b7370217ed..dabeade3f1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.indexcal.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; @@ -104,17 +105,18 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); if (CollectionUtils.isEmpty(indexCodeFieldReList)) { log.error("cpcIndexCalculate have any indexcodefieldre"); - return; + throw new RenException("指标code与字段关系记录不存在"); } //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); - return; + throw new RenException("指标原始数据记录不存在"); } //指标集合 Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); if (groupIndexDetailsMap == null) { + log.error("calculatePartScore"); return; } @@ -152,7 +154,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { IndexInputVO value = entry.getValue(); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); + log.error("calculateScore indexCode:{} get fieldName return blank", indexCode); continue; } @@ -179,9 +181,9 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { value.getIndexValueVOs().add(currentUserIndexValue); } } - log.warn("计算的参数:{}", indexMap); + log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.warn("计算的结果:{}", result); + log.info("计算的结果:{}", result); //处理结果 saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); 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 index 611ad18f4e..12bbbbad27 100644 --- 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 @@ -1,14 +1,15 @@ package com.epmet.service.screen.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.screen.IndexGroupDao; -import com.epmet.dao.screen.IndexGroupDetailDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.redis.IndexCodeFieldReRedis; +import com.epmet.service.indexcal.CpcIndexCalculateService; import com.epmet.service.indexcal.GridCorreLationService; +import com.epmet.service.screen.IndexCalculateCommunityService; import com.epmet.service.screen.IndexCalculateService; import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; @@ -29,45 +30,65 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { @Autowired private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; @Autowired - private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; - @Autowired private GridCorreLationService gridCorreLationService; @Autowired - private IndexGroupDao indexGroupDao; + private CpcIndexCalculateService cpcIndexCalculateService; + @Autowired + private IndexCodeFieldReRedis indexCodeFieldReRedis; @Autowired - private IndexGroupDetailDao indexGroupDetailDao; + private IndexCalculateCommunityService indexCalculateCommunityService; @Override public Boolean indexCalculate(IndexCalculateForm formDTO) { - if (StringUtils.isBlank(formDTO.getMonthId())) { - //默认 当前月份-1 - formDTO.setMonthId(DimIdGenerator.getMonthDimId(DateUtils.addDateMonths(new Date(), -1))); - } - //按照客户分组 - if (CollectionUtils.isEmpty(formDTO.getCustomerIds())) { - Result> externalCustomerIdsResult = epmetCommonServiceOpenFeignClient.getExternalCustomerIds(); - if (!externalCustomerIdsResult.success()) { - log.error("cpcIndexCalculate epmetCommonServiceOpenFeignClient.getExternalCustomerIds return fail"); - return false; + try { + if (StringUtils.isBlank(formDTO.getMonthId())) { + //默认 当前月份-1 + formDTO.setMonthId(DimIdGenerator.getMonthDimId(DateUtils.addDateMonths(new Date(), -1))); } - formDTO.setCustomerIds(externalCustomerIdsResult.getData()); - } - formDTO.getCustomerIds().forEach(customerId -> { - CalculateCommonFormDTO calculateCommonFormDTO=new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); - //计算党员 - try { - //Map list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(customerId, formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); - } catch (Exception e) { - + //按照客户分组 + if (CollectionUtils.isEmpty(formDTO.getCustomerIds())) { + Result> externalCustomerIdsResult = epmetCommonServiceOpenFeignClient.getExternalCustomerIds(); + if (!externalCustomerIdsResult.success()) { + log.error("indexCalculate epmetCommonServiceOpenFeignClient.getExternalCustomerIds return fail"); + return false; + } + formDTO.setCustomerIds(externalCustomerIdsResult.getData()); } + formDTO.getCustomerIds().forEach(customerId -> { + CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); + //计算党员相关的 + Boolean flag = false; + try { + CalculateCommonFormDTO param = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); + flag = cpcIndexCalculateService.cpcIndexCalculate(param); + log.info("indexCalculate cpcIndexCalculate return result:{}", flag); + } catch (Exception e) { + log.error("indexCalculate cpcIndexCalculate exception", e); + } - //计算网格 - //TODO - gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO); - //计算社区 - //TODO + //计算网格 + try { + flag = gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO); + log.info("indexCalculate calculateGridCorreLation return result:{}", flag); + } catch (Exception e) { + log.error("indexCalculate calculateGridCorreLation exception", e); + } + //计算社区 + try { + indexCalculateCommunityService.calAll(customerId, formDTO.getMonthId()); + log.info("indexCalculate calAll return result:{}", flag); + } catch (Exception e) { + log.error("indexCalculate calAll exception", e); + } - }); + }); + indexCodeFieldReRedis.deleteIndexCodeFromRedis(); + } catch (Exception e) { + log.error("indexCalculate exception,param:{}", JSON.toJSONString(formDTO)); + } finally { + //清除缓存 + indexCodeFieldReRedis.deleteIndexCodeFromRedis(); + } return true; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java index fe0412ba3f..b86c347d24 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/BigDecimalScoreCalculator.java @@ -66,12 +66,18 @@ public class BigDecimalScoreCalculator extends ScoreCalculator { @Override public BigDecimal getMaxFromSourceArray() { + if (this.sourceArrary == null){ + return null; + } BigDecimal[] intSourceArrary = (BigDecimal[]) this.sourceArrary; return intSourceArrary[intSourceArrary.length - 1]; } @Override public BigDecimal getMinFromSourceArray() { + if (this.sourceArrary == null){ + return null; + } BigDecimal[] intSourceArrary = (BigDecimal[]) this.sourceArrary; return intSourceArrary[0]; } From 3edb4d72b7a321bdae5dc605983ab1ef4a74687b Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 1 Sep 2020 16:26:24 +0800 Subject: [PATCH 256/360] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/screen/impl/IndexCalculateServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 index 12bbbbad27..7283af07c3 100644 --- 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 @@ -80,15 +80,15 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { } catch (Exception e) { log.error("indexCalculate calAll exception", e); } - }); indexCodeFieldReRedis.deleteIndexCodeFromRedis(); + return true; } catch (Exception e) { log.error("indexCalculate exception,param:{}", JSON.toJSONString(formDTO)); } finally { //清除缓存 indexCodeFieldReRedis.deleteIndexCodeFromRedis(); } - return true; + return false; } } From 9059e8f518a3d8441d23b7f0faa02b3f2036fd8b Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 1 Sep 2020 16:27:25 +0800 Subject: [PATCH 257/360] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/IndexCalConstant.java | 19 ++ .../com/epmet/controller/DemoController.java | 318 +++++++++++++++++- .../impl/GridCorreLationServiceImpl.java | 59 +++- .../support/normalizing/ScoreConstants.java | 2 +- 4 files changed, 382 insertions(+), 16 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 12b5c2a136..e89cc969b3 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -34,4 +34,23 @@ public interface IndexCalConstant { String COMMUNITY_PARTY_AVG = "xiazhusuoyouwgddjnlpjz"; 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"; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 2b88f53f42..cabca06a1a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -1,22 +1,35 @@ package com.epmet.controller; -import com.baomidou.mybatisplus.extension.api.R; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.indexscore.GridScoreDao; +import com.epmet.dao.screen.ScreenCustomerGridDao; import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; +import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +import com.epmet.entity.screen.ScreenCustomerGridEntity; import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.service.StatsDemoService; import com.epmet.service.indexcal.GridCorreLationService; import com.epmet.service.screen.IndexCalculateCommunityService; import com.epmet.service.stats.DimAgencyService; import lombok.extern.slf4j.Slf4j; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; import java.util.concurrent.ExecutionException; @@ -27,7 +40,6 @@ import java.util.concurrent.Future; @RestController @Slf4j public class DemoController { - @Autowired private StatsDemoService demoService; @@ -149,4 +161,306 @@ public class DemoController { return new Result(); } + @Autowired + private GridScoreDao gridScoreDao; + @Autowired + private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao; + @Autowired + private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; + @Autowired + private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; + @Autowired + private ScreenCustomerGridDao screenCustomerGridDao; +// private static Integer testcal=100; + + @PostMapping("testcal") + public Result testCal(){ + CalculateCommonFormDTO formDTO=new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); +// //查询总记录数 +// List gridScoreDTOList=gridScoreDao.selectList(formDTO); +// return new Result>().ok(gridScoreDTOList); + gridCorreLationService.calculateGridCorreLation(formDTO); + return new Result(); + } + + @PostMapping("insertgridinfo") + public Result insertScreenCustomerGrid(){ + ScreenCustomerGridEntity entity1=new ScreenCustomerGridEntity(); + entity1.setCustomerId(IndexCalConstant.customerId); + entity1.setGridId(IndexCalConstant.S1_C1_G1); + entity1.setGridName("网格S1-C1-G1"); + entity1.setParentAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity1.setAllParentIds("S1,C1"); + entity1.setCreatedBy(IndexCalConstant.insertUser); + entity1.setUpdatedBy(IndexCalConstant.insertUser); + entity1.setDataEndTime("20200901"); + screenCustomerGridDao.insert(entity1); + + ScreenCustomerGridEntity entity2=new ScreenCustomerGridEntity(); + entity2.setCustomerId(IndexCalConstant.customerId); + entity2.setGridId(IndexCalConstant.S1_C1_G2); + entity2.setGridName("网格S1-C1-G2"); + entity2.setParentAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity2.setAllParentIds("S1,C1"); + entity2.setCreatedBy(IndexCalConstant.insertUser); + entity2.setUpdatedBy(IndexCalConstant.insertUser); + entity2.setDataEndTime("20200901"); + screenCustomerGridDao.insert(entity2); + + ScreenCustomerGridEntity entity3=new ScreenCustomerGridEntity(); + entity3.setCustomerId(IndexCalConstant.customerId); + entity3.setGridId(IndexCalConstant.S1_C2_G1); + entity3.setGridName("网格S1-C2-G1"); + entity3.setParentAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity3.setAllParentIds("S1,C2"); + entity3.setCreatedBy(IndexCalConstant.insertUser); + entity3.setUpdatedBy(IndexCalConstant.insertUser); + entity3.setDataEndTime("20200901"); + screenCustomerGridDao.insert(entity3); + + return new Result(); + } + @PostMapping("inserttestdata") + public Result test(){ + //网格相关-党建能力 + FactIndexPartyAblityGridMonthlyEntity entity1=this.getPartyAblityGridMonthlyEntity1(); + factIndexPartyAblityGridMonthlyDao.insert(entity1); + FactIndexPartyAblityGridMonthlyEntity entity2=this.getPartyAblityGridMonthlyEntity2(); + factIndexPartyAblityGridMonthlyDao.insert(entity2); + FactIndexPartyAblityGridMonthlyEntity entity3=this.getPartyAblityGridMonthlyEntity3(); + factIndexPartyAblityGridMonthlyDao.insert(entity3); + + //网格相关-治理能力 + FactIndexGovrnAblityGridMonthlyEntity zhiliEntity1=this.getGovrnAblityGridMonthlyEntity1(); + factIndexGovrnAblityGridMonthlyDao.insert(zhiliEntity1); + FactIndexGovrnAblityGridMonthlyEntity zhiliEntity2=this.getGovrnAblityGridMonthlyEntity2(); + factIndexGovrnAblityGridMonthlyDao.insert(zhiliEntity2); + FactIndexGovrnAblityGridMonthlyEntity zhiliEntity3=this.getGovrnAblityGridMonthlyEntity3(); + factIndexGovrnAblityGridMonthlyDao.insert(zhiliEntity3); + + //网格相关-服务能力 + FactIndexServiceAblityGridMonthlyEntity fuwuEntity1=this.getServiceAblityGridMonthlyEntity1(); + factIndexServiceAblityGridMonthlyDao.insert(fuwuEntity1); + FactIndexServiceAblityGridMonthlyEntity fuwuEntity2=this.getServiceAblityGridMonthlyEntity2(); + factIndexServiceAblityGridMonthlyDao.insert(fuwuEntity2); + FactIndexServiceAblityGridMonthlyEntity fuwuEntity3=this.getServiceAblityGridMonthlyEntity3(); + factIndexServiceAblityGridMonthlyDao.insert(fuwuEntity3); + + return new Result(); + } + + //网格相关-党建能力-网格1 + private FactIndexPartyAblityGridMonthlyEntity getPartyAblityGridMonthlyEntity1() { + FactIndexPartyAblityGridMonthlyEntity entity1=new FactIndexPartyAblityGridMonthlyEntity(); + entity1.setCustomerId(IndexCalConstant.customerId); + entity1.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity1.setGridId(IndexCalConstant.S1_C1_G1); + entity1.setMonthId(IndexCalConstant.monthId); + entity1.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity1.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity1.setUserCount(10); // 网格群众用户数 + entity1.setPartyCount(50); // 网格党员用户数 + entity1.setActiveUserCount(100); // 网格活跃群众用户数 + entity1.setActivePartyCount(80); //网格活跃党员用户数 + entity1.setPartyAvgTopicCount(30); //网格党员人均提出话题数 + entity1.setUserAvgTopicCount(10); //网格群众人均提出话题数 + entity1.setPartyAvgShiftProjectCount(50); //网格党员人均提出的议题转项目数 + entity1.setUserAvgShiftProjectCount(50); //网格群众人均提出的议题转项目数 + entity1.setCreateGroupPartyCount(35); //建群党员数(累计值) 去重 + entity1.setPublishArticleCount(35); //网格发文数 + entity1.setIssueToProjectRatio(new BigDecimal("50")); //网格议题转项目率 + entity1.setCreateThreeMeetsCount(10); //组织三会一课次数 + entity1.setJoinThreeMeetsCount(30); //党员参加三会一课人次 + + entity1.setCreatedBy(IndexCalConstant.insertUser); + entity1.setUpdatedBy(IndexCalConstant.insertUser); + return entity1; + } + + //网格相关-党建能力-网格2 + private FactIndexPartyAblityGridMonthlyEntity getPartyAblityGridMonthlyEntity2() { + FactIndexPartyAblityGridMonthlyEntity entity2=new FactIndexPartyAblityGridMonthlyEntity(); + entity2.setCustomerId(IndexCalConstant.customerId); + entity2.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity2.setGridId(IndexCalConstant.S1_C1_G2); + entity2.setMonthId(IndexCalConstant.monthId); + entity2.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity2.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity2.setUserCount(20); // 网格群众用户数 + entity2.setPartyCount(30); // 网格党员用户数 + entity2.setActiveUserCount(20); // 网格活跃群众用户数 + entity2.setActivePartyCount(20); //网格活跃党员用户数 + entity2.setPartyAvgTopicCount(10); //网格党员人均提出话题数 + entity2.setUserAvgTopicCount(50); //网格群众人均提出话题数 + entity2.setPartyAvgShiftProjectCount(35); //网格党员人均提出的议题转项目数 + entity2.setUserAvgShiftProjectCount(55); //网格群众人均提出的议题转项目数 + entity2.setCreateGroupPartyCount(30); //建群党员数(累计值) 去重 + entity2.setPublishArticleCount(30); //网格发文数 + entity2.setIssueToProjectRatio(new BigDecimal("30")); //网格议题转项目率 + entity2.setCreateThreeMeetsCount(25); //组织三会一课次数 + entity2.setJoinThreeMeetsCount(20); //党员参加三会一课人次 + + entity2.setCreatedBy(IndexCalConstant.insertUser); + entity2.setUpdatedBy(IndexCalConstant.insertUser); + return entity2; + } + //网格相关-党建能力-网格3 + private FactIndexPartyAblityGridMonthlyEntity getPartyAblityGridMonthlyEntity3() { + FactIndexPartyAblityGridMonthlyEntity entity3=new FactIndexPartyAblityGridMonthlyEntity(); + entity3.setCustomerId(IndexCalConstant.customerId); + entity3.setAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity3.setGridId(IndexCalConstant.S1_C2_G1); + entity3.setMonthId(IndexCalConstant.monthId); + entity3.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity3.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity3.setUserCount(60); // 网格群众用户数 + entity3.setPartyCount(80); // 网格党员用户数 + entity3.setActiveUserCount(70); // 网格活跃群众用户数 + entity3.setActivePartyCount(70); //网格活跃党员用户数 + entity3.setPartyAvgTopicCount(40); //网格党员人均提出话题数 + entity3.setUserAvgTopicCount(20); //网格群众人均提出话题数 + entity3.setPartyAvgShiftProjectCount(30); //网格党员人均提出的议题转项目数 + entity3.setUserAvgShiftProjectCount(30); //网格群众人均提出的议题转项目数 + entity3.setCreateGroupPartyCount(20); //建群党员数(累计值) 去重 + entity3.setPublishArticleCount(80); //网格发文数 + entity3.setIssueToProjectRatio(new BigDecimal("80")); //网格议题转项目率 + entity3.setCreateThreeMeetsCount(100); //组织三会一课次数 + entity3.setJoinThreeMeetsCount(100); //党员参加三会一课人次 + + entity3.setCreatedBy(IndexCalConstant.insertUser); + entity3.setUpdatedBy(IndexCalConstant.insertUser); + return entity3; + } + //网格相关-治理能力-网格1 + private FactIndexGovrnAblityGridMonthlyEntity getGovrnAblityGridMonthlyEntity1() { + FactIndexGovrnAblityGridMonthlyEntity entity=new FactIndexGovrnAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setIssueTotal(100); //网格总议题数 + entity.setAvgIssueCount(100); //网格人均议题数目 + entity.setAvgShiftProjectRatio(new BigDecimal("20")); //网格议题转项目率 + entity.setProjectTotal(20);// 网格总项目数 + entity.setSelfSolveProjectCount(10); // 网格自治项目数 统计期网格自身内办结的项目数目 + entity.setResolveProjectCount(100);//网格办结项目数 统计期内办结的项目数目 + entity.setTransferRightRatio(new BigDecimal("100"));//网格吹哨部门准确率 + entity.setSatisfactionRatio(new BigDecimal("100"));//网格内解决的项目的满意度 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } + + //网格相关-治理能力-网格2 + private FactIndexGovrnAblityGridMonthlyEntity getGovrnAblityGridMonthlyEntity2() { + FactIndexGovrnAblityGridMonthlyEntity entity=new FactIndexGovrnAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G2); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setIssueTotal(70); //网格总议题数 + entity.setAvgIssueCount(10); //网格人均议题数目 + entity.setAvgShiftProjectRatio(new BigDecimal("20")); //网格议题转项目率 + entity.setProjectTotal(40);// 网格总项目数 + entity.setSelfSolveProjectCount(15); // 网格自治项目数 统计期网格自身内办结的项目数目 + entity.setResolveProjectCount(20);//网格办结项目数 统计期内办结的项目数目 + entity.setTransferRightRatio(new BigDecimal("10"));//网格吹哨部门准确率 + entity.setSatisfactionRatio(new BigDecimal("70"));//网格内解决的项目的满意度 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + + return entity; + } + //网格相关-治理能力-网格3 + private FactIndexGovrnAblityGridMonthlyEntity getGovrnAblityGridMonthlyEntity3() { + FactIndexGovrnAblityGridMonthlyEntity entity=new FactIndexGovrnAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity.setGridId(IndexCalConstant.S1_C2_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setIssueTotal(80); //网格总议题数 + entity.setAvgIssueCount(70); //网格人均议题数目 + entity.setAvgShiftProjectRatio(new BigDecimal("100")); //网格议题转项目率 + entity.setProjectTotal(100);// 网格总项目数 + entity.setSelfSolveProjectCount(20); // 网格自治项目数 统计期网格自身内办结的项目数目 + entity.setResolveProjectCount(20);//网格办结项目数 统计期内办结的项目数目 + entity.setTransferRightRatio(new BigDecimal("70"));//网格吹哨部门准确率 + entity.setSatisfactionRatio(new BigDecimal("10"));//网格内解决的项目的满意度 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + + return entity; + } + + //网格相关-服务能力-网格1 + private FactIndexServiceAblityGridMonthlyEntity getServiceAblityGridMonthlyEntity1() { + FactIndexServiceAblityGridMonthlyEntity entity=new FactIndexServiceAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setActivityCount(80);//网格活动组织次数 爱心活动 + entity.setVolunteerRatio(new BigDecimal("70"));//网格志愿者占比 + entity.setPartyVolunteerRatio(new BigDecimal("60"));// 网格党员志愿者率 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } + + //网格相关-服务能力-网格2 + private FactIndexServiceAblityGridMonthlyEntity getServiceAblityGridMonthlyEntity2() { + FactIndexServiceAblityGridMonthlyEntity entity=new FactIndexServiceAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G2); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setActivityCount(40);//网格活动组织次数 爱心活动 + entity.setVolunteerRatio(new BigDecimal("30"));//网格志愿者占比 + entity.setPartyVolunteerRatio(new BigDecimal("80"));// 网格党员志愿者率 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } + + //网格相关-服务能力-网格3 + private FactIndexServiceAblityGridMonthlyEntity getServiceAblityGridMonthlyEntity3() { + FactIndexServiceAblityGridMonthlyEntity entity=new FactIndexServiceAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity.setGridId(IndexCalConstant.S1_C2_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setActivityCount(20);//网格活动组织次数 爱心活动 + entity.setVolunteerRatio(new BigDecimal("80"));//网格志愿者占比 + entity.setPartyVolunteerRatio(new BigDecimal("20"));// 网格党员志愿者率 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 9bb3560246..9169fbfc16 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.indexcal.impl; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; @@ -83,8 +84,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } + logger.info("=================================计算网格相关-党建能力 start==================================================================================="); calculateGridDangJian(formDTO, dangJianNengLiList); - + logger.info("=================================计算网格相关-党建能力 end==================================================================================="); //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), @@ -93,8 +95,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } + logger.info("=================================计算网格相关-治理能力 start==================================================================================="); calculateGridZhiLi(formDTO, zhiLiNengLiList); - + logger.info("=================================计算网格相关-治理能力 end==================================================================================="); //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), @@ -103,8 +106,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } + logger.info("=================================计算网格相关-服务能力 start==================================================================================="); calculateGridFuWu(formDTO, fuWuNengLiList); - + logger.info("=================================计算网格相关-服务能力 end==================================================================================="); //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -172,7 +176,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - logger.info("===================="+sampleValueStr); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); @@ -195,7 +198,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private Map getContactMassesAblityMap(CalculateCommonFormDTO calculateCommonFormDTO) { Map map = new HashMap<>(); - List list = cpcScoreDao.selectListGridContactMassesAvgValue(calculateCommonFormDTO); + //TODO + /*List list = cpcScoreDao.selectListGridContactMassesAvgValue(calculateCommonFormDTO); if (!CollectionUtils.isEmpty(list)) { BigDecimal minValue = Collections.min(list); BigDecimal maxValue = Collections.max(list); @@ -204,7 +208,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { return map; } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); - map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR));*/ + map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13")); return map; } @@ -217,9 +223,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @Date 2020/8/31 9:50 **/ private BigDecimal getGridContactMassesAvgValue(CalculateCommonFormDTO calculateCommonFormDTO, String gridId) { - BigDecimal result = cpcScoreDao.selectGridContactMassesAvgValue(calculateCommonFormDTO.getCustomerId(), calculateCommonFormDTO.getMonthId(), gridId); + //TODO + /*BigDecimal result = cpcScoreDao.selectGridContactMassesAvgValue(calculateCommonFormDTO.getCustomerId(), calculateCommonFormDTO.getMonthId(), gridId); if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); + }*/ + BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); } return result; } @@ -233,9 +248,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @Date 2020/8/31 15:51 **/ private BigDecimal getGridJoinIssueAvgValue(CalculateCommonFormDTO formDTO, String gridId) { - BigDecimal result = cpcScoreDao.selectGridJoinIssueAvgValue(formDTO.getCustomerId(), formDTO.getMonthId(), gridId); + // TODO + /*BigDecimal result = cpcScoreDao.selectGridJoinIssueAvgValue(formDTO.getCustomerId(), formDTO.getMonthId(), gridId); if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); + }*/ + BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); } return result; } @@ -249,7 +273,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private Map getJoinIssueAblityMap(CalculateCommonFormDTO calculateCommonFormDTO) { Map map = new HashMap<>(); - List list = cpcScoreDao.selectListJoinIssueAvgValue(calculateCommonFormDTO); + //TODO + /* List list = cpcScoreDao.selectListJoinIssueAvgValue(calculateCommonFormDTO); if (!CollectionUtils.isEmpty(list)) { BigDecimal minValue = Collections.min(list); BigDecimal maxValue = Collections.max(list); @@ -258,7 +283,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { return map; } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); - map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR));*/ + map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4")); return map; } @@ -319,10 +346,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); +// logger.info("计算的参数:{}", indexInputVOS); + logger.info("..........计算的参数(List)"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + logger.info("..........计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + logger.info("计算的结果(HashMap):{}", resultMap); return resultMap; } @@ -399,7 +431,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { // indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, - index.getThreshold(), +// index.getThreshold(), TODO + new BigDecimal("-1"), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java index 1eecc8cf36..43688efa21 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/ScoreConstants.java @@ -7,7 +7,7 @@ import java.math.BigDecimal; */ public class ScoreConstants { - public static final BigDecimal MIN_SCORE = new BigDecimal(0); + public static final BigDecimal MIN_SCORE = new BigDecimal(1); public static final BigDecimal MAX_SCORE = new BigDecimal(100); } From ff3eaf8b0c8ce945ddf5f5e5dde433de9e073412 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 1 Sep 2020 16:34:30 +0800 Subject: [PATCH 258/360] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndexCalculateCommunityService.java | 31 +------ .../IndexCalculateCommunityServiceImpl.java | 93 +++++++++++-------- 2 files changed, 56 insertions(+), 68 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java index 5a6f1bbaa9..b0803ae2be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateCommunityService.java @@ -12,38 +12,11 @@ import java.util.List; public interface IndexCalculateCommunityService { /** - * @Description 社区党建能力 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/8/26 10:46 上午 - */ - void communityPartyCalculate(String customerId, String monthId); - - /** - * @Description 社区治理能力 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/8/26 1:40 下午 - */ - void communityGovernAbilityCalculate(String customerId, String monthId); - - /** - * @Description 社区服务能力 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/8/31 1:38 下午 - */ - void communityServiceAbilityCalculate(String customerId, String monthId); - - /** - * @Description 计算社区相关 + * @Description 计算社区相关总分 * @param customerId * @param monthId * @author zxc * @date 2020/9/1 4:12 下午 */ - void calAll(String customerId, String monthId); + Boolean calCommunityAll(String customerId, String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java index 4ff69ef236..bb7962faf6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java @@ -2,6 +2,7 @@ package com.epmet.service.screen.impl; import com.alibaba.druid.util.StringUtils; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; @@ -60,8 +61,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @date 2020/8/26 10:46 上午 */ @Transactional(rollbackFor = Exception.class) - @Override - public void communityPartyCalculate(String customerId, String monthId) { + public Boolean communityPartyCalculate(String customerId, String monthId) { // 党建能力 // 根据all_parent_index_code 获取指标明细 @@ -100,18 +100,12 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } } }); - + // 社区名义发文数量 List publishArticleCounts = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCount(customerId, monthId); detailListByParentCode.forEach(indexGroup -> { if (indexGroup.getIndexCode().equals("shequmingyifwsl")) { if (publishArticleCounts.size() == NumConstant.ONE) { - //TODO 计算之后的分数 - FactIndexCommunityScoreDTO dto = new FactIndexCommunityScoreDTO(); - BeanUtils.copyProperties(detailListByParentCode.get(NumConstant.ZERO), dto); - dto.setScore(BigDecimal.valueOf(50.00)); - dto.setIndexCode(detailListByParentCode.get(NumConstant.ZERO).getIndexCode()); - communityPublishArticle.add(dto); - factIndexCommunityScoreDao.insertCommunityPartyRecord(communityPublishArticle); + //TODO 结果为一条时 } else if (publishArticleCounts.size() > NumConstant.ONE) { Integer indexStart = NumConstant.ZERO; Integer indexEnd = NumConstant.TEN; @@ -149,8 +143,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } }); }); - factIndexCommunityScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.COMMUNITY_PARTY); - factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); + deleteAndInsert(customerId,monthId,IndexCalConstant.COMMUNITY_PARTY,subAllGridList); + return true; } /** @@ -161,8 +155,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @date 2020/8/26 1:40 下午 */ @Transactional(rollbackFor = Exception.class) - @Override - public void communityGovernAbilityCalculate(String customerId, String monthId) { + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { List subAllGridList = new ArrayList<>(); List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); detailListByParentCode.forEach(detail -> { @@ -243,9 +236,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }); }); } - factIndexCommunityScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.COMMUNITY_GOVERN); - factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); - + deleteAndInsert(customerId,monthId,IndexCalConstant.COMMUNITY_GOVERN,subAllGridList); + return true; } /** @@ -256,23 +248,16 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @date 2020/8/31 1:38 下午 */ @Transactional(rollbackFor = Exception.class) - @Override - public void communityServiceAbilityCalculate(String customerId, String monthId) { - - + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { List subAllGridList = new ArrayList<>(); List communityPublishArticle = new ArrayList<>(); - - List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (indexCode.equals(IndexCalConstant.COMMUNITY_SERVICE_AVG)){ List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); if (subGridServiceAvg.size() == NumConstant.ONE){ - // TODO 只有一条记录时 - }else if (subGridServiceAvg.size() > NumConstant.ONE ){ MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); Integer indexStart = NumConstant.ZERO; @@ -306,9 +291,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }else{ List communityActivityCount = factIndexServiceAblityOrgMonthlyDao.selectActivityCount(customerId, monthId); if (communityActivityCount.size() == NumConstant.ONE){ - // TODO - }else if (communityActivityCount.size() > NumConstant.ONE){ Integer indexStart = NumConstant.ZERO; Integer indexEnd = NumConstant.TEN; @@ -346,9 +329,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } }); }); - factIndexCommunityScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.COMMUNITY_SERVICE); - factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); - + deleteAndInsert(customerId,monthId,IndexCalConstant.COMMUNITY_SERVICE,subAllGridList); + return true; } /** @@ -358,7 +340,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @author zxc * @date 2020/9/1 9:21 上午 */ - public void communityRelate(String customerId, String monthId) { + public Boolean communityRelate(String customerId, String monthId) { List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); List factIndexCommunityScoreEntities = factIndexCommunityScoreDao.selectCommunityInfo(customerId, monthId); detailListByParentCode.forEach(detail -> { @@ -384,16 +366,35 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }); result.add(score); }); - factIndexCommunityScoreDao.deleteOldRecord(customerId,monthId,IndexCalConstant.COMMUNITY_RELATE); - factIndexCommunityScoreDao.insertCommunityPartyRecord(result); + deleteAndInsert(customerId,monthId,IndexCalConstant.COMMUNITY_RELATE,result); + return true; } - public void calAll(String customerId,String monthId){ - this.communityPartyCalculate(customerId, monthId); //党建能力 - this.communityGovernAbilityCalculate(customerId, monthId); // 治理能力 - this.communityServiceAbilityCalculate(customerId, monthId); // 服务能力 - - communityRelate(customerId, monthId); + /** + * @Description 计算社区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 4:12 下午 + */ + public Boolean calCommunityAll(String customerId,String monthId){ + Boolean aBoolean = communityPartyCalculate(customerId, monthId);//党建能力 + if (!aBoolean.equals(true)){ + throw new RenException("calculate community-party-ability failure ......"); + } + Boolean bBoolean = communityGovernAbilityCalculate(customerId, monthId);// 治理能力 + if (!bBoolean.equals(true)){ + throw new RenException("calculate community-govern-ability failure ......"); + } + Boolean cBoolean = communityServiceAbilityCalculate(customerId, monthId);// 服务能力 + if (!cBoolean.equals(true)){ + throw new RenException("calculate community-service-ability failure ......"); + } + Boolean dBoolean = communityRelate(customerId, monthId); + if (!dBoolean.equals(true)){ + throw new RenException("calculate community-all insert failure ......"); + } + return true; } /** @@ -418,4 +419,18 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); } + + /** + * @Description 先删除记录,在插入 + * @param customerId + * @param monthId + * @param indexCode + * @param subAllGridList + * @author zxc + * @date 2020/9/1 4:24 下午 + */ + public void deleteAndInsert(String customerId,String monthId,String indexCode,List subAllGridList){ + factIndexCommunityScoreDao.deleteOldRecord(customerId,monthId,indexCode); + factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); + } } From ec598da9e36e329c86cad41a0b7f4430603b9edd Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 1 Sep 2020 16:53:40 +0800 Subject: [PATCH 259/360] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/DemoController.java | 15 +------ .../FactIndexPartyAblityOrgMonthlyDao.java | 10 +++++ .../IndexCalculateCommunityServiceImpl.java | 45 ++++++++++++++++--- .../impl/IndexCalculateServiceImpl.java | 2 +- .../FactIndexPartyAblityOrgMonthlyDao.xml | 19 ++++++++ 5 files changed, 71 insertions(+), 20 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index da152b8ae3..37f3480b63 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -129,22 +129,9 @@ public class DemoController { return new Result().ok(list); } - @PostMapping("zxc") - public Result getZxc(){ -// indexCalculateCommunityService.communityPublishArticleCountCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); - indexCalculateCommunityService.communityGovernAbilityCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); - return new Result(); - } - - @PostMapping("zxc1") - public Result getZxc1(){ - indexCalculateCommunityService.communityPartyCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); - return new Result(); - } - @PostMapping("zxc2") public Result getZxc2(){ - indexCalculateCommunityService.calAll("b09527201c4409e19d1dbc5e3c3429a1","202008"); + indexCalculateCommunityService.calCommunityAll("b09527201c4409e19d1dbc5e3c3429a1","202008"); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 144ecd1d0a..ef7cc36de8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -25,6 +25,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 党建能力-街道及社区相关事实表 @@ -72,4 +73,13 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao selectPublishArticleCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 查询社区下的发文数 Map + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 10:49 上午 + */ + List> selectPublishArticleCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java index bb7962faf6..072c6c6e36 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/impl/IndexCalculateCommunityServiceImpl.java @@ -62,7 +62,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni */ @Transactional(rollbackFor = Exception.class) public Boolean communityPartyCalculate(String customerId, String monthId) { - // 党建能力 // 根据all_parent_index_code 获取指标明细 List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(),IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); @@ -98,10 +97,48 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni indexStart++; }while (collect.size() == NumConstant.TEN); } + }else { + List indexInputVOS = new ArrayList<>(); + List> maps = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId); + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(indexGroup.getIndexCode()); + if (!StringUtils.isEmpty(fieldNameByIndexCode)) { + if (maps.get(NumConstant.ZERO).containsKey(fieldNameByIndexCode)) { + List decimalList = maps.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + Integer indexStart = NumConstant.ZERO; + Integer indexEnd = NumConstant.TEN; + List> collect; + do { + collect = maps.stream().skip(indexEnd * indexStart).limit(indexEnd).collect(Collectors.toList()); + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + collect.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + FactIndexCommunityScoreDTO publishArticle = new FactIndexCommunityScoreDTO(); + BeanUtils.copyProperties(c,publishArticle); + communityPublishArticle.add(publishArticle); + }); + IndexInputVO index1VO = new IndexInputVO(indexGroup.getIndexId(), index1SampleValues, indexGroup.getThreshold(), indexGroup.getWeight(), sc1); + indexInputVOS.add(index1VO); + } while (collect.size() == NumConstant.TEN); + } + } + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + scoreCountOfSampleId.forEach((key,value) -> { + communityPublishArticle.forEach(grid -> { + if (key.equals(grid.getAgencyId())) { + grid.setCustomerId(customerId); + grid.setIndexCode(IndexCalConstant.COMMUNITY_GOVERN); + grid.setScore(grid.getScore().add(value)); + } + }); + }); } }); // 社区名义发文数量 - List publishArticleCounts = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCount(customerId, monthId); + /*List publishArticleCounts = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCount(customerId, monthId); detailListByParentCode.forEach(indexGroup -> { if (indexGroup.getIndexCode().equals("shequmingyifwsl")) { if (publishArticleCounts.size() == NumConstant.ONE) { @@ -134,7 +171,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } while (collect.size() == NumConstant.TEN); } } - }); + });*/ subAllGridList.forEach(grid -> { communityPublishArticle.forEach(publish -> { if (grid.getAgencyId().equals(publish.getAgencyId())){ @@ -196,9 +233,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId); if (communityGovernAbility.size() == NumConstant.ONE){ - // TODO - }else if (communityGovernAbility.size() > NumConstant.ONE){ List indexInputVOS = new ArrayList<>(); detailListByParentCode.forEach(detail -> { 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 index 7283af07c3..dde54c76f2 100644 --- 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 @@ -75,7 +75,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { } //计算社区 try { - indexCalculateCommunityService.calAll(customerId, formDTO.getMonthId()); + indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId()); log.info("indexCalculate calAll return result:{}", flag); } catch (Exception e) { log.error("indexCalculate calAll exception", e); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 4e6bd0cd6c..50df452642 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -90,4 +90,23 @@ AND month_id = #{monthId} + + + From f5990b0c6bbbb2aa5527d7e890e6ead277dc4de0 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 1 Sep 2020 21:55:16 +0800 Subject: [PATCH 260/360] =?UTF-8?q?1=E5=A4=9A=E9=9F=B3=E5=AD=97=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=9B2=EF=BC=9A=E6=8C=87=E6=A0=87=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=88=86=E7=BB=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IndexCalculateController.java | 36 +++++++++++-------- .../epmet/model/IndexExcelDataListener.java | 25 +++++++------ .../impl/IndexCalculateServiceImpl.java | 12 ++++--- .../java/com/epmet/util/Pinyin4jUtil.java | 2 ++ 4 files changed, 44 insertions(+), 31 deletions(-) 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 index 9dab47c148..de9f746130 100644 --- 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 @@ -1,6 +1,5 @@ package com.epmet.controller; -import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; @@ -23,33 +22,40 @@ import org.springframework.web.bind.annotation.RestController; public class IndexCalculateController { @Autowired - private IndexCalculateService indexCalculateService; - + private IndexCalculateService indexCalculateService; + @Autowired private CpcIndexCalculateService cpcIndexCalculateService; /** - * 1、按照客户计算指标(按照月份) + * 按照客户计算所有指标(按照月份) * - * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-20 **/ - @PostMapping("cpc") - public Result cpcIndexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody IndexCalculateForm formDTO) { - indexCalculateService.indexCalculate(formDTO); - return new Result(); + @PostMapping("all") + public Result indexCalculate(@RequestBody IndexCalculateForm formDTO) { + Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); + if (aBoolean){ + return new Result().ok(true); + } + return new Result().error("指标计算失败"); } - @PostMapping("getMax") - public Result getMax(){ - CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); - cpcIndexCalculateService.cpcIndexCalculate(calculateCommonFormDTO); - return new Result(); + + /** + * desc:计算党员指标分数 + * + * @return + */ + @PostMapping("cpc") + public Result cpc(CalculateCommonFormDTO formDTO) { + + return new Result().ok(cpcIndexCalculateService.cpcIndexCalculate(formDTO)); } - /* *//** + /* *//** * 2、党建能力-网格相关指标上报(按照月份) * * @param externalAppRequestParam diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 9267d562a8..9c41161089 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -130,7 +130,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); - IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index() + level4Index); + String level4IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + level4Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level4IndexDetailKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -138,7 +139,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setParentIndexGroupId(group1.getId()); group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(index.getLevel1Index() + level4Index, group2); + indexGroupMap.put(level4IndexDetailKey, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index); if (templateEntity == null) { @@ -154,9 +155,10 @@ public class IndexExcelDataListener extends AnalysisEventListener { } indexDictEntity = indexDicMap.get(index.getLevel5Index()); + String level5IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(level5IndexDetailKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -165,7 +167,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexDetailKey, templateEntity); } } else { //todo 测试完去掉 @@ -183,8 +185,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level2Index = index.getLevel2Index(); indexDictEntity = indexDicMap.get(level2Index); - String groupMapKey = index.getLevel1Index() + level2Index; - IndexGroupTemplateEntity group2 = indexGroupMap.get(groupMapKey); + String level2IndexGroupKey = index.getLevel1Index() + level2Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level2IndexGroupKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -193,9 +195,9 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(groupMapKey, group2); + indexGroupMap.put(level2IndexGroupKey, group2); //构建 分组明细 - templateEntity = indexGroupDetailMap.get(level2Index); + templateEntity = indexGroupDetailMap.get(level2IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -204,13 +206,14 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); - indexGroupDetailMap.put(groupMapKey, templateEntity); + indexGroupDetailMap.put(level2IndexGroupKey, templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + String level5IndexGroupKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); + templateEntity = indexGroupDetailMap.get(level5IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -219,7 +222,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexGroupKey, templateEntity); } } //} 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 index dde54c76f2..a7100121f7 100644 --- 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 @@ -54,16 +54,17 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { } formDTO.setCustomerIds(externalCustomerIdsResult.getData()); } - formDTO.getCustomerIds().forEach(customerId -> { + Boolean flag = false; + for (String customerId : formDTO.getCustomerIds()) { CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); //计算党员相关的 - Boolean flag = false; try { CalculateCommonFormDTO param = new CalculateCommonFormDTO(customerId, formDTO.getMonthId()); flag = cpcIndexCalculateService.cpcIndexCalculate(param); log.info("indexCalculate cpcIndexCalculate return result:{}", flag); } catch (Exception e) { log.error("indexCalculate cpcIndexCalculate exception", e); + break; } //计算网格 @@ -72,6 +73,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { log.info("indexCalculate calculateGridCorreLation return result:{}", flag); } catch (Exception e) { log.error("indexCalculate calculateGridCorreLation exception", e); + break; } //计算社区 try { @@ -79,10 +81,10 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { log.info("indexCalculate calAll return result:{}", flag); } catch (Exception e) { log.error("indexCalculate calAll exception", e); + break; } - }); - indexCodeFieldReRedis.deleteIndexCodeFromRedis(); - return true; + } + return flag; } catch (Exception e) { log.error("indexCalculate exception,param:{}", JSON.toJSONString(formDTO)); } finally { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java index bedaf09f1b..727de4bbeb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java @@ -27,6 +27,8 @@ public class Pinyin4jUtil { duoyinMap.put('提',new String[]{"ti"}); duoyinMap.put('被',new String[]{"bei"}); duoyinMap.put('期',new String[]{"qi"}); + duoyinMap.put('参',new String[]{"can"}); + duoyinMap.put('均',new String[]{"jun"}); } /** From 10c0794eec84287f29b61938efb7f4a8e959fa3e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 2 Sep 2020 09:59:33 +0800 Subject: [PATCH 261/360] avgShiftProjectRatio=>issueToProjectRatio --- .../indexcollect/form/GridGovrnAbilityFormDTO.java | 2 +- .../java/com/epmet/controller/DemoController.java | 6 +++--- .../FactIndexGovrnAblityGridMonthlyEntity.java | 2 +- .../src/main/java/com/epmet/eum/IndexCodeEnum.java | 2 +- .../indexcal/impl/GridCorreLationServiceImpl.java | 4 +++- .../indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml | 12 ++++++------ 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java index ef4efd6a24..021533fe59 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java @@ -73,7 +73,7 @@ public class GridGovrnAbilityFormDTO implements Serializable { /** * 网格议题转项目率 */ - private BigDecimal avgShiftProjectRatio; + private BigDecimal issueToProjectRatio; /** * 网格自治项目数 统计期网格自身内办结的项目数目 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 37f3480b63..08034ab72a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -327,7 +327,7 @@ public class DemoController { entity.setIssueTotal(100); //网格总议题数 entity.setAvgIssueCount(100); //网格人均议题数目 - entity.setAvgShiftProjectRatio(new BigDecimal("20")); //网格议题转项目率 + entity.setIssueToProjectRatio(new BigDecimal("20")); //网格议题转项目率 entity.setProjectTotal(20);// 网格总项目数 entity.setSelfSolveProjectCount(10); // 网格自治项目数 统计期网格自身内办结的项目数目 entity.setResolveProjectCount(100);//网格办结项目数 统计期内办结的项目数目 @@ -351,7 +351,7 @@ public class DemoController { entity.setIssueTotal(70); //网格总议题数 entity.setAvgIssueCount(10); //网格人均议题数目 - entity.setAvgShiftProjectRatio(new BigDecimal("20")); //网格议题转项目率 + entity.setIssueToProjectRatio(new BigDecimal("20")); //网格议题转项目率 entity.setProjectTotal(40);// 网格总项目数 entity.setSelfSolveProjectCount(15); // 网格自治项目数 统计期网格自身内办结的项目数目 entity.setResolveProjectCount(20);//网格办结项目数 统计期内办结的项目数目 @@ -375,7 +375,7 @@ public class DemoController { entity.setIssueTotal(80); //网格总议题数 entity.setAvgIssueCount(70); //网格人均议题数目 - entity.setAvgShiftProjectRatio(new BigDecimal("100")); //网格议题转项目率 + entity.setIssueToProjectRatio(new BigDecimal("100")); //网格议题转项目率 entity.setProjectTotal(100);// 网格总项目数 entity.setSelfSolveProjectCount(20); // 网格自治项目数 统计期网格自身内办结的项目数目 entity.setResolveProjectCount(20);//网格办结项目数 统计期内办结的项目数目 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java index c1c6553ef5..46e4472664 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java @@ -82,7 +82,7 @@ public class FactIndexGovrnAblityGridMonthlyEntity extends BaseEpmetEntity { /** * 网格议题转项目率 */ - private BigDecimal avgShiftProjectRatio; + private BigDecimal issueToProjectRatio; /** * 网格总项目数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index 620175e5c5..9697e84fcf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -24,7 +24,7 @@ public enum IndexCodeEnum { DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4), LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), - ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydsyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), + ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydcyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), ; private String code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 9169fbfc16..f84b32d66e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -410,8 +410,10 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + logger.error("index_code1:{} not find field_name",index.getIndexCode()); continue; + }else{ + logger.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); } // logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml index 11c10755fa..52d6ad6c20 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -13,7 +13,7 @@ - + @@ -45,7 +45,7 @@ YEAR_ID, ISSUE_TOTAL, AVG_ISSUE_COUNT, - AVG_SHIFT_PROJECT_RATIO, + ISSUE_TO_PROJECT_RATIO, PROJECT_TOTAL, SELF_SOLVE_PROJECT_COUNT, RESOLVE_PROJECT_COUNT, @@ -69,7 +69,7 @@ #{item.yearId}, #{item.issueTotal}, #{item.avgIssueCount}, - #{item.avgShiftProjectRatio}, + #{item.issueToProjectRatio}, #{item.projectTotal}, #{item.selfSolveProjectCount}, #{item.resolveProjectCount}, @@ -93,7 +93,7 @@ m.MONTH_ID, m.ISSUE_TOTAL, m.AVG_ISSUE_COUNT, - m.AVG_SHIFT_PROJECT_RATIO, + m.ISSUE_TO_PROJECT_RATIO, m.PROJECT_TOTAL, m.SELF_SOLVE_PROJECT_COUNT, m.RESOLVE_PROJECT_COUNT, @@ -119,8 +119,8 @@ MAX(m.ISSUE_TOTAL) AS ISSUE_TOTAL_MAX, MIN(m.AVG_ISSUE_COUNT) AS AVG_ISSUE_COUNT_MIN, MAX(m.AVG_ISSUE_COUNT) AS AVG_ISSUE_COUNT_MAX, - MIN(m.AVG_SHIFT_PROJECT_RATIO) AS AVG_SHIFT_PROJECT_RATIO_MIN, - MAX(m.AVG_SHIFT_PROJECT_RATIO) AS AVG_SHIFT_PROJECT_RATIO_MAX, + MIN(m.ISSUE_TO_PROJECT_RATIO) AS ISSUE_TO_PROJECT_RATIO_MIN, + MAX(m.ISSUE_TO_PROJECT_RATIO) AS ISSUE_TO_PROJECT_RATIO_MAX, MIN(m.PROJECT_TOTAL) AS PROJECT_TOTAL_MIN, MAX(m.PROJECT_TOTAL) AS PROJECT_TOTAL_MAX, MIN(m.SELF_SOLVE_PROJECT_COUNT) AS SELF_SOLVE_PROJECT_COUNT_MIN, From 352c936f4fe1841b243cc8f35e65c409826e30b4 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Wed, 2 Sep 2020 10:21:25 +0800 Subject: [PATCH 262/360] =?UTF-8?q?1=E3=80=81=E5=AE=9A=E5=88=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BF=AE=E6=94=B9-=E6=94=AF=E6=8C=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=8A=9F=E8=83=BD=E8=AF=B4=E6=98=8E=E3=80=822.?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2sql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/FunctionCustomizedController.java | 2 +- .../java/com/epmet/service/FunctionCustomizedService.java | 2 +- .../epmet/service/impl/FunctionCustomizedServiceImpl.java | 8 ++++---- .../src/main/resources/mapper/FunctionCustomizedDao.xml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionCustomizedController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionCustomizedController.java index fd82ce4fb6..8326a0a528 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionCustomizedController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/FunctionCustomizedController.java @@ -143,7 +143,7 @@ public class FunctionCustomizedController { /** * 定制功能修改 * 有客户在使用该功能时则不允许修改上下架状态、业务域名和外链地址、所属端app, - * 只能修改功能名称和大小图标 + * 只能修改功能名称和大小图标、功能说明 * 修改的要判断是否有客户在使用,有用的要批量更新已使用客户数据 * * @param formDTO diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionCustomizedService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionCustomizedService.java index a02b628755..24411c0d80 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionCustomizedService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/FunctionCustomizedService.java @@ -130,7 +130,7 @@ public interface FunctionCustomizedService extends BaseService - AND cu.FROM_APP = 'gov' + AND cu.FROM_APP = #{fromApp} ORDER BY cu.FROM_APP, f.CREATED_TIME DESC @@ -84,7 +84,7 @@ AND cu.CUSTOMIZED_NAME like concat('%', #{customizedName}, '%') - AND cu.FROM_APP = 'gov' + AND cu.FROM_APP = #{fromApp} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 50df452642..10264230e8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -104,7 +104,7 @@ fact_index_party_ablity_org_monthly WHERE del_flag = '0' - AND data_type = 'community' + AND data_type = #{level} AND customer_id = #{customerId} AND month_id = #{monthId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml index 8315280f89..6cbaedc9cb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -104,7 +104,7 @@ fact_index_service_ablity_org_monthly WHERE del_flag = '0' - AND data_type = 'community' + AND data_type = #{level} AND customer_id = #{customerId} AND month_id = #{monthId} From 667dd0ef25288143878daad9f3ca1e825f1d9f42 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 2 Sep 2020 14:55:33 +0800 Subject: [PATCH 271/360] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3-?= =?UTF-8?q?=E5=8F=AA=E4=B8=8A=E4=BC=A0=E4=B8=80=E6=9D=A1=E4=BA=8B=E5=AE=9E?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=EF=BC=8C=E5=88=86=E5=80=BC=E9=BB=98=E8=AE=A4?= =?UTF-8?q?50?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/constant/NumConstant.java | 4 + .../FactIndexGovrnAblityGridMonthlyDao.java | 11 ++- .../FactIndexPartyAblityGridMonthlyDao.java | 16 ++++ .../FactIndexServiceAblityGridMonthlyDao.java | 19 +++++ .../impl/GridCorreLationServiceImpl.java | 75 ++++++++++++++----- .../FactIndexGovrnAblityGridMonthlyDao.xml | 12 +++ .../FactIndexPartyAblityGridMonthlyDao.xml | 13 ++++ .../FactIndexServiceAblityGridMonthlyDao.xml | 24 ++++++ 8 files changed, 154 insertions(+), 20 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java index 0ac7dbf706..e906535166 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java @@ -1,5 +1,7 @@ package com.epmet.commons.tools.constant; +import java.math.BigDecimal; + /** * 常用数字常量 * @@ -56,4 +58,6 @@ public interface NumConstant { String POSITIVE_EIGHT_STR = "+8"; String EMPTY_STR = ""; String ONE_NEG_STR = "-1"; + + String FIFTY_STR="50"; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index b3002609d1..589a9103c3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -91,8 +91,17 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao selectPartyAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + /** + * @return java.lang.Integer + * @param formDTO + * @author yinzuomei + * @description 查询(党建能力-网格相关事实表) 这个月共上传记录数 + * @Date 2020/9/2 14:28 + **/ Integer selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:45 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java index 7357c0cedc..fecd99a00b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO; @@ -85,4 +86,22 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao selectServiceAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @return int + * @param formDTO + * @author yinzuomei + * @description 查询(服务能力-网格相关事实表)共上传记录数 + * @Date 2020/9/2 14:28 + **/ + int selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:46 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 40013cfaf5..6bb15d784d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -130,6 +130,10 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (NumConstant.ZERO == total) { log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); @@ -181,6 +185,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -190,7 +219,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private Map getContactMassesAblityMap(CalculateCommonFormDTO calculateCommonFormDTO) { Map map = new HashMap<>(); - /*List list = cpcScoreDao.selectListGridContactMassesAvgValue(calculateCommonFormDTO); + List list = cpcScoreDao.selectListGridContactMassesAvgValue(calculateCommonFormDTO); if (!CollectionUtils.isEmpty(list)) { BigDecimal minValue = Collections.min(list); BigDecimal maxValue = Collections.max(list); @@ -199,10 +228,10 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { return map; } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); - map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR));*/ + map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); //FOR TEST - map.put(StrConstant.MIN, new BigDecimal("24.35")); - map.put(StrConstant.MAX, new BigDecimal("46.13")); + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,19 +244,19 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @Date 2020/8/31 9:50 **/ private BigDecimal getGridContactMassesAvgValue(CalculateCommonFormDTO calculateCommonFormDTO, String gridId) { - /*BigDecimal result = cpcScoreDao.selectGridContactMassesAvgValue(calculateCommonFormDTO.getCustomerId(), calculateCommonFormDTO.getMonthId(), gridId); + BigDecimal result = cpcScoreDao.selectGridContactMassesAvgValue(calculateCommonFormDTO.getCustomerId(), calculateCommonFormDTO.getMonthId(), gridId); if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); - }*/ + } //FOR TEST - BigDecimal result=null; + /*BigDecimal result=null; if(IndexCalConstant.S1_C1_G1.equals(gridId)){ result= new BigDecimal("24.43"); }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ result=new BigDecimal("46.13"); }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ result=new BigDecimal("24.35"); - } + }*/ return result; } @@ -240,19 +269,19 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @Date 2020/8/31 15:51 **/ private BigDecimal getGridJoinIssueAvgValue(CalculateCommonFormDTO formDTO, String gridId) { - /*BigDecimal result = cpcScoreDao.selectGridJoinIssueAvgValue(formDTO.getCustomerId(), formDTO.getMonthId(), gridId); + BigDecimal result = cpcScoreDao.selectGridJoinIssueAvgValue(formDTO.getCustomerId(), formDTO.getMonthId(), gridId); if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); - }*/ + } //FOR TEST - BigDecimal result=null; + /*BigDecimal result=null; if(IndexCalConstant.S1_C1_G1.equals(gridId)){ result= new BigDecimal("29.40"); }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ result=new BigDecimal("18.30"); }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ result=new BigDecimal("9.15"); - } + }*/ return result; } @@ -265,7 +294,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private Map getJoinIssueAblityMap(CalculateCommonFormDTO calculateCommonFormDTO) { Map map = new HashMap<>(); - /*List list = cpcScoreDao.selectListJoinIssueAvgValue(calculateCommonFormDTO); + List list = cpcScoreDao.selectListJoinIssueAvgValue(calculateCommonFormDTO); if (!CollectionUtils.isEmpty(list)) { BigDecimal minValue = Collections.min(list); BigDecimal maxValue = Collections.max(list); @@ -274,10 +303,10 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { return map; } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); - map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR));*/ + map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); // FOR TEST - map.put(StrConstant.MIN, new BigDecimal("9.15")); - map.put(StrConstant.MAX, new BigDecimal("29.4")); + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -414,8 +443,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { List> sampleValueList = new ArrayList<>(); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, -// index.getThreshold(), - new BigDecimal("-1"),//FOR TEST + index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -437,6 +466,10 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (NumConstant.ZERO == total) { log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); @@ -496,10 +529,14 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml index 52d6ad6c20..976d74e3ca 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml @@ -149,4 +149,16 @@ AND m.CUSTOMER_ID =#{customerId} AND m.MONTH_ID=#{monthId} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml index f0d83bf06c..239e7c349b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexPartyAblityGridMonthlyDao.xml @@ -170,6 +170,7 @@ AND m.MONTH_ID =#{monthId} + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml index 1ab7d916d0..2afb14cf3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/FactIndexServiceAblityGridMonthlyDao.xml @@ -108,4 +108,28 @@ and m.CUSTOMER_ID=#{customerId} and m.MONTH_ID=#{monthId} + + + + + + From 2b907596aaeab321796f4e78e552a7de0345c605 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 2 Sep 2020 15:04:02 +0800 Subject: [PATCH 272/360] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=207?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndexCalculateCommunityServiceImpl.java | 112 ++++++++++++------ 1 file changed, 77 insertions(+), 35 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCalculateCommunityServiceImpl.java index bea808f8be..70b539beae 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -77,20 +77,24 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.error("查询下属所有网格的党建能力平均值集合为空"); return; - } - MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); - Integer indexEnd = NumConstant.TEN; - List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); - partition.forEach(publish -> { - List index1SampleValues = new ArrayList<>(); - publish.forEach(c -> { - SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); - index1SampleValues.add(s); + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); }); - BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); - IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); - indexInputVOS.add(index1VO); - }); + } } else { // 社区名义发文数量 List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); @@ -102,20 +106,24 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (StringUtils.isEmpty(fieldNameByIndexCode)) { log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); return; - } - List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); - MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); - List>> publishArticleList = ListUtils.partition(mapList, 10); - publishArticleList.forEach(publish -> { - ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); - List index1SampleValues = new ArrayList<>(); - publish.forEach(c -> { - SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); - index1SampleValues.add(s); + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); }); - IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); - indexInputVOS.add(index1VO); - }); + } } }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); @@ -144,7 +152,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); if (subGridGovernAvg.size() == NumConstant.ONE) { - // TODO + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; } else if (subGridGovernAvg.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> governAvg = ListUtils.partition(subGridGovernAvg, 10); @@ -160,9 +169,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }); } } else { + // 治理能力的六个五级指标 List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); - if (communityGovernAbility.size() == NumConstant.ONE) { - // TODO + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; } else if (communityGovernAbility.size() > NumConstant.ONE) { String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { @@ -212,7 +226,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); if (subGridServiceAvg.size() == NumConstant.ONE) { - // TODO 只有一条记录时 + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; } else if (subGridServiceAvg.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); @@ -232,9 +247,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (CollectionUtils.isEmpty(communityActivityCountList)) { log.error("查询社区活动组织次数集合为空"); return; - } - if (communityActivityCountList.size() == NumConstant.ONE) { - // TODO + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; } else if (communityActivityCountList.size() > NumConstant.ONE) { String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { @@ -353,10 +368,22 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @date 2020/9/1 4:24 下午 */ public void deleteAndInsert(String customerId, String monthId, String indexCode, List subAllGridList) { - factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId, indexCode); - factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); + if (!CollectionUtils.isEmpty(subAllGridList)) { + factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId, indexCode); + factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); + } } + /** + * @Description + * @param scoreCountOfSampleId 指标计算结果 + * @param customerId 客户ID + * @param monthId 月份ID + * @param isTotal 是否 总分【党建+治理+服务】 + * @param indexCode 党建能力:dangjiannengli,治理能力:zhilinengli,服务能力:fuwunengli,xx相关:xx相关 + * @author zxc + * @date 2020/9/2 2:37 下午 + */ public List getResult(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode) { List result = new ArrayList<>(); scoreCountOfSampleId.forEach((k, v) -> { @@ -373,4 +400,19 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }); return result; } + + /** + * @Description 当查询结果为一条时,调用此方法 + * @param agencyId + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 2:40 下午 + */ + public void sizeOne(String agencyId,String customerId,String monthId,String indexCode){ + HashMap scoreCountOfSampleId = new HashMap<>(); + scoreCountOfSampleId.put(agencyId,new BigDecimal(NumConstant.FIFTY)); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, indexCode); + deleteAndInsert(customerId, monthId, indexCode, result); + } } From 0b6ee2a2eec5eb020848d1b746e324a338202370 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 2 Sep 2020 15:12:53 +0800 Subject: [PATCH 273/360] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9Amd5=E6=91=98?= =?UTF-8?q?=E8=A6=81=E9=AA=8C=E7=AD=BE=E6=96=B9=E5=BC=8F=E7=9A=84=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E5=BA=94=E7=94=A8=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aspect/ExternalAppRequestAuthAspect.java | 13 ++- .../dto/form/ExternalAppAuthFormDTO.java | 10 ++ .../constant/ExtAppAuthTypeConstant.java | 8 ++ .../controller/ExternalAppController.java | 4 +- .../epmet/service/ExternalAppAuthService.java | 3 +- .../impl/ExternalAppAuthServiceImpl.java | 108 +++--------------- .../externalapp/ExtAppAuthProcessor.java | 73 ++++++++++++ .../externalapp/ExtAppJwtAuthProcessor.java | 61 ++++++++++ .../externalapp/ExtAppJwtTokenUtils.java | 8 +- .../externalapp/ExtAppMD5AuthProcessor.java | 42 +++++++ 10 files changed, 231 insertions(+), 99 deletions(-) create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/constant/ExtAppAuthTypeConstant.java create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppAuthProcessor.java create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java create mode 100644 epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppMD5AuthProcessor.java diff --git a/epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java b/epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java index b4cfd11c27..82ffd68882 100644 --- a/epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java +++ b/epmet-commons/epmet-commons-extapp-auth/src/main/java/com/epmet/commons/extappauth/aspect/ExternalAppRequestAuthAspect.java @@ -37,6 +37,9 @@ public class ExternalAppRequestAuthAspect { public static final String ACCESS_TOKEN_HEADER_KEY = "AccessToken"; public static final String APP_ID_HEADER_KEY = "appId"; + public static final String APP_ID_TIMESTAMP_KEY = "ts"; + public static final String APP_ID_CUSTOMER_ID_KEY = "CustomerId"; + public static final String APP_ID_AUTY_TYPE_KEY = "AuthType"; @Autowired private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; @@ -52,6 +55,9 @@ public class ExternalAppRequestAuthAspect { HttpServletRequest request = getRequest(); String token = request.getHeader(ACCESS_TOKEN_HEADER_KEY); String appId = request.getHeader(APP_ID_HEADER_KEY); + String ts = request.getHeader(APP_ID_TIMESTAMP_KEY); + String customerId = request.getHeader(APP_ID_CUSTOMER_ID_KEY); + String authType = request.getHeader(APP_ID_AUTY_TYPE_KEY); if (StringUtils.isAnyBlank(token, appId)) { throw new RenException("请求头中的token和appId不能为空"); @@ -62,6 +68,11 @@ public class ExternalAppRequestAuthAspect { ExternalAppAuthFormDTO form = new ExternalAppAuthFormDTO(); form.setAppId(appId); form.setToken(token); + form.setAuthType(authType); + if (StringUtils.isNotBlank(ts)) { + // 将字符串转化为时间 + form.setTs(new Long(ts)); + } Result result = commonServiceOpenFeignClient.externalAppAuth(form); if (result == null) { throw new RenException("调用服务进行外部应用认证,返回null"); @@ -84,7 +95,7 @@ public class ExternalAppRequestAuthAspect { if (parameters[i].getType() == ExternalAppRequestParam.class) { ExternalAppRequestParam requestParam = (ExternalAppRequestParam) point.getArgs()[i]; requestParam.setAppId(appId); - requestParam.setCustomerId(authResult.getCustomerId()); + requestParam.setCustomerId(authResult.getCustomerId() == null ? customerId : authResult.getCustomerId()); } } } diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalAppAuthFormDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalAppAuthFormDTO.java index 2d6470db80..a144b37f81 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalAppAuthFormDTO.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalAppAuthFormDTO.java @@ -15,4 +15,14 @@ public class ExternalAppAuthFormDTO { */ private String token; + /** + * 时间戳 + */ + private Long ts; + + /** + * 认证类型:md5,jwt + */ + private String authType; + } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/constant/ExtAppAuthTypeConstant.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/constant/ExtAppAuthTypeConstant.java new file mode 100644 index 0000000000..b281c6d7e6 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/constant/ExtAppAuthTypeConstant.java @@ -0,0 +1,8 @@ +package com.epmet.constant; + +public interface ExtAppAuthTypeConstant { + + String JWT = "jwt"; + String MD5 = "md5"; + +} diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java index 976c4e4ef0..50e9a7b891 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java @@ -40,12 +40,14 @@ public class ExternalAppController { public Result auth(@RequestBody ExternalAppAuthFormDTO formDTO) { String appId = formDTO.getAppId(); String token = formDTO.getToken(); + Long ts = formDTO.getTs(); + String authType = formDTO.getAuthType(); if (StringUtils.isAnyBlank(token, appId)) { throw new RenException("请求头中的token和appId不能为空"); } logger.info("外部应用请求认证拦截Aspect。appId:{}, token:{}", appId, token); - ExternalAppAuthResultDTO auth = externalAppAuthService.auth(appId, token); + ExternalAppAuthResultDTO auth = externalAppAuthService.auth(appId, token, ts, authType); return new Result().ok(auth); } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppAuthService.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppAuthService.java index e1158c592c..3f76a1e83d 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppAuthService.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppAuthService.java @@ -1,10 +1,9 @@ package com.epmet.service; import com.epmet.dto.result.ExternalAppAuthResultDTO; -import com.epmet.dto.result.ExternalAppResultDTO; public interface ExternalAppAuthService { - ExternalAppAuthResultDTO auth(String appId, String token); + ExternalAppAuthResultDTO auth(String appId, String token, Long ts, String authType); } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppAuthServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppAuthServiceImpl.java index e87a4c6f46..e598c3ab2c 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppAuthServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppAuthServiceImpl.java @@ -1,19 +1,10 @@ package com.epmet.service.impl; -import com.epmet.commons.tools.exception.EpmetErrorCode; -import com.epmet.commons.tools.exception.ExceptionUtils; -import com.epmet.commons.tools.exception.RenException; -import com.epmet.commons.tools.redis.RedisKeys; -import com.epmet.commons.tools.redis.RedisUtils; -import com.epmet.dao.ExternalAppDao; -import com.epmet.dao.ExternalAppSecretDao; +import com.epmet.constant.ExtAppAuthTypeConstant; import com.epmet.dto.result.ExternalAppAuthResultDTO; -import com.epmet.dto.result.ExternalAppResultDTO; -import com.epmet.entity.ExternalAppEntity; -import com.epmet.entity.ExternalAppSecretEntity; import com.epmet.service.ExternalAppAuthService; -import com.epmet.utils.externalapp.ExtAppJwtTokenUtils; -import io.jsonwebtoken.Claims; +import com.epmet.utils.externalapp.ExtAppJwtAuthProcessor; +import com.epmet.utils.externalapp.ExtAppMD5AuthProcessor; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -26,90 +17,23 @@ public class ExternalAppAuthServiceImpl implements ExternalAppAuthService { private static Logger logger = LoggerFactory.getLogger(ExternalAppAuthServiceImpl.class); @Autowired - private RedisUtils redisUtils; + private ExtAppJwtAuthProcessor jwtAuthProcessor; @Autowired - private ExtAppJwtTokenUtils jwtTokenUtils; - - @Autowired - private ExternalAppSecretDao externalAppSecretDao; - - @Autowired - private ExternalAppDao externalAppDao; - - private int diffMillins = 1000 * 60 * 5; + private ExtAppMD5AuthProcessor md5AuthProcessor; @Override - public ExternalAppAuthResultDTO auth(String appId, String token) { - String secret; - if (StringUtils.isBlank(secret = getTokenByAppId(appId))) { - return fillAuthResult(false, String.format("根据AppId:%s没有找到对应的秘钥", appId), null); + public ExternalAppAuthResultDTO auth(String appId, String token, Long ts, String authType) { + // 没传或者传的jwt都用jwtprocessor处理 + if (StringUtils.isBlank(authType) || ExtAppAuthTypeConstant.JWT.equals(authType)) { + return jwtAuthProcessor.auth(appId, token, ts); + } else if (ExtAppAuthTypeConstant.MD5.equals(authType)) { + return md5AuthProcessor.auth(appId, token, ts); + } else { + ExternalAppAuthResultDTO rst = new ExternalAppAuthResultDTO(); + rst.setMessage("错误的认证类型"); + rst.setSuccess(false); + return rst; } - - Claims claim; - try { - claim = jwtTokenUtils.getClaimByToken(token, secret); - } catch (Exception e) { - String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); - logger.error("解析token失败:{}", errorStackTrace); - return fillAuthResult(false, "解析token失败", null); - } - - String appIdIn = (String)claim.get("appId"); - String customerId = (String)claim.get("customerId"); - Long timestamp = (Long)claim.get("ts"); - - //校验时间戳,允许5分钟误差 - if (StringUtils.isAnyBlank(appIdIn, customerId) || timestamp == null) { - logger.error("access token不完整。{},{},{}", appIdIn, customerId, timestamp); - return fillAuthResult(false, "access token不完整。", null); - } - - // TODO -// if (!validTimeStamp(timestamp)) { -// logger.error("服务器存在时差过大,请求被拒绝", appId, appIdIn); -// return fillAuthResult(false, "服务器存在时差过大,请求被拒绝", null); -// } - - if (!appId.equals(appIdIn)) { - logger.error("AppId不对应,token外部的:{}, token内部解析出来的:{}", appId, appIdIn); - return fillAuthResult(false, "Header中的AppId不匹配", null); - } - return fillAuthResult(true, "解析成功", customerId); - } - - private boolean validTimeStamp(Long timestamp) { - long now = System.currentTimeMillis(); -// System.out.println(new Date(timestamp)); - if (Math.abs(now - timestamp) > diffMillins) { - return false; - } - return true; - } - - /** - * 通过APP ID查询对应的秘钥 - * @param appId - * @return - */ - public String getTokenByAppId(String appId) { - String secret = (String)redisUtils.get(RedisKeys.getExternalAppSecretKey(appId)); - if (StringUtils.isBlank(secret)) { - ExternalAppSecretEntity secretEntity = externalAppSecretDao.getSecretsByAppId(appId); - if (secretEntity == null) { - return null; - } - secret = secretEntity.getSecret(); - redisUtils.set(RedisKeys.getExternalAppSecretKey(appId), secret); - } - return secret; - } - - public ExternalAppAuthResultDTO fillAuthResult(Boolean result, String message, String customerId) { - ExternalAppAuthResultDTO authResult = new ExternalAppAuthResultDTO(); - authResult.setSuccess(result); - authResult.setMessage(message); - authResult.setCustomerId(customerId); - return authResult; } } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppAuthProcessor.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppAuthProcessor.java new file mode 100644 index 0000000000..b0f5fef000 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppAuthProcessor.java @@ -0,0 +1,73 @@ +package com.epmet.utils.externalapp; + +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.dao.ExternalAppSecretDao; +import com.epmet.dto.result.ExternalAppAuthResultDTO; +import com.epmet.entity.ExternalAppSecretEntity; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; + + +/** + * 外部应用认证处理器父类 + */ +public abstract class ExtAppAuthProcessor { + + @Autowired + private RedisUtils redisUtils; + + @Autowired + private ExternalAppSecretDao externalAppSecretDao; + + private int diffMillins = 1000 * 60 * 5; + + public abstract ExternalAppAuthResultDTO auth(String appId, String token, Long ts); + + /** + * 通过APP ID查询对应的秘钥 + * @param appId + * @return + */ + public String getTokenByAppId(String appId) { + String secret = (String)redisUtils.get(RedisKeys.getExternalAppSecretKey(appId)); + if (StringUtils.isBlank(secret)) { + ExternalAppSecretEntity secretEntity = externalAppSecretDao.getSecretsByAppId(appId); + if (secretEntity == null) { + return null; + } + secret = secretEntity.getSecret(); + redisUtils.set(RedisKeys.getExternalAppSecretKey(appId), secret); + } + return secret; + } + + /** + * 时间戳校验 + * @param timestamp + * @return + */ + protected boolean validTimeStamp(Long timestamp) { + long now = System.currentTimeMillis(); + if (Math.abs(now - timestamp) > diffMillins) { + return false; + } + return true; + } + + /** + * 封装结果 + * @param result + * @param message + * @param customerId + * @return + */ + public ExternalAppAuthResultDTO fillAuthResult(Boolean result, String message, String customerId) { + ExternalAppAuthResultDTO authResult = new ExternalAppAuthResultDTO(); + authResult.setSuccess(result); + authResult.setMessage(message); + authResult.setCustomerId(customerId); + return authResult; + } + +} diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java new file mode 100644 index 0000000000..2ec771fd02 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java @@ -0,0 +1,61 @@ +package com.epmet.utils.externalapp; + +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.dto.result.ExternalAppAuthResultDTO; +import io.jsonwebtoken.Claims; +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.Component; + +/** + * jwt 认证处理器 + */ +@Component +public class ExtAppJwtAuthProcessor extends ExtAppAuthProcessor { + + private static Logger logger = LoggerFactory.getLogger(ExtAppJwtAuthProcessor.class); + + @Autowired + private ExtAppJwtTokenUtils jwtTokenUtils; + + public ExternalAppAuthResultDTO auth(String appId, String token, Long ts) { + String secret; + if (StringUtils.isBlank(secret = getTokenByAppId(appId))) { + return fillAuthResult(false, String.format("根据AppId:%s没有找到对应的秘钥", appId), null); + } + + Claims claim; + try { + claim = jwtTokenUtils.getClaimByToken(token, secret); + } catch (Exception e) { + String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); + logger.error("解析token失败:{}", errorStackTrace); + return fillAuthResult(false, "解析token失败", null); + } + + String appIdIn = (String)claim.get("appId"); + String customerId = (String)claim.get("customerId"); + Long timestamp = (Long)claim.get("ts"); + + //校验时间戳,允许5分钟误差 + if (StringUtils.isAnyBlank(appIdIn, customerId) || timestamp == null) { + logger.error("access token不完整。{},{},{}", appIdIn, customerId, timestamp); + return fillAuthResult(false, "access token不完整。", null); + } + + // TODO 暂时去掉时间差判断 + //if (!validTimeStamp(timestamp)) { + // logger.error("服务器存在时差过大,请求被拒绝"); + // return fillAuthResult(false, "服务器存在时差过大,请求被拒绝", null); + //} + + if (!appId.equals(appIdIn)) { + logger.error("AppId不对应,token外部的:{}, token内部解析出来的:{}", appId, appIdIn); + return fillAuthResult(false, "Header中的AppId不匹配", null); + } + + return fillAuthResult(true, "解析成功,认证成功", customerId); + } +} diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java index 1c3a326c75..2e49c80102 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtTokenUtils.java @@ -75,11 +75,13 @@ public class ExtAppJwtTokenUtils { public static void genToken() { HashMap claim = new HashMap<>(); - claim.put("appId", "227fb75ae4baa820755aaf43bf7f0a69"); + claim.put("appId", "2c448b7da527055fbeebb628f8d3dcb0"); claim.put("customerId", "c1"); - claim.put("ts", System.currentTimeMillis() - 1000 * 60 * 4); + long ts = System.currentTimeMillis() - 1000 * 60 * 4; + System.out.println("时间戳:" + ts); + claim.put("ts", ts); - String abc = new ExtAppJwtTokenUtils().createToken(claim, "4a762660254c57996343f8ee42fbc0a6"); + String abc = new ExtAppJwtTokenUtils().createToken(claim, "d4b73db4cf8e46ef99fa1f95149c2791ef2396fded114dd09e406cbce83fc88a"); System.out.println(abc); } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppMD5AuthProcessor.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppMD5AuthProcessor.java new file mode 100644 index 0000000000..3954738758 --- /dev/null +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppMD5AuthProcessor.java @@ -0,0 +1,42 @@ +package com.epmet.utils.externalapp; + +import com.epmet.commons.tools.utils.Md5Util; +import com.epmet.dto.result.ExternalAppAuthResultDTO; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +/** + * md5 认证处理器 + */ +@Component +public class ExtAppMD5AuthProcessor extends ExtAppAuthProcessor { + + private static Logger logger = LoggerFactory.getLogger(ExtAppMD5AuthProcessor.class); + + public ExternalAppAuthResultDTO auth(String appId, String token, Long ts) { + if (ts == null) { + return fillAuthResult(false, "需要传入时间戳参数", null); + } + String secret; + if (StringUtils.isBlank(secret = getTokenByAppId(appId))) { + return fillAuthResult(false, String.format("根据AppId:%s没有找到对应的秘钥", appId), null); + } + + String localDigest = Md5Util.md5(secret.concat(":") + ts); + if (!localDigest.equals(token)) { + // 调用方生成的摘要跟本地生成的摘要不匹配 + return fillAuthResult(false, "签名不匹配,认证失败", null); + } + + // TODO 暂时去掉时间差判断 + //if (!validTimeStamp(ts)) { + // logger.error("服务器存在时差过大,请求被拒绝"); + // return fillAuthResult(false, "服务器存在时差过大,请求被拒绝", null); + //} + + return fillAuthResult(true, "签名匹配,认证成功", null); + } + +} From 14142d608dceb0d1bcd0d470541dd3062e38f6a7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 2 Sep 2020 15:33:06 +0800 Subject: [PATCH 274/360] =?UTF-8?q?=E5=8C=BA/=E8=A1=97=E9=81=93=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=88=86=E6=95=B0=E8=A1=A8,=E5=8C=BA=E7=9B=B4?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E5=88=86=E5=80=BC=E8=A1=A8=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/indexcal/AgencyScoreDTO.java | 117 ++++++++++++++++++ .../com/epmet/dto/indexcal/DeptScoreDTO.java | 112 +++++++++++++++++ .../epmet/dao/indexcoll/AgencyScoreDao.java | 33 +++++ .../com/epmet/dao/indexcoll/DeptScoreDao.java | 33 +++++ .../entity/indexcoll/AgencyScoreEntity.java | 87 +++++++++++++ .../entity/indexcoll/DeptScoreEntity.java | 87 +++++++++++++ .../service/indexcal/AgencyScoreService.java | 95 ++++++++++++++ .../service/indexcal/DeptScoreService.java | 95 ++++++++++++++ .../indexcal/IndexCalculateStreetService.java | 18 +++ .../indexcal/impl/AgencyScoreServiceImpl.java | 99 +++++++++++++++ .../indexcal/impl/DeptScoreServiceImpl.java | 99 +++++++++++++++ .../impl/IndexCalculateStreetServiceImpl.java | 26 ++++ .../mapper/indexcoll/AgencyScoreDao.xml | 6 + .../mapper/indexcoll/DeptScoreDao.xml | 6 + 14 files changed, 913 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/AgencyScoreDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/DeptScoreDao.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/DeptScoreEntity.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/AgencyScoreService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/DeptScoreService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCalculateStreetService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCalculateStreetServiceImpl.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml 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..6e18cb5867 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java @@ -0,0 +1,117 @@ +/** + * 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.dto.indexcal; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +public class AgencyScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id(eg:社区或者街道id) + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan + */ + private String indexCode; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java new file mode 100644 index 0000000000..b7a05696c3 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java @@ -0,0 +1,112 @@ +/** + * 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.dto.indexcal; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +public class DeptScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 治理能力:zhilinengli; + */ + private String indexCode; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/AgencyScoreDao.java new file mode 100644 index 0000000000..6a076c057c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/AgencyScoreDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexcoll.AgencyScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface AgencyScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/DeptScoreDao.java new file mode 100644 index 0000000000..101dc3b759 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/DeptScoreDao.java @@ -0,0 +1,33 @@ +/** + * 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.indexcoll; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.indexcoll.DeptScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface DeptScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java new file mode 100644 index 0000000000..02b9bf0fd1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java @@ -0,0 +1,87 @@ +/** + * 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.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_agency_score") +public class AgencyScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id(eg:社区或者街道id) + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan + */ + private String indexCode; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/DeptScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/DeptScoreEntity.java new file mode 100644 index 0000000000..4e6db805a5 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/DeptScoreEntity.java @@ -0,0 +1,87 @@ +/** + * 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.indexcoll; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_dept_score") +public class DeptScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 治理能力:zhilinengli; + */ + private String indexCode; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/AgencyScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/AgencyScoreService.java new file mode 100644 index 0000000000..6ff75f918f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/AgencyScoreService.java @@ -0,0 +1,95 @@ +/** + * 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.service.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.indexcoll.AgencyScoreEntity; + +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface AgencyScoreService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return AgencyScoreDTO + * @author generator + * @date 2020-09-02 + */ + AgencyScoreDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(AgencyScoreDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(AgencyScoreDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/DeptScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/DeptScoreService.java new file mode 100644 index 0000000000..5d6f090d97 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/DeptScoreService.java @@ -0,0 +1,95 @@ +/** + * 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.service.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcal.DeptScoreDTO; +import com.epmet.entity.indexcoll.DeptScoreEntity; + +import java.util.List; +import java.util.Map; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface DeptScoreService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return DeptScoreDTO + * @author generator + * @date 2020-09-02 + */ + DeptScoreDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(DeptScoreDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(DeptScoreDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCalculateStreetService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCalculateStreetService.java new file mode 100644 index 0000000000..27c5196b6f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCalculateStreetService.java @@ -0,0 +1,18 @@ +package com.epmet.service.indexcal; + +/** + * @Author zxc + * @DateTime 2020/9/2 3:11 下午 + */ +public interface IndexCalculateStreetService { + + /** + * @Description 计算街道相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + Boolean calStreetAll(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java new file mode 100644 index 0000000000..62be1fc75b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java @@ -0,0 +1,99 @@ +/** + * 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.service.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.indexcoll.AgencyScoreDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.indexcoll.AgencyScoreEntity; +import com.epmet.service.indexcal.AgencyScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +public class AgencyScoreServiceImpl extends BaseServiceImpl implements AgencyScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, AgencyScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public AgencyScoreDTO get(String id) { + AgencyScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java new file mode 100644 index 0000000000..611ebfee84 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java @@ -0,0 +1,99 @@ +/** + * 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.service.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.indexcoll.DeptScoreDao; +import com.epmet.dto.indexcal.DeptScoreDTO; +import com.epmet.entity.indexcoll.DeptScoreEntity; +import com.epmet.service.indexcal.DeptScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, DeptScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, DeptScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public DeptScoreDTO get(String id) { + DeptScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, DeptScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(DeptScoreDTO dto) { + DeptScoreEntity entity = ConvertUtils.sourceToTarget(dto, DeptScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DeptScoreDTO dto) { + DeptScoreEntity entity = ConvertUtils.sourceToTarget(dto, DeptScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCalculateStreetServiceImpl.java new file mode 100644 index 0000000000..44654ea7d6 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -0,0 +1,26 @@ +package com.epmet.service.indexcal.impl; + +import com.epmet.service.indexcal.IndexCalculateStreetService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Author zxc + * @DateTime 2020/9/2 3:11 下午 + */ +@Service +@Slf4j +public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetService { + + /** + * @Description 计算街道相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + @Override + public Boolean calStreetAll(String customerId, String monthId) { + return null; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml new file mode 100644 index 0000000000..8fc48a372d --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml new file mode 100644 index 0000000000..176c542927 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 09d0e5d94c6931f269a6df377a6a1f157cf8e8cf Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 2 Sep 2020 16:00:01 +0800 Subject: [PATCH 275/360] =?UTF-8?q?=E6=9C=89=E9=98=88=E5=80=BC=EF=BC=8C?= =?UTF-8?q?=E4=B8=94=E6=9C=80=E5=A4=A7=E5=80=BC>=E9=98=88=E5=80=BC?= =?UTF-8?q?=EF=BC=8C=E5=88=99=E6=9C=80=E5=A4=A7=E5=80=BC=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E4=B8=BA=E9=98=88=E5=80=BC=EF=BC=9BallRegion=3D=E3=80=8Bdistri?= =?UTF-8?q?ct?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/DeptGovrnAbilityFormDTO.java | 5 --- .../form/OrgGovrnAbilityFormDTO.java | 2 +- .../form/OrgPartyAbilityFormDTO.java | 2 +- .../form/OrgServiceAbilityFormDTO.java | 2 +- .../FactIndexGovrnAblityOrgMonthlyEntity.java | 2 +- .../FactIndexPartyAblityOrgMonthlyEntity.java | 2 +- ...actIndexServiceAblityOrgMonthlyEntity.java | 2 +- .../indexcal/DeptCorreLationService.java | 20 +++++++++++ .../impl/DeptCorreLationServiceImpl.java | 33 +++++++++++++++++++ .../impl/GridCorreLationServiceImpl.java | 5 +++ 10 files changed, 64 insertions(+), 11 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/DeptCorreLationService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptCorreLationServiceImpl.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java index 50cc040c44..b35ca1537a 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java @@ -40,11 +40,6 @@ public class DeptGovrnAbilityFormDTO implements Serializable { */ private String yearId; - /** - * allRegion:全区;community:社区;street:街道 - */ - private String dataType; - /** * 区直部门被吹哨次数 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java index 7ddb9e785a..1534955c75 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java @@ -41,7 +41,7 @@ public class OrgGovrnAbilityFormDTO implements Serializable { private String yearId; /** - * allRegion:全区;community:社区;street:街道 + * district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java index e5ad40ef3f..cc1401d424 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java @@ -41,7 +41,7 @@ public class OrgPartyAbilityFormDTO implements Serializable { private String yearId; /** - * allRegion:全区;community:社区;street:街道 + * district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java index 6ef48c6fa4..59050bced2 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java @@ -41,7 +41,7 @@ public class OrgServiceAbilityFormDTO implements Serializable { private String yearId; /** - * allRegion:全区;community:社区;street:街道 + * district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java index 94eec97d6f..115fbb4613 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -70,7 +70,7 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { private String yearId; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java index 1bf023f055..05c3c7ac95 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java @@ -74,7 +74,7 @@ public class FactIndexPartyAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer publishArticleCount; /** - * 数据类型 allRegion:全区;community:社区;street:街道 + * 数据类型 district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java index 8abeb1c172..de2f8ab6f7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java @@ -74,7 +74,7 @@ public class FactIndexServiceAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer activityCount; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/DeptCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/DeptCorreLationService.java new file mode 100644 index 0000000000..d40cf46f13 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/DeptCorreLationService.java @@ -0,0 +1,20 @@ +package com.epmet.service.indexcal; + +import com.epmet.dto.indexcal.CalculateCommonFormDTO; + +/** + * 区直部门指标计算 + * + * @author yinzuomei@elink-cn.com + * @date 2020/9/2 14:57 + */ +public interface DeptCorreLationService { + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptCorreLationServiceImpl.java new file mode 100644 index 0000000000..70769882f8 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptCorreLationServiceImpl.java @@ -0,0 +1,33 @@ +package com.epmet.service.indexcal.impl; + +import com.epmet.dao.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.service.indexcal.DeptCorreLationService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 区直部门指标计算 + * + * @author yinzuomei@elink-cn.com + * @date 2020/9/2 14:58 + */ +@Slf4j +@Service +public class DeptCorreLationServiceImpl implements DeptCorreLationService { + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + return null; + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 6bb15d784d..3719f5138b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -433,6 +433,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, From f9b1f60b9b35a791e77ed5462f8d5ab07c8f2f2b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 2 Sep 2020 16:08:38 +0800 Subject: [PATCH 276/360] =?UTF-8?q?=E8=A1=97=E9=81=93=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/indexcal/AgencyScoreDTO.java | 5 +++ .../com/epmet/dto/indexcal/DeptScoreDTO.java | 5 +++ .../AgencyScoreDao.java | 27 +++++++++++- .../DeptScoreDao.java | 2 +- .../screen/FactIndexCommunityScoreDao.java | 2 +- .../entity/indexcoll/AgencyScoreEntity.java | 5 +++ .../indexcal/impl/AgencyScoreServiceImpl.java | 2 +- .../indexcal/impl/DeptScoreServiceImpl.java | 2 +- .../mapper/indexcoll/AgencyScoreDao.xml | 41 ++++++++++++++++++- .../mapper/indexcoll/DeptScoreDao.xml | 2 +- 10 files changed, 85 insertions(+), 8 deletions(-) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/{indexcoll => indexscore}/AgencyScoreDao.java (60%) rename epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/{indexcoll => indexscore}/DeptScoreDao.java (96%) 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 index 6e18cb5867..59c0d906c8 100644 --- 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 @@ -84,6 +84,11 @@ public class AgencyScoreDTO implements Serializable { */ private String indexCode; + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + /** * */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java index b7a05696c3..5051aa3d82 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java @@ -84,6 +84,11 @@ public class DeptScoreDTO implements Serializable { */ private String indexCode; + /** + * + */ + private Integer delFlag; + /** * 乐观锁 */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/AgencyScoreDao.java similarity index 60% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/AgencyScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/AgencyScoreDao.java index 6a076c057c..245d72e3fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/AgencyScoreDao.java @@ -15,11 +15,15 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.indexscore; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.entity.indexcoll.AgencyScoreEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 区/街道相关分数表 @@ -29,5 +33,24 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface AgencyScoreDao extends BaseDao { - + + /** + * @Description 【街道】中间表插入 + * @param lists + * @author zxc + * @date 2020/8/27 5:05 下午 + */ + void insertStreetRecord(@Param("lists") List lists); + + /** + * @Description 删除旧记录 + * @param customerId + * @param monthId + * @param indexCode + * @author zxc + * @date 2020/9/2 15:47 + */ + void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + + } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/DeptScoreDao.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/DeptScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/DeptScoreDao.java index 101dc3b759..6a3d15d529 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/DeptScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/DeptScoreDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.indexscore; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.indexcoll.DeptScoreEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java index 607132ea18..0ae188f0c9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java @@ -35,7 +35,7 @@ import java.util.List; public interface FactIndexCommunityScoreDao extends BaseDao { /** - * @Description 党建能力【社区】中间表插入 + * @Description 【社区】中间表插入 * @param lists * @author zxc * @date 2020/8/27 5:05 下午 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java index 02b9bf0fd1..4b6182e30f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/AgencyScoreEntity.java @@ -84,4 +84,9 @@ public class AgencyScoreEntity extends BaseEpmetEntity { */ private String indexCode; + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java index 62be1fc75b..2d84d1326d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/AgencyScoreServiceImpl.java @@ -23,7 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.dao.indexcoll.AgencyScoreDao; +import com.epmet.dao.indexscore.AgencyScoreDao; import com.epmet.dto.indexcal.AgencyScoreDTO; import com.epmet.entity.indexcoll.AgencyScoreEntity; import com.epmet.service.indexcal.AgencyScoreService; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java index 611ebfee84..da1f056c19 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/DeptScoreServiceImpl.java @@ -23,7 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.dao.indexcoll.DeptScoreDao; +import com.epmet.dao.indexscore.DeptScoreDao; import com.epmet.dto.indexcal.DeptScoreDTO; import com.epmet.entity.indexcoll.DeptScoreEntity; import com.epmet.service.indexcal.DeptScoreService; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml index 8fc48a372d..d19bf16699 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/AgencyScoreDao.xml @@ -1,6 +1,45 @@ - + + + + INSERT INTO fact_index_agency_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, IS_TOTAL, SCORE, INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) + VALUES + + ( + REPLACE ( UUID(), '-', '' ), + #{item.customerId}, + #{item.agencyId}, + #{item.parentAgencyId}, + #{item.yearId}, + #{item.quarterId}, + #{item.monthId}, + #{item.dataType}, + #{item.isTotal}, + #{item.score}, + #{item.indexCode}, + #{item.delFlag}, + #{item.revision}, + #{item.createdBy}, + NOW(), + #{item.updatedBy}, + NOW() + ) + + + + + + DELETE + FROM + fact_index_agency_score + WHERE + del_flag = '0' + AND customer_id = #{customerId} + AND month_id = #{monthId} + AND index_code = #{indexCode} + AND data_type = #{dateType} + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml index 176c542927..380d746009 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexcoll/DeptScoreDao.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file From af9298e087d457ebe7ccb292e2b09ce684b94d6e Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 2 Sep 2020 16:21:50 +0800 Subject: [PATCH 277/360] =?UTF-8?q?=E9=98=88=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CpcIndexCalculateServiceImpl.java | 19 ++++-- .../mapper/indexscore/CpcScoreDao.xml | 6 +- .../stats/test/normalizing/DemoScoreCal.java | 64 +++++++++++++++++++ 3 files changed, 81 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java index fd79fc52e9..5afa73df18 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -88,16 +88,17 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } - //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + //自建群活跃度——议题转项目率 有阈值 >60%按60%算 BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); log.info("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); totalEntity.setScore(totalEntity.getScore().add(total)); } }); - insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); } - private void insertBatch(Collection values) { + private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { + cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); cpcScoreDao.insertBatch(values); } @@ -198,14 +199,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.insertBatch(list); + this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); } @@ -234,9 +235,13 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); - minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); - + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + //如果最大值超过阈值 则最大值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml index c3483cbc32..0eb4b7774a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/indexscore/CpcScoreDao.xml @@ -19,7 +19,11 @@ - delete from fact_index_cpc_score where CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and MONTH_ID = #{monthId,jdbcType=VARCHAR} and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} + delete from fact_index_cpc_score + where + CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} + and MONTH_ID = #{monthId,jdbcType=VARCHAR} + and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexCodeFieIdReDao.xml similarity index 79% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexCodeFieIdReDao.xml index 77c97cefa2..fe6a2ad9c9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexCodeFieIdReDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexCodeFieIdReDao.xml @@ -1,7 +1,7 @@ - + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexDictDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexDictDao.xml similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexDictDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexDictDao.xml index a91513e1d5..146fddddb2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexDictDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexDictDao.xml @@ -1,7 +1,7 @@ - + delete from index_dict diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDao.xml similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml rename to epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDao.xml index 4597456ae7..668ba89e2d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/IndexGroupDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDao.xml @@ -1,7 +1,7 @@ - + + - SELECT org_name AS NAME, index_total AS totalIndex, From cbf4295b351e01fb64753c328f34aaa7f19c1e32 Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 2 Sep 2020 17:17:15 +0800 Subject: [PATCH 285/360] =?UTF-8?q?mapper=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 30178d25a0..4122ee8d29 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 @@ -16,7 +16,7 @@ AND org_type = 'agency' AND org_id = #{agencyId} - + AND month_id = DATE_FORMAT(NOW(),'%Y%m') From f5ffb40bbf079d15040e136cc22dfa39620b9ef2 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 2 Sep 2020 17:18:44 +0800 Subject: [PATCH 286/360] =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/impl/FactIndexCollectServiceImpl.java | 1 + .../evaluationindex/screen/impl/IndexDictServiceImpl.java | 3 +++ .../screen/impl/IndexGroupDetailServiceImpl.java | 3 +++ .../screen/impl/IndexGroupDetailTemplateServiceImpl.java | 3 +++ .../evaluationindex/screen/impl/IndexGroupServiceImpl.java | 3 +++ .../screen/impl/IndexGroupTemplateServiceImpl.java | 3 +++ .../evaluationindex/screen/impl/ScreenCollServiceImpl.java | 1 + .../resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml | 2 +- 8 files changed, 18 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 747daa3a09..0e4136eccb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -17,6 +17,7 @@ import java.util.List; * @Date: 2020-08-20 10:05 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class FactIndexCollectServiceImpl implements FactIndexCollectService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexDictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexDictServiceImpl.java index ba47768775..759270bf09 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexDictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexDictServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.evaluationindex.screen.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.IndexDictDao; import com.epmet.entity.evaluationindex.screen.IndexDictEntity; import com.epmet.service.evaluationindex.screen.IndexDictService; @@ -32,6 +34,7 @@ import java.util.Collection; * @since v1.0.0 2020-08-19 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class IndexDictServiceImpl extends BaseServiceImpl implements IndexDictService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java index ffe55de1ea..8a81ca0af0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java @@ -17,9 +17,11 @@ package com.epmet.service.evaluationindex.screen.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.IndexGroupDetailDao; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; @@ -34,6 +36,7 @@ import java.util.List; * @since v1.0.0 2020-08-19 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class IndexGroupDetailServiceImpl extends BaseServiceImpl implements IndexGroupDetailService { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailTemplateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailTemplateServiceImpl.java index 8d86028a72..dd0d811cfd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailTemplateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailTemplateServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.evaluationindex.screen.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.IndexGroupDetailTemplateDao; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; @@ -32,6 +34,7 @@ import java.util.Collection; * @since v1.0.0 2020-08-19 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class IndexGroupDetailTemplateServiceImpl extends BaseServiceImpl implements IndexGroupDetailTemplateService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupServiceImpl.java index 2cf73e9f24..e455120eef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupServiceImpl.java @@ -17,10 +17,12 @@ package com.epmet.service.evaluationindex.screen.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.UniqueIdGenerator; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.IndexGroupDao; import com.epmet.dao.evaluationindex.screen.IndexGroupDetailDao; import com.epmet.dao.evaluationindex.screen.IndexGroupDetailTemplateDao; @@ -51,6 +53,7 @@ import java.util.stream.Collectors; */ @Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class IndexGroupServiceImpl extends BaseServiceImpl implements IndexGroupService { @Autowired private IndexGroupTemplateDao indexGroupTemplateDao; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupTemplateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupTemplateServiceImpl.java index 02137da3d2..868e422b02 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupTemplateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupTemplateServiceImpl.java @@ -17,7 +17,9 @@ package com.epmet.service.evaluationindex.screen.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.constant.DataSourceConstant; import com.epmet.dao.evaluationindex.screen.IndexGroupTemplateDao; import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; @@ -32,6 +34,7 @@ import java.util.Collection; * @since v1.0.0 2020-08-19 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class IndexGroupTemplateServiceImpl extends BaseServiceImpl implements IndexGroupTemplateService { @Override diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCollServiceImpl.java index 54e0ef9f1f..8a40a66ed5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCollServiceImpl.java @@ -43,6 +43,7 @@ import java.util.List; * @since v1.0.0 2020-05-11 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class ScreenCollServiceImpl implements ScreenCollService { @Autowired diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml index 32faa3b7d4..3f38b0dbbc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml @@ -26,7 +26,7 @@ and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} - select CUSTOMER_ID,AGENCY_ID,GRID_ID,YEAR_ID,MONTH_ID,USER_ID,SCORE,INDEX_CODE FROM fact_index_cpc_score WHERE From ec29fcc834ce427bbfe5f41ec115147a901523e0 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 2 Sep 2020 17:36:17 +0800 Subject: [PATCH 287/360] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=EF=BC=8C=E5=8C=85=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/constant/DataSourceConstant.java | 2 +- .../screen/constant/ScreenConstant.java | 2 +- .../screen/dto/form/AgencyAndNumFormDTO.java | 2 +- .../screen/dto/form/AgencyFormDTO.java | 2 +- .../dto/form/AgencyNumTypeParamFormDTO.java | 2 +- .../dto/form/BranchBuildRankFormDTO.java | 2 +- .../dto/form/BranchBuildTrendFormDTO.java | 2 +- .../screen/dto/form/BranchFormDTO.java | 2 +- .../screen/dto/form/CompartmentFormDTO.java | 2 +- .../dto/form/ContactMassLineChartFormDTO.java | 2 +- .../screen/dto/form/FineExampleFormDTO.java | 2 +- .../screen/dto/form/MonthBarchartFormDTO.java | 2 +- .../screen/dto/form/MonthPieChartFormDTO.java | 2 +- .../screen/dto/form/ParymemberFormDTO.java | 2 +- .../screen/dto/form/ProjectDetailFormDTO.java | 2 +- .../screen/dto/form/ProjectFormDTO.java | 2 +- .../dto/form/SubAgencyIndexRankFormDTO.java | 2 +- .../screen/dto/form/TopProfileFormDTO.java | 2 +- .../screen/dto/form/UserFormDTO.java | 2 +- .../dto/form/VolunteerServiceFormDTO.java | 2 +- .../dto/form/YearAverageIndexFormDTO.java | 2 +- .../result/AdvanceBranchRankResultDTO.java | 2 +- .../result/AgencyDistributionResultDTO.java | 2 +- .../BranchBuildOrderByCountResultDTO.java | 2 +- .../dto/result/BranchBuildRankResultDTO.java | 2 +- .../dto/result/BranchBuildTrendResultDTO.java | 2 +- .../dto/result/BranchIssueDataResultDTO.java | 2 +- .../screen/dto/result/BranchResultDTO.java | 2 +- .../BranchTrendSeriesDataResultDTO.java | 2 +- .../dto/result/CompartmentResultDTO.java | 2 +- .../result/ContactMassLineChartResult.java | 2 +- .../result/ContactMassLineChartResultDTO.java | 2 +- .../dto/result/DifficultProjectResultDTO.java | 2 +- .../dto/result/FineExampleResultDTO.java | 2 +- .../result/GovernCapacityRankResultDTO.java | 2 +- .../dto/result/GovernCapacityResultDTO.java | 2 +- .../dto/result/MonthBarchartResult.java | 2 +- .../dto/result/MonthBarchartResultDTO.java | 3 +- .../dto/result/MonthPieChartResultDTO.java | 2 +- .../dto/result/OrgRankDataResultDTO.java | 2 +- .../dto/result/PartyUserPointResultDTO.java | 2 +- .../PartymemberAgeDistributionResultDTO.java | 2 +- .../PartymemberAgePercentResultDTO.java | 2 +- .../result/PartymemberPercentResultDTO.java | 2 +- .../ParymemberDistributionResultDTO.java | 2 +- .../dto/result/ParymemberResultDTO.java | 2 +- .../dto/result/ProjectDetailResultDTO.java | 2 +- .../screen/dto/result/ProjectResultDTO.java | 2 +- .../dto/result/PublicPartiChartResultDTO.java | 2 +- .../result/PublicPartiProfileResultDTO.java | 2 +- .../dto/result/PublicPartiRankResultDTO.java | 2 +- .../result/SubAgencyIndexRankResultDTO.java | 2 +- .../dto/result/TopProfileResultDTO.java | 2 +- .../screen/dto/result/TreeResultDTO.java | 2 +- .../dto/result/UserDistributionResultDTO.java | 2 +- .../UserJoinIndicatorGrowthRateResultDTO.java | 2 +- .../dto/result/UserJoinMonthlyResultDTO.java | 3 +- .../dto/result/UserPointRankResultDTO.java | 2 +- .../screen/dto/result/UserPointResultDTO.java | 2 +- .../screen/dto/result/UserResultDTO.java | 2 +- .../dto/result/VolunteerServiceResult.java | 2 +- .../dto/result/VolunteerServiceResultDTO.java | 2 +- .../dto/result/YearAverageIndexResultDTO.java | 2 +- .../data-report/data-report-server/pom.xml | 6 ++++ .../controller/screen/AgencyController.java | 8 ++--- .../screen/DistributionController.java | 6 ++-- .../screen/GrassRootsGovernController.java | 10 +++--- .../screen/GrassrootsPartyDevController.java | 16 ++++----- .../controller/screen/IndexController.java | 19 +++++------ .../screen/PartyMemberLeadController.java | 6 ++-- .../screen/ScreenProjectController.java | 6 ++-- .../screen/ScreenCpcBaseDataDao.java | 4 +-- .../screen/ScreenCustomerAgencyDao.java | 4 +-- .../screen/ScreenCustomerDeptDao.java | 2 +- .../screen/ScreenCustomerGridDao.java | 4 +-- .../screen/ScreenDifficultyDataDao.java | 4 +-- .../screen/ScreenEventDataDao.java | 6 ++-- .../screen/ScreenEventImgDataDao.java | 2 +- .../screen/ScreenGovernRankDataDao.java | 4 +-- .../screen/ScreenIndexDataMonthlyDao.java | 11 +++--- .../screen/ScreenIndexDataYearlyDao.java | 4 +-- .../screen/ScreenOrgRankDataDao.java | 4 +-- .../screen/ScreenPartyBranchDataDao.java | 8 ++--- .../screen/ScreenPartyLinkMassesDataDao.java | 4 +-- .../screen/ScreenPartyUserRankDataDao.java | 6 ++-- .../screen/ScreenPioneerDataDao.java | 4 +-- .../screen/ScreenPublicPartiTotalDataDao.java | 5 ++- .../screen/ScreenUserJoinDao.java | 6 ++-- .../screen/ScreenUserTotalDataDao.java | 8 ++--- .../screen/AgencyService.java | 11 +++--- .../screen/DistributionService.java | 6 ++-- .../screen/GrassRootsGovernService.java | 10 +++--- .../screen/GrassrootsPartyDevService.java | 16 ++++----- .../screen/IndexService.java | 20 +++++------ .../screen/PartyMemberLeadService.java | 12 +++---- .../screen/ScreenProjectService.java | 6 ++-- .../screen/impl/AgencyServiceImpl.java | 23 +++++++------ .../screen/impl/DistributionServiceImpl.java | 29 ++++++++-------- .../impl/GrassRootsGovernServiceImpl.java | 25 +++++++------- .../impl/GrassrootsPartyDevServiceImpl.java | 29 ++++++++-------- .../screen/impl/IndexServiceImpl.java | 28 +++++++-------- .../impl/PartyMemberLeadServiceImpl.java | 34 ++++++++----------- .../screen/impl/ScreenProjectServiceImpl.java | 15 ++++---- .../src/main/resources/bootstrap.yml | 5 +++ .../src/main/resources/logback-spring.xml | 2 +- .../mapper/screen/ScreenCpcBaseDataDao.xml | 4 +-- .../mapper/screen/ScreenCustomerAgencyDao.xml | 14 ++++---- .../mapper/screen/ScreenCustomerDeptDao.xml | 2 +- .../mapper/screen/ScreenCustomerGridDao.xml | 12 +++---- .../mapper/screen/ScreenDifficultyDataDao.xml | 4 +-- .../mapper/screen/ScreenEventDataDao.xml | 6 ++-- .../mapper/screen/ScreenEventImgDataDao.xml | 2 +- .../mapper/screen/ScreenGovernRankDataDao.xml | 4 +-- .../screen/ScreenIndexDataMonthlyDao.xml | 8 ++--- .../screen/ScreenIndexDataYearlyDao.xml | 4 +-- .../mapper/screen/ScreenOrgRankDataDao.xml | 4 +-- .../screen/ScreenPartyBranchDataDao.xml | 8 ++--- .../screen/ScreenPartyLinkMassesDataDao.xml | 4 +-- .../screen/ScreenPartyUserRankDataDao.xml | 6 ++-- .../mapper/screen/ScreenPioneerDataDao.xml | 4 +-- .../screen/ScreenPublicPartiTotalDataDao.xml | 4 +-- .../mapper/screen/ScreenUserJoinDao.xml | 6 ++-- .../mapper/screen/ScreenUserTotalDataDao.xml | 8 ++--- 123 files changed, 336 insertions(+), 334 deletions(-) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/constant/ScreenConstant.java (82%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/AgencyAndNumFormDTO.java (93%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/AgencyFormDTO.java (92%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/AgencyNumTypeParamFormDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/BranchBuildRankFormDTO.java (96%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/BranchBuildTrendFormDTO.java (96%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/BranchFormDTO.java (89%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/CompartmentFormDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/ContactMassLineChartFormDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/FineExampleFormDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/MonthBarchartFormDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/MonthPieChartFormDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/ParymemberFormDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/ProjectDetailFormDTO.java (92%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/ProjectFormDTO.java (89%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/SubAgencyIndexRankFormDTO.java (93%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/TopProfileFormDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/UserFormDTO.java (89%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/VolunteerServiceFormDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/form/YearAverageIndexFormDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/AdvanceBranchRankResultDTO.java (95%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/AgencyDistributionResultDTO.java (92%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/BranchBuildOrderByCountResultDTO.java (89%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/BranchBuildRankResultDTO.java (92%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/BranchBuildTrendResultDTO.java (95%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/BranchIssueDataResultDTO.java (87%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/BranchResultDTO.java (89%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/BranchTrendSeriesDataResultDTO.java (91%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/CompartmentResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/ContactMassLineChartResult.java (89%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/ContactMassLineChartResultDTO.java (93%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/DifficultProjectResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/FineExampleResultDTO.java (96%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/GovernCapacityRankResultDTO.java (93%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/GovernCapacityResultDTO.java (93%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/MonthBarchartResult.java (88%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/MonthBarchartResultDTO.java (88%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/MonthPieChartResultDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/OrgRankDataResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/PartyUserPointResultDTO.java (92%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/PartymemberAgeDistributionResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/PartymemberAgePercentResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/PartymemberPercentResultDTO.java (93%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/ParymemberDistributionResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/ParymemberResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/ProjectDetailResultDTO.java (93%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/ProjectResultDTO.java (92%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/PublicPartiChartResultDTO.java (92%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/PublicPartiProfileResultDTO.java (95%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/PublicPartiRankResultDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/SubAgencyIndexRankResultDTO.java (92%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/TopProfileResultDTO.java (92%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/TreeResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/UserDistributionResultDTO.java (93%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/UserJoinMonthlyResultDTO.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/UserPointRankResultDTO.java (91%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/UserPointResultDTO.java (87%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/UserResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/VolunteerServiceResult.java (90%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/VolunteerServiceResultDTO.java (94%) rename epmet-module/data-report/data-report-client/src/main/java/com/epmet/{ => evaluationindex}/screen/dto/result/YearAverageIndexResultDTO.java (91%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenCpcBaseDataDao.java (89%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenCustomerAgencyDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenCustomerDeptDao.java (94%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenCustomerGridDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenDifficultyDataDao.java (90%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenEventDataDao.java (87%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenEventImgDataDao.java (95%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenGovernRankDataDao.java (90%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenIndexDataMonthlyDao.java (83%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenIndexDataYearlyDao.java (89%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenOrgRankDataDao.java (90%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenPartyBranchDataDao.java (90%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenPartyLinkMassesDataDao.java (90%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenPartyUserRankDataDao.java (88%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenPioneerDataDao.java (90%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenPublicPartiTotalDataDao.java (89%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenUserJoinDao.java (87%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/{ => evaluationindex}/screen/ScreenUserTotalDataDao.java (89%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/AgencyService.java (68%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/DistributionService.java (87%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/GrassRootsGovernService.java (86%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/GrassrootsPartyDevService.java (71%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/IndexService.java (64%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/PartyMemberLeadService.java (79%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/ScreenProjectService.java (63%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/impl/AgencyServiceImpl.java (85%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/impl/DistributionServiceImpl.java (79%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/impl/GrassRootsGovernServiceImpl.java (91%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/impl/GrassrootsPartyDevServiceImpl.java (90%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/impl/IndexServiceImpl.java (88%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/impl/PartyMemberLeadServiceImpl.java (90%) rename epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/{ => evaluationindex}/screen/impl/ScreenProjectServiceImpl.java (68%) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java index b640b06b67..d1e438d81a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java @@ -5,7 +5,7 @@ public interface DataSourceConstant { /** * 统计数据库 */ - String STATS = "stats"; + String EVALUATION_INDEX = "evaluationIndex"; String STATS_DISPLAY = "statsDisplay"; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java similarity index 82% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java index b1a25cf947..e3ac468fcf 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java @@ -1,4 +1,4 @@ -package com.epmet.screen.constant; +package com.epmet.evaluationindex.screen.constant; /** * @Author zxc diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java index a20c10ce80..cd31c9688b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyFormDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyFormDTO.java index a9e479e3a5..166c9c2aa9 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyNumTypeParamFormDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyNumTypeParamFormDTO.java index 04dfc0625e..9e2e3c74a9 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyNumTypeParamFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildRankFormDTO.java similarity index 96% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildRankFormDTO.java index 458f2e4af5..43604bceb3 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildRankFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildTrendFormDTO.java similarity index 96% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildTrendFormDTO.java index 1d68458b20..9a0edf4677 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildTrendFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchFormDTO.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchFormDTO.java index 89a7bc5eaa..4094c81647 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentFormDTO.java index 3571ff7bb6..dd4be9746b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java index e82038de21..c2deeac60b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java index 1840c3048b..5ed5b9fc1a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java index ad454ff8dc..b6e0141d6a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java index 0c188f427e..a5e9c53f26 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java index ee06b313d1..fdf525f37b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectDetailFormDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectDetailFormDTO.java index 88744ad004..756095fe1c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectDetailFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectFormDTO.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectFormDTO.java index 445cefc453..6c906e906f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java index 3410d0638f..608c6b0492 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/TopProfileFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/TopProfileFormDTO.java index 6b0d00dae1..ffe73581a2 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/TopProfileFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/UserFormDTO.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/UserFormDTO.java index 4a3b23da00..31b432e725 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/UserFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/VolunteerServiceFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/VolunteerServiceFormDTO.java index 510bb5ec41..6df6c28ba1 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/VolunteerServiceFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java index 80d526bd48..e53a94cfa9 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AdvanceBranchRankResultDTO.java similarity index 95% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AdvanceBranchRankResultDTO.java index 912aedc1df..60545c7fc4 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AdvanceBranchRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java index da0a5a389e..753cf368dd 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildOrderByCountResultDTO.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildOrderByCountResultDTO.java index d6ba6ae18b..60448888de 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildOrderByCountResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildRankResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildRankResultDTO.java index f7593319e1..f9c08afaea 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildTrendResultDTO.java similarity index 95% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildTrendResultDTO.java index ee30981a68..fc3fc3958d 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildTrendResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchIssueDataResultDTO.java similarity index 87% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchIssueDataResultDTO.java index 65a6888047..7708001e26 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchIssueDataResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchResultDTO.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchResultDTO.java index f4a611cc10..431859c7d3 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchTrendSeriesDataResultDTO.java similarity index 91% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchTrendSeriesDataResultDTO.java index 7d5f415547..c1a921508f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchTrendSeriesDataResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/CompartmentResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/CompartmentResultDTO.java index 2bf8ffd3d6..b959cf8ea7 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/CompartmentResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResult.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResult.java index e77c336fbe..2cac006003 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResult.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResultDTO.java index 5a2b93acd9..69b5244ae0 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DifficultProjectResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DifficultProjectResultDTO.java index e89155d00c..fb37328232 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DifficultProjectResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/FineExampleResultDTO.java similarity index 96% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/FineExampleResultDTO.java index a81f45fc05..b522e3166c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/FineExampleResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityRankResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityRankResultDTO.java index 318b290840..0f6b481e1c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java index dd2c09cd94..f51fe26255 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java similarity index 88% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java index ebf0d9d276..ef79775673 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java similarity index 88% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java index 479547a883..ad21904ba2 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java @@ -1,6 +1,5 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java index 248f69d5ce..89ca2fd383 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java index 87a8d482c9..9aff92593f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartyUserPointResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartyUserPointResultDTO.java index 5ae10cb73e..3450a623a6 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartyUserPointResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgeDistributionResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgeDistributionResultDTO.java index 6ae70d9a67..4f9785b6b4 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgeDistributionResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgePercentResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgePercentResultDTO.java index c5eec4d539..4a301f0ca0 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgePercentResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberPercentResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberPercentResultDTO.java index eb8bc35184..a8ea84d711 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberPercentResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberDistributionResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberDistributionResultDTO.java index 180d6fd3c8..71efdac8ff 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberDistributionResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberResultDTO.java index 710ce303aa..a435dea3d3 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectDetailResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectDetailResultDTO.java index 234fe38034..6ad86b371f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectDetailResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectResultDTO.java index 7a0a016b25..5eb58d4f4f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiChartResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiChartResultDTO.java index 45f4f801ce..8f9ab22851 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiChartResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java similarity index 95% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java index 52a127fd77..c5744d0cdd 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiRankResultDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiRankResultDTO.java index b151901bdf..6d4eba5f4b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java index 5b0d89f39f..246b374752 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TopProfileResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TopProfileResultDTO.java index 607891f5bf..55c281db6c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TopProfileResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TreeResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TreeResultDTO.java index 0f28cda5b2..8de1c1d377 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TreeResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserDistributionResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserDistributionResultDTO.java index de772f423b..2476f0497b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserDistributionResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java index cf870c9b18..a64f02a279 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinMonthlyResultDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinMonthlyResultDTO.java index b35ce13c58..3b91a42d4e 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinMonthlyResultDTO.java @@ -1,7 +1,8 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; + import java.io.Serializable; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointRankResultDTO.java similarity index 91% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointRankResultDTO.java index 43cc73e066..3a1330fa46 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointResultDTO.java similarity index 87% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointResultDTO.java index 1f38d6886e..b58be28ff1 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserResultDTO.java index 592b3fd4af..f46da9b45e 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResult.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResult.java index bc2d53edff..4ef1fd076a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResult.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResultDTO.java index e255f61124..e0df20afee 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/YearAverageIndexResultDTO.java similarity index 91% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/YearAverageIndexResultDTO.java index d05479d5d2..21c82e2e66 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/YearAverageIndexResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index 455ddbe25f..6e97f8c65d 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -123,6 +123,12 @@ epmet_data_stats_display_user EpmEt-db-UsEr + + + + epmet_evaluation_index_user + EpmEt-db-UsEr + 0 192.168.1.130 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 7d4fcfe070..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 @@ -3,10 +3,10 @@ package com.epmet.datareport.controller.screen; 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.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.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; 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 935dd13830..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 @@ -2,9 +2,9 @@ package com.epmet.datareport.controller.screen; 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.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; 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 3cad80832d..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 @@ -2,11 +2,11 @@ package com.epmet.datareport.controller.screen; 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; 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 34823bd3fd..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 @@ -2,14 +2,14 @@ package com.epmet.datareport.controller.screen; 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; 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 ba4a24ec52..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,17 +1,16 @@ package com.epmet.datareport.controller.screen; -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; 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 0f3fe32130..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 @@ -2,9 +2,9 @@ package com.epmet.datareport.controller.screen; 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; 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 79d61f5f75..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 @@ -2,9 +2,9 @@ package com.epmet.datareport.controller.screen; 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; 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 95% 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 ec6a2e7ee1..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,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/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 87% 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 24604bf1de..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; 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 83% 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 57f0398615..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; 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 90% 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 f28a23354b..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; 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/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java similarity index 89% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java index 02d7e0c722..88c2aa0e77 100644 --- 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/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java @@ -15,10 +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.commons.mybatis.dao.BaseDao; -import com.epmet.screen.dto.result.PublicPartiRankResultDTO; +import com.epmet.evaluationindex.screen.dto.result.PublicPartiRankResultDTO; 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/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 89% 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 2230e636b9..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,15 +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.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; - /** * 中央区-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 * 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 64% 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 5f840c2369..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,13 +1,13 @@ -package com.epmet.datareport.service.screen; - -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; 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/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java similarity index 85% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 0727ebfbde..6eef8b2387 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/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -1,17 +1,17 @@ -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.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 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; @@ -25,6 +25,7 @@ import java.util.List; * @date 2020/8/18 10:18 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class AgencyServiceImpl implements AgencyService { @Autowired @@ -38,7 +39,7 @@ public class AgencyServiceImpl implements AgencyService { * @author zxc * @date 2020/8/18 2:04 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) { // 1. 查询客户根组织ID @@ -118,7 +119,7 @@ public class AgencyServiceImpl implements AgencyService { * @author zxc * @date 2020/8/18 2:33 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO) { CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(compartmentFormDTO.getAgencyId()); 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 91% 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 c1ad6a3eca..bf8fe359d2 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,17 +1,17 @@ -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; @@ -31,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 @@ -54,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 @@ -78,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()){ @@ -99,7 +100,7 @@ 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) { @@ -130,7 +131,7 @@ 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()){ @@ -155,7 +156,7 @@ 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); 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 90% 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 a4cbbc87da..a336d356cc 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,20 +1,19 @@ -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.service.screen.GrassrootsPartyDevService; +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.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; @@ -23,7 +22,6 @@ 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; @@ -34,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); @@ -55,7 +54,7 @@ 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) { @@ -84,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()); @@ -98,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())){ @@ -183,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())){ 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 88% 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 fa1e261128..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,18 +1,17 @@ -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.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.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.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; @@ -31,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 @@ -48,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()); @@ -64,7 +64,7 @@ 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) { @@ -89,7 +89,7 @@ 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) { MonthBarchartResultDTO result = new MonthBarchartResultDTO(); @@ -170,7 +170,7 @@ 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); 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 90% 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 8d85e51d8f..61fe56778d 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,23 +1,19 @@ -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; @@ -27,7 +23,6 @@ import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.time.LocalDate; import java.util.*; -import java.util.stream.Collectors; /** * 党建引领相关各指标查询 @@ -36,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 @@ -57,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()); @@ -89,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(); @@ -122,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(); @@ -207,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()){ @@ -245,7 +241,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 68% 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 e617449458..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,7 +33,7 @@ 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(),projectDetailFormDTO.getAgencyId()); 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 44b522b30b..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: 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 ea81aca726..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 @@ -149,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 ef851d6a08..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 @@ - + - SELECT SUM( AGE_LEVEL_1 ) + SUM( AGE_LEVEL_2 ) AS under30Count, SUM( AGE_LEVEL_3 ) + SUM( AGE_LEVEL_4 ) AS between31And50Count, 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 f66aef3609..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,10 +1,10 @@ - + - SELECT agency_name AS label, agency_id AS value, @@ -20,7 +20,7 @@ - SELECT agency_id AS value, agency_name AS label, @@ -37,7 +37,7 @@ - SELECT agency_id AS agencyId, agency_name AS name, @@ -51,7 +51,7 @@ - SELECT agency_id AS subId, agency_name AS subName, @@ -66,7 +66,7 @@ - SELECT sutd.org_id AS subId, sca.center_mark AS centerMark, @@ -84,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 01d3f4da7d..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, @@ -32,7 +32,7 @@ - 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, @@ -68,7 +68,7 @@ - SELECT grid_id AS value, grid_name AS label, 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 630befedcd..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,10 +1,10 @@ - + - SELECT diff.EVENT_ID AS projectId, diff.EVENT_CONTENT AS title, 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 750439bb3e..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,10 +1,10 @@ - + - SELECT IFNULL(event_title,'') AS projectTitle, event_level AS color, @@ -20,7 +20,7 @@ - SELECT event_content AS projectContent, event_status_desc AS STATUS, 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 @@ - + + + - SELECT month_id AS monthId, service_ablity AS serviceAbility, @@ -44,7 +44,7 @@ - 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 97292b4797..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, 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 2b20c44880..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 @@ - + - SELECT MONTH_ID, MEET_CATEGORY_NAME AS issue, @@ -38,7 +38,7 @@ - SELECT ORG_NAME, SUM( ORGANIZE_COUNT ) AS organizeData , @@ -69,7 +69,7 @@ - SELECT month_id AS monthId, SUM(organize_count) AS organizeData, 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 80aee4ece5..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 @@ -21,7 +21,7 @@ - SELECT USER_ID, concat( surname, CASE char_length( NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name, 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 index ff931885f6..1a94210725 100644 --- 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 @@ -1,10 +1,10 @@ - + - SELECT ORG_NAME AS NAME, REG_USER_TOTAL AS regNum, 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 2fe2eb4337..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, @@ -25,7 +25,7 @@ - /* 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 84e00a0f5d..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 @@ -16,7 +16,7 @@ - SELECT user_total AS userNum, party_total AS partyMemberNum, @@ -46,7 +46,7 @@ - SELECT ORG_NAME AS NAME, REG_USER_TOTAL AS regNum, From 5159201f09770fffe5128376bbf64fa2353266eb Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 2 Sep 2020 18:04:37 +0800 Subject: [PATCH 288/360] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=84=9A=E6=9C=AC=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/2020-09-02_add_screen_table.sql | 514 ++++++++++++++++++ 1 file changed, 514 insertions(+) create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/2020-09-02_add_screen_table.sql diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/2020-09-02_add_screen_table.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/2020-09-02_add_screen_table.sql new file mode 100644 index 0000000000..4374c4cd09 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/2020-09-02_add_screen_table.sql @@ -0,0 +1,514 @@ +/* + Navicat Premium Data Transfer + + Source Server : 测试 + Source Server Type : MySQL + Source Server Version : 50726 + Source Host : rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306 + Source Schema : epmet_evaluation_index + + Target Server Type : MySQL + Target Server Version : 50726 + File Encoding : 65001 + + Date: 02/09/2020 17:57:39 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for screen_cpc_base_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_cpc_base_data`; +CREATE TABLE `screen_cpc_base_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `ORG_TYPE` varchar(32) NOT NULL COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)', + `REGISTER_USER_COUNT` int(11) DEFAULT '0' COMMENT '注册用户数', + `RESI_TOTAL` int(11) DEFAULT '0' COMMENT '群众用户数', + `PARTY_MEMBER_COUNT` int(11) DEFAULT '0' COMMENT '注册党员数', + `AGE_LEVEL_1` int(11) DEFAULT '0' COMMENT '小于20岁的党员总人数', + `AGE_LEVEL_2` int(11) DEFAULT '0' COMMENT '20-30岁的党员总人数', + `AGE_LEVEL_3` int(11) DEFAULT '0' COMMENT '31-40岁的党员总人数', + `AGE_LEVEL_4` int(11) DEFAULT '0' COMMENT '41-50岁的党员总人数', + `AGE_LEVEL_5` int(11) DEFAULT '0' COMMENT '51-60岁的党员总人数', + `AGE_LEVEL_6` int(11) DEFAULT '0' COMMENT '60+岁的党员总人数', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='基层党建-党员基本情况'; + +-- ---------------------------- +-- Table structure for screen_customer_agency +-- ---------------------------- +DROP TABLE IF EXISTS `screen_customer_agency`; +CREATE TABLE `screen_customer_agency` ( + `ID` varchar(64) NOT NULL COMMENT '主键ID 主键ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id', + `AGENCY_NAME` varchar(255) NOT NULL COMMENT '组织名称', + `PID` varchar(64) NOT NULL COMMENT '父级id ,顶级,此列为0', + `PIDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用逗号(英文)分开', + `ALL_PARENT_NAMES` varchar(512) DEFAULT NULL COMMENT '所有组织名称以-链接', + `AREA_MARKS` text COMMENT '坐标区域', + `CENTER_MARK` varchar(255) DEFAULT NULL COMMENT '中心点位', + `PARTY_MARK` varchar(255) DEFAULT NULL COMMENT '党工委或者党委的位置,目前此阶段为预留字段', + `LEVEL` varchar(32) NOT NULL COMMENT '机关级别(社区级:community,\r\n乡(镇、街道)级:street,\r\n区县级: district,\r\n市级: city\r\n省级:province)', + `AREA_CODE` varchar(30) DEFAULT NULL COMMENT '行政地区编码', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='组织机构信息'; + +-- ---------------------------- +-- Table structure for screen_customer_dept +-- ---------------------------- +DROP TABLE IF EXISTS `screen_customer_dept`; +CREATE TABLE `screen_customer_dept` ( + `ID` varchar(64) NOT NULL COMMENT '主键ID 主键ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id', + `DEPT_NAME` varchar(255) NOT NULL COMMENT '部门名称', + `PARENT_AGENCY_ID` varchar(64) NOT NULL COMMENT '部门所属组织id', + `AREA_MARKS` text COMMENT '坐标区域', + `CENTER_MARK` varchar(255) DEFAULT NULL COMMENT '中心点位', + `DEPT_MARK` varchar(255) DEFAULT NULL COMMENT '部门所在位置(目前预留此字段)', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='部门信息'; + +-- ---------------------------- +-- Table structure for screen_customer_grid +-- ---------------------------- +DROP TABLE IF EXISTS `screen_customer_grid`; +CREATE TABLE `screen_customer_grid` ( + `ID` varchar(64) NOT NULL COMMENT '主键ID 主键ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `GRID_ID` varchar(64) NOT NULL COMMENT '网格id', + `GRID_NAME` varchar(255) NOT NULL COMMENT '组织名称', + `PARENT_AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属组织id', + `AREA_MARKS` text COMMENT '坐标区域', + `CENTER_MARK` varchar(255) DEFAULT NULL COMMENT '中心点位', + `PARTY_MARK` varchar(255) DEFAULT NULL COMMENT '党支部(=网格)的位置', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)', + `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='网格(党支部)信息'; + +-- ---------------------------- +-- Table structure for screen_difficulty_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_difficulty_data`; +CREATE TABLE `screen_difficulty_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称', + `EVENT_ID` varchar(64) NOT NULL COMMENT '事件原Id', + `EVENT_IMG_URL` varchar(512) DEFAULT NULL COMMENT '事件图片', + `EVENT_SOURCE` varchar(64) DEFAULT NULL COMMENT '事件来源 XX街道-社区-网格', + `EVENT_CONTENT` varchar(512) DEFAULT NULL COMMENT '事件内容', + `EVENT_COST_TIME` int(11) DEFAULT '0' COMMENT '事件耗时 单位:分钟', + `EVENT_RE_ORG` int(11) DEFAULT '0' COMMENT '事件涉及部门数', + `EVENT_HANDLED_COUNT` int(11) NOT NULL COMMENT '事件被处理次数(08-21新增)', + `EVENT_CATEGORY_CODE` varchar(32) DEFAULT NULL COMMENT '事件类别编码', + `EVENT_CATEGORY_NAME` varchar(128) DEFAULT NULL COMMENT '事件类别名称', + `EVENT_STATUS_CODE` varchar(32) DEFAULT NULL COMMENT '事件状态key', + `EVENT_STATUS_DESC` varchar(64) DEFAULT NULL COMMENT '事件状态描述', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `LATEST_OPERATE_DESC` varchar(64) NOT NULL COMMENT '最近一次操作说明', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)', + `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='基层治理-难点堵点(耗时最长|设计部门最多|处理次数)'; + +-- ---------------------------- +-- Table structure for screen_event_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_event_data`; +CREATE TABLE `screen_event_data` ( + `ID` varchar(256) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称', + `EVENT_ID` varchar(64) NOT NULL COMMENT '原始事件Id', + `EVENT_TITLE` varchar(256) DEFAULT '0' COMMENT '事件名称', + `EVENT_CREATE_TIME` datetime DEFAULT NULL COMMENT '事件时间', + `LINK_MOBILE` varchar(32) DEFAULT NULL COMMENT '联系人 联系人', + `EVENT_CONTENT` varchar(1024) DEFAULT '0' COMMENT '事件描述', + `EVENT_IMG_URL` varchar(512) DEFAULT NULL COMMENT '事件图片', + `EVENT_LEVEL` varchar(32) DEFAULT '0' COMMENT '事件待处理级别 red:红;yellow:黄;绿色:green', + `EVENT_ADDRESS` varchar(512) DEFAULT NULL COMMENT '事件地址', + `LONGITUDE` decimal(32,8) DEFAULT '0.00000000' COMMENT '事件所在经度', + `LATITUDE` decimal(32,8) DEFAULT '0.00000000' COMMENT '事件所在维度', + `LAST_PROCESS_DEPT` varchar(128) DEFAULT '0' COMMENT '最后处理组织', + `LAST_PROCESS_DATE` datetime DEFAULT '0000-00-00 00:00:00' COMMENT '最后处理时间', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `EVENT_STATUS_CODE` varchar(32) DEFAULT NULL COMMENT '事件状态key', + `EVENT_STATUS_DESC` varchar(64) DEFAULT NULL COMMENT '事件状态描述', + `LATEST_OPERATE_DESC` varchar(64) DEFAULT NULL COMMENT '最近一次操作说明', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyMM|yyyyMMdd', + `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='中央区-事件数据'; + +-- ---------------------------- +-- Table structure for screen_event_img_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_event_img_data`; +CREATE TABLE `screen_event_img_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `EVENT_ID` varchar(64) NOT NULL COMMENT '原始事件Id', + `EVENT_IMG_URL` varchar(512) NOT NULL COMMENT '图片图片地址', + `SORT` int(11) NOT NULL COMMENT '排序', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='中央区-事件数据图片数据'; + +-- ---------------------------- +-- Table structure for screen_govern_rank_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_govern_rank_data`; +CREATE TABLE `screen_govern_rank_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(32) NOT NULL COMMENT '组织名称', + `RESPONSE_RATIO` decimal(10,6) DEFAULT NULL COMMENT '响应率', + `RESOLVED_RATIO` decimal(10,6) DEFAULT NULL COMMENT '解决率', + `GOVERN_RATIO` decimal(10,6) DEFAULT NULL COMMENT '自治率', + `SATISFACTION_RATIO` decimal(10,6) DEFAULT NULL COMMENT '满意率', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='基层治理-治理能力排行数据(按月统计)'; + +-- ---------------------------- +-- Table structure for screen_index_data_monthly +-- ---------------------------- +DROP TABLE IF EXISTS `screen_index_data_monthly`; +CREATE TABLE `screen_index_data_monthly` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id: yyyy', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id yyyyMM', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称', + `INDEX_TOTAL` decimal(10,6) DEFAULT NULL COMMENT '总指数', + `PARTY_DEV_ABLITY` decimal(10,6) DEFAULT NULL COMMENT '党建能力指数', + `SERVICE_ABLITY` decimal(10,6) DEFAULT NULL COMMENT '服务能力指数', + `GOVERN_ABLITY` decimal(10,6) DEFAULT NULL COMMENT '治理能力指数', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指数-指数数据(每月数值)'; + +-- ---------------------------- +-- Table structure for screen_index_data_yearly +-- ---------------------------- +DROP TABLE IF EXISTS `screen_index_data_yearly`; +CREATE TABLE `screen_index_data_yearly` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id: yyyy', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称', + `INDEX_TOTAL` decimal(10,6) NOT NULL COMMENT '总指数', + `PARTY_DEV_ABLITY` decimal(10,6) NOT NULL COMMENT '党建能力指数', + `SERVICE_ABLITY` decimal(10,6) NOT NULL COMMENT '服务能力指数', + `GOVERN_ABLITY` decimal(10,6) NOT NULL COMMENT '治理能力指数', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指数-指数数据(按年统计)'; + +-- ---------------------------- +-- Table structure for screen_org_rank_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_org_rank_data`; +CREATE TABLE `screen_org_rank_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id', + `ORG_TYPE` varchar(32) NOT NULL COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称', + `PARTY_TOTAL` int(11) DEFAULT '0' COMMENT '党员总数', + `GROUP_TOTAL` int(11) DEFAULT '0' COMMENT '小组(支部建设)总数', + `TOPIC_TOTAL` int(11) DEFAULT '0' COMMENT '话题总数', + `ISSUE_TOTAL` int(11) DEFAULT '0' COMMENT '议题总数', + `PROJECT_TOTAL` int(11) DEFAULT '0' COMMENT '项目总数', + `CLOSE_PROJECT_RATIO` decimal(10,6) DEFAULT NULL COMMENT '结案率', + `SATISFACTION_RATIO` decimal(10,6) DEFAULT NULL COMMENT '满意率', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党建引领-组织先进排行榜'; + +-- ---------------------------- +-- Table structure for screen_party_branch_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_party_branch_data`; +CREATE TABLE `screen_party_branch_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id', + `MONTH_ID` varchar(32) NOT NULL COMMENT '月份Id', + `TYPE` varchar(32) NOT NULL DEFAULT 'party' COMMENT '数据类别 :party:支部建设; union:联合建设;党员志愿服务:voluntaryservice', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称', + `MEET_CATEGORY_ID` varchar(32) DEFAULT '0' COMMENT '会议分类Id', + `MEET_CATEGORY_NAME` varchar(64) DEFAULT '0' COMMENT '会议分类名称(三会党课、主题党日.....等等)', + `ORGANIZE_COUNT` int(11) DEFAULT '0' COMMENT '组织次数', + `JOIN_USER_COUNT` int(11) DEFAULT '0' COMMENT '参加人数', + `AVERAGE_JOIN_USER_COUNT` int(11) DEFAULT NULL COMMENT '平均参加人数', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) DEFAULT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='基层党建-建设情况数据(支部,联建,志愿服务)按月'; + +-- ---------------------------- +-- Table structure for screen_party_link_masses_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_party_link_masses_data`; +CREATE TABLE `screen_party_link_masses_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称', + `CREATE_GROUP_TOTAL` int(11) DEFAULT '0' COMMENT '党员建群总数', + `GROUP_USER_TOTAL` int(11) DEFAULT '0' COMMENT '群成员总数', + `DEL_FLAG` char(1) NOT NULL COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党建引领-党员联系群众数据'; + +-- ---------------------------- +-- Table structure for screen_party_user_rank_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_party_user_rank_data`; +CREATE TABLE `screen_party_user_rank_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `GRID_ID` varchar(64) NOT NULL COMMENT '用户所属网格id', + `GRID_NAME` varchar(128) NOT NULL COMMENT '用户所属网格名称', + `ORG_ID` varchar(64) NOT NULL COMMENT '网格所属的组织id', + `ORG_NAME` varchar(255) NOT NULL COMMENT '网格所属的组织名称', + `PARTY_FLAG` tinyint(1) NOT NULL COMMENT '是否是党员标志:1是。0不是党员', + `USER_ID` varchar(64) NOT NULL COMMENT '用户Id', + `SURNAME` varchar(32) DEFAULT NULL COMMENT '姓', + `NAME` varchar(32) DEFAULT NULL COMMENT '名', + `USER_NAME` varchar(32) NOT NULL COMMENT '姓名', + `POINT_TOTAL` int(11) DEFAULT '0' COMMENT '用户积分', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)', + `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党建引领|基层治理-市民(党员)积分排行榜'; + +-- ---------------------------- +-- Table structure for screen_pioneer_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_pioneer_data`; +CREATE TABLE `screen_pioneer_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称', + `ISSUE_TOTAL` int(11) DEFAULT '0' COMMENT '党员参与议事', + `ISSUE_RATIO` decimal(10,6) DEFAULT NULL COMMENT '党员参与议事占比', + `TOPIC_TOTAL` int(11) DEFAULT '0' COMMENT '党员发布话题', + `TOPIC_RATIO` decimal(10,6) DEFAULT NULL COMMENT '党员发布话题占比', + `PUBLISH_ISSUE_TOTAL` int(11) DEFAULT '0' COMMENT '党员发布议题', + `PUBLISH_ISSUE_RATIO` decimal(10,6) DEFAULT NULL COMMENT '党员发布议题占比', + `SHIFT_PROJECT_TOTAL` int(11) DEFAULT '0' COMMENT '议题转项目数', + `SHIFT_PROJECT_RATIO` decimal(10,6) DEFAULT NULL COMMENT '议题转项目占比', + `RESOLVED_PROJECT_TOTAL` int(11) DEFAULT '0' COMMENT '解决项目总数', + `RESOLVED_PROJECT_RATIO` decimal(10,6) DEFAULT NULL COMMENT '解决项目总数占比', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党建引领-先锋模范数据'; + +-- ---------------------------- +-- Table structure for screen_public_parti_total_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_public_parti_total_data`; +CREATE TABLE `screen_public_parti_total_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;网格:grid;部门:department;', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id,如果是网格,传入网格所属组织id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称,也可能是网格名称', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)', + `TOPIC_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '话题总数', + `ISSUE_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '议题总数', + `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '项目总数', + `REG_USER_TOTAL` int(11) NOT NULL COMMENT '注册人数', + `JOIN_USER_TOTAL` int(11) NOT NULL COMMENT '参与人数', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='公众参与-各类(话题|议题|项目|注册人数|参与人数)总数'; + +-- ---------------------------- +-- Table structure for screen_user_join +-- ---------------------------- +DROP TABLE IF EXISTS `screen_user_join`; +CREATE TABLE `screen_user_join` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `ORG_TYPE` varchar(32) NOT NULL COMMENT '组织类别 agency:组织;部门:department;网格:grid', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称', + `YEAR_ID` varchar(32) NOT NULL COMMENT '数据更新至 年Id: yyyy', + `MONTH_ID` varchar(32) NOT NULL COMMENT '数据更新至 :月份Id :yyyyMM', + `JOIN_TOTAL` int(11) DEFAULT '0' COMMENT '总的参与次数', + `JOIN_TOTAL_UP_RATE` decimal(30,6) DEFAULT NULL COMMENT '总的参与次数较上月增长率(采集的时候后台自己计算)', + `JOIN_TOTAL_UP_FLAG` varchar(10) DEFAULT NULL COMMENT '增长:incr;下降:decr; 相等 :eq;默认:空', + `AVG_ISSUE` int(11) DEFAULT '0' COMMENT '人均议题', + `AVG_ISSUE_UP_RATE` decimal(30,6) DEFAULT NULL COMMENT '人均议题较上月增长率(采集的时候后台自己计算)', + `AVG_ISSUE_UP_FLAG` varchar(10) DEFAULT NULL COMMENT '增长:incr;下降:decr; 相等 :eq;默认:空', + `AVG_JOIN` int(11) DEFAULT '0' COMMENT '平均参与度', + `AGVG_JOIN_UP_RATE` decimal(30,6) DEFAULT NULL COMMENT '平均参与度较上月增长率(采集的时候后台自己计算)', + `AGVG_JOIN_UP_FLAG` varchar(10) DEFAULT NULL COMMENT '增长:incr;下降:decr; 相等 :eq;默认:空', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='基层治理-公众参与'; + +-- ---------------------------- +-- Table structure for screen_user_total_data +-- ---------------------------- +DROP TABLE IF EXISTS `screen_user_total_data`; +CREATE TABLE `screen_user_total_data` ( + `ID` varchar(64) NOT NULL COMMENT 'ID 主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `ORG_TYPE` varchar(32) NOT NULL DEFAULT 'agency' COMMENT '组织类别 agency:组织;网格:grid;部门:department;', + `ORG_ID` varchar(64) NOT NULL COMMENT '组织Id 可以为网格,机关id', + `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id', + `ORG_NAME` varchar(128) NOT NULL COMMENT '组织名称,也可能是网格名称', + `DATA_END_TIME` varchar(32) NOT NULL COMMENT '数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)', + `USER_TOTAL` int(11) DEFAULT '0' COMMENT '用户总数', + `PARTY_TOTAL` int(11) DEFAULT '0' COMMENT '注册党总数', + `GROUP_TOTAL` int(11) DEFAULT '0' COMMENT '小组(党群)总数', + `TOPIC_TOTAL` int(11) DEFAULT '0' COMMENT '话题总数', + `ISSUE_TOTAL` int(11) DEFAULT '0' COMMENT '议题总数', + `PROJECT_TOTAL` int(11) DEFAULT '0' COMMENT '项目总数', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除', + `REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='中央区-各类(用户|党员|党群|话题|议题|项目)总数'; + +SET FOREIGN_KEY_CHECKS = 1; From d65cc6cea2d8753f603a358887c04557af2657b8 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 3 Sep 2020 09:56:15 +0800 Subject: [PATCH 289/360] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E5=BA=94=E7=94=A8=E7=A7=98=E9=92=A5=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/exception/EpmetErrorCode.java | 1 + .../com/epmet/dto/form/ExternalAppFormDTO.java | 3 ++- .../epmet/controller/ExternalAppController.java | 17 +++++++++++++++++ .../com/epmet/dao/ExternalAppSecretDao.java | 1 + .../com/epmet/service/ExternalAppService.java | 2 ++ .../service/impl/ExternalAppServiceImpl.java | 9 +++++++++ .../resources/mapper/ExternalAppSecretDao.xml | 7 +++++++ 7 files changed, 39 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 24e795fd1a..b16ad96bc0 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -102,6 +102,7 @@ public enum EpmetErrorCode { OPER_EXTERNAL_APP_AUTH_ERROR(8709, "外部应用认证失败"), OPER_EXTERNAL_CUSTOMER_NOT_EXISTS(8710, "该客户不存在"), OPER_EXTERNAL_APP_EXISTS(8711, "应用已存在"), + OPER_EXT_APP_SECRET_RESET_FAIL(8712, "秘钥更新失败"), // 党建声音 前端提示 88段 DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"), diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalAppFormDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalAppFormDTO.java index 36a504a135..00b99a500e 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalAppFormDTO.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/ExternalAppFormDTO.java @@ -9,8 +9,9 @@ public class ExternalAppFormDTO { public interface AddExternalApp {} public interface UpdateExternalApp {} + public interface UpdateAppSecret {} - @NotBlank(message = "缺少应用ID", groups = { UpdateExternalApp.class }) + @NotBlank(message = "缺少应用ID", groups = { UpdateExternalApp.class, UpdateAppSecret.class }) private String appId; @NotBlank(message = "缺少应用名称", groups = { AddExternalApp.class, UpdateExternalApp.class }) diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java index 50e9a7b891..45bdb8bef6 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/ExternalAppController.java @@ -1,5 +1,6 @@ package com.epmet.controller; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; @@ -97,4 +98,20 @@ public class ExternalAppController { return new Result>().ok(page); } + /** + * 重置应用秘钥 + * @param formDTO + * @return + */ + @PostMapping("/resetsecret") + public Result resetSecret(@RequestBody ExternalAppFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, ExternalAppFormDTO.UpdateAppSecret.class); + String newSecret = externalAppService.resetSecret(formDTO.getAppId()); + if (StringUtils.isBlank(newSecret)) { + return new Result().error(EpmetErrorCode.OPER_EXT_APP_SECRET_RESET_FAIL.getCode(), + EpmetErrorCode.OPER_EXT_APP_SECRET_RESET_FAIL.getMsg()); + } + return new Result().ok(newSecret); + } + } diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppSecretDao.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppSecretDao.java index f56aa08cb0..fd2342c7c6 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppSecretDao.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/ExternalAppSecretDao.java @@ -40,4 +40,5 @@ public interface ExternalAppSecretDao extends BaseDao { */ ExternalAppSecretEntity getSecretsByAppId(@Param("appId") String appId); + int updateSecret(@Param("appId") String appId, @Param("secret") String secret); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java index dff718695f..8f38fa2a83 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/ExternalAppService.java @@ -32,4 +32,6 @@ public interface ExternalAppService { ExternalAppResultDTO updateById(String appId, String appName, String customerId); PageData listPage(Integer pageNo, Integer pageSize, String customerId); + + String resetSecret(String appId); } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java index 5f92de268e..dcfc930aad 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/ExternalAppServiceImpl.java @@ -130,4 +130,13 @@ public class ExternalAppServiceImpl implements ExternalAppService { return new PageData<>(list, pageInfo.getTotal()); } + @Override + public String resetSecret(String appId) { + String secret = genSecret(); + if (externalAppSecretDao.updateSecret(appId, secret) > 0) { + return secret; + } + return null; + } + } \ No newline at end of file diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppSecretDao.xml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppSecretDao.xml index e207a36013..995dbd0270 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppSecretDao.xml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/ExternalAppSecretDao.xml @@ -15,6 +15,13 @@ + + + update external_app_secret + set SECRET=#{secret} + where ID = #{appId} + + + SELECT + CUSTOMER_ID, + AGENCY_ID, + MONTH_ID, + QUARTER_ID, + YEAR_ID, + SCORE, + INDEX_CODE, + PARENT_AGENCY_ID + FROM + fact_index_agency_score + WHERE + del_flag = 0 + AND CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + AND IS_TOTAL = "0" + AND INDEX_CODE != "jiedaoxiangguan" + AND data_type = #{dataType} + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml index 10a4b32c3e..c2ad038a93 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml @@ -50,14 +50,76 @@ QUARTER_ID, YEAR_ID, SCORE, - INDEX_CODE + INDEX_CODE, + PARENT_AGENCY_ID FROM fact_index_community_score WHERE del_flag = 0 AND CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} + AND IS_TOTAL = "0" AND INDEX_CODE != "shequxiangguan" + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml index 5e88cb424a..f8d540688d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml @@ -3,23 +3,26 @@ - - SELECT - agency_id, - month_id, - quarter_id, - year_id, - AVG( score ) AS score, - customer_id + figc.agency_id AS agencyId, + figc.month_id as monthId, + figc.quarter_id as quarterId, + figc.year_id as yearId, + AVG( figc.score ) AS score, + figc.customer_id as customerId, + sca.pid AS parentId FROM - fact_index_grid_score + fact_index_grid_score figc + LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = figc.AGENCY_ID WHERE - del_flag = '0' - AND customer_id = #{customerId} - AND month_id = #{monthId} - AND index_code = 'dangjiannengli' - GROUP BY agency_id + figc.del_flag = '0' + AND sca.DEL_FLAG = 0 + AND figc.customer_id = #{customerId} + AND figc.month_id = #{monthId} + AND figc.index_code = #{indexCode} + GROUP BY figc.agency_id From b2249ac8fd67b960492badfd0b904356e66a080e Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 3 Sep 2020 15:42:31 +0800 Subject: [PATCH 298/360] =?UTF-8?q?=E8=A1=97=E9=81=93=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DTO.java => SubCommunityAvgResultDTO.java} | 2 +- ...esultDTO.java => SubGridAvgResultDTO.java} | 2 +- .../screen/FactIndexCommunityScoreDao.java | 28 ++----------- .../screen/FactIndexGridScoreDao.java | 23 +---------- .../IndexCalculateCommunityServiceImpl.java | 38 +++++++++--------- .../impl/IndexCalculateStreetServiceImpl.java | 14 +++---- .../screen/FactIndexCommunityScoreDao.xml | 40 +------------------ .../screen/FactIndexGridScoreDao.xml | 40 +------------------ 8 files changed, 34 insertions(+), 153 deletions(-) rename epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/{SubCommunityServiceAvgResultDTO.java => SubCommunityAvgResultDTO.java} (90%) rename epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/{SubGridPartyAvgResultDTO.java => SubGridAvgResultDTO.java} (91%) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityServiceAvgResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityAvgResultDTO.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityServiceAvgResultDTO.java rename to epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityAvgResultDTO.java index d860696dd1..06b06109f1 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityServiceAvgResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityAvgResultDTO.java @@ -10,7 +10,7 @@ import java.math.BigDecimal; * @DateTime 2020/9/2 6:01 下午 */ @Data -public class SubCommunityServiceAvgResultDTO implements Serializable { +public class SubCommunityAvgResultDTO implements Serializable { private static final long serialVersionUID = 7681907923515081626L; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridAvgResultDTO.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java rename to epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridAvgResultDTO.java index 48b4501606..460eb12640 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridAvgResultDTO.java @@ -10,7 +10,7 @@ import java.math.BigDecimal; * @DateTime 2020/8/28 3:15 下午 */ @Data -public class SubGridPartyAvgResultDTO implements Serializable { +public class SubGridAvgResultDTO implements Serializable { private static final long serialVersionUID = 1592381327492545907L; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java index 96963e7cc9..1df4f962b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java @@ -20,11 +20,8 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.SubCommunityGovernAvgResultDTO; import com.epmet.dto.indexcal.SubCommunityPartyAvgResultDTO; -import com.epmet.dto.indexcal.SubCommunityServiceAvgResultDTO; +import com.epmet.dto.indexcal.SubCommunityAvgResultDTO; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; -import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; -import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; -import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -67,32 +64,13 @@ public interface FactIndexCommunityScoreDao extends BaseDao selectCommunityInfo(@Param("customerId") String customerId,@Param("monthId")String monthId); - - /** - * @Description 下属所有社区的党建能力平均值 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/8/28 3:20 下午 - */ - List selectSubCommPartyAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId); - - /** - * @Description 街道下属所有社区治理能力汇总平均值 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/8/31 9:19 上午 - */ - List selectSubCommGovernAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId); - /** - * @Description 街道下级所有社区服务能力得分平均值 + * @Description 街道下级所有社区得分平均值 * @param customerId * @param monthId * @author zxc * @date 2020/8/31 1:51 下午 */ - List selectSubCommServiceAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("indexCode")String indexCode); + List selectSubCommAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java index ea12caa2ec..b1271f13f1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java @@ -19,7 +19,7 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; -import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridAvgResultDTO; import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; import com.epmet.entity.evaluationindex.screen.FactIndexGridScoreEntity; import org.apache.ibatis.annotations.Mapper; @@ -43,24 +43,5 @@ public interface FactIndexGridScoreDao extends BaseDao * @author zxc * @date 2020/8/28 3:20 下午 */ - List selectSubGridAvgScore(@Param("customerId")String customerId,@Param("monthId")String monthId,@Param("indexCode")String indexCode); - - /** - * @Description 社区下属所有网格治理能力汇总平均值 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/8/31 9:19 上午 - */ - List selectSubGridGovernAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId); - - /** - * @Description 社区下级所有网格服务能力得分平均值 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/8/31 1:51 下午 - */ - List selectSubGridServiceAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId); - + List selectSubGridAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 5ff0a15ba9..574073e3c4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -14,9 +14,7 @@ import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; -import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; -import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; -import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.dto.screen.result.SubGridAvgResultDTO; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; @@ -84,7 +82,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni //下属所有网格的党建能力平均值 detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { - List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.error("查询下属所有网格的党建能力平均值集合为空"); return; @@ -95,10 +93,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); Integer indexEnd = NumConstant.TEN; - List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); - partition.forEach(publish -> { + List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, indexEnd); + subPartyAvgList.forEach( party -> { List index1SampleValues = new ArrayList<>(); - publish.forEach(c -> { + party.forEach(c -> { pid.put(c.getAgencyId(),c.getParentId()); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); index1SampleValues.add(s); @@ -110,8 +108,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } } else { // 社区名义发文数量 - List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); - if (CollectionUtils.isEmpty(mapList)) { + List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(publishArticleCountList)) { log.error("查询社区名义发文数量集合为空"); return; } @@ -119,15 +117,15 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (StringUtils.isEmpty(fieldNameByIndexCode)) { log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); return; - }else if (mapList.size() == NumConstant.ONE){ - pid.put(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),mapList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString()); - sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),pid); + }else if (publishArticleCountList.size() == NumConstant.ONE){ + pid.put(publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString()); + sizeOne(publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),pid); return; - }else if (mapList.size() > NumConstant.ONE) { - List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + }else if (publishArticleCountList.size() > NumConstant.ONE) { + List decimalList = publishArticleCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); - List>> publishArticleList = ListUtils.partition(mapList, 10); - publishArticleList.forEach(publish -> { + List>> publishArticleList = ListUtils.partition(publishArticleCountList, 10); + publishArticleList.forEach( publish -> { ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); publish.forEach(c -> { @@ -166,14 +164,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni Map pid = new HashMap<>(); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { - List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (subGridGovernAvg.size() == NumConstant.ONE) { pid.put(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),subGridGovernAvg.get(NumConstant.ZERO).getParentId()); sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid); return; } else if (subGridGovernAvg.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); - List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); governAvg.forEach(avg -> { List index1SampleValues = new ArrayList<>(); avg.forEach(c -> { @@ -245,14 +243,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { - List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (subGridServiceAvg.size() == NumConstant.ONE) { pid.put(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId(),subGridServiceAvg.get(NumConstant.ZERO).getParentId()); sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid); return; } else if (subGridServiceAvg.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); - List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); serviceAvgList.forEach(serviceAvg -> { BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index 6d7b90ffd0..cc49f16f6a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -13,7 +13,7 @@ import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; import com.epmet.dto.indexcal.AgencyScoreDTO; -import com.epmet.dto.indexcal.SubCommunityServiceAvgResultDTO; +import com.epmet.dto.indexcal.SubCommunityAvgResultDTO; import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; @@ -110,7 +110,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ //下属所有社区的党建能力平均值 detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { - List subCommPartyAvgScore = communityScoreDao.selectSubCommServiceAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + List subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { log.error("查询下属所有社区的党建能力平均值集合为空"); return; @@ -121,7 +121,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ }else if (subCommPartyAvgScore.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); Integer indexEnd = NumConstant.TEN; - List> partition = ListUtils.partition(subCommPartyAvgScore, indexEnd); + List> partition = ListUtils.partition(subCommPartyAvgScore, indexEnd); partition.forEach(publish -> { List index1SampleValues = new ArrayList<>(); publish.forEach(c -> { @@ -191,14 +191,14 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ Map pid = new HashMap<>(); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { - List subGridGovernAvg = communityScoreDao.selectSubCommServiceAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + List subGridGovernAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (subGridGovernAvg.size() == NumConstant.ONE) { pid.put(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),subGridGovernAvg.get(NumConstant.ZERO).getParentId()); sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid); return; } else if (subGridGovernAvg.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); - List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); governAvg.forEach(avg -> { List index1SampleValues = new ArrayList<>(); avg.forEach(c -> { @@ -272,14 +272,14 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) { - List subCommServiceAvg = communityScoreDao.selectSubCommServiceAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + List subCommServiceAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (subCommServiceAvg.size() == NumConstant.ONE) { pid.put(subCommServiceAvg.get(NumConstant.ZERO).getAgencyId(),subCommServiceAvg.get(NumConstant.ZERO).getParentId()); sizeOne(subCommServiceAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid); return; } else if (subCommServiceAvg.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); - List> serviceAvgList = ListUtils.partition(subCommServiceAvg, 10); + List> serviceAvgList = ListUtils.partition(subCommServiceAvg, 10); serviceAvgList.forEach(serviceAvg -> { BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml index c2ad038a93..c3da270827 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml @@ -62,46 +62,8 @@ AND INDEX_CODE != "shequxiangguan" - - - - - - - SELECT fics.agency_id, fics.month_id, diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml index f8d540688d..9d2176f678 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml @@ -4,7 +4,7 @@ - SELECT figc.agency_id AS agencyId, figc.month_id as monthId, @@ -24,42 +24,4 @@ AND figc.index_code = #{indexCode} GROUP BY figc.agency_id - - - - - - \ No newline at end of file From 65f4fc7c145d56b2fee13395796004ccd9fb1299 Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 3 Sep 2020 15:51:38 +0800 Subject: [PATCH 299/360] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-auth/deploy/docker-compose-prod.yml | 2 +- epmet-auth/pom.xml | 2 +- epmet-gateway/deploy/docker-compose-prod.yml | 2 +- epmet-gateway/pom.xml | 2 +- .../common-service-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/epmet-common-service/common-service-server/pom.xml | 2 +- .../epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/epmet-ext/epmet-ext-server/pom.xml | 2 +- .../epmet-heart-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/epmet-heart/epmet-heart-server/pom.xml | 2 +- .../gov-mine/gov-mine-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/gov-mine/gov-mine-server/pom.xml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/gov-org/gov-org-server/pom.xml | 2 +- .../oper-access-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/oper-access/oper-access-server/pom.xml | 2 +- .../oper-crm/oper-crm-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/oper-crm/oper-crm-server/pom.xml | 2 +- .../oper-customize-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/oper-customize/oper-customize-server/pom.xml | 2 +- .../resi-partymember-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/resi-partymember/resi-partymember-server/pom.xml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-prod.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/epmet-auth/deploy/docker-compose-prod.yml b/epmet-auth/deploy/docker-compose-prod.yml index 8c5773f2d5..afffcf2474 100644 --- a/epmet-auth/deploy/docker-compose-prod.yml +++ b/epmet-auth/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-auth-server: container_name: epmet-auth-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-auth:0.3.68 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-auth:0.3.69 ports: - "8081:8081" network_mode: host # 使用现有网络 diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index f97682e9ba..aaff93a013 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.68 + 0.3.69 com.epmet epmet-cloud diff --git a/epmet-gateway/deploy/docker-compose-prod.yml b/epmet-gateway/deploy/docker-compose-prod.yml index 6b8419721d..c5c27e870b 100644 --- a/epmet-gateway/deploy/docker-compose-prod.yml +++ b/epmet-gateway/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-gateway-server: container_name: epmet-gateway-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-gateway:0.3.30 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-gateway:0.3.33 ports: - "8080:8080" network_mode: host # 使用现有网络 diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index 7e5875d3c5..43269581b5 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.32 + 0.3.33 com.epmet epmet-cloud diff --git a/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml index 5f9878a727..1a43e02ffb 100644 --- a/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: common-service-server: container_name: common-service-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/common-service-server:0.3.9 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/common-service-server:0.3.17 ports: - "8103:8103" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-common-service/common-service-server/pom.xml b/epmet-module/epmet-common-service/common-service-server/pom.xml index 1c8581eb13..169304d350 100644 --- a/epmet-module/epmet-common-service/common-service-server/pom.xml +++ b/epmet-module/epmet-common-service/common-service-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.16 + 0.3.17 com.epmet epmet-common-service diff --git a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml index 14e6df41ba..58fcb8f0ac 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-ext-server: container_name: epmet-ext-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-ext-server:0.0.1 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-ext-server:0.0.6 ports: - "8113:8113" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-ext/epmet-ext-server/pom.xml b/epmet-module/epmet-ext/epmet-ext-server/pom.xml index 489cc34f66..771990a0f1 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/pom.xml +++ b/epmet-module/epmet-ext/epmet-ext-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.5 + 0.0.6 com.epmet diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml index 044248ebe9..297fb4a40f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-heart-server: container_name: epmet-heart-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-heart-server:0.0.52 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-heart-server:0.0.53 ports: - "8111:8111" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index c8d513e278..5b963aa293 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.52 + 0.0.53 com.epmet epmet-heart diff --git a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml index 70b7b9f4c1..7c1d15c36f 100644 --- a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-mine-server: container_name: gov-mine-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-mine-server:0.3.33 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-mine-server:0.3.34 ports: - "8098:8098" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-mine/gov-mine-server/pom.xml b/epmet-module/gov-mine/gov-mine-server/pom.xml index 7d2e118675..073cf96190 100644 --- a/epmet-module/gov-mine/gov-mine-server/pom.xml +++ b/epmet-module/gov-mine/gov-mine-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.33 + 0.3.34 com.epmet gov-mine diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-prod.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-prod.yml index 006b14bdff..9418cc9ef2 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-org-server:0.3.83 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-org-server:0.3.88 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 5886913a2a..f7e38a8870 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.87 + 0.3.88 com.epmet gov-org diff --git a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-prod.yml b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-prod.yml index 8552999645..6c6bd28509 100644 --- a/epmet-module/oper-access/oper-access-server/deploy/docker-compose-prod.yml +++ b/epmet-module/oper-access/oper-access-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-access-server: container_name: oper-access-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/oper-access-server:0.3.15 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/oper-access-server:0.3.18 ports: - "8093:8093" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-access/oper-access-server/pom.xml b/epmet-module/oper-access/oper-access-server/pom.xml index 3dc00901d9..e5c20ef1be 100644 --- a/epmet-module/oper-access/oper-access-server/pom.xml +++ b/epmet-module/oper-access/oper-access-server/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 0.3.17 + 0.3.18 oper-access com.epmet diff --git a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml index 9a7eb3e9b9..a75df6848f 100644 --- a/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml +++ b/epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-crm-server: container_name: oper-crm-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/oper-crm-server:0.3.66 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/oper-crm-server:0.3.71 ports: - "8090:8090" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-crm/oper-crm-server/pom.xml b/epmet-module/oper-crm/oper-crm-server/pom.xml index 283ae60811..b675bc8c4a 100644 --- a/epmet-module/oper-crm/oper-crm-server/pom.xml +++ b/epmet-module/oper-crm/oper-crm-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.70 + 0.3.71 com.epmet oper-crm diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-prod.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-prod.yml index df76d59dbc..0b2cba4848 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-prod.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/oper-customize-server:0.3.26 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/oper-customize-server:0.3.43 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 58f873d637..b42ea55d37 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.42 + 0.3.43 com.epmet oper-customize diff --git a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml index 21e9579a03..65ad6ccbc8 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-partymember-server: container_name: resi-partymember-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-partymember-server:0.3.56 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-partymember-server:0.3.57 ports: - "8096:8096" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-partymember/resi-partymember-server/pom.xml b/epmet-module/resi-partymember/resi-partymember-server/pom.xml index a202858016..7ee6d3c54e 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/pom.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.56 + 0.3.57 com.epmet resi-partymember diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml index a9847b773c..0f080c990f 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.118 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.122 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 6f2eaf76ef..b7c301d01b 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.121 + 0.3.122 com.epmet epmet-user From e9896edd90f73d86a0ee024743e45fb2aff4c1ba Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 3 Sep 2020 15:55:59 +0800 Subject: [PATCH 300/360] =?UTF-8?q?=E8=A1=97=E9=81=93=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java | 2 +- .../indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java index 47ae64dd69..2b7277f7d2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java @@ -64,7 +64,7 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao list, @Param("customerId")String customerId); /** - * @Description 社区治理能力各个参数查询【被吹哨次数、办结项目数、项目响应度、超期项目率、办结项目率、办结项目满意度】 + * @Description 社区治理能力各个参数查询【被吹哨次数、办结项目数、项目响应度、超期项目率、【街道办结项目的处理效率,level为street时存在】、办结项目率、办结项目满意度】 * @param customerId * @param monthId * @author zxc diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index f47ef128f6..5d49deaddb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -99,7 +99,8 @@ RESP_PROJECT_RATIO, OVERDUE_PROJECT_RATIO, CLOSED_PROJECT_RATIO, - SATISFACTION_RATIO + SATISFACTION_RATIO, + HANDLE_PROJECT_RATIO FROM fact_index_govrn_ablity_org_monthly WHERE From 2a3bcfde29b80d37196643aa26aa714c72ba2314 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 3 Sep 2020 15:57:56 +0800 Subject: [PATCH 301/360] =?UTF-8?q?/data/stats/indexcollect/orggovrnabilit?= =?UTF-8?q?y=E6=96=B0=E5=A2=9EhandleProjectRatio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/indexcollect/form/OrgGovrnAbilityFormDTO.java | 8 +++++++- .../indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java | 6 +++++- .../indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java index 1534955c75..c2eadf4dc7 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java @@ -71,7 +71,13 @@ public class OrgGovrnAbilityFormDTO implements Serializable { private BigDecimal satisfactionRatio; /** - * 超期项目率 + * 社区超期项目率,dataTyp=commnuity有值 */ private BigDecimal overdueProjectRatio; + + + /** + * 街道办结项目的处理效率, data_type=street时有值 + */ + private BigDecimal handleProjectRatio; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java index a104561749..e23472c6a4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -98,8 +98,12 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { private BigDecimal satisfactionRatio; /** - * 超期项目率 + * 社区超期项目率,dataTyp=commnuity有值 */ private BigDecimal overdueProjectRatio; + /** + * 街道办结项目的处理效率, data_type=street时有值 + */ + private BigDecimal handleProjectRatio; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml index f47ef128f6..d91da41fea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml @@ -18,6 +18,7 @@ + @@ -53,6 +54,7 @@ CLOSED_PROJECT_RATIO, SATISFACTION_RATIO, OVERDUE_PROJECT_RATIO, + HANDLE_PROJECT_RATIO, DEL_FLAG, REVISION, CREATED_BY, @@ -76,6 +78,7 @@ #{item.closedProjectRatio}, #{item.satisfactionRatio}, #{item.overdueProjectRatio}, + #{item.handleProjectRatio}, 0, 0, 'APP_USER', From 6b2730e4aa5fda6edfb5ada0289c1effc241e7e1 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 3 Sep 2020 16:00:47 +0800 Subject: [PATCH 302/360] =?UTF-8?q?=E5=8C=BA=E7=9B=B4=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/IndexCalConstant.java | 2 + .../com/epmet/controller/DemoController.java | 4 + .../FactIndexGovrnAblityDeptMonthlyDao.java | 35 +++++ .../indexcal/impl/DeptScoreServiceImpl.java | 146 +++++++++++++++++- .../FactIndexGovrnAblityDeptMonthlyDao.xml | 61 ++++++++ 5 files changed, 244 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index a2064455a4..b232ea7635 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -12,6 +12,8 @@ public interface IndexCalConstant { String GRID_ID="GRID_ID"; + String DEPT_ID="DEPT_ID"; + String AGENCY_ID="AGENCY_ID"; String PARENT_AGENCY_ID = "parentAgencyId"; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 58d08b8120..380b2f3b86 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -17,6 +17,7 @@ import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMont import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.service.StatsDemoService; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; import com.epmet.service.evaluationindex.indexcal.IndexCalculateStreetService; @@ -53,6 +54,8 @@ public class DemoController { private GridCorreLationService gridCorreLationService; @Autowired private IndexCalculateStreetService indexCalculateStreetService; + @Autowired + private DeptScoreService deptScoreService; @GetMapping("testAlarm") public void testAlarm() { @@ -162,6 +165,7 @@ public class DemoController { // List gridScoreDTOList=gridScoreDao.selectList(formDTO); // return new Result>().ok(gridScoreDTOList); gridCorreLationService.calculateGridCorreLation(formDTO); +// deptScoreService.calculateDeptCorreLation(formDTO); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index 5db8adb014..20abf945b7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -17,12 +17,14 @@ package com.epmet.dao.evaluationindex.indexcoll; /** import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 治理能力-部门相关数据 @@ -63,4 +65,37 @@ public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao list, @Param("customerId")String customerId); + + /** + * @return java.lang.Integer + * @param calculateCommonFormDTO + * @author yinzuomei + * @description 查询(fact_index_govrn_ablity_dept_monthly治理能力-区直部门相关数据 )当前月共上传了多少条记录 + * @Date 2020/9/3 9:31 + **/ + Integer selectCount(CalculateCommonFormDTO calculateCommonFormDTO); + + /** + * @return java.util.Map + * @param calculateCommonFormDTO + * @author yinzuomei + * @description 计算最大最小值 + * @Date 2020/9/3 9:36 + **/ + Map selectExtremeValue(CalculateCommonFormDTO calculateCommonFormDTO); + + /** + * @return java.util.List> + * @param customerId 客户id + * @param monthId yyyyMM + * @param offset + * @param pageSize + * @author yinzuomei + * @description + * @Date 2020/9/3 11:00 + **/ + List> selectListByMonthId(@Param("customerId") String customerId, + @Param("monthId") String monthId, + @Param("offset") Integer offset, + @Param("pageSize") Integer pageSize); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index d999757956..20360baa29 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -19,7 +19,10 @@ package com.epmet.service.evaluationindex.indexcal.impl; import com.alibaba.fastjson.JSON; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; +import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; @@ -27,13 +30,26 @@ import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; import lombok.extern.slf4j.Slf4j; +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.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** @@ -49,6 +65,8 @@ public class DeptScoreServiceImpl extends BaseServiceImpl parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + List indexGroupDetailEntityList = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); - if (CollectionUtils.isEmpty(parentIndexDetails)) { + if (CollectionUtils.isEmpty(indexGroupDetailEntityList)) { log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); } - log.info(JSON.toJSONString(parentIndexDetails)); - return null; + log.info(JSON.toJSONString(indexGroupDetailEntityList)); + + //1、查询总记录数 + int total = factIndexGovrnAblityDeptMonthlyDao.selectCount(formDTO); + if (NumConstant.ZERO == total) { + log.warn(String.format("customerId=%s,monthId=%s,fact_index_govrn_ablity_dept_monthly have not any fact record", formDTO.getCustomerId(), formDTO.getMonthId())); + return Boolean.FALSE; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record", formDTO.getCustomerId(), formDTO.getMonthId())); + this.handleOneGridScene(formDTO); + return Boolean.TRUE; + } + + //2、计算最大最小值 + Map minAndMaxMap = factIndexGovrnAblityDeptMonthlyDao.selectExtremeValue(formDTO); + if (CollectionUtils.isEmpty(minAndMaxMap)) { + log.warn("calculateDeptCorreLation getExtremeValue customerId:{} fact_index_govrn_ablity_dept_monthly have not any fact record", formDTO.getCustomerId()); + throw new RenException("【区直部门:治理能力】指标原始数据记录不存在"); + } + //3、构造入参 指标集合 + Map> indexMap = buildDeptCorrelationIndexInputVO(indexGroupDetailEntityList, minAndMaxMap); + //4、分批计算 + int pageNo = NumConstant.ONE; + int pageSize = IndexCalConstant.PAGE_SIZE; + //分页查询 要计算的原始数据 + List> list = null; + do { + list = factIndexGovrnAblityDeptMonthlyDao.selectListByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); + if (!CollectionUtils.isEmpty(list)) { + //遍历指标分组 计算分数 + List> crrentFactRecordList = list; + calculateScore(formDTO,indexMap,crrentFactRecordList); + } + } while (!CollectionUtils.isEmpty(list) && pageNo++ > 0); + return true; + } + + /** + * @return void + * @param formDTO + * @param indexMap + * @author yinzuomei + * @description 计算分值并保存结果 + * @Date 2020/9/3 11:14 + **/ + private void calculateScore(CalculateCommonFormDTO formDTO, Map> indexMap,List> recordList) { + //遍历每一个网格的记录 + recordList.forEach(recordMap -> { + //遍历所有的指标 + indexMap.forEach((key, indexInputVO) -> { + if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = (String) recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key)); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.DEPT_ID), new BigDecimal(sampleValueStr)); + indexInputVO.getIndexValueVOs().add(currentGridIndexValue); + + } + }); + + + }); + //保存中间表记录 TODO + + } + + /** + * @param formDTO + * @return void + * @author yinzuomei + * @description TODO + * @Date 2020/9/3 9:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO) { + + } + + /** + * @param indexList + * @param minAndMaxMap + * @return java.util.Map> + * @author yinzuomei + * @description + * @Date 2020/9/3 9:31 + **/ + private Map> buildDeptCorrelationIndexInputVO(List indexList, + Map minAndMaxMap) { + Map> map = new HashMap<>(); + for (IndexGroupDetailEntity index : indexList) { + //获取指标对应的列名 + String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + if (StringUtils.isBlank(fieldName)) { + log.error("index_code:{} not find field_name", index.getIndexCode()); + continue; + } + String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); + String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); + BigDecimal minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + BigDecimal maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } + //分值计算器 + ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, + maxValue, + ScoreConstants.MIN_SCORE, + ScoreConstants.MAX_SCORE, + Correlation.getCorrelation(index.getCorrelation()) + ); + List> sampleValueList = new ArrayList<>(); + IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), + sampleValueList, + index.getThreshold(), +// new BigDecimal("-1"), //FOR TEST + index.getWeight(), + scoreCalculator); + map.put(index.getIndexCode(), indexInputVO1); + } + return map; } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml index acacf4211e..bf9647c67f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml @@ -79,4 +79,65 @@ + + + + + + + + From 1f27decf191bffd2ef2ea271a3baa0d1a0838e0c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 3 Sep 2020 16:06:05 +0800 Subject: [PATCH 303/360] =?UTF-8?q?=E8=A1=97=E9=81=93=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/IndexCalculateCommunityServiceImpl.java | 4 +--- .../indexcal/impl/IndexCalculateStreetServiceImpl.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 574073e3c4..f7a56d2dbe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -68,7 +68,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @author zxc * @date 2020/8/26 10:46 上午 */ - @Transactional(rollbackFor = Exception.class) public Boolean communityPartyCalculate(String customerId, String monthId) { // 党建能力 // 根据all_parent_index_code 获取指标明细 @@ -153,7 +152,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @author zxc * @date 2020/8/26 1:40 下午 */ - @Transactional(rollbackFor = Exception.class) public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { @@ -231,7 +229,6 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @author zxc * @date 2020/8/31 1:38 下午 */ - @Transactional(rollbackFor = Exception.class) public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { @@ -391,6 +388,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni * @author zxc * @date 2020/9/1 4:24 下午 */ + @Transactional(rollbackFor = Exception.class) public void deleteAndInsert(String customerId, String monthId, String indexCode, List subAllGridList) { if (!CollectionUtils.isEmpty(subAllGridList)) { factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId, indexCode); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index cc49f16f6a..eb966945c6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -96,7 +96,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ * @author zxc * @date 2020/8/26 10:46 上午 */ - @Transactional(rollbackFor = Exception.class) public Boolean streetPartyCalculate(String customerId, String monthId) { // 党建能力 // 根据all_parent_index_code 获取指标明细 @@ -180,7 +179,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ * @author zxc * @date 2020/8/26 1:40 下午 */ - @Transactional(rollbackFor = Exception.class) public Boolean streetGovernAbilityCalculate(String customerId, String monthId) { List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { @@ -260,7 +258,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ * @author zxc * @date 2020/8/31 1:38 下午 */ - @Transactional(rollbackFor = Exception.class) public Boolean streetServiceAbilityCalculate(String customerId, String monthId) { List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { @@ -395,6 +392,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ * @author zxc * @date 2020/9/1 4:24 下午 */ + @Transactional(rollbackFor = Exception.class) public void deleteAndInsert(String customerId, String monthId, String indexCode, List subAllCommunityList) { if (!CollectionUtils.isEmpty(subAllCommunityList)) { agencyScoreDao.deleteOldRecord(customerId, monthId, indexCode,IndexCalConstant.STREET_LEVEL); From 34799c9c89375e00a364f76e3415708bc7f9b38c Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 3 Sep 2020 16:24:57 +0800 Subject: [PATCH 304/360] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=9F=9F=E5=90=8D=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/CodeServiceImpl.java | 4 ++-- .../src/main/resources/bootstrap.yml | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java index 020dcf8782..611c1a05b4 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java @@ -575,12 +575,12 @@ public class CodeServiceImpl implements CodeService { //设置服务器域名 WxResult modifyDomain = wxMaCodeService.modifyDomain(authInfo.getAuthorizerAccessToken(), "set"); if (!modifyDomain.success()) { - throw new RenException(modifyDomain.getErrorCode(), modifyDomain.getErrorMsg()); + log.error(modifyDomain.getErrorMsg()); } //设置业务域名 WxResult setWebviewDomain = wxMaCodeService.setWebviewDomain(authInfo.getAuthorizerAccessToken(), "set"); if (!setWebviewDomain.success()) { - throw new RenException(setWebviewDomain.getErrorCode(), setWebviewDomain.getErrorMsg()); + log.error(modifyDomain.getErrorMsg()); } }); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml index d52b94a564..9a8fdb81a6 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml @@ -123,6 +123,14 @@ third: - https://epmet-dev.elinkservice.cn - https://epmet-test.elinkservice.cn webviewDomain: - - udp://epmet-cloud.elinkservice.cn - - udp://epmet-dev.elinkservice.cn - - udp://epmet-test.elinkservice.cn \ No newline at end of file + - epmet-ext.elinkservice.cn + - epmet-ext1.elinkservice.cn + - epmet-ext2.elinkservice.cn + - epmet-ext3.elinkservice.cn + - epmet-ext4.elinkservice.cn + - epmet-ext5.elinkservice.cn + - epmet-ext6.elinkservice.cn + - epmet-ext7.elinkservice.cn + - epmet-ext8.elinkservice.cn + - epmet-ext9.elinkservice.cn + - epmet-ext10.elinkservice.cn \ No newline at end of file From a203a8626dadc7a72c1d765eeb5164f492367e23 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 3 Sep 2020 16:31:00 +0800 Subject: [PATCH 305/360] =?UTF-8?q?=E8=A1=97=E9=81=93=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/IndexCalConstant.java | 11 +++++++ .../IndexCalculateCommunityServiceImpl.java | 30 +++++++++---------- .../impl/IndexCalculateStreetServiceImpl.java | 30 +++++++++---------- 3 files changed, 41 insertions(+), 30 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index b232ea7635..bc7295ccda 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -51,4 +51,15 @@ public interface IndexCalConstant { String monthId="202008"; String insertUser="yinzuomei"; + + String INDEX_DETAIL_LIST_NULL = "指标明细查询集合为空"; + String COMMUNITY_PARTY_AVG_NULL = "查询下属所有【社区】的党建能力平均值集合为空"; + String GRID_PARTY_AVG_NULL = "查询下属所有【网格】的党建能力平均值集合为空"; + String STREET_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-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index f7a56d2dbe..1d7b37a78d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -73,7 +73,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni // 根据all_parent_index_code 获取指标明细 List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { - log.error("指标明细查询集合为空"); + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return false; } List indexInputVOS = new ArrayList<>(); @@ -83,7 +83,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { - log.error("查询下属所有网格的党建能力平均值集合为空"); + log.error(IndexCalConstant.GRID_PARTY_AVG_NULL); return; }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ pid.put(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),subGridPartyAvgScore.get(NumConstant.ZERO).getParentId()); @@ -109,12 +109,12 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni // 社区名义发文数量 List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); if (CollectionUtils.isEmpty(publishArticleCountList)) { - log.error("查询社区名义发文数量集合为空"); + log.error(IndexCalConstant.COMMUNITY_PUBLISH_ARTICLE_LIST_NULL); return; } String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { - log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); return; }else if (publishArticleCountList.size() == NumConstant.ONE){ pid.put(publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString()); @@ -123,7 +123,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }else if (publishArticleCountList.size() > NumConstant.ONE) { List decimalList = publishArticleCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); - List>> publishArticleList = ListUtils.partition(publishArticleCountList, 10); + List>> publishArticleList = ListUtils.partition(publishArticleCountList, IndexCalConstant.PAGE_SIZE); publishArticleList.forEach( publish -> { ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); @@ -155,7 +155,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { - log.error("指标明细查询集合为空"); + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return false; } List indexInputVOS = new ArrayList<>(); @@ -169,7 +169,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni return; } else if (subGridGovernAvg.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); - List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); governAvg.forEach(avg -> { List index1SampleValues = new ArrayList<>(); avg.forEach(c -> { @@ -186,7 +186,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni // 治理能力的六个五级指标 List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); if (CollectionUtils.isEmpty(communityGovernAbility)){ - log.error("查询治理能力的六个五级指标集合为空"); + log.error(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); return; }else if (communityGovernAbility.size() == NumConstant.ONE) { pid.put(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString()); @@ -195,12 +195,12 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } else if (communityGovernAbility.size() > NumConstant.ONE) { String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { - log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); return; } List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); - List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, IndexCalConstant.PAGE_SIZE); governAbilityList.forEach(governAbility -> { ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); @@ -232,7 +232,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { - log.error("指标明细查询集合为空"); + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return false; } List indexInputVOS = new ArrayList<>(); @@ -247,7 +247,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni return; } else if (subGridServiceAvg.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); - List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, IndexCalConstant.PAGE_SIZE); serviceAvgList.forEach(serviceAvg -> { BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); @@ -263,7 +263,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } else { List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); if (CollectionUtils.isEmpty(communityActivityCountList)) { - log.error("查询社区活动组织次数集合为空"); + log.error(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); return; }else if (communityActivityCountList.size() == NumConstant.ONE) { pid.put(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString()); @@ -272,12 +272,12 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } else if (communityActivityCountList.size() > NumConstant.ONE) { String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { - log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); return; } List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); - List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, IndexCalConstant.PAGE_SIZE); communityActivityList.forEach(communityActivity -> { ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index eb966945c6..e3890fa9b2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -101,7 +101,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ // 根据all_parent_index_code 获取指标明细 List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { - log.error("指标明细查询集合为空"); + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return false; } List indexInputVOS = new ArrayList<>(); @@ -111,7 +111,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { - log.error("查询下属所有社区的党建能力平均值集合为空"); + log.error(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); return; }else if (subCommPartyAvgScore.size() == NumConstant.ONE){ pid.put(subCommPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),subCommPartyAvgScore.get(NumConstant.ZERO).getParentId()); @@ -137,12 +137,12 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ // 街道名义发文数量 List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId, IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(mapList)) { - log.error("查询街道名义发文数量集合为空"); + log.error(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL); return; } String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldName)) { - log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); return; }else if (mapList.size() == NumConstant.ONE){ pid.put(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),mapList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString()); @@ -150,7 +150,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ return; }else if (mapList.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(mapList.stream().map(m -> new BigDecimal(m.get(fieldName).toString())).collect(Collectors.toList())); - List>> publishArticleList = ListUtils.partition(mapList, 10); + List>> publishArticleList = ListUtils.partition(mapList, IndexCalConstant.PAGE_SIZE); publishArticleList.forEach(publish -> { ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); @@ -182,7 +182,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ public Boolean streetGovernAbilityCalculate(String customerId, String monthId) { List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { - log.error("指标明细查询集合为空"); + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return false; } List indexInputVOS = new ArrayList<>(); @@ -196,7 +196,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ return; } else if (subGridGovernAvg.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); - List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + List> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); governAvg.forEach(avg -> { List index1SampleValues = new ArrayList<>(); avg.forEach(c -> { @@ -213,7 +213,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ // 治理能力的六个五级指标 List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(communityGovernAbility)){ - log.error("查询治理能力的六个五级指标集合为空"); + log.error(IndexCalConstant.STREET_GOVERN_ABILITY_NULL); return; }else if (communityGovernAbility.size() == NumConstant.ONE) { pid.put(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString()); @@ -224,12 +224,12 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ System.err.println(fieldNameByIndexCode); System.err.println(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { - log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); return; } List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); - List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, IndexCalConstant.PAGE_SIZE); governAbilityList.forEach(governAbility -> { ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); @@ -261,7 +261,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ public Boolean streetServiceAbilityCalculate(String customerId, String monthId) { List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(detailListByParentCode)) { - log.error("指标明细查询集合为空"); + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return false; } List indexInputVOS = new ArrayList<>(); @@ -276,7 +276,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ return; } else if (subCommServiceAvg.size() > NumConstant.ONE) { MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); - List> serviceAvgList = ListUtils.partition(subCommServiceAvg, 10); + List> serviceAvgList = ListUtils.partition(subCommServiceAvg, IndexCalConstant.PAGE_SIZE); serviceAvgList.forEach(serviceAvg -> { BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); @@ -292,7 +292,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ } else { List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(communityActivityCountList)) { - log.error("查询街道活动组织次数集合为空"); + log.error(IndexCalConstant.STREET_SERVICE_ABILITY_NULL); return; }else if (communityActivityCountList.size() == NumConstant.ONE) { pid.put(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString()); @@ -301,12 +301,12 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ } else if (communityActivityCountList.size() > NumConstant.ONE) { String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); if (StringUtils.isEmpty(fieldNameByIndexCode)) { - log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); return; } List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); - List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, IndexCalConstant.PAGE_SIZE); communityActivityList.forEach(communityActivity -> { ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); List index1SampleValues = new ArrayList<>(); From 0f6a9bd7ebbbf7a5bab72bd5a0600f83ae8f33d2 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 3 Sep 2020 16:31:54 +0800 Subject: [PATCH 306/360] =?UTF-8?q?third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml index a2a223a704..ba2f972f3a 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.135 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.137 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index b9b3cde204..2d090fb332 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.136 + 0.0.137 com.epmet From cac92dc42293543d6d234e83694e5f042bae9c19 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 3 Sep 2020 16:38:35 +0800 Subject: [PATCH 307/360] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=9F=9F=E5=90=8D=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap.yml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml index 9a8fdb81a6..4a3e82e619 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml @@ -123,14 +123,14 @@ third: - https://epmet-dev.elinkservice.cn - https://epmet-test.elinkservice.cn webviewDomain: - - epmet-ext.elinkservice.cn - - epmet-ext1.elinkservice.cn - - epmet-ext2.elinkservice.cn - - epmet-ext3.elinkservice.cn - - epmet-ext4.elinkservice.cn - - epmet-ext5.elinkservice.cn - - epmet-ext6.elinkservice.cn - - epmet-ext7.elinkservice.cn - - epmet-ext8.elinkservice.cn - - epmet-ext9.elinkservice.cn - - epmet-ext10.elinkservice.cn \ No newline at end of file + - https://epmet-ext.elinkservice.cn + - https://epmet-ext1.elinkservice.cn + - https://epmet-ext2.elinkservice.cn + - https://epmet-ext3.elinkservice.cn + - https://epmet-ext4.elinkservice.cn + - https://epmet-ext5.elinkservice.cn + - https://epmet-ext6.elinkservice.cn + - https://epmet-ext7.elinkservice.cn + - https://epmet-ext8.elinkservice.cn + - https://epmet-ext9.elinkservice.cn + - https://epmet-ext10.elinkservice.cn \ No newline at end of file From f7be4ec65b8cbedd4f6380725482711805280e7c Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 3 Sep 2020 16:41:40 +0800 Subject: [PATCH 308/360] =?UTF-8?q?third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml index ba2f972f3a..1028ad0be9 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.137 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.138 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 2d090fb332..6eadb9e5f2 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.137 + 0.0.138 com.epmet From a3b2dfdd32790698d278ef87919eefc96fd35692 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 3 Sep 2020 16:49:54 +0800 Subject: [PATCH 309/360] =?UTF-8?q?third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml index eede66ca29..1028ad0be9 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.136 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.138 ports: - "8110:8110" network_mode: host # 使用现有网络 From 1427c2cbbc9f827625e8cc7263affb23577d3df8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 3 Sep 2020 16:55:17 +0800 Subject: [PATCH 310/360] =?UTF-8?q?=E5=8C=BA=E7=9B=B4=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E6=9A=82=E5=AD=98v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FactIndexGovrnAblityDeptMonthlyDao.java | 10 ++++ .../screen/ScreenCustomerDeptDao.java | 11 ++++ .../indexcal/DeptScoreEntity.java | 8 +-- .../indexcal/GridCorreLationService.java | 12 ++++ .../indexcal/impl/DeptScoreServiceImpl.java | 58 +++++++++++++++++-- .../impl/GridCorreLationServiceImpl.java | 3 +- .../FactIndexGovrnAblityDeptMonthlyDao.xml | 12 ++++ .../screen/ScreenCustomerDeptDao.xml | 12 ++++ 8 files changed, 115 insertions(+), 11 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index 20abf945b7..abdabd7465 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -98,4 +98,14 @@ public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao * @Date 10:52 2020-08-18 **/ void batchInsertCustomerDept(@Param("list") List list, @Param("customerId")String customerId); + + /** + * @param customerId + * @param deptId + * @return com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity + * @author yinzuomei + * @description 查询部门所属组织id + * @Date 2020/9/3 16:32 + **/ + ScreenCustomerDeptEntity selectParentAgencyId(@Param("customerId") String customerId, @Param("deptId") String deptId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java index 8517c59ff1..29857fdc2c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java @@ -47,10 +47,10 @@ public class DeptScoreEntity extends BaseEpmetEntity { */ private String deptId; - /** - * 所有上级ID,用英文逗号分开 - */ - private String allParentIds; + /** + * 部门所属的组织id + */ + private String agencyId; /** * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index 14d2ac604c..a93697ce12 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -3,7 +3,10 @@ package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; +import com.epmet.support.normalizing.batch.IndexInputVO; +import java.math.BigDecimal; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -41,4 +44,13 @@ public interface GridCorreLationService { * @Date 2020/8/27 14:48 **/ List pageGridList(PageQueryGridFormDTO formDTO); + + /** + * @return java.util.HashMap + * @param indexMap + * @author yinzuomei + * @description 通用计算方法 + * @Date 2020/9/3 16:07 + **/ + HashMap calculate(Map> indexMap); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 20360baa29..59b6127b77 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -22,14 +22,19 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerDeptDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.support.normalizing.BigDecimalScoreCalculator; @@ -42,6 +47,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.math.BigDecimal; @@ -49,7 +55,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; /** @@ -67,6 +72,12 @@ public class DeptScoreServiceImpl extends BaseServiceImpl resultMap = gridCorreLationService.calculate(indexMap); + //保存中间表记录 + this.saveDeptScoreEntity(formDTO,resultMap); + } + /** + * @return void + * @param formDTO + * @param resultMap + * @author yinzuomei + * @description fact_index_dept_score + * @Date 2020/9/3 16:11 + **/ + @Transactional(rollbackFor = Exception.class) + public void saveDeptScoreEntity(CalculateCommonFormDTO formDTO, HashMap resultMap) { + String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); + String yearId = DateUtils.getYearId(formDTO.getMonthId()); + resultMap.forEach((deptId, governAblityScore) -> { + DeptScoreEntity deptScoreEntity = new DeptScoreEntity(); + deptScoreEntity.setCustomerId(formDTO.getCustomerId()); + deptScoreEntity.setDeptId(deptId); + deptScoreEntity.setIsTotal(NumConstant.ZERO_STR); + deptScoreEntity.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + ScreenCustomerDeptEntity deptEntity = screenCustomerDeptDao.selectParentAgencyId(formDTO.getCustomerId(), deptId); + if (null != deptEntity) { + if(StringUtils.isNotBlank(deptEntity.getParentAgencyId())){ + deptScoreEntity.setAgencyId(deptEntity.getParentAgencyId()); + } + } + deptScoreEntity.setQuarterId(quarterId); + deptScoreEntity.setYearId(yearId); + deptScoreEntity.setMonthId(formDTO.getMonthId()); + deptScoreEntity.setScore(governAblityScore); + deptScoreDao.insert(deptScoreEntity); + }); } /** * @param formDTO * @return void * @author yinzuomei - * @description TODO + * @description * @Date 2020/9/3 9:35 **/ private void handleOneGridScene(CalculateCommonFormDTO formDTO) { - + FactIndexGovrnAblityDeptMonthlyEntity entity = factIndexGovrnAblityDeptMonthlyDao.selectOneRecord(formDTO.getCustomerId(), formDTO.getMonthId()); + HashMap resultMap = new HashMap<>(); + resultMap.put(entity.getDeptId(), new BigDecimal(NumConstant.FIFTY_STR)); + this.saveDeptScoreEntity(formDTO, resultMap); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 306c3c7713..abbe326a81 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -370,7 +370,8 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description 调用计算器计算每个指标下,各个网格的总分 * @Date 2020/8/30 21:40 **/ - private HashMap calculate(Map> indexMap) { + @Override + public HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml index bf9647c67f..3039ac9eed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml @@ -140,4 +140,16 @@ m.DEPT_ID ASC LIMIT #{offset},#{pageSize} + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml index 8f1ef7eaf4..d014071995 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml @@ -52,4 +52,16 @@ + + + From 4136814cabaa9ff988c031136c5ede8d35f9f4fe Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 3 Sep 2020 17:15:57 +0800 Subject: [PATCH 311/360] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-access/gov-access-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/gov-access/gov-access-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-prod.yml b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-prod.yml index 7a5133aacd..72ebb1216f 100644 --- a/epmet-module/gov-access/gov-access-server/deploy/docker-compose-prod.yml +++ b/epmet-module/gov-access/gov-access-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-access-server: container_name: gov-access-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-access-server:0.3.38 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-access-server:0.3.39 ports: - "8099:8099" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index b69fce8298..948dca9446 100644 --- a/epmet-module/gov-access/gov-access-server/pom.xml +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.38 + 0.3.39 gov-access com.epmet From 9fbb8136e44552e5ce2205757cce444036f5f13d Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 3 Sep 2020 22:15:20 +0800 Subject: [PATCH 312/360] =?UTF-8?q?=E5=85=9A=E5=91=98=E7=9B=B8=E5=85=B3=20?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=8F=AA=E6=9C=89=E4=B8=80=E6=9D=A1=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=88=99=E7=BB=9950=E5=88=86=EF=BC=9B=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=AF=BC=E5=85=A5=E6=8C=87=E6=A0=87=E7=9A=84=E6=AD=A3?= =?UTF-8?q?=E8=B4=9F=E7=9B=B8=E5=85=B3=E5=8F=8A=E9=98=88=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/model/IndexExcelDataListener.java | 28 +++++-- .../main/java/com/epmet/model/IndexModel.java | 1 + .../impl/CpcIndexCalculateServiceImpl.java | 77 +++++++++++++++---- .../evaluationindex/indexcal/CpcScoreDao.xml | 18 +++-- 4 files changed, 91 insertions(+), 33 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index eef2856684..3fec1a9132 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -11,6 +11,7 @@ import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; import com.epmet.service.evaluationindex.screen.IndexDictService; import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; +import com.epmet.support.normalizing.Correlation; import com.epmet.util.Pinyin4jUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -29,7 +30,6 @@ import java.util.stream.Collectors; */ public class IndexExcelDataListener extends AnalysisEventListener { private static final Logger LOGGER = LoggerFactory.getLogger(IndexExcelDataListener.class); - private String POSITIVE = "positive"; /** * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收 */ @@ -86,8 +86,23 @@ public class IndexExcelDataListener extends AnalysisEventListener { data.setWeight(preWheight); } LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data)); - //TODO 默认正相关 - data.setCorrelation(POSITIVE); + if (StringUtils.isNotBlank(data.getThreshold())) { + String threshold = data.getThreshold(); + if ("无".equals(data.getThreshold())) { + threshold = "-1"; + } else if (data.getThreshold().contains("%")) { + String thresholdStr = data.getThreshold().replace("%", ""); + threshold = new BigDecimal(thresholdStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP).toString(); + } + data.setThreshold(threshold); + } + if (StringUtils.isNotBlank(data.getCorrelation())) { + if (Correlation.NEGATIVE.getDesc().equals(data.getCorrelation())) { + data.setCorrelation(Correlation.NEGATIVE.getCode()); + } else { + data.setCorrelation(Correlation.POSITIVE.getCode()); + } + } IndexDictEntity entity = new IndexDictEntity(); IndexDictEntity entity2 = new IndexDictEntity(); @@ -240,11 +255,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); templateEntity.setWeight(new BigDecimal(index.getWeight()).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); } - - if (StringUtils.isNotBlank(index.getThreshold())) { - String thresholdStr = index.getThreshold().replace("%", ""); - templateEntity.setThreshold(new BigDecimal(thresholdStr).divide(new BigDecimal(100), 4, RoundingMode.HALF_UP)); - } + templateEntity.setThreshold(new BigDecimal(index.getThreshold())); + templateEntity.setCorrelation(index.getCorrelation()); } private void buildIndexDicEntity(IndexModel data, IndexDictEntity entity, IndexDictEntity entity2, IndexDictEntity entity3, IndexDictEntity entity4, IndexDictEntity entity5) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java index 5ff0b19267..77a0fd3138 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexModel.java @@ -21,6 +21,7 @@ public class IndexModel { private String weight; @ExcelProperty(value = "五级权重") private String level5Weight; + //没有阈值:无,有就是百分数 @ExcelProperty(value = "阈值") private String threshold; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 7876c2158e..52cb4e3fc6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -10,9 +10,9 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; @@ -43,8 +43,6 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @Autowired - private IndexCodeFieldReDao indexCodeFieldReDao; - @Autowired private IndexGroupDetailService getDetailListByParentCode; @Autowired private IndexCodeFieldReService indexCodeFieldReService; @@ -97,11 +95,43 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity.setScore(totalEntity.getScore().add(total)); } }); - deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + } + + /** + * @param formDTO + * @param indexCode + * @param stringObjectMap + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private CpcScoreEntity handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode, Map stringObjectMap) { + FactIndexPartyAblityCpcMonthlyEntity factCpc = JSON.parseObject(JSON.toJSONString(stringObjectMap), FactIndexPartyAblityCpcMonthlyEntity.class); + // 保存中间表 + CpcScoreEntity cpcScoreEntity = new CpcScoreEntity(); + cpcScoreEntity.setCustomerId(factCpc.getCustomerId()); + cpcScoreEntity.setAgencyId(factCpc.getAgencyId()); + cpcScoreEntity.setGridId(factCpc.getGridId()); + cpcScoreEntity.setYearId(factCpc.getYearId()); + cpcScoreEntity.setMonthId(factCpc.getMonthId()); + cpcScoreEntity.setUserId(factCpc.getUserId()); + cpcScoreEntity.setScore(new BigDecimal(NumConstant.FIFTY_STR)); + cpcScoreEntity.setIndexCode(indexCode); + cpcScoreEntity.setIsTotal(NumConstant.ZERO_STR); + return cpcScoreEntity; } - private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { - cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); + /** + * desc:根据客户id和月份Id 指标code 非必填 删除数据 + * + * @param formDTO + * @param indexCode 指标code 非必填 + * @param values + */ + private void deleteAndInsertBatch(CalculateCommonFormDTO formDTO, Collection values, String indexCode) { + cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode); cpcScoreDao.insertBatch(values); } @@ -119,20 +149,33 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { return; } - int pageNo = 1; - int pageSize = 10; + int pageNo = NumConstant.ONE; + int pageSize = NumConstant.ONE_THOUSAND; //分页查询 要计算的原始数据 List> list = null; do { list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); if (!CollectionUtils.isEmpty(list)) { - //遍历指标分组 计算分数 - List> finalList = list; - groupIndexDetailsMap.forEach((parentIndexCode, details) -> { - calculateScore(formDTO, details, finalList, minAndMaxMap, parentIndexCode); - }); + //如果是第一页且仅有一条数据 则直接给50分 + if (pageNo == NumConstant.ONE && list.size() == NumConstant.ONE) { + List insertList = new ArrayList<>(); + for (String parentIndexCode : groupIndexDetailsMap.keySet()) { + insertList.add(handleOneGridScene(formDTO, parentIndexCode, list.get(0))); + } + if (CollectionUtils.isEmpty(insertList)) { + deleteAndInsertBatch(formDTO, insertList, null); + } + } else { + //遍历指标分组 计算分数 + for (Map.Entry> entry : groupIndexDetailsMap.entrySet()) { + String parentIndexCode = entry.getKey(); + List details = entry.getValue(); + calculateScore(formDTO, details, list, minAndMaxMap, parentIndexCode); + } + } } - } while (!CollectionUtils.isEmpty(list) && pageNo++ > 0); + pageNo++; + } while (!CollectionUtils.isEmpty(list) && list.size() == pageSize); } /** @@ -185,7 +228,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { log.info("计算的结果:{}", result); //处理结果 - if (CollectionUtils.isEmpty(result)){ + if (CollectionUtils.isEmpty(result)) { log.error("calculateScore calculateScore return empty"); return; } @@ -209,7 +252,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); + this.deleteAndInsertBatch(formDTO, list, parentIndexCode); } @@ -242,7 +285,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); //如果最大值超过阈值 则最大值为阈值 if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO - && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE) { maxValue = index.getThreshold(); } //分值计算器 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml index 3f38b0dbbc..3c6fb2ea55 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml @@ -3,6 +3,16 @@ + + delete from fact_index_cpc_score + where + CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} + and MONTH_ID = #{monthId,jdbcType=VARCHAR} + + and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} + + + @@ -18,14 +28,6 @@ - - delete from fact_index_cpc_score - where - CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} - and MONTH_ID = #{monthId,jdbcType=VARCHAR} - and INDEX_CODE = #{indexCode,jdbcType=VARCHAR} - - + SELECT + CUSTOMER_ID customerId, + AGENCY_ID agencyId, + PARENT_AGENCY_ID parentAgencyId, + YEAR_ID yearId, + MONTH_ID monthId, + IS_TOTAL isTotal, + SCORE score, + INDEX_CODE indexCode + FROM + fact_index_agency_score + WHERE + DEL_FLAG = '0' + AND CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + ORDER BY AGENCY_ID + + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index a5a7972279..a528c94f95 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -3,4 +3,22 @@ - \ No newline at end of file + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml index c3da270827..07e3b05b94 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml @@ -84,4 +84,22 @@ GROUP BY fics.agency_id - \ No newline at end of file + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml index 9d2176f678..b6eed400a2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml @@ -24,4 +24,23 @@ AND figc.index_code = #{indexCode} GROUP BY figc.agency_id - \ No newline at end of file + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index 4d16660ed3..dda779d7b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -60,4 +60,14 @@ + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml index d014071995..8937212e71 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml @@ -64,4 +64,15 @@ AND m.CUSTOMER_ID =#{customerId} AND m.DEPT_ID =#{deptId} + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml index fdb4f2407c..7a8c216fea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml @@ -105,4 +105,16 @@ AND m.CUSTOMER_ID =#{customerId} AND m.GRID_ID = #{gridId} + + From 6847c957e2a403525c39c8dac0791092494f75e7 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 4 Sep 2020 09:46:54 +0800 Subject: [PATCH 317/360] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-gateway/pom.xml | 4 ++-- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- .../dao/evaluationindex/screen/FactIndexGridScoreDao.java | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index 796a1e9880..97fd3b3851 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -181,8 +181,8 @@ lb://data-report-server - - http://localhost:8108 + lb://data-statistical-server + lb://epmet-openapi-scan diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 3746a65446..8a32ee8d75 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -201,7 +201,7 @@ 6379 123456 - false + true 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java index 1736cb88fe..8a8a1f8a38 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java @@ -45,7 +45,6 @@ public interface FactIndexGridScoreDao extends BaseDao * @date 2020/8/28 3:20 下午 */ List selectSubGridAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); - List selectSubGridPartyAvgScore(@Param("customerId")String customerId,@Param("monthId")String monthId); /** * @Description 社区下属所有网格治理能力汇总平均值 From f7282c4f00af6686f55cf8f4e0d61bb1089ce831 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 4 Sep 2020 09:49:57 +0800 Subject: [PATCH 318/360] =?UTF-8?q?control=E4=BB=A3=E7=A0=81=E6=81=A2?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FactIndexCollectController.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java index 21a81701ac..82966dbe82 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java @@ -151,22 +151,4 @@ public class FactIndexCollectController { factIndexCollectService.insertDeptGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); return new Result(); } - - public static void main(String[] args) { - String a = "202009"; - System.out.println(a.substring(0,4)); - System.out.println(a.substring(4,6)); - - int[] aa = new int[2]; - System.out.println(aa[0]); - System.out.println(aa == null); - IndexDataMonthlyFormDTO monthlyFormDTO = new IndexDataMonthlyFormDTO(); - System.out.println(monthlyFormDTO.getIndexTotal()); - } - - @GetMapping("hahaha") - public Result hahaha(String monthId, String customerId) { - factIndexCollectService.insertScreenIndexDataMonthlyAndYearly(monthId, customerId); - return new Result(); - } } From d2f08bb779509ece3fe10be2884d8d06867dcd14 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 4 Sep 2020 10:39:53 +0800 Subject: [PATCH 319/360] =?UTF-8?q?=E5=8A=A0=E6=80=A5=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/CodeAuditResultDTO.java | 5 +++++ .../epmet/dto/form/SubmitAuditFormDTO.java | 5 +++++ .../dto/result/CodeVersionInfoResultDTO.java | 4 ++++ .../epmet/entity/CodeAuditResultEntity.java | 5 +++++ .../epmet/service/impl/CodeServiceImpl.java | 19 +++++++++++++++---- .../db/migration/V0.0.9__thirdUpdate.sql | 1 + 6 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.9__thirdUpdate.sql diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeAuditResultDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeAuditResultDTO.java index 910ded04de..afcedffee0 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeAuditResultDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeAuditResultDTO.java @@ -58,6 +58,11 @@ public class CodeAuditResultDTO implements Serializable { */ private String result; + /** + * 是否加急 + */ + private Boolean isSpeed; + /** * 原因 */ diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SubmitAuditFormDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SubmitAuditFormDTO.java index 9c2f1c506f..a16d0c8d6c 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SubmitAuditFormDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SubmitAuditFormDTO.java @@ -25,6 +25,11 @@ public class SubmitAuditFormDTO implements Serializable { */ private Boolean isSpeed; + /** + * isSpeed=true时,是否是审核失败后的反馈提审 + */ + private Boolean isRepeat; + /** * 小程序版本说明和功能解释 */ diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CodeVersionInfoResultDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CodeVersionInfoResultDTO.java index b1b367c457..74b1bb54d4 100644 --- a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CodeVersionInfoResultDTO.java +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CodeVersionInfoResultDTO.java @@ -71,6 +71,10 @@ public class CodeVersionInfoResultDTO implements Serializable { * */ private String status; + /** + * + */ + private Boolean isSpeed; } @Data diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeAuditResultEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeAuditResultEntity.java index 164b8a97bb..488fa876a0 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeAuditResultEntity.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeAuditResultEntity.java @@ -58,6 +58,11 @@ public class CodeAuditResultEntity extends BaseEpmetEntity { */ private String result; + /** + * 是否加急 + */ + private Boolean isSpeed; + /** * 原因 */ diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java index 611c1a05b4..09f5f5a276 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java @@ -183,6 +183,7 @@ public class CodeServiceImpl implements CodeService { //审核版本 CodeCustomerDTO audit = codeCustomerService.getAuditInfo(formDTO.getCustomerId(), formDTO.getClientType()); if(null != audit) { + CodeAuditResultDTO auditResult = codeAuditResultService.getAuditResultByCodeId(audit.getId()); CodeVersionInfoResultDTO.AuditBean auditBean = new CodeVersionInfoResultDTO.AuditBean(); auditBean.setCodeId(audit.getId()); auditBean.setVersion(audit.getUserVersion()); @@ -191,7 +192,6 @@ public class CodeServiceImpl implements CodeService { //获取小程序调用令牌 AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); //获取审核结果信息 - CodeAuditResultDTO auditResult = codeAuditResultService.getAuditResultByCodeId(audit.getId()); //调用微信API获取最新审核状态 WxMaCodeAuditStatusReq request = new WxMaCodeAuditStatusReq(); request.setAuditId(auditResult.getAuditId()); @@ -222,6 +222,7 @@ public class CodeServiceImpl implements CodeService { } } auditBean.setStatus(audit.getStatus()); + auditBean.setIsSpeed(auditResult.getIsSpeed()); auditBean.setCommitTime(DateUtils.format(audit.getCommitTime(), DateUtils.DATE_TIME_PATTERN)); auditBean.setAuditTime(DateUtils.format(audit.getAuditTime(), DateUtils.DATE_TIME_PATTERN)); resultDTO.setAudit(auditBean); @@ -283,6 +284,7 @@ public class CodeServiceImpl implements CodeService { codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT, wxResult.getErrorMsg()); throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg()); } + boolean speedSuccess = false; if(formDTO.getIsSpeed()) { //调用微信API 加急审核 WxMaSpeedUpAuditReq speedRequest = new WxMaSpeedUpAuditReq(); @@ -291,8 +293,9 @@ public class CodeServiceImpl implements CodeService { if (!wxSpeedResult.success()) { saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getClientType(), codeCustomerDTO.getId(), codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT, wxSpeedResult.getErrorMsg()); - throw new RenException(wxSpeedResult.getErrorCode(), wxSpeedResult.getErrorMsg()); + log.error(wxSpeedResult.getErrorMsg()); } + speedSuccess = wxSpeedResult.success(); } //获取审核结果信息 CodeAuditResultDTO codeAuditResultDTO = codeAuditResultService.getAuditResultByCodeId(formDTO.getCodeId()); @@ -302,18 +305,24 @@ public class CodeServiceImpl implements CodeService { codeAuditResultDTO.setCustomerId(codeCustomerDTO.getCustomerId()); codeAuditResultDTO.setCodeId(codeCustomerDTO.getId()); codeAuditResultDTO.setAuditId(wxResult.getData()); + codeAuditResultDTO.setIsSpeed(speedSuccess); codeAuditResultDTO.setResult(CodeConstant.AUDITING); codeAuditResultService.save(codeAuditResultDTO); } else { - codeAuditResultDTO.setFeedbackInfo(formDTO.getFeedbackInfo()); - codeAuditResultDTO.setFeedbackStuff(formDTO.getFeedbackStuff()); codeAuditResultService.update(codeAuditResultDTO); codeAuditResultService.deleteById(codeAuditResultDTO.getId()); codeAuditResultDTO = new CodeAuditResultDTO(); + codeAuditResultDTO.setFeedbackInfo(formDTO.getFeedbackInfo()); + codeAuditResultDTO.setFeedbackStuff(formDTO.getFeedbackStuff()); codeAuditResultDTO.setCustomerId(codeCustomerDTO.getCustomerId()); codeAuditResultDTO.setCodeId(codeCustomerDTO.getId()); codeAuditResultDTO.setAuditId(wxResult.getData()); codeAuditResultDTO.setResult(CodeConstant.AUDITING); + if (formDTO.getIsRepeat()) { + codeAuditResultDTO.setIsSpeed(true); + } else { + codeAuditResultDTO.setIsSpeed(speedSuccess); + } codeAuditResultService.save(codeAuditResultDTO); } //更新代码表状态 @@ -656,6 +665,8 @@ public class CodeServiceImpl implements CodeService { codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT, wxSpeedResult.getErrorMsg()); throw new RenException(wxSpeedResult.getErrorCode(), wxSpeedResult.getErrorMsg()); } + codeAuditResultDTO.setIsSpeed(true); + codeAuditResultService.update(codeAuditResultDTO); } @Override diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.9__thirdUpdate.sql b/epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.9__thirdUpdate.sql new file mode 100644 index 0000000000..9e7d638917 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/db/migration/V0.0.9__thirdUpdate.sql @@ -0,0 +1 @@ +ALTER TABLE code_audit_result ADD COLUMN IS_SPEED tinyint NULL DEFAULT 0 COMMENT '是否加急' AFTER RESULT; \ No newline at end of file From 8d0e923f77f9cf02a6c4db1dc58c68d9c594f4b7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 4 Sep 2020 10:41:38 +0800 Subject: [PATCH 320/360] =?UTF-8?q?getAgencyListByCustomerId=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=95=B0=E6=8D=AE=E6=BA=90=E6=94=B9=E5=9B=9E=E5=8E=9F?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=20STATS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java index 7f21b81ee0..d24fec3ee8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimAgencyServiceImpl.java @@ -210,7 +210,7 @@ public class DimAgencyServiceImpl extends BaseServiceImpl getAgencyListByCustomerId(String customerId) { if (StringUtils.isBlank(customerId)){ From 44c7aa5168c0eeecb82ebf67dc29235f2d0d74fc Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 4 Sep 2020 10:46:26 +0800 Subject: [PATCH 321/360] =?UTF-8?q?third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml index 1028ad0be9..a94c11da8f 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.138 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.139 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 6eadb9e5f2..ef24994f99 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.138 + 0.0.139 com.epmet From bef22d71024d3fce22f427b7d6f1276cbe7ea998 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 4 Sep 2020 10:54:45 +0800 Subject: [PATCH 322/360] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7-?= =?UTF-8?q?=E9=81=97=E6=BC=8F=E4=B8=8A=E7=94=9F=E4=BA=A7=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi-mine/resi-mine-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/resi-mine/resi-mine-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml index a2a9ae18df..e59f895806 100644 --- a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-mine-server: container_name: resi-mine-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-mine-server:0.3.38 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-mine-server:0.3.39 ports: - "8094:8094" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-mine/resi-mine-server/pom.xml b/epmet-module/resi-mine/resi-mine-server/pom.xml index 35d2c0edda..31ec3b085d 100644 --- a/epmet-module/resi-mine/resi-mine-server/pom.xml +++ b/epmet-module/resi-mine/resi-mine-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.38 + 0.3.39 com.epmet resi-mine From b0261bca0ade2beda9dac799d7e269bc18e29cd0 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 4 Sep 2020 13:55:04 +0800 Subject: [PATCH 323/360] =?UTF-8?q?=E6=89=AB=E7=A0=81=E6=8E=88=E6=9D=83=20?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=20=E6=8C=89=E9=92=AE=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java index 08f17ae49a..1cb126fe62 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java @@ -43,8 +43,8 @@ public interface WxMaCodeConstant { * 上面url为扫码形式 * 下面注释url为按钮形式 */ - String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=%s&pre_auth_code=%s&redirect_uri=%s"; -// String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&auth_type=3&no_scan=1&component_appid=%s&pre_auth_code=%s&redirect_uri=%s#wechat_redirect"; +// String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=%s&pre_auth_code=%s&redirect_uri=%s"; + String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&auth_type=3&no_scan=1&component_appid=%s&pre_auth_code=%s&redirect_uri=%s#wechat_redirect"; /** * 创建开放平台帐号并绑定公众号/小程序 From ff8cff2a057c567f4f117d01f11001a1d64e05f6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 4 Sep 2020 13:58:57 +0800 Subject: [PATCH 324/360] =?UTF-8?q?third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index d4706c5733..60b8743393 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.134 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.140 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index ef24994f99..493388ea59 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.139 + 0.0.140 com.epmet From 43f07858994d39847ab31e8c86b93f29c29c78f8 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 4 Sep 2020 14:00:08 +0800 Subject: [PATCH 325/360] =?UTF-8?q?third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml index a94c11da8f..332cf74116 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.139 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.140 ports: - "8110:8110" network_mode: host # 使用现有网络 From b02d471c1ac311e737f69d00610e722c02aec2a9 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 4 Sep 2020 14:17:57 +0800 Subject: [PATCH 326/360] =?UTF-8?q?=E6=89=AB=E7=A0=81=E6=8E=88=E6=9D=83=20?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=20=E6=8C=89=E9=92=AE=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java index 1cb126fe62..4d62fcc95d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java @@ -44,7 +44,7 @@ public interface WxMaCodeConstant { * 下面注释url为按钮形式 */ // String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=%s&pre_auth_code=%s&redirect_uri=%s"; - String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&auth_type=3&no_scan=1&component_appid=%s&pre_auth_code=%s&redirect_uri=%s#wechat_redirect"; + String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&auth_type=3&no_scan=1&component_appid=%s&pre_auth_code=%s&redirect_uri=%s&auth_type=3#wechat_redirect"; /** * 创建开放平台帐号并绑定公众号/小程序 From 281b69b4f29096b364d35ecd2da7218bea1bf35f Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 4 Sep 2020 15:10:58 +0800 Subject: [PATCH 327/360] =?UTF-8?q?=E5=85=A8=E5=8C=BA=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/IndexCalConstant.java | 4 + .../indexcal/SubAgencyScoreAvgResultDTO.java | 51 +++ .../com/epmet/controller/DemoController.java | 14 +- .../indexcal/AgencyScoreDao.java | 16 +- .../indexcal/DeptScoreDao.java | 12 + .../FactIndexGovrnAblityDeptMonthlyDao.java | 1 + .../java/com/epmet/eum/IndexCodeEnum.java | 4 + .../IndexCalculateDistrictService.java | 18 + .../IndexCalculateDistrictServiceImpl.java | 406 ++++++++++++++++++ .../impl/IndexCalculateStreetServiceImpl.java | 2 +- .../indexcal/AgencyScoreDao.xml | 21 +- .../evaluationindex/indexcal/DeptScoreDao.xml | 22 + 12 files changed, 562 insertions(+), 9 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubAgencyScoreAvgResultDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateDistrictService.java create mode 100644 epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index bc7295ccda..f02185071f 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -31,6 +31,8 @@ public interface IndexCalConstant { String STREET_LEVEL = "street"; + String DISTRICT_LEVEL = "district"; + String COMMUNITY_RELATE = "shequxiangguan"; @@ -55,7 +57,9 @@ public interface IndexCalConstant { 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 = "查询【街道】治理能力的六个五级指标集合为空"; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubAgencyScoreAvgResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubAgencyScoreAvgResultDTO.java new file mode 100644 index 0000000000..f88e035b7b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubAgencyScoreAvgResultDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Author zxc + * @DateTime 2020/9/4 9:32 上午 + */ +@Data +public class SubAgencyScoreAvgResultDTO implements Serializable { + + private static final long serialVersionUID = 6913351504675726385L; + + /** + * + */ + private String customerId; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 分数 + */ + private BigDecimal score; +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 380b2f3b86..397d99df7a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -17,10 +17,7 @@ import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMont import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.service.StatsDemoService; -import com.epmet.service.evaluationindex.indexcal.DeptScoreService; -import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; -import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; -import com.epmet.service.evaluationindex.indexcal.IndexCalculateStreetService; +import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.stats.DimAgencyService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -56,6 +53,8 @@ public class DemoController { private IndexCalculateStreetService indexCalculateStreetService; @Autowired private DeptScoreService deptScoreService; + @Autowired + private IndexCalculateDistrictService indexCalculateDistrictService; @GetMapping("testAlarm") public void testAlarm() { @@ -456,4 +455,11 @@ public class DemoController { String monthId = "202008"; indexCalculateStreetService.calStreetAll(customerId,monthId); } + + @PostMapping("districtZxc") + public void getDistrict(){ + String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + String monthId = "202008"; + indexCalculateDistrictService.calDistrictAll(customerId,monthId); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java index 219d617a0d..b30d2751d1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -19,7 +19,7 @@ package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.AgencyScoreDTO; -import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -54,13 +54,23 @@ public interface AgencyScoreDao extends BaseDao { void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("dataType")String dataType); /** - * @Description 查询街道相关信息 + * @Description 查询【fact_index_agency_score】相关信息 * @param customerId * @param monthId * @author zxc * @date 2020/9/1 9:41 上午 */ - List selectStreetInfo(@Param("customerId") String customerId, @Param("monthId")String monthId,@Param("dataType")String dataType); + List selectAgencyScoreInfo(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("dataType")String dataType); + + /** + * @Description 区下级街道得分平均值 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/31 1:51 下午 + */ + List selectAgencyScoreAvg(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + /** * 根据入参查询 区/街道相关分数表 记录 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java index 0718e44771..b77849a5d5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -19,6 +19,7 @@ package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.DeptScoreDTO; +import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -44,4 +45,15 @@ public interface DeptScoreDao extends BaseDao { **/ List selectListDeptScore(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 所有直属部门治理能力平均值 + * @param customerId + * @param monthId + * @param indexCode + * @author zxc + * @date 2020/9/4 10:53 上午 + */ + List selectGovernDeptScoreAvg(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index abdabd7465..5a9350a63e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.evaluationindex.indexcoll; /** import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index 5ebaab6f74..cc29f12a95 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -31,6 +31,10 @@ public enum IndexCodeEnum { JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ("jiedaoxiashusysqdjnlhzpjz","街道下属所有社区党建能力汇总(平均值)",5), JIE_DAO_XIA_SHU_SYSQZLNLHZ("jiedaoxiashusysqzlnlhz","街道下属所有社区治理能力汇总 (平均值) ",5), JIE_DAO_XIA_SHU_SQFWNLDFPYZ("jiedaoxiashusqfwnldfpjz","街道下属社区服务能力得分 (平均值) ",5), + QU_XIA_SHU_JIE_DFWNLHZPJZ("quxiashujiedfwnlhzpjz","区下属街道服务能力汇总(平均值)",5), + QU_XIA_JI_JIE_DDJNLHZPJZ("quxiajijieddjnlhzpjz","区下级街道党建能力汇总(平均值)",5), + SUO_YOU_JIE_DAO_ZLNLPJZ("suoyoujiedaozlnlpjz","所有街道治理能力(平均值)",5), + SUO_YOU_ZHI_SHU_BMZLNLPJZ("suoyouzhishubmzlnlpjz","所有直属部门治理能力(平均值)",5), ; private String code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateDistrictService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateDistrictService.java new file mode 100644 index 0000000000..0e8ce09ccf --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateDistrictService.java @@ -0,0 +1,18 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/9/4 9:03 上午 + */ +public interface IndexCalculateDistrictService { + + /** + * @Description 计算全区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + Boolean calDistrictAll(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java new file mode 100644 index 0000000000..4fd50137bd --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -0,0 +1,406 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateDistrictService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/9/4 9:03 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrictService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private AgencyScoreDao agencyScoreDao; + @Autowired + private DeptScoreDao deptScoreDao; + + /** + * @Description 计算全区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + @Override + public Boolean calDistrictAll(String customerId, String monthId) { + Boolean aBoolean = districtPartyCalculate(customerId, monthId);//党建能力 + if (!aBoolean.equals(true)) { + throw new RenException("calculate district-party-ability failure ......"); + } + Boolean bBoolean = districtGovernAbilityCalculate(customerId, monthId);// 治理能力 + if (!bBoolean.equals(true)) { + throw new RenException("calculate district-govern-ability failure ......"); + } + Boolean cBoolean = districtServiceAbilityCalculate(customerId, monthId);// 服务能力 + if (!cBoolean.equals(true)) { + throw new RenException("calculate district-service-ability failure ......"); + } + Boolean dBoolean = districtRelate(customerId, monthId); + if (!dBoolean.equals(true)) { + throw new RenException("calculate district-all insert failure ......"); + } + return true; + } + + /** + * @param customerId + * @Description 全区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + public Boolean districtPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List indexDetailList = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(indexDetailList)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return false; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + //党建能力平均值 + indexDetailList.forEach(detail -> { + if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + pid.put(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),subGridPartyAvgScore.get(NumConstant.ZERO).getParentId()); + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),pid); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, IndexCalConstant.PAGE_SIZE); + subPartyAvgList.forEach( party -> { + List index1SampleValues = new ArrayList<>(); + party.forEach(c -> { + pid.put(c.getAgencyId(),c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 区名义发文数量 + List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.DISTRICT_LEVEL); + if (CollectionUtils.isEmpty(publishArticleCountList)) { + log.error(IndexCalConstant.DISTRICT_PUBLISH_ARTICLE_LIST_NULL); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); + return; + }else if (publishArticleCountList.size() == NumConstant.ONE){ + pid.put(publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString()); + sizeOne(publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),pid); + return; + }else if (publishArticleCountList.size() > NumConstant.ONE) { + List decimalList = publishArticleCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(publishArticleCountList, IndexCalConstant.PAGE_SIZE); + publishArticleList.forEach( publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(),c.get(IndexCalConstant.PARENT_ID).toString()); + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), pid); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 全区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + public Boolean districtGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return false; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { + List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (districtGovernAvgList.size() == NumConstant.ONE) { + pid.put(districtGovernAvgList.get(NumConstant.ZERO).getAgencyId(),districtGovernAvgList.get(NumConstant.ZERO).getParentId()); + sizeOne(districtGovernAvgList.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid); + return; + } else if (districtGovernAvgList.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(districtGovernAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(districtGovernAvgList, IndexCalConstant.PAGE_SIZE); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + pid.put(c.getAgencyId(),c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else if (IndexCodeEnum.SUO_YOU_ZHI_SHU_BMZLNLPJZ.getCode().equals(detail.getIndexCode())){ + List deptScoreAvgList = deptScoreDao.selectGovernDeptScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (deptScoreAvgList.size() == NumConstant.ONE) { + pid.put(deptScoreAvgList.get(NumConstant.ZERO).getAgencyId(),deptScoreAvgList.get(NumConstant.ZERO).getParentId()); + sizeOne(deptScoreAvgList.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid); + return; + } else if (deptScoreAvgList.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(deptScoreAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(deptScoreAvgList, IndexCalConstant.PAGE_SIZE); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + pid.put(c.getAgencyId(),c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + }else{ + // TODO 治理能力暂无自身级别 + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), pid); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 全区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + public Boolean districtServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); + return false; + } + List indexInputVOS = new ArrayList<>(); + Map pid = new HashMap<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { + List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (subStreetAvgList.size() == NumConstant.ONE) { + pid.put(subStreetAvgList.get(NumConstant.ZERO).getAgencyId(),subStreetAvgList.get(NumConstant.ZERO).getParentId()); + sizeOne(subStreetAvgList.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid); + return; + } else if (subStreetAvgList.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subStreetAvgList.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subStreetAvgList, IndexCalConstant.PAGE_SIZE); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + pid.put(c.getAgencyId(),c.getParentId()); + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + // todo 暂时没有自身级别 + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean districtRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List agencyScoreList = agencyScoreDao.selectAgencyScoreInfo(customerId, monthId, IndexCalConstant.DISTRICT_LEVEL); + detailListByParentCode.forEach(detail -> { + agencyScoreList.forEach(community -> { + if (detail.getIndexCode().equals(community.getIndexCode())) { + community.setScore(community.getScore().multiply(detail.getWeight())); + } + }); + }); + Map> collect = agencyScoreList.stream().collect(Collectors.groupingBy(AgencyScoreDTO::getAgencyId)); + List result = new ArrayList<>(); + collect.forEach((key, value) -> { + AgencyScoreDTO score = new AgencyScoreDTO(); + score.setIsTotal(NumConstant.ONE_STR); + score.setCustomerId(customerId); + score.setAgencyId(key); + score.setMonthId(monthId); + score.setYearId(DateUtils.getYearId(monthId)); + score.setQuarterId(DateUtils.getQuarterId(monthId)); + score.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); + value.forEach(community -> { + score.setScore(score.getScore().add(community.getScore())); + score.setParentAgencyId(community.getParentAgencyId()); + }); + result.add(score); + }); + deleteAndInsert(customerId, monthId, IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode(), result); + return true; + } + + /** + * @param list + * @Description BigDecimal类型获取最大数和最小数 + * @author zxc + * @date 2020/8/27 1:30 下午 + */ + public MaxAndMinBigDecimalResultDTO getMaxAndMinBigDecimal(List list) { + BigDecimal max = Collections.max(list); + BigDecimal min = Collections.min(list); + MaxAndMinBigDecimalResultDTO result = new MaxAndMinBigDecimalResultDTO(); + result.setMax(max); + result.setMin(min); + return result; + } + + /** + * @param customerId + * @param monthId + * @param indexCode + * @param subAllDistrict + * @Description 先删除记录,在插入 + * @author zxc + * @date 2020/9/1 4:24 下午 + */ + @Transactional(rollbackFor = Exception.class) + public void deleteAndInsert(String customerId, String monthId, String indexCode, List subAllDistrict) { + if (!CollectionUtils.isEmpty(subAllDistrict)) { + agencyScoreDao.deleteOldRecord(customerId, monthId, indexCode,IndexCalConstant.DISTRICT_LEVEL); + System.err.println(subAllDistrict.size()); + agencyScoreDao.insertStreetRecord(subAllDistrict); + } + } + + /** + * @Description + * @param scoreCountOfSampleId 指标计算结果 + * @param customerId 客户ID + * @param monthId 月份ID + * @param isTotal 是否 总分【党建+治理+服务】 + * @param indexCode 党建能力:dangjiannengli,治理能力:zhilinengli,服务能力:fuwunengli,xx相关:xx相关 + * @author zxc + * @date 2020/9/2 2:37 下午 + */ + public List getResult(HashMap scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode,Map pid) { + List result = new ArrayList<>(); + scoreCountOfSampleId.forEach((k, v) -> { + AgencyScoreDTO score = new AgencyScoreDTO(); + score.setCustomerId(customerId); + score.setAgencyId(k); + score.setMonthId(monthId); + score.setQuarterId(DateUtils.getQuarterId(monthId)); + score.setYearId(DateUtils.getYearId(monthId)); + score.setIsTotal(isTotal); + score.setIndexCode(indexCode); + score.setScore(v); + score.setDataType(IndexCalConstant.DISTRICT_LEVEL); + pid.forEach((agency,parentAgency) -> { + if (k.equals(agency)){ + score.setParentAgencyId(parentAgency); + } + }); + result.add(score); + }); + return result; + } + + /** + * @Description 当查询结果为一条时,调用此方法 + * @param agencyId + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 2:40 下午 + */ + public void sizeOne(String agencyId,String customerId,String monthId,String indexCode,Map pid){ + HashMap scoreCountOfSampleId = new HashMap<>(); + scoreCountOfSampleId.put(agencyId,new BigDecimal(NumConstant.FIFTY)); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, indexCode,pid); + deleteAndInsert(customerId, monthId, indexCode, result); + } +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java index e3890fa9b2..473b7c7ccb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java @@ -338,7 +338,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ */ public Boolean streetRelate(String customerId, String monthId) { List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); - List agencyScoreList = agencyScoreDao.selectStreetInfo(customerId, monthId, IndexCalConstant.STREET_LEVEL); + List agencyScoreList = agencyScoreDao.selectAgencyScoreInfo(customerId, monthId, IndexCalConstant.STREET_LEVEL); detailListByParentCode.forEach(detail -> { agencyScoreList.forEach(community -> { if (detail.getIndexCode().equals(community.getIndexCode())) { diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index b472801ad9..179fd5c9eb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -63,7 +63,7 @@ - SELECT CUSTOMER_ID, AGENCY_ID, @@ -83,4 +83,23 @@ AND INDEX_CODE != "jiedaoxiangguan" AND data_type = #{dataType} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index a528c94f95..8e01fb1e52 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -21,4 +21,26 @@ ORDER BY DEPT_ID + + + From a48974578407c130a4f448219dc43d4c0ad07e13 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 4 Sep 2020 15:18:25 +0800 Subject: [PATCH 328/360] =?UTF-8?q?=E5=8C=BA=E7=9B=B4=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/indexcal/impl/DeptScoreServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 59b6127b77..52ea21e80a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -18,11 +18,13 @@ package com.epmet.service.evaluationindex.indexcal.impl; import com.alibaba.fastjson.JSON; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; @@ -63,6 +65,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2020-09-02 */ +@DataSource(DataSourceConstant.EVALUATION_INDEX) @Slf4j @Service public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { From dabb4e18d06173f9394e16004f44363ed98a05a2 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 4 Sep 2020 15:22:12 +0800 Subject: [PATCH 329/360] =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=8E=88=E6=9D=83=20?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=20=E6=89=AB=E7=A0=81=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java index 4d62fcc95d..c0d11dca5b 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java @@ -43,8 +43,8 @@ public interface WxMaCodeConstant { * 上面url为扫码形式 * 下面注释url为按钮形式 */ -// String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=%s&pre_auth_code=%s&redirect_uri=%s"; - String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&auth_type=3&no_scan=1&component_appid=%s&pre_auth_code=%s&redirect_uri=%s&auth_type=3#wechat_redirect"; + String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=%s&pre_auth_code=%s&redirect_uri=%s"; +// String API_AUTH_REGISTER_URL = "https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&auth_type=3&no_scan=1&component_appid=%s&pre_auth_code=%s&redirect_uri=%s&auth_type=3#wechat_redirect"; /** * 创建开放平台帐号并绑定公众号/小程序 From 6f2cb95f273e52f9af1e7b1cf0ea1d16d439a99a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 4 Sep 2020 15:23:04 +0800 Subject: [PATCH 330/360] =?UTF-8?q?third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- .../epmet-third-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index 60b8743393..d9ab7469c0 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.140 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.141 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml index 332cf74116..7d3cbbf9c4 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.140 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-third-server:0.0.141 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 493388ea59..e6fa7ad473 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.140 + 0.0.141 com.epmet From bf1870f388b0ad5441c88a14d0f2bf16c5429603 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 4 Sep 2020 15:27:34 +0800 Subject: [PATCH 331/360] =?UTF-8?q?=E4=BA=BA=E5=91=98=E8=B0=83=E5=8A=A8?= =?UTF-8?q?=E5=AF=B9=E8=87=AA=E5=B7=B1=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 1 + .../src/main/java/com/epmet/service/impl/StaffServiceImpl.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index d6ca03a428..41cd185cc7 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -79,6 +79,7 @@ public enum EpmetErrorCode { GRID_COUNT_UP(8407,"您的创建网格数量已到达上限,请联系管理员设置"), EXIT_PEND_PROJECT(8408,"该工作人员有项目尚在处理,处理完毕方可操作"), EXIT_PUBLISHED_ACTIVITY(8409,"该工作人员有活动尚在进行,等活动完成方可操作"), + CAN_NOT_SELF(8410,"无法对自己进行操作"), ALREADY_EVALUATE(8501,"您已评价"), ALREADY_VOTE(8502,"您已表态"), diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java index 9cae28ab76..c51ef0b513 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java @@ -194,6 +194,9 @@ public class StaffServiceImpl implements StaffService { @Override @Transactional(rollbackFor = Exception.class) public void staffTransfer(TokenDto tokenDto, StaffTransferFormDTO fromDTO) { + if (tokenDto.getUserId().equals(fromDTO.getStaffId())) { + throw new RenException(EpmetErrorCode.CAN_NOT_SELF.getCode()); + } //1.获取工作人员与机关关系 CustomerStaffAgencyDTO staffAgencyDTO = customerStaffAgencyService.getInfoByUserId(fromDTO.getStaffId()); String oldAgency = staffAgencyDTO.getAgencyId(); From b9ece9bf470e5116f0c90e9feca1759fe5d5942d Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 4 Sep 2020 16:11:25 +0800 Subject: [PATCH 332/360] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/IndexCalculateCommunityServiceImpl.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 1d7b37a78d..349167c112 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -1,6 +1,7 @@ package com.epmet.service.evaluationindex.indexcal.impl; import com.alibaba.druid.util.StringUtils; +import com.alibaba.fastjson.JSON; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; @@ -139,7 +140,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + log.info("communityPartyCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + log.info("communityPartyCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreCountOfSampleId)); List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),pid); deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); return true; @@ -216,7 +219,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + log.info("communityGovernAbilityCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + log.info("communityGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreCountOfSampleId)); List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid); deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); return true; @@ -293,7 +298,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } }); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + log.info("communityServiceAbilityCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + log.info("communityServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreCountOfSampleId)); List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid); deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); return true; From 8269770456ae2a77b099dbd416d222d080a3cb9e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 4 Sep 2020 16:51:52 +0800 Subject: [PATCH 333/360] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E5=A0=B5=E7=82=B9?= =?UTF-8?q?=E3=80=81=E5=85=9A=E5=BB=BA=E8=83=BD=E5=8A=9B=E3=80=81=E5=85=9A?= =?UTF-8?q?=E5=91=98=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GridPartyMemberDataDetailFormDTO.java | 96 ++++++++++++++++ .../form/GridPartyMemberDataFormDTO.java | 77 +------------ .../form/DifficultyDataDetailFormDTO.java | 105 ++++++++++++++++++ .../form/DifficultyDataFormDTO.java | 90 +-------------- .../FactIndexCollectController.java | 7 +- .../controller/ScreenCollController.java | 4 +- .../FactIndexPartyAblityCpcMonthlyDao.java | 17 +-- .../screen/ScreenDifficultyDataDao.java | 9 +- .../indexcoll/FactIndexCollectService.java | 2 +- .../impl/FactIndexCollectServiceImpl.java | 19 ++-- .../screen/ScreenCollService.java | 2 +- .../screen/impl/ScreenCollServiceImpl.java | 15 +-- .../FactIndexPartyAblityCpcMonthlyDao.xml | 7 +- .../screen/ScreenDifficultyDataDao.xml | 2 +- 14 files changed, 251 insertions(+), 201 deletions(-) create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataDetailFormDTO.java create mode 100644 epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataDetailFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataDetailFormDTO.java new file mode 100644 index 0000000000..364b19c34f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataDetailFormDTO.java @@ -0,0 +1,96 @@ +package com.epmet.dto.indexcollect.form; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 1、党建能力-党员相关指标上报(按照月份) 入参 + * + * @author yinzuomei@elink-cn.com + * @date 2020/9/4 16:04 + */ +@Data +public class GridPartyMemberDataDetailFormDTO implements Serializable { + private static final long serialVersionUID = 2923515319015973995L; + /** + * 机关id:网格所属的组织id + */ + private String agencyId; + + /** + * 网格id + */ + private String gridId; + + /** + * yyyyMM + */ + private String monthId; + + /** + * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 + */ + private String quarterId; + + /** + * yyyy + */ + private String yearId; + + /** + * 党员提出的话题数 + */ + private Integer createTopicCount; + + /** + * 党员参与话题数(支持,反对,评论,浏览) + */ + private Integer joinTopicCount; + + /** + * 话题转议题数 + */ + private Integer shiftIssueCount; + + /** + * 议题转项目数 + */ + private Integer shiftProjectCount; + + /** + * 参加三会一课次数 + */ + private Integer joinThreeMeetsCount; + + /** + * 自建群群众人数 + */ + private Integer groupUserCount; + + /** + * 自建群活跃度-话题数 + */ + private Integer groupTopicCount; + + /** + * 议题转项目率 + */ + private BigDecimal topicToIssueRatio; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 党员自建群活跃群众人数(08-24) + */ + private Integer groupActiveUserCount; + + /** + * 用户id + */ + private String userId; +} 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 3c7c7a5141..5a0a9fb3c8 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 @@ -3,8 +3,11 @@ package com.epmet.dto.indexcollect.form; import lombok.Data; import org.apache.poi.hpsf.Decimal; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.math.BigDecimal; +import java.util.List; /** * 1、党建能力-党员相关指标上报(按照月份) 入参 @@ -17,82 +20,14 @@ public class GridPartyMemberDataFormDTO implements Serializable { private static final long serialVersionUID = 1L; /** - * 机关id:网格所属的组织id + * 当为true时后台将删除本月数据 */ - private String agencyId; - - /** - * 网格id - */ - private String gridId; + private Boolean isFirst; /** * yyyyMM */ private String monthId; - /** - * yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4 - */ - private String quarterId; - - /** - * yyyy - */ - private String yearId; - - /** - * 党员提出的话题数 - */ - private Integer createTopicCount; - - /** - * 党员参与话题数(支持,反对,评论,浏览) - */ - private Integer joinTopicCount; - - /** - * 话题转议题数 - */ - private Integer shiftIssueCount; - - /** - * 议题转项目数 - */ - private Integer shiftProjectCount; - - /** - * 参加三会一课次数 - */ - private Integer joinThreeMeetsCount; - - /** - * 自建群群众人数 - */ - private Integer groupUserCount; - - /** - * 自建群活跃度-话题数 - */ - private Integer groupTopicCount; - - /** - * 议题转项目率 - */ - private BigDecimal topicToIssueRatio; - - /** - * 上级组织Id - */ - private String parentId; - - /** - * 党员自建群活跃群众人数(08-24) - */ - private Integer groupActiveUserCount; - - /** - * 用户id - */ - private String userId; + private List partyMemberDataList; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java new file mode 100644 index 0000000000..ab77a2363c --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java @@ -0,0 +1,105 @@ +package com.epmet.dto.screencoll.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/9/4 15:43 + */ +@Data +public class DifficultyDataDetailFormDTO implements Serializable { + private static final long serialVersionUID = 4893795146396420078L; + /** + * 组织类别 agency:组织;部门:department;网格:grid + */ + private String orgType; + + /** + * 组织Id 可以为网格,机关id + */ + private String orgId; + + /** + * 上级组织Id + */ + private String parentId; + + /** + * 组织名称 + */ + private String orgName; + + /** + * 事件原Id + */ + private String eventId; + + /** + * 事件图片 URL + */ + private String eventImgUrl; + + /** + * 事件来源 eg: XXX街道-xx社区-网格 + */ + private String eventSource; + + /** + * 事件内容 + */ + private String eventContent; + + /** + * 事件耗时单位:分钟 + */ + private Integer eventCostTime; + + /** + * 事件设计部门数 + */ + private Integer eventReOrg; + + /** + * 事件类别编码 + */ + private String eventCategoryCode; + + /** + * 事件状态编码 + */ + private String eventStatusCode; + + /** + * 事件类别名称 + */ + private String eventCategoryName; + + /** + * 事件状态描述 + */ + private String eventStatusDesc; + + /** + * 最近一次操作说明 eg: 转项目,结案,流转 + */ + private String latestOperateDesc; + + /** + * 事件被处理次数(08-21新增) + */ + private Integer eventHandledCount; + + /** + * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) + */ + private String dataEndTime; + + /** + * 所有上级ID,用英文逗号分开(8.26新增) + */ + private String allParentIds; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java index e446e073a3..a0de181acb 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.screencoll.form; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * 3、难点赌点 入参 @@ -11,96 +12,15 @@ import java.io.Serializable; */ @Data public class DifficultyDataFormDTO implements Serializable { - private static final long serialVersionUID = 1L; - /** - * 组织类别 agency:组织;部门:department;网格:grid + * 当为true时后台将删除本月数据 */ - private String orgType; + private Boolean isFirst; /** - * 组织Id 可以为网格,机关id + * 难点堵点数据 */ - private String orgId; + private List diffcultyDataList; - /** - * 上级组织Id - */ - private String parentId; - - /** - * 组织名称 - */ - private String orgName; - - /** - * 事件原Id - */ - private String eventId; - - /** - * 事件图片 URL - */ - private String eventImgUrl; - - /** - * 事件来源 eg: XXX街道-xx社区-网格 - */ - private String eventSource; - - /** - * 事件内容 - */ - private String eventContent; - - /** - * 事件耗时单位:分钟 - */ - private Integer eventCostTime; - - /** - * 事件设计部门数 - */ - private Integer eventReOrg; - - /** - * 事件类别编码 - */ - private String eventCategoryCode; - - /** - * 事件状态编码 - */ - private String eventStatusCode; - - /** - * 事件类别名称 - */ - private String eventCategoryName; - - /** - * 事件状态描述 - */ - private String eventStatusDesc; - - /** - * 最近一次操作说明 eg: 转项目,结案,流转 - */ - private String latestOperateDesc; - - /** - * 事件被处理次数(08-21新增) - */ - private Integer eventHandledCount; - - /** - * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) - */ - private String dataEndTime; - - /** - * 所有上级ID,用英文逗号分开(8.26新增) - */ - private String allParentIds; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java index 82966dbe82..9dbe0a82fb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java @@ -33,10 +33,11 @@ public class FactIndexCollectController { * @Author zhangyong * @Date 10:52 2020-08-20 **/ - @ExternalAppRequestAuth +// @ExternalAppRequestAuth @PostMapping("gridpartymemberdata") - public Result gridPartyMemberData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - factIndexCollectService.insertGridPartyMemberData(formDTO, externalAppRequestParam.getCustomerId()); + public Result gridPartyMemberData(ExternalAppRequestParam externalAppRequestParam, @RequestBody GridPartyMemberDataFormDTO formDTO) { + + factIndexCollectService.insertGridPartyMemberData(formDTO,"b09527201c4409e19d1dbc5e3c3429a1" );//externalAppRequestParam.getCustomerId() return new Result(); } 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 99ba483433..b3b482269d 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 @@ -133,8 +133,8 @@ public class ScreenCollController { **/ @ExternalAppRequestAuth @PostMapping("difficultydata") - public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List formDTO) { - screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId()); + public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody DifficultyDataFormDTO formDTO) { + screenCollService.insertDifficultyData(formDTO, "b09527201c4409e19d1dbc5e3c3429a1");//externalAppRequestParam.getCustomerId() return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index c23bf91b4c..ffdc533581 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcollect.form.GridPartyMemberDataDetailFormDTO; import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import org.apache.ibatis.annotations.Mapper; @@ -40,22 +41,12 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao list, + int batchInsertFactIndexPartyAblityCpcMonthly(@Param("list") List list, @Param("customerId") String customerId); List> getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 21eaa80280..412ab70225 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.screencoll.form.DifficultyDataDetailFormDTO; import com.epmet.dto.screencoll.form.DifficultyDataFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import org.apache.ibatis.annotations.Mapper; @@ -38,14 +39,10 @@ public interface ScreenDifficultyDataDao extends BaseDao list, @Param("customerId")String customerId); + void batchInsertDifficultyData(@Param("list") List list, @Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexCollectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexCollectService.java index 8f6197ffcd..e88e5d55a3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexCollectService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexCollectService.java @@ -22,7 +22,7 @@ public interface FactIndexCollectService { * @Author zhangyong * @Date 10:52 2020-08-20 **/ - void insertGridPartyMemberData(List formDTO, String customerId); + void insertGridPartyMemberData(GridPartyMemberDataFormDTO formDTO, String customerId); /** * 2、党建能力-网格相关指标上报(按照月份) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 26c725cf4d..49415544b0 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -22,6 +22,7 @@ import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.ArrayList; @@ -75,14 +76,16 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertGridPartyMemberData(List formDTO, String customerId) { - if (null != formDTO && formDTO.size() > NumConstant.ZERO){ - for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ - factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(customerId, - formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getUserId(), - formDTO.get(i).getYearId(), formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId()); - } - factIndexPartyAblityCpcMonthlyDao.batchInsertFactIndexPartyAblityCpcMonthly(formDTO, customerId); + public void insertGridPartyMemberData(GridPartyMemberDataFormDTO formDTO, String customerId) { + if (formDTO.getIsFirst()) { + //删除这个客户这个月的数据 + int deleteNum; + do { + deleteNum = factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(customerId, formDTO.getMonthId()); + } while (deleteNum != NumConstant.ZERO); + } + if (null != formDTO && !CollectionUtils.isEmpty(formDTO.getPartyMemberDataList())) { + factIndexPartyAblityCpcMonthlyDao.batchInsertFactIndexPartyAblityCpcMonthly(formDTO.getPartyMemberDataList(), customerId); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCollService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCollService.java index d499b86c08..1e6dca0080 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCollService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCollService.java @@ -100,7 +100,7 @@ public interface ScreenCollService { * @Author zhangyong * @Date 10:52 2020-08-18 **/ - void insertDifficultyData(List formDTO, String customerId); + void insertDifficultyData(DifficultyDataFormDTO formDTO, String customerId); /** * 2、党员基本情况 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCollServiceImpl.java index 0b205efb5a..6018622deb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCollServiceImpl.java @@ -30,6 +30,7 @@ import com.epmet.service.evaluationindex.screen.ScreenCollService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.ArrayList; @@ -198,13 +199,13 @@ public class ScreenCollServiceImpl implements ScreenCollService { @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override @Transactional(rollbackFor = Exception.class) - public void insertDifficultyData(List formDTO, String customerId) { - if (null != formDTO && formDTO.size() > NumConstant.ZERO){ - for (int i = NumConstant.ZERO; i < formDTO.size(); i++){ - screenDifficultyDataDao.deleteDifficultyData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId()); - } - - screenDifficultyDataDao.batchInsertDifficultyData(formDTO, customerId); + public void insertDifficultyData(DifficultyDataFormDTO formDTO, String customerId) { + if(formDTO.getIsFirst()){ + //直接删除当前客户下所有的数据 + screenDifficultyDataDao.deleteDifficultyData(customerId); + } + if (null != formDTO && !CollectionUtils.isEmpty(formDTO.getDiffcultyDataList())){ + screenDifficultyDataDao.batchInsertDifficultyData(formDTO.getDiffcultyDataList(), customerId); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml index 05d4b206a3..8336f33e9a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml @@ -3,10 +3,11 @@ - + delete from fact_index_party_ablity_cpc_monthly - where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND USER_ID = #{userId} - AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} + where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + limit 1000 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml index cfeba4c7b7..051f14cbcf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml @@ -5,7 +5,7 @@ delete from screen_difficulty_data - where CUSTOMER_ID = #{customerId} AND EVENT_ID = #{eventId} AND ORG_ID = #{orgId} + where CUSTOMER_ID = #{customerId} From da10ffe6b6052e66c402e1867fe6fede67b9c917 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 4 Sep 2020 17:00:10 +0800 Subject: [PATCH 334/360] =?UTF-8?q?=E9=9A=BE=E7=82=B9=E5=A0=B5=E7=82=B9?= =?UTF-8?q?=E3=80=81=E5=85=9A=E5=BB=BA=E8=83=BD=E5=8A=9B=E3=80=81=E5=85=9A?= =?UTF-8?q?=E5=91=98=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= =?UTF-8?q?v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/FactIndexCollectController.java | 5 ++--- .../main/java/com/epmet/controller/ScreenCollController.java | 2 +- .../indexcoll/impl/FactIndexCollectServiceImpl.java | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java index 9dbe0a82fb..138ab5cbb7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java @@ -33,11 +33,10 @@ public class FactIndexCollectController { * @Author zhangyong * @Date 10:52 2020-08-20 **/ -// @ExternalAppRequestAuth + @ExternalAppRequestAuth @PostMapping("gridpartymemberdata") public Result gridPartyMemberData(ExternalAppRequestParam externalAppRequestParam, @RequestBody GridPartyMemberDataFormDTO formDTO) { - - factIndexCollectService.insertGridPartyMemberData(formDTO,"b09527201c4409e19d1dbc5e3c3429a1" );//externalAppRequestParam.getCustomerId() + factIndexCollectService.insertGridPartyMemberData(formDTO,externalAppRequestParam.getCustomerId() ); return new Result(); } 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 b3b482269d..d83f8df3c5 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 @@ -134,7 +134,7 @@ public class ScreenCollController { @ExternalAppRequestAuth @PostMapping("difficultydata") public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody DifficultyDataFormDTO formDTO) { - screenCollService.insertDifficultyData(formDTO, "b09527201c4409e19d1dbc5e3c3429a1");//externalAppRequestParam.getCustomerId() + screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId()); return new Result(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 49415544b0..715bc56b0f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -16,9 +16,9 @@ import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.dto.screen.FactIndexGridScoreDTO; import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; -import com.epmet.entity.evaluationindex.screen.ScreenIndexDataMonthlyEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -34,6 +34,7 @@ import java.util.stream.Collectors; * @Auther: zhangyong * @Date: 2020-08-20 10:05 */ +@Slf4j @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) public class FactIndexCollectServiceImpl implements FactIndexCollectService { From 70fcf916d328faed8084660a8881a55592c26b8a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 4 Sep 2020 17:03:24 +0800 Subject: [PATCH 335/360] OPER_EXT_APP_SECRET_RESET_FAIL 8713 --- .../java/com/epmet/commons/tools/exception/EpmetErrorCode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index f12983016b..7b198800c8 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -104,7 +104,7 @@ public enum EpmetErrorCode { OPER_EXTERNAL_APP_AUTH_ERROR(8709, "外部应用认证失败"), OPER_EXTERNAL_CUSTOMER_NOT_EXISTS(8710, "该客户不存在"), OPER_EXTERNAL_APP_EXISTS(8711, "应用已存在"), - OPER_EXT_APP_SECRET_RESET_FAIL(8712, "秘钥更新失败"), + OPER_EXT_APP_SECRET_RESET_FAIL(8713, "秘钥更新失败"), // 党建声音 前端提示 88段 DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"), From 945ab756f0dfea4ca27777062864f9228f77b802 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 4 Sep 2020 17:19:47 +0800 Subject: [PATCH 336/360] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/FactIndexGridScoreDao.java | 18 ------------------ .../IndexCalculateCommunityServiceImpl.java | 4 ++++ 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java index 8a8a1f8a38..5f43635941 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java @@ -46,24 +46,6 @@ public interface FactIndexGridScoreDao extends BaseDao */ List selectSubGridAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); - /** - * @Description 社区下属所有网格治理能力汇总平均值 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/8/31 9:19 上午 - */ - List selectSubGridGovernAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId); - - /** - * @Description 社区下级所有网格服务能力得分平均值 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/8/31 1:51 下午 - */ - List selectSubGridServiceAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId); - /** * 根据入参查询 网格相关分值记录 * @param customerId diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java index 349167c112..afde8592af 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -166,6 +166,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(subGridGovernAvg)){ + log.error("社区下级治理能力平均分集合为空"); + return; + } if (subGridGovernAvg.size() == NumConstant.ONE) { pid.put(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),subGridGovernAvg.get(NumConstant.ZERO).getParentId()); sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid); From e5be626a933729aa660725f4bdb15665520ea439 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 4 Sep 2020 18:24:02 +0800 Subject: [PATCH 337/360] =?UTF-8?q?Merge=20branch=20'dev=5Fscreen=5Fdata'?= =?UTF-8?q?=20of=20C:\Users\Administrator\Desktop\=E5=85=9A=E7=BE=A4e?= =?UTF-8?q?=E4=BA=8B=E9=80=9A=E5=90=8E=E7=AB=AF=20with=20conflicts.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/screen/FactIndexGridScoreDTO.java | 10 + .../indexcal/AgencyScoreDao.java | 22 + .../indexcal/DeptScoreDao.java | 22 +- .../screen/FactIndexCommunityScoreDao.java | 22 +- .../screen/FactIndexGridScoreDao.java | 23 +- .../screen/ScreenCustomerAgencyDao.java | 10 + .../screen/ScreenCustomerDeptDao.java | 13 +- .../screen/ScreenCustomerGridDao.java | 12 + .../screen/ScreenIndexDataMonthlyDao.java | 12 + .../impl/FactIndexCollectServiceImpl.java | 477 ++++++++++++++++-- .../indexcal/AgencyScoreDao.xml | 61 ++- .../evaluationindex/indexcal/DeptScoreDao.xml | 55 ++ .../screen/FactIndexCommunityScoreDao.xml | 55 ++ .../screen/FactIndexGridScoreDao.xml | 57 +++ .../screen/ScreenCustomerAgencyDao.xml | 20 + .../screen/ScreenCustomerDeptDao.xml | 18 + .../screen/ScreenCustomerGridDao.xml | 19 + .../screen/ScreenIndexDataMonthlyDao.xml | 19 + 18 files changed, 891 insertions(+), 36 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java index 4d26f40f48..d5be2db6e9 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java @@ -54,6 +54,16 @@ public class FactIndexGridScoreDTO implements Serializable { */ private String gridId; + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + /** * 月维度Id: yyyyMM */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java index b30d2751d1..72c11ee8ac 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.AgencyScoreDTO; import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -81,4 +82,25 @@ public interface AgencyScoreDao extends BaseDao { * @Date 10:43 2020-09-03 **/ List selectListAgencyScore(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * 批量插入区/街道相关分数表 + * + * @param list + * @param customerId + * @return void + * @Author zhangyong + * @Date 11:11 2020-09-04 + **/ + void batchInsertAgencyScoreData(@Param("list") List list, @Param("customerId")String customerId); + + /** + * 根据入参查询 区/街道相关分数表id + * @param customerId + * @param monthId + * @return java.util.List + * @Author zhangyong + * @Date 10:43 2020-09-03 + **/ + List selectListAgencyId(@Param("customerId")String customerId, @Param("monthId")String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java index b77849a5d5..bd4a483062 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -19,7 +19,6 @@ package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.DeptScoreDTO; -import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -45,6 +44,27 @@ public interface DeptScoreDao extends BaseDao { **/ List selectListDeptScore(@Param("customerId")String customerId, @Param("monthId")String monthId); + /** + * 批量插入 区直部门分值表 + * + * @param list + * @param customerId + * @return void + * @Author zhangyong + * @Date 11:11 2020-09-04 + **/ + void batchInsertDeptScoreData(@Param("list") List list, @Param("customerId")String customerId); + + /** + * 根据入参查询 区直部门分值表id + * @param customerId + * @param monthId + * @return java.lang.String + * @Author zhangyong + * @Date 10:43 2020-09-03 + **/ + List selectListDeptId(@Param("customerId")String customerId, @Param("monthId")String monthId); + /** * @Description 所有直属部门治理能力平均值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java index a6060a2bf7..40fd49e6ab 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java @@ -18,8 +18,6 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.indexcal.SubCommunityGovernAvgResultDTO; -import com.epmet.dto.indexcal.SubCommunityPartyAvgResultDTO; import com.epmet.dto.indexcal.SubCommunityAvgResultDTO; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity; @@ -82,4 +80,24 @@ public interface FactIndexCommunityScoreDao extends BaseDao selectSubCommAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + /** + * 批量插入 社区相关分数表 + * + * @param list + * @param customerId + * @return void + * @Author zhangyong + * @Date 11:11 2020-09-04 + **/ + void batchInsertCommunityScoreData(@Param("list") List list, @Param("customerId")String customerId); + + /** + * 根据入参查询 查询社区id + * @param customerId + * @param monthId + * @return java.util.List + * @Author zhangyong + * @Date 10:43 2020-09-03 + **/ + List selectListCommunityId(@Param("customerId")String customerId, @Param("monthId")String monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java index 5f43635941..77c3f85366 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java @@ -19,9 +19,7 @@ package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.FactIndexGridScoreDTO; -import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; import com.epmet.dto.screen.result.SubGridAvgResultDTO; -import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; import com.epmet.entity.evaluationindex.screen.FactIndexGridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -55,4 +53,25 @@ public interface FactIndexGridScoreDao extends BaseDao * @Date 10:43 2020-09-03 **/ List selectListGridScore(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * 根据入参查询 网格id + * @param customerId + * @param monthId + * @return java.util.List + * @Author zhangyong + * @Date 10:43 2020-09-03 + **/ + List selectListGridId(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * 批量插入 网格相关分值表 + * + * @param list + * @param customerId + * @return void + * @Author zhangyong + * @Date 11:11 2020-09-04 + **/ + void batchInsertGridScoreData(@Param("list") List list,@Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 20147e0f82..ea9e977207 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -66,4 +66,14 @@ public interface ScreenCustomerAgencyDao extends BaseDao + * @Author zhangyong + * @Date 14:38 2020-09-04 + **/ + List selectListMismatcAgencyInfo(@Param("customerId")String customerId, @Param("agencyIds") String[] agencyIds); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java index 7cfb17110c..a6f251251a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java @@ -22,7 +22,6 @@ import com.epmet.dto.screencoll.form.CustomerDeptFormDTO; import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.web.bind.annotation.PostMapping; import java.util.List; @@ -77,4 +76,16 @@ public interface ScreenCustomerDeptDao extends BaseDao * @Date 2020/9/3 16:32 **/ ScreenCustomerDeptEntity selectParentAgencyId(@Param("customerId") String customerId, @Param("deptId") String deptId); + + /** + * 返回当前客户下,未匹配到的区直部门信息 + * + * @param customerId + * @param deptIds + * @return java.util.List + * @Author zhangyong + * @Date 10:45 2020-09-04 + **/ + List selectListMismatchDeptInfo(@Param("customerId") String customerId, + @Param("deptIds") String[] deptIds); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index 0d9a6420f9..d07d9aff46 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -104,4 +104,16 @@ public interface ScreenCustomerGridDao extends BaseDao * @Date 16:57 2020-09-03 **/ ScreenCustomerGridDTO selectParentGridInfo(@Param("customerId")String customerId, @Param("gridId")String gridId); + + /** + * 返回当前客户下,未匹配到的网格信息 + * + * @param customerId + * @param gridIds + * @return java.util.List + * @Author zhangyong + * @Date 10:45 2020-09-04 + **/ + List selectListMismatchGridInfo(@Param("customerId") String customerId, + @Param("gridIds") String[] gridIds); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index a38ff1cbe6..55b4e3ac41 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -60,4 +60,16 @@ public interface ScreenIndexDataMonthlyDao extends BaseDao list, @Param("customerId")String customerId); + + /** + * 获取今年的各月份的平均值 + * @param customerId + * @param yearId + * @param month + * @return java.util.List + * @Author zhangyong + * @Date 15:51 2020-09-04 + **/ + List selectListIndexDataMonthlyByYear(@Param("customerId") String customerId, + @Param("yearId") String yearId, @Param("month") String month); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 715bc56b0f..6f260e44c8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -1,7 +1,10 @@ package com.epmet.service.evaluationindex.indexcoll.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.OrgTypeConstant; import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; @@ -15,6 +18,11 @@ import com.epmet.dto.indexcollect.form.*; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.dto.screen.FactIndexGridScoreDTO; import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO; +import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; @@ -207,34 +215,53 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { if (NumConstant.SIX != monthId.length()){ throw new RuntimeException("入参monthId格式不正确:monthId =" + monthId); } - String year = monthId.substring(NumConstant.ZERO, NumConstant.FOUR); - String month = monthId.substring(NumConstant.FOUR, NumConstant.SIX); + // 开始处理 网格相关分值表 + this.startHandleIndexGridScore(monthId, customerId); + // 开始处理 社区相关分值表 + this.startHandleIndexCommunityScore(monthId, customerId); + // 开始处理 区直部门分值表 + this.startHandleIndexDeptScore(monthId, customerId); + // 开始处理 区/街道相关分数表 + this.startHandleIndexAgencyScore(monthId, customerId); - // fact_index_grid_score 网格相关分值记录表 grid - List gridScoreDTOS = factIndexGridScoreDao.selectListGridScore(customerId, monthId); - if (null != gridScoreDTOS && gridScoreDTOS.size() > NumConstant.ZERO){ - this.insertIndexDataMonthlyByGridScore(month, year, customerId, gridScoreDTOS); - } - - // fact_index_community_score 社区相关分数表 agency - List communityScoreDTOS = factIndexCommunityScoreDao.selectListCommunityScore(customerId, monthId); - if (null != communityScoreDTOS && communityScoreDTOS.size() > NumConstant.ZERO){ - this.insertIndexDataMonthlyByCommunityScore(month, year, customerId, communityScoreDTOS); - } - - // fact_index_dept_score 区直部门分值表 department - List deptScoreDTOS = deptScoreDao.selectListDeptScore(customerId, monthId); - if (null != deptScoreDTOS && deptScoreDTOS.size() > NumConstant.ZERO){ - this.insertIndexDataMonthlyByDeptScore(month, year, customerId, deptScoreDTOS); - } + // 根据年,汇总今年各项得到,计算平均值后 插入年表 screen_index_data_yearly + this.insertIndexDataYear(this.getYearStr(monthId), this.getMonthStr(monthId), customerId); + } - // fact_index_agency_score 区/街道相关分数表 agency - List agencyScoreDTOS = agencyScoreDaol.selectListAgencyScore(customerId, monthId); - if (null != agencyScoreDTOS && agencyScoreDTOS.size() > NumConstant.ZERO) { - this.insertIndexDataMonthlyByAgencyScore(month, year, customerId, agencyScoreDTOS); + /** + * 目标:将网格的 党建能力、治理能力、服务能力、总指数 得分。 整理后(4条合1条) 插入 指数-指数数据(月表) + * 如果网格相关分值表 中的网格数量不全,需要从 网格(党支部)信息表(一) 中,先查询到缺少的网格信息,赋上默认值后,插入网格相关分值表(四)。 + * + * @param monthId + * @param customerId + * @return void + * @Author zhangyong + * @Date 13:44 2020-09-04 + **/ + private void startHandleIndexGridScore(String monthId, String customerId){ + // 查询网格相关分值记录 表已经存在的网格id + List indexGridIds = factIndexGridScoreDao.selectListGridId(customerId, monthId); + if (indexGridIds.size() > NumConstant.ZERO){ + // 根据网格相关分值表 中查询到的网格id,去 网格(党支部)信息表 进行不匹配查询(即返回网格相关分值表 中不存在的网格信息)。 + String[] gridIds = new String[indexGridIds.size()]; + for (int i = NumConstant.ZERO; i < indexGridIds.size(); i++){ + gridIds[i] = indexGridIds.get(i); + } + List mismatchGridList = screenCustomerGridDao.selectListMismatchGridInfo(customerId, gridIds); + // 将 网格相关分值表 中,本月份没有的网格信息,按照 4种类型,各新增一遍,赋默认值 0 + if (mismatchGridList.size() > NumConstant.ZERO){ + this.insertIndexGridScoreDefaultValueFor(monthId, customerId, mismatchGridList); + } + } else { + // 将所有的网格按照 4种类型,各赋一遍默认值 + List mismatchGridList = screenCustomerGridDao.selectListMismatchGridInfo(customerId, null); + this.insertIndexGridScoreDefaultValueFor(monthId, customerId, mismatchGridList); } - - // 插入年表 screen_index_data_yearly + // 开始处理实际分数 + // fact_index_grid_score 网格相关分值记录表 grid + String[] dateArr = yearOrMonth(monthId); + List gridScoreDTOS = factIndexGridScoreDao.selectListGridScore(customerId, monthId); + this.insertIndexDataMonthlyByGridScore(dateArr[NumConstant.ONE], dateArr[NumConstant.ZERO], customerId, gridScoreDTOS); } /** @@ -283,8 +310,37 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { parentGridInfo.getParentAgencyId(), parentGridInfo.getGridName(), monthlyFormDTO); monthlyFormDTOList.add(monthlyFormDTO); } - screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, year, month, orgIds); - screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); + if (monthlyFormDTOList.size() > NumConstant.ZERO){ + screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, year, month, orgIds); + screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); + } + } + + private void startHandleIndexCommunityScore(String monthId, String customerId){ + // 查询社区相关分值记录 + List indexCommunityIds = factIndexCommunityScoreDao.selectListCommunityId(customerId, monthId); + if (indexCommunityIds.size() > NumConstant.ZERO){ + // 根据网格相关分值表 中查询到的网格id,去 网格(党支部)信息表 进行不匹配查询(即返回网格相关分值表 中不存在的网格信息)。 + String[] communityIds = new String[indexCommunityIds.size()]; + for (int i = NumConstant.ZERO; i < indexCommunityIds.size(); i++){ + communityIds[i] = indexCommunityIds.get(i); + } + List mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, communityIds); + // 将 社区相关分数表 中,本月份没有的网格信息,按照 4种类型,各新增一遍,赋默认值 0 + if (mismatchAgencyList.size() > NumConstant.ZERO){ + this.insertIndexCommunityScoreDefaultValueFor(monthId, customerId, mismatchAgencyList); + } + } else { + // 将所有的社区按照 4种类型,各赋一遍默认值 + List mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, null); + this.insertIndexCommunityScoreDefaultValueFor(monthId, customerId, mismatchAgencyList); + } + // 开始处理实际分数 + // fact_index_community_score 社区相关分数表 agency + String[] dateArr = yearOrMonth(monthId); + // 查询社区相关分值记录 + List communityScoreDTOS = factIndexCommunityScoreDao.selectListCommunityScore(customerId, monthId); + this.insertIndexDataMonthlyByCommunityScore(dateArr[NumConstant.ONE], dateArr[NumConstant.ZERO], customerId, communityScoreDTOS); } /** @@ -337,8 +393,34 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 补充表中其他字段 monthlyFormDTOList.add(monthlyFormDTO); } - screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, year, month, orgIds); - screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); + if (monthlyFormDTOList.size() > NumConstant.ZERO){ + screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, year, month, orgIds); + screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); + } + } + + private void startHandleIndexDeptScore(String monthId, String customerId){ + // 查询社 区直部门分值表 + List indexDeptIds = deptScoreDao.selectListDeptId(customerId, monthId); + if (indexDeptIds.size() > NumConstant.ZERO){ + String[] depeIds = new String[indexDeptIds.size()]; + for (int i = NumConstant.ZERO; i < indexDeptIds.size(); i++){ + depeIds[i] = indexDeptIds.get(i); + } + List mismatchDeptList = screenCustomerDeptDao.selectListMismatchDeptInfo(customerId, depeIds); + if (mismatchDeptList.size() > NumConstant.ZERO){ + this.insertIndexDeptScoreDefaultValueFor(monthId, customerId, mismatchDeptList); + } + } else { + List mismatchDeptList = screenCustomerDeptDao.selectListMismatchDeptInfo(customerId, null); + this.insertIndexDeptScoreDefaultValueFor(monthId, customerId, mismatchDeptList); + } + // 开始处理实际分数 + // fact_index_dept_score 区直部门分值表 department + String[] dateArr = yearOrMonth(monthId); + // 查询社 区直部门分值表 + List deptScoreDTOS = deptScoreDao.selectListDeptScore(customerId, monthId); + this.insertIndexDataMonthlyByDeptScore(dateArr[NumConstant.ONE], dateArr[NumConstant.ZERO], customerId, deptScoreDTOS); } /** @@ -388,6 +470,28 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); } + private void startHandleIndexAgencyScore(String monthId, String customerId){ + List indexAgencyIds = agencyScoreDaol.selectListAgencyId(customerId, monthId); + if (indexAgencyIds.size() > NumConstant.ZERO){ + String[] agencys = new String[indexAgencyIds.size()]; + for (int i = NumConstant.ZERO; i < indexAgencyIds.size(); i++){ + agencys[i] = indexAgencyIds.get(i); + } + List mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, agencys); + if (mismatchAgencyList.size() > NumConstant.ZERO){ + this.insertIndexAgencyScoreDefaultValueFor(monthId, customerId, mismatchAgencyList); + } + } else { + List mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, null); + this.insertIndexAgencyScoreDefaultValueFor(monthId, customerId, mismatchAgencyList); + } + // 开始处理实际分数 + // fact_index_agency_score 区/街道相关分数表 agency + String[] dateArr = yearOrMonth(monthId); + List agencyScoreDTOS = agencyScoreDaol.selectListAgencyScore(customerId, monthId); + this.insertIndexDataMonthlyByAgencyScore(dateArr[NumConstant.ONE], dateArr[NumConstant.ZERO], customerId, agencyScoreDTOS); + } + /** * 将区/街道相关分数表 数据 插入月表 screenIndexDataMonthlyDao * @@ -496,4 +600,319 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } return monthlyFormDTO; } + + /** + * 设置 指数-指数数据(月、年) 表 + * 总指数、党建能力指数、治理能力、服务能力 默认值 0 + * @param monthlyFormDTO + * @return com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO + * @Author zhangyong + * @Date 11:01 2020-09-04 + **/ + private IndexDataMonthlyFormDTO setIndexDefaultValueFor(IndexDataMonthlyFormDTO monthlyFormDTO){ + BigDecimal zero = new BigDecimal(NumConstant.ZERO); + monthlyFormDTO.setIndexTotal(zero); + monthlyFormDTO.setPartyDevAblity(zero); + monthlyFormDTO.setGovernAblity(zero); + return monthlyFormDTO; + } + + /** + * 新增 网格相关分值记录表 默认值,一条网格,按照组织类别的不同 需要插入4次 + * + * @param monthId + * @param customerId + * @param mismatchGridList + * @return void + * @Author zhangyong + * @Date 14:02 2020-09-04 + **/ + private void insertIndexGridScoreDefaultValueFor(String monthId, String customerId, List mismatchGridList){ + String[] dateArr = yearOrMonth(monthId); + List insertIndexGridScoreDTOS = new ArrayList<>(); + for (ScreenCustomerGridDTO gridDTO : mismatchGridList){ + FactIndexGridScoreDTO indexGridScoreDTO = new FactIndexGridScoreDTO(); + // 赋默认值 - 党建能力指数 + indexGridScoreDTO.setGridId(gridDTO.getGridId()); + indexGridScoreDTO.setAgencyId(gridDTO.getParentAgencyId()); + indexGridScoreDTO.setAllParentIds(gridDTO.getAllParentIds()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + indexGridScoreDTO.setQuarterId(DateUtils.getQuarterId(monthId)); + indexGridScoreDTO.setYearId(dateArr[NumConstant.ZERO]); + indexGridScoreDTO.setMonthId(monthId); + indexGridScoreDTO.setIsTotal(NumConstant.ZERO_STR); // 0 or 1 + indexGridScoreDTO.setScore(new BigDecimal(NumConstant.ZERO)); + indexGridScoreDTO.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); // 4种类型 + indexGridScoreDTO.setDelFlag(NumConstant.ZERO_STR); + insertIndexGridScoreDTOS.add(indexGridScoreDTO); + + FactIndexGridScoreDTO indexGridScoreDTO1 = new FactIndexGridScoreDTO(); + // 赋默认值 - 治理能力 + indexGridScoreDTO1.setGridId(gridDTO.getGridId()); + indexGridScoreDTO1.setAgencyId(gridDTO.getParentAgencyId()); + indexGridScoreDTO1.setAllParentIds(gridDTO.getAllParentIds()); + indexGridScoreDTO1.setQuarterId(DateUtils.getQuarterId(monthId)); + indexGridScoreDTO1.setYearId(dateArr[NumConstant.ZERO]); + indexGridScoreDTO1.setMonthId(monthId); + indexGridScoreDTO1.setIsTotal(NumConstant.ZERO_STR); + indexGridScoreDTO1.setScore(new BigDecimal(NumConstant.ZERO)); + indexGridScoreDTO1.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + indexGridScoreDTO1.setDelFlag(NumConstant.ZERO_STR); + insertIndexGridScoreDTOS.add(indexGridScoreDTO1); + + FactIndexGridScoreDTO indexGridScoreDTO2 = new FactIndexGridScoreDTO(); + // 赋默认值 - 服务能力 + indexGridScoreDTO2.setGridId(gridDTO.getGridId()); + indexGridScoreDTO2.setAgencyId(gridDTO.getParentAgencyId()); + indexGridScoreDTO2.setAllParentIds(gridDTO.getAllParentIds()); + indexGridScoreDTO2.setQuarterId(DateUtils.getQuarterId(monthId)); + indexGridScoreDTO2.setYearId(dateArr[NumConstant.ZERO]); + indexGridScoreDTO2.setMonthId(monthId); + indexGridScoreDTO2.setIsTotal(NumConstant.ZERO_STR); + indexGridScoreDTO2.setScore(new BigDecimal(NumConstant.ZERO)); + indexGridScoreDTO2.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); + indexGridScoreDTO2.setDelFlag(NumConstant.ZERO_STR); + insertIndexGridScoreDTOS.add(indexGridScoreDTO2); + + FactIndexGridScoreDTO indexGridScoreDTO3 = new FactIndexGridScoreDTO(); + // 赋默认值 - 网格相关 + indexGridScoreDTO3.setGridId(gridDTO.getGridId()); + indexGridScoreDTO3.setAgencyId(gridDTO.getParentAgencyId()); + indexGridScoreDTO3.setAllParentIds(gridDTO.getAllParentIds()); + indexGridScoreDTO3.setQuarterId(DateUtils.getQuarterId(monthId)); + indexGridScoreDTO3.setYearId(dateArr[NumConstant.ZERO]); + indexGridScoreDTO3.setMonthId(monthId); + indexGridScoreDTO3.setIsTotal(NumConstant.ONE_STR); + indexGridScoreDTO3.setScore(new BigDecimal(NumConstant.ZERO)); + indexGridScoreDTO3.setIndexCode(IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); + indexGridScoreDTO3.setDelFlag(NumConstant.ZERO_STR); + insertIndexGridScoreDTOS.add(indexGridScoreDTO3); + } + factIndexGridScoreDao.batchInsertGridScoreData(insertIndexGridScoreDTOS, customerId); + } + + /** + * 新增 社区相关分数表 默认值,一条组织id,按照组织类别的不同 需要插入4次 + * + * @param monthId + * @param customerId + * @param mismatchAgencyList + * @return void + * @Author zhangyong + * @Date 14:02 2020-09-04 + **/ + private void insertIndexCommunityScoreDefaultValueFor(String monthId, String customerId, List mismatchAgencyList){ + String[] dateArr = yearOrMonth(monthId); + List insertIndexCommunityScore = new ArrayList<>(); + for (ScreenCustomerAgencyEntity agencyDTO : mismatchAgencyList){ + FactIndexCommunityScoreEntity communityScore1 = new FactIndexCommunityScoreEntity(); + // 赋默认值 - 党建能力指数 + communityScore1.setAgencyId(agencyDTO.getAgencyId()); + communityScore1.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + communityScore1.setQuarterId(DateUtils.getQuarterId(monthId)); + communityScore1.setYearId(dateArr[NumConstant.ZERO]); + communityScore1.setMonthId(monthId); + communityScore1.setIsTotal(NumConstant.ZERO_STR); // 0 or 1 + communityScore1.setScore(new BigDecimal(NumConstant.ZERO)); + communityScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); // 4种类型 + insertIndexCommunityScore.add(communityScore1); + + FactIndexCommunityScoreEntity communityScore2 = new FactIndexCommunityScoreEntity(); + // 赋默认值 - 治理能力 + communityScore2.setAgencyId(agencyDTO.getAgencyId()); + communityScore2.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + communityScore2.setQuarterId(DateUtils.getQuarterId(monthId)); + communityScore2.setYearId(dateArr[NumConstant.ZERO]); + communityScore2.setMonthId(monthId); + communityScore2.setIsTotal(NumConstant.ZERO_STR); + communityScore2.setScore(new BigDecimal(NumConstant.ZERO)); + communityScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + insertIndexCommunityScore.add(communityScore2); + + FactIndexCommunityScoreEntity communityScore3 = new FactIndexCommunityScoreEntity(); + // 赋默认值 - 服务能力 + communityScore3.setAgencyId(agencyDTO.getAgencyId()); + communityScore3.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + communityScore3.setQuarterId(DateUtils.getQuarterId(monthId)); + communityScore3.setYearId(dateArr[NumConstant.ZERO]); + communityScore3.setMonthId(monthId); + communityScore3.setIsTotal(NumConstant.ZERO_STR); + communityScore3.setScore(new BigDecimal(NumConstant.ZERO)); + communityScore3.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); + insertIndexCommunityScore.add(communityScore3); + + FactIndexCommunityScoreEntity communityScore4 = new FactIndexCommunityScoreEntity(); + // 赋默认值 - 社区相关 + communityScore4.setAgencyId(agencyDTO.getAgencyId()); + communityScore4.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + communityScore4.setQuarterId(DateUtils.getQuarterId(monthId)); + communityScore4.setYearId(dateArr[NumConstant.ZERO]); + communityScore4.setMonthId(monthId); + communityScore4.setIsTotal(NumConstant.ONE_STR); + communityScore4.setScore(new BigDecimal(NumConstant.ZERO)); + communityScore4.setIndexCode(IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + insertIndexCommunityScore.add(communityScore4); + } + factIndexCommunityScoreDao.batchInsertCommunityScoreData(insertIndexCommunityScore, customerId); + } + + private void insertIndexDeptScoreDefaultValueFor(String monthId, String customerId, List mismatchDeptList){ + String[] dateArr = yearOrMonth(monthId); + List insertIndexDeptScore = new ArrayList<>(); + for (ScreenCustomerDeptEntity deptDTO : mismatchDeptList){ + DeptScoreEntity deptScore2 = new DeptScoreEntity(); + // 赋默认值 - 治理能力 + deptScore2.setDeptId(deptDTO.getDeptId()); + deptScore2.setAgencyId(deptDTO.getParentAgencyId()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + deptScore2.setQuarterId(DateUtils.getQuarterId(monthId)); + deptScore2.setYearId(dateArr[NumConstant.ZERO]); + deptScore2.setMonthId(monthId); + deptScore2.setIsTotal(NumConstant.ZERO_STR); + deptScore2.setScore(new BigDecimal(NumConstant.ZERO)); + deptScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + insertIndexDeptScore.add(deptScore2); + } + deptScoreDao.batchInsertDeptScoreData(insertIndexDeptScore, customerId); + } + + private void insertIndexAgencyScoreDefaultValueFor(String monthId, String customerId, List mismatchAgencyList){ + String[] dateArr = yearOrMonth(monthId); + List insertIndexAgencyScore = new ArrayList<>(); + for (ScreenCustomerAgencyEntity agencyDTO : mismatchAgencyList){ + AgencyScoreEntity agencyScore1 = new AgencyScoreEntity(); + // 赋默认值 - 党建能力指数 + agencyScore1.setAgencyId(agencyDTO.getAgencyId()); + agencyScore1.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + agencyScore1.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore1.setYearId(dateArr[NumConstant.ZERO]); + agencyScore1.setMonthId(monthId); + agencyScore1.setIsTotal(NumConstant.ZERO_STR); // 0 or 1 + agencyScore1.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); // 4种类型 + + AgencyScoreEntity agencyScore2 = new AgencyScoreEntity(); + // 赋默认值 - 治理能力 + agencyScore2.setAgencyId(agencyDTO.getAgencyId()); + agencyScore2.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + agencyScore2.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore2.setYearId(dateArr[NumConstant.ZERO]); + agencyScore2.setMonthId(monthId); + agencyScore2.setIsTotal(NumConstant.ZERO_STR); + agencyScore2.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + + AgencyScoreEntity agencyScore3 = new AgencyScoreEntity(); + // 赋默认值 - 服务能力 + agencyScore3.setAgencyId(agencyDTO.getAgencyId()); + agencyScore3.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + agencyScore3.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore3.setYearId(dateArr[NumConstant.ZERO]); + agencyScore3.setMonthId(monthId); + agencyScore3.setIsTotal(NumConstant.ZERO_STR); + agencyScore3.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore3.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); + + if ("community".equals(agencyDTO.getLevel())){ + AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); + // 赋默认值 - 全区相关 + agencyScore4.setAgencyId(agencyDTO.getAgencyId()); + agencyScore4.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore4.setYearId(dateArr[NumConstant.ZERO]); + agencyScore4.setMonthId(monthId); + agencyScore4.setIsTotal(NumConstant.ONE_STR); + agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore4.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); + + agencyScore4.setDataType("district"); + agencyScore1.setDataType("district"); + agencyScore2.setDataType("district"); + agencyScore3.setDataType("district"); + insertIndexAgencyScore.add(agencyScore4); + } else if ("street".equals(agencyDTO.getLevel())){ + AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); + // 赋默认值 - 街道相关 + agencyScore4.setAgencyId(agencyDTO.getAgencyId()); + agencyScore4.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore4.setYearId(dateArr[NumConstant.ZERO]); + agencyScore4.setMonthId(monthId); + agencyScore4.setIsTotal(NumConstant.ONE_STR); + agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore4.setIndexCode(IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode()); + + agencyScore4.setDataType("street"); + agencyScore1.setDataType("street"); + agencyScore2.setDataType("street"); + agencyScore3.setDataType("street"); + insertIndexAgencyScore.add(agencyScore4); + } + insertIndexAgencyScore.add(agencyScore1); + insertIndexAgencyScore.add(agencyScore2); + insertIndexAgencyScore.add(agencyScore3); + } + agencyScoreDaol.batchInsertAgencyScoreData(insertIndexAgencyScore, customerId); + } + + private void insertIndexDataYear(String year, String month, String customerId){ + List monthlyFormList = screenIndexDataMonthlyDao.selectListIndexDataMonthlyByYear(customerId, year, month); + String[] orgIds = new String[monthlyFormList.size()]; + for (int i = NumConstant.ZERO; i < monthlyFormList.size(); i++){ + orgIds[i] = monthlyFormList.get(i).getOrgId(); + } + screenIndexDataYearlyDao.deleteIndexDataYearly(customerId, year, orgIds); + List entity = ConvertUtils.sourceToTarget(monthlyFormList, IndexDataYearlyFormDTO.class); + screenIndexDataYearlyDao.batchInsertIndexDataYearly(entity, customerId); + } + + /** + * 将月份id,拆分 dateArr[0] = 年份 dateArr[1] = 月份 + * + * @param monthId 202008 + * @return java.lang.String[] + * @Author zhangyong + * @Date 13:39 2020-09-04 + **/ + private String[] yearOrMonth(String monthId){ + String[] dateArr = new String[NumConstant.TWO]; + dateArr[NumConstant.ZERO] = monthId.substring(NumConstant.ZERO, NumConstant.FOUR); + dateArr[NumConstant.ONE] = monthId.substring(NumConstant.FOUR, NumConstant.SIX); + return dateArr; + } + + + /** + * 将月份id,拆分成 年份 + * + * @param monthId 202008 + * @return java.lang.String + * @Author zhangyong + * @Date 13:39 2020-09-04 + **/ + private String getYearStr(String monthId){ + return monthId.substring(NumConstant.ZERO, NumConstant.FOUR); + } + + + /** + * 将月份id,拆分成 月份 + * + * @param monthId 202008 + * @return java.lang.String + * @Author zhangyong + * @Date 13:39 2020-09-04 + **/ + private String getMonthStr(String monthId){ + return monthId.substring(NumConstant.FOUR, NumConstant.SIX); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index 179fd5c9eb..1c6efa8f52 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -63,7 +63,7 @@ - SELECT CUSTOMER_ID, AGENCY_ID, @@ -102,4 +102,63 @@ AND fics.index_code = #{indexCode} GROUP BY fics.agency_id + + + insert into fact_index_agency_score + ( + ID, + CUSTOMER_ID, + + AGENCY_ID, + PARENT_AGENCY_ID, + YEAR_ID, + QUARTER_ID, + MONTH_ID, + DATA_TYPE, + IS_TOTAL, + SCORE, + INDEX_CODE, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.parentAgencyId}, + + #{item.yearId}, + #{item.quarterId}, + #{item.monthId}, + #{item.dataType}, + #{item.isTotal}, + #{item.score}, + #{item.indexCode}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index 8e01fb1e52..b225821aec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -43,4 +43,59 @@ GROUP BY fidc.agency_id + + insert into fact_index_dept_score + ( + ID, + CUSTOMER_ID, + DEPT_ID, + AGENCY_ID, + QUARTER_ID, + YEAR_ID, + MONTH_ID, + IS_TOTAL, + SCORE, + INDEX_CODE, + + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.deptId}, + #{item.agencyId}, + #{item.quarterId}, + #{item.yearId}, + + #{item.monthId}, + #{item.isTotal}, + #{item.score}, + #{item.indexCode}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml index 07e3b05b94..7978db5eee 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml @@ -102,4 +102,59 @@ AND MONTH_ID = #{monthId} ORDER BY AGENCY_ID + + + insert into fact_index_community_score + ( + ID, + CUSTOMER_ID, + AGENCY_ID, + PARENT_AGENCY_ID, + YEAR_ID, + QUARTER_ID, + MONTH_ID, + IS_TOTAL, + SCORE, + INDEX_CODE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.agencyId}, + #{item.parentAgencyId}, + #{item.yearId}, + #{item.quarterId}, + + #{item.monthId}, + #{item.isTotal}, + #{item.score}, + #{item.indexCode}, + 0, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml index b6eed400a2..010ac06798 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml @@ -43,4 +43,61 @@ AND MONTH_ID = #{monthId} ORDER BY GRID_ID + + + insert into fact_index_grid_score + ( + ID, + CUSTOMER_ID, + GRID_ID, + AGENCY_ID, + ALL_PARENT_IDS, + QUARTER_ID, + YEAR_ID, + MONTH_ID, + IS_TOTAL, + SCORE, + INDEX_CODE, + DEL_FLAG, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME + ) values + + ( + (SELECT REPLACE(UUID(), '-', '') AS id), + #{customerId}, + #{item.gridId}, + #{item.agencyId}, + #{item.allParentIds}, + #{item.quarterId}, + + #{item.yearId}, + #{item.monthId}, + #{item.isTotal}, + #{item.score}, + #{item.indexCode}, + #{item.delFlag}, + 0, + 'APP_USER', + now(), + 'APP_USER', + now() + ) + + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index dda779d7b9..c1479694d4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -70,4 +70,24 @@ AND CUSTOMER_ID =#{customerId} AND AGENCY_ID = #{agencyId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml index 8937212e71..47ab3d400d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml @@ -75,4 +75,22 @@ AND CUSTOMER_ID =#{customerId} AND DEPT_ID = #{deptId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml index 7a8c216fea..a86ec3bec2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml @@ -117,4 +117,23 @@ AND CUSTOMER_ID =#{customerId} AND GRID_ID = #{gridId} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml index 616d567b8a..4c8369dd0a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml @@ -59,4 +59,23 @@ + + From d5e8e3f4191a8061a29e3b384d4811b74da76e71 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 4 Sep 2020 18:39:31 +0800 Subject: [PATCH 338/360] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java | 1 + .../mapper/evaluationindex/indexcal/AgencyScoreDao.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java index bd4a483062..8a13b7a0ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -18,6 +18,7 @@ package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO; import com.epmet.dto.indexcal.DeptScoreDTO; import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index 1c6efa8f52..cdc7ea366a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -63,7 +63,7 @@ - SELECT CUSTOMER_ID, AGENCY_ID, From e704015459db97a740ac60d3f3b01317d659823d Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 4 Sep 2020 19:01:31 +0800 Subject: [PATCH 339/360] =?UTF-8?q?=E5=B9=B4=E8=A1=A8=E3=80=81=E6=9C=88?= =?UTF-8?q?=E8=A1=A8=E6=94=B6=E5=B0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/FactIndexCollectServiceImpl.java | 165 +++++++++--------- .../evaluationindex/indexcal/DeptScoreDao.xml | 2 +- 2 files changed, 84 insertions(+), 83 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 6f260e44c8..51d7dbcd38 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -446,15 +446,12 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { orgIds[j] = deptScore.getKey(); j++; for ( int i = 0; i < deptScore.getValue().size(); i++){ - if (NumConstant.ONE_STR.equals(deptScore.getValue().get(i).getIsTotal())){ - // 是总分 总指数 = IS_TOTAL = 1 - monthlyFormDTO.setIndexTotal(deptScore.getValue().get(i).getScore()); - } else { - // 赋值 党建能力、治理能力、服务能力 - monthlyFormDTO = this.setValueAblityMonthlyFor(deptScore.getValue().get(i).getIndexCode(), - deptScore.getValue().get(i).getScore(), - monthlyFormDTO); - } + // 区直街道的总分 就是 治理能力 + monthlyFormDTO.setIndexTotal(deptScore.getValue().get(i).getScore()); + // 赋值 治理能力 + monthlyFormDTO = this.setValueAblityMonthlyFor(deptScore.getValue().get(i).getIndexCode(), + deptScore.getValue().get(i).getScore(), + monthlyFormDTO); } // 查询网格的 上级组织id 和 组织名称 ScreenCustomerDeptEntity parentDeptInfo = screenCustomerDeptDao.selectParentDeptInfo(customerId, deptScore.getKey()); @@ -775,6 +772,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { deptScore2.setIsTotal(NumConstant.ZERO_STR); deptScore2.setScore(new BigDecimal(NumConstant.ZERO)); deptScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deptScore2.setDelFlag(NumConstant.ZERO_STR); insertIndexDeptScore.add(deptScore2); } deptScoreDao.batchInsertDeptScoreData(insertIndexDeptScore, customerId); @@ -784,82 +782,85 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { String[] dateArr = yearOrMonth(monthId); List insertIndexAgencyScore = new ArrayList<>(); for (ScreenCustomerAgencyEntity agencyDTO : mismatchAgencyList){ - AgencyScoreEntity agencyScore1 = new AgencyScoreEntity(); - // 赋默认值 - 党建能力指数 - agencyScore1.setAgencyId(agencyDTO.getAgencyId()); - agencyScore1.setParentAgencyId(agencyDTO.getPid()); - //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 - agencyScore1.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore1.setYearId(dateArr[NumConstant.ZERO]); - agencyScore1.setMonthId(monthId); - agencyScore1.setIsTotal(NumConstant.ZERO_STR); // 0 or 1 - agencyScore1.setScore(new BigDecimal(NumConstant.ZERO)); - agencyScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); // 4种类型 - - AgencyScoreEntity agencyScore2 = new AgencyScoreEntity(); - // 赋默认值 - 治理能力 - agencyScore2.setAgencyId(agencyDTO.getAgencyId()); - agencyScore2.setParentAgencyId(agencyDTO.getPid()); - //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 - agencyScore2.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore2.setYearId(dateArr[NumConstant.ZERO]); - agencyScore2.setMonthId(monthId); - agencyScore2.setIsTotal(NumConstant.ZERO_STR); - agencyScore2.setScore(new BigDecimal(NumConstant.ZERO)); - agencyScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); - - AgencyScoreEntity agencyScore3 = new AgencyScoreEntity(); - // 赋默认值 - 服务能力 - agencyScore3.setAgencyId(agencyDTO.getAgencyId()); - agencyScore3.setParentAgencyId(agencyDTO.getPid()); - //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 - agencyScore3.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore3.setYearId(dateArr[NumConstant.ZERO]); - agencyScore3.setMonthId(monthId); - agencyScore3.setIsTotal(NumConstant.ZERO_STR); - agencyScore3.setScore(new BigDecimal(NumConstant.ZERO)); - agencyScore3.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); - - if ("community".equals(agencyDTO.getLevel())){ - AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); - // 赋默认值 - 全区相关 - agencyScore4.setAgencyId(agencyDTO.getAgencyId()); - agencyScore4.setParentAgencyId(agencyDTO.getPid()); + if ("community".equals(agencyDTO.getLevel()) || "street".equals(agencyDTO.getLevel()) + || "district".equals(agencyDTO.getLevel())){ + AgencyScoreEntity agencyScore1 = new AgencyScoreEntity(); + // 赋默认值 - 党建能力指数 + agencyScore1.setAgencyId(agencyDTO.getAgencyId()); + agencyScore1.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + agencyScore1.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore1.setYearId(dateArr[NumConstant.ZERO]); + agencyScore1.setMonthId(monthId); + agencyScore1.setIsTotal(NumConstant.ZERO_STR); // 0 or 1 + agencyScore1.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); // 4种类型 + + AgencyScoreEntity agencyScore2 = new AgencyScoreEntity(); + // 赋默认值 - 治理能力 + agencyScore2.setAgencyId(agencyDTO.getAgencyId()); + agencyScore2.setParentAgencyId(agencyDTO.getPid()); //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 - agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore4.setYearId(dateArr[NumConstant.ZERO]); - agencyScore4.setMonthId(monthId); - agencyScore4.setIsTotal(NumConstant.ONE_STR); - agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); - agencyScore4.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); - - agencyScore4.setDataType("district"); - agencyScore1.setDataType("district"); - agencyScore2.setDataType("district"); - agencyScore3.setDataType("district"); - insertIndexAgencyScore.add(agencyScore4); - } else if ("street".equals(agencyDTO.getLevel())){ - AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); - // 赋默认值 - 街道相关 - agencyScore4.setAgencyId(agencyDTO.getAgencyId()); - agencyScore4.setParentAgencyId(agencyDTO.getPid()); + agencyScore2.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore2.setYearId(dateArr[NumConstant.ZERO]); + agencyScore2.setMonthId(monthId); + agencyScore2.setIsTotal(NumConstant.ZERO_STR); + agencyScore2.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + + AgencyScoreEntity agencyScore3 = new AgencyScoreEntity(); + // 赋默认值 - 服务能力 + agencyScore3.setAgencyId(agencyDTO.getAgencyId()); + agencyScore3.setParentAgencyId(agencyDTO.getPid()); //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 - agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore4.setYearId(dateArr[NumConstant.ZERO]); - agencyScore4.setMonthId(monthId); - agencyScore4.setIsTotal(NumConstant.ONE_STR); - agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); - agencyScore4.setIndexCode(IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode()); - - agencyScore4.setDataType("street"); - agencyScore1.setDataType("street"); - agencyScore2.setDataType("street"); - agencyScore3.setDataType("street"); - insertIndexAgencyScore.add(agencyScore4); + agencyScore3.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore3.setYearId(dateArr[NumConstant.ZERO]); + agencyScore3.setMonthId(monthId); + agencyScore3.setIsTotal(NumConstant.ZERO_STR); + agencyScore3.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore3.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); + + if ("community".equals(agencyDTO.getLevel())){ + AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); + // 赋默认值 - 全区相关 + agencyScore4.setAgencyId(agencyDTO.getAgencyId()); + agencyScore4.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore4.setYearId(dateArr[NumConstant.ZERO]); + agencyScore4.setMonthId(monthId); + agencyScore4.setIsTotal(NumConstant.ONE_STR); + agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore4.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); + + agencyScore4.setDataType("district"); + agencyScore1.setDataType("district"); + agencyScore2.setDataType("district"); + agencyScore3.setDataType("district"); + insertIndexAgencyScore.add(agencyScore4); + } else if ("street".equals(agencyDTO.getLevel()) || "district".equals(agencyDTO.getLevel())){ + AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); + // 赋默认值 - 街道相关 + agencyScore4.setAgencyId(agencyDTO.getAgencyId()); + agencyScore4.setParentAgencyId(agencyDTO.getPid()); + //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore4.setYearId(dateArr[NumConstant.ZERO]); + agencyScore4.setMonthId(monthId); + agencyScore4.setIsTotal(NumConstant.ONE_STR); + agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore4.setIndexCode(IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode()); + + agencyScore4.setDataType("street"); + agencyScore1.setDataType("street"); + agencyScore2.setDataType("street"); + agencyScore3.setDataType("street"); + insertIndexAgencyScore.add(agencyScore4); + } + insertIndexAgencyScore.add(agencyScore1); + insertIndexAgencyScore.add(agencyScore2); + insertIndexAgencyScore.add(agencyScore3); } - insertIndexAgencyScore.add(agencyScore1); - insertIndexAgencyScore.add(agencyScore2); - insertIndexAgencyScore.add(agencyScore3); } agencyScoreDaol.batchInsertAgencyScoreData(insertIndexAgencyScore, customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index b225821aec..8ebc54bf91 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -77,7 +77,7 @@ #{item.isTotal}, #{item.score}, #{item.indexCode}, - 0, + #{item.delFlag}, 0, 'APP_USER', now(), From bcfb1adb926f600c92a0f08e24055f25d4ffaf0f Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Fri, 4 Sep 2020 22:12:46 +0800 Subject: [PATCH 340/360] =?UTF-8?q?=E5=B9=B4=E8=A1=A8=E3=80=81=E6=9C=88?= =?UTF-8?q?=E8=A1=A8=20--=20=E5=B1=95=E7=A4=BA=E6=8E=A5=E5=8F=A3=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenIndexDataMonthlyDao.java | 2 +- .../impl/FactIndexCollectServiceImpl.java | 328 ++++++++++-------- 2 files changed, 179 insertions(+), 151 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index 55b4e3ac41..4ebfc825e4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -65,7 +65,7 @@ public interface ScreenIndexDataMonthlyDao extends BaseDao * @Author zhangyong * @Date 15:51 2020-09-04 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 51d7dbcd38..f1068d23b8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -27,6 +27,8 @@ import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -46,6 +48,7 @@ import java.util.stream.Collectors; @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) public class FactIndexCollectServiceImpl implements FactIndexCollectService { + private static final Logger log = LoggerFactory.getLogger(FactIndexCollectServiceImpl.class); @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -225,12 +228,12 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { this.startHandleIndexAgencyScore(monthId, customerId); // 根据年,汇总今年各项得到,计算平均值后 插入年表 screen_index_data_yearly - this.insertIndexDataYear(this.getYearStr(monthId), this.getMonthStr(monthId), customerId); + this.insertIndexDataYear(monthId, customerId); } /** * 目标:将网格的 党建能力、治理能力、服务能力、总指数 得分。 整理后(4条合1条) 插入 指数-指数数据(月表) - * 如果网格相关分值表 中的网格数量不全,需要从 网格(党支部)信息表(一) 中,先查询到缺少的网格信息,赋上默认值后,插入网格相关分值表(四)。 + * 如果网格相关分值表 中的网格数量不全,需要从 网格(党支部)信息表 中,先查询到缺少的网格信息,赋上默认值后,在插入网格相关分值表。 一对四 * * @param monthId * @param customerId @@ -242,40 +245,39 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 查询网格相关分值记录 表已经存在的网格id List indexGridIds = factIndexGridScoreDao.selectListGridId(customerId, monthId); if (indexGridIds.size() > NumConstant.ZERO){ - // 根据网格相关分值表 中查询到的网格id,去 网格(党支部)信息表 进行不匹配查询(即返回网格相关分值表 中不存在的网格信息)。 + // 根据网格相关分值表 中查询到的网格id,去 网格(党支部)信息表 进行不匹配查询。 String[] gridIds = new String[indexGridIds.size()]; for (int i = NumConstant.ZERO; i < indexGridIds.size(); i++){ gridIds[i] = indexGridIds.get(i); } + // 进行不匹配查询(即返回网格相关分值表 中不存在的网格信息)。 List mismatchGridList = screenCustomerGridDao.selectListMismatchGridInfo(customerId, gridIds); // 将 网格相关分值表 中,本月份没有的网格信息,按照 4种类型,各新增一遍,赋默认值 0 if (mismatchGridList.size() > NumConstant.ZERO){ - this.insertIndexGridScoreDefaultValueFor(monthId, customerId, mismatchGridList); + this.insertIndexGridScoreDefaultValue(monthId, customerId, mismatchGridList); } } else { // 将所有的网格按照 4种类型,各赋一遍默认值 List mismatchGridList = screenCustomerGridDao.selectListMismatchGridInfo(customerId, null); - this.insertIndexGridScoreDefaultValueFor(monthId, customerId, mismatchGridList); + this.insertIndexGridScoreDefaultValue(monthId, customerId, mismatchGridList); } // 开始处理实际分数 // fact_index_grid_score 网格相关分值记录表 grid - String[] dateArr = yearOrMonth(monthId); List gridScoreDTOS = factIndexGridScoreDao.selectListGridScore(customerId, monthId); - this.insertIndexDataMonthlyByGridScore(dateArr[NumConstant.ONE], dateArr[NumConstant.ZERO], customerId, gridScoreDTOS); + this.insertIndexDataMonthlyByGridScore(monthId, customerId, gridScoreDTOS); } /** * 将网格相关分值记录表 数据 插入月表 screenIndexDataMonthlyDao * - * @param month 08 - * @param year 2020 + * @param monthId 202008 * @param customerId 客户id * @param gridScoreDTOS 网格相关分值记录表 当前客户所属月份数据集 * @return void * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByGridScore(String month, String year, String customerId, List gridScoreDTOS){ + private void insertIndexDataMonthlyByGridScore(String monthId, String customerId, List gridScoreDTOS){ List monthlyFormDTOList = new ArrayList<>(); // 根据网格id进行分组,最后组装一条数据 一个网格 对应 4条数据 Map> collect = gridScoreDTOS.stream().collect(Collectors.groupingBy(FactIndexGridScoreDTO::getGridId)); @@ -286,6 +288,8 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 网格id orgIds[j] = gridScore.getKey(); j++; + // 给4个指数 赋默认值 + monthlyFormDTO = this.setIndexDefaultValueFor(monthlyFormDTO); for ( int i = 0; i < gridScore.getValue().size(); i++){ if (NumConstant.ONE_STR.equals(gridScore.getValue().get(i).getIsTotal())){ // 是总分 @@ -294,8 +298,8 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { monthlyFormDTO.setIndexTotal(gridScore.getValue().get(i).getScore()); } } else { - // 赋值 党建能力、治理能力、服务能力 - monthlyFormDTO = this.setValueAblityMonthlyFor(gridScore.getValue().get(i).getIndexCode(), + // 赋实际值 党建能力、治理能力、服务能力 + monthlyFormDTO = this.setValueAbilityMonthlyFor(gridScore.getValue().get(i).getIndexCode(), gridScore.getValue().get(i).getScore(), monthlyFormDTO); } @@ -306,55 +310,64 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { throw new RuntimeException("在screen_customer_grid表中未查询到该客户下的网格信息:customerId =" + customerId + ", gridId = " + gridScore.getKey()); } // 补充表中其他字段 - monthlyFormDTO = this.supplementIndexDataMonthlyTable(year, month, OrgTypeConstant.GRID, gridScore.getKey(), + monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, gridScore.getKey(), parentGridInfo.getParentAgencyId(), parentGridInfo.getGridName(), monthlyFormDTO); monthlyFormDTOList.add(monthlyFormDTO); } if (monthlyFormDTOList.size() > NumConstant.ZERO){ - screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, year, month, orgIds); + screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, getYearStr(monthId), monthId, orgIds); screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); } } + /** + * 目标:将社区的 党建能力、治理能力、服务能力、总指数 得分。 整理后(4条合1条) 插入 指数-指数数据(月表) + * 如果社区相关分值表 中的社区数量不全,需要从 组织机构信息 中,先查询到缺少的社区信息,赋上默认值后,在插入社区相关分值表。 一对四 + * + * @param monthId + * @param customerId + * @return void + * @Author zhangyong + * @Date 13:44 2020-09-04 + **/ private void startHandleIndexCommunityScore(String monthId, String customerId){ - // 查询社区相关分值记录 + // 查询社区相关分值记录id List indexCommunityIds = factIndexCommunityScoreDao.selectListCommunityId(customerId, monthId); if (indexCommunityIds.size() > NumConstant.ZERO){ - // 根据网格相关分值表 中查询到的网格id,去 网格(党支部)信息表 进行不匹配查询(即返回网格相关分值表 中不存在的网格信息)。 + // 根据社区相关分值表 中查询到的社区id,去 组织机构信息 进行不匹配查询。 String[] communityIds = new String[indexCommunityIds.size()]; for (int i = NumConstant.ZERO; i < indexCommunityIds.size(); i++){ communityIds[i] = indexCommunityIds.get(i); } + // 进行不匹配查询(即返回社区相关分值表 中不存在的社区信息)。 List mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, communityIds); - // 将 社区相关分数表 中,本月份没有的网格信息,按照 4种类型,各新增一遍,赋默认值 0 + // 将 社区相关分数表 中,本月份没有的社区信息,按照 4种类型,各新增一遍,赋默认值 0 if (mismatchAgencyList.size() > NumConstant.ZERO){ - this.insertIndexCommunityScoreDefaultValueFor(monthId, customerId, mismatchAgencyList); + this.insertIndexCommunityScoreDefaultValue(monthId, customerId, mismatchAgencyList); } } else { // 将所有的社区按照 4种类型,各赋一遍默认值 List mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, null); - this.insertIndexCommunityScoreDefaultValueFor(monthId, customerId, mismatchAgencyList); + this.insertIndexCommunityScoreDefaultValue(monthId, customerId, mismatchAgencyList); } // 开始处理实际分数 // fact_index_community_score 社区相关分数表 agency - String[] dateArr = yearOrMonth(monthId); // 查询社区相关分值记录 List communityScoreDTOS = factIndexCommunityScoreDao.selectListCommunityScore(customerId, monthId); - this.insertIndexDataMonthlyByCommunityScore(dateArr[NumConstant.ONE], dateArr[NumConstant.ZERO], customerId, communityScoreDTOS); + this.insertIndexDataMonthlyByCommunityScore(monthId, customerId, communityScoreDTOS); } /** * 社区相关分数表 数据 插入月表 screenIndexDataMonthlyDao * - * @param month 08 - * @param year 2020 + * @param monthId 202008 * @param customerId 客户id * @param communityScoreDTOS 社区相关分数表 当前客户所属月份数据集 * @return void * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByCommunityScore(String month, String year, String customerId, List communityScoreDTOS){ + private void insertIndexDataMonthlyByCommunityScore(String monthId, String customerId, List communityScoreDTOS){ List monthlyFormDTOList = new ArrayList<>(); // 根据组织id 进行分组,最后组装一条数据 一个组织id 对应 4条数据 Map> collect = communityScoreDTOS.stream().collect(Collectors.groupingBy(FactIndexCommunityScoreDTO::getAgencyId)); @@ -365,6 +378,8 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 组织id orgIds[j] = communityScore.getKey(); j++; + // 给4个指数 赋默认值 + monthlyFormDTO = this.setIndexDefaultValueFor(monthlyFormDTO); for ( int i = 0; i < communityScore.getValue().size(); i++){ if (NumConstant.ONE_STR.equals(communityScore.getValue().get(i).getIsTotal())){ // 是总分 @@ -374,7 +389,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } } else { // 赋值 党建能力、治理能力、服务能力 - monthlyFormDTO = this.setValueAblityMonthlyFor(communityScore.getValue().get(i).getIndexCode(), + monthlyFormDTO = this.setValueAbilityMonthlyFor(communityScore.getValue().get(i).getIndexCode(), communityScore.getValue().get(i).getScore(), monthlyFormDTO); } @@ -388,17 +403,27 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { throw new RuntimeException("在screen_customer_agency表中未查询到该客户下的组织名称:customerId =" + customerId + ", agencyId = " + communityScore.getKey()); } // 补充表中其他字段 - monthlyFormDTO = this.supplementIndexDataMonthlyTable(year, month, OrgTypeConstant.GRID, communityScore.getKey(), + monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, communityScore.getKey(), parentAgencyId, agencyName, monthlyFormDTO); // 补充表中其他字段 monthlyFormDTOList.add(monthlyFormDTO); } if (monthlyFormDTOList.size() > NumConstant.ZERO){ - screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, year, month, orgIds); + screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, getYearStr(monthId), monthId, orgIds); screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); } } + /** + * 目标:将区直部门的 党建能力、治理能力、服务能力、总指数 得分。 整理后(4条合1条) 插入 指数-指数数据(月表) + * 如果 区直部门分值表 中的部门数量不全,需要从 部门信息表 中,先查询到缺少的部门信息,赋上默认值后,在插入 区直部门分值表。 一对四 + * + * @param monthId + * @param customerId + * @return void + * @Author zhangyong + * @Date 13:44 2020-09-04 + **/ private void startHandleIndexDeptScore(String monthId, String customerId){ // 查询社 区直部门分值表 List indexDeptIds = deptScoreDao.selectListDeptId(customerId, monthId); @@ -417,24 +442,22 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } // 开始处理实际分数 // fact_index_dept_score 区直部门分值表 department - String[] dateArr = yearOrMonth(monthId); // 查询社 区直部门分值表 List deptScoreDTOS = deptScoreDao.selectListDeptScore(customerId, monthId); - this.insertIndexDataMonthlyByDeptScore(dateArr[NumConstant.ONE], dateArr[NumConstant.ZERO], customerId, deptScoreDTOS); + this.insertIndexDataMonthlyByDeptScore(monthId, customerId, deptScoreDTOS); } /** * 将区直部门分值表 数据 插入月表 screenIndexDataMonthlyDao * - * @param month 08 - * @param year 2020 + * @param monthId 202008 * @param customerId 客户id * @param deptScoreDTOS 区直部门分值表 当前客户所属月份数据集 * @return void * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByDeptScore(String month, String year, String customerId, List deptScoreDTOS){ + private void insertIndexDataMonthlyByDeptScore(String monthId, String customerId, List deptScoreDTOS){ List monthlyFormDTOList = new ArrayList<>(); // 根据部门id 进行分组,最后组装一条数据 一个部门id 对应 4条数据 Map> collect = deptScoreDTOS.stream().collect(Collectors.groupingBy(DeptScoreDTO::getDeptId)); @@ -445,11 +468,13 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 部门id orgIds[j] = deptScore.getKey(); j++; + // 给4个指数 赋默认值 + monthlyFormDTO = this.setIndexDefaultValueFor(monthlyFormDTO); for ( int i = 0; i < deptScore.getValue().size(); i++){ // 区直街道的总分 就是 治理能力 monthlyFormDTO.setIndexTotal(deptScore.getValue().get(i).getScore()); // 赋值 治理能力 - monthlyFormDTO = this.setValueAblityMonthlyFor(deptScore.getValue().get(i).getIndexCode(), + monthlyFormDTO = this.setValueAbilityMonthlyFor(deptScore.getValue().get(i).getIndexCode(), deptScore.getValue().get(i).getScore(), monthlyFormDTO); } @@ -459,22 +484,34 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { throw new RuntimeException("在screen_customer_dept表中未查询到该客户下的父级信息:customerId =" + customerId + ", deptId = " + deptScore.getKey()); } // 补充表中其他字段 - monthlyFormDTO = this.supplementIndexDataMonthlyTable(year, month, OrgTypeConstant.GRID, deptScore.getKey(), + monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, deptScore.getKey(), parentDeptInfo.getParentAgencyId(), parentDeptInfo.getDeptName(), monthlyFormDTO); monthlyFormDTOList.add(monthlyFormDTO); } - screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, year, month, orgIds); - screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); + if (monthlyFormDTOList.size() > NumConstant.ZERO){ + screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, getYearStr(monthId), monthId, orgIds); + screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); + } } + /** + * 目标:将 区/街道的 党建能力、治理能力、服务能力、总指数 得分。 整理后(4条合1条) 插入 指数-指数数据(月表) + * 如果 区/街道相关分数表 中的组织数量不全,需要从 组织机构信息 中,先查询到缺少的组织信息,赋上默认值后,在插入 区/街道相关分数表。 一对四 + * + * @param monthId + * @param customerId + * @return void + * @Author zhangyong + * @Date 13:44 2020-09-04 + **/ private void startHandleIndexAgencyScore(String monthId, String customerId){ List indexAgencyIds = agencyScoreDaol.selectListAgencyId(customerId, monthId); if (indexAgencyIds.size() > NumConstant.ZERO){ - String[] agencys = new String[indexAgencyIds.size()]; + String[] agencyIds = new String[indexAgencyIds.size()]; for (int i = NumConstant.ZERO; i < indexAgencyIds.size(); i++){ - agencys[i] = indexAgencyIds.get(i); + agencyIds[i] = indexAgencyIds.get(i); } - List mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, agencys); + List mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, agencyIds); if (mismatchAgencyList.size() > NumConstant.ZERO){ this.insertIndexAgencyScoreDefaultValueFor(monthId, customerId, mismatchAgencyList); } @@ -484,23 +521,21 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } // 开始处理实际分数 // fact_index_agency_score 区/街道相关分数表 agency - String[] dateArr = yearOrMonth(monthId); List agencyScoreDTOS = agencyScoreDaol.selectListAgencyScore(customerId, monthId); - this.insertIndexDataMonthlyByAgencyScore(dateArr[NumConstant.ONE], dateArr[NumConstant.ZERO], customerId, agencyScoreDTOS); + this.insertIndexDataMonthlyByAgencyScore(monthId, customerId, agencyScoreDTOS); } /** * 将区/街道相关分数表 数据 插入月表 screenIndexDataMonthlyDao * - * @param month 08 - * @param year 2020 + * @param monthId 202008 * @param customerId 客户id * @param agencyScoreDTOS 区/街道相关分数表 当前客户所属月份数据集 * @return void * @Author zhangyong * @Date 14:17 2020-09-03 **/ - private void insertIndexDataMonthlyByAgencyScore(String month, String year, String customerId, List agencyScoreDTOS){ + private void insertIndexDataMonthlyByAgencyScore(String monthId, String customerId, List agencyScoreDTOS){ List monthlyFormDTOList = new ArrayList<>(); // 根据组织id(eg:社区或者街道id) 进行分组,最后组装一条数据 一个组织id 对应 4条数据 Map> collect = agencyScoreDTOS.stream().collect(Collectors.groupingBy(AgencyScoreDTO::getAgencyId)); @@ -511,13 +546,15 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 组织id(eg:社区或者街道id) orgIds[j] = agencyScore.getKey(); j++; + // 给4个指数 赋默认值 + monthlyFormDTO = this.setIndexDefaultValueFor(monthlyFormDTO); for ( int i = 0; i < agencyScore.getValue().size(); i++){ if (NumConstant.ONE_STR.equals(agencyScore.getValue().get(i).getIsTotal())){ // 是总分 总指数 = IS_TOTAL = 1 monthlyFormDTO.setIndexTotal(agencyScore.getValue().get(i).getScore()); } else { // 赋值 党建能力、治理能力、服务能力 - monthlyFormDTO = this.setValueAblityMonthlyFor(agencyScore.getValue().get(i).getIndexCode(), + monthlyFormDTO = this.setValueAbilityMonthlyFor(agencyScore.getValue().get(i).getIndexCode(), agencyScore.getValue().get(i).getScore(), monthlyFormDTO); } @@ -530,18 +567,19 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { throw new RuntimeException("在screen_customer_agency表中未查询到该客户下的组织名称:customerId =" + customerId + ", agencyId = " + agencyScore.getKey()); } // 补充表中其他字段 - monthlyFormDTO = this.supplementIndexDataMonthlyTable(year, month, OrgTypeConstant.GRID, agencyScore.getKey(), + monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, agencyScore.getKey(), parentAgencyId, agencyName, monthlyFormDTO); monthlyFormDTOList.add(monthlyFormDTO); } - screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, year, month, orgIds); - screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); + if (monthlyFormDTOList.size() > NumConstant.ZERO){ + screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId, getYearStr(monthId), monthId, orgIds); + screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId); + } } /** * 指数-指数数据(每月数值) 表 字段补全,待新增 - * @param year 2020 - * @param month 08 + * @param monthId 202008 * @param orgType 组织类别 agency:组织;部门:department;网格:grid * @param orgId 组织Id 可以为网格,机关id * @param parentId 上级组织id @@ -551,10 +589,10 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Author zhangyong * @Date 15:29 2020-09-03 **/ - private IndexDataMonthlyFormDTO supplementIndexDataMonthlyTable(String year, String month, String orgType, String orgId, String parentId, + private IndexDataMonthlyFormDTO supplementIndexDataMonthlyTable(String monthId, String orgType, String orgId, String parentId, String orgName, IndexDataMonthlyFormDTO monthlyFormDTO){ - monthlyFormDTO.setYearId(year); - monthlyFormDTO.setMonthId(year + month); + monthlyFormDTO.setYearId(getYearStr(monthId)); + monthlyFormDTO.setMonthId(monthId); monthlyFormDTO.setOrgType(orgType); monthlyFormDTO.setOrgId(orgId); // 根据网格id,查询其上级组织id、组织名称 @@ -564,8 +602,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } /** - * 赋值 党建能力、治理能力、服务能力 - * (总指数 赋默认值) + * 赋实际值 党建能力、治理能力、服务能力 * @param IndexCode 组织类别 * @param Score 分数 * @param monthlyFormDTO 待保存的数据 @@ -573,17 +610,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Author zhangyong * @Date 09:26 2020-09-04 **/ - private IndexDataMonthlyFormDTO setValueAblityMonthlyFor(String IndexCode, BigDecimal Score, - IndexDataMonthlyFormDTO monthlyFormDTO){ - // 赋默认值 - if (null == monthlyFormDTO.getIndexTotal() && null == monthlyFormDTO.getPartyDevAblity() - && null == monthlyFormDTO.getGovernAblity() && null == monthlyFormDTO.getServiceAblity()){ - BigDecimal zero = new BigDecimal(NumConstant.ZERO); - monthlyFormDTO.setIndexTotal(zero); - monthlyFormDTO.setPartyDevAblity(zero); - monthlyFormDTO.setGovernAblity(zero); - monthlyFormDTO.setServiceAblity(zero); - } + private IndexDataMonthlyFormDTO setValueAbilityMonthlyFor(String IndexCode, BigDecimal Score, IndexDataMonthlyFormDTO monthlyFormDTO){ // 赋实际值 if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(IndexCode)){ // 党建能力 @@ -611,22 +638,23 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { monthlyFormDTO.setIndexTotal(zero); monthlyFormDTO.setPartyDevAblity(zero); monthlyFormDTO.setGovernAblity(zero); + monthlyFormDTO.setServiceAblity(zero); return monthlyFormDTO; } /** * 新增 网格相关分值记录表 默认值,一条网格,按照组织类别的不同 需要插入4次 * - * @param monthId + * @param monthId 例:202008 * @param customerId - * @param mismatchGridList + * @param mismatchGridList 网格相关分值记录表 中缺少的网格集合 * @return void * @Author zhangyong * @Date 14:02 2020-09-04 **/ - private void insertIndexGridScoreDefaultValueFor(String monthId, String customerId, List mismatchGridList){ - String[] dateArr = yearOrMonth(monthId); + private void insertIndexGridScoreDefaultValue(String monthId, String customerId, List mismatchGridList){ List insertIndexGridScoreDTOS = new ArrayList<>(); + BigDecimal zero = new BigDecimal(NumConstant.ZERO); for (ScreenCustomerGridDTO gridDTO : mismatchGridList){ FactIndexGridScoreDTO indexGridScoreDTO = new FactIndexGridScoreDTO(); // 赋默认值 - 党建能力指数 @@ -635,11 +663,12 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { indexGridScoreDTO.setAllParentIds(gridDTO.getAllParentIds()); //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 indexGridScoreDTO.setQuarterId(DateUtils.getQuarterId(monthId)); - indexGridScoreDTO.setYearId(dateArr[NumConstant.ZERO]); + indexGridScoreDTO.setYearId(getYearStr(monthId)); indexGridScoreDTO.setMonthId(monthId); - indexGridScoreDTO.setIsTotal(NumConstant.ZERO_STR); // 0 or 1 - indexGridScoreDTO.setScore(new BigDecimal(NumConstant.ZERO)); - indexGridScoreDTO.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); // 4种类型 + // 0 or 1 + indexGridScoreDTO.setIsTotal(NumConstant.ZERO_STR); + indexGridScoreDTO.setScore(zero); + indexGridScoreDTO.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); indexGridScoreDTO.setDelFlag(NumConstant.ZERO_STR); insertIndexGridScoreDTOS.add(indexGridScoreDTO); @@ -649,10 +678,10 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { indexGridScoreDTO1.setAgencyId(gridDTO.getParentAgencyId()); indexGridScoreDTO1.setAllParentIds(gridDTO.getAllParentIds()); indexGridScoreDTO1.setQuarterId(DateUtils.getQuarterId(monthId)); - indexGridScoreDTO1.setYearId(dateArr[NumConstant.ZERO]); + indexGridScoreDTO1.setYearId(getYearStr(monthId)); indexGridScoreDTO1.setMonthId(monthId); indexGridScoreDTO1.setIsTotal(NumConstant.ZERO_STR); - indexGridScoreDTO1.setScore(new BigDecimal(NumConstant.ZERO)); + indexGridScoreDTO1.setScore(zero); indexGridScoreDTO1.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); indexGridScoreDTO1.setDelFlag(NumConstant.ZERO_STR); insertIndexGridScoreDTOS.add(indexGridScoreDTO1); @@ -663,10 +692,10 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { indexGridScoreDTO2.setAgencyId(gridDTO.getParentAgencyId()); indexGridScoreDTO2.setAllParentIds(gridDTO.getAllParentIds()); indexGridScoreDTO2.setQuarterId(DateUtils.getQuarterId(monthId)); - indexGridScoreDTO2.setYearId(dateArr[NumConstant.ZERO]); + indexGridScoreDTO2.setYearId(getYearStr(monthId)); indexGridScoreDTO2.setMonthId(monthId); indexGridScoreDTO2.setIsTotal(NumConstant.ZERO_STR); - indexGridScoreDTO2.setScore(new BigDecimal(NumConstant.ZERO)); + indexGridScoreDTO2.setScore(zero); indexGridScoreDTO2.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); indexGridScoreDTO2.setDelFlag(NumConstant.ZERO_STR); insertIndexGridScoreDTOS.add(indexGridScoreDTO2); @@ -677,10 +706,10 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { indexGridScoreDTO3.setAgencyId(gridDTO.getParentAgencyId()); indexGridScoreDTO3.setAllParentIds(gridDTO.getAllParentIds()); indexGridScoreDTO3.setQuarterId(DateUtils.getQuarterId(monthId)); - indexGridScoreDTO3.setYearId(dateArr[NumConstant.ZERO]); + indexGridScoreDTO3.setYearId(getYearStr(monthId)); indexGridScoreDTO3.setMonthId(monthId); indexGridScoreDTO3.setIsTotal(NumConstant.ONE_STR); - indexGridScoreDTO3.setScore(new BigDecimal(NumConstant.ZERO)); + indexGridScoreDTO3.setScore(zero); indexGridScoreDTO3.setIndexCode(IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); indexGridScoreDTO3.setDelFlag(NumConstant.ZERO_STR); insertIndexGridScoreDTOS.add(indexGridScoreDTO3); @@ -698,9 +727,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { * @Author zhangyong * @Date 14:02 2020-09-04 **/ - private void insertIndexCommunityScoreDefaultValueFor(String monthId, String customerId, List mismatchAgencyList){ - String[] dateArr = yearOrMonth(monthId); + private void insertIndexCommunityScoreDefaultValue(String monthId, String customerId, List mismatchAgencyList){ List insertIndexCommunityScore = new ArrayList<>(); + BigDecimal zero = new BigDecimal(NumConstant.ZERO); for (ScreenCustomerAgencyEntity agencyDTO : mismatchAgencyList){ FactIndexCommunityScoreEntity communityScore1 = new FactIndexCommunityScoreEntity(); // 赋默认值 - 党建能力指数 @@ -708,23 +737,23 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { communityScore1.setParentAgencyId(agencyDTO.getPid()); //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 communityScore1.setQuarterId(DateUtils.getQuarterId(monthId)); - communityScore1.setYearId(dateArr[NumConstant.ZERO]); + communityScore1.setYearId(getYearStr(monthId)); communityScore1.setMonthId(monthId); - communityScore1.setIsTotal(NumConstant.ZERO_STR); // 0 or 1 - communityScore1.setScore(new BigDecimal(NumConstant.ZERO)); - communityScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); // 4种类型 + // 0 or 1 + communityScore1.setIsTotal(NumConstant.ZERO_STR); + communityScore1.setScore(zero); + communityScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); insertIndexCommunityScore.add(communityScore1); FactIndexCommunityScoreEntity communityScore2 = new FactIndexCommunityScoreEntity(); // 赋默认值 - 治理能力 communityScore2.setAgencyId(agencyDTO.getAgencyId()); communityScore2.setParentAgencyId(agencyDTO.getPid()); - //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 communityScore2.setQuarterId(DateUtils.getQuarterId(monthId)); - communityScore2.setYearId(dateArr[NumConstant.ZERO]); + communityScore2.setYearId(getYearStr(monthId)); communityScore2.setMonthId(monthId); communityScore2.setIsTotal(NumConstant.ZERO_STR); - communityScore2.setScore(new BigDecimal(NumConstant.ZERO)); + communityScore2.setScore(zero); communityScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); insertIndexCommunityScore.add(communityScore2); @@ -732,12 +761,11 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 赋默认值 - 服务能力 communityScore3.setAgencyId(agencyDTO.getAgencyId()); communityScore3.setParentAgencyId(agencyDTO.getPid()); - //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 communityScore3.setQuarterId(DateUtils.getQuarterId(monthId)); - communityScore3.setYearId(dateArr[NumConstant.ZERO]); + communityScore3.setYearId(getYearStr(monthId)); communityScore3.setMonthId(monthId); communityScore3.setIsTotal(NumConstant.ZERO_STR); - communityScore3.setScore(new BigDecimal(NumConstant.ZERO)); + communityScore3.setScore(zero); communityScore3.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); insertIndexCommunityScore.add(communityScore3); @@ -745,20 +773,28 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 赋默认值 - 社区相关 communityScore4.setAgencyId(agencyDTO.getAgencyId()); communityScore4.setParentAgencyId(agencyDTO.getPid()); - //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 communityScore4.setQuarterId(DateUtils.getQuarterId(monthId)); - communityScore4.setYearId(dateArr[NumConstant.ZERO]); + communityScore4.setYearId(getYearStr(monthId)); communityScore4.setMonthId(monthId); communityScore4.setIsTotal(NumConstant.ONE_STR); - communityScore4.setScore(new BigDecimal(NumConstant.ZERO)); + communityScore4.setScore(zero); communityScore4.setIndexCode(IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); insertIndexCommunityScore.add(communityScore4); } factIndexCommunityScoreDao.batchInsertCommunityScoreData(insertIndexCommunityScore, customerId); } + /** + * 新增 区直部门分值表 默认值,一条部门id,按照组织类别的不同 需要插入1次 + * + * @param monthId + * @param customerId + * @param mismatchDeptList + * @return void + * @Author zhangyong + * @Date 14:02 2020-09-04 + **/ private void insertIndexDeptScoreDefaultValueFor(String monthId, String customerId, List mismatchDeptList){ - String[] dateArr = yearOrMonth(monthId); List insertIndexDeptScore = new ArrayList<>(); for (ScreenCustomerDeptEntity deptDTO : mismatchDeptList){ DeptScoreEntity deptScore2 = new DeptScoreEntity(); @@ -767,7 +803,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { deptScore2.setAgencyId(deptDTO.getParentAgencyId()); //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 deptScore2.setQuarterId(DateUtils.getQuarterId(monthId)); - deptScore2.setYearId(dateArr[NumConstant.ZERO]); + deptScore2.setYearId(getYearStr(monthId)); deptScore2.setMonthId(monthId); deptScore2.setIsTotal(NumConstant.ZERO_STR); deptScore2.setScore(new BigDecimal(NumConstant.ZERO)); @@ -778,8 +814,18 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { deptScoreDao.batchInsertDeptScoreData(insertIndexDeptScore, customerId); } + /** + * 新增 区/街道相关分数表 默认值,一条组织id,按照组织类别的不同 需要插入4次 + * + * @param monthId + * @param customerId + * @param mismatchAgencyList + * @return void + * @Author zhangyong + * @Date 14:02 2020-09-04 + **/ private void insertIndexAgencyScoreDefaultValueFor(String monthId, String customerId, List mismatchAgencyList){ - String[] dateArr = yearOrMonth(monthId); + BigDecimal zero = new BigDecimal(NumConstant.ZERO); List insertIndexAgencyScore = new ArrayList<>(); for (ScreenCustomerAgencyEntity agencyDTO : mismatchAgencyList){ if ("community".equals(agencyDTO.getLevel()) || "street".equals(agencyDTO.getLevel()) @@ -790,11 +836,12 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { agencyScore1.setParentAgencyId(agencyDTO.getPid()); //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 agencyScore1.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore1.setYearId(dateArr[NumConstant.ZERO]); + agencyScore1.setYearId(getYearStr(monthId)); agencyScore1.setMonthId(monthId); - agencyScore1.setIsTotal(NumConstant.ZERO_STR); // 0 or 1 - agencyScore1.setScore(new BigDecimal(NumConstant.ZERO)); - agencyScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); // 4种类型 + // 0 or 1 + agencyScore1.setIsTotal(NumConstant.ZERO_STR); + agencyScore1.setScore(zero); + agencyScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); AgencyScoreEntity agencyScore2 = new AgencyScoreEntity(); // 赋默认值 - 治理能力 @@ -802,96 +849,77 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { agencyScore2.setParentAgencyId(agencyDTO.getPid()); //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 agencyScore2.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore2.setYearId(dateArr[NumConstant.ZERO]); + agencyScore2.setYearId(getYearStr(monthId)); agencyScore2.setMonthId(monthId); agencyScore2.setIsTotal(NumConstant.ZERO_STR); - agencyScore2.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore2.setScore(zero); agencyScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); AgencyScoreEntity agencyScore3 = new AgencyScoreEntity(); // 赋默认值 - 服务能力 agencyScore3.setAgencyId(agencyDTO.getAgencyId()); agencyScore3.setParentAgencyId(agencyDTO.getPid()); - //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 agencyScore3.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore3.setYearId(dateArr[NumConstant.ZERO]); + agencyScore3.setYearId(getYearStr(monthId)); agencyScore3.setMonthId(monthId); agencyScore3.setIsTotal(NumConstant.ZERO_STR); - agencyScore3.setScore(new BigDecimal(NumConstant.ZERO)); + agencyScore3.setScore(zero); agencyScore3.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); + AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); + agencyScore4.setAgencyId(agencyDTO.getAgencyId()); + agencyScore4.setParentAgencyId(agencyDTO.getPid()); + agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); + agencyScore4.setYearId(getYearStr(monthId)); + agencyScore4.setMonthId(monthId); + agencyScore4.setIsTotal(NumConstant.ONE_STR); + agencyScore4.setScore(zero); if ("community".equals(agencyDTO.getLevel())){ - AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); // 赋默认值 - 全区相关 - agencyScore4.setAgencyId(agencyDTO.getAgencyId()); - agencyScore4.setParentAgencyId(agencyDTO.getPid()); - //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 - agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore4.setYearId(dateArr[NumConstant.ZERO]); - agencyScore4.setMonthId(monthId); - agencyScore4.setIsTotal(NumConstant.ONE_STR); - agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); agencyScore4.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); - agencyScore4.setDataType("district"); agencyScore1.setDataType("district"); agencyScore2.setDataType("district"); agencyScore3.setDataType("district"); - insertIndexAgencyScore.add(agencyScore4); } else if ("street".equals(agencyDTO.getLevel()) || "district".equals(agencyDTO.getLevel())){ - AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); // 赋默认值 - 街道相关 - agencyScore4.setAgencyId(agencyDTO.getAgencyId()); - agencyScore4.setParentAgencyId(agencyDTO.getPid()); - //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 - agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore4.setYearId(dateArr[NumConstant.ZERO]); - agencyScore4.setMonthId(monthId); - agencyScore4.setIsTotal(NumConstant.ONE_STR); - agencyScore4.setScore(new BigDecimal(NumConstant.ZERO)); agencyScore4.setIndexCode(IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode()); - agencyScore4.setDataType("street"); agencyScore1.setDataType("street"); agencyScore2.setDataType("street"); agencyScore3.setDataType("street"); - insertIndexAgencyScore.add(agencyScore4); } insertIndexAgencyScore.add(agencyScore1); insertIndexAgencyScore.add(agencyScore2); insertIndexAgencyScore.add(agencyScore3); + insertIndexAgencyScore.add(agencyScore4); } } agencyScoreDaol.batchInsertAgencyScoreData(insertIndexAgencyScore, customerId); } - private void insertIndexDataYear(String year, String month, String customerId){ - List monthlyFormList = screenIndexDataMonthlyDao.selectListIndexDataMonthlyByYear(customerId, year, month); - String[] orgIds = new String[monthlyFormList.size()]; - for (int i = NumConstant.ZERO; i < monthlyFormList.size(); i++){ - orgIds[i] = monthlyFormList.get(i).getOrgId(); - } - screenIndexDataYearlyDao.deleteIndexDataYearly(customerId, year, orgIds); - List entity = ConvertUtils.sourceToTarget(monthlyFormList, IndexDataYearlyFormDTO.class); - screenIndexDataYearlyDao.batchInsertIndexDataYearly(entity, customerId); - } - /** - * 将月份id,拆分 dateArr[0] = 年份 dateArr[1] = 月份 + * 根据年,汇总今年各项得到,计算平均值后 插入年表 screen_index_data_yearly * - * @param monthId 202008 - * @return java.lang.String[] + * @param monthId + * @param customerId + * @return void * @Author zhangyong - * @Date 13:39 2020-09-04 + * @Date 22:06 2020-09-04 **/ - private String[] yearOrMonth(String monthId){ - String[] dateArr = new String[NumConstant.TWO]; - dateArr[NumConstant.ZERO] = monthId.substring(NumConstant.ZERO, NumConstant.FOUR); - dateArr[NumConstant.ONE] = monthId.substring(NumConstant.FOUR, NumConstant.SIX); - return dateArr; + private void insertIndexDataYear(String monthId, String customerId){ + List monthlyFormList = screenIndexDataMonthlyDao.selectListIndexDataMonthlyByYear(customerId, getYearStr(monthId), getMonthStr(monthId)); + String[] orgIds = new String[monthlyFormList.size()]; + for (int i = NumConstant.ZERO; i < monthlyFormList.size(); i++){ + orgIds[i] = monthlyFormList.get(i).getOrgId(); + } + if (monthlyFormList.size() > NumConstant.ZERO){ + screenIndexDataYearlyDao.deleteIndexDataYearly(customerId, getYearStr(monthId), orgIds); + List entity = ConvertUtils.sourceToTarget(monthlyFormList, IndexDataYearlyFormDTO.class); + screenIndexDataYearlyDao.batchInsertIndexDataYearly(entity, customerId); + } } - /** * 将月份id,拆分成 年份 * From 350333606c26553939c045f8dce53b0123a8868a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 7 Sep 2020 09:34:19 +0800 Subject: [PATCH 341/360] =?UTF-8?q?=E5=85=A8=E5=8C=BA=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/evaluationindex/indexcal/AgencyScoreDao.java | 2 +- .../indexcal/impl/IndexCalculateDistrictServiceImpl.java | 8 ++++---- .../mapper/evaluationindex/indexcal/AgencyScoreDao.xml | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java index 72c11ee8ac..5cbcfb20e2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -70,7 +70,7 @@ public interface AgencyScoreDao extends BaseDao { * @author zxc * @date 2020/8/31 1:51 下午 */ - List selectAgencyScoreAvg(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + List selectAgencyScoreAvg(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("dataType")String dataType); /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 4fd50137bd..62a698c953 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -104,7 +104,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict //党建能力平均值 indexDetailList.forEach(detail -> { if (IndexCodeEnum.QU_XIA_JI_JIE_DDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { - List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + List subGridPartyAvgScore = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.error(IndexCalConstant.DISTRICT_PARTY_AVG_NULL); return; @@ -184,7 +184,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict Map pid = new HashMap<>(); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.SUO_YOU_JIE_DAO_ZLNLPJZ.getCode().equals(detail.getIndexCode())) { - List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + List districtGovernAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); if (districtGovernAvgList.size() == NumConstant.ONE) { pid.put(districtGovernAvgList.get(NumConstant.ZERO).getAgencyId(),districtGovernAvgList.get(NumConstant.ZERO).getParentId()); sizeOne(districtGovernAvgList.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid); @@ -254,7 +254,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { - List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvg(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL); if (subStreetAvgList.size() == NumConstant.ONE) { pid.put(subStreetAvgList.get(NumConstant.ZERO).getAgencyId(),subStreetAvgList.get(NumConstant.ZERO).getParentId()); sizeOne(subStreetAvgList.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid); @@ -312,6 +312,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict score.setMonthId(monthId); score.setYearId(DateUtils.getYearId(monthId)); score.setQuarterId(DateUtils.getQuarterId(monthId)); + score.setDataType(IndexCalConstant.DISTRICT_LEVEL); score.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); value.forEach(community -> { score.setScore(score.getScore().add(community.getScore())); @@ -351,7 +352,6 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict public void deleteAndInsert(String customerId, String monthId, String indexCode, List subAllDistrict) { if (!CollectionUtils.isEmpty(subAllDistrict)) { agencyScoreDao.deleteOldRecord(customerId, monthId, indexCode,IndexCalConstant.DISTRICT_LEVEL); - System.err.println(subAllDistrict.size()); agencyScoreDao.insertStreetRecord(subAllDistrict); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index cdc7ea366a..211e573c3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -100,6 +100,7 @@ AND fics.customer_id = #{customerId} AND fics.month_id = #{monthId} AND fics.index_code = #{indexCode} + AND fics.DATA_TYPE = #{dataType} GROUP BY fics.agency_id From c83d5c7d0a53b715d2af85892576f2d36dc64cc2 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 7 Sep 2020 09:44:53 +0800 Subject: [PATCH 342/360] =?UTF-8?q?=E5=AF=B9=E5=A4=96=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E8=AF=A2=E6=9C=BA=E5=85=B3=E3=80=81=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E3=80=81=E7=BD=91=E6=A0=BC=E4=B8=8B=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E4=BA=BA=E5=91=98=EF=BC=8C=E8=8C=83=E5=9B=B4=E4=BB=8E=E2=80=9C?= =?UTF-8?q?=E4=B8=8D=E5=8C=85=E6=8B=AC=E6=9C=AA=E6=BF=80=E6=B4=BB=E5=92=8C?= =?UTF-8?q?=E8=A2=AB=E7=A6=81=E7=94=A8=E7=9A=84=E2=80=9D=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=88=90=E2=80=9C=E4=B8=8D=E5=8C=85=E6=8B=AC=E8=A2=AB=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/CustomerStaffDao.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml index 94aaebe1a6..48fd117891 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xml @@ -228,7 +228,6 @@ LEFT JOIN user_wechat uw ON uw.user_id = cs.user_id AND uw.del_flag = 0 WHERE cs.del_flag = 0 - AND cs.active_flag = 'active' AND cs.enable_flag = 'enable' AND From 6ad06926ef0a48520aac48b949e23d8a9e365ff7 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 7 Sep 2020 09:51:30 +0800 Subject: [PATCH 343/360] =?UTF-8?q?=E5=B9=B4=E8=A1=A8-=E6=9C=88=E8=A1=A8?= =?UTF-8?q?=EF=BC=8C=E8=AE=BF=E9=97=AE=E6=95=B0=E6=8D=AE=E5=BA=93=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenCustomerAgencyDao.java | 21 ++++---- .../screen/ScreenCustomerDeptDao.java | 19 ++++--- .../screen/ScreenCustomerGridDao.java | 19 ++++--- .../impl/FactIndexCollectServiceImpl.java | 54 ++++++++++++++----- .../screen/ScreenCustomerAgencyDao.xml | 22 ++++---- .../screen/ScreenCustomerDeptDao.xml | 23 ++++---- .../screen/ScreenCustomerGridDao.xml | 24 ++++----- 7 files changed, 105 insertions(+), 77 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index ea9e977207..4912171860 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -56,17 +56,6 @@ public interface ScreenCustomerAgencyDao extends BaseDao list, @Param("customerId")String customerId); - /** - * 根据客户id、组织id,查询区/街道 组织名称 - * - * @param customerId 客户id - * @param agencyId 组织id - * @return java.util.String - * @Author zhangyong - * @Date 16:57 2020-09-03 - **/ - String selectParentAgencyInfo(@Param("customerId")String customerId, @Param("agencyId")String agencyId); - /** * 返回当前客户下,未匹配到的组织信息 * @param customerId 客户id @@ -76,4 +65,14 @@ public interface ScreenCustomerAgencyDao extends BaseDao selectListMismatcAgencyInfo(@Param("customerId")String customerId, @Param("agencyIds") String[] agencyIds); + + /** + * 根据客户id,查询区/街道 组织名称、id + * + * @param customerId 客户id + * @return java.util.List + * @Author zhangyong + * @Date 16:57 2020-09-03 + **/ + List selectListAgencyInfo(@Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java index a6f251251a..53a5fcf042 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java @@ -57,16 +57,6 @@ public interface ScreenCustomerDeptDao extends BaseDao **/ void batchInsertCustomerDept(@Param("list") List list, @Param("customerId")String customerId); - /** - * 根据客户id、部门id,查询部门父级 信息 - * @param customerId 客户id - * @param deptId 部门id - * @return com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity - * @Author zhangyong - * @Date 16:57 2020-09-03 - **/ - ScreenCustomerDeptEntity selectParentDeptInfo(@Param("customerId")String customerId, @Param("deptId")String deptId); - /** * @param customerId * @param deptId @@ -88,4 +78,13 @@ public interface ScreenCustomerDeptDao extends BaseDao **/ List selectListMismatchDeptInfo(@Param("customerId") String customerId, @Param("deptIds") String[] deptIds); + + /** + * 根据客户id 查询部门 信息 + * @param customerId 客户id + * @return java.util.List + * @Author zhangyong + * @Date 16:57 2020-09-03 + **/ + List selectListDeptInfo(@Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index d07d9aff46..005f69289b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -95,16 +95,6 @@ public interface ScreenCustomerGridDao extends BaseDao **/ ScreenCustomerGridDTO selectParentAgencyId(@Param("customerId") String customerId, @Param("gridId") String gridId); - /** - * 根据客户id、网格id,查询网格(党支部)父级信息 - * @param customerId - * @param gridId - * @return com.epmet.dto.screen.FactIndexGridScoreDTO - * @Author zhangyong - * @Date 16:57 2020-09-03 - **/ - ScreenCustomerGridDTO selectParentGridInfo(@Param("customerId")String customerId, @Param("gridId")String gridId); - /** * 返回当前客户下,未匹配到的网格信息 * @@ -116,4 +106,13 @@ public interface ScreenCustomerGridDao extends BaseDao **/ List selectListMismatchGridInfo(@Param("customerId") String customerId, @Param("gridIds") String[] gridIds); + + /** + * 根据客户id 查询网格(党支部)详细信息 + * @param customerId + * @return java.util.List + * @Author zhangyong + * @Date 16:57 2020-09-03 + **/ + List selectListGridInfo(@Param("customerId")String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index f1068d23b8..e8d04fea45 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -281,6 +281,8 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { List monthlyFormDTOList = new ArrayList<>(); // 根据网格id进行分组,最后组装一条数据 一个网格 对应 4条数据 Map> collect = gridScoreDTOS.stream().collect(Collectors.groupingBy(FactIndexGridScoreDTO::getGridId)); + // 查询网格的 上级组织id 和 组织名称 + List parentGridList = screenCustomerGridDao.selectListGridInfo(customerId); String[] orgIds = new String[collect.size()]; int j = 0; for(Map.Entry> gridScore : collect.entrySet()){ @@ -304,14 +306,21 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { monthlyFormDTO); } } - // 查询网格的 上级组织id 和 组织名称 - ScreenCustomerGridDTO parentGridInfo = screenCustomerGridDao.selectParentGridInfo(customerId, gridScore.getKey()); - if (null == parentGridInfo){ + // 匹配网格的 上级组织id 和 组织名称 + String parentAgencyId = ""; + String gridName = ""; + for (ScreenCustomerGridDTO gridDTO : parentGridList){ + if (gridScore.getKey().equals(gridDTO.getGridId())){ + parentAgencyId = gridDTO.getParentAgencyId(); + gridName = gridDTO.getGridName(); + } + } + if ("".equals(parentAgencyId)){ throw new RuntimeException("在screen_customer_grid表中未查询到该客户下的网格信息:customerId =" + customerId + ", gridId = " + gridScore.getKey()); } // 补充表中其他字段 monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, gridScore.getKey(), - parentGridInfo.getParentAgencyId(), parentGridInfo.getGridName(), monthlyFormDTO); + parentAgencyId, gridName, monthlyFormDTO); monthlyFormDTOList.add(monthlyFormDTO); } if (monthlyFormDTOList.size() > NumConstant.ZERO){ @@ -371,6 +380,8 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { List monthlyFormDTOList = new ArrayList<>(); // 根据组织id 进行分组,最后组装一条数据 一个组织id 对应 4条数据 Map> collect = communityScoreDTOS.stream().collect(Collectors.groupingBy(FactIndexCommunityScoreDTO::getAgencyId)); + // 根据客户id,查询区/街道 组织名称、id + List parentAgencyList = screenCustomerAgencyDao.selectListAgencyInfo(customerId); String[] orgIds = new String[collect.size()]; int j = 0; for(Map.Entry> communityScore : collect.entrySet()){ @@ -397,9 +408,14 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 当前组织 的上级组织id String parentAgencyId = communityScore.getValue().get(NumConstant.ZERO).getParentAgencyId(); - // 查询 组织名称 - String agencyName = screenCustomerAgencyDao.selectParentAgencyInfo(customerId, communityScore.getKey()); - if (null == agencyName){ + // 获取 组织名称 + String agencyName = ""; + for (ScreenCustomerAgencyEntity agencyScoreDTO : parentAgencyList) { + if (communityScore.getKey().equals(agencyScoreDTO.getAgencyId())) { + agencyName = agencyScoreDTO.getAgencyName(); + } + } + if ("".equals(agencyName)){ throw new RuntimeException("在screen_customer_agency表中未查询到该客户下的组织名称:customerId =" + customerId + ", agencyId = " + communityScore.getKey()); } // 补充表中其他字段 @@ -461,6 +477,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { List monthlyFormDTOList = new ArrayList<>(); // 根据部门id 进行分组,最后组装一条数据 一个部门id 对应 4条数据 Map> collect = deptScoreDTOS.stream().collect(Collectors.groupingBy(DeptScoreDTO::getDeptId)); + List parentDeptList = screenCustomerDeptDao.selectListDeptInfo(customerId); String[] orgIds = new String[collect.size()]; int j = 0; for(Map.Entry> deptScore : collect.entrySet()){ @@ -479,13 +496,20 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { monthlyFormDTO); } // 查询网格的 上级组织id 和 组织名称 - ScreenCustomerDeptEntity parentDeptInfo = screenCustomerDeptDao.selectParentDeptInfo(customerId, deptScore.getKey()); - if (null == parentDeptInfo){ + String parentAgencyId = ""; + String deptName = ""; + for (ScreenCustomerDeptEntity deptEntity : parentDeptList) { + if (deptScore.getKey().equals(deptEntity.getDeptId())) { + parentAgencyId = deptEntity.getParentAgencyId(); + deptName = deptEntity.getDeptName(); + } + } + if ("".equals(parentAgencyId)){ throw new RuntimeException("在screen_customer_dept表中未查询到该客户下的父级信息:customerId =" + customerId + ", deptId = " + deptScore.getKey()); } // 补充表中其他字段 monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, deptScore.getKey(), - parentDeptInfo.getParentAgencyId(), parentDeptInfo.getDeptName(), monthlyFormDTO); + parentAgencyId, deptName, monthlyFormDTO); monthlyFormDTOList.add(monthlyFormDTO); } if (monthlyFormDTOList.size() > NumConstant.ZERO){ @@ -539,6 +563,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { List monthlyFormDTOList = new ArrayList<>(); // 根据组织id(eg:社区或者街道id) 进行分组,最后组装一条数据 一个组织id 对应 4条数据 Map> collect = agencyScoreDTOS.stream().collect(Collectors.groupingBy(AgencyScoreDTO::getAgencyId)); + List parentAgencyList = screenCustomerAgencyDao.selectListAgencyInfo(customerId); String[] orgIds = new String[collect.size()]; int j = 0; for(Map.Entry> agencyScore : collect.entrySet()){ @@ -562,8 +587,13 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { // 当前组织 的上级组织id String parentAgencyId = agencyScore.getValue().get(NumConstant.ZERO).getParentAgencyId(); // 查询 组织名称 - String agencyName = screenCustomerAgencyDao.selectParentAgencyInfo(customerId, agencyScore.getKey()); - if (null == agencyName){ + String agencyName = ""; + for (ScreenCustomerAgencyEntity agencyScoreDTO : parentAgencyList) { + if (agencyScore.getKey().equals(agencyScoreDTO.getAgencyId())) { + agencyName = agencyScoreDTO.getAgencyName(); + } + } + if ("".equals(agencyName)){ throw new RuntimeException("在screen_customer_agency表中未查询到该客户下的组织名称:customerId =" + customerId + ", agencyId = " + agencyScore.getKey()); } // 补充表中其他字段 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index c1479694d4..36ac049262 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -60,17 +60,6 @@ - - + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml index 47ab3d400d..31717d6dd2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerDeptDao.xml @@ -64,17 +64,6 @@ AND m.CUSTOMER_ID =#{customerId} AND m.DEPT_ID =#{deptId} - + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml index a86ec3bec2..c85dc0af60 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml @@ -106,18 +106,6 @@ AND m.GRID_ID = #{gridId} - - + + From a5eb4ea7bf85e7b6248f7c8c12431d8505271f98 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 7 Sep 2020 10:15:36 +0800 Subject: [PATCH 344/360] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=98=8E=E7=BB=86=20?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=80=A7=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/util/Pinyin4jUtil.java | 3 ++- .../evaluationindex/screen/IndexGroupDetailTemplateDao.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java index b3a9ac1760..8d392a2c21 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/util/Pinyin4jUtil.java @@ -29,7 +29,8 @@ public class Pinyin4jUtil { duoyinMap.put('期',new String[]{"qi"}); duoyinMap.put('参',new String[]{"can"}); duoyinMap.put('均',new String[]{"jun"}); - duoyinMap.put('会',new String[]{"hui"}); + duoyinMap.put('会', new String[]{"hui"}); + duoyinMap.put('属', new String[]{"shu"}); } /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailTemplateDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailTemplateDao.xml index df9ec89823..a8e5f55a2e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailTemplateDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailTemplateDao.xml @@ -7,7 +7,7 @@ delete from index_group_detail_template From 1ab0e0c32c36b73bd8da02c1e16f4d33c1668052 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 7 Sep 2020 10:16:36 +0800 Subject: [PATCH 345/360] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=98=8E=E7=BB=86=20?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=80=A7=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/evaluationindex/screen/IndexGroupDetailDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml index 143cdacec1..f099cf7d9a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml @@ -6,7 +6,7 @@ - - \ No newline at end of file From 9794b400ec5182b3386687a1860f0a26d61f1fcf Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 7 Sep 2020 11:13:05 +0800 Subject: [PATCH 348/360] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/constant/OrgTypeConstant.java | 18 ++- .../impl/FactIndexCollectServiceImpl.java | 111 ++++-------------- 2 files changed, 39 insertions(+), 90 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/OrgTypeConstant.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/OrgTypeConstant.java index 95919792d9..7c88be956c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/OrgTypeConstant.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/OrgTypeConstant.java @@ -9,7 +9,7 @@ package com.epmet.constant; /** - * 组织类别 常量 + * 组织类别/机关级别 常量 * * @author sun * @since 1.0.0 @@ -30,4 +30,20 @@ public interface OrgTypeConstant { * 组织 */ String AGENCY = "agency"; + + /** + * 乡(镇、街道)级 + */ + String STREET = "street"; + + /** + * 区县级 + */ + String DISTRICT = "district"; + + /** + * 社区级 + */ + String COMMUNITY = "community"; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index e8d04fea45..6033f97b04 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -702,46 +702,20 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { indexGridScoreDTO.setDelFlag(NumConstant.ZERO_STR); insertIndexGridScoreDTOS.add(indexGridScoreDTO); - FactIndexGridScoreDTO indexGridScoreDTO1 = new FactIndexGridScoreDTO(); + FactIndexGridScoreDTO indexGridScoreDTO1 = ConvertUtils.sourceToTarget(indexGridScoreDTO, FactIndexGridScoreDTO.class); // 赋默认值 - 治理能力 - indexGridScoreDTO1.setGridId(gridDTO.getGridId()); - indexGridScoreDTO1.setAgencyId(gridDTO.getParentAgencyId()); - indexGridScoreDTO1.setAllParentIds(gridDTO.getAllParentIds()); - indexGridScoreDTO1.setQuarterId(DateUtils.getQuarterId(monthId)); - indexGridScoreDTO1.setYearId(getYearStr(monthId)); - indexGridScoreDTO1.setMonthId(monthId); - indexGridScoreDTO1.setIsTotal(NumConstant.ZERO_STR); - indexGridScoreDTO1.setScore(zero); indexGridScoreDTO1.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); - indexGridScoreDTO1.setDelFlag(NumConstant.ZERO_STR); insertIndexGridScoreDTOS.add(indexGridScoreDTO1); - FactIndexGridScoreDTO indexGridScoreDTO2 = new FactIndexGridScoreDTO(); + FactIndexGridScoreDTO indexGridScoreDTO2 = ConvertUtils.sourceToTarget(indexGridScoreDTO, FactIndexGridScoreDTO.class); // 赋默认值 - 服务能力 - indexGridScoreDTO2.setGridId(gridDTO.getGridId()); - indexGridScoreDTO2.setAgencyId(gridDTO.getParentAgencyId()); - indexGridScoreDTO2.setAllParentIds(gridDTO.getAllParentIds()); - indexGridScoreDTO2.setQuarterId(DateUtils.getQuarterId(monthId)); - indexGridScoreDTO2.setYearId(getYearStr(monthId)); - indexGridScoreDTO2.setMonthId(monthId); - indexGridScoreDTO2.setIsTotal(NumConstant.ZERO_STR); - indexGridScoreDTO2.setScore(zero); indexGridScoreDTO2.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); - indexGridScoreDTO2.setDelFlag(NumConstant.ZERO_STR); insertIndexGridScoreDTOS.add(indexGridScoreDTO2); - FactIndexGridScoreDTO indexGridScoreDTO3 = new FactIndexGridScoreDTO(); - // 赋默认值 - 网格相关 - indexGridScoreDTO3.setGridId(gridDTO.getGridId()); - indexGridScoreDTO3.setAgencyId(gridDTO.getParentAgencyId()); - indexGridScoreDTO3.setAllParentIds(gridDTO.getAllParentIds()); - indexGridScoreDTO3.setQuarterId(DateUtils.getQuarterId(monthId)); - indexGridScoreDTO3.setYearId(getYearStr(monthId)); - indexGridScoreDTO3.setMonthId(monthId); + FactIndexGridScoreDTO indexGridScoreDTO3 = ConvertUtils.sourceToTarget(indexGridScoreDTO, FactIndexGridScoreDTO.class); indexGridScoreDTO3.setIsTotal(NumConstant.ONE_STR); - indexGridScoreDTO3.setScore(zero); + // 赋默认值 - 网格相关 indexGridScoreDTO3.setIndexCode(IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); - indexGridScoreDTO3.setDelFlag(NumConstant.ZERO_STR); insertIndexGridScoreDTOS.add(indexGridScoreDTO3); } factIndexGridScoreDao.batchInsertGridScoreData(insertIndexGridScoreDTOS, customerId); @@ -775,39 +749,19 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { communityScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); insertIndexCommunityScore.add(communityScore1); - FactIndexCommunityScoreEntity communityScore2 = new FactIndexCommunityScoreEntity(); // 赋默认值 - 治理能力 - communityScore2.setAgencyId(agencyDTO.getAgencyId()); - communityScore2.setParentAgencyId(agencyDTO.getPid()); - communityScore2.setQuarterId(DateUtils.getQuarterId(monthId)); - communityScore2.setYearId(getYearStr(monthId)); - communityScore2.setMonthId(monthId); - communityScore2.setIsTotal(NumConstant.ZERO_STR); - communityScore2.setScore(zero); + FactIndexCommunityScoreEntity communityScore2 = ConvertUtils.sourceToTarget(communityScore1, FactIndexCommunityScoreEntity.class); communityScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); insertIndexCommunityScore.add(communityScore2); - FactIndexCommunityScoreEntity communityScore3 = new FactIndexCommunityScoreEntity(); // 赋默认值 - 服务能力 - communityScore3.setAgencyId(agencyDTO.getAgencyId()); - communityScore3.setParentAgencyId(agencyDTO.getPid()); - communityScore3.setQuarterId(DateUtils.getQuarterId(monthId)); - communityScore3.setYearId(getYearStr(monthId)); - communityScore3.setMonthId(monthId); - communityScore3.setIsTotal(NumConstant.ZERO_STR); - communityScore3.setScore(zero); + FactIndexCommunityScoreEntity communityScore3 = ConvertUtils.sourceToTarget(communityScore1, FactIndexCommunityScoreEntity.class); communityScore3.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); insertIndexCommunityScore.add(communityScore3); - FactIndexCommunityScoreEntity communityScore4 = new FactIndexCommunityScoreEntity(); // 赋默认值 - 社区相关 - communityScore4.setAgencyId(agencyDTO.getAgencyId()); - communityScore4.setParentAgencyId(agencyDTO.getPid()); - communityScore4.setQuarterId(DateUtils.getQuarterId(monthId)); - communityScore4.setYearId(getYearStr(monthId)); - communityScore4.setMonthId(monthId); + FactIndexCommunityScoreEntity communityScore4 = ConvertUtils.sourceToTarget(communityScore1, FactIndexCommunityScoreEntity.class); communityScore4.setIsTotal(NumConstant.ONE_STR); - communityScore4.setScore(zero); communityScore4.setIndexCode(IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); insertIndexCommunityScore.add(communityScore4); } @@ -858,8 +812,8 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { BigDecimal zero = new BigDecimal(NumConstant.ZERO); List insertIndexAgencyScore = new ArrayList<>(); for (ScreenCustomerAgencyEntity agencyDTO : mismatchAgencyList){ - if ("community".equals(agencyDTO.getLevel()) || "street".equals(agencyDTO.getLevel()) - || "district".equals(agencyDTO.getLevel())){ + if (OrgTypeConstant.COMMUNITY.equals(agencyDTO.getLevel()) || OrgTypeConstant.STREET.equals(agencyDTO.getLevel()) + || OrgTypeConstant.DISTRICT.equals(agencyDTO.getLevel())){ AgencyScoreEntity agencyScore1 = new AgencyScoreEntity(); // 赋默认值 - 党建能力指数 agencyScore1.setAgencyId(agencyDTO.getAgencyId()); @@ -873,51 +827,30 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { agencyScore1.setScore(zero); agencyScore1.setIndexCode(IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); - AgencyScoreEntity agencyScore2 = new AgencyScoreEntity(); + AgencyScoreEntity agencyScore2 = ConvertUtils.sourceToTarget(agencyScore1, AgencyScoreEntity.class); // 赋默认值 - 治理能力 - agencyScore2.setAgencyId(agencyDTO.getAgencyId()); - agencyScore2.setParentAgencyId(agencyDTO.getPid()); - //季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 - agencyScore2.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore2.setYearId(getYearStr(monthId)); - agencyScore2.setMonthId(monthId); - agencyScore2.setIsTotal(NumConstant.ZERO_STR); - agencyScore2.setScore(zero); agencyScore2.setIndexCode(IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); - AgencyScoreEntity agencyScore3 = new AgencyScoreEntity(); + AgencyScoreEntity agencyScore3 = ConvertUtils.sourceToTarget(agencyScore1, AgencyScoreEntity.class); // 赋默认值 - 服务能力 - agencyScore3.setAgencyId(agencyDTO.getAgencyId()); - agencyScore3.setParentAgencyId(agencyDTO.getPid()); - agencyScore3.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore3.setYearId(getYearStr(monthId)); - agencyScore3.setMonthId(monthId); - agencyScore3.setIsTotal(NumConstant.ZERO_STR); - agencyScore3.setScore(zero); agencyScore3.setIndexCode(IndexCodeEnum.FU_WU_NENG_LI.getCode()); - AgencyScoreEntity agencyScore4 = new AgencyScoreEntity(); - agencyScore4.setAgencyId(agencyDTO.getAgencyId()); - agencyScore4.setParentAgencyId(agencyDTO.getPid()); - agencyScore4.setQuarterId(DateUtils.getQuarterId(monthId)); - agencyScore4.setYearId(getYearStr(monthId)); - agencyScore4.setMonthId(monthId); + AgencyScoreEntity agencyScore4 = ConvertUtils.sourceToTarget(agencyScore1, AgencyScoreEntity.class); agencyScore4.setIsTotal(NumConstant.ONE_STR); - agencyScore4.setScore(zero); - if ("community".equals(agencyDTO.getLevel())){ + if (OrgTypeConstant.COMMUNITY.equals(agencyDTO.getLevel())){ // 赋默认值 - 全区相关 agencyScore4.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode()); - agencyScore4.setDataType("district"); - agencyScore1.setDataType("district"); - agencyScore2.setDataType("district"); - agencyScore3.setDataType("district"); - } else if ("street".equals(agencyDTO.getLevel()) || "district".equals(agencyDTO.getLevel())){ + agencyScore4.setDataType(OrgTypeConstant.DISTRICT); + agencyScore1.setDataType(OrgTypeConstant.DISTRICT); + agencyScore2.setDataType(OrgTypeConstant.DISTRICT); + agencyScore3.setDataType(OrgTypeConstant.DISTRICT); + } else if (OrgTypeConstant.STREET.equals(agencyDTO.getLevel()) || OrgTypeConstant.DISTRICT.equals(agencyDTO.getLevel())){ // 赋默认值 - 街道相关 agencyScore4.setIndexCode(IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode()); - agencyScore4.setDataType("street"); - agencyScore1.setDataType("street"); - agencyScore2.setDataType("street"); - agencyScore3.setDataType("street"); + agencyScore4.setDataType(OrgTypeConstant.STREET); + agencyScore1.setDataType(OrgTypeConstant.STREET); + agencyScore2.setDataType(OrgTypeConstant.STREET); + agencyScore3.setDataType(OrgTypeConstant.STREET); } insertIndexAgencyScore.add(agencyScore1); insertIndexAgencyScore.add(agencyScore2); From 37e731a9f6716592ec7380551ce36765ca789be7 Mon Sep 17 00:00:00 2001 From: wangchao Date: Mon, 7 Sep 2020 13:25:29 +0800 Subject: [PATCH 349/360] =?UTF-8?q?user=20=20=20=20ext=20=20=20=20=20dev?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/epmet-ext/epmet-ext-server/pom.xml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-prod.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml index 5a11859c4a..709b384c7a 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-ext-server: container_name: epmet-ext-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-ext-server:0.0.6 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-ext-server:0.0.7 ports: - "8113:8113" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-ext/epmet-ext-server/pom.xml b/epmet-module/epmet-ext/epmet-ext-server/pom.xml index 771990a0f1..7fe0198686 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/pom.xml +++ b/epmet-module/epmet-ext/epmet-ext-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.6 + 0.0.7 com.epmet diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml index 0f080c990f..4f7e1eb69f 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.122 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.123 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index b7c301d01b..e9a5b6c5a7 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.122 + 0.3.123 com.epmet epmet-user From 0a9196025a3e7d09297c885a98bd3660895701d2 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Mon, 7 Sep 2020 13:57:09 +0800 Subject: [PATCH 350/360] =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/impl/FactIndexCollectServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 6033f97b04..2d6a2c48ed 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -419,7 +419,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { throw new RuntimeException("在screen_customer_agency表中未查询到该客户下的组织名称:customerId =" + customerId + ", agencyId = " + communityScore.getKey()); } // 补充表中其他字段 - monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, communityScore.getKey(), + monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.AGENCY, communityScore.getKey(), parentAgencyId, agencyName, monthlyFormDTO); // 补充表中其他字段 monthlyFormDTOList.add(monthlyFormDTO); @@ -508,7 +508,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { throw new RuntimeException("在screen_customer_dept表中未查询到该客户下的父级信息:customerId =" + customerId + ", deptId = " + deptScore.getKey()); } // 补充表中其他字段 - monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, deptScore.getKey(), + monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.DEPARTMENT, deptScore.getKey(), parentAgencyId, deptName, monthlyFormDTO); monthlyFormDTOList.add(monthlyFormDTO); } @@ -597,7 +597,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { throw new RuntimeException("在screen_customer_agency表中未查询到该客户下的组织名称:customerId =" + customerId + ", agencyId = " + agencyScore.getKey()); } // 补充表中其他字段 - monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, agencyScore.getKey(), + monthlyFormDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.AGENCY, agencyScore.getKey(), parentAgencyId, agencyName, monthlyFormDTO); monthlyFormDTOList.add(monthlyFormDTO); } From de648c295f8cc16713ece69f834572f64df016d7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 7 Sep 2020 14:20:06 +0800 Subject: [PATCH 351/360] =?UTF-8?q?=E5=8C=BA=E7=9B=B4selectExtremeValue=20?= =?UTF-8?q?sql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml index 3039ac9eed..67165f1bf7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.xml @@ -101,7 +101,7 @@ MAX(m.TRANSFERED_COUNT) as TRANSFERED_COUNT_MAX, MIN(m.CLOSED_PROJECT_COUNT) as CLOSED_PROJECT_COUNT_MIN, MAX(m.CLOSED_PROJECT_COUNT) as CLOSED_PROJECT_COUNT_MAX, - MIN(m.RESP_PROJECT_RATIO) as RESP_PROJECT_RATIO_MIN_MAX, + MIN(m.RESP_PROJECT_RATIO) as RESP_PROJECT_RATIO_MIN, MAX(m.RESP_PROJECT_RATIO) as RESP_PROJECT_RATIO_MAX, MIN(m.HANDLE_PROJECT_RATIO) as HANDLE_PROJECT_RATIO_MIN, MAX(m.HANDLE_PROJECT_RATIO) as HANDLE_PROJECT_RATIO_MAX, From a3022879d3ec24373b405f46c061f769b457e2a8 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 7 Sep 2020 14:34:47 +0800 Subject: [PATCH 352/360] =?UTF-8?q?=E5=8C=BA=E7=9B=B4selectExtremeValue=20?= =?UTF-8?q?sql=E4=BF=AE=E6=94=B9v2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/evaluationindex/indexcal/DeptScoreDao.java | 10 ++++++++++ .../indexcal/impl/DeptScoreServiceImpl.java | 3 ++- .../mapper/evaluationindex/indexcal/DeptScoreDao.xml | 6 ++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java index 8a13b7a0ff..4be461b59a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -77,4 +77,14 @@ public interface DeptScoreDao extends BaseDao { */ List selectGovernDeptScoreAvg(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + /** + * @return int + * @param customerId + * @param monthId + * @param deptId + * @author yinzuomei + * @description + * @Date 2020/9/7 14:30 + **/ + int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, @Param("monthId")String monthId,@Param("deptId") String deptId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index 52ea21e80a..959f3caa64 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -152,7 +152,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl { if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 - String sampleValueStr = (String) recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key)); + String sampleValueStr =String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.DEPT_ID), new BigDecimal(sampleValueStr)); indexInputVO.getIndexValueVOs().add(currentGridIndexValue); @@ -194,6 +194,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl + + + delete from fact_index_dept_score where CUSTOMER_ID = #{customerId} + AND MONTH_ID = #{monthId} + and DEPT_ID=#{deptId} + From ea046f3dd10f63b5218db0fc4d98a61ab0129334 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 7 Sep 2020 14:52:11 +0800 Subject: [PATCH 353/360] =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=86=85=E5=85=9A?= =?UTF-8?q?=E5=91=98=E7=9A=84=E5=8F=82=E4=B8=8E=E8=AE=AE=E4=BA=8B=E8=83=BD?= =?UTF-8?q?=E5=8A=9B=E8=80=83=E8=AF=84=E5=88=86=EF=BC=88=E5=B9=B3=E5=9D=87?= =?UTF-8?q?=E5=80=BC=EF=BC=89index=5Fcode=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/eum/IndexCodeEnum.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index cc29f12a95..a49d1a1e13 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -24,7 +24,7 @@ public enum IndexCodeEnum { DANG_WU_HUO_DONG("dangwuhuodong", "党务活动", 4), LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), - ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydsyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), + ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydcyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz","下属所有网格的党建能力(平均值)",5), SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz","社区下属所有网格治理能力汇总(平均值)",5), SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz","社区下级所有网格服务能力得分(平均值) ",5), From fee35235828f032a99228218e5587650201a414b Mon Sep 17 00:00:00 2001 From: wxz Date: Mon, 7 Sep 2020 14:57:21 +0800 Subject: [PATCH 354/360] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resi-mine/resi-mine-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/resi-mine/resi-mine-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml index e59f895806..3c154c7eec 100644 --- a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml +++ b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-mine-server: container_name: resi-mine-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-mine-server:0.3.39 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/resi-mine-server:0.3.40 ports: - "8094:8094" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-mine/resi-mine-server/pom.xml b/epmet-module/resi-mine/resi-mine-server/pom.xml index 31ec3b085d..a5087a808c 100644 --- a/epmet-module/resi-mine/resi-mine-server/pom.xml +++ b/epmet-module/resi-mine/resi-mine-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.39 + 0.3.40 com.epmet resi-mine From 3635f202625fd9c10303576a80f0197682916cfa Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 7 Sep 2020 16:16:16 +0800 Subject: [PATCH 355/360] =?UTF-8?q?=E6=8C=87=E6=A0=87=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/DemoController.java | 18 +++++++++ .../impl/IndexCalculateServiceImpl.java | 38 +++++++++++++++++-- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 397d99df7a..ca5c66b5d6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -462,4 +462,22 @@ public class DemoController { String monthId = "202008"; indexCalculateDistrictService.calDistrictAll(customerId,monthId); } + @PostMapping("gridZxc") + public void getGrid(){ + String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + String monthId = "202008"; + CalculateCommonFormDTO c = new CalculateCommonFormDTO(); + c.setCustomerId(customerId); + c.setMonthId(monthId); + gridCorreLationService.calculateGridCorreLation(c); + } + @PostMapping("deptZxc") + public void getDept(){ + String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; + String monthId = "202008"; + CalculateCommonFormDTO c = new CalculateCommonFormDTO(); + c.setCustomerId(customerId); + c.setMonthId(monthId); + deptScoreService.calculateDeptCorreLation(c); + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java index f305df99e2..9385c1f121 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java @@ -9,10 +9,7 @@ import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.redis.IndexCodeFieldReRedis; -import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; -import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; -import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; -import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -41,6 +38,12 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { private IndexCodeFieldReRedis indexCodeFieldReRedis; @Autowired private IndexCalculateCommunityService indexCalculateCommunityService; + @Autowired + private IndexCalculateStreetService indexCalculateStreetService; + @Autowired + private IndexCalculateDistrictService indexCalculateDistrictService; + @Autowired + private DeptScoreService deptScoreService; @Override public Boolean indexCalculate(IndexCalculateForm formDTO) { @@ -87,6 +90,33 @@ public class IndexCalculateServiceImpl implements IndexCalculateService { log.error("indexCalculate calAll exception", e); break; } + + //计算街道 + try { + indexCalculateStreetService.calStreetAll(customerId,formDTO.getMonthId()); + log.info("indexCalculate calAll return result:{}", flag); + } catch (Exception e) { + log.error("indexCalculate calAll exception", e); + break; + } + + //计算区直属 + try { + deptScoreService.calculateDeptCorreLation(calculateCommonFormDTO); + log.info("indexCalculate calAll return result:{}", flag); + } catch (Exception e) { + log.error("indexCalculate calAll exception", e); + break; + } + + //计算全区 + try { + indexCalculateDistrictService.calDistrictAll(customerId,formDTO.getMonthId()); + log.info("indexCalculate calAll return result:{}", flag); + } catch (Exception e) { + log.error("indexCalculate calAll exception", e); + break; + } } return flag; } catch (Exception e) { From 7d0166487ecc43c7645adca9c287019e62e83231 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 7 Sep 2020 16:37:55 +0800 Subject: [PATCH 356/360] test --- .../main/java/com/epmet/controller/DemoController.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 397d99df7a..5fe7a00dfa 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -1,8 +1,10 @@ package com.epmet.controller; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; @@ -167,7 +169,7 @@ public class DemoController { // deptScoreService.calculateDeptCorreLation(formDTO); return new Result(); } - + @DataSource(DataSourceConstant.EVALUATION_INDEX) @PostMapping("insertgridinfo") public Result insertScreenCustomerGrid(){ ScreenCustomerGridEntity entity1=new ScreenCustomerGridEntity(); @@ -205,6 +207,7 @@ public class DemoController { return new Result(); } + @DataSource(DataSourceConstant.EVALUATION_INDEX) @PostMapping("inserttestdata") public Result test(){ //网格相关-党建能力 @@ -253,7 +256,7 @@ public class DemoController { entity1.setPartyAvgShiftProjectCount(50); //网格党员人均提出的议题转项目数 entity1.setUserAvgShiftProjectCount(50); //网格群众人均提出的议题转项目数 entity1.setCreateGroupPartyCount(35); //建群党员数(累计值) 去重 - entity1.setPublishArticleCount(35); //网格发文数 + entity1.setPublishArticleCount(50); //网格发文数 entity1.setIssueToProjectRatio(new BigDecimal("50")); //网格议题转项目率 entity1.setCreateThreeMeetsCount(10); //组织三会一课次数 entity1.setJoinThreeMeetsCount(30); //党员参加三会一课人次 @@ -284,7 +287,7 @@ public class DemoController { entity2.setCreateGroupPartyCount(30); //建群党员数(累计值) 去重 entity2.setPublishArticleCount(30); //网格发文数 entity2.setIssueToProjectRatio(new BigDecimal("30")); //网格议题转项目率 - entity2.setCreateThreeMeetsCount(25); //组织三会一课次数 + entity2.setCreateThreeMeetsCount(35); //组织三会一课次数 entity2.setJoinThreeMeetsCount(20); //党员参加三会一课人次 entity2.setCreatedBy(IndexCalConstant.insertUser); From 7d1af6c75801ee8271006b3de0839f8ed09491cd Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 7 Sep 2020 18:17:53 +0800 Subject: [PATCH 357/360] =?UTF-8?q?=E9=83=A8=E7=BD=B2statis=20report=20use?= =?UTF-8?q?r=20ext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-report-server/deploy/docker-compose-prod.yml | 2 +- .../data-report-server/deploy/docker-compose-test.yml | 2 +- .../data-statistical-server/deploy/docker-compose-prod.yml | 2 +- .../data-statistical-server/deploy/docker-compose-test.yml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-prod.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml index ad6ed50dc2..8fdb335fda 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-report-server:0.3.27 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-report-server:0.3.36 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml b/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml index 9a3f62f01c..78d38da205 100644 --- a/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml +++ b/epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-report-server: container_name: data-report-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/data-report-server:0.3.27 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/data-report-server:0.3.36 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml index 029e37c343..1fe39907b7 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-statistical-server:0.3.42 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-statistical-server:0.3.47 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml index 2e5a7af0e8..075a43a0af 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/data-statistical-server:0.3.42 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/data-statistical-server:0.3.47 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml index 4f7e1eb69f..183968322f 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.123 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-user-server:0.3.124 ports: - "8087:8087" network_mode: host # 不会创建新的网络 From ed542f696fad7d5fd544b399d8b3dc4848409b70 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 7 Sep 2020 18:26:16 +0800 Subject: [PATCH 358/360] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/commons/tools/aspect/CustomerApplicationRunner.java | 1 + .../resources/db/migration/V0.0.2__dim_ag_add_col_type.sql | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java index b1bfe5d08e..8e065c792a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/aspect/CustomerApplicationRunner.java @@ -40,6 +40,7 @@ public class CustomerApplicationRunner implements ApplicationRunner { public void run(ApplicationArguments args) { //发送启动成功消息 EnvEnum currentEnv = EnvEnum.getCurrentEnv(); + logger.info(currentEnv); if (!EnvEnum.DEV.getCode().equals(currentEnv.getCode())) { InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); String serverIp = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.2__dim_ag_add_col_type.sql b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.2__dim_ag_add_col_type.sql index 9f1554015e..541d0d7307 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.2__dim_ag_add_col_type.sql +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.2__dim_ag_add_col_type.sql @@ -1 +1,2 @@ -ALTER TABLE dim_agency ADD COLUMN AGENCY_DIM_TYPE VARCHAR(10) NOT NULL COMMENT '机关维度类型。self:机关本身自己,all:机关自己+下级+网格+部门等'; \ No newline at end of file +/*ALTER TABLE dim_agency ADD COLUMN AGENCY_DIM_TYPE VARCHAR(10) NOT NULL COMMENT '机关维度类型。self:机关本身自己,all:机关自己+下级+网格+部门等';*/ +select 1; \ No newline at end of file From 79691f6f442619e6faf3f580c731cc4bbbc22f77 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 7 Sep 2020 18:27:56 +0800 Subject: [PATCH 359/360] =?UTF-8?q?=E9=83=A8=E7=BD=B2reposrt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-statistical-server/deploy/docker-compose-dev.yml | 2 +- .../data-statistical-server/deploy/docker-compose-prod.yml | 2 +- epmet-module/data-statistical/data-statistical-server/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml index dd615ce5f1..36afabff51 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.47 + image: 192.168.1.130:10080/epmet-cloud-dev/data-statistical-server:0.3.48 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml index 1fe39907b7..b62847d615 100644 --- a/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml +++ b/epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml @@ -2,7 +2,7 @@ version: "3.7" services: data-statistical-server: container_name: data-statistical-server-prod - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-statistical-server:0.3.47 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-statistical-server:0.3.48 ports: - "8108:8108" network_mode: host # 使用现有网络 diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 8a32ee8d75..57200bf62b 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.47 + 0.3.48 data-statistical com.epmet From ab7314466f38503a842d701cf2956a6523fb3736 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 9 Sep 2020 14:44:30 +0800 Subject: [PATCH 360/360] =?UTF-8?q?pom=E6=96=87=E4=BB=B6=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?local=E9=85=8D=E7=BD=AE=EF=BC=8C=E7=94=A8=E4=BA=8E=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E6=9C=BA=E5=99=A8=E8=B0=83=E8=AF=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-admin/epmet-admin-server/pom.xml | 36 +++++- epmet-auth/pom.xml | 43 ++++++- epmet-gateway/pom.xml | 119 +++++++++++++++++- .../data-report/data-report-server/pom.xml | 55 +++++++- .../data-statistical-server/pom.xml | 99 ++++++++++++++- .../epmet-activiti-server/pom.xml | 31 ++++- .../common-service-server/pom.xml | 42 ++++++- .../epmet-ext/epmet-ext-server/pom.xml | 33 ++++- .../epmet-heart/epmet-heart-server/pom.xml | 42 ++++++- .../epmet-job/epmet-job-server/pom.xml | 36 +++++- .../epmet-message-server/pom.xml | 33 ++++- .../epmet-oss/epmet-oss-server/pom.xml | 33 ++++- .../epmet-point/epmet-point-server/pom.xml | 36 +++++- .../epmet-third/epmet-third-server/pom.xml | 33 ++++- .../gov-access/gov-access-server/pom.xml | 34 ++++- epmet-module/gov-grid/gov-grid-server/pom.xml | 27 +++- .../gov-issue/gov-issue-server/pom.xml | 38 +++++- epmet-module/gov-mine/gov-mine-server/pom.xml | 25 +++- epmet-module/gov-org/gov-org-server/pom.xml | 33 ++++- .../gov-project/gov-project-server/pom.xml | 34 ++++- .../gov-voice/gov-voice-server/pom.xml | 34 ++++- .../oper-access/oper-access-server/pom.xml | 33 ++++- epmet-module/oper-crm/oper-crm-server/pom.xml | 33 ++++- .../oper-customize-server/pom.xml | 33 ++++- .../resi-group/resi-group-server/pom.xml | 34 ++++- .../resi-guide/resi-guide-server/pom.xml | 33 ++++- .../resi-hall/resi-hall-server/pom.xml | 27 +++- .../resi-home/resi-home-server/pom.xml | 25 +++- .../resi-mine/resi-mine-server/pom.xml | 24 +++- .../resi-partymember-server/pom.xml | 33 ++++- .../resi-voice/resi-voice-server/pom.xml | 25 +++- epmet-openapi/epmet-openapi-scan/pom.xml | 27 +++- epmet-user/epmet-user-server/pom.xml | 33 ++++- 33 files changed, 1179 insertions(+), 77 deletions(-) diff --git a/epmet-admin/epmet-admin-server/pom.xml b/epmet-admin/epmet-admin-server/pom.xml index 9058e3065d..df371df8a9 100644 --- a/epmet-admin/epmet-admin-server/pom.xml +++ b/epmet-admin/epmet-admin-server/pom.xml @@ -84,12 +84,41 @@ dev + + 8082 + dev + + + + + + epmet_admin_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8082 - dev + local @@ -103,7 +132,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 @@ -116,9 +145,6 @@ test - 8082 test diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index aaff93a013..7a7fcd5f9c 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -156,9 +156,6 @@ dev - - true - 8081 dev @@ -192,12 +189,46 @@ e5e72147737cfeb2b0f3a43624cadb3f--> + + local + + true + + + 8081 + local + + + 0 + 192.168.1.130 + 6379 + 123456 + + false + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + wxcb6ce2ed0c5ae54c + c7f74941ee97fa9b2e1065772d34c397 + 12345678Yzm + jiKrJoPQsUIP9ayAwmuJQeAVPBjFOh5D1JxFDd7ZSU3 + + wx07674c23af51b521 + a2fd0d29b007cbbcf8c8dda8c693d99b + + wx3d1372029eb816a3 + 651f02d71ed3f123dfb584b8bf0f4d8b + + + test - 8081 test diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml index 66279bb8ad..e64e3f45c3 100644 --- a/epmet-gateway/pom.xml +++ b/epmet-gateway/pom.xml @@ -87,9 +87,6 @@ dev - - true - 8080 @@ -201,6 +198,122 @@ + + local + + true + + + 8080 + + + 0 + 192.168.1.130 + 6379 + 123456 + + false + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + + + lb://epmet-auth-server + + lb://epmet-admin-server + + lb://epmet-oss-server + + lb://epmet-message-server + + lb://epmet-activiti-server + + lb://epmet-job-server + + + + lb://epmet-user-server + + lb://epmet-demo-server + + lb://oper-customize-server + + lb://oper-crm-server + + + lb://resi-guide-server + + + lb://gov-org-server + + + lb://oper-access-server + + + lb://resi-mine-server + + + lb://resi-group-server + + + lb://resi-partymember-server + + + lb://gov-grid-server + + + lb://gov-access-server + + + + lb://gov-mine-server + + lb://resi-hall-server + + + lb://gov-issue-server + + + lb://gov-project-server + + lb://common-service-server + + lb://resi-home-server + + + lb://gov-voice-server + + + lb://resi-voice-server + + + lb://data-report-server + + + lb://data-statistical-server + + + lb://epmet-openapi-scan + + + lb://epmet-third-server + + + + lb://epmet-heart-server + + + lb://epmet-point-server + + + lb://epmet-ext-server + + + test + + + + 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 + + test + + + + epmet_data_statistical_user + EpmEt-db-UsEr + + + + + epmet_gov_org_user + EpmEt-db-UsEr + + + + + epmet_gov_issue_user + EpmEt-db-UsEr + + + + + epmet_gov_project_user + EpmEt-db-UsEr + + + + + epmet_gov_voice_user + EpmEt-db-UsEr + + + + + epmet_oper_crm_user + EpmEt-db-UsEr + + + + + epmet_resi_group_user + EpmEt-db-UsEr + + + + + epmet_user_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 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + + false + + + 5 + 8 + 10 + 30 + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + + + + local true 8108 - dev + local @@ -201,7 +296,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/epmet-activiti/epmet-activiti-server/pom.xml b/epmet-module/epmet-activiti/epmet-activiti-server/pom.xml index 5a4cf59cab..06d167aab2 100644 --- a/epmet-module/epmet-activiti/epmet-activiti-server/pom.xml +++ b/epmet-module/epmet-activiti/epmet-activiti-server/pom.xml @@ -158,12 +158,41 @@ dev + + 8086 + dev + + + + + + epmet_activiti_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + false + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8086 - dev + local diff --git a/epmet-module/epmet-common-service/common-service-server/pom.xml b/epmet-module/epmet-common-service/common-service-server/pom.xml index 169304d350..3988353e35 100644 --- a/epmet-module/epmet-common-service/common-service-server/pom.xml +++ b/epmet-module/epmet-common-service/common-service-server/pom.xml @@ -92,9 +92,6 @@ dev - - true - 8103 dev @@ -129,6 +126,45 @@ 52d9d9b0e7d0eb5b8b81c205b579e07c + + local + + true + + + 8103 + local + + + + + + + + epmet_common_service_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://epmet-dev.elinkservice.cn/estos/ + producerService/producer/sendMsg + 202007161443499985fa2d397436d10356542134c8f008c48 + 52d9d9b0e7d0eb5b8b81c205b579e07c + + test + + + + epmet_third_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8113 - dev + local @@ -191,7 +220,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index 5b963aa293..202bc6a9d7 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -110,12 +110,50 @@ dev + + 8111 + dev + + + + + + epmet_heart_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + https://epmet-dev.elinkservice.cn/api/epmetscan/api + + https://epmet-dev.elinkservice.cn/estos/ + producerService/producer/sendMsg + 202007161443499985fa2d397436d10356542134c8f008c48 + 52d9d9b0e7d0eb5b8b81c205b579e07c + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + + + + local true 8111 - dev + local @@ -129,7 +167,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/epmet-job/epmet-job-server/pom.xml b/epmet-module/epmet-job/epmet-job-server/pom.xml index 3b0c5fcbf5..eddc655426 100644 --- a/epmet-module/epmet-job/epmet-job-server/pom.xml +++ b/epmet-module/epmet-job/epmet-job-server/pom.xml @@ -107,12 +107,44 @@ dev + + 8084 + dev + + + + + + epmet_job_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + + + + local true 8084 - dev + local @@ -126,7 +158,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/epmet-message/epmet-message-server/pom.xml b/epmet-module/epmet-message/epmet-message-server/pom.xml index deea95460a..1322ad2243 100644 --- a/epmet-module/epmet-message/epmet-message-server/pom.xml +++ b/epmet-module/epmet-message/epmet-message-server/pom.xml @@ -124,12 +124,41 @@ dev + + 8085 + dev + + + + + + epmet_message_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8085 - dev + local @@ -143,7 +172,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/epmet-oss/epmet-oss-server/pom.xml b/epmet-module/epmet-oss/epmet-oss-server/pom.xml index 8fc5bc1d67..b73264233b 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/pom.xml +++ b/epmet-module/epmet-oss/epmet-oss-server/pom.xml @@ -120,12 +120,41 @@ dev + + 8083 + dev + + + + + + epmet_oss_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8083 - dev + local @@ -139,7 +168,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/epmet-point/epmet-point-server/pom.xml b/epmet-module/epmet-point/epmet-point-server/pom.xml index c67cf5c997..f0add3faf1 100644 --- a/epmet-module/epmet-point/epmet-point-server/pom.xml +++ b/epmet-module/epmet-point/epmet-point-server/pom.xml @@ -115,12 +115,44 @@ dev + + 8112 + dev + + + + + + epmet_point_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + + + + local true 8112 - dev + local @@ -134,7 +166,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 6942418f11..f85185fb9b 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -183,12 +183,41 @@ dev + + 8110 + dev + + + + + + epmet_third_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8110 - dev + local @@ -202,7 +231,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml index 5d4189286a..9c0b30d5c1 100644 --- a/epmet-module/gov-access/gov-access-server/pom.xml +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -101,12 +101,42 @@ dev + + 8099 + dev + + + + + + epmet_gov_access_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + + false + + + + local true 8099 - dev + local @@ -120,7 +150,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/gov-grid/gov-grid-server/pom.xml b/epmet-module/gov-grid/gov-grid-server/pom.xml index c5bf66fd08..494a417395 100644 --- a/epmet-module/gov-grid/gov-grid-server/pom.xml +++ b/epmet-module/gov-grid/gov-grid-server/pom.xml @@ -93,12 +93,35 @@ dev + + 8097 + dev + + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8097 - dev + local 0 @@ -106,7 +129,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/gov-issue/gov-issue-server/pom.xml b/epmet-module/gov-issue/gov-issue-server/pom.xml index a90b43312d..93d9f0334c 100644 --- a/epmet-module/gov-issue/gov-issue-server/pom.xml +++ b/epmet-module/gov-issue/gov-issue-server/pom.xml @@ -119,12 +119,46 @@ dev + + 8101 + dev + + + + + + epmet_gov_issue_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c + SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19 + + + + local true 8101 - dev + local @@ -138,7 +172,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/gov-mine/gov-mine-server/pom.xml b/epmet-module/gov-mine/gov-mine-server/pom.xml index 073cf96190..54f3b8e225 100644 --- a/epmet-module/gov-mine/gov-mine-server/pom.xml +++ b/epmet-module/gov-mine/gov-mine-server/pom.xml @@ -119,12 +119,33 @@ dev + + 8098 + dev + + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + + + local true 8098 - dev + local 0 @@ -132,7 +153,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index f7e38a8870..94f959ad2b 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -125,12 +125,41 @@ dev + + 8092 + dev + + + + + + epmet_gov_org_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8092 - dev + local @@ -144,7 +173,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index 163ea7921d..2c45f4a53f 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -119,12 +119,42 @@ dev + + 8102 + dev + + + + + + epmet_gov_project_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + + local true 8102 - dev + local @@ -138,7 +168,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml index 17268c4fe4..1c80814b41 100644 --- a/epmet-module/gov-voice/gov-voice-server/pom.xml +++ b/epmet-module/gov-voice/gov-voice-server/pom.xml @@ -106,12 +106,42 @@ dev + + 8105 + dev + + + + + + epmet_gov_voice_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + + local true 8105 - dev + local @@ -125,7 +155,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/oper-access/oper-access-server/pom.xml b/epmet-module/oper-access/oper-access-server/pom.xml index e5c20ef1be..f78794d104 100644 --- a/epmet-module/oper-access/oper-access-server/pom.xml +++ b/epmet-module/oper-access/oper-access-server/pom.xml @@ -94,12 +94,41 @@ dev + + 8093 + dev + + + + + + epmet_oper_access_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8093 - dev + local @@ -113,7 +142,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/oper-crm/oper-crm-server/pom.xml b/epmet-module/oper-crm/oper-crm-server/pom.xml index b675bc8c4a..8535f16485 100644 --- a/epmet-module/oper-crm/oper-crm-server/pom.xml +++ b/epmet-module/oper-crm/oper-crm-server/pom.xml @@ -115,12 +115,41 @@ dev + + 8090 + dev + + + + + + epmet_oper_crm_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8090 - dev + local @@ -134,7 +163,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/oper-customize/oper-customize-server/pom.xml b/epmet-module/oper-customize/oper-customize-server/pom.xml index 1257fbf218..ff5abc3d03 100644 --- a/epmet-module/oper-customize/oper-customize-server/pom.xml +++ b/epmet-module/oper-customize/oper-customize-server/pom.xml @@ -92,12 +92,41 @@ dev + + 8089 + dev + + + + + + epmet_oper_customize_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8089 - dev + local @@ -111,7 +140,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/resi-group/resi-group-server/pom.xml b/epmet-module/resi-group/resi-group-server/pom.xml index c07b96ad77..9cf3e5ec43 100644 --- a/epmet-module/resi-group/resi-group-server/pom.xml +++ b/epmet-module/resi-group/resi-group-server/pom.xml @@ -122,12 +122,42 @@ dev + + 8095 + dev + + + + + + epmet_resi_group_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + https://epmet-dev.elinkservice.cn/api/epmetscan/api + + + + local true 8095 - dev + local @@ -141,7 +171,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/resi-guide/resi-guide-server/pom.xml b/epmet-module/resi-guide/resi-guide-server/pom.xml index 4aefd4cbe1..04ba4c1d3e 100644 --- a/epmet-module/resi-guide/resi-guide-server/pom.xml +++ b/epmet-module/resi-guide/resi-guide-server/pom.xml @@ -115,12 +115,41 @@ dev + + 8091 + dev + + + + + + epmet_resi_guide_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8091 - dev + local @@ -134,7 +163,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/resi-hall/resi-hall-server/pom.xml b/epmet-module/resi-hall/resi-hall-server/pom.xml index a81bf919dc..a44a834c35 100644 --- a/epmet-module/resi-hall/resi-hall-server/pom.xml +++ b/epmet-module/resi-hall/resi-hall-server/pom.xml @@ -79,12 +79,35 @@ dev + + 8100 + dev + + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8100 - dev + local 0 @@ -92,7 +115,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/resi-home/resi-home-server/pom.xml b/epmet-module/resi-home/resi-home-server/pom.xml index f6eebaaad7..d43f84aaa6 100644 --- a/epmet-module/resi-home/resi-home-server/pom.xml +++ b/epmet-module/resi-home/resi-home-server/pom.xml @@ -99,12 +99,33 @@ dev + + 8104 + dev + + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + + + local true 8104 - dev + local 0 @@ -112,7 +133,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/resi-mine/resi-mine-server/pom.xml b/epmet-module/resi-mine/resi-mine-server/pom.xml index a5087a808c..1cf70149cc 100644 --- a/epmet-module/resi-mine/resi-mine-server/pom.xml +++ b/epmet-module/resi-mine/resi-mine-server/pom.xml @@ -124,19 +124,39 @@ dev + + 8094 + dev + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + + + local true 8094 - dev + local 0 192.168.1.130 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/resi-partymember/resi-partymember-server/pom.xml b/epmet-module/resi-partymember/resi-partymember-server/pom.xml index 7ee6d3c54e..d35830cc69 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/pom.xml +++ b/epmet-module/resi-partymember/resi-partymember-server/pom.xml @@ -121,12 +121,41 @@ dev + + 8096 + dev + + + + + + epmet_resi_partymember_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8096 - dev + local @@ -140,7 +169,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-module/resi-voice/resi-voice-server/pom.xml b/epmet-module/resi-voice/resi-voice-server/pom.xml index 5c087281de..9985f3c6a5 100644 --- a/epmet-module/resi-voice/resi-voice-server/pom.xml +++ b/epmet-module/resi-voice/resi-voice-server/pom.xml @@ -85,12 +85,33 @@ dev + + 8106 + dev + + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + + + local true 8106 - dev + local 0 @@ -98,7 +119,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 diff --git a/epmet-openapi/epmet-openapi-scan/pom.xml b/epmet-openapi/epmet-openapi-scan/pom.xml index 46532a144e..c77bafe339 100644 --- a/epmet-openapi/epmet-openapi-scan/pom.xml +++ b/epmet-openapi/epmet-openapi-scan/pom.xml @@ -86,6 +86,28 @@ dev + + 8107 + dev + + + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + + + local true @@ -100,7 +122,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988 @@ -111,9 +133,6 @@ test - 8107 test diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 761b8ea921..b6872595d0 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -130,12 +130,41 @@ dev + + 8087 + dev + + + + + + epmet_user_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + true + 192.168.1.130:8848 + 6ceab336-d004-4acf-89c6-e121d06f4988 + + + false + + + false + + + + local true 8087 - dev + local @@ -149,7 +178,7 @@ 6379 123456 - true + false 192.168.1.130:8848 6ceab336-d004-4acf-89c6-e121d06f4988