Explorar el Código

增加立项批复时间与建设方案

master
WendyYang hace 1 año
padre
commit
2f2b042cb7
Se han modificado 2 ficheros con 22 adiciones y 8 borrados
  1. +13
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  2. +9
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java

+ 13
- 6
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java Ver fichero

@@ -6,14 +6,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.file.entity.File;
import com.ningdatech.file.service.FileService;
import com.ningdatech.pmapi.common.constant.CommonConst;
import com.ningdatech.pmapi.common.constant.RegionConst;
import com.ningdatech.pmapi.common.helper.RegionCacheHelper;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter;
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent;
import com.ningdatech.pmapi.common.util.BizUtils;
import com.ningdatech.pmapi.common.util.ExcelDownUtil;
import com.ningdatech.pmapi.common.util.StrUtils;
import com.ningdatech.pmapi.datascope.model.DataScopeDTO;
import com.ningdatech.pmapi.datascope.utils.DataScopeUtil;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
@@ -22,7 +23,6 @@ import com.ningdatech.pmapi.projectlib.helper.ProjectHelper;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectRenewalFundDeclaration;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectStatusChange;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
import com.ningdatech.pmapi.projectlib.model.vo.AnnualAmountVO;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO;
@@ -62,6 +62,7 @@ public class ProjectLibManage {
private final ProcessExecuteChainHandle processExecuteHandle;
private final INdProjectStatusChangeService projectStatusChangeService;
private final RegionCacheHelper regionCacheHelper;
private final FileService fileService;

private final UserInfoHelper userInfoHelper;

@@ -176,9 +177,15 @@ public class ProjectLibManage {
);
vo.setAnnualAccumulateAmountList(annualAmounts);
}
if (StrUtils.isNotBlank(vo.getApprovedConstructionPlanFile())) {
ProjectStatusChange approved = projectStatusChangeService.getByProjectStatus(ProjectStatusChangeEvent.PROJECT_APPROVAL, projectId);
vo.setApprovedTime(approved.getCreateOn());
// 处理文件名
List<Long> fileIdList = new ArrayList<>();
BizUtils.notBlank(vo.getApprovedFile(), w -> fileIdList.add(Long.parseLong(w)));
BizUtils.notBlank(vo.getApprovedConstructionPlanFileName(), w -> fileIdList.add(Long.parseLong(w)));
if (!fileIdList.isEmpty()) {
List<File> files = fileService.listByIds(fileIdList);
Map<String, String> fileMap = CollUtils.listToMap(files, w -> w.getId().toString(), File::getOriginalFileName);
vo.setApprovedFileName(fileMap.get(vo.getApprovedFile()));
vo.setApprovedConstructionPlanFileName(fileMap.get(vo.getApprovedConstructionPlanFile()));
}
return vo;
}


+ 9
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java Ver fichero

@@ -9,6 +9,7 @@ import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@@ -253,15 +254,21 @@ public class ProjectDetailVO {
@ApiModelProperty("立项批复建设方案文件")
private String approvedConstructionPlanFile;

@ApiModelProperty("立项批复建设方案文件名")
private String approvedConstructionPlanFileName;

@ApiModelProperty("立项批复文件")
private String approvedFile;

@ApiModelProperty("立项批复时间")
private LocalDateTime approvedTime;
@ApiModelProperty("立项批复文件名")
private String approvedFileName;

@ApiModelProperty("批复金额")
private BigDecimal approvedTotalInvestmentIncrease;

@ApiModelProperty("立项批复时间")
private LocalDate approvalDate;

@ApiModelProperty("是否有上级条线主管部门 0没有 1有")
private Integer isHigherSuperOrg;



Cargando…
Cancelar
Guardar