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
621bcde3
Commit
621bcde3
authored
Jan 26, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
开始总任务,子任务完成修改对应总任务状态 See merge request
!62
parents
d4347e51
cf150154
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
85 additions
and
0 deletions
+85
-0
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
+2
-0
StrategyCarReviewTaskSigned.java
...a/com/ruoyi/service/impl/StrategyCarReviewTaskSigned.java
+10
-0
StrategySystemReviewTaskSigned.java
...om/ruoyi/service/impl/StrategySystemReviewTaskSigned.java
+9
-0
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+26
-0
TaskController.java
...ty-review/src/main/java/com/ruoyi/web/TaskController.java
+11
-0
TaskStartRequest.java
...src/main/java/com/ruoyi/web/request/TaskStartRequest.java
+13
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+10
-0
No files found.
quality-review/src/main/java/com/ruoyi/mapper/TaskMapper.java
View file @
621bcde3
...
...
@@ -19,4 +19,8 @@ public interface TaskMapper extends BaseMapper<Task> {
List
<
TaskFindPendingResponse
>
findPending
(
TaskFindPendingRequest
request
);
List
<
Task
>
findFinish
(
TaskFindFinishRequest
request
);
Long
findByCarReviewTaskId
(
@Param
(
"carReviewId"
)
Long
carReviewId
);
Long
findBySystemReviewTaskId
(
@Param
(
"systemReviewId"
)
Long
systemReviewId
);
}
quality-review/src/main/java/com/ruoyi/service/TaskService.java
View file @
621bcde3
...
...
@@ -36,4 +36,6 @@ public interface TaskService extends IService<Task> {
void
editTask
(
TaskEditRequest
request
);
void
deleteTask
(
TaskDeleteRequest
request
);
void
startTask
(
TaskStartRequest
request
);
}
quality-review/src/main/java/com/ruoyi/service/impl/StrategyCarReviewTaskSigned.java
View file @
621bcde3
...
...
@@ -8,6 +8,7 @@ import com.ruoyi.domain.*;
import
com.ruoyi.mapper.CarReviewTaskMapper
;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.TaskMapper
;
import
com.ruoyi.service.ReviewDetailsResultService
;
import
com.ruoyi.service.ReviewSceneChangeTaskService
;
import
com.ruoyi.service.ReviewStandardService
;
...
...
@@ -19,6 +20,7 @@ import org.springframework.context.ApplicationContext;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.swing.table.TableModel
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -38,6 +40,9 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
@Autowired
private
CarReviewTaskMapper
carReviewTaskMapper
;
@Autowired
private
TaskMapper
taskMapper
;
// SIGNED状态下
// 1.standard字段使用task中归档的问卷
// 2.不查询场景变更任务
...
...
@@ -77,7 +82,12 @@ public class StrategyCarReviewTaskSigned implements StrategyCarReviewTask, Initi
// 4. 保存签名图片地址
carReviewTask
.
setImagesUrl
(
imagesUrl
);
// 5.再找带该子任务所属的总任务,将总任务的状态由 RUNNING 改回 RUNNABLE
Task
task
=
taskMapper
.
selectById
(
taskMapper
.
findByCarReviewTaskId
(
carReviewTask
.
getId
()));
task
.
setTaskStatus
(
Task
.
STATUS_RUNNABLE
);
carReviewTaskMapper
.
updateById
(
carReviewTask
);
taskMapper
.
updateById
(
task
);
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/StrategySystemReviewTaskSigned.java
View file @
621bcde3
...
...
@@ -8,6 +8,7 @@ import com.ruoyi.domain.*;
import
com.ruoyi.mapper.ReviewDetailsMapper
;
import
com.ruoyi.mapper.ReviewDetailsResultMapper
;
import
com.ruoyi.mapper.SystemReviewTaskMapper
;
import
com.ruoyi.mapper.TaskMapper
;
import
com.ruoyi.service.ReviewDetailsResultService
;
import
com.ruoyi.service.ReviewSceneChangeTaskService
;
import
com.ruoyi.service.ReviewStandardService
;
...
...
@@ -38,6 +39,9 @@ public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask,
@Autowired
private
SystemReviewTaskMapper
systemReviewTaskMapper
;
@Autowired
private
TaskMapper
taskMapper
;
@Override
public
void
doStart
(
SystemReviewTask
systemReviewTask
)
{
...
...
@@ -67,7 +71,12 @@ public class StrategySystemReviewTaskSigned implements StrategySystemReviewTask,
// 4.保存签名图片地址
systemReviewTask
.
setImagesUrl
(
imagesUrl
);
// 5.再找带该子任务所属的总任务,将总任务的状态由 RUNNING 改回 RUNNABLE
Task
task
=
taskMapper
.
selectById
(
taskMapper
.
findBySystemReviewTaskId
(
systemReviewTask
.
getId
()));
task
.
setTaskStatus
(
Task
.
STATUS_RUNNABLE
);
systemReviewTaskMapper
.
updateById
(
systemReviewTask
);
taskMapper
.
updateById
(
task
);
}
@Override
...
...
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
621bcde3
...
...
@@ -20,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
@Transactional
@Service
...
...
@@ -184,6 +185,31 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
taskMapper
.
deleteById
(
request
.
getId
());
}
@Override
public
void
startTask
(
TaskStartRequest
request
)
{
Task
task
=
taskMapper
.
selectById
(
request
.
getId
());
SystemReviewTaskStartRequest
systemRequest
=
new
SystemReviewTaskStartRequest
();
systemRequest
.
setTaskId
(
task
.
getSystemReviewTaskId
());
CarReviewTaskStartRequest
carRequest
=
new
CarReviewTaskStartRequest
();
carRequest
.
setTaskId
(
task
.
getCarReviewTaskId
());
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_SRAIF
))
{
systemReviewTaskService
.
start
(
systemRequest
);
task
.
setTaskStatus
(
Task
.
STATUS_RUNNING
);
task
.
setNextNode
(
Task
.
SUB_TASK_GRFIS
);
taskMapper
.
updateById
(
task
);
}
else
if
(
Objects
.
equals
(
task
.
getNextNode
(),
Task
.
SUB_TASK_GRFIS
))
{
carReviewTaskService
.
startReviewTask
(
carRequest
);
task
.
setTaskStatus
(
Task
.
STATUS_RUNNING
);
task
.
setNextNode
(
Task
.
SUB_TASK_TRFIS
);
taskMapper
.
updateById
(
task
);
}
}
public
Long
saveSystemReview
(
TaskCreateRequest
request
,
SysUser
initiator
,
Standard
standard
,
TaskUserRelation
leader
)
{
// 构建并保存任务信息
...
...
quality-review/src/main/java/com/ruoyi/web/TaskController.java
View file @
621bcde3
...
...
@@ -109,4 +109,15 @@ public class TaskController extends BaseController {
return
R
.
ok
();
}
@ApiOperation
(
"开始任务"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"开始任务"
,
businessType
=
BusinessType
.
UPDATE
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/startTask"
)
public
R
<
String
>
startTask
(
@Validated
@RequestBody
TaskStartRequest
request
)
{
taskService
.
startTask
(
request
);
return
R
.
ok
();
}
}
quality-review/src/main/java/com/ruoyi/web/request/TaskStartRequest.java
0 → 100644
View file @
621bcde3
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"TaskStartRequest"
,
description
=
"开始任务"
)
@Data
public
class
TaskStartRequest
{
@ApiModelProperty
(
"ID"
)
private
Long
id
;
}
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
621bcde3
...
...
@@ -131,6 +131,16 @@
</if>
</where>
</select>
<select
id=
"findByCarReviewTaskId"
resultType=
"java.lang.Long"
>
SELECT id
FROM t_task
WHERE system_review_task_id = #{systemReviewId}
</select>
<select
id=
"findBySystemReviewTaskId"
resultType=
"java.lang.Long"
>
SELECT id
FROM t_task
WHERE car_review_task_id = #{carReviewId}
</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