Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
e0a84038
Commit
e0a84038
authored
Jan 11, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改待办逻辑
parent
6790f81b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
TaskModelDto.java
...com/yeejoin/amos/boot/module/jg/api/dto/TaskModelDto.java
+14
-3
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+13
-5
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/TaskModelDto.java
View file @
e0a84038
...
...
@@ -22,7 +22,18 @@ public class TaskModelDto {
* 任务编号 可以使用申请单编号
*/
private
String
taskCode
;
/**
* 流程任务ID
* */
private
String
flowCode
;
/**
* 统一定义的枚举code 例如 6612 待受理
* */
private
Integer
flowStatus
;
/**
* 统一定义的枚举code 例如 6612 待受理
* */
private
String
flowStatusLabel
;
/**
* 摘要-来源
*/
...
...
@@ -49,11 +60,11 @@ public class TaskModelDto {
**/
private
String
executeUserIds
;
/**
* 任务状态
统一定义的枚举code 例如 6612 待受理
* 任务状态
操作名称 0 待处理 1驳回 2通过 3重新提交
*/
private
Integer
taskStatus
;
/**
* 任务状态
统一定义的枚举code 例如 6612 待受理
* 任务状态
操作名称 0 待处理 1驳回 2通过 3重新提交
*/
private
String
taskStatusLabel
;
/**
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
e0a84038
...
...
@@ -649,20 +649,27 @@ public class CommonServiceImpl implements ICommonService {
/**
* 待办编辑接口
* 参数
* taskStatus 任务状态枚举code
* taskStatusLabel 任务状态枚举name
* taskStatus
* taskStatusLabel 操作名称 1驳回 2通过 3重新提交
* flowStatusLabel 任务状态枚举code
* 流程实例id instanceId
* flowCode 任务id
**/
public
TaskV2Model
updateTaskModel
(
Map
<
String
,
Object
>
params
)
{
String
exeUserId
=
RequestContext
.
getExeUserId
();
List
<
TaskV2Model
>
result
=
Systemctl
.
taskV2Client
.
selectListByRelationId
(
params
.
get
(
"relationId"
).
toString
()).
getResult
();
// TaskV2Model model = result.stream().filter(e->e.getFlowCode().equals(params.get("flowCode").toString())).sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r2.getSequenceNbr())) // 按时间降序排序
// .findFirst()
// .orElse(null);
TaskV2Model
model
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r2
.
getSequenceNbr
()))
// 按时间降序排序
.
findFirst
()
.
orElse
(
null
);
if
(
model
==
null
)
{
return
null
;
}
model
.
setFlowStatus
(
1
);
model
.
setFlowStatus
(
Integer
.
valueOf
(
params
.
get
(
"flowStatus"
).
toString
()));
model
.
setFlowStatusLabel
(
params
.
get
(
"flowStatusLabel"
).
toString
());
model
.
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
model
.
setTaskStatusLabel
(
params
.
get
(
"taskStatusLabel"
).
toString
());
model
.
setEndUserId
(
exeUserId
);
...
...
@@ -692,8 +699,9 @@ public class CommonServiceImpl implements ICommonService {
TaskV2Model
lastTaskModel
=
list
.
get
(
1
);
lastTaskModel
.
setEndUserId
(
null
);
lastTaskModel
.
setEndDate
(
null
);
lastTaskModel
.
setFlowStatus
(
0
);
lastTaskModel
.
setRoutePath
(
model
.
getRoutePath
().
replace
(
"role"
,
"roleIds"
).
replace
(
"look"
,
"edit"
));
lastTaskModel
.
setTaskStatus
(
0
);
lastTaskModel
.
setTaskStatusLabel
(
"待处理"
);
lastTaskModel
.
setRoutePath
(
model
.
getRoutePath
().
replace
(
"role"
,
"roleIds"
).
replace
(
"edit"
,
"look"
));
Systemctl
.
taskV2Client
.
update
(
lastTaskModel
,
lastTaskModel
.
getSequenceNbr
());
}
}
...
...
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