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
73dcac44
Commit
73dcac44
authored
Mar 11, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小组成员查询处理中的任务
parent
68ced363
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
31 deletions
+21
-31
TaskMapper.java
...ity-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
+1
-1
TaskService.java
...y-review/src/main/java/com/ruoyi/service/TaskService.java
+1
-1
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+2
-2
TaskStatePending.java
...rc/main/java/com/ruoyi/service/impl/TaskStatePending.java
+1
-14
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+1
-1
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+15
-12
No files found.
quality-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
View file @
73dcac44
...
@@ -20,7 +20,7 @@ public interface TaskMapper extends BaseMapper<Task> {
...
@@ -20,7 +20,7 @@ public interface TaskMapper extends BaseMapper<Task> {
List
<
Task
>
findList
(
TaskListRequest
request
);
List
<
Task
>
findList
(
TaskListRequest
request
);
List
<
TaskFindResponse
>
findPending
(
TaskFindPendingRequest
request
);
List
<
TaskFindResponse
>
findPending
(
@Param
(
"request"
)
TaskFindPendingRequest
request
,
@Param
(
"userId"
)
Long
userId
);
List
<
Task
>
findFinish
(
TaskFindFinishRequest
request
);
List
<
Task
>
findFinish
(
TaskFindFinishRequest
request
);
...
...
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
73dcac44
...
@@ -25,7 +25,7 @@ public interface TaskService extends IService<Task> {
...
@@ -25,7 +25,7 @@ public interface TaskService extends IService<Task> {
* @param request
* @param request
* @return
* @return
*/
*/
List
<
TaskFindResponse
>
findPending
(
TaskFindPendingRequest
request
);
List
<
TaskFindResponse
>
findPending
(
TaskFindPendingRequest
request
,
Long
userId
);
/**
/**
* 查询完成的任务
* 查询完成的任务
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
73dcac44
...
@@ -176,8 +176,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
...
@@ -176,8 +176,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
}
@Override
@Override
public
List
<
TaskFindResponse
>
findPending
(
TaskFindPendingRequest
request
)
{
public
List
<
TaskFindResponse
>
findPending
(
TaskFindPendingRequest
request
,
Long
userId
)
{
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findPending
(
request
);
List
<
TaskFindResponse
>
responses
=
taskMapper
.
findPending
(
request
,
userId
);
for
(
TaskFindResponse
response
:
responses
)
{
for
(
TaskFindResponse
response
:
responses
)
{
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
if
(
response
.
getSystemReviewTaskId
()
!=
null
)
{
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
))*
100
);
BigDecimal
num
=
new
BigDecimal
(((
double
)
reviewDetailsMapper
.
count
(
response
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
))*
100
);
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskStatePending.java
View file @
73dcac44
...
@@ -52,20 +52,7 @@ public class TaskStatePending extends TaskStateAdapter implements TaskState, Ini
...
@@ -52,20 +52,7 @@ public class TaskStatePending extends TaskStateAdapter implements TaskState, Ini
@Override
@Override
public
void
doSubmit
(
Task
task
)
{
public
void
doSubmit
(
Task
task
)
{
Double
subTaskCount
=
0.0
;
if
(
task
.
getPointer
()
<
task
.
getMaxPointer
())
{
SystemReviewTask
systemReviewTask
=
systemReviewTaskMapper
.
selectById
(
task
.
getSystemReviewTaskId
());
CarReviewTask
carReviewTask
=
carReviewTaskMapper
.
selectById
(
task
.
getCarReviewTaskId
());
if
(
task
.
getSystemReviewTaskId
()
!=
null
&&
!
Objects
.
equals
(
systemReviewTask
.
getTaskStatus
(),
SystemReviewTask
.
STATUS_NEW
))
{
subTaskCount
=
reviewDetailsMapper
.
count
(
task
.
getSystemReviewTaskId
(),
SystemReviewTask
.
TYPE
);
}
if
(
task
.
getCarReviewTaskId
()
!=
null
&&
!
Objects
.
equals
(
carReviewTask
.
getTaskStatus
(),
CarReviewTask
.
TASK_STATUS_NEW
))
{
subTaskCount
=
reviewDetailsMapper
.
count
(
task
.
getCarReviewTaskId
(),
CarReviewTask
.
TYPE
);
}
if
(
subTaskCount
>
0
)
{
task
.
setTaskStatus
(
Task
.
TASK_STATUS_PENDING
);
task
.
setTaskStatus
(
Task
.
TASK_STATUS_PENDING
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_RUNNABLE
);
task
.
setRunStatus
(
Task
.
RUN_STATUS_RUNNABLE
);
}
else
{
}
else
{
...
...
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
73dcac44
...
@@ -118,7 +118,7 @@ public class TaskController extends BaseController {
...
@@ -118,7 +118,7 @@ public class TaskController extends BaseController {
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findPending"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findPending"
)
public
TableDataInfo
<
TaskFindResponse
>
findPending
(
@Validated
@RequestBody
TaskFindPendingRequest
request
)
{
public
TableDataInfo
<
TaskFindResponse
>
findPending
(
@Validated
@RequestBody
TaskFindPendingRequest
request
)
{
startPage
(
request
);
startPage
(
request
);
return
getDataTable
(
taskService
.
findPending
(
request
));
return
getDataTable
(
taskService
.
findPending
(
request
,
getUserId
()
));
}
}
@ApiOperation
(
"查询已归档任务"
)
@ApiOperation
(
"查询已归档任务"
)
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
73dcac44
...
@@ -99,24 +99,27 @@
...
@@ -99,24 +99,27 @@
left join t_system_review_task srt on t.system_review_task_id = srt.id
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
left join t_car_review_task crt on t.car_review_task_id = crt.id
<where>
<where>
t.task_status IN ("NEW","PENDING")
t.id IN (
<if
test=
"standardId != null and standardId != ''"
>
SELECT task_id FROM t_task_user_relation WHERE user_id = #{userId}
and t.standard_id = #{standardId}
)
and t.task_status IN ("NEW","PENDING")
<if
test=
"request.standardId != null and request.standardId != ''"
>
and t.standard_id = #{request.standardId}
</if>
</if>
<if
test=
"
taskNo != null and
taskNo != ''"
>
<if
test=
"
request.taskNo != null and request.
taskNo != ''"
>
and t.task_no like concat('%',#{taskNo},'%')
and t.task_no like concat('%',#{
request.
taskNo},'%')
</if>
</if>
<if
test=
"
taskName != null and
taskName != ''"
>
<if
test=
"
request.taskName != null and request.
taskName != ''"
>
and t.task_name like concat('%',#{taskName},'%')
and t.task_name like concat('%',#{
request.
taskName},'%')
</if>
</if>
<if
test=
"
productModel != null and
productModel != ''"
>
<if
test=
"
request.productModel != null and request.
productModel != ''"
>
and t.product_model like concat('%',#{productModel},'%')
and t.product_model like concat('%',#{
request.
productModel},'%')
</if>
</if>
<if
test=
"
inspectionItem != null and
inspectionItem != ''"
>
<if
test=
"
request.inspectionItem != null and request.
inspectionItem != ''"
>
AND(
AND(
(#{inspectionItem} = 'sraif' AND t.system_review_task_id IS NOT NULL)
(#{
request.
inspectionItem} = 'sraif' AND t.system_review_task_id IS NOT NULL)
OR
OR
(#{inspectionItem} = 'grfis' AND t.car_review_task_id IS NOT NULL)
(#{
request.
inspectionItem} = 'grfis' AND t.car_review_task_id IS NOT NULL)
)
)
</if>
</if>
</where>
</where>
...
...
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