Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王飞
vehicle-quality-review
Commits
abf0eb91
Commit
abf0eb91
authored
Apr 22, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
车型试验任务进度 See merge request
!306
parents
c53e6dee
48fd05d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
CaseStatisticsVO.java
...w/src/main/java/com/ruoyi/domain/vo/CaseStatisticsVO.java
+16
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+14
-1
No files found.
quality-review/src/main/java/com/ruoyi/domain/vo/CaseStatisticsVO.java
0 → 100644
View file @
abf0eb91
package
com
.
ruoyi
.
domain
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"CaseStatisticsVO"
,
description
=
"项目用例统计列表VO"
)
@Data
public
class
CaseStatisticsVO
{
@ApiModelProperty
(
"用例检测状态枚举"
)
private
String
status
;
@ApiModelProperty
(
"用例数量"
)
private
Integer
count
;
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
abf0eb91
...
...
@@ -15,6 +15,7 @@ import com.ruoyi.common.utils.SecurityUtils;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.domain.*
;
import
com.ruoyi.domain.vo.CaseStatisticsVO
;
import
com.ruoyi.mapper.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.system.service.ISysUserService
;
...
...
@@ -864,6 +865,18 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 获取项目id
Integer
useCaseNum
=
(
Integer
)
jsonObject
.
get
(
"case_count"
);
// 获取已忽略用例数
List
<
CaseStatisticsVO
>
statisticsVOList
=
jsonObject
.
getList
(
"case_statistics"
,
CaseStatisticsVO
.
class
);
Integer
ignoredNum
=
0
;
for
(
CaseStatisticsVO
vo
:
statisticsVOList
)
{
if
(
Objects
.
equals
(
vo
.
getStatus
(),
"IGNORED"
))
{
ignoredNum
=
vo
.
getCount
();
break
;
}
}
// 任务是否有选择用例
response
.
setTaskScenario
(
useCaseNum
>
0
);
...
...
@@ -877,7 +890,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
else
if
(
resultNum
==
null
)
{
response
.
setTest
(
0.0
);
}
else
{
BigDecimal
num
=
new
BigDecimal
((
1.0
*
resultNum
/
useCaseNum
)
*
90
);
BigDecimal
num
=
new
BigDecimal
((
1.0
*
resultNum
/
(
useCaseNum
-
ignoredNum
)
)
*
90
);
response
.
setTest
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment