From bc050e4ef4dd11714bba5d93e41e37def75534ef Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 29 Sep 2020 14:09:51 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=88=A4=E6=96=AD&?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/todata/impl/ProjectExtractServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 4237449875..62123e45fe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -95,7 +95,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { return entity; })).collect(Collectors.toList()); - if (CollectionUtils.isEmpty(finishOrgList)) { + if (!CollectionUtils.isEmpty(finishOrgList)) { closeProjects.forEach(close -> finishOrgList.stream().filter(finish -> close.getId().equals(finish.getProjectId())).forEach(dto -> { String[] orgIds = dto.getPIdPath().split(StrConstant.COLON); if (orgIds.length > NumConstant.ONE) { @@ -327,9 +327,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { int trace = factOriginProjectOrgPeriodDailyDao.selectIfExisted(param.getCustomerId()); Boolean isFirst = trace <= NumConstant.ZERO; if (StringUtils.isBlank(param.getDateId())) { - Date yesterday = new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24); - SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD); - param.setDateId(format.format(yesterday)); + param.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); } List extractData = projectProcessService.getProjectPeriod(isFirst, param.getCustomerId(), param.getDateId()); From 3f158dcbcbe0d471db7a491575ad3e0bd9ec1f27 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 29 Sep 2020 14:09:57 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=96=B9=E6=B3=95=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toscreen/impl/ScreenExtractServiceImpl.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 5474560335..12595d9895 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -165,7 +165,13 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { // 党建引领 screen_party_branch_data,screen_party_link_masses_data partyGuideService.partyGuideExtract(formDTO); - //计算分数 todo 优化 手动创建线程池 控制任务数量 + //基层治理 - 热心市民 screen_party_user_rank_data + ScreenCentralZoneDataFormDTO param = new ScreenCentralZoneDataFormDTO(); + param.setCustomerId(customerId); + param.setDateId(monthId); + screenGrassrootsGovernDataAbsorptionService.userScoreDataHub(param); + + //此方法保持在最后即可 计算指标分数 todo 优化 手动创建线程池 控制任务数量 ExecutorService pool = Executors.newSingleThreadExecutor(); pool.submit(() -> { CalculateCommonFormDTO formDTO1 = new CalculateCommonFormDTO(); @@ -177,9 +183,5 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { log.error("extractMonthly 计算分数异常,参数:{}", JSON.toJSONString(formDTO1)); } }); - //基层治理 - 热心市民 screen_party_user_rank_data - ScreenCentralZoneDataFormDTO param = new ScreenCentralZoneDataFormDTO(); - param.setCustomerId(customerId);param.setDateId(monthId); - screenGrassrootsGovernDataAbsorptionService.userScoreDataHub(param); } } From df57b7042271ca43aedc74ffd1d91f833e25ca0f Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 29 Sep 2020 14:28:27 +0800 Subject: [PATCH 3/5] =?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 --- .../impl/IndexCollDistrictServiceImpl.java | 4 +- .../impl/ProjectExtractServiceImpl.java | 2 +- .../GovernRankDataExtractServiceImpl.java | 34 ++++++----- .../impl/OrgRankExtractServiceImpl.java | 56 +++++++++---------- 4 files changed, 47 insertions(+), 49 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java index 2768399b04..c548270b9b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java @@ -19,9 +19,9 @@ import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.FactArticlePublishedAgencyDailyService; import com.epmet.util.DimIdGenerator; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.math.RoundingMode; @@ -111,7 +111,7 @@ public class IndexCollDistrictServiceImpl implements IndexCollDistrictService { //社区办结项目满意度 List satisfaction = factOriginProjectLogDailyService.getSatisfaction(customerId, dimId.getMonthId(), OrgTypeConstant.DISTRICT); - if (CollectionUtils.isEmpty(satisfaction)) { + if (CollectionUtils.isNotEmpty(satisfaction)) { list.forEach(entity -> satisfaction.stream().filter(dto -> dto.getAgencyId().equals(entity.getAgencyId())).forEach(sa -> { if (sa.getCount() != NumConstant.ZERO) { BigDecimal count = new BigDecimal(sa.getCount()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 62123e45fe..540ad7abf4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -35,7 +35,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.util.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import java.text.SimpleDateFormat; import java.util.ArrayList; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java index d2f422fbc7..efe7fee341 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java @@ -3,10 +3,8 @@ package com.epmet.service.evaluationindex.extract.toscreen.impl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.constant.OrgTypeConstant; -import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; import com.epmet.dto.extract.result.OrgStatisticsResultDTO; import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; -import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import com.epmet.entity.evaluationindex.screen.ScreenGovernRankDataEntity; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; @@ -16,7 +14,7 @@ import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthl import com.epmet.service.evaluationindex.screen.ScreenGovernRankDataService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import java.math.BigDecimal; import java.math.RoundingMode; @@ -68,7 +66,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe } //自治率 List gridList = factIndexGovrnAblityGridMonthlyService.getGridByCustomer(customerId, monthId); - if (!CollectionUtils.isEmpty(gridList)) { + if (CollectionUtils.isNotEmpty(gridList)) { list.forEach(entity -> gridList.stream().filter(gridAbility -> entity.getOrgId().equals(gridAbility.getGridId())).forEach(grid -> { BigDecimal resolveCount = new BigDecimal(grid.getResolveProjectCount()); BigDecimal selfCount = new BigDecimal(grid.getSelfSolveProjectCount()); @@ -80,7 +78,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe //响应率 响应次数/流转到网格的次数 List responseList = factOriginProjectLogDailyService.getGridResponse(customerId, monthId); - if (!CollectionUtils.isEmpty(responseList)) { + if (CollectionUtils.isNotEmpty(responseList)) { list.forEach(entity -> responseList.stream().filter(response -> entity.getOrgId().equals(response.getOrgId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -92,7 +90,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe //解决率 已解决项目数/办结项目数 List resolveList = factOriginProjectMainDailyService.getGridResolveProject(customerId, monthId); - if (!CollectionUtils.isEmpty(resolveList)) { + if (CollectionUtils.isNotEmpty(resolveList)) { list.forEach(entity -> resolveList.stream().filter(resolve -> entity.getOrgId().equals(resolve.getOrgId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -119,7 +117,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe //满意率 满意和非常满意占比 List satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(satisfactionList)) { + if (CollectionUtils.isNotEmpty(satisfactionList)) { list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -131,7 +129,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe //响应率 响应次数/流转到网格的次数 List responseList = factOriginProjectLogDailyService.getOrgResponse(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(responseList)) { + if (CollectionUtils.isNotEmpty(responseList)) { list.forEach(entity -> responseList.stream().filter(response -> entity.getOrgId().equals(response.getAgencyId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -142,7 +140,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe } //自制率 自治项目数/办结项目数 List selfList = factOriginProjectMainDailyService.getSelfProject(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(selfList)) { + if (CollectionUtils.isNotEmpty(selfList)) { list.forEach(entity -> selfList.stream().filter(self -> entity.getOrgId().equals(self.getAgencyId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -154,7 +152,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe //解决率 已解决项目数/办结项目数 List resolveList = factOriginProjectMainDailyService.getResolveProject(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(resolveList)) { + if (CollectionUtils.isNotEmpty(resolveList)) { list.forEach(entity -> resolveList.stream().filter(resolve -> entity.getOrgId().equals(resolve.getAgencyId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -179,7 +177,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe }); //满意率 满意和非常满意占比 List satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(satisfactionList)) { + if (CollectionUtils.isNotEmpty(satisfactionList)) { list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -191,7 +189,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe //响应率 响应次数/流转到网格的次数 List responseList = factOriginProjectLogDailyService.getOrgResponse(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(responseList)) { + if (CollectionUtils.isNotEmpty(responseList)) { list.forEach(entity -> responseList.stream().filter(response -> entity.getOrgId().equals(response.getAgencyId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -202,7 +200,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe } //自制率 自治项目数/办结项目数 List selfList = factOriginProjectMainDailyService.getSelfProject(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(selfList)) { + if (CollectionUtils.isNotEmpty(selfList)) { list.forEach(entity -> selfList.stream().filter(self -> entity.getOrgId().equals(self.getAgencyId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -214,7 +212,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe //解决率 已解决项目数/办结项目数 List resolveList = factOriginProjectMainDailyService.getResolveProject(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(resolveList)) { + if (CollectionUtils.isNotEmpty(resolveList)) { list.forEach(entity -> resolveList.stream().filter(resolve -> entity.getOrgId().equals(resolve.getAgencyId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -239,7 +237,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe }); //满意率 满意和非常满意占比 List satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.DISTRICT); - if (!CollectionUtils.isEmpty(satisfactionList)) { + if (CollectionUtils.isNotEmpty(satisfactionList)) { list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -251,7 +249,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe //响应率 响应次数/流转到网格的次数 List responseList = factOriginProjectLogDailyService.getOrgResponse(customerId, monthId, OrgTypeConstant.DISTRICT); - if (!CollectionUtils.isEmpty(responseList)) { + if (CollectionUtils.isNotEmpty(responseList)) { list.forEach(entity -> responseList.stream().filter(response -> entity.getOrgId().equals(response.getAgencyId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -262,7 +260,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe } //自制率 自治项目数/办结项目数 List selfList = factOriginProjectMainDailyService.getSelfProject(customerId, monthId, OrgTypeConstant.DISTRICT); - if (!CollectionUtils.isEmpty(selfList)) { + if (CollectionUtils.isNotEmpty(selfList)) { list.forEach(entity -> selfList.stream().filter(self -> entity.getOrgId().equals(self.getAgencyId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -274,7 +272,7 @@ public class GovernRankDataExtractServiceImpl implements GovernRankDataExtractSe //解决率 已解决项目数/办结项目数 List resolveList = factOriginProjectMainDailyService.getResolveProject(customerId, monthId, OrgTypeConstant.DISTRICT); - if (!CollectionUtils.isEmpty(resolveList)) { + if (CollectionUtils.isNotEmpty(resolveList)) { list.forEach(entity -> resolveList.stream().filter(resolve -> entity.getOrgId().equals(resolve.getAgencyId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java index 35f6de43e5..3b837f9e7e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java @@ -18,7 +18,7 @@ import com.epmet.service.stats.user.FactRegUserGridMonthlyService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; +import org.apache.commons.collections4.CollectionUtils; import java.math.BigDecimal; import java.math.RoundingMode; @@ -73,35 +73,35 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { } //小组数 List groupList = factOriginGroupMainDailyService.getGridGroupCount(customerId, monthId); - if (!CollectionUtils.isEmpty(groupList)) { + if (CollectionUtils.isNotEmpty(groupList)) { list.forEach(entity -> groupList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> entity.setGroupTotal(dto.getCount()) )); } //话题数 List topicList = factOriginTopicMainDailyService.getGridTopicCount(customerId, monthId); - if (!CollectionUtils.isEmpty(topicList)) { + if (CollectionUtils.isNotEmpty(topicList)) { list.forEach(entity -> topicList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> entity.setTopicTotal(dto.getCount()) )); } //议题数 List issueList = factOriginIssueMainDailyService.getGridIssueCount(customerId, monthId); - if (!CollectionUtils.isEmpty(issueList)) { + if (CollectionUtils.isNotEmpty(issueList)) { list.forEach(entity -> issueList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> entity.setIssueTotal(dto.getCount()) )); } //项目数 List projectList = factOriginProjectMainDailyService.getGridProjectCount(customerId, monthId); - if (!CollectionUtils.isEmpty(projectList)) { + if (CollectionUtils.isNotEmpty(projectList)) { list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> entity.setProjectTotal(dto.getCount()) )); } //结案率 结案数/项目数 List abilityList = factIndexGovrnAblityGridMonthlyService.getGridByCustomer(customerId, monthId); - if (!CollectionUtils.isEmpty(abilityList)) { + if (CollectionUtils.isNotEmpty(abilityList)) { list.forEach(entity -> abilityList.stream().filter(item -> item.getGridId().equals(entity.getOrgId())).forEach(dto -> { if (dto.getProjectTotal() != NumConstant.ZERO) { BigDecimal total = new BigDecimal(dto.getProjectTotal()); @@ -113,7 +113,7 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { } //满意率 满意和非常满意占比 List satisfactionList = factOriginProjectLogDailyService.getGridSatisfaction(customerId, monthId); - if (!CollectionUtils.isEmpty(satisfactionList)) { + if (CollectionUtils.isNotEmpty(satisfactionList)) { list.forEach(entity -> satisfactionList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -138,49 +138,49 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { //党员数 List partyMemberList = factRegUserAgencyMonthlyService.getOrgUserCountByCustomer(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(partyMemberList)) { + if (CollectionUtils.isNotEmpty(partyMemberList)) { list.forEach(entity -> partyMemberList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setPartyTotal(dto.getPartymemberTotal()) )); } //小组数 List groupList = factOriginGroupMainDailyService.getOrgGroupCount(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(groupList)) { + if (CollectionUtils.isNotEmpty(groupList)) { list.forEach(entity -> groupList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setGroupTotal(dto.getCount()) )); } //话题数 List topicList = factOriginTopicMainDailyService.getOrgTopicCount(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(topicList)) { + if (CollectionUtils.isNotEmpty(topicList)) { list.forEach(entity -> topicList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setTopicTotal(dto.getCount()) )); } //议题数 List issueList = factOriginIssueMainDailyService.getOrgIssueCount(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(issueList)) { + if (CollectionUtils.isNotEmpty(issueList)) { list.forEach(entity -> issueList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setIssueTotal(dto.getCount()) )); } //项目数 List projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(projectList)) { + if (CollectionUtils.isNotEmpty(projectList)) { list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> entity.setProjectTotal(dto.getCount()) )); } //结案率 结案数/项目数 List abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(abilityList)) { + if (CollectionUtils.isNotEmpty(abilityList)) { list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setCloseProjectRatio(dto.getClosedProjectRatio()) )); } //满意率 满意和非常满意占比 List satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(satisfactionList)) { + if (CollectionUtils.isNotEmpty(satisfactionList)) { list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -205,49 +205,49 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { //党员数 List partyMemberList = factRegUserAgencyMonthlyService.getOrgUserCountByCustomer(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(partyMemberList)) { + if (CollectionUtils.isNotEmpty(partyMemberList)) { list.forEach(entity -> partyMemberList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setPartyTotal(dto.getPartymemberTotal()) )); } //小组数 List groupList = factOriginGroupMainDailyService.getOrgGroupCount(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(groupList)) { + if (CollectionUtils.isNotEmpty(groupList)) { list.forEach(entity -> groupList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setGroupTotal(dto.getCount()) )); } //话题数 List topicList = factOriginTopicMainDailyService.getOrgTopicCount(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(topicList)) { + if (CollectionUtils.isNotEmpty(topicList)) { list.forEach(entity -> topicList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setTopicTotal(dto.getCount()) )); } //议题数 List issueList = factOriginIssueMainDailyService.getOrgIssueCount(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(issueList)) { + if (CollectionUtils.isNotEmpty(issueList)) { list.forEach(entity -> issueList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setIssueTotal(dto.getCount()) )); } //项目数 List projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(projectList)) { + if (CollectionUtils.isNotEmpty(projectList)) { list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> entity.setProjectTotal(dto.getCount()) )); } //结案率 结案数/项目数 List abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(abilityList)) { + if (CollectionUtils.isNotEmpty(abilityList)) { list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setCloseProjectRatio(dto.getClosedProjectRatio()) )); } //满意率 满意和非常满意占比 List satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(satisfactionList)) { + if (CollectionUtils.isNotEmpty(satisfactionList)) { list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); @@ -272,49 +272,49 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { //党员数 List partyMemberList = factRegUserAgencyMonthlyService.getOrgUserCountByCustomer(customerId, monthId, OrgTypeConstant.COMMUNITY); - if (!CollectionUtils.isEmpty(partyMemberList)) { + if (CollectionUtils.isNotEmpty(partyMemberList)) { list.forEach(entity -> partyMemberList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setPartyTotal(dto.getPartymemberTotal()) )); } //小组数 List groupList = factOriginGroupMainDailyService.getOrgGroupCount(customerId, monthId, OrgTypeConstant.DISTRICT); - if (!CollectionUtils.isEmpty(groupList)) { + if (CollectionUtils.isNotEmpty(groupList)) { list.forEach(entity -> groupList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setGroupTotal(dto.getCount()) )); } //话题数 List topicList = factOriginTopicMainDailyService.getOrgTopicCount(customerId, monthId, OrgTypeConstant.DISTRICT); - if (!CollectionUtils.isEmpty(topicList)) { + if (CollectionUtils.isNotEmpty(topicList)) { list.forEach(entity -> topicList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setTopicTotal(dto.getCount()) )); } //议题数 List issueList = factOriginIssueMainDailyService.getOrgIssueCount(customerId, monthId, OrgTypeConstant.DISTRICT); - if (!CollectionUtils.isEmpty(issueList)) { + if (CollectionUtils.isNotEmpty(issueList)) { list.forEach(entity -> issueList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setIssueTotal(dto.getCount()) )); } //项目数 List projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.DISTRICT); - if (!CollectionUtils.isEmpty(projectList)) { + if (CollectionUtils.isNotEmpty(projectList)) { list.forEach(entity -> projectList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setProjectTotal(dto.getCount()) )); } //结案率 结案数/项目数 List abilityList = factIndexGovrnAblityOrgMonthlyService.getOrgByCustomer(customerId, monthId, OrgTypeConstant.DISTRICT); - if (!CollectionUtils.isEmpty(abilityList)) { + if (CollectionUtils.isNotEmpty(abilityList)) { list.forEach(entity -> abilityList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setCloseProjectRatio(dto.getClosedProjectRatio()) )); } //满意率 满意和非常满意占比 List satisfactionList = factOriginProjectLogDailyService.getOrgSatisfaction(customerId, monthId, OrgTypeConstant.STREET); - if (!CollectionUtils.isEmpty(satisfactionList)) { + if (CollectionUtils.isNotEmpty(satisfactionList)) { list.forEach(entity -> satisfactionList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> { if (dto.getSum() != NumConstant.ZERO) { BigDecimal sum = new BigDecimal(dto.getSum()); From e106207e5821c450fee51be90593393ac98e5897 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 29 Sep 2020 14:31:48 +0800 Subject: [PATCH 4/5] =?UTF-8?q?project=5Fmain=E8=A1=A8=E7=BB=99=20CLOSED?= =?UTF-8?q?=5FSTATUS=E8=B5=8B=E5=80=BC=20=E4=B8=8EIS=5FRESOLVED=E7=9B=B8?= =?UTF-8?q?=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectMainDailyEntity.java | 2 ++ .../extract/todata/impl/ProjectExtractServiceImpl.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java index c570c4e453..3c7fe26b11 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactOriginProjectMainDailyEntity.java @@ -133,4 +133,6 @@ public class FactOriginProjectMainDailyEntity extends BaseEpmetEntity { */ private String finishOrgIds; + private String closedStatus; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 62123e45fe..70817bee01 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -92,6 +92,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { entity.setCreatedTime(DateUtils.stringToDate(pending.getDateId(), DateUtils.DATE_PATTERN_YYYYMMDD)); entity.setUpdatedTime(process.getUpdatedTime()); entity.setIsResolved(process.getIsResolved()); + entity.setClosedStatus(entity.getIsResolved()); return entity; })).collect(Collectors.toList()); @@ -139,6 +140,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { entity.setIssueId(project.getOriginId()); entity.setProjectStatus(project.getStatus()); entity.setIsResolved(project.getClosedStatus()); + entity.setClosedStatus(entity.getIsResolved()); entity.setCreatedTime(project.getCreatedTime()); entity.setUpdatedTime(project.getUpdatedTime()); entity.setPids(project.getOrgIdPath()); From 27c543b9ccb14821dfca1ef037114409dd5e28e6 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 29 Sep 2020 14:40:40 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=85=9A=E5=91=98=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/stats/user/FactParticipationUserGridDailyDao.java | 3 +-- .../extract/toscreen/impl/PartyBaseInfoServiceImpl.java | 8 ++------ .../stats/user/FactParticipationUserGridDailyService.java | 3 +-- .../impl/FactParticipationUserGridDailyServiceImpl.java | 5 ++--- .../stats/user/FactParticipationUserGridDailyDao.xml | 1 - 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java index fd0b7d2a86..35f808ce96 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java @@ -43,9 +43,8 @@ public interface FactParticipationUserGridDailyDao extends BaseDao selectUserCount(String customerId, String dateId); + List selectUserCount(String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java index f30e987bb9..2d08926ea1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java @@ -8,7 +8,6 @@ import com.epmet.service.evaluationindex.screen.ScreenCpcBaseDataService; import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService; import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService; import com.epmet.service.stats.DimCustomerPartymemberService; -import com.epmet.service.stats.user.FactParticipationUserAgencyDailyService; import com.epmet.service.stats.user.FactParticipationUserGridDailyService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.ListUtils; @@ -45,8 +44,6 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { @Autowired private FactParticipationUserGridDailyService userGridDailyService; @Autowired - private FactParticipationUserAgencyDailyService userAgencyDailyService; - @Autowired private ScreenCpcBaseDataService cpcBaseDataService; /** @@ -104,7 +101,6 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { List result = new ArrayList<>(); if (isGrid == true){ // 是 community 级别,子级为gridId - List userCountList = userGridDailyService.selectUserCount(customerId, dateId); agencyIdList.forEach(agency -> { GridPartyDTO gridPartyDTO = gridParty(customerId, dateId, agency); result.addAll(gridPartyDTO.getResult()); @@ -142,7 +138,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { }else { // 级别为 street,district,city,province List directGridIds = gridService.selectDirectGrid(orgIds); - List userCountList = userGridDailyService.selectUserCount(customerId, dateId); + List userCountList = userGridDailyService.selectUserCount(customerId); agencyIdList.forEach(agency -> { String agencyId = agency.getAgencyId(); List dGridId = new ArrayList<>(); @@ -334,7 +330,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { public GridPartyDTO gridParty(String customerId,String dateId,CustomerAgencyInfoResultDTO agency){ List result = new ArrayList<>(); List orgIds = new ArrayList<>(); - List userCountList = userGridDailyService.selectUserCount(customerId, dateId); + List userCountList = userGridDailyService.selectUserCount(customerId); // 1. 处理社区下的所有网格中的党员信息 String agencyId = agency.getAgencyId(); // 获取下级所有agencyId【根据agencyMap中的level判断下级orgId是否是gridId】(此处直接作为gridId) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridDailyService.java index 6dba137e58..2236b81b7b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridDailyService.java @@ -98,9 +98,8 @@ public interface FactParticipationUserGridDailyService extends BaseService selectUserCount(String customerId,String dateId); + List selectUserCount(String customerId); } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridDailyServiceImpl.java index 1b4e69ecc9..1749707e94 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridDailyServiceImpl.java @@ -103,13 +103,12 @@ public class FactParticipationUserGridDailyServiceImpl extends BaseServiceImpl selectUserCount(String customerId, String dateId) { - return baseDao.selectUserCount(customerId, dateId); + public List selectUserCount(String customerId) { + return baseDao.selectUserCount(customerId); } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactParticipationUserGridDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactParticipationUserGridDailyDao.xml index 96e16db5be..8e2c4b4122 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactParticipationUserGridDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactParticipationUserGridDailyDao.xml @@ -118,7 +118,6 @@ fact_participation_user_grid_daily WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} - AND DATE_ID = #{dateId}