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
cbf37545
Commit
cbf37545
authored
Mar 27, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
调用第三方url See merge request
!231
parents
2f682d97
07ec99a8
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 @
cbf37545
...
@@ -50,4 +50,7 @@ public class TestRecords {
...
@@ -50,4 +50,7 @@ public class TestRecords {
@ApiModelProperty
(
"修复建议"
)
@ApiModelProperty
(
"修复建议"
)
private
String
remediation
;
private
String
remediation
;
@ApiModelProperty
(
"测试详情"
)
private
String
testDetails
;
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TestRecordsServiceImpl.java
View file @
cbf37545
...
@@ -59,6 +59,12 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -59,6 +59,12 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
for
(
TestRecords
records
:
recordsList
)
{
for
(
TestRecords
records
:
recordsList
)
{
if
(
Objects
.
equals
(
caseResultVO
.
getId
(),
records
.
getUsecaseId
()))
{
if
(
Objects
.
equals
(
caseResultVO
.
getId
(),
records
.
getUsecaseId
()))
{
exists
=
true
;
exists
=
true
;
if
(!
Objects
.
equals
(
caseResultVO
.
getStatus
(),
records
.
getTestResult
()))
{
records
.
setTestResult
(
caseResultVO
.
getStatus
());
records
.
setRemediation
(
caseResultVO
.
getRemediation
());
testRecordsService
.
updateById
(
records
);
}
break
;
break
;
}
}
}
}
...
@@ -80,12 +86,24 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -80,12 +86,24 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
if
(
stepResultVOS
!=
null
&&
stepResultVOS
.
size
()
!=
0
)
{
if
(
stepResultVOS
!=
null
&&
stepResultVOS
.
size
()
!=
0
)
{
List
<
String
>
stepList
=
new
ArrayList
<>();
List
<
String
>
stepList
=
new
ArrayList
<>();
List
<
String
>
testDetailsList
=
new
ArrayList
<>();
int
index
=
1
;
// 序号从1开始
for
(
StepResultVO
stepResultVO
:
stepResultVOS
)
{
for
(
StepResultVO
stepResultVO
:
stepResultVOS
)
{
// 测试方法
String
stepName
=
stepResultVO
.
getName
();
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
);
list
.
add
(
testRecords
);
...
@@ -141,12 +159,24 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
...
@@ -141,12 +159,24 @@ public class TestRecordsServiceImpl extends ServiceImpl<TestRecordsMapper, TestR
if
(
stepResultVOS
!=
null
&&
stepResultVOS
.
size
()
!=
0
)
{
if
(
stepResultVOS
!=
null
&&
stepResultVOS
.
size
()
!=
0
)
{
List
<
String
>
stepList
=
new
ArrayList
<>();
List
<
String
>
stepList
=
new
ArrayList
<>();
List
<
String
>
testDetailsList
=
new
ArrayList
<>();
int
index
=
1
;
// 序号从1开始
for
(
StepResultVO
stepResultVO
:
stepResultVOS
)
{
for
(
StepResultVO
stepResultVO
:
stepResultVOS
)
{
// 测试方法
String
stepName
=
stepResultVO
.
getName
();
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
);
list
.
add
(
testRecords
);
...
...
quality-review/src/main/resources/mapper/TestRecordsMapper.xml
View file @
cbf37545
...
@@ -16,12 +16,13 @@
...
@@ -16,12 +16,13 @@
<result
property=
"testMethod"
column=
"test_method"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"testMethod"
column=
"test_method"
jdbcType=
"LONGNVARCHAR"
/>
<result
property=
"testResult"
column=
"test_result"
jdbcType=
"VARCHAR"
/>
<result
property=
"testResult"
column=
"test_result"
jdbcType=
"VARCHAR"
/>
<result
property=
"remediation"
column=
"remediation"
jdbcType=
"VARCHAR"
/>
<result
property=
"remediation"
column=
"remediation"
jdbcType=
"VARCHAR"
/>
<result
property=
"testDetails"
column=
"test_details"
jdbcType=
"LONGNVARCHAR"
/>
</resultMap>
</resultMap>
<select
id=
"findByTaskId"
resultType=
"com.ruoyi.domain.TestRecords"
>
<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
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
FROM t_test_records
WHERE project_id = #{id}
WHERE project_id = #{id}
</select>
</select>
</mapper>
</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