From dbceb01ce0d0169c980a212bdd44509d447f5871 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Mon, 9 Dec 2024 15:39:15 +0800
Subject: [PATCH 01/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
需求操作记录使用中文逗号
Signed-off-by: OTTO <731554297@qq.com>
---
.../pms/product/domain/enums/ProductReqOperationType.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqOperationType.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqOperationType.java
index 5599ec9b0..f77e5a620 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqOperationType.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqOperationType.java
@@ -35,21 +35,21 @@ public enum ProductReqOperationType {
String operationTimeStr = formatter.format(record.getOperatingTime());
switch (type) {
case CONTENT_MODIFY:
- return String.format("%s,由【%s】%s",
+ return String.format("%s,由【%s】%s",
operationTimeStr,
operator.getNickName(),
ProductContentModifyOperation.getNameByKey(record.getOperation()));
case REVIEW_USER_REQ:
- return String.format("%s,由【%s】进行了用户需求评审,评审结果为【%s】",
+ return String.format("%s,由【%s】进行了用户需求评审,评审结果为【%s】",
operationTimeStr,
operator.getNickName(),
ProductReqReviewStatus.getNameByKey(record.getOperation()));
case ACTIVE_PLAN:
- return String.format("%s,由【%s】将需求纳入了计划",
+ return String.format("%s,由【%s】将需求纳入了计划",
operationTimeStr,
operator.getNickName());
case REVIEW_REQ_SPECS:
- return String.format("%s,由【%s】进行了需求规格评审,评审结果为【%s】",
+ return String.format("%s,由【%s】进行了需求规格评审,评审结果为【%s】",
operationTimeStr,
operator.getNickName(),
ProductReqReviewStatus.getNameByKey(record.getOperation()));
From 59cb39ee83d237f9793eead998ea18c0737ead93 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Mon, 9 Dec 2024 15:51:29 +0800
Subject: [PATCH 02/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
修复需规评审相关信息不存在导致报错的问题
Signed-off-by: OTTO <731554297@qq.com>
---
.../pms/product/domain/enums/ProductReqReviewStatus.java | 2 +-
.../product/service/impl/PmsProductRequirementServiceImpl.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqReviewStatus.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqReviewStatus.java
index dd125eb72..0258efae8 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqReviewStatus.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqReviewStatus.java
@@ -10,7 +10,7 @@ import lombok.Getter;
@Getter
public enum ProductReqReviewStatus {
PASS("pass", "已通过"),
- REJECTED("rejected", "已拒绝");
+ REJECTED("rejected", "未通过");
private final String key;
private final String name;
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
index 920d874c0..c19bd9d74 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
@@ -622,7 +622,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
if (record != null) {
break;
}
- fromReq = selectPmsProductRequirementById(fromReq.getFromId(), true);
+ fromReq = fromReq.getFromId() != null ? selectPmsProductRequirementById(fromReq.getFromId(), true) : null;
}
if (record != null) {
productReqSpecsDetailVo.setReviewTime(record.getOperatingTime());
From b0f325370f815ca7e5f459207f930bc0f6730a17 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Mon, 9 Dec 2024 15:53:49 +0800
Subject: [PATCH 03/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
根据需规类型搜索需规
Signed-off-by: OTTO <731554297@qq.com>
---
.../pms/product/domain/vo/ProductReqSpecsSearchVo.java | 3 +++
.../main/resources/mapper/pms/PmsProductRequirementMapper.xml | 1 +
2 files changed, 4 insertions(+)
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsSearchVo.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsSearchVo.java
index 9e94a5dbe..d50ab0b22 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsSearchVo.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsSearchVo.java
@@ -39,6 +39,9 @@ public class ProductReqSpecsSearchVo {
@ApiModelProperty(value = "产品需求状态(全部状态请传空)")
private String status;
+ @ApiModelProperty(value = "产品需求类型")
+ private String type;
+
/**
* 关联项目ID
*/
diff --git a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
index 85324cdaa..7afb4aad4 100644
--- a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
+++ b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
@@ -205,6 +205,7 @@
and title like concat('%', #{title}, '%')
and pms_product_identifier = #{pmsProductIdentifier}
and `status` = #{status}
+ and `type` = #{type}
From 22c5efd140f15d00553dc47fffb8adced11d19d7 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Tue, 10 Dec 2024 11:05:24 +0800
Subject: [PATCH 04/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
获取需规列表时支持通过多状态查询
Signed-off-by: OTTO <731554297@qq.com>
---
.../pms/product/domain/vo/ProductReqSpecsSearchVo.java | 5 ++++-
.../service/impl/PmsProductRequirementServiceImpl.java | 3 +++
.../resources/mapper/pms/PmsProductRequirementMapper.xml | 6 +++++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsSearchVo.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsSearchVo.java
index d50ab0b22..8b287ed87 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsSearchVo.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsSearchVo.java
@@ -36,9 +36,12 @@ public class ProductReqSpecsSearchVo {
@ApiModelProperty(value = "关联产品模块ID(传0查询不属于任何模块的需求)")
private Long pmsProductModuleId;
- @ApiModelProperty(value = "产品需求状态(全部状态请传空)")
+ @ApiModelProperty(value = "产品需求状态(全部状态请传空)(可通过逗号分割传多个状态)")
private String status;
+ @ApiModelProperty(value = "产品需求状态(数组)", hidden = true)
+ private String[] statusList;
+
@ApiModelProperty(value = "产品需求类型")
private String type;
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
index c19bd9d74..06dcd9e52 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
@@ -394,6 +394,9 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
List moduleIdList = pmsProductModuleService.selectChildrenPmsProductModuleIdList(productReqSpecsSearchVo.getPmsProductModuleId());
productReqSpecsSearchVo.setChildrenModuleIdList(moduleIdList);
}
+ if (StringUtils.isNotEmpty(productReqSpecsSearchVo.getStatus())) {
+ productReqSpecsSearchVo.setStatusList(productReqSpecsSearchVo.getStatus().split(","));
+ }
startPage();
List userReqList = pmsProductRequirementMapper.selectReqSpecsList(productReqSpecsSearchVo);
HashMap hashMap = new HashMap<>();
diff --git a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
index 7afb4aad4..80876e48c 100644
--- a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
+++ b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
@@ -204,7 +204,11 @@
and title like concat('%', #{title}, '%')
and pms_product_identifier = #{pmsProductIdentifier}
- and `status` = #{status}
+ and `status` in
+
+ #{item}
+
+
and `type` = #{type}
From d596005853eb01c07d29cb0aecd044caee863029 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Tue, 10 Dec 2024 11:41:31 +0800
Subject: [PATCH 05/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
测试用例新增拷贝接口
Signed-off-by: OTTO <731554297@qq.com>
---
.../PmsProjectTestcaseController.java | 20 +++++++++++-----
.../service/IPmsProjectTestcaseService.java | 4 +++-
.../impl/PmsProjectTestcaseServiceImpl.java | 24 ++++++++++++++++++-
3 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/controller/PmsProjectTestcaseController.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/controller/PmsProjectTestcaseController.java
index 7b9bea402..fe9676304 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/controller/PmsProjectTestcaseController.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/controller/PmsProjectTestcaseController.java
@@ -11,10 +11,7 @@ import com.microservices.common.security.annotation.Logical;
import com.microservices.common.security.annotation.RequiresPermissions;
import com.microservices.pms.product.service.IPmsProductModuleService;
import com.microservices.pms.project.domain.PmsProjectTestcase;
-import com.microservices.pms.project.domain.vo.PmsProjectTestcaseDataVo;
-import com.microservices.pms.project.domain.vo.PmsProjectTestcaseInputVo;
-import com.microservices.pms.project.domain.vo.PmsProjectTestcaseSearchVo;
-import com.microservices.pms.project.domain.vo.PmsProjectTestcaseUpdateVo;
+import com.microservices.pms.project.domain.vo.*;
import com.microservices.pms.project.service.IPmsProjectTestcaseService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
@@ -68,8 +65,8 @@ public class PmsProjectTestcaseController extends BaseController {
@RequiresPermissions(value = {"pms:pmsProject:show", "pms:pmsProject:showMe"}, logical = Logical.OR)
@GetMapping(value = "/{id}")
@ApiOperation(value = "获取测试用例详细信息")
- public GenericsAjaxResult getInfo(@PathVariable("id") Long id) {
- return genericsSuccess(pmsProjectTestcaseService.selectPmsProjectTestcaseDataVoById(id));
+ public GenericsAjaxResult getInfo(@PathVariable("id") Long id) {
+ return genericsSuccess(pmsProjectTestcaseService.selectPmsProjectTestcaseDetailVoById(id));
}
/**
@@ -83,6 +80,17 @@ public class PmsProjectTestcaseController extends BaseController {
return success(pmsProjectTestcaseService.insertPmsProjectTestcase(pmsProjectTestcaseInputVo.toPmsProjectTestcase()));
}
+ /**
+ * 复制测试用例
+ */
+ @RequiresPermissions("pms:pmsProjectTestcase:add")
+ @Log(title = "测试用例管理", businessType = BusinessType.INSERT)
+ @PostMapping("{testcaseId}/copy")
+ @ApiOperation(value = "复制测试用例")
+ public AjaxResult copy(@PathVariable("testcaseId") Long testcaseId) {
+ return success(pmsProjectTestcaseService.copyPmsProjectTestcase(testcaseId));
+ }
+
/**
* 修改测试用例管理
*/
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/IPmsProjectTestcaseService.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/IPmsProjectTestcaseService.java
index 06b701240..052fca224 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/IPmsProjectTestcaseService.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/IPmsProjectTestcaseService.java
@@ -78,7 +78,7 @@ public interface IPmsProjectTestcaseService {
* @param id 测试用例ID
* @return 测试用例详情
*/
- PmsProjectTestcaseDataVo selectPmsProjectTestcaseDataVoById(Long id);
+ PmsProjectTestcaseDetailVo selectPmsProjectTestcaseDetailVoById(Long id);
/**
* 根据模块ID删除测试用例与模块的关联关系
@@ -116,4 +116,6 @@ public interface IPmsProjectTestcaseService {
List selectPmsProjectTestcaseList(PmsProjectTestcase pmsProjectTestcaseSearch);
List selectReqSpecsAssociatedTestcaseList(Long reqSpecsId);
+
+ PmsProjectTestcase copyPmsProjectTestcase(Long testcaseId);
}
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/impl/PmsProjectTestcaseServiceImpl.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/impl/PmsProjectTestcaseServiceImpl.java
index 8e48da3da..f1ebeb69f 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/impl/PmsProjectTestcaseServiceImpl.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/impl/PmsProjectTestcaseServiceImpl.java
@@ -22,6 +22,7 @@ import com.microservices.pms.project.domain.*;
import com.microservices.pms.project.domain.vo.PmsProjectTestcaseBatchUpdateVo;
import com.microservices.pms.project.domain.vo.PmsProjectTestcaseDataVo;
import com.microservices.pms.project.domain.vo.PmsProjectTestcaseDetailVo;
+import com.microservices.pms.project.domain.vo.PmsProjectTestcaseStepDataVo;
import com.microservices.pms.project.mapper.PmsProjectTestcaseMapper;
import com.microservices.pms.project.mapper.PmsProjectTestsheetCasesMapper;
import com.microservices.pms.project.service.IPmsProjectService;
@@ -37,6 +38,7 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import java.util.stream.Collectors;
import static com.microservices.common.core.utils.PageUtils.startPage;
@@ -220,6 +222,26 @@ public class PmsProjectTestcaseServiceImpl implements IPmsProjectTestcaseService
return reqSpecsTestcaseDataVoList;
}
+ @Override
+ public PmsProjectTestcase copyPmsProjectTestcase(Long testcaseId) {
+ PmsProjectTestcase pmsProjectTestcase = selectPmsProjectTestcaseById(testcaseId);
+ pmsProjectTestcase.setId(null);
+ pmsProjectTestcase.setTags(pmsProjectTestcase.getTagIds());
+ PmsProjectTestcaseStep pmsProjectTestcaseStepSearch = new PmsProjectTestcaseStep();
+ pmsProjectTestcaseStepSearch.setPmsTestcaseId(testcaseId);
+ List selectPmsProjectTestcaseStepList = pmsProjectTestcaseStepService.selectPmsProjectTestcaseStepList(pmsProjectTestcaseStepSearch);
+ List pmsProjectTestcaseStepList = selectPmsProjectTestcaseStepList.stream()
+ .map(x -> {
+ PmsProjectTestcaseStep pmsProjectTestcaseStep = new PmsProjectTestcaseStep();
+ BeanUtils.copyProperties(x, pmsProjectTestcaseStep);
+ pmsProjectTestcaseStep.setId(null);
+ return pmsProjectTestcaseStep;
+ }).collect(Collectors.toList());
+ pmsProjectTestcase.setTestcaseStepList(pmsProjectTestcaseStepList);
+ insertPmsProjectTestcase(pmsProjectTestcase);
+ return pmsProjectTestcase;
+ }
+
/**
* 新增测试用例管理
*
@@ -364,7 +386,7 @@ public class PmsProjectTestcaseServiceImpl implements IPmsProjectTestcaseService
}
@Override
- public PmsProjectTestcaseDataVo selectPmsProjectTestcaseDataVoById(Long id) {
+ public PmsProjectTestcaseDetailVo selectPmsProjectTestcaseDetailVoById(Long id) {
return toPmsProjectTestcaseDetailVo(selectPmsProjectTestcaseById(id));
}
From c7cc7a911177c7a5b4f559199a5320ac30a696f8 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Tue, 10 Dec 2024 14:22:28 +0800
Subject: [PATCH 06/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
修复附件无法下载的问题
Signed-off-by: OTTO <731554297@qq.com>
---
.../microservices/file/service/impl/SysFileInfoServiceImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/microservices-modules/microservices-modules-file/src/main/java/com/microservices/file/service/impl/SysFileInfoServiceImpl.java b/microservices-modules/microservices-modules-file/src/main/java/com/microservices/file/service/impl/SysFileInfoServiceImpl.java
index 25404a085..8df0a8ed0 100644
--- a/microservices-modules/microservices-modules-file/src/main/java/com/microservices/file/service/impl/SysFileInfoServiceImpl.java
+++ b/microservices-modules/microservices-modules-file/src/main/java/com/microservices/file/service/impl/SysFileInfoServiceImpl.java
@@ -263,7 +263,7 @@ public class SysFileInfoServiceImpl implements ISysFileInfoService {
@Override
public void fileDownloadByIdentifier(String fileIdentifier, HttpServletResponse response, HttpServletRequest request) {
SysFileInfo sysFileInfo = selectSysFileInfoByFileIdentifier(fileIdentifier);
- if (StringUtils.isEmpty(sysFileInfo.getFilePath()) || !sysFileInfo.getFilePath().contains("/zone-identifier")) {
+ if (StringUtils.isEmpty(sysFileInfo.getFilePath())) {
throw new ServiceException("当前文件无法下载");
}
fileDownload(sysFileInfo, response);
From 63c5fc1b7f03d26c564e72ff515464d2ccc432b0 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Tue, 10 Dec 2024 14:36:53 +0800
Subject: [PATCH 07/14] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
修复待评审的需规查询不到变更记录的bug
Signed-off-by: OTTO <731554297@qq.com>
---
.../impl/PmsProductReqOperationRecordServiceImpl.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductReqOperationRecordServiceImpl.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductReqOperationRecordServiceImpl.java
index 8dc6edb0a..bd8c2758d 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductReqOperationRecordServiceImpl.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductReqOperationRecordServiceImpl.java
@@ -132,10 +132,14 @@ public class PmsProductReqOperationRecordServiceImpl implements IPmsProductReqOp
// 根据需求规格id和fromId查询需求规格相关的所有需求规格相关的变更记录列表
PmsProductReqOperationRecord recordSearch = new PmsProductReqOperationRecord();
List recordList = new ArrayList<>();
- while (reqSpecs.getFromId() != null && !ProductReqStatus.isUserReqStatus(reqSpecs.getStatus())) {
+ while (reqSpecs != null && !ProductReqStatus.isUserReqStatus(reqSpecs.getStatus())) {
recordSearch.setProductRequirementId(reqSpecs.getId());
recordList.addAll(pmsProductReqOperationRecordMapper.selectPmsProductReqOperationRecordList(recordSearch));
- reqSpecs = pmsProductRequirementService.selectPmsProductRequirementById(reqSpecs.getFromId(), false);
+ if (reqSpecs.getFromId() != null) {
+ reqSpecs = pmsProductRequirementService.selectPmsProductRequirementById(reqSpecs.getFromId(), false);
+ } else {
+ reqSpecs = null;
+ }
}
return getRecordDataList(recordList);
From 4cca1bf20564369f78c36896a8baab7d644df592 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Tue, 10 Dec 2024 15:18:11 +0800
Subject: [PATCH 08/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
需规纳入计划时计划状态需设置为进行中
Signed-off-by: OTTO <731554297@qq.com>
---
.../product/domain/vo/ProductReqSpecsActivePlanVo.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsActivePlanVo.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsActivePlanVo.java
index 255fe82d2..fb924449f 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsActivePlanVo.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqSpecsActivePlanVo.java
@@ -1,9 +1,12 @@
package com.microservices.pms.product.domain.vo;
+import com.microservices.pms.enums.ProjectIssuePriority;
+import com.microservices.pms.enums.ProjectIssueStatus;
import com.microservices.pms.product.domain.PmsProductReqOperationRecord;
import com.microservices.pms.product.domain.PmsProductRequirement;
import com.microservices.pms.product.domain.enums.ProductReqOperationType;
import com.microservices.pms.project.domain.vo.PmsProjectIssuesInputVo;
+import com.microservices.pms.utils.PmsConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -32,9 +35,9 @@ public class ProductReqSpecsActivePlanVo {
PmsProjectIssuesInputVo issue = new PmsProjectIssuesInputVo();
issue.setSubject(reqSpecs.getTitle());
issue.setPmProjectId(projectId);
- issue.setStatusId(1);
- issue.setPmIssueType(1);
- issue.setPriorityId(2);
+ issue.setStatusId(ProjectIssueStatus.RESOLVING.getId());
+ issue.setPmIssueType(Integer.valueOf(PmsConstants.PROJECT_ISSUE_TYPE_REQUIREMENT));
+ issue.setPriorityId(ProjectIssuePriority.NORMAL.getId());
issue.setDescription(reqSpecs.getContent());
issue.setAttachmentIds(forgeFileIdentifierList);
return issue;
From 464ce4e2866529eeb19fb1e68af27d1275aeb480 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Tue, 10 Dec 2024 17:26:30 +0800
Subject: [PATCH 09/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E9=9C=80=E8=A7=84=E5=AF=B9=E5=BA=94=E7=9A=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A1=E5=88=92=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1. 项目计划仅能基于产品需求规格创建
2. 项目计划不允许编辑标题、正文和附件
3. 项目计划状态值仅能为进行中、已完成、已关闭
4. 如果状态发生变更,需同步产品需规的状态变更:
- 项目计划修改为进行中将需规调整为已计划
- 项目计划修改为已完成或已关闭将需规调整为已完成
- 限制需求规格变更中,项目计划不能调整为已完成或已关闭状态
Signed-off-by: OTTO <731554297@qq.com>
---
.../mapper/PmsProductRequirementMapper.java | 2 +
.../IPmsProductRequirementService.java | 3 +
.../PmsProductRequirementServiceImpl.java | 18 ++++
.../PmsProjectIssuesController.java | 91 ++++++++-----------
.../domain/vo/PmsProjectIssuesInputVo.java | 12 +++
.../service/PmsProjectIssuesService.java | 38 ++++++++
.../pms/PmsProductRequirementMapper.xml | 6 ++
7 files changed, 116 insertions(+), 54 deletions(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/mapper/PmsProductRequirementMapper.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/mapper/PmsProductRequirementMapper.java
index 4e30160ae..d102369a6 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/mapper/PmsProductRequirementMapper.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/mapper/PmsProductRequirementMapper.java
@@ -110,4 +110,6 @@ public interface PmsProductRequirementMapper
List selectReqSpecsList(ProductReqSpecsSearchVo productReqSpecsSearchVo);
Integer selectReqSpecsCountByIdentifier(@Param("identifier") String identifier);
+
+ PmsProductRequirement selectReqSpecsByProjectReqId(@Param("projectReqId") Long projectReqId);
}
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/IPmsProductRequirementService.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/IPmsProductRequirementService.java
index c92053682..4c5d17f7b 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/IPmsProductRequirementService.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/IPmsProductRequirementService.java
@@ -3,6 +3,7 @@ package com.microservices.pms.product.service;
import com.alibaba.fastjson2.JSONObject;
import com.microservices.common.core.web.page.GenericsTableDataInfo;
import com.microservices.pms.product.domain.PmsProductRequirement;
+import com.microservices.pms.product.domain.enums.ProductReqStatus;
import com.microservices.pms.product.domain.vo.*;
import java.util.List;
@@ -125,4 +126,6 @@ public interface IPmsProductRequirementService
List selectReqSpecsTypeList();
JSONObject selectReqSpecsAssociatedPlanData(Long reqSpecsId);
+
+ void updateReqSpecsStatusByProjectReqId(Long projectReqId, ProductReqStatus productReqStatus);
}
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
index 06dcd9e52..95396163a 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
@@ -585,6 +585,24 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
);
}
+ @Override
+ public void updateReqSpecsStatusByProjectReqId(Long projectReqId, ProductReqStatus productReqStatus) {
+ PmsProductRequirement pmsProductRequirement = pmsProductRequirementMapper.selectReqSpecsByProjectReqId(projectReqId);
+ if (pmsProductRequirement == null) {
+ throw new ServiceException("项目计划关联的需求规格不存在");
+ }
+ if (productReqStatus.getKey().equals(pmsProductRequirement.getStatus())) {
+ return;
+ }
+ if (ProductReqStatus.COMPLETED_REQ_SPECS.getKey().equals(productReqStatus.getKey())) {
+ if (ProductReqStatus.CHANGING_REQ_SPECS.getKey().equals(pmsProductRequirement.getStatus())) {
+ throw new ServiceException("需求规格变更中,项目计划不能调整为已完成或已关闭状态");
+ }
+ }
+ pmsProductRequirement.setStatus(productReqStatus.getKey());
+ updateRequirement(pmsProductRequirement, pmsProductRequirement.getPmsProductIdentifier());
+ }
+
private ProductReqSpecsDetailVo toProductReqSpecsDetailVo(PmsProductRequirement pmsProductRequirement) {
ProductReqSpecsDataVo productReqSpecsDataVo = toProductReqSpecsDataVo(pmsProductRequirement, null);
ProductReqSpecsDetailVo productReqSpecsDetailVo = productReqSpecsDataVo.toProductReqSpecsDetailVo();
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/controller/PmsProjectIssuesController.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/controller/PmsProjectIssuesController.java
index 61ec32a12..c7aac46a6 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/controller/PmsProjectIssuesController.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/controller/PmsProjectIssuesController.java
@@ -2,6 +2,7 @@ package com.microservices.pms.project.controller;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
+import com.microservices.common.core.exception.ServiceException;
import com.microservices.common.core.web.controller.BaseController;
import com.microservices.common.core.web.domain.AjaxResult;
import com.microservices.common.core.web.page.GenericsTableDataInfo;
@@ -10,6 +11,7 @@ import com.microservices.common.security.annotation.RequiresPermissions;
import com.microservices.pms.project.domain.vo.*;
import com.microservices.pms.project.service.IPmsProjectTestsheetIssuesService;
import com.microservices.pms.project.service.PmsProjectIssuesService;
+import com.microservices.pms.utils.PmsConstants;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -30,7 +32,7 @@ import javax.servlet.http.HttpServletResponse;
@ApiImplicitParams({
@ApiImplicitParam(name = "enterpriseIdentifier", value = "企业标识", paramType = "path", dataType = "String")
})
-public class PmsProjectIssuesController extends BaseController {
+public class PmsProjectIssuesController extends BaseController {
@Autowired
private PmsProjectIssuesService pmsProjectIssuesService;
@@ -44,8 +46,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions(value = {"pms:pmsProject:show", "pms:pmsProject:showMe", "pms:pmsProjectTestsheet:edit"}, logical = Logical.OR)
@GetMapping("/list")
@ApiOperation(value = "项目工作项列表")
- public AjaxResult list(PmsProjectIssuesSearchVo pmsProjectIssuesSearchVo)
- {
+ public AjaxResult list(PmsProjectIssuesSearchVo pmsProjectIssuesSearchVo) {
JSONObject result = pmsProjectIssuesService.selectPmsProjectIssuesList(pmsProjectIssuesSearchVo);
return success(result);
}
@@ -56,8 +57,11 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions("pms:pmsProjectIssues:add")
@PostMapping("/add")
@ApiOperation(value = "新增项目工作项")
- public AjaxResult add(@RequestBody PmsProjectIssuesInputVo pmsProjectIssuesInputVo)
- {
+ public AjaxResult add(@RequestBody PmsProjectIssuesInputVo pmsProjectIssuesInputVo) {
+ if (PmsConstants.PROJECT_ISSUE_TYPE_REQUIREMENT.equals(String.valueOf(pmsProjectIssuesInputVo.getPmIssueType()))
+ && pmsProjectIssuesInputVo.getRootId() == null) {
+ throw new ServiceException("项目计划仅能基于产品需求规格创建");
+ }
JSONObject result = pmsProjectIssuesService.insertPmsProjectIssues(pmsProjectIssuesInputVo);
return success(result);
}
@@ -68,8 +72,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions("pms:pmsProjectIssues:edit")
@PostMapping("/edit/{id}")
@ApiOperation(value = "编辑项目工作项")
- public AjaxResult edit(@PathVariable("id") Long id, @RequestBody PmsProjectIssuesInputVo pmsProjectIssuesInputVo)
- {
+ public AjaxResult edit(@PathVariable("id") Long id, @RequestBody PmsProjectIssuesInputVo pmsProjectIssuesInputVo) {
JSONObject result = pmsProjectIssuesService.updatePmsProjectIssues(id, pmsProjectIssuesInputVo);
return success(result);
}
@@ -80,10 +83,8 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions("pms:pmsProjectIssues:edit")
@PutMapping("/edit/batch")
@ApiOperation(value = "批量修改项目工作项")
- public AjaxResult batchUpdate(@ApiParam( "项目Id") @RequestParam(name= "pmProjectId") Long pmProjectId,
- @RequestBody PmsProjectIssuesBatchUpdateVo pmsProjectIssuesUpdateVo)
- {
-
+ public AjaxResult batchUpdate(@ApiParam("项目Id") @RequestParam(name = "pmProjectId") Long pmProjectId,
+ @RequestBody PmsProjectIssuesBatchUpdateVo pmsProjectIssuesUpdateVo) {
JSONObject result = pmsProjectIssuesService.batchUpdatePmsProjectIssues(pmProjectId, pmsProjectIssuesUpdateVo);
return success(result);
}
@@ -93,8 +94,7 @@ public class PmsProjectIssuesController extends BaseController {
*/
@RequiresPermissions(value = {"pms:pmsProject:show", "pms:pmsProject:showMe"}, logical = Logical.OR)
@GetMapping("/{id}")
- public AjaxResult query(@PathVariable("id") Long id, @ApiParam( "项目Id")@RequestParam(name = "pmProjectId") Long pmProjectId)
- {
+ public AjaxResult query(@PathVariable("id") Long id, @ApiParam("项目Id") @RequestParam(name = "pmProjectId") Long pmProjectId) {
JSONObject result = pmsProjectIssuesService.selectPmsProjectIssueById(id, pmProjectId);
return success(result);
@@ -105,9 +105,7 @@ public class PmsProjectIssuesController extends BaseController {
*/
@RequiresPermissions("pms:pmsProjectIssues:remove")
@DeleteMapping("/{ids}")
- public AjaxResult remove(@ApiParam( "工作项id数组,为-1时删除全部")@PathVariable Long[] ids, @ApiParam( "项目Id")@RequestParam(name = "pmProjectId") Long pmProjectId)
- {
-
+ public AjaxResult remove(@ApiParam("工作项id数组,为-1时删除全部") @PathVariable Long[] ids, @ApiParam("项目Id") @RequestParam(name = "pmProjectId") Long pmProjectId) {
JSONObject result = pmsProjectIssuesService.deletePmsProjectIssueByIds(ids, pmProjectId);
return success(result);
}
@@ -118,8 +116,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions(value = {"pms:pmsProject:show", "pms:pmsProject:showMe"}, logical = Logical.OR)
@GetMapping("/issueStatus")
@ApiOperation(value = "查询项目工作项状态列表")
- public AjaxResult issueStatus()
- {
+ public AjaxResult issueStatus() {
JSONObject result = pmsProjectIssuesService.selectPmsProjectIssueStatus();
return success(result);
@@ -131,8 +128,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions(value = {"pms:pmsProject:show", "pms:pmsProject:showMe"}, logical = Logical.OR)
@GetMapping("/issuePriorities")
@ApiOperation(value = "查询项目工作项优先级列表")
- public AjaxResult issuePriorities()
- {
+ public AjaxResult issuePriorities() {
JSONObject result = pmsProjectIssuesService.selectPmsProjectIssuePriorities();
return success(result);
@@ -145,8 +141,7 @@ public class PmsProjectIssuesController extends BaseController {
@GetMapping("/issueTags")
@ApiOperation(value = "查询初始的项目工作项标记列表")
public AjaxResult issueTags(@ApiParam(name = "pmProjectId", value = "项目Id") Long pmProjectId,
- @ApiParam(name = "repositoryId", value = "仓库") Long repositoryId)
- {
+ @ApiParam(name = "repositoryId", value = "仓库") Long repositoryId) {
JSONObject result = pmsProjectIssuesService.selectPmsProjectIssueTags(pmProjectId, repositoryId);
return success(result);
@@ -158,8 +153,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions(value = {"pms:pmsProject:show", "pms:pmsProject:showMe", "pms:pmsProjectIssuesTag:manage"}, logical = Logical.OR)
@GetMapping("/enterpriseIssueTags")
@ApiOperation(value = "查询企业下项目工作项标记列表")
- public AjaxResult getEnterpriseIssueTags(PmsEnterpriseIssueTagsSearchVo pmsEnterpriseIssueTagsSearchVo)
- {
+ public AjaxResult getEnterpriseIssueTags(PmsEnterpriseIssueTagsSearchVo pmsEnterpriseIssueTagsSearchVo) {
JSONObject result = pmsProjectIssuesService.selectPmsEnterpriseIssueTags(pmsEnterpriseIssueTagsSearchVo);
return success(result);
@@ -171,8 +165,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions("pms:pmsProjectIssuesTag:manage")
@PostMapping("/enterpriseIssueTags")
@ApiOperation(value = "创建企业下项目工作项标记")
- public AjaxResult createEnterpriseIssueTag(@RequestBody PmsEnterpriseIssueTagInputVo pmsEnterpriseIssueTagInputVo)
- {
+ public AjaxResult createEnterpriseIssueTag(@RequestBody PmsEnterpriseIssueTagInputVo pmsEnterpriseIssueTagInputVo) {
JSONObject result = pmsProjectIssuesService.createPmsEnterpriseIssueTag(pmsEnterpriseIssueTagInputVo);
return success(result);
@@ -184,8 +177,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions("pms:pmsProjectIssuesTag:manage")
@PutMapping("/enterpriseIssueTags/{tagId}")
@ApiOperation(value = "更新企业下项目工作项标记")
- public AjaxResult editEnterpriseIssueTag(@PathVariable("tagId") Long tagId, @RequestBody PmsEnterpriseIssueTagUpdateVo pmsEnterpriseIssueTagUpdateVo)
- {
+ public AjaxResult editEnterpriseIssueTag(@PathVariable("tagId") Long tagId, @RequestBody PmsEnterpriseIssueTagUpdateVo pmsEnterpriseIssueTagUpdateVo) {
JSONObject result = pmsProjectIssuesService.editPmsEnterpriseIssueTag(tagId, pmsEnterpriseIssueTagUpdateVo);
return success(result);
@@ -197,8 +189,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions("pms:pmsProjectIssuesTag:manage")
@DeleteMapping("/enterpriseIssueTags/{tagId}")
@ApiOperation(value = "删除企业下项目工作项标记")
- public AjaxResult deleteEnterpriseIssueTag(@PathVariable("tagId") Long tagId)
- {
+ public AjaxResult deleteEnterpriseIssueTag(@PathVariable("tagId") Long tagId) {
JSONObject result = pmsProjectIssuesService.deletePmsEnterpriseIssueTag(tagId);
return success(result);
@@ -210,8 +201,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions(value = {"pms:pmsProject:show", "pms:pmsProject:showMe"}, logical = Logical.OR)
@GetMapping("{repositoryId}/repoBranches")
@ApiOperation(value = "查询仓库下分支列表")
- public AjaxResult repoBranches(@PathVariable Long repositoryId)
- {
+ public AjaxResult repoBranches(@PathVariable Long repositoryId) {
JSONArray result = pmsProjectIssuesService.selectPmsProjectRepoBranches(repositoryId);
return success(result);
@@ -223,8 +213,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions(value = {"pms:pmsProjectIssues:edit", "pms:pmsProjectIssues:add"}, logical = Logical.OR)
@PostMapping("/attachments")
@ApiOperation(value = "上传工作项中的附件")
- public AjaxResult uploadAttachments(@RequestPart("file") MultipartFile file)
- {
+ public AjaxResult uploadAttachments(@RequestPart("file") MultipartFile file) {
JSONObject result = pmsProjectIssuesService.uploadAttachment(file);
return success(result);
}
@@ -235,8 +224,7 @@ public class PmsProjectIssuesController extends BaseController {
@RequiresPermissions(value = {"pms:pmsProjectIssues:edit", "pms:pmsProjectIssues:add", "pms:pmsProjectIssues:remove"}, logical = Logical.OR)
@DeleteMapping("/attachments/{id}")
@ApiOperation(value = "删除工作项中的附件")
- public AjaxResult deleteAttachments(@PathVariable Long id)
- {
+ public AjaxResult deleteAttachments(@PathVariable Long id) {
JSONObject result = pmsProjectIssuesService.deleteAttachment(id);
return success(result);
@@ -249,8 +237,7 @@ public class PmsProjectIssuesController extends BaseController {
@PostMapping("/link/{issueId}")
@ApiOperation(value = "添加项目工作项关联")
public AjaxResult addIssueLinks(@ApiParam("工作项id") @PathVariable Long issueId,
- @RequestBody PmsProjectIssuesLinkVo pmsProjectIssuesLinkVo)
- {
+ @RequestBody PmsProjectIssuesLinkVo pmsProjectIssuesLinkVo) {
JSONObject result = pmsProjectIssuesService.addPmsProjectIssueLink(issueId, pmsProjectIssuesLinkVo);
return success(result);
@@ -263,8 +250,7 @@ public class PmsProjectIssuesController extends BaseController {
@GetMapping("/link/{issueId}")
@ApiOperation(value = "查看项目工作项关联")
public AjaxResult getIssueLinks(@ApiParam("工作项id") @PathVariable Long issueId,
- @ApiParam( "项目Id")@RequestParam(name = "pmProjectId") Long pmProjectId)
- {
+ @ApiParam("项目Id") @RequestParam(name = "pmProjectId") Long pmProjectId) {
JSONObject result = pmsProjectIssuesService.getPmsProjectIssueLink(issueId, pmProjectId);
return success(result);
@@ -294,12 +280,12 @@ public class PmsProjectIssuesController extends BaseController {
@GetMapping("/optionalParentIssue/{issueId}")
@ApiOperation(value = "可选择的父工作项列表")
public AjaxResult getOptionalParentIssueList(
- @ApiParam("页码") Integer pageNum,
- @ApiParam("页数") Integer pageSize,
- @ApiParam("工作项id") @PathVariable Long issueId,
- @ApiParam("需求1 任务2 缺陷3") @RequestParam(name = "pmIssueType") String pmIssueType,
- @ApiParam("项目id") @RequestParam(name = "pmProjectId") String pmProjectId,
- @ApiParam("搜索关键词") @RequestParam(name = "keyword", required = false) String keyword
+ @ApiParam("页码") Integer pageNum,
+ @ApiParam("页数") Integer pageSize,
+ @ApiParam("工作项id") @PathVariable Long issueId,
+ @ApiParam("需求1 任务2 缺陷3") @RequestParam(name = "pmIssueType") String pmIssueType,
+ @ApiParam("项目id") @RequestParam(name = "pmProjectId") String pmProjectId,
+ @ApiParam("搜索关键词") @RequestParam(name = "keyword", required = false) String keyword
) {
@@ -315,8 +301,7 @@ public class PmsProjectIssuesController extends BaseController {
@ApiOperation(value = "删除项目工作项关联")
public AjaxResult removeIssueLinks(@ApiParam("当前工作项id") @PathVariable Long issueId,
@ApiParam("关联工作项id") @PathVariable String linkIssueId,
- @ApiParam( "项目Id")@RequestParam(name = "pmProjectId") Long pmProjectId)
- {
+ @ApiParam("项目Id") @RequestParam(name = "pmProjectId") Long pmProjectId) {
JSONObject result = pmsProjectIssuesService.deletePmsProjectIssueLink(issueId, linkIssueId, pmProjectId);
return success(result);
@@ -328,8 +313,7 @@ public class PmsProjectIssuesController extends BaseController {
@PostMapping("/journals/{issueId}")
@ApiOperation(value = "新增工作项评论")
public AjaxResult addJournals(@ApiParam("工作项id") @PathVariable Long issueId,
- @RequestBody PmsProjectIssueJournalInputVo pmsProjectIssueJournalInputVo)
- {
+ @RequestBody PmsProjectIssueJournalInputVo pmsProjectIssueJournalInputVo) {
JSONObject result = pmsProjectIssuesService.addPmsProjectIssueJournals(issueId, pmsProjectIssueJournalInputVo);
return success(result);
}
@@ -341,10 +325,9 @@ public class PmsProjectIssuesController extends BaseController {
@ApiOperation(value = "删除工作项评论")
public AjaxResult removeJournals(@ApiParam("工作项id") @PathVariable Long issueId,
@ApiParam("评论id") @PathVariable Long journalId,
- @ApiParam( "项目Id")@RequestParam(name = "pmProjectId") Long pmProjectId,
- @ApiParam( "工作项关联的仓库id")@RequestParam(name = "pmProjectRepositoryId", required = false) Long pmProjectRepositoryId
- )
- {
+ @ApiParam("项目Id") @RequestParam(name = "pmProjectId") Long pmProjectId,
+ @ApiParam("工作项关联的仓库id") @RequestParam(name = "pmProjectRepositoryId", required = false) Long pmProjectRepositoryId
+ ) {
JSONObject result = pmsProjectIssuesService.removePmsProjectIssueJournals(issueId, journalId, pmProjectId, pmProjectRepositoryId);
return success(result);
}
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/domain/vo/PmsProjectIssuesInputVo.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/domain/vo/PmsProjectIssuesInputVo.java
index 1ccf17954..e77fa6172 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/domain/vo/PmsProjectIssuesInputVo.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/domain/vo/PmsProjectIssuesInputVo.java
@@ -1,5 +1,7 @@
package com.microservices.pms.project.domain.vo;
+import com.alibaba.fastjson2.JSONObject;
+import com.microservices.common.core.utils.StringUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -70,4 +72,14 @@ public class PmsProjectIssuesInputVo {
@ApiModelProperty(value = "关联工作项id")
private Long linkAbleId;
+
+ public boolean isChangeContent(JSONObject issueJson) {
+ if (StringUtils.isNotEmpty(subject) && !issueJson.getString("subject").equals(subject)) {
+ return true;
+ }
+ if (StringUtils.isNotEmpty(description) && !issueJson.getString("description").equals(description)) {
+ return true;
+ }
+ return attachmentIds != null;
+ }
}
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/PmsProjectIssuesService.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/PmsProjectIssuesService.java
index 1927c29f0..203dcce95 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/PmsProjectIssuesService.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/project/service/PmsProjectIssuesService.java
@@ -9,6 +9,9 @@ import com.microservices.common.security.utils.SecurityUtils;
import com.microservices.pms.common.service.IPmsCommonService;
import com.microservices.pms.enterprise.domain.PmsEnterprise;
import com.microservices.pms.enterprise.service.IPmsEnterpriseService;
+import com.microservices.pms.enums.ProjectIssueStatus;
+import com.microservices.pms.product.domain.enums.ProductReqStatus;
+import com.microservices.pms.product.service.IPmsProductRequirementService;
import com.microservices.pms.project.domain.PmsProject;
import com.microservices.pms.project.domain.SimpleRepository;
import com.microservices.pms.project.domain.vo.*;
@@ -23,6 +26,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
@@ -53,6 +57,10 @@ public class PmsProjectIssuesService {
@Lazy
private IPmsProjectService pmsProjectService;
+ @Autowired
+ @Lazy
+ private IPmsProductRequirementService pmsProductRequirementService;
+
@Autowired
@Lazy
private IPmsProjectTestsheetIssuesService pmsProjectTestsheetIssuesService;
@@ -95,6 +103,7 @@ public class PmsProjectIssuesService {
return gitLinkRequestHelper.doPost(PmsGitLinkRequestUrl.CREATE_ISSUE(), issueInput);
}
+ @Transactional(rollbackFor = Exception.class)
public JSONObject updatePmsProjectIssues(Long id, PmsProjectIssuesInputVo pmsProjectIssuesInputVo) {
pmsProjectService.selectAndCheckPmsProjectById(pmsProjectIssuesInputVo.getPmProjectId());
JSONObject updatedIssue;
@@ -102,6 +111,35 @@ public class PmsProjectIssuesService {
updatedIssue = gitLinkRequestHelper.doGet(PmsGitLinkRequestUrl.GET_ISSUE(id, pmsProjectIssuesInputVo.getPmProjectId()));
} catch (URISyntaxException e) {
throw new RuntimeException(e);
+ }
+ // 项目计划不允许编辑标题、正文和附件
+ if (PmsConstants.PROJECT_ISSUE_TYPE_REQUIREMENT.equals(updatedIssue.getString("pm_issue_type"))
+ && updatedIssue.getString("root_id") == null) {
+ if (pmsProjectIssuesInputVo.isChangeContent(updatedIssue)) {
+ throw new ServiceException("项目计划不允许编辑标题、正文和附件");
+ }
+ if (ProjectIssueStatus.REFUSE.getId().equals(pmsProjectIssuesInputVo.getStatusId())
+ || ProjectIssueStatus.NEW.getId().equals(pmsProjectIssuesInputVo.getStatusId())) {
+ throw new ServiceException("项目计划状态值选择错误");
+ }
+
+ // 如果状态发生变更,需同步产品需规的状态变更
+ if (pmsProjectIssuesInputVo.getStatusId() != null) {
+ JSONObject statusJson = updatedIssue.getJSONObject("status");
+ if (!statusJson.getString("id").equals(String.valueOf(pmsProjectIssuesInputVo.getStatusId()))) {
+ // 项目计划修改为进行中将需规调整为已计划
+ if (ProjectIssueStatus.RESOLVING.getId().equals(pmsProjectIssuesInputVo.getStatusId())) {
+ pmsProductRequirementService.updateReqSpecsStatusByProjectReqId(id, ProductReqStatus.PLANNED_REQ_SPECS);
+ }
+ // 项目计划修改为已完成或已关闭将需规调整为已完成
+ if (ProjectIssueStatus.RESOLVED.getId().equals(pmsProjectIssuesInputVo.getStatusId())
+ || ProjectIssueStatus.CLOSE.getId().equals(pmsProjectIssuesInputVo.getStatusId())) {
+ pmsProductRequirementService.updateReqSpecsStatusByProjectReqId(id, ProductReqStatus.COMPLETED_REQ_SPECS);
+ }
+ }
+ }
+
+
}
if (PmsConstants.PROJECT_ISSUE_TYPE_WEEKLY_REPORT.equals(updatedIssue.getString("pm_issue_type"))
&& updatedIssue.getString("root_id") != null
diff --git a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
index 80876e48c..d911cef96 100644
--- a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
+++ b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
@@ -237,6 +237,12 @@
from pms_product_requirement
where identifier = #{identifier}
+
From be55a0d4e5de99b493c3c50e28ab993672a03079 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Wed, 11 Dec 2024 14:45:35 +0800
Subject: [PATCH 10/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E9=9C=80=E8=A7=84=E5=AF=B9=E5=BA=94=E7=9A=84?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A1=E5=88=92=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
优化Forge异常时错误提示
Signed-off-by: OTTO <731554297@qq.com>
---
.../common/httpClient/service/HttpAPIService.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/microservices-common/microservices-common-httpClient/src/main/java/com/microservices/common/httpClient/service/HttpAPIService.java b/microservices-common/microservices-common-httpClient/src/main/java/com/microservices/common/httpClient/service/HttpAPIService.java
index 607bc6887..53fd61202 100644
--- a/microservices-common/microservices-common-httpClient/src/main/java/com/microservices/common/httpClient/service/HttpAPIService.java
+++ b/microservices-common/microservices-common-httpClient/src/main/java/com/microservices/common/httpClient/service/HttpAPIService.java
@@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.microservices.common.core.constant.Constants;
import com.microservices.common.core.constant.HttpStatus;
+import com.microservices.common.core.exception.ServiceException;
import com.microservices.common.httpClient.domain.CustomHttpDelete;
import com.microservices.system.api.domain.SysFileBytes;
import org.apache.commons.collections4.MapUtils;
@@ -281,6 +282,9 @@ public class HttpAPIService {
long length = httpEntity.getContentLength();
if (length != 0L) {
String result = EntityUtils.toString(httpEntity);
+ if (!JSON.isValid(result)) {
+ throw new ServiceException("平台接口响应格式异常");
+ }
Object resultObj = JSON.parse(result);
if (resultObj instanceof JSONArray) {
JSONObject jsonObject = new JSONObject();
From 7efd45c462dd2ca488d33367d01428cc2f4b0f33 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Wed, 11 Dec 2024 15:20:05 +0800
Subject: [PATCH 11/14] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
修复需规拒绝变更时操作记录异常的问题
Signed-off-by: OTTO <731554297@qq.com>
---
.../product/service/impl/PmsProductRequirementServiceImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
index 95396163a..814bbf8ac 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductRequirementServiceImpl.java
@@ -359,7 +359,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
// 原需规记录评审意见
PmsProductReqOperationRecord oldReqSpecsRecord
= productReqReviewVo.toReqSpecsRecord(SecurityUtils.getUsername());
- oldReqSpecsRecord.setId(fromReqSpecs.getId());
+ oldReqSpecsRecord.setProductRequirementId(fromReqSpecs.getId());
pmsProductReqOperationRecordService.insertPmsProductReqOperationRecord(oldReqSpecsRecord);
} else {
reqSpecs.setStatus(ProductReqStatus.REJECTED_REQ_SPECS.getKey());
From fe8ce596291a8bdd3708ffb1cfd296ac44dcba39 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Wed, 11 Dec 2024 15:22:38 +0800
Subject: [PATCH 12/14] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
需规操作记录应该根据创建时间排序
Signed-off-by: OTTO <731554297@qq.com>
---
.../mapper/pms/PmsProductReqOperationRecordMapper.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductReqOperationRecordMapper.xml b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductReqOperationRecordMapper.xml
index 991a38563..0b9b5ae6a 100644
--- a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductReqOperationRecordMapper.xml
+++ b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductReqOperationRecordMapper.xml
@@ -57,7 +57,7 @@
and reserved_field_2 = #{reservedField2}
and reserved_field_3 = #{reservedField3}
and reserved_field_4 = #{reservedField4}
- order by operating_time desc
+ order by create_time desc
@@ -71,7 +71,7 @@
where type = 'reviewUserReq'
and product_requirement_id=#{reqId}
- order by operating_time desc
+ order by create_time desc
limit 1
From 3f9fd173c679c5f2fc6d3306ee1e65d1122118a8 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Wed, 11 Dec 2024 15:31:19 +0800
Subject: [PATCH 13/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
用户和需规评审时将评审时间记录到操作内容中(Content),防止用户填写了一个过早的时间导致操作记录列表混乱
Signed-off-by: OTTO <731554297@qq.com>
---
.../pms/product/domain/enums/ProductReqOperationType.java | 2 +-
.../microservices/pms/product/domain/vo/ProductReqReviewVo.java | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqOperationType.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqOperationType.java
index f77e5a620..5786e130d 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqOperationType.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/enums/ProductReqOperationType.java
@@ -32,7 +32,7 @@ public enum ProductReqOperationType {
throw new ServiceException("需求操作记录类型错误");
}
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- String operationTimeStr = formatter.format(record.getOperatingTime());
+ String operationTimeStr = formatter.format(record.getCreateTime());
switch (type) {
case CONTENT_MODIFY:
return String.format("%s,由【%s】%s",
diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqReviewVo.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqReviewVo.java
index 485eeee3a..47ca3856f 100644
--- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqReviewVo.java
+++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/domain/vo/ProductReqReviewVo.java
@@ -64,6 +64,7 @@ public class ProductReqReviewVo {
JSONObject contentJson = new JSONObject();
contentJson.put("reviewUser", reviewUser);
contentJson.put("reviewContent", reviewContent);
+ contentJson.put("reviewTime", reviewTime);
record.setContent(contentJson.toJSONString());
return record;
}
From 87de8b7f90407462af3dfc32c2ed13564b3dce85 Mon Sep 17 00:00:00 2001
From: OTTO <731554297@qq.com>
Date: Wed, 11 Dec 2024 15:37:28 +0800
Subject: [PATCH 14/14] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E4=B8=AD=E7=9A=84=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E8=A7=84=E6=A0=BC=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
查询用户需求和需规评审人以及评审时间时应查询最新一条已通过评审的记录
Signed-off-by: OTTO <731554297@qq.com>
---
.../mapper/pms/PmsProductReqOperationRecordMapper.xml | 4 ++--
.../main/resources/mapper/pms/PmsProductRequirementMapper.xml | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductReqOperationRecordMapper.xml b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductReqOperationRecordMapper.xml
index 0b9b5ae6a..2a8a99d3e 100644
--- a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductReqOperationRecordMapper.xml
+++ b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductReqOperationRecordMapper.xml
@@ -69,7 +69,7 @@
- where type = 'reviewUserReq'
+ where type = 'reviewUserReq' and operation = 'pass'
and product_requirement_id=#{reqId}
order by create_time desc
limit 1
@@ -86,7 +86,7 @@
- where type = 'reviewReqSpecs'
+ where type = 'reviewReqSpecs' and operation = 'pass'
and product_requirement_id=#{reqId}
order by create_time desc
limit 1
diff --git a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
index d911cef96..617cdf7cd 100644
--- a/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
+++ b/microservices-modules/microservices-modules-pms/src/main/resources/mapper/pms/PmsProductRequirementMapper.xml
@@ -99,9 +99,10 @@
record.review_time,
record.content as review_content
from pms_product_requirement as ppr
- left join (select product_requirement_id, MAX(operating_time) as review_time, content
+ left join (select product_requirement_id, MAX(create_time) as review_time, content
from pms_product_req_operation_record
where type = 'reviewUserReq'
+ and operation = 'pass'
group by product_requirement_id, content) as record
on record.product_requirement_id = ppr.id