瀏覽代碼

运维 草稿箱

master
PoffyZhang 1 年之前
父節點
當前提交
7e6424be91
共有 1 個文件被更改,包括 37 次插入0 次删除
  1. +37
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java

+ 37
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java 查看文件

@@ -115,6 +115,9 @@ public class ProjectRenewalFundManage {
GovBizProjectBaseinfo baseinfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class)
.eq(GovBizProjectBaseinfo::getBaseProjId, renewal.getProjectCode())
.last(BizConst.LIMIT_1));
GovOperationProjectBaseinfo operationBaseinfo = operationProjectBaseinfoService.getOne(Wrappers.lambdaQuery(GovOperationProjectBaseinfo.class)
.eq(GovOperationProjectBaseinfo::getBaseProjId, renewal.getProjectCode())
.last(BizConst.LIMIT_1));
GovBizProjectApply apply = applyService.getOne(Wrappers.lambdaQuery(GovBizProjectApply.class)
.eq(GovBizProjectApply::getBaseProjId, renewal.getProjectCode())
.last(BizConst.LIMIT_1));
@@ -186,6 +189,40 @@ public class ProjectRenewalFundManage {
})
);
vo.setAnnualAccumulateAmountList(annualAmounts);
}else if(Objects.nonNull(operationBaseinfo)){
if(Objects.nonNull(approve)){
vo.setApprovalAmount(approve.getBaseInitialReviewTotalMoney());
}
vo.setProjectName(operationBaseinfo.getBaseProjName());
vo.setProjectType(operationBaseinfo.getBaseProjType());
// vo.setStage(project.getStage());
vo.setStatus(StringUtils.isNotBlank(operationBaseinfo.getBaseProjSetProg()) ?
Integer.parseInt(operationBaseinfo.getBaseProjSetProg()) : null);
vo.setBuildOrgName(operationBaseinfo.getBaseBuildDeprt());
vo.setAnnualPaymentAmount(renewal.getAnnualPaymentAmount());
List<AnnualAmountVO> annualAmounts = Lists.newArrayList();
annualAmounts.add(AnnualAmountVO.builder()
.projectId(operationBaseinfo.getId())
.projectCode(operationBaseinfo.getBaseProjId())
.projectYear(StringUtils.isNotBlank(apply.getBaseProjSetYear()) ? Integer.parseInt(apply.getBaseProjSetYear()) : null)
.annualAmount(apply.getBaseProjDeclAmount())
.build());
List<ProjectRenewalFundDeclaration> renewalDeclarations = projectRenewalFundDeclarationService.list(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class)
.eq(ProjectRenewalFundDeclaration::getProjectCode, vo.getProjectCode())
.eq(ProjectRenewalFundDeclaration::getApprovalStatus, ProjectRenewalApprovalStatusEnum.PASS.name())
.eq(ProjectRenewalFundDeclaration::getDeleted,Boolean.FALSE)
.orderByAsc(ProjectRenewalFundDeclaration::getProjectYear));
Optional.ofNullable(renewalDeclarations).ifPresent(declarations ->
declarations.forEach(declaration -> {
annualAmounts.add(AnnualAmountVO.builder()
.projectId(operationBaseinfo.getId())
.projectCode(operationBaseinfo.getBaseProjId())
.projectYear(declaration.getProjectYear())
.annualAmount(declaration.getAnnualPaymentAmount())
.build());
})
);
vo.setAnnualAccumulateAmountList(annualAmounts);
}
return vo;
}


Loading…
取消
儲存