From 1949da956b2b721144bf6727e840b06c226d1fb7 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 26 Oct 2020 17:07:03 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E4=BA=94=E7=BA=A7=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E5=8E=9F=E5=A7=8B=E5=80=BC=20=E6=B7=BB=E5=8A=A0=E6=9D=83?= =?UTF-8?q?=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/result/AblityListResultDTO.java | 6 ++++++ .../resources/mapper/fact/FactIndexAgencySubScoreDao.xml | 3 ++- .../resources/mapper/fact/FactIndexCommunitySubScoreDao.xml | 3 ++- .../main/resources/mapper/fact/FactIndexGridSubScoreDao.xml | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java index 97c32e1994..d6cc4cd785 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityListResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; /** * 按月查询各项指标数据--接口返参 @@ -30,4 +31,9 @@ public class AblityListResultDTO implements Serializable { */ private String showType; + /** + * 指标对应的权重 + */ + private BigDecimal weight; + } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml index 9744157016..691f149e1c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml @@ -7,7 +7,8 @@ SELECT fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", - dict.index_name AS "name" + dict.index_name AS "name", + round(fact.WEIGHT,2) AS weight FROM fact_index_agency_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml index 197b6f9bf9..db57d11ee3 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml @@ -7,7 +7,8 @@ SELECT fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", - dict.index_name AS "name" + dict.index_name AS "name", + round(fact.WEIGHT,2) AS weight FROM fact_index_community_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml index 1b317e2791..0cf826892b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml @@ -7,7 +7,8 @@ SELECT fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", - dict.index_name AS "name" + dict.index_name AS "name", + round(fact.WEIGHT,2) AS weight FROM fact_index_grid_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code From 9f3ee085532757f186060f00d478697afba86d7d Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 26 Oct 2020 17:28:21 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/controller/screen/DistributionController.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/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java index 8c17f03238..7074ed33d8 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 @@ -27,8 +27,8 @@ public class DistributionController { private DistributionService distributionService; /** - * @Description 1、党支部 * @param formDTO + * @Description 1、党支部分布 * @author zxc * @date 2020/8/18 10:59 上午 */ From 1d81408cf4fc6a6f42e7d348817827b433fbc0b7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 26 Oct 2020 17:37:56 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=B8=83=EF=BC=8C=E7=94=A8=E6=88=B7=E5=88=86=E5=B8=83=EF=BC=8C?= =?UTF-8?q?=E5=85=9A=E5=91=98=E5=88=86=E5=B8=83=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=99=BA=E6=85=A7=E7=A4=BE=E5=8C=BA=E8=A6=81?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/screen/DistributionController.java | 6 +++--- .../mapper/screen/ScreenCustomerAgencyDao.xml | 4 ++-- .../mapper/screen/ScreenCustomerGridDao.xml | 14 ++++++++------ 3 files changed, 13 insertions(+), 11 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 7074ed33d8..25bf9e5434 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 @@ -28,7 +28,7 @@ public class DistributionController { /** * @param formDTO - * @Description 1、党支部分布 + * @Description 1、党支部分布 【只显示 screen_customer_biz_org 表中存在的orgId的数据】 * @author zxc * @date 2020/8/18 10:59 上午 */ @@ -39,7 +39,7 @@ public class DistributionController { } /** - * @Description 2、用户分布 + * @Description 2、用户分布 【只显示 screen_customer_biz_org 表中存在的orgId的数据】 * @param userFormDTO * @author zxc * @date 2020/8/18 11:10 上午 @@ -51,7 +51,7 @@ public class DistributionController { } /** - * @Description 3、党员分布 + * @Description 3、党员分布 【只显示 screen_customer_biz_org 表中存在的orgId的数据】 * @param parymemberFormDTO * @author zxc * @date 2020/8/18 11:20 上午 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 9007350e5c..f16395c129 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 @@ -80,7 +80,7 @@ sutd.org_type AS type FROM screen_user_total_data sutd - LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id + LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id AND sca.is_display = 1 WHERE sutd.del_flag = '0' AND sca.del_flag = 0 @@ -98,7 +98,7 @@ sutd.org_type AS type FROM screen_user_total_data sutd - LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id + LEFT JOIN screen_customer_agency sca ON sca.agency_id = sutd.org_id AND sca.is_display = 1 WHERE sutd.del_flag = '0' AND sca.del_flag = 0 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 b17fe0f6a8..c072214600 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 @@ -21,14 +21,16 @@ From ca48ac6fa56040542edda98059229da85924723a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 26 Oct 2020 17:40:20 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/service/project/impl/ProjectServiceImpl.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/project/impl/ProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java index 6285b76353..45f1f87a0b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java @@ -198,7 +198,7 @@ public class ProjectServiceImpl implements ProjectService { ProcessAndCurrentDeptResultDTO data = processList.getData(); List processResultDTOS = ConvertUtils.sourceToTarget(data.getProcessList(), ProjectProcessResultDTO.class); projectDetailResultDTO.setProcessList(processResultDTOS); - List departmentNameListResultDTOS = ConvertUtils.sourceToTarget(data.getProcessList(), DepartmentNameListResultDTO.class); + List departmentNameListResultDTOS = ConvertUtils.sourceToTarget(data.getDepartmentList(), DepartmentNameListResultDTO.class); projectDetailResultDTO.setDepartmentList(departmentNameListResultDTOS); projectDetailResultDTO.setDepartmentNameList(data.getDepartmentNameList()); return projectDetailResultDTO; From ca1128f375b88cf4880353f237b0b834c2aeff2e Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 27 Oct 2020 09:16:53 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E5=A4=87=E6=B3=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datareport/controller/screen/DistributionController.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/controller/screen/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java index 25bf9e5434..bf29a4c4d1 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 @@ -39,7 +39,7 @@ public class DistributionController { } /** - * @Description 2、用户分布 【只显示 screen_customer_biz_org 表中存在的orgId的数据】 + * @Description 2、用户分布 【只显示 is_display = 1 的数据】 * @param userFormDTO * @author zxc * @date 2020/8/18 11:10 上午 @@ -51,7 +51,7 @@ public class DistributionController { } /** - * @Description 3、党员分布 【只显示 screen_customer_biz_org 表中存在的orgId的数据】 + * @Description 3、党员分布 【只显示 is_display = 1 的数据】 * @param parymemberFormDTO * @author zxc * @date 2020/8/18 11:20 上午 From 92e24b68cc51ba0419841e20b955070400fa7725 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 27 Oct 2020 13:32:27 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/form/BranchCountFormDTO.java | 24 ++++++++++ .../dto/result/BranchCountResultDTO.java | 45 +++++++++++++++++++ .../screen/DistributionController.java | 12 +++++ .../screen/ScreenCustomerGridDao.java | 8 ++++ .../screen/DistributionService.java | 8 ++++ .../screen/impl/DistributionServiceImpl.java | 15 +++++++ .../mapper/screen/ScreenCustomerGridDao.xml | 22 ++++++++- .../screen/ScreenPartyLinkMassesDataDao.xml | 13 +++--- 8 files changed, 139 insertions(+), 8 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchCountFormDTO.java create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchCountResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchCountFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchCountFormDTO.java new file mode 100644 index 0000000000..1d2d9cb77f --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchCountFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.evaluationindex.screen.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/10/27 11:08 上午 + */ +@Data +public class BranchCountFormDTO implements Serializable { + + private static final long serialVersionUID = -4869326660700557193L; + + public interface BranchCount{} + + /** + * 机关ID + */ + @NotBlank(message = "机关ID不能为空",groups = {BranchCount.class}) + private String agencyId; +} diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchCountResultDTO.java new file mode 100644 index 0000000000..53dbb106c4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchCountResultDTO.java @@ -0,0 +1,45 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/10/27 11:03 上午 + */ +@Data +public class BranchCountResultDTO implements Serializable { + + private static final long serialVersionUID = -5915969126291502360L; + + private String agencyId; + + /** + * 机关名称 + */ + private String name; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 社区下的党支部数 + */ + private Integer totalNum; + + /** + * 坐标区域 + */ + private String areaMarks; + + public BranchCountResultDTO() { + this.agencyId = ""; + this.name = ""; + this.centerMark = ""; + this.totalNum = 0; + this.areaMarks = ""; + } +} 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 bf29a4c4d1..fb9eeb8860 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 @@ -38,6 +38,18 @@ public class DistributionController { return new Result>().ok(distributionService.branch(formDTO)); } + /** + * @Description 查询机关下的党支部 + * @Param branchCountFormDTO + * @author zxc + * @date 2020/10/27 11:11 上午 + */ + @PostMapping("branchcount") + public Result branchCount(@RequestBody BranchCountFormDTO branchCountFormDTO){ + ValidatorUtils.validateEntity(branchCountFormDTO, BranchCountFormDTO.BranchCount.class); + return new Result().ok(distributionService.branchCount(branchCountFormDTO)); + } + /** * @Description 2、用户分布 【只显示 is_display = 1 的数据】 * @param userFormDTO diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java index b6196411f8..e0a36b8fc3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -48,6 +48,14 @@ public interface ScreenCustomerGridDao { */ List selectBranch(@Param("agencyId")String agencyId); + /** + * @Description 查询机关下的党支部 + * @Param branchCountFormDTO + * @author zxc + * @date 2020/10/27 11:11 上午 + */ + BranchCountResultDTO selectBranchCount(@Param("agencyId")String agencyId); + /** * @Description 查询子级用户分布【网格级别】 * @param parentId diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/DistributionService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/DistributionService.java index a73d1ccfcd..9f2552329b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/DistributionService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/DistributionService.java @@ -21,6 +21,14 @@ public interface DistributionService { */ List branch(BranchFormDTO formDTO); + /** + * @Description 查询机关下的党支部 + * @Param branchCountFormDTO + * @author zxc + * @date 2020/10/27 11:11 上午 + */ + BranchCountResultDTO branchCount(BranchCountFormDTO branchCountFormDTO); + /** * @Description 2、用户分布 * @param userFormDTO diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java index b65c0fe059..456ef83a92 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java @@ -50,6 +50,21 @@ public class DistributionServiceImpl implements DistributionService { return branchResultDTOS; } + /** + * @Description 查询机关下的党支部 + * @Param branchCountFormDTO + * @author zxc + * @date 2020/10/27 11:11 上午 + */ + @Override + public BranchCountResultDTO branchCount(BranchCountFormDTO branchCountFormDTO) { + BranchCountResultDTO branchCountResultDTO = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); + if (null == branchCountFormDTO){ + return new BranchCountResultDTO(); + } + return branchCountResultDTO; + } + /** * @Description 2、用户分布 * @param userFormDTO 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 c072214600..eccb843876 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 @@ -26,10 +26,10 @@ scg.party_mark AS partyMark FROM screen_customer_grid scg - LEFT JOIN screen_customer_biz_org bo ON bo.ORG_ID = scg.PARENT_AGENCY_ID + LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = scg.PARENT_AGENCY_ID AND sca.IS_DISPLAY = 1 WHERE scg.del_flag = 0 - AND bo.BIZ_TYPE = 'community' + AND sca.DEL_FLAG = 0 AND scg.all_parent_ids LIKE concat('%', #{agencyId}, '%') @@ -84,4 +84,22 @@ ORDER BY created_time DESC + + + \ No newline at end of file diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml index 2bbdece16c..7a59c7f16d 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 @@ -6,13 +6,14 @@ \ No newline at end of file From bd480623dff3a9c883bfec966692dfede0da7101 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 27 Oct 2020 14:22:40 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenCustomerGridDao.java | 3 +- .../screen/impl/DistributionServiceImpl.java | 3 +- .../mapper/screen/ScreenCustomerGridDao.xml | 30 ++++++++++++------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java index e0a36b8fc3..741a6956eb 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -54,7 +54,8 @@ public interface ScreenCustomerGridDao { * @author zxc * @date 2020/10/27 11:11 上午 */ - BranchCountResultDTO selectBranchCount(@Param("agencyId")String agencyId); + BranchCountResultDTO selectAgencyInfo(@Param("agencyId")String agencyId); + Integer selectBranchCount(@Param("agencyId")String agencyId); /** * @Description 查询子级用户分布【网格级别】 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java index 456ef83a92..a55b4e5e69 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java @@ -58,10 +58,11 @@ public class DistributionServiceImpl implements DistributionService { */ @Override public BranchCountResultDTO branchCount(BranchCountFormDTO branchCountFormDTO) { - BranchCountResultDTO branchCountResultDTO = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); + BranchCountResultDTO branchCountResultDTO = screenCustomerGridDao.selectAgencyInfo(branchCountFormDTO.getAgencyId()); if (null == branchCountFormDTO){ return new BranchCountResultDTO(); } + branchCountResultDTO.setTotalNum(screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId())); return branchCountResultDTO; } 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 eccb843876..39b4cd2153 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 @@ -86,20 +86,28 @@ - SELECT - scg.PARENT_AGENCY_ID AS agencyId, - sca.AGENCY_NAME AS name, - IFNULL(sca.PARTY_MARK,'') AS partyMark, - IFNULL(sca.CENTER_MARK,'[]') AS centerMark, - COUNT(scg.ID) AS totalNum + AGENCY_ID, + AGENCY_NAME AS name, + IFNULL(PARTY_MARK,''), + IFNULL(CENTER_MARK,'') FROM - screen_customer_grid scg - LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = scg.PARENT_AGENCY_ID AND sca.IS_DISPLAY = 1 + screen_customer_agency WHERE - scg.del_flag = 0 - AND sca.DEL_FLAG = 0 - AND scg.all_parent_ids LIKE concat('%', #{agencyId}, '%') + DEL_FLAG = 0 + AND IS_DISPLAY = 1 + AND AGENCY_ID = #{agencyId} + + + \ No newline at end of file From 0bc88795f46d47d2fe5d81405232aba7496d1d57 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 27 Oct 2020 16:18:35 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/impl/DistributionServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java index a55b4e5e69..9802d31fdd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java @@ -62,7 +62,8 @@ public class DistributionServiceImpl implements DistributionService { if (null == branchCountFormDTO){ return new BranchCountResultDTO(); } - branchCountResultDTO.setTotalNum(screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId())); + Integer totalNum = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); + branchCountResultDTO.setTotalNum(null == totalNum ? NumConstant.ZERO : totalNum); return branchCountResultDTO; } From 39bc9f6f4c7be6210ac41f26446b7434b1ff46d5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 27 Oct 2020 16:36:22 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/impl/DistributionServiceImpl.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/evaluationindex/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java index 9802d31fdd..766b92168c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java @@ -59,7 +59,7 @@ public class DistributionServiceImpl implements DistributionService { @Override public BranchCountResultDTO branchCount(BranchCountFormDTO branchCountFormDTO) { BranchCountResultDTO branchCountResultDTO = screenCustomerGridDao.selectAgencyInfo(branchCountFormDTO.getAgencyId()); - if (null == branchCountFormDTO){ + if (null == branchCountResultDTO){ return new BranchCountResultDTO(); } Integer totalNum = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); From 2822de7c57174b8d75838fc73406bdfa9ac7e6b7 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 27 Oct 2020 17:32:31 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/BranchCountResultDTO.java | 23 ++++-------- .../dto/result/SubBranchCountResultDTO.java | 37 +++++++++++++++++++ .../screen/ScreenCustomerGridDao.java | 2 +- .../screen/impl/DistributionServiceImpl.java | 8 +++- .../mapper/screen/ScreenCustomerGridDao.xml | 21 ++++++++--- 5 files changed, 66 insertions(+), 25 deletions(-) create mode 100644 epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubBranchCountResultDTO.java diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchCountResultDTO.java index 53dbb106c4..5a2c8cd391 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchCountResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchCountResultDTO.java @@ -1,8 +1,11 @@ package com.epmet.evaluationindex.screen.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; /** * @Author zxc @@ -20,26 +23,14 @@ public class BranchCountResultDTO implements Serializable { */ private String name; - /** - * 中心点位 - */ - private String centerMark; + @JsonIgnore + private String level; - /** - * 社区下的党支部数 - */ - private Integer totalNum; - - /** - * 坐标区域 - */ - private String areaMarks; + private List partyDistribution; public BranchCountResultDTO() { this.agencyId = ""; this.name = ""; - this.centerMark = ""; - this.totalNum = 0; - this.areaMarks = ""; + this.partyDistribution = new ArrayList<>(); } } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubBranchCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubBranchCountResultDTO.java new file mode 100644 index 0000000000..93466fedf4 --- /dev/null +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubBranchCountResultDTO.java @@ -0,0 +1,37 @@ +package com.epmet.evaluationindex.screen.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2020/10/27 5:22 下午 + */ +@Data +public class SubBranchCountResultDTO implements Serializable { + + private static final long serialVersionUID = -4174988002147169566L; + + private String subId; + + /** + * 机关名称 + */ + private String name; + + /** + * 中心点位 + */ + private String centerMark; + + /** + * 社区下的党支部数 + */ + private Integer totalNum; + + /** + * 坐标区域 + */ + private String areaMarks; +} diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java index 741a6956eb..a024d60791 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -55,7 +55,7 @@ public interface ScreenCustomerGridDao { * @date 2020/10/27 11:11 上午 */ BranchCountResultDTO selectAgencyInfo(@Param("agencyId")String agencyId); - Integer selectBranchCount(@Param("agencyId")String agencyId); + List selectBranchCount(@Param("agencyId")String agencyId); /** * @Description 查询子级用户分布【网格级别】 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java index 766b92168c..af0ba2d939 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java @@ -14,6 +14,7 @@ import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.List; @@ -62,8 +63,11 @@ public class DistributionServiceImpl implements DistributionService { if (null == branchCountResultDTO){ return new BranchCountResultDTO(); } - Integer totalNum = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); - branchCountResultDTO.setTotalNum(null == totalNum ? NumConstant.ZERO : totalNum); + if (branchCountResultDTO.getLevel().equals(ScreenConstant.COMMUNITY)){ + return new BranchCountResultDTO(); + } + List subList = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); + branchCountResultDTO.setPartyDistribution(CollectionUtils.isEmpty(subList) ? new ArrayList<>() : subList); return branchCountResultDTO; } 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 39b4cd2153..ae272334e0 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 @@ -91,7 +91,8 @@ AGENCY_ID, AGENCY_NAME AS name, IFNULL(PARTY_MARK,''), - IFNULL(CENTER_MARK,'') + IFNULL(CENTER_MARK,''), + level FROM screen_customer_agency WHERE @@ -100,14 +101,22 @@ AND AGENCY_ID = #{agencyId} - SELECT - COUNT( ID ) AS totalNum + COUNT( scg.ID ) AS totalNum, + sca.AGENCY_ID AS subId, + IFNULL(sca.CENTER_MARK,'') AS centerMark, + sca.AGENCY_NAME AS name, + IFNULL(sca.AREA_MARKS,'') AS areaMarks FROM - screen_customer_grid + screen_customer_grid scg + LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = scg.PARENT_AGENCY_ID WHERE - DEL_FLAG = 0 - AND all_parent_ids LIKE concat('%',#{agencyId}, '%') + scg.DEL_FLAG = 0 + AND sca.DEL_FLAG = 0 + AND sca.IS_DISPLAY = 1 + AND sca.PID = #{agencyId} + GROUP BY scg.PARENT_AGENCY_ID \ No newline at end of file From ccd91e28ea4ab103083fbc9507303911f713c7d3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 27 Oct 2020 17:39:31 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=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/ScreenCustomerGridDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ae272334e0..e631c98dea 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 @@ -115,7 +115,7 @@ scg.DEL_FLAG = 0 AND sca.DEL_FLAG = 0 AND sca.IS_DISPLAY = 1 - AND sca.PID = #{agencyId} + AND scg.all_parent_ids LIKE concat('%', #{agencyId}, '%') GROUP BY scg.PARENT_AGENCY_ID From 2176fa35e4932f33fc5f54160a817c9fe5879575 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 28 Oct 2020 11:00:42 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/SubBranchCountResultDTO.java | 15 +++++++++++++ .../screen/ScreenCustomerAgencyDao.java | 8 +++++++ .../screen/impl/DistributionServiceImpl.java | 22 ++++++++++++++++++- .../mapper/screen/ScreenCustomerAgencyDao.xml | 14 ++++++++++++ .../mapper/screen/ScreenCustomerGridDao.xml | 4 +++- 5 files changed, 61 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubBranchCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubBranchCountResultDTO.java index 93466fedf4..eac362ef84 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubBranchCountResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubBranchCountResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.evaluationindex.screen.dto.result; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -34,4 +35,18 @@ public class SubBranchCountResultDTO implements Serializable { * 坐标区域 */ private String areaMarks; + + @JsonIgnore + private String allParentIds; + @JsonIgnore + private String subAgencyId; + + public SubBranchCountResultDTO() { + this.subId = ""; + this.name = ""; + this.centerMark = ""; + this.totalNum = 0; + this.areaMarks = ""; + this.subAgencyId = ""; + } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index 7efd4d1853..52ddea4bd0 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -104,4 +104,12 @@ public interface ScreenCustomerAgencyDao { * @date 2020/10/23 3:54 下午 */ CompartmentResultDTO getAgencyInfoByAegncyId(@Param("agencyId") String agencyId); + + /** + * @Description 查询组织的下级组织ID + * @Param agencyId + * @author zxc + * @date 2020/10/28 10:33 上午 + */ + List selectSubAgencyId(@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/evaluationindex/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java index af0ba2d939..ed03621cfd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java @@ -18,6 +18,8 @@ import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** * 中央区相关各指标查询 @@ -66,8 +68,26 @@ public class DistributionServiceImpl implements DistributionService { if (branchCountResultDTO.getLevel().equals(ScreenConstant.COMMUNITY)){ return new BranchCountResultDTO(); } + List agencyIds = screenCustomerAgencyDao.selectSubAgencyId(branchCountFormDTO.getAgencyId()); List subList = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); - branchCountResultDTO.setPartyDistribution(CollectionUtils.isEmpty(subList) ? new ArrayList<>() : subList); + if (!CollectionUtils.isEmpty(subList)){ + subList.forEach(sub -> { + agencyIds.forEach(agencyId -> { + if (sub.getAllParentIds().contains(agencyId.getSubId())){ + sub.setSubAgencyId(agencyId.getSubId()); + } + }); + }); + } + Map> groupBySubAgency = subList.stream().collect(Collectors.groupingBy(sub -> sub.getSubAgencyId())); + agencyIds.forEach(a -> { + groupBySubAgency.forEach((agencyId,value) -> { + if (a.getSubId().equals(agencyId)){ + a.setTotalNum(value.stream().collect(Collectors.summingInt(v -> v.getTotalNum()))); + } + }); + }); + branchCountResultDTO.setPartyDistribution(CollectionUtils.isEmpty(agencyIds) ? new ArrayList<>() : agencyIds); return branchCountResultDTO; } 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 f16395c129..4fc074bbf4 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 @@ -197,4 +197,18 @@ del_flag = 0 AND agency_id = #{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 e631c98dea..be82c07755 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 @@ -107,7 +107,9 @@ sca.AGENCY_ID AS subId, IFNULL(sca.CENTER_MARK,'') AS centerMark, sca.AGENCY_NAME AS name, - IFNULL(sca.AREA_MARKS,'') AS areaMarks + IFNULL(sca.AREA_MARKS,'') AS areaMarks, + scg.ALL_PARENT_IDS, + sca.PID FROM screen_customer_grid scg LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = scg.PARENT_AGENCY_ID From 0b62e9435908b52cd82e8b988009e26f897f415c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 28 Oct 2020 11:20:26 +0800 Subject: [PATCH 13/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=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/ScreenCustomerAgencyDao.xml | 1 + 1 file changed, 1 insertion(+) 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 4fc074bbf4..8dd92ec0d1 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 @@ -209,6 +209,7 @@ screen_customer_agency WHERE DEL_FLAG = 0 + AND IS_DISPLAY = 1 AND pid = #{agencyId} \ No newline at end of file From fbffc6be9c3b355aaa6a3ccc47e568a312e4c2ca Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 28 Oct 2020 13:57:06 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/DistributionServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java index ed03621cfd..d97d1c9643 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java @@ -11,6 +11,7 @@ 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 lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -27,6 +28,7 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/18 10:19 */ +@Slf4j @Service @DataSource(DataSourceConstant.EVALUATION_INDEX) public class DistributionServiceImpl implements DistributionService { @@ -62,6 +64,7 @@ public class DistributionServiceImpl implements DistributionService { @Override public BranchCountResultDTO branchCount(BranchCountFormDTO branchCountFormDTO) { BranchCountResultDTO branchCountResultDTO = screenCustomerGridDao.selectAgencyInfo(branchCountFormDTO.getAgencyId()); + log.info("本级机关信息"+branchCountResultDTO.toString()); if (null == branchCountResultDTO){ return new BranchCountResultDTO(); } @@ -69,7 +72,9 @@ public class DistributionServiceImpl implements DistributionService { return new BranchCountResultDTO(); } List agencyIds = screenCustomerAgencyDao.selectSubAgencyId(branchCountFormDTO.getAgencyId()); + log.info("下级机关信息:"+agencyIds.toString()); List subList = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); + log.info("党支部数"+subList.toString()); if (!CollectionUtils.isEmpty(subList)){ subList.forEach(sub -> { agencyIds.forEach(agencyId -> { @@ -79,7 +84,9 @@ public class DistributionServiceImpl implements DistributionService { }); }); } + log.info("给党支部赋值subAgencyId"+subList.toString()); Map> groupBySubAgency = subList.stream().collect(Collectors.groupingBy(sub -> sub.getSubAgencyId())); + log.info("subList分组"+groupBySubAgency.toString()); agencyIds.forEach(a -> { groupBySubAgency.forEach((agencyId,value) -> { if (a.getSubId().equals(agencyId)){ @@ -87,7 +94,9 @@ public class DistributionServiceImpl implements DistributionService { } }); }); + log.info("赋值之后的"+agencyIds.toString()); branchCountResultDTO.setPartyDistribution(CollectionUtils.isEmpty(agencyIds) ? new ArrayList<>() : agencyIds); + log.info("最后结果:"+branchCountResultDTO); return branchCountResultDTO; } From 4208adc39369e4dafd6bba59e9f9cc079da7cb46 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 28 Oct 2020 14:08:57 +0800 Subject: [PATCH 15/16] =?UTF-8?q?=E5=85=9A=E6=94=AF=E9=83=A8=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/DistributionServiceImpl.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java index d97d1c9643..c94e85dc89 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java @@ -61,10 +61,10 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/10/27 11:11 上午 */ + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public BranchCountResultDTO branchCount(BranchCountFormDTO branchCountFormDTO) { BranchCountResultDTO branchCountResultDTO = screenCustomerGridDao.selectAgencyInfo(branchCountFormDTO.getAgencyId()); - log.info("本级机关信息"+branchCountResultDTO.toString()); if (null == branchCountResultDTO){ return new BranchCountResultDTO(); } @@ -72,9 +72,7 @@ public class DistributionServiceImpl implements DistributionService { return new BranchCountResultDTO(); } List agencyIds = screenCustomerAgencyDao.selectSubAgencyId(branchCountFormDTO.getAgencyId()); - log.info("下级机关信息:"+agencyIds.toString()); List subList = screenCustomerGridDao.selectBranchCount(branchCountFormDTO.getAgencyId()); - log.info("党支部数"+subList.toString()); if (!CollectionUtils.isEmpty(subList)){ subList.forEach(sub -> { agencyIds.forEach(agencyId -> { @@ -84,9 +82,7 @@ public class DistributionServiceImpl implements DistributionService { }); }); } - log.info("给党支部赋值subAgencyId"+subList.toString()); Map> groupBySubAgency = subList.stream().collect(Collectors.groupingBy(sub -> sub.getSubAgencyId())); - log.info("subList分组"+groupBySubAgency.toString()); agencyIds.forEach(a -> { groupBySubAgency.forEach((agencyId,value) -> { if (a.getSubId().equals(agencyId)){ @@ -94,9 +90,7 @@ public class DistributionServiceImpl implements DistributionService { } }); }); - log.info("赋值之后的"+agencyIds.toString()); branchCountResultDTO.setPartyDistribution(CollectionUtils.isEmpty(agencyIds) ? new ArrayList<>() : agencyIds); - log.info("最后结果:"+branchCountResultDTO); return branchCountResultDTO; } From fef3d604182f8502edb60099d66c0d3bde34cd90 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 28 Oct 2020 14:41:51 +0800 Subject: [PATCH 16/16] =?UTF-8?q?=E6=97=A0=E5=8F=82=E6=9E=84=E9=80=A0?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/dto/result/DepartmentNameListResultDTO.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DepartmentNameListResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DepartmentNameListResultDTO.java index 94cfb8fc51..033acfa1ed 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DepartmentNameListResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DepartmentNameListResultDTO.java @@ -2,6 +2,7 @@ package com.epmet.evaluationindex.screen.dto.result; import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.List; @@ -12,6 +13,7 @@ import java.util.List; */ @Data @AllArgsConstructor +@NoArgsConstructor public class DepartmentNameListResultDTO implements Serializable { private static final long serialVersionUID = -801407836277197080L;