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
5660e8c4
Commit
5660e8c4
authored
Jan 18, 2024
by
W_Y
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询进行中的任务
parent
d65cb58e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
147 additions
and
2 deletions
+147
-2
TaskMapper.java
...ity-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
+4
-0
TaskService.java
...y-review/src/main/java/com/ruoyi/service/TaskService.java
+10
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+7
-0
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+11
-0
TaskFindPendingRequest.java
...in/java/com/ruoyi/web/request/TaskFindPendingRequest.java
+25
-0
TaskFindPendingResponse.java
.../java/com/ruoyi/web/response/TaskFindPendingResponse.java
+48
-0
StandardMapper.xml
quality-review/src/main/resources/mapper/StandardMapper.xml
+2
-2
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+40
-0
No files found.
quality-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
View file @
5660e8c4
...
...
@@ -2,7 +2,9 @@ package com.ruoyi.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.response.TaskFindPendingResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
...
...
@@ -12,4 +14,6 @@ import java.util.List;
public
interface
TaskMapper
extends
BaseMapper
<
Task
>
{
List
<
Task
>
findList
(
TaskListRequest
request
);
List
<
TaskFindPendingResponse
>
findPending
(
TaskFindPendingRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
5660e8c4
...
...
@@ -3,7 +3,10 @@ package com.ruoyi.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.Task
;
import
com.ruoyi.web.request.TaskCreateRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.response.TaskFindPendingResponse
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -17,4 +20,11 @@ public interface TaskService extends IService<Task> {
List
<
Task
>
findList
(
TaskListRequest
request
);
void
createTask
(
TaskCreateRequest
request
);
/**
* 查询进行中的任务
* @param request
* @return
*/
List
<
TaskFindPendingResponse
>
findPending
(
TaskFindPendingRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
5660e8c4
...
...
@@ -12,7 +12,9 @@ import com.ruoyi.mapper.TaskMapper;
import
com.ruoyi.service.*
;
import
com.ruoyi.system.service.ISysUserService
;
import
com.ruoyi.web.request.TaskCreateRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.response.TaskFindPendingResponse
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -107,6 +109,11 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
}
@Override
public
List
<
TaskFindPendingResponse
>
findPending
(
TaskFindPendingRequest
request
)
{
return
taskMapper
.
findPending
(
request
);
}
public
Long
saveSystemReview
(
TaskCreateRequest
request
,
SysUser
initiator
,
Standard
standard
,
TaskUserRelation
leader
)
{
// 构建并保存任务信息
...
...
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
5660e8c4
...
...
@@ -11,8 +11,10 @@ import com.ruoyi.domain.TaskUserRelation;
import
com.ruoyi.service.TaskService
;
import
com.ruoyi.service.TaskUserRelationService
;
import
com.ruoyi.web.request.TaskCreateRequest
;
import
com.ruoyi.web.request.TaskFindPendingRequest
;
import
com.ruoyi.web.request.TaskGetInfoRequest
;
import
com.ruoyi.web.request.TaskListRequest
;
import
com.ruoyi.web.response.TaskFindPendingResponse
;
import
com.ruoyi.web.response.TaskGetInfoResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -72,4 +74,13 @@ 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
=
"/findPending"
)
public
TableDataInfo
<
TaskFindPendingResponse
>
findPending
(
@Validated
@RequestBody
TaskFindPendingRequest
request
)
{
startPage
(
request
);
return
getDataTable
(
taskService
.
findPending
(
request
));
}
}
quality-review/src/main/java/com/ruoyi/web/request/TaskFindPendingRequest.java
0 → 100644
View file @
5660e8c4
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@ApiModel
(
value
=
"TaskFindPendingRequest"
,
description
=
"查询进行中总任务"
)
@Data
public
class
TaskFindPendingRequest
extends
PageDomain
{
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
@ApiModelProperty
(
"名称关键词"
)
private
String
taskName
;
@ApiModelProperty
(
"任务开始时间"
)
private
Date
taskBeginTime
;
@ApiModelProperty
(
"子任务状态"
)
private
String
subStatus
;
}
quality-review/src/main/java/com/ruoyi/web/response/TaskFindPendingResponse.java
0 → 100644
View file @
5660e8c4
package
com
.
ruoyi
.
web
.
response
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"TaskFindPendingResponse"
,
description
=
"进行中的总任务"
)
@Data
public
class
TaskFindPendingResponse
{
@ApiModelProperty
(
"主键"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
@ApiModelProperty
(
"体系审查任务id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
systemReviewTaskId
;
@ApiModelProperty
(
"车辆检查任务id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
carReviewTaskId
;
@ApiModelProperty
(
"任务编号"
)
private
String
taskNo
;
@ApiModelProperty
(
"任务名称"
)
private
String
taskName
;
@ApiModelProperty
(
"任务状态(NEW、PENDING、FINISH)"
)
private
String
taskStatus
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"审核组长id"
)
private
Long
leaderId
;
@ApiModelProperty
(
"审核组长姓名"
)
private
String
leader
;
@ApiModelProperty
(
"体系审查任务状态"
)
private
String
reviewStatus
;
@ApiModelProperty
(
"车型审查任务状态"
)
private
String
carReviewStatus
;
@ApiModelProperty
(
"测试任务状态"
)
private
String
carTestStatus
;
}
quality-review/src/main/resources/mapper/StandardMapper.xml
View file @
5660e8c4
...
...
@@ -16,10 +16,10 @@
FROM t_standard
<where>
<if
test=
"params.name != null and params.name != ''"
>
name like concat('%',#{params.name},'%')
and
name like concat('%',#{params.name},'%')
</if>
<if
test=
"params.standardNo != null and params.standardNo != ''"
>
standard_no = #{params.standardNo}
and
standard_no = #{params.standardNo}
</if>
</where>
</select>
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
5660e8c4
...
...
@@ -41,6 +41,20 @@
<result
property=
"file"
column=
"file"
jdbcType=
"VARCHAR"
/>
</resultMap>
<resultMap
id=
"ResponseMap"
type=
"com.ruoyi.web.response.TaskFindPendingResponse"
>
<id
property=
"id"
column=
"id"
jdbcType=
"BIGINT"
/>
<id
property=
"systemReviewTaskId"
column=
"system_review_task_id"
jdbcType=
"BIGINT"
/>
<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=
"taskStatus"
column=
"task_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"leaderId"
column=
"leader_id"
jdbcType=
"BIGINT"
/>
<result
property=
"leader"
column=
"leader"
jdbcType=
"VARCHAR"
/>
<result
property=
"reviewStatus"
column=
"review_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"carReviewStatus"
column=
"car_review_status"
jdbcType=
"VARCHAR"
/>
<result
property=
"carTestStatus"
column=
"car_test_status"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"findList"
parameterType=
"com.ruoyi.web.request.TaskListRequest"
resultMap=
"BaseResultMap"
>
SELECT id, system_review_task_id, car_review_task_id,
task_no,task_name,task_status,product_name,product_model,
...
...
@@ -63,6 +77,32 @@
</where>
order by create_time desc
</select>
<select
id=
"findPending"
parameterType=
"com.ruoyi.web.request.TaskFindPendingRequest"
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.leader_id,t.leader,
srt.task_status review_status,
crt.review_status car_review_status,
crt.test_status car_test_status
FROM t_task t
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>
t.task_status IN ("NEW","PENDING")
<if
test=
"taskNo != null and taskNo != ''"
>
and t.task_no = #{taskNo}
</if>
<if
test=
"taskName != null and taskName != ''"
>
and t.task_name like concat('%',#{taskName},'%')
</if>
<if
test=
"taskBeginTime != null and taskBeginTime != ''"
>
and t.task_begin_time = #{taskBeginTime}
</if>
<if
test=
"subStatus != null and subStatus != ''"
>
and review_status = #{subStatus} OR car_review_status = #{subStatus} OR car_test_status = #{subStatus}
</if>
</where>
</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