Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
76dc8b11
o2oa
项目概览
weixin_42566577
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
76dc8b11
编写于
3月 25, 2022
作者:
R
Ray
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修正回滚没有正确计算表单
上级
8869382c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
21 deletion
+29
-21
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2Reroute.java
...cessplatform/service/processing/jaxrs/work/V2Reroute.java
+8
-14
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2Rollback.java
...essplatform/service/processing/jaxrs/work/V2Rollback.java
+21
-7
未找到文件。
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2Reroute.java
浏览文件 @
76dc8b11
...
...
@@ -69,19 +69,19 @@ class V2Reroute extends BaseAction {
emc
.
beginTransaction
(
Read
.
class
);
emc
.
beginTransaction
(
WorkLog
.
class
);
// 重新设置表单
setForm
(
business
,
work
,
activity
);
work
.
setForm
(
business
.
element
().
lookupSuitableForm
(
work
.
getProcess
(),
activity
.
getId
())
);
// 调度强制把这个标志设置为true,这样可以避免在拟稿状态就调度,系统认为是拟稿状态,默认不创建待办.
work
.
setWorkThroughManual
(
true
);
work
.
setDestinationActivity
(
activity
.
getId
());
work
.
setDestinationActivityType
(
activity
.
getActivityType
());
work
.
setDestinationRoute
(
""
);
work
.
setDestinationRouteName
(
""
);
work
.
getProperties
().
setManualForceTaskIdentityList
(
new
ArrayList
<
String
>());
work
.
getProperties
().
setManualForceTaskIdentityList
(
new
ArrayList
<>());
if
(
ListTools
.
isNotEmpty
(
wi
.
getManualForceTaskIdentityList
()))
{
work
.
getProperties
().
setManualForceTaskIdentityList
(
wi
.
getManualForceTaskIdentityList
());
}
if
(
BooleanUtils
.
isTrue
(
wi
.
getMergeWork
()))
{
/
* 合并工作 */
/
/ 合并工作
work
.
setSplitting
(
false
);
work
.
setSplitToken
(
""
);
work
.
getSplitTokenList
().
clear
();
...
...
@@ -105,25 +105,19 @@ class V2Reroute extends BaseAction {
}
private
void
setForm
(
Business
business
,
Work
work
,
Activity
activity
)
throws
Exception
{
if
(
StringUtils
.
isNotEmpty
(
activity
.
getForm
()))
{
// 表单需要重新判断,如果是从模板或者复制过来的流程可能发生表单不存在的情况.
Form
form
=
business
.
entityManagerContainer
().
find
(
activity
.
getForm
(),
Form
.
class
);
if
(
null
!=
form
)
{
work
.
setForm
(
form
.
getId
());
}
}
}
public
static
class
Wi
extends
V2RerouteWi
{
private
static
final
long
serialVersionUID
=
4131889338839380226L
;
}
public
static
class
Wo
extends
WrapBoolean
{
private
static
final
long
serialVersionUID
=
6797942626499506636L
;
}
private
void
removeTask
(
Business
business
,
Work
work
)
throws
Exception
{
/
* 删除可能的待办 */
/
/ 删除可能的待办
List
<
Task
>
os
=
business
.
entityManagerContainer
().
listEqual
(
Task
.
class
,
Task
.
work_FIELDNAME
,
work
.
getId
());
os
.
stream
().
forEach
(
o
->
{
try
{
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2Rollback.java
浏览文件 @
76dc8b11
...
...
@@ -12,6 +12,7 @@ import org.apache.commons.lang3.StringUtils;
import
com.google.gson.JsonElement
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.entity.annotation.CheckRemoveType
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.executor.ProcessPlatformExecutorFactory
;
...
...
@@ -113,7 +114,8 @@ class V2Rollback extends BaseAction {
for
(
TaskCompleted
o
:
taskCompleteds
)
{
if
(
BooleanUtils
.
isTrue
(
o
.
getJoinInquire
()))
{
o
.
setProcessingType
(
TaskCompleted
.
PROCESSINGTYPE_ROLLBACK
);
// o.setProcessingType(TaskCompleted.PROCESSINGTYPE_ROLLBACK);
emc
.
remove
(
o
,
CheckRemoveType
.
all
);
}
manualTaskIdentityList
.
add
(
o
.
getIdentity
());
}
...
...
@@ -161,6 +163,14 @@ class V2Rollback extends BaseAction {
work
.
setSplitValue
(
workLog
.
getSplitValue
());
work
.
setForm
(
business
.
element
().
lookupSuitableForm
(
work
.
getProcess
(),
work
.
getActivity
()));
workLog
.
setConnected
(
false
);
workLog
.
setArrivedActivity
(
""
);
workLog
.
setArrivedActivityAlias
(
""
);
workLog
.
setArrivedActivityName
(
""
);
workLog
.
setArrivedActivityToken
(
""
);
workLog
.
setArrivedActivityType
(
null
);
workLog
.
setArrivedGroup
(
null
);
workLog
.
setArrivedOpinionGroup
(
null
);
workLog
.
setArrivedTime
(
null
);
}
private
WorkLog
getTargetWorkLog
(
List
<
WorkLog
>
list
,
String
id
)
throws
ExceptionEntityNotExist
{
...
...
@@ -171,7 +181,7 @@ class V2Rollback extends BaseAction {
return
workLog
;
}
private
List
<
String
>
activityTokenOfNodes
(
Nodes
nodes
)
throws
Exception
{
private
List
<
String
>
activityTokenOfNodes
(
Nodes
nodes
)
{
List
<
String
>
list
=
new
ArrayList
<>();
for
(
Node
o
:
nodes
)
{
list
.
add
(
o
.
getWorkLog
().
getFromActivityToken
());
...
...
@@ -179,12 +189,12 @@ class V2Rollback extends BaseAction {
return
ListTools
.
trim
(
list
,
true
,
true
);
}
private
List
<
String
>
workOfNodes
(
Nodes
nodes
)
throws
Exception
{
List
<
String
>
list
=
new
ArrayList
<>();
private
List
<
String
>
workOfNodes
(
Nodes
nodes
)
{
List
<
String
>
os
=
new
ArrayList
<>();
for
(
Node
o
:
nodes
)
{
list
.
add
(
o
.
getWorkLog
().
getWork
());
os
.
add
(
o
.
getWorkLog
().
getWork
());
}
return
ListTools
.
trim
(
list
,
true
,
true
);
return
ListTools
.
trim
(
os
,
true
,
true
);
}
private
void
deleteTasks
(
Business
business
,
String
job
,
List
<
String
>
activityTokens
)
throws
Exception
{
...
...
@@ -237,7 +247,7 @@ class V2Rollback extends BaseAction {
private
void
deleteWorks
(
Business
business
,
String
job
,
List
<
String
>
workIds
)
throws
Exception
{
List
<
Work
>
os
=
business
.
entityManagerContainer
().
listEqualAndIn
(
Work
.
class
,
Work
.
job_FIELDNAME
,
job
,
Work
.
id_FIELDNAME
,
workIds
);
JpaObject
.
id_FIELDNAME
,
workIds
);
for
(
Work
o
:
os
)
{
business
.
entityManagerContainer
().
remove
(
o
,
CheckRemoveType
.
all
);
}
...
...
@@ -245,8 +255,12 @@ class V2Rollback extends BaseAction {
public
static
class
Wi
extends
V2RollbackWi
{
private
static
final
long
serialVersionUID
=
1549664177644024435L
;
}
public
static
class
Wo
extends
WrapBoolean
{
private
static
final
long
serialVersionUID
=
7732547960719161607L
;
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录