Bladeren bron

运维 草稿箱

tags/24080901
PoffyZhang 1 jaar geleden
bovenliggende
commit
7e6424be91
1 gewijzigde bestanden met toevoegingen van 37 en 0 verwijderingen
  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 Bestand weergeven

@@ -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;
}


Laden…
Annuleren
Opslaan