feat(产品需求调整): 需求规格调整为需求

Signed-off-by: OTTO <731554297@qq.com>
This commit is contained in:
OTTO 2025-02-11 17:18:02 +08:00
parent 20ecc7157f
commit 74112e2f35
14 changed files with 61 additions and 61 deletions

View File

@ -219,7 +219,7 @@ public class PmsDashboardController extends BaseController {
} }
@ApiOperation(value = "我的产品数据统计-需求规格统计") @ApiOperation(value = "我的产品数据统计-需求统计")
@ApiImplicitParam(name = "productIdentifier", value = "产品标识", paramType = "query", dataType = "String") @ApiImplicitParam(name = "productIdentifier", value = "产品标识", paramType = "query", dataType = "String")
@GetMapping("/productRequirementSpecsStat") @GetMapping("/productRequirementSpecsStat")
public R<PmsRequirementStatResVo> ProductRequirementSpecsStat(String productIdentifier){ public R<PmsRequirementStatResVo> ProductRequirementSpecsStat(String productIdentifier){

View File

@ -19,13 +19,13 @@ import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
/** /**
* 产品需求规格相关接口 * 产品需求相关接口
* *
* @author otto * @author otto
* @date 2023-10-10 * @date 2023-10-10
*/ */
@RestController @RestController
@Api(tags = "项目管理-需求规格相关接口") @Api(tags = "项目管理-需求相关接口")
@RequestMapping("/{enterpriseIdentifier}/productRequirementSpecs") @RequestMapping("/{enterpriseIdentifier}/productRequirementSpecs")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "enterpriseIdentifier", value = "企业标识", paramType = "path", dataType = "String") @ApiImplicitParam(name = "enterpriseIdentifier", value = "企业标识", paramType = "path", dataType = "String")
@ -35,9 +35,9 @@ public class ProductReqSpecsController extends BaseController {
private IPmsProductRequirementService pmsProductRequirementService; private IPmsProductRequirementService pmsProductRequirementService;
/** /**
* 查询产品需求规格列表 * 查询产品需求列表
*/ */
@ApiOperation(value = "查询需求规格列表") @ApiOperation(value = "查询需求列表")
@RequiresPermissions("pms:pmsProduct:show") @RequiresPermissions("pms:pmsProduct:show")
@GetMapping("/list") @GetMapping("/list")
public GenericsTableDataInfo<ProductReqSpecsDataVo> list(@PathVariable String enterpriseIdentifier, @Validated ProductReqSpecsSearchVo productReqSpecsSearchVo) { public GenericsTableDataInfo<ProductReqSpecsDataVo> list(@PathVariable String enterpriseIdentifier, @Validated ProductReqSpecsSearchVo productReqSpecsSearchVo) {
@ -45,22 +45,22 @@ public class ProductReqSpecsController extends BaseController {
} }
/** /**
* 获取需求规格详细信息 * 获取需求详细信息
*/ */
@RequiresPermissions("pms:pmsProduct:show") @RequiresPermissions("pms:pmsProduct:show")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
@ApiOperation(value = "获取需求规格详细信息") @ApiOperation(value = "获取需求详细信息")
public GenericsAjaxResult<ProductReqSpecsDetailVo> getInfo(@PathVariable("id") Long id) { public GenericsAjaxResult<ProductReqSpecsDetailVo> getInfo(@PathVariable("id") Long id) {
return genericsSuccess(pmsProductRequirementService.selectReqSpecsDetailById(id)); return genericsSuccess(pmsProductRequirementService.selectReqSpecsDetailById(id));
} }
/** /**
* 新增需求规格 * 新增需求
*/ */
@RequiresPermissions("pms:pmsProductRequirement:add") @RequiresPermissions("pms:pmsProductRequirement:add")
@Log(title = "需求规格", businessType = BusinessType.INSERT) @Log(title = "需求", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
@ApiOperation(value = "新增需求规格") @ApiOperation(value = "新增需求")
public AjaxResult add(@PathVariable String enterpriseIdentifier, public AjaxResult add(@PathVariable String enterpriseIdentifier,
@RequestBody @Validated ProductReqSpecsInputVo productReqSpecsInputVo) { @RequestBody @Validated ProductReqSpecsInputVo productReqSpecsInputVo) {
productReqSpecsInputVo.setEnterpriseIdentifier(enterpriseIdentifier); productReqSpecsInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
@ -68,56 +68,56 @@ public class ProductReqSpecsController extends BaseController {
} }
/** /**
* 修改需求规格 * 修改需求
*/ */
@RequiresPermissions("pms:pmsProductRequirement:edit") @RequiresPermissions("pms:pmsProductRequirement:edit")
@Log(title = "需求规格", businessType = BusinessType.UPDATE) @Log(title = "需求", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
@ApiOperation(value = "修改需求规格") @ApiOperation(value = "修改需求")
public AjaxResult edit(@RequestBody @Validated ProductReqSpecsUpdateVo productReqSpecsUpdateVo) { public AjaxResult edit(@RequestBody @Validated ProductReqSpecsUpdateVo productReqSpecsUpdateVo) {
return toAjax(pmsProductRequirementService.updateReqSpecs(productReqSpecsUpdateVo)); return toAjax(pmsProductRequirementService.updateReqSpecs(productReqSpecsUpdateVo));
} }
/** /**
* 变更需求规格 * 变更需求
*/ */
@RequiresPermissions("pms:pmsProductRequirement:edit") @RequiresPermissions("pms:pmsProductRequirement:edit")
@Log(title = "需求规格", businessType = BusinessType.UPDATE) @Log(title = "需求", businessType = BusinessType.UPDATE)
@PutMapping("/change") @PutMapping("/change")
@ApiOperation(value = "变更需求规格") @ApiOperation(value = "变更需求")
public AjaxResult change(@RequestBody @Validated ProductReqSpecsChangeVo productReqSpecsChangeVo) { public AjaxResult change(@RequestBody @Validated ProductReqSpecsChangeVo productReqSpecsChangeVo) {
return toAjax(pmsProductRequirementService.changeReqSpecs(productReqSpecsChangeVo)); return toAjax(pmsProductRequirementService.changeReqSpecs(productReqSpecsChangeVo));
} }
/** /**
* 删除需求规格 * 删除需求
*/ */
@RequiresPermissions("pms:pmsProductRequirement:remove") @RequiresPermissions("pms:pmsProductRequirement:remove")
@Log(title = "需求规格", businessType = BusinessType.DELETE) @Log(title = "需求", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
@ApiOperation(value = "删除需求规格") @ApiOperation(value = "删除需求")
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(pmsProductRequirementService.deleteReqSpecsByIds(ids)); return toAjax(pmsProductRequirementService.deleteReqSpecsByIds(ids));
} }
/** /**
* 评审需求规格 * 评审需求
*/ */
@RequiresPermissions("pms:pmsProductRequirement:edit") @RequiresPermissions("pms:pmsProductRequirement:edit")
@Log(title = "需求规格", businessType = BusinessType.UPDATE) @Log(title = "需求", businessType = BusinessType.UPDATE)
@PutMapping("/review") @PutMapping("/review")
@ApiOperation(value = "评审需求规格") @ApiOperation(value = "评审需求")
public AjaxResult review(@RequestBody @Validated ProductReqReviewVo productReqReviewVo) { public AjaxResult review(@RequestBody @Validated ProductReqReviewVo productReqReviewVo) {
return toAjax(pmsProductRequirementService.reviewReqSpecs(productReqReviewVo)); return toAjax(pmsProductRequirementService.reviewReqSpecs(productReqReviewVo));
} }
/** /**
* 需求规格纳入计划 * 需求纳入计划
*/ */
@RequiresPermissions("pms:pmsProductRequirement:edit") @RequiresPermissions("pms:pmsProductRequirement:edit")
@Log(title = "需求规格", businessType = BusinessType.UPDATE) @Log(title = "需求", businessType = BusinessType.UPDATE)
@PutMapping("/activePlan") @PutMapping("/activePlan")
@ApiOperation(value = "需求规格纳入计划") @ApiOperation(value = "需求纳入计划")
public AjaxResult activePlan(@RequestBody @Validated ProductReqSpecsActivePlanVo productReqSpecsActivePlanVo) { public AjaxResult activePlan(@RequestBody @Validated ProductReqSpecsActivePlanVo productReqSpecsActivePlanVo) {
return toAjax(pmsProductRequirementService.activePlan(productReqSpecsActivePlanVo)); return toAjax(pmsProductRequirementService.activePlan(productReqSpecsActivePlanVo));
} }
@ -133,9 +133,9 @@ public class ProductReqSpecsController extends BaseController {
} }
/** /**
* 查询需求规格状态列表 * 查询需求状态列表
*/ */
@ApiOperation(value = "查询需求规格状态列表") @ApiOperation(value = "查询需求状态列表")
@RequiresPermissions("pms:pmsProduct:show") @RequiresPermissions("pms:pmsProduct:show")
@GetMapping("/statusList") @GetMapping("/statusList")
public List<ReqStatusCommonVo> statusList() { public List<ReqStatusCommonVo> statusList() {
@ -143,9 +143,9 @@ public class ProductReqSpecsController extends BaseController {
} }
/** /**
* 查询需求规格类型列表 * 查询需求类型列表
*/ */
@ApiOperation(value = "查询需求规格类型列表") @ApiOperation(value = "查询需求类型列表")
@RequiresPermissions("pms:pmsProduct:show") @RequiresPermissions("pms:pmsProduct:show")
@GetMapping("/typeList") @GetMapping("/typeList")
public List<EnumCommonVo> typeList() { public List<EnumCommonVo> typeList() {
@ -156,9 +156,9 @@ public class ProductReqSpecsController extends BaseController {
* 批量修改产品需求 * 批量修改产品需求
*/ */
@RequiresPermissions("pms:pmsProductRequirement:edit") @RequiresPermissions("pms:pmsProductRequirement:edit")
@Log(title = "需求规格", businessType = BusinessType.UPDATE) @Log(title = "需求", businessType = BusinessType.UPDATE)
@PutMapping("/batch") @PutMapping("/batch")
@ApiOperation(value = "批量修改产品需求规格") @ApiOperation(value = "批量修改产品需求")
public AjaxResult batchEdit( public AjaxResult batchEdit(
@ApiParam(name = "pmsProductRequirementBatchUpdateVo", @ApiParam(name = "pmsProductRequirementBatchUpdateVo",
value = "【字段说明】(非必填字段不传递则代表不更新传null则代表置空):\n" + value = "【字段说明】(非必填字段不传递则代表不更新传null则代表置空):\n" +

View File

@ -17,7 +17,7 @@ public enum ProductReqOperationType {
CONTENT_MODIFY("contentModify", "内容修改"), CONTENT_MODIFY("contentModify", "内容修改"),
REVIEW_USER_REQ("reviewUserReq", "用户需求评审"), REVIEW_USER_REQ("reviewUserReq", "用户需求评审"),
ACTIVE_PLAN("activePlan", "纳入计划"), ACTIVE_PLAN("activePlan", "纳入计划"),
REVIEW_REQ_SPECS("reviewReqSpecs", "需求规格评审"); REVIEW_REQ_SPECS("reviewReqSpecs", "需求评审");
private final String key; private final String key;
private final String name; private final String name;
@ -49,7 +49,7 @@ public enum ProductReqOperationType {
operationTimeStr, operationTimeStr,
operator.getNickName()); operator.getNickName());
case REVIEW_REQ_SPECS: case REVIEW_REQ_SPECS:
return String.format("%s由【%s】进行了需求规格评审,评审结果为【%s】", return String.format("%s由【%s】进行了需求评审,评审结果为【%s】",
operationTimeStr, operationTimeStr,
operator.getNickName(), operator.getNickName(),
ProductReqReviewStatus.getNameByKey(record.getOperation())); ProductReqReviewStatus.getNameByKey(record.getOperation()));

View File

@ -17,16 +17,16 @@ public enum ProductReqStatus {
PENDING_REVIEW_USER_REQ("pendingReviewUserReq", "待评审", "待评审的用户需求", "#FF6F00"), PENDING_REVIEW_USER_REQ("pendingReviewUserReq", "待评审", "待评审的用户需求", "#FF6F00"),
REJECTED_USER_REQ("rejectedUserReq", "未通过", "已拒绝的用户需求", "#FF0000"), REJECTED_USER_REQ("rejectedUserReq", "未通过", "已拒绝的用户需求", "#FF0000"),
REVIEWED_USER_REQ("reviewedUserReq", "已评审", "已评审的用户需求", "#13B33E"), REVIEWED_USER_REQ("reviewedUserReq", "已评审", "已评审的用户需求", "#13B33E"),
PENDING_REVIEW_REQ_SPECS("pendingReviewReqSpecs", "待评审", "待评审的需求规格", "#FF6F00"), PENDING_REVIEW_REQ_SPECS("pendingReviewReqSpecs", "待评审", "待评审的需求", "#FF6F00"),
CHANGING_REQ_SPECS("changingReqSpecs", "变更中", "变更中的需求规格", "#FF0000"), CHANGING_REQ_SPECS("changingReqSpecs", "变更中", "变更中的需求", "#FF0000"),
CHANGED_REQ_SPECS("changedReqSpecs", "已变更", "已变更的需求规格", null), CHANGED_REQ_SPECS("changedReqSpecs", "已变更", "已变更的需求", null),
REJECTED_CHANGE_REQ_SPECS("rejectedChangeReqSpecs", "已拒绝变更", "已拒绝变更的需求规格", null), REJECTED_CHANGE_REQ_SPECS("rejectedChangeReqSpecs", "已拒绝变更", "已拒绝变更的需求", null),
REVIEWED_REQ_SPECS_CHANGING("reviewedReqSpecsChanging", "已评审(变更中)", "已评审的需求规格(变更中)", null), REVIEWED_REQ_SPECS_CHANGING("reviewedReqSpecsChanging", "已评审(变更中)", "已评审的需求(变更中)", null),
PLANNED_REQ_SPECS_CHANGING("plannedReqSpecsChanging", "计划中(变更中)", "计划中的需求规格(变更中)", null), PLANNED_REQ_SPECS_CHANGING("plannedReqSpecsChanging", "计划中(变更中)", "计划中的需求(变更中)", null),
PLANNED_REQ_SPECS("plannedReqSpecs", "计划中", "计划中的需求规格", "#0D5EF8"), PLANNED_REQ_SPECS("plannedReqSpecs", "计划中", "计划中的需求", "#0D5EF8"),
REJECTED_REQ_SPECS("rejectedReqSpecs", "已拒绝", "已拒绝的需求规格", "#B1AAA5"), REJECTED_REQ_SPECS("rejectedReqSpecs", "已拒绝", "已拒绝的需求", "#B1AAA5"),
REVIEWED_REQ_SPECS("reviewedReqSpecs", "已评审", "已评审的需求规格", "#13B33E"), REVIEWED_REQ_SPECS("reviewedReqSpecs", "已评审", "已评审的需求", "#13B33E"),
COMPLETED_REQ_SPECS("completedReqSpecs", "已完成", "已完成的需求规格", "#13B33E"); COMPLETED_REQ_SPECS("completedReqSpecs", "已完成", "已完成的需求", "#13B33E");
private final String key; private final String key;
private final String name; private final String name;
private final String remark; private final String remark;
@ -65,7 +65,7 @@ public enum ProductReqStatus {
} else if (PLANNED_REQ_SPECS_CHANGING == productReqStatus) { } else if (PLANNED_REQ_SPECS_CHANGING == productReqStatus) {
return PLANNED_REQ_SPECS; return PLANNED_REQ_SPECS;
} else { } else {
throw new ServiceException("获取需求规格的来源状态失败"); throw new ServiceException("获取需求的来源状态失败");
} }
} }
@ -77,7 +77,7 @@ public enum ProductReqStatus {
} else if (PLANNED_REQ_SPECS == productReqStatus) { } else if (PLANNED_REQ_SPECS == productReqStatus) {
return PLANNED_REQ_SPECS_CHANGING; return PLANNED_REQ_SPECS_CHANGING;
} else { } else {
throw new ServiceException("获取需求规格的更新状态失败"); throw new ServiceException("获取需求的更新状态失败");
} }
} }

View File

@ -115,7 +115,7 @@ public class PmsProductReqOperationRecordServiceImpl implements IPmsProductReqOp
public List<ProductReqOperationRecordDataVo> selectUserReqChangeRecordList(Long userReqId) { public List<ProductReqOperationRecordDataVo> selectUserReqChangeRecordList(Long userReqId) {
PmsProductRequirement userReq = pmsProductRequirementService.selectPmsProductRequirementById(userReqId, false); PmsProductRequirement userReq = pmsProductRequirementService.selectPmsProductRequirementById(userReqId, false);
if (!ProductReqStatus.isUserReqStatus(userReq.getStatus())) { if (!ProductReqStatus.isUserReqStatus(userReq.getStatus())) {
throw new ServiceException("需求规格变更记录请使用查询需求规格变更记录接口"); throw new ServiceException("需求变更记录请使用查询需求变更记录接口");
} }
PmsProductReqOperationRecord recordSearch = new PmsProductReqOperationRecord(); PmsProductReqOperationRecord recordSearch = new PmsProductReqOperationRecord();
recordSearch.setProductRequirementId(userReqId); recordSearch.setProductRequirementId(userReqId);

View File

@ -253,7 +253,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
if (!ProductReqStatus.PENDING_REVIEW_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus()) && if (!ProductReqStatus.PENDING_REVIEW_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus()) &&
!ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus()) && !ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus()) &&
!ProductReqStatus.REJECTED_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus())) { !ProductReqStatus.REJECTED_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus())) {
throw new ServiceException("只有待审核、变更中和已拒绝状态的需求规格才能被删除"); throw new ServiceException("只有待审核、变更中和已拒绝状态的需求才能被删除");
} }
if (ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus())) { if (ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus())) {
// 变更中需求规格被删除时需将原需求还原状态 // 变更中需求规格被删除时需将原需求还原状态
@ -307,7 +307,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
PmsProductRequirement reqSpecs = selectPmsProductRequirementById(productReqReviewVo.getId(), true); PmsProductRequirement reqSpecs = selectPmsProductRequirementById(productReqReviewVo.getId(), true);
if (!ProductReqStatus.PENDING_REVIEW_REQ_SPECS.getKey().equals(reqSpecs.getStatus()) if (!ProductReqStatus.PENDING_REVIEW_REQ_SPECS.getKey().equals(reqSpecs.getStatus())
&& !ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(reqSpecs.getStatus())) { && !ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(reqSpecs.getStatus())) {
throw new ServiceException("只有待审核和变更中状态的需求规格才能进行审核"); throw new ServiceException("只有待审核和变更中状态的需求才能进行审核");
} }
if (ProductReqReviewStatus.PASS.getKey().equals(productReqReviewVo.getReviewStatus())) { if (ProductReqReviewStatus.PASS.getKey().equals(productReqReviewVo.getReviewStatus())) {
if (ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(reqSpecs.getStatus())) { if (ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(reqSpecs.getStatus())) {
@ -489,7 +489,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
checkReqSpecsParameter(pmsProductRequirement, pmsProduct, oldPmsProductRequirement); checkReqSpecsParameter(pmsProductRequirement, pmsProduct, oldPmsProductRequirement);
if (ProductReqStatus.REVIEWED_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus()) || ProductReqStatus.PLANNED_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus())) { if (ProductReqStatus.REVIEWED_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus()) || ProductReqStatus.PLANNED_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus())) {
if (productReqSpecsUpdateVo.isReqChange(oldPmsProductRequirement)) { if (productReqSpecsUpdateVo.isReqChange(oldPmsProductRequirement)) {
throw new ServiceException("已评审或计划中的需求规格请通过需求变更调整需求内容(标题、正文、附件)"); throw new ServiceException("已评审或计划中的需求请通过需求变更调整需求内容(标题、正文、附件)");
} }
} else if (ProductReqStatus.PENDING_REVIEW_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus()) || ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus())) { } else if (ProductReqStatus.PENDING_REVIEW_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus()) || ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus())) {
// 待审核和变更中的需求可随意更改 // 待审核和变更中的需求可随意更改
@ -509,7 +509,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
// 通过id检查需修改的产品需求是否存在 // 通过id检查需修改的产品需求是否存在
PmsProductRequirement oldPmsProductRequirement = selectPmsProductRequirementById(productReqSpecsChangeVo.getId(), true); PmsProductRequirement oldPmsProductRequirement = selectPmsProductRequirementById(productReqSpecsChangeVo.getId(), true);
if (!ProductReqStatus.REVIEWED_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus()) && !ProductReqStatus.PLANNED_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus())) { if (!ProductReqStatus.REVIEWED_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus()) && !ProductReqStatus.PLANNED_REQ_SPECS.getKey().equals(oldPmsProductRequirement.getStatus())) {
throw new ServiceException("仅已评审和计划中的需求规格才能发起需求变更"); throw new ServiceException("仅已评审和计划中的需求才能发起需求变更");
} }
if (!productReqSpecsChangeVo.isReqChange(oldPmsProductRequirement)) { if (!productReqSpecsChangeVo.isReqChange(oldPmsProductRequirement)) {
throw new ServiceException("当前无内容(标题、正文、附件)变更"); throw new ServiceException("当前无内容(标题、正文、附件)变更");
@ -541,12 +541,12 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
// 通过id检查需修改的产品需求是否存在 // 通过id检查需修改的产品需求是否存在
PmsProductRequirement reqSpecs = selectPmsProductRequirementById(productReqSpecsActivePlanVo.getId(), true); PmsProductRequirement reqSpecs = selectPmsProductRequirementById(productReqSpecsActivePlanVo.getId(), true);
if (!ProductReqStatus.REVIEWED_REQ_SPECS.getKey().equals(reqSpecs.getStatus())) { if (!ProductReqStatus.REVIEWED_REQ_SPECS.getKey().equals(reqSpecs.getStatus())) {
throw new ServiceException("仅已评审状态的需求规格才能纳入计划"); throw new ServiceException("仅已评审状态的需求才能纳入计划");
} }
List<PmsProject> pmsProjectList = selectReqSpecsProjectList(reqSpecs.getPmsProductIdentifier()); List<PmsProject> pmsProjectList = selectReqSpecsProjectList(reqSpecs.getPmsProductIdentifier());
if (pmsProjectList == null if (pmsProjectList == null
|| pmsProjectList.stream().noneMatch(x -> x.getId().equals(productReqSpecsActivePlanVo.getProjectId()))) { || pmsProjectList.stream().noneMatch(x -> x.getId().equals(productReqSpecsActivePlanVo.getProjectId()))) {
throw new ServiceException("需求规格纳入计划时请选择关联了当前产品的项目"); throw new ServiceException("需求纳入计划时请选择关联了当前产品的项目");
} }
List<String> forgeFileIdentifierList = null; List<String> forgeFileIdentifierList = null;
if (StringUtils.isNotEmpty(reqSpecs.getFileIdentifiers())) { if (StringUtils.isNotEmpty(reqSpecs.getFileIdentifiers())) {
@ -605,7 +605,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
} }
if (ProductReqStatus.COMPLETED_REQ_SPECS.getKey().equals(productReqStatus.getKey())) { if (ProductReqStatus.COMPLETED_REQ_SPECS.getKey().equals(productReqStatus.getKey())) {
if (ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(pmsProductRequirement.getStatus())) { if (ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(pmsProductRequirement.getStatus())) {
throw new ServiceException("需求规格变更中,项目计划不能调整为已完成或已关闭状态"); throw new ServiceException("需求变更中,项目计划不能调整为已完成或已关闭状态");
} }
} }
pmsProductRequirement.setStatus(productReqStatus.getKey()); pmsProductRequirement.setStatus(productReqStatus.getKey());

View File

@ -60,7 +60,7 @@ public class PmsProjectIssuesController extends BaseController {
public AjaxResult add(@RequestBody PmsProjectIssuesInputVo pmsProjectIssuesInputVo) { public AjaxResult add(@RequestBody PmsProjectIssuesInputVo pmsProjectIssuesInputVo) {
if (PmsConstants.PROJECT_ISSUE_TYPE_REQUIREMENT.equals(String.valueOf(pmsProjectIssuesInputVo.getPmIssueType())) if (PmsConstants.PROJECT_ISSUE_TYPE_REQUIREMENT.equals(String.valueOf(pmsProjectIssuesInputVo.getPmIssueType()))
&& pmsProjectIssuesInputVo.getRootId() == null) { && pmsProjectIssuesInputVo.getRootId() == null) {
throw new ServiceException("项目计划仅能基于产品需求规格创建"); throw new ServiceException("项目计划仅能基于产品需求创建");
} }
JSONObject result = pmsProjectIssuesService.insertPmsProjectIssues(pmsProjectIssuesInputVo); JSONObject result = pmsProjectIssuesService.insertPmsProjectIssues(pmsProjectIssuesInputVo);
return success(result); return success(result);

View File

@ -127,7 +127,7 @@ public class PmsProjectTestcaseController extends BaseController {
"assigneeGitlinkId:用例维护人Gitlink ID;\n" + "assigneeGitlinkId:用例维护人Gitlink ID;\n" +
"typeId:用例类型ID;\n" + "typeId:用例类型ID;\n" +
"tags:标记Id列表使用逗号分割的字符串;\n" + "tags:标记Id列表使用逗号分割的字符串;\n" +
"productReqSpecsId:关联产品需求规格id;\n" + "productReqSpecsId:关联产品需求id;\n" +
"pmsModuleId:关联模块ID;\n") "pmsModuleId:关联模块ID;\n")
@RequestBody JSONObject batchUpdateVo) { @RequestBody JSONObject batchUpdateVo) {
return toAjax(pmsProjectTestcaseService.batchUpdatePmsProjectTestcase(batchUpdateVo)); return toAjax(pmsProjectTestcaseService.batchUpdatePmsProjectTestcase(batchUpdateVo));

View File

@ -146,7 +146,7 @@ public class PmsProjectTestcase extends BaseEntity {
@ApiModelProperty(value = "测试用例标识") @ApiModelProperty(value = "测试用例标识")
private String identifier; private String identifier;
@ApiModelProperty(value = "产品需求规格id") @ApiModelProperty(value = "产品需求id")
private Long productReqSpecsId; private Long productReqSpecsId;
public PmsProjectTestcaseDataVo toPmsProjectTestcaseDataVo() { public PmsProjectTestcaseDataVo toPmsProjectTestcaseDataVo() {

View File

@ -46,7 +46,7 @@ public class PmsProjectTestcaseBatchUpdateVo {
private String tagIds; private String tagIds;
private Boolean tagIdsIsChange = false; private Boolean tagIdsIsChange = false;
@ApiModelProperty(value = "产品需求规格id") @ApiModelProperty(value = "产品需求id")
private Long productReqSpecsId; private Long productReqSpecsId;
private Boolean productReqSpecsIdIsChange = false; private Boolean productReqSpecsIdIsChange = false;

View File

@ -68,7 +68,7 @@ public class PmsProjectTestcaseDataVo extends BaseEntityVo {
/** /**
* 关联模块 * 关联模块
*/ */
@ApiModelProperty(value = "关联产品需求规格") @ApiModelProperty(value = "关联产品需求")
private PmsProductRequirement productReqSpecs; private PmsProductRequirement productReqSpecs;
/** /**

View File

@ -36,7 +36,7 @@ public class PmsProjectTestcaseInputVo {
@ApiModelProperty(value = "用例维护人Gitlink ID") @ApiModelProperty(value = "用例维护人Gitlink ID")
private Long assigneeGitlinkId; private Long assigneeGitlinkId;
@ApiModelProperty(value = "产品需求规格id") @ApiModelProperty(value = "产品需求id")
private Long productReqSpecsId; private Long productReqSpecsId;
/** /**

View File

@ -52,7 +52,7 @@ public class PmsProjectTestcaseSearchVo {
@ApiModelProperty(value = "标记Id") @ApiModelProperty(value = "标记Id")
private String tagId; private String tagId;
@ApiModelProperty(value = "产品需求规格id") @ApiModelProperty(value = "产品需求id")
private Long productReqSpecsId; private Long productReqSpecsId;
public PmsProjectTestcase toPmsProjectTestcase() { public PmsProjectTestcase toPmsProjectTestcase() {

View File

@ -34,7 +34,7 @@ public class PmsProjectTestcaseUpdateVo {
@Size(max = 100, message = "长度需要小于100") @Size(max = 100, message = "长度需要小于100")
private String title; private String title;
@ApiModelProperty(value = "产品需求规格id") @ApiModelProperty(value = "产品需求id")
private Long productReqSpecsId; private Long productReqSpecsId;
/** /**