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
16de9637
Commit
16de9637
authored
Jan 12, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新待办按钮
parent
1281e636
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
41 deletions
+74
-41
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+74
-41
No files found.
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 @
16de9637
...
@@ -667,37 +667,51 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -667,37 +667,51 @@ public class CommonServiceImpl implements ICommonService {
// TaskV2Model model = result.stream().filter(e->e.getFlowCode().equals(params.get("flowCode").toString())).sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r2.getSequenceNbr())) // 按时间降序排序
// TaskV2Model model = result.stream().filter(e->e.getFlowCode().equals(params.get("flowCode").toString())).sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r2.getSequenceNbr())) // 按时间降序排序
// .findFirst()
// .findFirst()
// .orElse(null);
// .orElse(null);
TaskV2Model
model
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r1
.
getSequenceNbr
()))
// 按时间降序排序
List
<
TaskV2Model
>
collect
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r1
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
.
findFirst
()
.
orElse
(
null
);
if
(
collect
==
null
||
collect
.
size
()
==
0
)
{
if
(
model
==
null
)
{
return
null
;
return
null
;
}
}
model
.
setFlowStatus
(
Integer
.
valueOf
(
params
.
get
(
"flowStatus"
).
toString
()));
model
.
setFlowStatusLabel
(
params
.
get
(
"flowStatusLabel"
).
toString
());
collect
.
get
(
0
).
setFlowStatus
(
Integer
.
valueOf
(
params
.
get
(
"flowStatus"
).
toString
()));
model
.
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
collect
.
get
(
0
).
setFlowStatusLabel
(
params
.
get
(
"flowStatusLabel"
).
toString
());
model
.
setTaskStatusLabel
(
params
.
get
(
"taskStatusLabel"
).
toString
());
collect
.
get
(
0
).
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
model
.
setEndUserId
(
exeUserId
);
collect
.
get
(
0
).
setTaskStatusLabel
(
params
.
get
(
"taskStatusLabel"
).
toString
());
model
.
setEndDate
(
new
Date
());
collect
.
get
(
0
).
setEndUserId
(
exeUserId
);
collect
.
get
(
0
).
setEndDate
(
new
Date
());
// String[] roleIds = model.getRoutePath().split("roleIds=");
// String[] roleIds = model.getRoutePath().split("roleIds=");
// String[] userIds = roleIds[1].split("&userId");
// String[] userIds = roleIds[1].split("&userId");
// String url = roleIds[0]+"roleIds="+"55555"+"&userId"+ userIds[1];
// String url = roleIds[0]+"roleIds="+"55555"+"&userId"+ userIds[1];
// String tarUrl = url.replaceFirst("&executeUserIds=", "");
// String tarUrl = url.replaceFirst("&executeUserIds=", "");
// tarUrl+"&executeUserIds="
// tarUrl+"&executeUserIds="
// model.setRoutePath( roleIds[0]+"roleIds="+"55555"+"&userId"+userIds[1]);
// model.setRoutePath( roleIds[0]+"roleIds="+"55555"+"&userId"+userIds[1]);
model
.
setRoutePath
(
model
.
getRoutePath
().
replace
(
"roleIds="
,
"roleIds=55555&fq="
));
collect
.
get
(
0
).
setRoutePath
(
collect
.
get
(
0
).
getRoutePath
().
replace
(
"roleIds="
,
"roleIds=55555&fq="
));
Systemctl
.
taskV2Client
.
update
(
model
,
model
.
getSequenceNbr
());
//当流程完成时将所有待办状态统一修改为已完成
if
(
collect
.
get
(
0
).
getFlowStatusLabel
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())){
for
(
TaskV2Model
taskV2Model
:
result
)
{
taskV2Model
.
setTaskStatusLabel
((
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()));
taskV2Model
.
setTaskStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
taskV2Model
.
setFlowStatusLabel
((
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()));
taskV2Model
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
}
Systemctl
.
taskV2Client
.
batchUpdate
(
collect
);
}
else
{
Systemctl
.
taskV2Client
.
update
(
collect
.
get
(
0
),
collect
.
get
(
0
).
getSequenceNbr
());
}
//修改model并返回 用于组装新待办
//修改model并返回 用于组装新待办
model
.
setEndUserId
(
null
);
collect
.
get
(
0
)
.
setEndUserId
(
null
);
model
.
setTaskStatus
(
null
);
collect
.
get
(
0
)
.
setTaskStatus
(
null
);
model
.
setEndDate
(
null
);
collect
.
get
(
0
)
.
setEndDate
(
null
);
model
.
setSequenceNbr
(
null
);
collect
.
get
(
0
)
.
setSequenceNbr
(
null
);
model
.
setCreateDate
(
new
Date
());
collect
.
get
(
0
)
.
setCreateDate
(
new
Date
());
model
.
setStartDate
(
new
Date
());
collect
.
get
(
0
)
.
setStartDate
(
new
Date
());
return
model
;
return
collect
.
get
(
0
)
;
}
}
/**
/**
...
@@ -717,33 +731,52 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -717,33 +731,52 @@ public class CommonServiceImpl implements ICommonService {
// TaskV2Model model = result.stream().filter(e->e.getFlowCode().equals(params.get("flowCode").toString())).sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r2.getSequenceNbr())) // 按时间降序排序
// TaskV2Model model = result.stream().filter(e->e.getFlowCode().equals(params.get("flowCode").toString())).sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r2.getSequenceNbr())) // 按时间降序排序
// .findFirst()
// .findFirst()
// .orElse(null);
// .orElse(null);
TaskV2Model
model
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r1
.
getSequenceNbr
()))
// 按时间降序排序
List
<
TaskV2Model
>
collect
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r1
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
.
findFirst
()
.
orElse
(
null
);
if
(
null
==
collect
||
collect
.
size
()
==
0
)
{
if
(
model
!=
null
)
{
TaskV2Model
model
=
new
TaskV2Model
();
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
);
model
.
setEndDate
(
new
Date
());
model
.
setRoutePath
(
model
.
getRoutePath
().
replace
(
"roleIds="
,
"roleIds=55555&fq="
));
Systemctl
.
taskV2Client
.
update
(
model
,
model
.
getSequenceNbr
());
}
else
{
model
=
new
TaskV2Model
();
model
.
setFlowStatus
(
Integer
.
valueOf
(
params
.
get
(
"flowStatus"
).
toString
()));
model
.
setFlowStatus
(
Integer
.
valueOf
(
params
.
get
(
"flowStatus"
).
toString
()));
model
.
setFlowStatusLabel
(
params
.
get
(
"flowStatusLabel"
).
toString
());
model
.
setFlowStatusLabel
(
params
.
get
(
"flowStatusLabel"
).
toString
());
model
.
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
model
.
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
model
.
setTaskStatusLabel
(
params
.
get
(
"taskStatusLabel"
).
toString
());
model
.
setTaskStatusLabel
(
params
.
get
(
"taskStatusLabel"
).
toString
());
return
model
;
}
}
collect
.
get
(
0
).
setFlowStatus
(
Integer
.
valueOf
(
params
.
get
(
"flowStatus"
).
toString
()));
collect
.
get
(
0
).
setFlowStatusLabel
(
params
.
get
(
"flowStatusLabel"
).
toString
());
collect
.
get
(
0
).
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
collect
.
get
(
0
).
setTaskStatusLabel
(
params
.
get
(
"taskStatusLabel"
).
toString
());
collect
.
get
(
0
).
setEndUserId
(
exeUserId
);
collect
.
get
(
0
).
setEndDate
(
new
Date
());
// String[] roleIds = model.getRoutePath().split("roleIds=");
// String[] userIds = roleIds[1].split("&userId");
// String url = roleIds[0]+"roleIds="+"55555"+"&userId"+ userIds[1];
// String tarUrl = url.replaceFirst("&executeUserIds=", "");
// tarUrl+"&executeUserIds="
// model.setRoutePath( roleIds[0]+"roleIds="+"55555"+"&userId"+userIds[1]);
collect
.
get
(
0
).
setRoutePath
(
collect
.
get
(
0
).
getRoutePath
().
replace
(
"roleIds="
,
"roleIds=55555&fq="
));
//当流程完成时将所有待办状态统一修改为已完成
if
(
collect
.
get
(
0
).
getFlowStatusLabel
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())){
for
(
TaskV2Model
taskV2Model
:
result
)
{
taskV2Model
.
setTaskStatusLabel
((
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()));
taskV2Model
.
setTaskStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
taskV2Model
.
setFlowStatusLabel
((
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()));
taskV2Model
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
}
Systemctl
.
taskV2Client
.
batchUpdate
(
collect
);
}
else
{
Systemctl
.
taskV2Client
.
update
(
collect
.
get
(
0
),
collect
.
get
(
0
).
getSequenceNbr
());
//修改model并返回 用于组装新待办
//修改model并返回 用于组装新待办
model
.
setEndUserId
(
null
);
}
model
.
setTaskStatus
(
null
);
collect
.
get
(
0
).
setEndUserId
(
null
);
model
.
setEndDate
(
null
);
collect
.
get
(
0
).
setTaskStatus
(
null
);
model
.
setSequenceNbr
(
null
);
collect
.
get
(
0
).
setEndDate
(
null
);
model
.
setCreateDate
(
new
Date
());
collect
.
get
(
0
).
setSequenceNbr
(
null
);
model
.
setStartDate
(
new
Date
());
collect
.
get
(
0
).
setCreateDate
(
new
Date
());
return
model
;
collect
.
get
(
0
).
setStartDate
(
new
Date
());
return
collect
.
get
(
0
);
}
}
...
...
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