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