Просмотр исходного кода

年度累积资金 详情

tags/24080901
PoffyZhang 1 год назад
Родитель
Сommit
d573ff1d78
2 измененных файлов: 23 добавлений и 0 удалений
  1. +21
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  2. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java

+ 21
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java Просмотреть файл

@@ -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();


+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java Просмотреть файл

@@ -6,6 +6,7 @@ import com.ningdatech.pmapi.common.enumeration.CommonEnum;
import com.ningdatech.pmapi.portrait.model.vo.TagVO;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectRenewalFundDeclaration;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import io.swagger.annotations.ApiModel;
@@ -158,6 +159,7 @@ public class ProjectLibListItemVO {

@ApiModelProperty("年度投资金额总额")
private BigDecimal annualAccumulateAmount;
private List<AnnualAmountVO> annualAccumulateAmountList;
public Boolean getNeedUploadSuperLineFile() {
UserInfoDetails userInfoDetail = LoginUserUtil.loginUserDetail();
//要满足条件 1.当前登录人是市本级单位 2.有上级条线单位 3.项目状态是待预审


Загрузка…
Отмена
Сохранить