diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index a0c13a9..1f2833c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -13,6 +13,7 @@ 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.BizConst; import com.ningdatech.pmapi.common.constant.CommonConst; import com.ningdatech.pmapi.common.constant.RegionConst; import com.ningdatech.pmapi.common.enumeration.CommonEnum; @@ -30,6 +31,12 @@ import com.ningdatech.pmapi.filemanage.service.INdProjectApplyBorrowService; import com.ningdatech.pmapi.organization.model.entity.DingOrganization; import com.ningdatech.pmapi.organization.service.IDingOrganizationService; import com.ningdatech.pmapi.projectdeclared.model.dto.DelayedApplyDTO; +import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; +import com.ningdatech.pmapi.projectdeclared.model.entity.Purchase; +import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; +import com.ningdatech.pmapi.projectdeclared.service.IContractService; +import com.ningdatech.pmapi.projectdeclared.service.IPurchaseService; import com.ningdatech.pmapi.projectdeclared.utils.GenerateProjectCodeUtil; import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; @@ -86,7 +93,9 @@ public class ProjectLibManage { private final INdProjectDelayApplyService projectDelayApplyService; private final INdProjectApplyBorrowService projectApplyBorrowService; private final IDingOrganizationService dingOrganizationService; - private final UserInfoHelper userInfoHelper; + private final IContractService contractService; + + private final IPurchaseService purchaseService; public PageVo projectLibList(ProjectListReq req) { LambdaQueryWrapper query = ProjectHelper.projectQuery(req); @@ -500,7 +509,7 @@ public class ProjectLibManage { */ public ProjectDetailVO getProjectDetail(Long projectId) { // 查询项目申报信息 - Project projectInfo = projectService.getById(projectId); + Project projectInfo = projectService.getNewProject(projectId); if (Objects.isNull(projectInfo)) { return null; } @@ -515,6 +524,22 @@ public class ProjectLibManage { ProjectHelper::convertVO) )); + List allVersionProjectId = projectService.getAllVersionProjectId(projectInfo); + //查询采购备案 + Purchase purchase = purchaseService.getOne(Wrappers.lambdaQuery(Purchase.class) + .in(Purchase::getProjectId, allVersionProjectId) + .last(BizConst.LIMIT_1)); + vo.setPurchase(BeanUtil.copyProperties(purchase, PurchaseVO.class)); + + //查询合同备案 + Contract contract = contractService.getOne(Wrappers.lambdaQuery(Contract.class) + .in(Contract::getProjectId, allVersionProjectId) + .last(BizConst.LIMIT_1)); + vo.setContract(BeanUtil.copyProperties(contract, ContractVO.class)); + + //查询初验信息 + //查询终验信息 + //查询年度投资金额 要是已验收的项目 if (ProjectStatusEnum.ACCEPTED.getCode().equals(projectInfo.getStatus())) { List annualAmounts = Lists.newArrayList(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java index 4377ffc..547a6af 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java @@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.annotation.JSONField; import com.fasterxml.jackson.annotation.JsonFormat; import com.ningdatech.pmapi.common.util.BizUtils; +import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; +import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -354,6 +357,11 @@ public class ProjectDetailVO { @ApiModelProperty("合同总金额") private BigDecimal contractAmount; + @ApiModelProperty("合同信息") + private ContractVO contract; + + @ApiModelProperty("采购信息") + private PurchaseVO purchase; public String getProjectTypeName() { if (Objects.nonNull(this.projectType)) {