diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/ReviewFunctionalCaseDTO.java b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/ReviewFunctionalCaseDTO.java index 67aed8d0c7..906366993d 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/ReviewFunctionalCaseDTO.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/ReviewFunctionalCaseDTO.java @@ -52,4 +52,7 @@ public class ReviewFunctionalCaseDTO implements Serializable { @Schema(description = "编辑模式(用于脑图的查询)") private String caseEditType; + @Schema(description = "用例创建人") + private String createUser; + } diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml index 905f12aab3..4fdc6be9b2 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml @@ -35,6 +35,7 @@ crfc.case_id as caseId, crfc.`status` as status, crfc.create_time as createTime, + crfc.create_user as createUser, functional_case.version_id as versionId, functional_case.module_id as moduleId, functional_case.name as name, @@ -316,7 +317,7 @@ SELECT - * + crfc.id, crfc.review_id, crfc.case_id, crfc.status, crfc.create_time, crfc.create_user FROM case_review_functional_case crfc LEFT JOIN functional_case fc ON crfc.case_id = fc.id diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java b/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java index 36df69dfa1..1897c8926a 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java @@ -224,7 +224,7 @@ public class CaseReviewCaseProvider implements BaseCaseProvider { Object mapCount = paramMap.get(CaseEvent.Param.COUNT_MAP); Map map = JSON.parseMap(JSON.toJSONString(mapCount)); updateMapCount(map, caseCountMap); - updateCaseReview(reviewId, caseReview.getCaseCount(), caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString()); + updateCaseReview(reviewId, caseReviewFunctionalCases.size()+caseIdList.size(), caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString()); } catch (Exception e) { LogUtils.error(CaseEvent.Event.REVIEW_FUNCTIONAL_CASE + "事件更新失败", e.getMessage()); @@ -350,7 +350,7 @@ public class CaseReviewCaseProvider implements BaseCaseProvider { caseReview.setPassRate(BigDecimal.ZERO); } else { BigDecimal passRate = passCount.divide(totalCount, 2, RoundingMode.HALF_UP); - caseReview.setPassRate(passRate); + caseReview.setPassRate(passRate.multiply(BigDecimal.valueOf(100))); } boolean completed = false; //1.如果都是未评审,则用例评审状态为未开始