feat(项目管理产品需求重构): 完善产品中的需求规格功能开发
完善需求规格新增接口:校验需求规格类型是否输入正确 Signed-off-by: OTTO <731554297@qq.com>
This commit is contained in:
parent
895be1aefe
commit
882dd33346
|
|
@ -0,0 +1,29 @@
|
|||
package com.microservices.pms.product.domain.enums;
|
||||
|
||||
import com.microservices.common.core.exception.ServiceException;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author OTTO
|
||||
*/
|
||||
@Getter
|
||||
public enum ProductReqSpecsType {
|
||||
PERFORMANCE_REQ("performanceReq", "性能需求"),
|
||||
FUNCTIONAL_REQ("functionalReq", "功能需求");
|
||||
private final String key;
|
||||
private final String name;
|
||||
|
||||
ProductReqSpecsType(String key, String name) {
|
||||
this.key = key;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static void checkKey(String key) {
|
||||
for (ProductReqSpecsType type : ProductReqSpecsType.values()) {
|
||||
if (type.getKey().equals(key)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw new ServiceException("错误的需求类型(需求类型[%s])", key);
|
||||
}
|
||||
}
|
||||
|
|
@ -134,7 +134,6 @@ public interface IPmsProductRequirementService
|
|||
/**
|
||||
* 查询用户需求列表
|
||||
*
|
||||
* @param enterpriseIdentifier 企业标识
|
||||
* @param productUserReqSearchVo 查询条件
|
||||
* @return 用户需求列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import com.microservices.pms.product.domain.PmsProductModule;
|
|||
import com.microservices.pms.product.domain.PmsProductPlan;
|
||||
import com.microservices.pms.product.domain.PmsProductRequirement;
|
||||
import com.microservices.pms.product.domain.enums.ProductReqReviewStatus;
|
||||
import com.microservices.pms.product.domain.enums.ProductReqSpecsType;
|
||||
import com.microservices.pms.product.domain.enums.ProductReqStatus;
|
||||
import com.microservices.pms.product.domain.vo.*;
|
||||
import com.microservices.pms.product.mapper.PmsProductRequirementMapper;
|
||||
|
|
@ -266,6 +267,9 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
|
|||
// 当原需求有计划且当前设置计划为空时,此操作相当于将该需求从原计划中移除,需更新原计划的更新时间
|
||||
pmsProductPlanService.updatePmsProductPlanChange(oldPmsProductRequirement.getPmsProductPlanId());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(pmsProductRequirement.getType())) {
|
||||
ProductReqSpecsType.checkKey(pmsProductRequirement.getType());
|
||||
}
|
||||
checkUserReqParameter(pmsProductRequirement, pmsProduct);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue