Browse Source

代码优化

dev_shibei_match
zhaoqifeng 5 years ago
parent
commit
df57b70422
  1. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java
  2. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java
  3. 34
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/GovernRankDataExtractServiceImpl.java
  4. 56
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java

4
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<OrgStatisticsResultDTO> 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());

2
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;

34
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<FactIndexGovrnAblityGridMonthlyEntity> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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());

56
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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<FactIndexGovrnAblityGridMonthlyEntity> 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<OrgStatisticsResultDTO> 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<FactRegUserAgencyMonthlyDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<FactIndexGovrnAblityOrgMonthlyEntity> 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<OrgStatisticsResultDTO> 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<FactRegUserAgencyMonthlyDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<FactIndexGovrnAblityOrgMonthlyEntity> 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<OrgStatisticsResultDTO> 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<FactRegUserAgencyMonthlyDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<OrgStatisticsResultDTO> 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<FactIndexGovrnAblityOrgMonthlyEntity> 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<OrgStatisticsResultDTO> 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());

Loading…
Cancel
Save