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
939702a4
Commit
939702a4
authored
Apr 01, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gaixiankang' into 'dev'
车型试验子任务 - 查看 See merge request
!247
parents
55249169
1190431a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
38 deletions
+40
-38
StrategyModelTestTaskNew.java
...java/com/ruoyi/service/impl/StrategyModelTestTaskNew.java
+15
-12
TestUseCaseMapper.xml
...ty-review/src/main/resources/mapper/TestUseCaseMapper.xml
+25
-26
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/StrategyModelTestTaskNew.java
View file @
939702a4
package
com
.
ruoyi
.
service
.
impl
;
package
com
.
ruoyi
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.constant.HttpStatus
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.exception.ServiceException
;
...
@@ -64,21 +65,23 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali
...
@@ -64,21 +65,23 @@ public class StrategyModelTestTaskNew implements StrategyModelTestTask, Initiali
// 创建一个HashMap, 用于存放数据。用例条款ID作为key
// 创建一个HashMap, 用于存放数据。用例条款ID作为key
HashMap
<
Long
,
List
<
TestCaseVO
>>
map
=
new
HashMap
<>();
HashMap
<
Long
,
List
<
TestCaseVO
>>
map
=
new
HashMap
<>();
for
(
TestUsecaseVO
testUsecaseVO
:
testCaseList
)
{
for
(
TestUsecaseVO
testUsecaseVO
:
testCaseList
)
{
// map不存在此key,添加; 则,存数据
if
(
ObjectUtil
.
isNotEmpty
(
testUsecaseVO
.
getReviewStandardId
()))
{
if
(!
map
.
containsKey
(
testUsecaseVO
.
getReviewStandardId
()))
{
// map不存在此key,添加; 则,存数据
TestCaseVO
caseVO
=
new
TestCaseVO
();
if
(!
map
.
containsKey
(
testUsecaseVO
.
getReviewStandardId
()))
{
BeanUtils
.
copyProperties
(
testUsecaseVO
,
caseVO
);
TestCaseVO
caseVO
=
new
TestCaseVO
();
List
<
TestCaseVO
>
caseList
=
new
ArrayList
<>();
BeanUtils
.
copyProperties
(
testUsecaseVO
,
caseVO
);
caseList
.
add
(
caseVO
);
List
<
TestCaseVO
>
caseList
=
new
ArrayList
<>();
map
.
put
(
testUsecaseVO
.
getReviewStandardId
(),
caseList
);
caseList
.
add
(
caseVO
);
}
else
{
map
.
put
(
testUsecaseVO
.
getReviewStandardId
(),
caseList
);
TestCaseVO
caseVO
=
new
TestCaseVO
();
}
else
{
BeanUtils
.
copyProperties
(
testUsecaseVO
,
caseVO
);
TestCaseVO
caseVO
=
new
TestCaseVO
();
map
.
get
(
testUsecaseVO
.
getReviewStandardId
()).
add
(
caseVO
);
BeanUtils
.
copyProperties
(
testUsecaseVO
,
caseVO
);
map
.
get
(
testUsecaseVO
.
getReviewStandardId
()).
add
(
caseVO
);
}
}
}
}
}
// 循环map, 给list赋值
// 循环map, 给list赋值
for
(
Map
.
Entry
<
Long
,
List
<
TestCaseVO
>>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
Long
,
List
<
TestCaseVO
>>
entry
:
map
.
entrySet
())
{
List
<
TestUsecaseVO
>
collect
=
testCaseList
.
stream
().
filter
(
testCaseVO
->
entry
.
getKey
().
equals
(
testCaseVO
.
getReviewStandardId
())).
collect
(
Collectors
.
toList
());
List
<
TestUsecaseVO
>
collect
=
testCaseList
.
stream
().
filter
(
testCaseVO
->
entry
.
getKey
().
equals
(
testCaseVO
.
getReviewStandardId
())).
collect
(
Collectors
.
toList
());
if
(
collect
.
size
()
>
0
){
if
(
collect
.
size
()
>
0
){
TestUsecaseVO
testUsecaseVO
=
collect
.
get
(
0
);
TestUsecaseVO
testUsecaseVO
=
collect
.
get
(
0
);
...
...
quality-review/src/main/resources/mapper/TestUseCaseMapper.xml
View file @
939702a4
...
@@ -49,32 +49,31 @@
...
@@ -49,32 +49,31 @@
</select>
</select>
<select
id=
"selectListByTaskId"
resultType=
"com.ruoyi.domain.vo.TestUsecaseVO"
>
<select
id=
"selectListByTaskId"
resultType=
"com.ruoyi.domain.vo.TestUsecaseVO"
>
select
select tu.id,
tu.id,
tu.case_id caseId,
tu.case_id caseId,
ts.test_scenario testScenario,
ts.test_scenario testScenario,
tt.test_type testType,
tt.test_type testType,
tu.usecase_no usecaseNo,
tu.usecase_no usecaseNo,
tu.name,
tu.name,
tu.tools,
tu.tools,
tu.input,
tu.input,
tu.description,
tu.description,
tu.review_standard_id,
tu.review_standard_id,
rs.chapter,
rs.chapter,
rs.text,
rs.text,
rs.test_method testMethod,
rs.test_method testMethod,
tr.test_result testResult
tr.test_result testResult
from t_test_usecase tu
from
left join t_test_scenario ts on tu.test_scenario_id = ts.id
t_test_usecase tu
left join t_test_type tt on tu.test_type_id = tt.id
left join t_test_scenario ts on tu.test_scenario_id = ts.id
left join t_review_standard rs on tu.review_standard_id = rs.id
left join t_test_type tt on tu.test_type_id = tt.id
left join t_task_scenario_relation tsr on tsr.test_scenario_id = ts.id
left join t_review_standard rs on tu.review_standard_id = rs.id
left join t_task t on tsr.task_id = t.id
left join t_task_scenario_relation tsr on tsr.test_scenario_id = ts.id
left join t_model_test_task mtt on mtt.id = t.model_test_task_id
left join t_task t on tsr.task_id = t.id
left join t_test_records tr on tu.case_id = tr.usecase_id
left join t_model_test_task mtt on mtt.id = t.model_test_task_id
where mtt.id = #{id}
left join t_test_records tr on tu.case_id = tr.usecase_id
group by tu.id, tu.case_id, ts.test_scenario, tt.test_type, tu.usecase_no, tu.name, tu.tools, tu.input,
where
tu.description, tu.review_standard_id, rs.chapter, rs.text, rs.test_method, tr.test_result
mtt.id = #{id}
</select>
</select>
<select
id=
"selectOptionalUsecase"
resultType=
"com.ruoyi.domain.vo.OptionalUseCasesVO"
>
<select
id=
"selectOptionalUsecase"
resultType=
"com.ruoyi.domain.vo.OptionalUseCasesVO"
>
...
...
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