Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-api
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
中汽研标准应用数据库
car-database-api
Commits
c0830b0f
Commit
c0830b0f
authored
Dec 13, 2024
by
宋源硕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'songyuanshuo' into 'master'
2024/12/13接口修改 See merge request
!29
parents
384683d6
10b09108
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
9 deletions
+43
-9
TestUseCaseServiceImpl.java
...n/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
+3
-3
TestUseCaseMapper.xml
...ty-review/src/main/resources/mapper/TestUseCaseMapper.xml
+40
-6
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/TestUseCaseServiceImpl.java
View file @
c0830b0f
...
@@ -465,7 +465,7 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
...
@@ -465,7 +465,7 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
public
NewTestUserCaseListResponseNew
getCaseListNewNew
(
ReviewStandardListByPageRequest
request
)
{
public
NewTestUserCaseListResponseNew
getCaseListNewNew
(
ReviewStandardListByPageRequest
request
)
{
NewTestUserCaseListResponseNew
caseResponse
=
new
NewTestUserCaseListResponseNew
();
NewTestUserCaseListResponseNew
caseResponse
=
new
NewTestUserCaseListResponseNew
();
List
<
NewStandardVONew
>
newStandardVOList
=
testUseCaseMapper
.
getSandardList
(
request
);
List
<
NewStandardVONew
>
newStandardVOList
=
testUseCaseMapper
.
getSandardList
(
request
);
for
(
NewStandardVONew
newStandardVO
:
newStandardVOList
){
/*
for (NewStandardVONew newStandardVO : newStandardVOList){
Long id = Long.parseLong(newStandardVO.getId());
Long id = Long.parseLong(newStandardVO.getId());
List<NewScenarioUseCasesVONew> scenarioUseCasesVOList = testUseCaseMapper.getScenarioList(id);
List<NewScenarioUseCasesVONew> scenarioUseCasesVOList = testUseCaseMapper.getScenarioList(id);
newStandardVO.setScenarioUseCases(scenarioUseCasesVOList);
newStandardVO.setScenarioUseCases(scenarioUseCasesVOList);
...
@@ -474,7 +474,7 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
...
@@ -474,7 +474,7 @@ public class TestUseCaseServiceImpl extends ServiceImpl<TestUseCaseMapper, TestU
List<UseCaseNewVO> useCaseNewVOList = testUseCaseMapper.getUsecaseList(newScenarioUseCasesVONew.getId());
List<UseCaseNewVO> useCaseNewVOList = testUseCaseMapper.getUsecaseList(newScenarioUseCasesVONew.getId());
newScenarioUseCasesVONew.setUseCases(useCaseNewVOList);
newScenarioUseCasesVONew.setUseCases(useCaseNewVOList);
}
}
}
}
*/
caseResponse
.
setUseCases
(
newStandardVOList
);
caseResponse
.
setUseCases
(
newStandardVOList
);
return
caseResponse
;
return
caseResponse
;
}
}
...
...
quality-review/src/main/resources/mapper/TestUseCaseMapper.xml
View file @
c0830b0f
...
@@ -84,11 +84,35 @@
...
@@ -84,11 +84,35 @@
from
from
t_test_usecase
t_test_usecase
</select>
</select>
<select
id=
"getSandardList"
resultType=
"com.ruoyi.domain.vo.NewStandardVONew"
>
select id,
<resultMap
id=
"StandardResultMap"
type=
"com.ruoyi.domain.vo.NewStandardVONew"
>
chapter as serialNumber,
<id
property=
"id"
column=
"standardId"
/>
text as requirements
<result
property=
"serialNumber"
column=
"serialNumber"
/>
from t_review_standard
<result
property=
"requirements"
column=
"requirements"
/>
<collection
property=
"scenarioUseCases"
ofType=
"com.ruoyi.domain.vo.NewScenarioUseCasesVONew"
>
<id
property=
"id"
column=
"testScenarioId"
/>
<result
property=
"testScenario"
column=
"testScenario"
/>
<collection
property=
"useCases"
ofType=
"com.ruoyi.domain.vo.UseCaseNewVO"
>
<id
property=
"id"
column=
"usecaseId"
/>
<result
property=
"customizedID"
column=
"customizedID"
/>
<result
property=
"description"
column=
"description"
/>
</collection>
</collection>
</resultMap>
<select
id=
"getSandardList"
resultMap=
"StandardResultMap"
>
select trs.id as standardId,
trs.chapter as serialNumber,
trs.text as requirements,
tuts.id as testScenarioId,
tuts.test_scenario as testScenario,
tud.id as usecaseId,
tud.customized_id as customizedID,
tud.description as description
from t_review_standard trs
left join t_usecase_test_scenario tuts on trs.id = tuts.standard_id
left join t_usecase_details tud on tuts.id = tud.test_scenario_id
<where>
<where>
<if
test=
"chapter != null and chapter != ''"
>
<if
test=
"chapter != null and chapter != ''"
>
and chapter like concat('%', #{chapter}, '%')
and chapter like concat('%', #{chapter}, '%')
...
@@ -106,7 +130,17 @@
...
@@ -106,7 +130,17 @@
and name = #{name}
and name = #{name}
</if>
</if>
</where>
</where>
-- 对 chapter 进行数字分段排序
ORDER BY
CAST(SUBSTRING_INDEX(trs.chapter, '.', 1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(trs.chapter, '.', 2), '.', -1) AS UNSIGNED),
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(trs.chapter, '.', 3), '.', -1) AS UNSIGNED),
tuts.id asc,
-- 对 customizedID 的主编号进行数字分段排序
CAST(SUBSTRING_INDEX(tud.customized_id, '-', 1) AS UNSIGNED) asc,
-- 对 customizedID 的子编号进行数值排序
CAST(SUBSTRING_INDEX(tud.customized_id, '-', -1) AS UNSIGNED) asc,
tud.id asc
</select>
</select>
<select
id=
"getScenarioList"
resultType=
"com.ruoyi.domain.vo.NewScenarioUseCasesVONew"
>
<select
id=
"getScenarioList"
resultType=
"com.ruoyi.domain.vo.NewScenarioUseCasesVONew"
>
select id,
select id,
...
...
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