Browse Source

街道相关优化 3

master
zxc 5 years ago
parent
commit
a203a8626d
  1. 11
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java
  2. 30
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
  3. 30
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java

11
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java

@ -51,4 +51,15 @@ public interface IndexCalConstant {
String monthId="202008";
String insertUser="yinzuomei";
String INDEX_DETAIL_LIST_NULL = "指标明细查询集合为空";
String COMMUNITY_PARTY_AVG_NULL = "查询下属所有【社区】的党建能力平均值集合为空";
String GRID_PARTY_AVG_NULL = "查询下属所有【网格】的党建能力平均值集合为空";
String STREET_PUBLISH_ARTICLE_LIST_NULL = "查询【街道】名义发文数量集合为空";
String COMMUNITY_PUBLISH_ARTICLE_LIST_NULL = "查询【社区】名义发文数量集合为空";
String INDEX_CODE_NULL = "指标Code未查询出对应字段 【 %s 】";
String STREET_GOVERN_ABILITY_NULL = "查询【街道】治理能力的六个五级指标集合为空";
String COMMUNITY_GOVERN_ABILITY_NULL = "查询【社区】治理能力的六个五级指标集合为空";
String STREET_SERVICE_ABILITY_NULL = "查询街道活动组织次数集合为空";
String COMMUNITY_SERVICE_ABILITY_NULL = "查询社区活动组织次数集合为空";
}

30
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java

@ -73,7 +73,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
// 根据all_parent_index_code 获取指标明细
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error("指标明细查询集合为空");
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false;
}
List<IndexInputVO> indexInputVOS = new ArrayList<>();
@ -83,7 +83,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) {
List<SubGridAvgResultDTO> subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(subGridPartyAvgScore)) {
log.error("查询下属所有网格的党建能力平均值集合为空");
log.error(IndexCalConstant.GRID_PARTY_AVG_NULL);
return;
}else if (subGridPartyAvgScore.size() == NumConstant.ONE){
pid.put(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),subGridPartyAvgScore.get(NumConstant.ZERO).getParentId());
@ -109,12 +109,12 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
// 社区名义发文数量
List<Map<String, Object>> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL);
if (CollectionUtils.isEmpty(publishArticleCountList)) {
log.error("查询社区名义发文数量集合为空");
log.error(IndexCalConstant.COMMUNITY_PUBLISH_ARTICLE_LIST_NULL);
return;
}
String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode());
if (StringUtils.isEmpty(fieldNameByIndexCode)) {
log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】");
log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode()));
return;
}else if (publishArticleCountList.size() == NumConstant.ONE){
pid.put(publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
@ -123,7 +123,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
}else if (publishArticleCountList.size() > NumConstant.ONE) {
List<BigDecimal> decimalList = publishArticleCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList());
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList);
List<List<Map<String, Object>>> publishArticleList = ListUtils.partition(publishArticleCountList, 10);
List<List<Map<String, Object>>> publishArticleList = ListUtils.partition(publishArticleCountList, IndexCalConstant.PAGE_SIZE);
publishArticleList.forEach( publish -> {
ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();
@ -155,7 +155,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
public Boolean communityGovernAbilityCalculate(String customerId, String monthId) {
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error("指标明细查询集合为空");
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false;
}
List<IndexInputVO> indexInputVOS = new ArrayList<>();
@ -169,7 +169,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
return;
} else if (subGridGovernAvg.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList()));
List<List<SubGridAvgResultDTO>> governAvg = ListUtils.partition(subGridGovernAvg, 10);
List<List<SubGridAvgResultDTO>> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE);
governAvg.forEach(avg -> {
List<SampleValue> index1SampleValues = new ArrayList<>();
avg.forEach(c -> {
@ -186,7 +186,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
// 治理能力的六个五级指标
List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL);
if (CollectionUtils.isEmpty(communityGovernAbility)){
log.error("查询治理能力的六个五级指标集合为空");
log.error(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL);
return;
}else if (communityGovernAbility.size() == NumConstant.ONE) {
pid.put(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
@ -195,12 +195,12 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
} else if (communityGovernAbility.size() > NumConstant.ONE) {
String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode());
if (StringUtils.isEmpty(fieldNameByIndexCode)) {
log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】");
log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode()));
return;
}
List<BigDecimal> decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList());
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList);
List<List<Map<String, Object>>> governAbilityList = ListUtils.partition(communityGovernAbility, 10);
List<List<Map<String, Object>>> governAbilityList = ListUtils.partition(communityGovernAbility, IndexCalConstant.PAGE_SIZE);
governAbilityList.forEach(governAbility -> {
ScoreCalculator<Integer> sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();
@ -232,7 +232,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
public Boolean communityServiceAbilityCalculate(String customerId, String monthId) {
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error("指标明细查询集合为空");
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false;
}
List<IndexInputVO> indexInputVOS = new ArrayList<>();
@ -247,7 +247,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
return;
} else if (subGridServiceAvg.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList()));
List<List<SubGridAvgResultDTO>> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10);
List<List<SubGridAvgResultDTO>> serviceAvgList = ListUtils.partition(subGridServiceAvg, IndexCalConstant.PAGE_SIZE);
serviceAvgList.forEach(serviceAvg -> {
BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();
@ -263,7 +263,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
} else {
List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL);
if (CollectionUtils.isEmpty(communityActivityCountList)) {
log.error("查询社区活动组织次数集合为空");
log.error(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL);
return;
}else if (communityActivityCountList.size() == NumConstant.ONE) {
pid.put(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
@ -272,12 +272,12 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
} else if (communityActivityCountList.size() > NumConstant.ONE) {
String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode());
if (StringUtils.isEmpty(fieldNameByIndexCode)) {
log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】");
log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode()));
return;
}
List<BigDecimal> decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList());
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList);
List<List<Map<String, Object>>> communityActivityList = ListUtils.partition(communityActivityCountList, 10);
List<List<Map<String, Object>>> communityActivityList = ListUtils.partition(communityActivityCountList, IndexCalConstant.PAGE_SIZE);
communityActivityList.forEach(communityActivity -> {
ScoreCalculator<Integer> sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();

30
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java

@ -101,7 +101,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
// 根据all_parent_index_code 获取指标明细
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error("指标明细查询集合为空");
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false;
}
List<IndexInputVO> indexInputVOS = new ArrayList<>();
@ -111,7 +111,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) {
List<SubCommunityAvgResultDTO> subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(subCommPartyAvgScore)) {
log.error("查询下属所有社区的党建能力平均值集合为空");
log.error(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL);
return;
}else if (subCommPartyAvgScore.size() == NumConstant.ONE){
pid.put(subCommPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),subCommPartyAvgScore.get(NumConstant.ZERO).getParentId());
@ -137,12 +137,12 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
// 街道名义发文数量
List<Map<String, Object>> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId, IndexCalConstant.STREET_LEVEL);
if (CollectionUtils.isEmpty(mapList)) {
log.error("查询街道名义发文数量集合为空");
log.error(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL);
return;
}
String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode());
if (StringUtils.isEmpty(fieldName)) {
log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】");
log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode()));
return;
}else if (mapList.size() == NumConstant.ONE){
pid.put(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),mapList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
@ -150,7 +150,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
return;
}else if (mapList.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(mapList.stream().map(m -> new BigDecimal(m.get(fieldName).toString())).collect(Collectors.toList()));
List<List<Map<String, Object>>> publishArticleList = ListUtils.partition(mapList, 10);
List<List<Map<String, Object>>> publishArticleList = ListUtils.partition(mapList, IndexCalConstant.PAGE_SIZE);
publishArticleList.forEach(publish -> {
ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();
@ -182,7 +182,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
public Boolean streetGovernAbilityCalculate(String customerId, String monthId) {
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error("指标明细查询集合为空");
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false;
}
List<IndexInputVO> indexInputVOS = new ArrayList<>();
@ -196,7 +196,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
return;
} else if (subGridGovernAvg.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList()));
List<List<SubCommunityAvgResultDTO>> governAvg = ListUtils.partition(subGridGovernAvg, 10);
List<List<SubCommunityAvgResultDTO>> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE);
governAvg.forEach(avg -> {
List<SampleValue> index1SampleValues = new ArrayList<>();
avg.forEach(c -> {
@ -213,7 +213,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
// 治理能力的六个五级指标
List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.STREET_LEVEL);
if (CollectionUtils.isEmpty(communityGovernAbility)){
log.error("查询治理能力的六个五级指标集合为空");
log.error(IndexCalConstant.STREET_GOVERN_ABILITY_NULL);
return;
}else if (communityGovernAbility.size() == NumConstant.ONE) {
pid.put(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
@ -224,12 +224,12 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
System.err.println(fieldNameByIndexCode);
System.err.println(detail.getIndexCode());
if (StringUtils.isEmpty(fieldNameByIndexCode)) {
log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】");
log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode()));
return;
}
List<BigDecimal> decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList());
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList);
List<List<Map<String, Object>>> governAbilityList = ListUtils.partition(communityGovernAbility, 10);
List<List<Map<String, Object>>> governAbilityList = ListUtils.partition(communityGovernAbility, IndexCalConstant.PAGE_SIZE);
governAbilityList.forEach(governAbility -> {
ScoreCalculator<Integer> sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();
@ -261,7 +261,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
public Boolean streetServiceAbilityCalculate(String customerId, String monthId) {
List<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (CollectionUtils.isEmpty(detailListByParentCode)) {
log.error("指标明细查询集合为空");
log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL);
return false;
}
List<IndexInputVO> indexInputVOS = new ArrayList<>();
@ -276,7 +276,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
return;
} else if (subCommServiceAvg.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList()));
List<List<SubCommunityAvgResultDTO>> serviceAvgList = ListUtils.partition(subCommServiceAvg, 10);
List<List<SubCommunityAvgResultDTO>> serviceAvgList = ListUtils.partition(subCommServiceAvg, IndexCalConstant.PAGE_SIZE);
serviceAvgList.forEach(serviceAvg -> {
BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();
@ -292,7 +292,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
} else {
List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.STREET_LEVEL);
if (CollectionUtils.isEmpty(communityActivityCountList)) {
log.error("查询街道活动组织次数集合为空");
log.error(IndexCalConstant.STREET_SERVICE_ABILITY_NULL);
return;
}else if (communityActivityCountList.size() == NumConstant.ONE) {
pid.put(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
@ -301,12 +301,12 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
} else if (communityActivityCountList.size() > NumConstant.ONE) {
String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode());
if (StringUtils.isEmpty(fieldNameByIndexCode)) {
log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】");
log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode()));
return;
}
List<BigDecimal> decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList());
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList);
List<List<Map<String, Object>>> communityActivityList = ListUtils.partition(communityActivityCountList, 10);
List<List<Map<String, Object>>> communityActivityList = ListUtils.partition(communityActivityCountList, IndexCalConstant.PAGE_SIZE);
communityActivityList.forEach(communityActivity -> {
ScoreCalculator<Integer> sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();

Loading…
Cancel
Save