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
37d73e77
Commit
37d73e77
authored
Apr 17, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时任务增加测试时间、测试编号
parent
e3e3d842
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
3 deletions
+30
-3
TestRecords.java
...ty-review/src/main/java/com/ruoyi/domain/TestRecords.java
+4
-1
CaseResultVO.java
...eview/src/main/java/com/ruoyi/domain/vo/CaseResultVO.java
+6
-0
TestRecordsServiceImpl.java
...n/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
+17
-0
TestRecordsMapper.xml
...ty-review/src/main/resources/mapper/TestRecordsMapper.xml
+3
-2
No files found.
quality-review/src/main/java/com/ruoyi/domain/TestRecords.java
View file @
37d73e77
...
...
@@ -30,11 +30,14 @@ public class TestRecords {
@ApiModelProperty
(
"用例名称"
)
private
String
usecase
;
@ApiModelProperty
(
"用例编号"
)
private
String
usecaseNo
;
@ApiModelProperty
(
"用例id"
)
private
String
usecaseId
;
@ApiModelProperty
(
"测试时间"
)
private
Date
testTime
;
private
String
testTime
;
@ApiModelProperty
(
"用例简述"
)
private
String
description
;
...
...
quality-review/src/main/java/com/ruoyi/domain/vo/CaseResultVO.java
View file @
37d73e77
...
...
@@ -28,6 +28,12 @@ public class CaseResultVO {
@ApiModelProperty
(
"用例检测状态枚举 UNPROCESSED: 未处理 PASSED: 通过 FAILED: 失败 PROCESSING: 处理中 IGNORED: 已忽略"
)
private
String
status
;
@ApiModelProperty
(
"用例编号"
)
private
String
serial_number
;
@ApiModelProperty
(
"用例开始时间"
)
private
Integer
start_time
;
@ApiModelProperty
(
"用例步骤结果列表"
)
List
<
StepResultVO
>
step_result_list
;
}
quality-review/src/main/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
View file @
37d73e77
...
...
@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -85,6 +86,14 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
testRecords
.
setRiskLevel
(
caseResultVO
.
getRisk_level
());
testRecords
.
setTestResult
(
caseResultVO
.
getStatus
());
testRecords
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecords
.
setUsecaseNo
(
caseResultVO
.
getSerial_number
());
//测试开始时间
if
(
caseResultVO
.
getStart_time
()
!=
null
)
{
Date
date
=
new
Date
(
caseResultVO
.
getStart_time
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
String
testTime
=
sdf
.
format
(
date
);
testRecords
.
setTestTime
(
testTime
);
}
// 用例步骤
List
<
StepResultVO
>
stepResultVOS
=
caseResultVO
.
getStep_result_list
();
...
...
@@ -163,6 +172,14 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
testRecords
.
setRiskLevel
(
caseResultVO
.
getRisk_level
());
testRecords
.
setTestResult
(
caseResultVO
.
getStatus
());
testRecords
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecords
.
setUsecaseNo
(
caseResultVO
.
getSerial_number
());
//测试开始时间
if
(
caseResultVO
.
getStart_time
()
!=
null
)
{
Date
date
=
new
Date
(
caseResultVO
.
getStart_time
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
String
testTime
=
sdf
.
format
(
date
);
testRecords
.
setTestTime
(
testTime
);
}
// 用例步骤
List
<
StepResultVO
>
stepResultVOS
=
caseResultVO
.
getStep_result_list
();
...
...
quality-review/src/main/resources/mapper/TestRecordsMapper.xml
View file @
37d73e77
...
...
@@ -9,8 +9,9 @@
<result
property=
"projectId"
column=
"project_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskId"
column=
"task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"usecase"
column=
"usecase"
jdbcType=
"VARCHAR"
/>
<result
property=
"usecaseNo"
column=
"usecase_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"usecaseId"
column=
"usecase_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"testTime"
column=
"test_time"
jdbcType=
"
TIMESTAMP
"
/>
<result
property=
"testTime"
column=
"test_time"
jdbcType=
"
VARCHAR
"
/>
<result
property=
"description"
column=
"description"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"riskLevel"
column=
"risk_level"
jdbcType=
"VARCHAR"
/>
<result
property=
"testMethod"
column=
"test_method"
jdbcType=
"LONGNVARCHAR"
/>
...
...
@@ -19,7 +20,7 @@
<result
property=
"testDetails"
column=
"test_details"
jdbcType=
"LONGNVARCHAR"
/>
</resultMap>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.TestRecords"
>
SELECT id, project_id, task_id, usecase, usecase_id, test_time, description, risk_level, test_method, test_result, remediation, test_details
SELECT id, project_id, task_id, usecase, usecase_
no, usecase_
id, test_time, description, risk_level, test_method, test_result, remediation, test_details
FROM t_test_records
WHERE project_id = #{id}
</select>
...
...
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