From ef94b33582e35f0586b27ff7e95ae4db12f51fe5 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 21 Sep 2020 10:54:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=9B=B8=E5=85=B3=20?= =?UTF-8?q?=E5=85=9A=E5=BB=BA=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/extract/result/GridUserCountResultDTO.java | 5 +++-- .../main/java/com/epmet/controller/DemoController.java | 8 ++++---- .../extract/impl/CalGridIndexServiceImpl.java | 6 ++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java index 8b97bdc505..0203708448 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridUserCountResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.extract.result; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -16,12 +17,12 @@ public class GridUserCountResultDTO implements Serializable { /** * 注册居民本月增量 */ - private Integer userCount; + private Integer userCount = NumConstant.ZERO; /** * 注册党员本月增量 */ - private Integer partyCount; + private Integer partyCount = NumConstant.ZERO; /** * 网格ID 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 92611df2cf..c983812f2a 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 @@ -544,16 +544,16 @@ public class DemoController { @PostMapping("gridparty") public void gridParty(){ -// String customerId = "3ef7e4bb195eb9e622d68b52509aa940"; - String customerId = "epmettest"; + String customerId = "3ef7e4bb195eb9e622d68b52509aa940"; +// String customerId = "epmettest"; String monthId = "202008"; calGridIndexService.calGridIndexPartyAbility(customerId,monthId); } @PostMapping("gridgovern") public void gridGovern(){ -// String customerId = "3ef7e4bb195eb9e622d68b52509aa940"; - String customerId = "epmettest"; + String customerId = "3ef7e4bb195eb9e622d68b52509aa940"; +// String customerId = "epmettest"; String monthId = "202008"; calGridIndexService.calGridIndexGovernAbility(customerId,monthId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java index cf2835eaa6..6b66d896f7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java @@ -138,7 +138,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { if (!CollectionUtils.isEmpty(gridUserCountList)){ gridUserCountList.forEach(count -> { if (r.getGridId().equals(count.getGridId())){ - BeanUtils.copyProperties(count,r); + r.setUserCount(count.getUserCount()); + r.setPartyCount(count.getPartyCount()); } }); } @@ -320,7 +321,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { if (!CollectionUtils.isEmpty(gridIssueTotalList)) { gridIssueTotalList.forEach(total -> { if (r.getGridId().equals(total.getGridId())) { - BeanUtils.copyProperties(total, r); + r.setIssueTotal(total.getIssueTotal()); + r.setAvgIssueCount(total.getAvgIssueCount()); } }); }