瀏覽代碼

续建项目金额

master
PoffyZhang 1 年之前
父節點
當前提交
55aa6212ee
共有 3 個檔案被更改,包括 41 行新增0 行删除
  1. +27
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectRenewalFundManage.java
  2. +4
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectRenewalFundDeclarationVO.java
  3. +10
    -0
      wps-convert/HELP.md

+ 27
- 0
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<AnnualAmountVO> annualAmounts = Lists.newArrayList();
annualAmounts.add(AnnualAmountVO.builder()
.projectId(project.getId())
.projectYear(project.getProjectYear())
.annualAmount(project.getAnnualPlanAmount())
.build());
List<ProjectRenewalFundDeclaration> 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;
}



+ 4
- 0
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;

/**
* <p>
@@ -87,4 +88,7 @@ public class ProjectRenewalFundDeclarationVO implements Serializable {

@ApiModelProperty("审核意见")
private String auditOpinion;

@ApiModelProperty("年度投资金额详情")
private List<AnnualAmountVO> annualAccumulateAmountList;
}

+ 10
- 0
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)


Loading…
取消
儲存