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
8b04eabc
Commit
8b04eabc
authored
Mar 08, 2024
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑任务
parent
100c6ea9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
14 deletions
+29
-14
Task.java
quality-review/src/main/java/com/ruoyi/domain/Task.java
+11
-4
TaskServiceImpl.java
...src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
+18
-10
No files found.
quality-review/src/main/java/com/ruoyi/domain/Task.java
View file @
8b04eabc
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.StandardJsonTypeHandler
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -62,10 +59,12 @@ public class Task {
@ApiModelProperty
(
"体系审查任务id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@TableField
(
insertStrategy
=
FieldStrategy
.
IGNORED
,
updateStrategy
=
FieldStrategy
.
IGNORED
,
whereStrategy
=
FieldStrategy
.
IGNORED
)
private
Long
systemReviewTaskId
;
@ApiModelProperty
(
"车辆检查任务id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@TableField
(
insertStrategy
=
FieldStrategy
.
IGNORED
,
updateStrategy
=
FieldStrategy
.
IGNORED
,
whereStrategy
=
FieldStrategy
.
IGNORED
)
private
Long
carReviewTaskId
;
@ApiModelProperty
(
"任务状态NEW(新建的)、PENDING(运行中的)、FINISH(已结束的)、TEMPORARILY(暂存)"
)
...
...
@@ -180,4 +179,12 @@ public class Task {
return
split
[
pointer
+
1
];
}
}
public
void
setSystemReviewTaskIdNull
(){
this
.
systemReviewTaskId
=
null
;
}
public
void
setCarReviewTaskIdNull
()
{
this
.
carReviewTaskId
=
null
;
}
}
quality-review/src/main/java/com/ruoyi/service/impl/TaskServiceImpl.java
View file @
8b04eabc
package
com
.
ruoyi
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.DataStatisticsUtils
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
...
...
@@ -212,38 +214,44 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 构建并保存任务信息
// 总任务
Task
task
=
new
Task
(
);
Task
task
=
taskMapper
.
selectById
(
request
.
getId
()
);
task
.
setLeaderId
(
leader
.
getUserId
());
task
.
setLeader
(
leader
.
getName
());
String
joinTaskList
=
StringUtils
.
join
(
request
.
getTaskList
(),
","
);
task
.
setTaskList
(
joinTaskList
);
BeanUtils
.
copyBeanProp
(
task
,
request
);
Task
oldTask
=
taskMapper
.
selectById
(
request
.
getId
());
if
(
task
.
getTaskStatus
()
==
Task
.
TASK_STATUS_NEW
)
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
oldT
ask
.
getCarReviewTaskId
()
==
null
)
{
if
(
Objects
.
equals
(
task
.
getTaskStatus
(),
Task
.
TASK_STATUS_NEW
)
)
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
t
ask
.
getCarReviewTaskId
()
==
null
)
{
// 保存车型审查问卷任务
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
task
.
setCarReviewTaskId
(
saveCarReview
(
createRequest
,
initiator
,
standard
,
leader
));
}
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
oldTask
.
getCarReviewTaskId
()
!=
null
)
{
carReviewTaskMapper
.
deleteById
(
oldTask
.
getCarReviewTaskId
());
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_GRFIS
)
&&
task
.
getCarReviewTaskId
()
!=
null
)
{
carReviewTaskMapper
.
deleteById
(
task
.
getCarReviewTaskId
());
task
.
setCarReviewTaskIdNull
();
}
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
oldT
ask
.
getSystemReviewTaskId
()
==
null
)
{
if
(
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
t
ask
.
getSystemReviewTaskId
()
==
null
)
{
// 保存体系审查任务
TaskCreateRequest
createRequest
=
new
TaskCreateRequest
();
BeanUtils
.
copyBeanProp
(
createRequest
,
request
);
task
.
setSystemReviewTaskId
(
saveSystemReview
(
createRequest
,
initiator
,
standard
,
leader
));
}
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
oldTask
.
getSystemReviewTaskId
()
!=
null
)
{
systemReviewTaskMapper
.
deleteById
(
oldTask
.
getSystemReviewTaskId
());
if
(
!
request
.
getTaskList
().
contains
(
Task
.
SUB_TASK_SRAIF
)
&&
task
.
getSystemReviewTaskId
()
!=
null
)
{
systemReviewTaskMapper
.
deleteById
(
task
.
getSystemReviewTaskId
());
task
.
setSystemReviewTaskIdNull
();
}
taskStateFacade
.
doCreate
(
task
,
request
.
getTaskList
());
}
task
.
setMaxPointer
(
request
.
getTaskList
().
size
());
taskService
.
updateById
(
task
);
// 构建并保存该任务所关联的审核组信息
List
<
TaskUserRelation
>
list
=
taskUserRelationService
.
selectQTeamMembers
(
request
.
getId
());
taskUserRelationService
.
removeBatchByIds
(
list
);
...
...
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