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
2c27b56d
Commit
2c27b56d
authored
Apr 11, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
查询测试方法、任务进度 See merge request
!285
parents
7b77963f
4ff42940
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
3 deletions
+31
-3
ITestTypeService.java
...iew/src/main/java/com/ruoyi/service/ITestTypeService.java
+7
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+1
-3
TestTypeServiceImpl.java
...main/java/com/ruoyi/service/impl/TestTypeServiceImpl.java
+13
-0
TestTypeController.java
...eview/src/main/java/com/ruoyi/web/TestTypeController.java
+10
-0
No files found.
quality-review/src/main/java/com/ruoyi/service/ITestTypeService.java
View file @
2c27b56d
...
...
@@ -2,6 +2,7 @@ package com.ruoyi.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.TestType
;
import
com.ruoyi.domain.vo.TestTypeVO
;
import
com.ruoyi.web.request.TestTypeRequest
;
import
java.util.List
;
...
...
@@ -15,4 +16,10 @@ public interface ITestTypeService extends IService<TestType> {
* @return 测试类型库集合
*/
public
List
<
TestType
>
selectTestTypeList
(
TestTypeRequest
testTypeRequest
);
/**
* 从科恩获取所有测试方法
* @return
*/
List
<
TestTypeVO
>
getTestTypeList
();
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
2c27b56d
...
...
@@ -7,10 +7,8 @@ import com.alibaba.fastjson2.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.DataStatisticsUtils
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.model.LoginUser
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.StringUtils
;
...
...
@@ -798,7 +796,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
else
if
(
resultNum
==
null
)
{
response
.
setTest
(
0.0
);
}
else
{
BigDecimal
num
=
new
BigDecimal
((
resultNum
/
useCaseNum
)
*
90
);
BigDecimal
num
=
new
BigDecimal
((
1.0
*
resultNum
/
useCaseNum
)
*
90
);
response
.
setTest
(
num
.
setScale
(
1
,
BigDecimal
.
ROUND_UP
).
doubleValue
());
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TestTypeServiceImpl.java
View file @
2c27b56d
package
com
.
ruoyi
.
service
.
impl
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.TestType
;
import
com.ruoyi.domain.vo.ScenarioVO
;
import
com.ruoyi.domain.vo.TestTypeVO
;
import
com.ruoyi.mapper.TestTypeMapper
;
import
com.ruoyi.service.ITestTypeService
;
...
...
@@ -34,4 +38,13 @@ public class TestTypeServiceImpl extends ServiceImpl<TestTypeMapper, TestType> i
}
return
testTypeMapper
.
selectTestTypeList
(
testTypeRequest
);
}
@Override
public
List
<
TestTypeVO
>
getTestTypeList
()
{
//以post形式请求接口
String
result
=
HttpUtil
.
post
(
"https://10.12.48.78:8090/DescribeScenarioTestTypeList"
,
""
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
result
);
return
jsonObject
.
getList
(
"test_type_list"
,
TestTypeVO
.
class
);
}
}
quality-review/src/main/java/com/ruoyi/web/TestTypeController.java
View file @
2c27b56d
...
...
@@ -4,6 +4,7 @@ import com.ruoyi.common.core.controller.BaseController;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.common.core.page.TableDataInfo
;
import
com.ruoyi.domain.TestType
;
import
com.ruoyi.domain.vo.TestTypeVO
;
import
com.ruoyi.service.ITestTypeService
;
import
com.ruoyi.web.request.TestTypeRequest
;
import
io.swagger.annotations.Api
;
...
...
@@ -51,4 +52,13 @@ public class TestTypeController extends BaseController {
return
R
.
ok
(
testTypeService
.
selectTestTypeList
(
testTypeRequest
));
}
// 从科恩获取所有测试方法
@ApiOperation
(
"查询所有测试方法(科恩)"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getTestTypeList"
)
public
R
<
List
<
TestTypeVO
>>
getTestTypeList
(){
return
R
.
ok
(
testTypeService
.
getTestTypeList
());
}
}
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