|
@ -164,7 +164,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService |
|
|
BranchBuildTrendResultDTO result = new BranchBuildTrendResultDTO(); |
|
|
BranchBuildTrendResultDTO result = new BranchBuildTrendResultDTO(); |
|
|
//生成近十二个月的横坐标数组
|
|
|
//生成近十二个月的横坐标数组
|
|
|
Map<String,String> monthMap = dateUtils.getXpro(); |
|
|
Map<String,String> monthMap = dateUtils.getXpro(); |
|
|
result.setXAxis(monthMap.values().stream().collect(Collectors.toList())); |
|
|
result.setXAxis(new ArrayList<>(monthMap.values())); |
|
|
|
|
|
|
|
|
List<BranchTrendSeriesDataResultDTO> dataArray = new LinkedList<>(); |
|
|
List<BranchTrendSeriesDataResultDTO> dataArray = new LinkedList<>(); |
|
|
List<BranchIssueDataResultDTO> yearlyDataList = |
|
|
List<BranchIssueDataResultDTO> yearlyDataList = |
|
@ -185,15 +185,26 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService |
|
|
BranchTrendSeriesDataResultDTO data = new BranchTrendSeriesDataResultDTO(); |
|
|
BranchTrendSeriesDataResultDTO data = new BranchTrendSeriesDataResultDTO(); |
|
|
data.setName(issue); |
|
|
data.setName(issue); |
|
|
if(null != issueYearlyDataList && !issueYearlyDataList.isEmpty()){ |
|
|
if(null != issueYearlyDataList && !issueYearlyDataList.isEmpty()){ |
|
|
monthMap.keySet().forEach( monthId ->{ |
|
|
int i = 0; |
|
|
Optional<BranchIssueDataResultDTO> optional |
|
|
monthMap.keySet().forEach(monthId->{ |
|
|
|
|
|
Map<String, Integer> collect = val.stream().collect(Collectors.toMap(BranchIssueDataResultDTO::getMonthId, BranchIssueDataResultDTO::getData, (o1, o2) -> o1)); |
|
|
|
|
|
numArray.add(collect.getOrDefault(monthId,NumConstant.ZERO)); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//for (int i=0;i< monthMap.keySet().size();i++) {
|
|
|
|
|
|
String monthId = monthMap.keySet().iterator().next(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 202007
|
|
|
|
|
|
// 2007->list
|
|
|
|
|
|
/* Optional<BranchIssueDataResultDTO> optional |
|
|
= issueYearlyDataList.stream().filter(yearly -> StringUtils.equals(monthId,yearly.getMonthId())).findAny(); |
|
|
= issueYearlyDataList.stream().filter(yearly -> StringUtils.equals(monthId,yearly.getMonthId())).findAny(); |
|
|
if(optional.isPresent()){ |
|
|
if(optional.isPresent()){ |
|
|
numArray.add(optional.get().getData()); |
|
|
numArray.add(optional.get().getData()); |
|
|
}else{ |
|
|
}else{ |
|
|
numArray.add(NumConstant.ZERO); |
|
|
numArray.add(NumConstant.ZERO); |
|
|
} |
|
|
}*/ |
|
|
}); |
|
|
//}
|
|
|
}else{ |
|
|
}else{ |
|
|
for(int i = NumConstant.ZERO ; i < NumConstant.TWELVE ; i++){ |
|
|
for(int i = NumConstant.ZERO ; i < NumConstant.TWELVE ; i++){ |
|
|
numArray.add(NumConstant.ZERO); |
|
|
numArray.add(NumConstant.ZERO); |
|
@ -225,6 +236,14 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
|
DateUtils dateUtils = new DateUtils(); |
|
|
|
|
|
Map<String,String> monthMap = dateUtils.getXpro(); |
|
|
|
|
|
|
|
|
|
|
|
System.out.println(monthMap); |
|
|
|
|
|
System.out.println(monthMap.keySet().iterator().next()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description 4、支部建设情况|联建共建情况-排行 |
|
|
* @Description 4、支部建设情况|联建共建情况-排行 |
|
|
* @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321982
|
|
|
* @NEI https://nei.netease.com/interface/detail/res/?pid=57068&id=321982
|
|
|