|
|
@ -904,6 +904,9 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
//只要入库项目
|
|
|
|
projectInfo.setType("1"); |
|
|
|
ProjectInfoAuthSelect projectInfoAuthSelect = CommonUtils.setGetProjectInfoAuth(projectInfo); |
|
|
|
|
|
|
|
//获取全部
|
|
|
|
|
|
|
|
IPage<DimensionPageOV> pageSorted = projectinfoMapper.getDimensionPageSorted(page, projectInfoAuthSelect, orderBy, orderDir); |
|
|
|
|
|
|
|
List<DimensionPageOV> records = pageSorted.getRecords(); |
|
|
@ -977,7 +980,7 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
|
|
|
|
//根据改革所属任务或行政区返回统计结果
|
|
|
|
@Override |
|
|
|
public CountByConditionOV countByCondition(String condition) { |
|
|
|
public CountByConditionOV countByCondition(String condition,String orderBy,String orderDir) { |
|
|
|
HuzhouProjectinfo projectInfo = new HuzhouProjectinfo(); |
|
|
|
//只要入库项目
|
|
|
|
projectInfo.setType("1"); |
|
|
@ -1024,8 +1027,27 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
//各种类资金总额和执行率,from fund
|
|
|
|
NewFundOV totalFund = this.getFund(allProjectIds); |
|
|
|
FundByKindOV fundByTypeResponse = this.modelChange(totalFund); |
|
|
|
CountByConditionOV result = CountByConditionOV.builder().totalProgress(totalProgress).progress(progressResponse) |
|
|
|
.countFundByCondition(fundByConditionResponse).countFundByFundType(fundByTypeResponse).build(); |
|
|
|
//进度排序
|
|
|
|
List<ProjectProgressOV> sortedProgressResponse = progressResponse.stream().sorted(Comparator.comparing(ProjectProgressOV::getProjectProgress).reversed()).collect(Collectors.toList());; |
|
|
|
|
|
|
|
if(Objects.equals(orderBy, "projectProgress")&& Objects.equals(orderDir, "descend")){ |
|
|
|
sortedProgressResponse=progressResponse.stream().sorted(Comparator.comparing(ProjectProgressOV::getProjectProgress).reversed()).collect(Collectors.toList()); |
|
|
|
} else if (Objects.equals(orderBy, "projectProgress") && Objects.equals(orderDir, "ascend")) { |
|
|
|
sortedProgressResponse=progressResponse.stream().sorted(Comparator.comparing(ProjectProgressOV::getProjectProgress)).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
//资金执行率和上级资金执行率排序
|
|
|
|
List<FundByConditionOV> sortedFundByConditionResponse = fundByConditionResponse.stream().sorted(Comparator.comparing(FundByConditionOV::getPaymentExecutionRate).reversed()).collect(Collectors.toList());; |
|
|
|
if (Objects.equals(orderBy, "paymentExecutionRate")&& Objects.equals(orderDir, "descend")){ |
|
|
|
sortedFundByConditionResponse=fundByConditionResponse.stream().sorted(Comparator.comparing(FundByConditionOV::getPaymentExecutionRate).reversed()).collect(Collectors.toList()); |
|
|
|
} else if (Objects.equals(orderBy, "paymentExecutionRate") && Objects.equals(orderDir, "ascend")) { |
|
|
|
sortedFundByConditionResponse=fundByConditionResponse.stream().sorted(Comparator.comparing(FundByConditionOV::getPaymentExecutionRate)).collect(Collectors.toList()); |
|
|
|
}else if (Objects.equals(orderBy, "superiorFundExecutionRate")&& Objects.equals(orderDir, "descend")){ |
|
|
|
sortedFundByConditionResponse=fundByConditionResponse.stream().sorted(Comparator.comparing(FundByConditionOV::getSuperiorFundExecutionRate).reversed()).collect(Collectors.toList()); |
|
|
|
} else if (Objects.equals(orderBy, "superiorFundExecutionRate") && Objects.equals(orderDir, "ascend")) { |
|
|
|
sortedFundByConditionResponse=fundByConditionResponse.stream().sorted(Comparator.comparing(FundByConditionOV::getSuperiorFundExecutionRate)).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
CountByConditionOV result = CountByConditionOV.builder().totalProgress(totalProgress).progress(sortedProgressResponse) |
|
|
|
.countFundByCondition(sortedFundByConditionResponse).countFundByFundType(fundByTypeResponse).build(); |
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|