|
@@ -66,10 +66,7 @@ import com.hz.pm.api.projectlib.model.enumeration.TenderStatusEnum; |
|
|
import com.hz.pm.api.projectlib.model.po.ProjectPO; |
|
|
import com.hz.pm.api.projectlib.model.po.ProjectPO; |
|
|
import com.hz.pm.api.projectlib.model.req.ProjectApplicationListReq; |
|
|
import com.hz.pm.api.projectlib.model.req.ProjectApplicationListReq; |
|
|
import com.hz.pm.api.projectlib.model.req.ProjectListReq; |
|
|
import com.hz.pm.api.projectlib.model.req.ProjectListReq; |
|
|
import com.hz.pm.api.projectlib.model.vo.AnnualAmountVO; |
|
|
|
|
|
import com.hz.pm.api.projectlib.model.vo.ProjectApplicationVO; |
|
|
|
|
|
import com.hz.pm.api.projectlib.model.vo.ProjectDetailVO; |
|
|
|
|
|
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; |
|
|
|
|
|
|
|
|
import com.hz.pm.api.projectlib.model.vo.*; |
|
|
import com.hz.pm.api.projectlib.service.*; |
|
|
import com.hz.pm.api.projectlib.service.*; |
|
|
import com.hz.pm.api.safety.model.entity.PersonSafetyInfo; |
|
|
import com.hz.pm.api.safety.model.entity.PersonSafetyInfo; |
|
|
import com.hz.pm.api.safety.model.entity.SupplierSafetyQualification; |
|
|
import com.hz.pm.api.safety.model.entity.SupplierSafetyQualification; |
|
@@ -149,6 +146,8 @@ public class ProjectLibManage { |
|
|
private final ConstructionManage constructionManage; |
|
|
private final ConstructionManage constructionManage; |
|
|
private final IProjectGovSystemReplaceInfosService projectGovSystemReplaceInfosService; |
|
|
private final IProjectGovSystemReplaceInfosService projectGovSystemReplaceInfosService; |
|
|
private final MhUnitCache mhUnitCache; |
|
|
private final MhUnitCache mhUnitCache; |
|
|
|
|
|
private final IMhProjectSchemaTargetDataService projectSchemaTargetDataService; |
|
|
|
|
|
private final IMhProjectService mhProjectService; |
|
|
|
|
|
|
|
|
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { |
|
|
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { |
|
|
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); |
|
|
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); |
|
@@ -699,9 +698,9 @@ public class ProjectLibManage { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private ProjectDetailVO getProjectDetailLogic(Project project) { |
|
|
private ProjectDetailVO getProjectDetailLogic(Project project) { |
|
|
ProjectDetailVO vo = new ProjectDetailVO(); |
|
|
|
|
|
BeanUtils.copyProperties(project, vo); |
|
|
|
|
|
vo.buildDynamicForm(project.getDynamicForm()); |
|
|
|
|
|
|
|
|
ProjectDetailVO retProjectDetail = new ProjectDetailVO(); |
|
|
|
|
|
BeanUtils.copyProperties(project, retProjectDetail); |
|
|
|
|
|
retProjectDetail.buildDynamicForm(project.getDynamicForm()); |
|
|
String projectCode = project.getProjectCode(); |
|
|
String projectCode = project.getProjectCode(); |
|
|
// 查询应用 |
|
|
// 查询应用 |
|
|
List<ProjectApplication> applications = applicationService.list(projectCode, project.getVersion(), project.getIsConstruct()); |
|
|
List<ProjectApplication> applications = applicationService.list(projectCode, project.getVersion(), project.getIsConstruct()); |
|
@@ -712,20 +711,20 @@ public class ProjectLibManage { |
|
|
if (CollUtil.isNotEmpty(applicationIds)) { |
|
|
if (CollUtil.isNotEmpty(applicationIds)) { |
|
|
List<ProjectCoreBusinessIndicators> coreBizs = projectCoreBusinessIndicatorsService.listByApplicationIds(applicationIds); |
|
|
List<ProjectCoreBusinessIndicators> coreBizs = projectCoreBusinessIndicatorsService.listByApplicationIds(applicationIds); |
|
|
Map<Long, List<ProjectCoreBusinessIndicators>> coreBizMap = CollUtils.group(coreBizs, ProjectCoreBusinessIndicators::getApplicationId); |
|
|
Map<Long, List<ProjectCoreBusinessIndicators>> coreBizMap = CollUtils.group(coreBizs, ProjectCoreBusinessIndicators::getApplicationId); |
|
|
vo.setProjectApplications(CollUtils.convert(applications, app -> ProjectHelper.convertVOWithMap(app, coreBizMap))); |
|
|
|
|
|
|
|
|
retProjectDetail.setProjectApplications(CollUtils.convert(applications, app -> ProjectHelper.convertVOWithMap(app, coreBizMap))); |
|
|
} |
|
|
} |
|
|
vo.setSystemReplaceInfos(getGovSystemReplaceInfos(project.getId())); |
|
|
|
|
|
|
|
|
retProjectDetail.setSystemReplaceInfos(getGovSystemReplaceInfos(project.getId())); |
|
|
//审批信息 |
|
|
//审批信息 |
|
|
if (StrUtils.isNotBlank(project.getInstCode())) { |
|
|
if (StrUtils.isNotBlank(project.getInstCode())) { |
|
|
ProcessDetailReq req = new ProcessDetailReq(); |
|
|
ProcessDetailReq req = new ProcessDetailReq(); |
|
|
req.setInstanceId(project.getInstCode()); |
|
|
req.setInstanceId(project.getInstCode()); |
|
|
req.setProjectId(project.getId()); |
|
|
req.setProjectId(project.getId()); |
|
|
vo.setProcess(todoService.getProcessDetail(req)); |
|
|
|
|
|
|
|
|
retProjectDetail.setProcess(todoService.getProcessDetail(req)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
List<Long> allVersionProjectIds = projectService.allVersionProjectIds(projectCode); |
|
|
List<Long> allVersionProjectIds = projectService.allVersionProjectIds(projectCode); |
|
|
// 查询采购备案 |
|
|
// 查询采购备案 |
|
|
vo.setPurchaseDetails(new ArrayList<>()); |
|
|
|
|
|
|
|
|
retProjectDetail.setPurchaseDetails(new ArrayList<>()); |
|
|
List<Purchase> purchases = purchaseService.listByProjectIds(allVersionProjectIds); |
|
|
List<Purchase> purchases = purchaseService.listByProjectIds(allVersionProjectIds); |
|
|
if (!purchases.isEmpty()) { |
|
|
if (!purchases.isEmpty()) { |
|
|
Map<Long, PurchaseVO> purchaseMap = CollUtils.listToMap(purchases, Purchase::getId, w -> { |
|
|
Map<Long, PurchaseVO> purchaseMap = CollUtils.listToMap(purchases, Purchase::getId, w -> { |
|
@@ -754,13 +753,20 @@ public class ProjectLibManage { |
|
|
if (tmpPersons != null) { |
|
|
if (tmpPersons != null) { |
|
|
purchaseFullInfo.setFirstInspectedPersons(convertPersons(tmpPersons)); |
|
|
purchaseFullInfo.setFirstInspectedPersons(convertPersons(tmpPersons)); |
|
|
} |
|
|
} |
|
|
vo.getPurchaseDetails().add(purchaseFullInfo); |
|
|
|
|
|
|
|
|
retProjectDetail.getPurchaseDetails().add(purchaseFullInfo); |
|
|
|
|
|
}); |
|
|
|
|
|
// 建设方案 |
|
|
|
|
|
mhProjectService.getIdByProjectCode(projectCode).ifPresent(w -> { |
|
|
|
|
|
MhProjectSchemaTargetData schemaTargetData = projectSchemaTargetDataService.getByMhProjectId(w); |
|
|
|
|
|
ConstructionDetailVO construction = new ConstructionDetailVO(); |
|
|
|
|
|
BeanUtil.copyProperties(schemaTargetData, construction); |
|
|
|
|
|
retProjectDetail.setConstruction(construction); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<ProjectAnnualPaymentPlan> annualPaymentPlans = projectAnnualPaymentPlanService.listByProjectId(project.getId()); |
|
|
List<ProjectAnnualPaymentPlan> annualPaymentPlans = projectAnnualPaymentPlanService.listByProjectId(project.getId()); |
|
|
vo.setAnnualPaymentPlans(BeanUtil.copyToList(annualPaymentPlans, ProjectPaymentPlanDTO.class)); |
|
|
|
|
|
|
|
|
retProjectDetail.setAnnualPaymentPlans(BeanUtil.copyToList(annualPaymentPlans, ProjectPaymentPlanDTO.class)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SafetyMonitorVO safetyVo = new SafetyMonitorVO(); |
|
|
SafetyMonitorVO safetyVo = new SafetyMonitorVO(); |
|
@@ -769,7 +775,7 @@ public class ProjectLibManage { |
|
|
if (CollUtil.isNotEmpty(safetyQualifications)) { |
|
|
if (CollUtil.isNotEmpty(safetyQualifications)) { |
|
|
safetyVo.setSupplierSafetyQualification(BeanUtil.copyToList(safetyQualifications, SupplierSafetyQualificationVO.class)); |
|
|
safetyVo.setSupplierSafetyQualification(BeanUtil.copyToList(safetyQualifications, SupplierSafetyQualificationVO.class)); |
|
|
} |
|
|
} |
|
|
vo.setSafetyInfo(safetyVo); |
|
|
|
|
|
|
|
|
retProjectDetail.setSafetyInfo(safetyVo); |
|
|
|
|
|
|
|
|
List<PersonSafetyInfo> personSafetyInfos = personSafetyInfoService.listByProjectCode(projectCode); |
|
|
List<PersonSafetyInfo> personSafetyInfos = personSafetyInfoService.listByProjectCode(projectCode); |
|
|
if (CollUtil.isNotEmpty(personSafetyInfos)) { |
|
|
if (CollUtil.isNotEmpty(personSafetyInfos)) { |
|
@@ -777,27 +783,27 @@ public class ProjectLibManage { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 查询终验信息 |
|
|
// 查询终验信息 |
|
|
vo.setFinalIrsApps(applicationHandler.generateIrsApp(projectCode)); |
|
|
|
|
|
|
|
|
retProjectDetail.setFinalIrsApps(applicationHandler.generateIrsApp(projectCode)); |
|
|
|
|
|
|
|
|
// 处理文件名 |
|
|
// 处理文件名 |
|
|
List<Long> fileIdList = new ArrayList<>(); |
|
|
List<Long> fileIdList = new ArrayList<>(); |
|
|
BizUtils.notBlank(vo.getApprovedFile(), w -> fileIdList.add(Long.parseLong(w))); |
|
|
|
|
|
BizUtils.notBlank(vo.getApprovedConstructionPlanFile(), w -> fileIdList.add(Long.parseLong(w))); |
|
|
|
|
|
|
|
|
BizUtils.notBlank(retProjectDetail.getApprovedFile(), w -> fileIdList.add(Long.parseLong(w))); |
|
|
|
|
|
BizUtils.notBlank(retProjectDetail.getApprovedConstructionPlanFile(), w -> fileIdList.add(Long.parseLong(w))); |
|
|
if (!fileIdList.isEmpty()) { |
|
|
if (!fileIdList.isEmpty()) { |
|
|
List<File> files = fileService.listByIds(fileIdList); |
|
|
List<File> files = fileService.listByIds(fileIdList); |
|
|
Map<String, String> fileMap = CollUtils.listToMap(files, w -> w.getId().toString(), File::getOriginalFileName); |
|
|
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())); |
|
|
|
|
|
|
|
|
retProjectDetail.setApprovedFileName(fileMap.get(retProjectDetail.getApprovedFile())); |
|
|
|
|
|
retProjectDetail.setApprovedConstructionPlanFileName(fileMap.get(retProjectDetail.getApprovedConstructionPlanFile())); |
|
|
} |
|
|
} |
|
|
//专家评审 其它建议 -> 建设方案的会议 |
|
|
//专家评审 其它建议 -> 建设方案的会议 |
|
|
ExpertReview finalReview = expertReviewService.getFinalReview(projectCode, |
|
|
ExpertReview finalReview = expertReviewService.getFinalReview(projectCode, |
|
|
ReviewTemplateTypeEnum.CONSTRUCTION_SCHEME_REVIEW.getCode()); |
|
|
ReviewTemplateTypeEnum.CONSTRUCTION_SCHEME_REVIEW.getCode()); |
|
|
|
|
|
|
|
|
if (Objects.nonNull(finalReview)) { |
|
|
if (Objects.nonNull(finalReview)) { |
|
|
vo.setProposeAttach(finalReview.getOtherAdvice()); |
|
|
|
|
|
vo.setBaseReviewResults(finalReview.getReviewResult()); |
|
|
|
|
|
|
|
|
retProjectDetail.setProposeAttach(finalReview.getOtherAdvice()); |
|
|
|
|
|
retProjectDetail.setBaseReviewResults(finalReview.getReviewResult()); |
|
|
} |
|
|
} |
|
|
return vo; |
|
|
|
|
|
|
|
|
return retProjectDetail; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|