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
55249169
Commit
55249169
authored
Apr 01, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
查看待办任务列表是否选择场景 See merge request
!246
parents
af847352
4605a4e9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
4 deletions
+58
-4
TaskMapper.java
...ity-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
+4
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+20
-4
TaskFindResponse.java
...rc/main/java/com/ruoyi/web/response/TaskFindResponse.java
+3
-0
TaskScenarioResponse.java
...ain/java/com/ruoyi/web/response/TaskScenarioResponse.java
+23
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+8
-0
No files found.
quality-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
View file @
55249169
...
@@ -9,6 +9,7 @@ import com.ruoyi.web.request.TaskFindPendingRequest;
...
@@ -9,6 +9,7 @@ import com.ruoyi.web.request.TaskFindPendingRequest;
import
com.ruoyi.web.request.TaskFindRequest
;
import
com.ruoyi.web.request.TaskFindRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
com.ruoyi.web.response.TaskScenarioResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -52,4 +53,7 @@ public interface TaskMapper extends BaseMapper<Task> {
...
@@ -52,4 +53,7 @@ public interface TaskMapper extends BaseMapper<Task> {
* @return
* @return
*/
*/
InspectionReportPdfVO
selectInspectionReportData
(
Long
taskId
);
InspectionReportPdfVO
selectInspectionReportData
(
Long
taskId
);
// 根据任务列表查询对应的场景数量
List
<
TaskScenarioResponse
>
findByTaskList
(
@Param
(
"responses"
)
List
<
TaskFindResponse
>
responses
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
55249169
...
@@ -18,10 +18,7 @@ import com.ruoyi.mapper.*;
...
@@ -18,10 +18,7 @@ import com.ruoyi.mapper.*;
import
com.ruoyi.service.*
;
import
com.ruoyi.service.*
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.request.*
;
import
com.ruoyi.web.response.DataStatisticsResponse
;
import
com.ruoyi.web.response.*
;
import
com.ruoyi.web.response.ResultCountResponse
;
import
com.ruoyi.web.response.TaskFindResponse
;
import
com.ruoyi.web.response.TaskGetInfoResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -235,6 +232,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -235,6 +232,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
List
<
ModelTestTask
>
modelTestTaskList
=
modelTestTaskMapper
.
findByTaskList
(
responses
);
List
<
ModelTestTask
>
modelTestTaskList
=
modelTestTaskMapper
.
findByTaskList
(
responses
);
setModelProgress
(
modelTestTaskList
,
responses
);
setModelProgress
(
modelTestTaskList
,
responses
);
// 任务是否有选择场景
List
<
TaskScenarioResponse
>
scenarioResponseList
=
taskMapper
.
findByTaskList
(
responses
);
setTaskScenario
(
scenarioResponseList
,
responses
);
for
(
TaskFindResponse
response
:
responses
)
{
for
(
TaskFindResponse
response
:
responses
)
{
String
[]
taskList
=
response
.
getTaskList
().
split
(
","
);
String
[]
taskList
=
response
.
getTaskList
().
split
(
","
);
...
@@ -670,6 +671,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -670,6 +671,21 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
private
void
setTaskScenario
(
List
<
TaskScenarioResponse
>
scenarioResponseList
,
List
<
TaskFindResponse
>
responses
)
{
if
(
scenarioResponseList
!=
null
&&
scenarioResponseList
.
size
()
!=
0
)
{
for
(
TaskScenarioResponse
response
:
scenarioResponseList
)
{
for
(
TaskFindResponse
findResponse
:
responses
)
{
if
(
Objects
.
equals
(
findResponse
.
getId
(),
response
.
getTaskId
()))
{
if
(
response
.
getNum
()
>
0
)
{
findResponse
.
setTaskScenario
(
true
);
}
}
}
}
}
}
private
void
setModelProgress
(
List
<
ModelTestTask
>
modelTestTaskList
,
List
<
TaskFindResponse
>
responses
)
{
private
void
setModelProgress
(
List
<
ModelTestTask
>
modelTestTaskList
,
List
<
TaskFindResponse
>
responses
)
{
if
(
modelTestTaskList
!=
null
&&
modelTestTaskList
.
size
()
!=
0
)
{
if
(
modelTestTaskList
!=
null
&&
modelTestTaskList
.
size
()
!=
0
)
{
...
...
quality-review/src/main/java/com/ruoyi/web/response/TaskFindResponse.java
View file @
55249169
...
@@ -121,4 +121,7 @@ public class TaskFindResponse {
...
@@ -121,4 +121,7 @@ public class TaskFindResponse {
@ApiModelProperty
(
"试验方案ID"
)
@ApiModelProperty
(
"试验方案ID"
)
private
String
testSchemeId
;
private
String
testSchemeId
;
@ApiModelProperty
(
"是否选择场景"
)
private
Boolean
taskScenario
;
}
}
quality-review/src/main/java/com/ruoyi/web/response/TaskScenarioResponse.java
0 → 100644
View file @
55249169
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
"任务场景VO"
)
public
class
TaskScenarioResponse
{
@ApiModelProperty
(
"任务id"
)
private
Long
taskId
;
@ApiModelProperty
(
"场景数量"
)
private
Long
num
;
}
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
55249169
...
@@ -343,6 +343,14 @@
...
@@ -343,6 +343,14 @@
FROM t_task
FROM t_task
WHERE task_name = #{taskName}
WHERE task_name = #{taskName}
</select>
</select>
<select
id=
"findByTaskList"
resultType=
"com.ruoyi.web.response.TaskScenarioResponse"
>
SELECT COUNT(*) num, task_id as taskId FROM t_task_scenario_relation
WHERE task_id IN
<foreach
item=
"item"
collection=
"responses"
open=
"("
separator=
","
close=
")"
>
#{item.id}
</foreach>
GROUP BY task_id
</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