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
88d8c95c
Commit
88d8c95c
authored
Mar 27, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
待办任务车型测试子任务进度
parent
07ec99a8
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
166 additions
and
57 deletions
+166
-57
ModelTestTaskMapper.java
...w/src/main/java/com/ruoyi/mapper/ModelTestTaskMapper.java
+9
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+125
-53
ModelTestTaskMapper.xml
...-review/src/main/resources/mapper/ModelTestTaskMapper.xml
+32
-4
No files found.
quality-review/src/main/java/com/ruoyi/mapper/ModelTestTaskMapper.java
View file @
88d8c95c
...
...
@@ -2,6 +2,9 @@ package com.ruoyi.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.ModelTestTask
;
import
com.ruoyi.web.response.ResultCountResponse
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
...
...
@@ -15,4 +18,10 @@ public interface ModelTestTaskMapper extends BaseMapper<ModelTestTask> {
// 查询pending状态下的所有任务
List
<
ModelTestTask
>
findByStatus
();
// 根据总任务列表查询子任务
List
<
ModelTestTask
>
findByTaskList
(
@Param
(
"responses"
)
List
<
TaskFindResponse
>
responses
);
// 根据子任务列表查询进度
List
<
ResultCountResponse
>
testAnswerCount
(
@Param
(
"responses"
)
List
<
TaskFindResponse
>
responses
);
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
88d8c95c
This diff is collapsed.
Click to expand it.
quality-review/src/main/resources/mapper/ModelTestTaskMapper.xml
View file @
88d8c95c
...
...
@@ -27,10 +27,38 @@
<result
property=
"standards"
column=
"standards"
jdbcType=
"INTEGER"
/>
<result
property=
"testSchemeId"
column=
"test_scheme_id"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"findByStatus"
resultType=
"com.ruoyi.domain.ModelTestTask"
>
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,test_case,create_time,leader_id,leader,standard_id,name,standard_no,submit_id,submit_name,images_url,details,standards,test_scheme_id
FROM t_model_test_task WHERE task_status = 'PENDING'
</select>
<select
id=
"findByStatus"
resultType=
"com.ruoyi.domain.ModelTestTask"
>
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,test_case,create_time,leader_id,leader,standard_id,name,standard_no,submit_id,submit_name,images_url,details,standards,test_scheme_id
FROM t_model_test_task WHERE task_status = 'PENDING'
</select>
<select
id=
"findByTaskList"
resultType=
"com.ruoyi.domain.ModelTestTask"
>
SELECT id,task_no,task_status,task_initiator,task_initiator_dept,task_result,task_begin_time,task_end_time,test_case,create_time,leader_id,leader,standard_id,name,standard_no,submit_id,submit_name,images_url,details,standards,test_scheme_id
FROM t_model_test_task
WHERE id IN
<foreach
collection=
"responses"
item=
"task"
open=
"("
separator=
","
close=
")"
>
#{task.modelTestTaskId}
</foreach>
</select>
<select
id=
"testAnswerCount"
resultType=
"com.ruoyi.web.response.ResultCountResponse"
>
<foreach
item=
"task"
collection=
"responses"
separator=
"UNION ALL"
>
SELECT
#{task.modelTestTaskId} AS taskId,
(IFNULL(
(SELECT COUNT(*) FROM t_test_records WHERE task_id = #{task.modelTestTaskId}),
0
) /
IFNULL(
(SELECT COUNT(*) FROM t_task_scenario_relation tsr
INNER JOIN t_test_scenario tts ON tts.id = tsr.test_scenario_id
INNER JOIN t_test_usecase ttu ON tts.id = ttu.test_scenario_id
WHERE tsr.task_id = #{task.id}),
1
)) * 90 AS schedule,
tm.task_status AS taskStatus
from t_model_test_task tm where tm.id = #{task.modelTestTaskId}
</foreach>
group by taskId
</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