fix(用例评审): 评审详情列表显示创建人以及通过率显示100%
This commit is contained in:
parent
20b693abb2
commit
ed6e2ec47d
|
@ -52,4 +52,7 @@ public class ReviewFunctionalCaseDTO implements Serializable {
|
|||
@Schema(description = "编辑模式(用于脑图的查询)")
|
||||
private String caseEditType;
|
||||
|
||||
@Schema(description = "用例创建人")
|
||||
private String createUser;
|
||||
|
||||
}
|
||||
|
|
|
@ -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 id="getList" resultType="io.metersphere.functional.domain.CaseReviewFunctionalCase">
|
||||
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
|
||||
|
@ -335,7 +336,7 @@
|
|||
|
||||
<select id="getListExcludes" resultType="io.metersphere.functional.domain.CaseReviewFunctionalCase">
|
||||
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
|
||||
|
|
|
@ -224,7 +224,7 @@ public class CaseReviewCaseProvider implements BaseCaseProvider {
|
|||
Object mapCount = paramMap.get(CaseEvent.Param.COUNT_MAP);
|
||||
Map<String,Integer> 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.如果都是未评审,则用例评审状态为未开始
|
||||
|
|
Loading…
Reference in New Issue