feat(项目管理产品需求重构): 完善产品里程碑

查询需求规格列表时返回关联的产品计划

Signed-off-by: OTTO <731554297@qq.com>
This commit is contained in:
OTTO 2024-12-16 08:49:14 +08:00
parent e063d79c50
commit 0fbd7abc10
3 changed files with 13 additions and 9 deletions

View File

@ -3,6 +3,7 @@ package com.microservices.pms.product.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.microservices.common.core.utils.bean.BeanUtils;
import com.microservices.pms.product.domain.PmsProductModule;
import com.microservices.pms.product.domain.PmsProductPlan;
import com.microservices.system.api.domain.SimpleSysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -43,6 +44,9 @@ public class ProductReqSpecsDataVo {
@ApiModelProperty(value = "关联产品模块")
private PmsProductModule pmsProductModule;
@ApiModelProperty(value = "关联产品里程碑")
private PmsProductPlan pmsProductPlan;
public ProductReqSpecsDetailVo toProductReqSpecsDetailVo() {
ProductReqSpecsDetailVo target = new ProductReqSpecsDetailVo();
BeanUtils.copyProperties(this, target);

View File

@ -2,7 +2,6 @@ package com.microservices.pms.product.domain.vo;
import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.microservices.pms.product.domain.PmsProductPlan;
import com.microservices.pms.project.domain.PmsProject;
import com.microservices.system.api.domain.SimpleSysUser;
import com.microservices.system.api.domain.SysFileInfo;
@ -34,9 +33,6 @@ public class ProductReqSpecsDetailVo extends ProductReqSpecsDataVo {
@ApiModelProperty(value = "关联项目")
private PmsProject project;
@ApiModelProperty(value = "关联产品里程碑")
private PmsProductPlan pmsProductPlan;
@ApiModelProperty(value = "创建人")
private SimpleSysUser createBy;

View File

@ -420,6 +420,15 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
, pmsProductRequirement.getPmsProductModuleId())
);
}
// 设置产品计划
if (pmsProductRequirement.getPmsProductPlanId() != null) {
productReqSpecsDataVo.setPmsProductPlan(
PmsUtils.getSelectObjectInCache(
hashMap
, x -> pmsProductPlanService.selectPmsProductPlanById(x, false)
, pmsProductRequirement.getPmsProductPlanId())
);
}
// 设置创建人
productReqSpecsDataVo.setCreateBy(
PmsUtils.getSelectObjectInCache(
@ -638,11 +647,6 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
pmsProjectIssuesService.selectPmsProjectIssueById(pmsProductRequirement.getProjectReqId(), pmsProductRequirement.getPmsProjectId()));
}
}
// 设置产品计划
if (pmsProductRequirement.getPmsProductPlanId() != null) {
productReqSpecsDetailVo.setPmsProductPlan(
pmsProductPlanService.selectPmsProductPlanById(pmsProductRequirement.getPmsProductPlanId(), false));
}
productReqSpecsDetailVo.setCreateBy(pmsCommonService.getSimpleSysUserByUsername(pmsProductRequirement.getCreateBy()));
productReqSpecsDetailVo.setCreateTime(pmsProductRequirement.getCreateTime());
if (ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(pmsProductRequirement.getStatus())) {