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
7adcb6da
Commit
7adcb6da
authored
Feb 04, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询用户发起的任务
parent
7eeaf27c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
1 deletion
+38
-1
Task.java
quality-review/src/main/java/com/ruoyi/domain/Task.java
+4
-1
TaskService.java
...y-review/src/main/java/com/ruoyi/service/TaskService.java
+7
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+6
-0
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+10
-0
TaskFindResponse.java
...rc/main/java/com/ruoyi/web/response/TaskFindResponse.java
+3
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+8
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/Task.java
View file @
7adcb6da
...
...
@@ -66,9 +66,12 @@ public class Task {
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
carReviewTaskId
;
@ApiModelProperty
(
"任务状态
(NEW、FINISH
)"
)
@ApiModelProperty
(
"任务状态
NEW(新建的)、PENDING(运行中的)、FINISH(已结束的
)"
)
private
String
taskStatus
;
@ApiModelProperty
(
"任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]"
)
private
String
runStatus
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
...
...
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
7adcb6da
...
...
@@ -37,4 +37,11 @@ public interface TaskService extends IService<Task> {
void
deleteTask
(
TaskDeleteRequest
request
);
void
startTask
(
TaskStartRequest
request
);
/**
* 用户发起的任务
* @param request
* @return
*/
List
<
TaskFindResponse
>
findCreate
(
TaskFindRequest
request
,
Long
userId
);
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
7adcb6da
...
...
@@ -185,6 +185,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
taskStateFacade
.
doStart
(
task
);
}
@Override
public
List
<
TaskFindResponse
>
findCreate
(
TaskFindRequest
request
,
Long
userId
)
{
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findByUserId
(
request
,
userId
);
return
responses
;
}
public
Long
saveSystemReview
(
TaskCreateRequest
request
,
SysUser
initiator
,
Standard
standard
,
TaskUserRelation
leader
)
{
// 构建并保存任务信息
...
...
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
7adcb6da
...
...
@@ -71,6 +71,16 @@ public class TaskController extends BaseController {
return
R
.
ok
(
response
);
}
@ApiOperation
(
"用户发布的任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findCreate"
)
public
TableDataInfo
<
TaskFindResponse
>
findCreate
(
@Validated
@RequestBody
TaskFindRequest
request
)
{
startPage
(
request
);
return
getDataTable
(
taskService
.
findCreate
(
request
,
getUserId
()));
}
@ApiOperation
(
"查询处理中的任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
...
...
quality-review/src/main/java/com/ruoyi/web/response/TaskFindResponse.java
View file @
7adcb6da
...
...
@@ -35,6 +35,9 @@ public class TaskFindResponse {
@ApiModelProperty
(
"任务状态(NEW、PENDING、FINISH)"
)
private
String
taskStatus
;
@ApiModelProperty
(
"任务运行状态[RUNNABLE(可运行的)、RUNNING(运行中的)]"
)
private
String
runStatus
;
@ApiModelProperty
(
"下一个节点 SUB_TASK_SRAIF(体系审查子任务)、SUB_TASK_TRFIS(车辆实验子任务)、SUB_TASK_GRFIS(车辆问卷子任务)"
)
private
String
nextNode
;
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
7adcb6da
...
...
@@ -9,6 +9,7 @@
<id
property=
"systemReviewTaskId"
column=
"system_review_task_id"
jdbcType=
"BIGINT"
/>
<id
property=
"carReviewTaskId"
column=
"car_review_task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"taskStatus"
column=
"task_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"runStatus"
column=
"run_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"nextNode"
column=
"next_node"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskNo"
column=
"task_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskName"
column=
"task_name"
jdbcType=
"VARCHAR"
/>
...
...
@@ -41,7 +42,9 @@
<id
property=
"carReviewTaskId"
column=
"car_review_task_id"
jdbcType=
"BIGINT"
/>
<result
property=
"taskNo"
column=
"task_no"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskName"
column=
"task_name"
jdbcType=
"VARCHAR"
/>
<result
property=
"productModel"
column=
"product_model"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskStatus"
column=
"task_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"runStatus"
column=
"run_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"nextNode"
column=
"next_node"
jdbcType=
"VARCHAR"
/>
<result
property=
"taskBeginTime"
column=
"task_begin_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"systemTaskBeginTime"
column=
"system_task_begin_time"
jdbcType=
"TIMESTAMP"
/>
...
...
@@ -135,6 +138,7 @@
<select
id=
"findByUserId"
resultMap=
"ResponseMap"
>
SELECT t.id, t.system_review_task_id, t.car_review_task_id,
t.task_no,t.task_name,t.task_status,
t.product_model,
t.leader_id,t.leader,
t.task_begin_time,
t.next_node,
...
...
@@ -148,6 +152,7 @@
left join t_system_review_task srt on t.system_review_task_id = srt.id
left join t_car_review_task crt on t.car_review_task_id = crt.id
<where>
and t.task_initiator_id = #{userId}
<if
test=
"request.standardId != null and request.standardId != ''"
>
and t.standard_id = #{request.standardId}
</if>
...
...
@@ -167,6 +172,9 @@
(request.inspectionItem = 'grfis' AND t.car_review_task_id IS NOT NULL)
)
</if>
<if
test=
"request.taskStatus != null and request.taskStatus != ''"
>
and t.task_status = #{request.taskStatus}
</if>
</where>
</select>
...
...
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