From 55aa6212eed862f5095cd942ba193edecd367af4 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Mon, 14 Aug 2023 17:48:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=AD=E5=BB=BA=E9=A1=B9=E7=9B=AE=E9=87=91?= =?UTF-8?q?=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/ProjectRenewalFundManage.java | 27 ++++++++++++++++++++++ .../model/vo/ProjectRenewalFundDeclarationVO.java | 4 ++++ wps-convert/HELP.md | 10 ++++++++ 3 files changed, 41 insertions(+) create mode 100644 wps-convert/HELP.md diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java index 8fae0d3..aff05ce 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java @@ -2,7 +2,9 @@ package com.ningdatech.pmapi.projectlib.manage; import cn.hutool.core.util.StrUtil; import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.google.common.collect.Lists; import com.ningdatech.basic.exception.BizException; import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.model.PageVo; @@ -22,6 +24,7 @@ import com.ningdatech.pmapi.projectlib.model.entity.ProjectRenewalFundDeclaratio import com.ningdatech.pmapi.projectlib.model.po.ProjectRenewalFundDeclarationPO; import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalAuditReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectRenewalListReq; +import com.ningdatech.pmapi.projectlib.model.vo.AnnualAmountVO; import com.ningdatech.pmapi.projectlib.model.vo.ProjectRenewalFundDeclarationVO; import com.ningdatech.pmapi.projectlib.service.IProjectRenewalFundDeclarationService; import com.ningdatech.pmapi.projectlib.service.IProjectService; @@ -37,6 +40,7 @@ import java.io.IOException; import java.time.LocalDateTime; import java.util.List; import java.util.Objects; +import java.util.Optional; import java.util.stream.Collectors; /** @@ -100,6 +104,29 @@ public class ProjectRenewalFundManage { vo.setStatus(project.getStatus()); vo.setBuildOrgName(project.getBuildOrgName()); vo.setAnnualPaymentAmount(project.getAnnualPlanAmount()); + if (ProjectStatusEnum.ACCEPTED.getCode().equals(project.getStatus())) { + List annualAmounts = Lists.newArrayList(); + annualAmounts.add(AnnualAmountVO.builder() + .projectId(project.getId()) + .projectYear(project.getProjectYear()) + .annualAmount(project.getAnnualPlanAmount()) + .build()); + List renewalDeclarations = projectRenewalFundDeclarationService.list(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) + .eq(ProjectRenewalFundDeclaration::getProjectId, vo.getId()) + .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(project.getId()) + .projectYear(declaration.getProjectYear()) + .annualAmount(declaration.getAnnualPaymentAmount()) + .build()); + }) + ); + vo.setAnnualAccumulateAmountList(annualAmounts); + } return vo; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectRenewalFundDeclarationVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectRenewalFundDeclarationVO.java index cf9229d..c530fe0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectRenewalFundDeclarationVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectRenewalFundDeclarationVO.java @@ -7,6 +7,7 @@ import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDateTime; +import java.util.List; /** *

@@ -87,4 +88,7 @@ public class ProjectRenewalFundDeclarationVO implements Serializable { @ApiModelProperty("审核意见") private String auditOpinion; + + @ApiModelProperty("年度投资金额详情") + private List annualAccumulateAmountList; } diff --git a/wps-convert/HELP.md b/wps-convert/HELP.md new file mode 100644 index 0000000..e61384b --- /dev/null +++ b/wps-convert/HELP.md @@ -0,0 +1,10 @@ +# Getting Started + +### Reference Documentation + +For further reference, please consider the following sections: + +* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html) +* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.7.14/maven-plugin/reference/html/) +* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.7.14/maven-plugin/reference/html/#build-image) +