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
1fb3b15e
Commit
1fb3b15e
authored
Mar 27, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调用第三方url
parent
c07ce22a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
9 deletions
+43
-9
TestRecords.java
...ty-review/src/main/java/com/ruoyi/domain/TestRecords.java
+3
-0
TestRecordsServiceImpl.java
...n/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
+34
-4
TestRecordsMapper.xml
...ty-review/src/main/resources/mapper/TestRecordsMapper.xml
+6
-5
No files found.
quality-review/src/main/java/com/ruoyi/domain/TestRecords.java
View file @
1fb3b15e
...
...
@@ -50,4 +50,7 @@ public class TestRecords {
@ApiModelProperty
(
"修复建议"
)
private
String
remediation
;
@ApiModelProperty
(
"测试详情"
)
private
String
testDetails
;
}
quality-review/src/main/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
View file @
1fb3b15e
...
...
@@ -59,6 +59,12 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
for
(
TestRecords
records
:
recordsList
)
{
if
(
Objects
.
equals
(
caseResultVO
.
getId
(),
records
.
getUsecaseId
()))
{
exists
=
true
;
if
(!
Objects
.
equals
(
caseResultVO
.
getStatus
(),
records
.
getTestResult
()))
{
records
.
setTestResult
(
caseResultVO
.
getStatus
());
records
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecordsService
.
updateById
(
records
);
}
break
;
}
}
...
...
@@ -80,12 +86,24 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
if
(
stepResultVOS
!=
null
&&
stepResultVOS
.
size
()
!=
0
)
{
List
<
String
>
stepList
=
new
ArrayList
<>();
List
<
String
>
testDetailsList
=
new
ArrayList
<>();
int
index
=
1
;
// 序号从1开始
for
(
StepResultVO
stepResultVO
:
stepResultVOS
)
{
// 测试方法
String
stepName
=
stepResultVO
.
getName
();
stepList
.
add
(
stepName
);
// 给每个元素加上序号
String
stepWithIndex
=
index
+
"."
+
stepName
;
stepList
.
add
(
stepWithIndex
);
index
++;
// 测试详情
String
testDetails
=
stepResultVO
.
getDescription
();
testDetailsList
.
add
(
testDetails
);
}
testRecords
.
setTestMethod
(
StringUtils
.
join
(
stepList
,
","
));
testRecords
.
setTestMethod
(
StringUtils
.
join
(
stepList
,
"`"
));
testRecords
.
setTestDetails
(
StringUtils
.
join
(
testDetailsList
,
"\n"
));
}
list
.
add
(
testRecords
);
...
...
@@ -141,12 +159,24 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
if
(
stepResultVOS
!=
null
&&
stepResultVOS
.
size
()
!=
0
)
{
List
<
String
>
stepList
=
new
ArrayList
<>();
List
<
String
>
testDetailsList
=
new
ArrayList
<>();
int
index
=
1
;
// 序号从1开始
for
(
StepResultVO
stepResultVO
:
stepResultVOS
)
{
// 测试方法
String
stepName
=
stepResultVO
.
getName
();
stepList
.
add
(
stepName
);
// 给每个元素加上序号
String
stepWithIndex
=
index
+
"."
+
stepName
;
stepList
.
add
(
stepWithIndex
);
index
++;
// 测试详情
String
testDetails
=
stepResultVO
.
getDescription
();
testDetailsList
.
add
(
testDetails
);
}
testRecords
.
setTestMethod
(
StringUtils
.
join
(
stepList
,
","
));
testRecords
.
setTestMethod
(
StringUtils
.
join
(
stepList
,
"`"
));
testRecords
.
setTestDetails
(
StringUtils
.
join
(
testDetailsList
,
"\n"
));
}
list
.
add
(
testRecords
);
...
...
quality-review/src/main/resources/mapper/TestRecordsMapper.xml
View file @
1fb3b15e
...
...
@@ -16,12 +16,13 @@
<result
property=
"testMethod"
column=
"test_method"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"testResult"
column=
"test_result"
jdbcType=
"VARCHAR"
/>
<result
property=
"remediation"
column=
"remediation"
jdbcType=
"VARCHAR"
/>
<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
FROM t_test_records
WHERE project_id = #{id}
</select>
<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
FROM t_test_records
WHERE project_id = #{id}
</select>
</mapper>
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