|
|
@@ -173,8 +173,10 @@ public class ProjectLibManage { |
|
|
|
if(finalRenewalMap.containsKey(item.getId())){ |
|
|
|
List<ProjectRenewalFundDeclaration> prfs = finalRenewalMap.get(item.getId()); |
|
|
|
item.setAnnualAccumulateAmount(computeAmount(w.getAnnualPlanAmount(),prfs)); |
|
|
|
item.setAnnualAccumulateAmountList(convertAccmulate(w,prfs)); |
|
|
|
}else{ |
|
|
|
item.setAnnualAccumulateAmount(w.getAnnualPlanAmount()); |
|
|
|
item.setAnnualAccumulateAmountList(convertAccmulate(w,Collections.emptyList())); |
|
|
|
} |
|
|
|
return item; |
|
|
|
}); |
|
|
@@ -257,8 +259,10 @@ public class ProjectLibManage { |
|
|
|
if(finalRenewalMap.containsKey(item.getId())){ |
|
|
|
List<ProjectRenewalFundDeclaration> prfs = finalRenewalMap.get(item.getId()); |
|
|
|
item.setAnnualAccumulateAmount(computeAmount(w.getAnnualPlanAmount(),prfs)); |
|
|
|
item.setAnnualAccumulateAmountList(convertAccmulate(w,prfs)); |
|
|
|
}else{ |
|
|
|
item.setAnnualAccumulateAmount(w.getAnnualPlanAmount()); |
|
|
|
item.setAnnualAccumulateAmountList(convertAccmulate(w,Collections.emptyList())); |
|
|
|
} |
|
|
|
return item; |
|
|
|
}); |
|
|
@@ -273,6 +277,23 @@ public class ProjectLibManage { |
|
|
|
return res; |
|
|
|
} |
|
|
|
|
|
|
|
private List<AnnualAmountVO> convertAccmulate(Project project,List<ProjectRenewalFundDeclaration> prfs) { |
|
|
|
List<AnnualAmountVO> annualAmounts = Lists.newArrayList(); |
|
|
|
annualAmounts.add(AnnualAmountVO.builder() |
|
|
|
.projectId(project.getId()) |
|
|
|
.projectYear(project.getProjectYear()) |
|
|
|
.annualAmount(project.getAnnualPlanAmount()) |
|
|
|
.build()); |
|
|
|
for(ProjectRenewalFundDeclaration prf : prfs){ |
|
|
|
annualAmounts.add(AnnualAmountVO.builder() |
|
|
|
.projectId(prf.getProjectId()) |
|
|
|
.projectYear(prf.getProjectYear()) |
|
|
|
.annualAmount(prf.getAnnualPaymentAmount()) |
|
|
|
.build()); |
|
|
|
} |
|
|
|
return annualAmounts; |
|
|
|
} |
|
|
|
|
|
|
|
private void setTag(ProjectLibListItemVO item, Map<String, List<ProjectTag>> finalTagMap, Map<Long, String> finalTagNameMap) { |
|
|
|
if(finalTagMap.containsKey(item.getProjectCode())){ |
|
|
|
List<TagVO> tags = Lists.newArrayList(); |
|
|
|