Преглед изворни кода

合同和采购信息

master
PoffyZhang пре 1 година
родитељ
комит
69fb669ebf
2 измењених фајлова са 35 додато и 2 уклоњено
  1. +27
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  2. +8
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java

+ 27
- 2
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<ProjectLibListItemVO> projectLibList(ProjectListReq req) {
LambdaQueryWrapper<Project> 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<Long> 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<AnnualAmountVO> annualAmounts = Lists.newArrayList();


+ 8
- 0
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)) {


Loading…
Откажи
Сачувај