Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
80195f27
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
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,发现更多精彩内容 >>
提交
80195f27
编写于
7月 21, 2020
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
v2reroute后发送待办删除消息
上级
9a1312ad
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
51 deletion
+31
-51
.gitignore
.gitignore
+1
-0
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2Reroute.java
...cessplatform/service/processing/jaxrs/work/V2Reroute.java
+30
-51
未找到文件。
.gitignore
浏览文件 @
80195f27
...
...
@@ -21,6 +21,7 @@
/o2custom/
/o2cloud/
/.svn/
*.hprof
/o2web/gulpconfig.js
/node_modules/
/o2web/ftpconfig.js
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2Reroute.java
浏览文件 @
80195f27
...
...
@@ -18,6 +18,7 @@ import com.x.base.core.project.jaxrs.WrapBoolean;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.content.Read
;
import
com.x.processplatform.core.entity.content.Task
;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.entity.content.WorkLog
;
...
...
@@ -75,15 +76,18 @@ class V2Reroute extends BaseAction {
if
(
ListTools
.
isNotEmpty
(
wi
.
getManualForceTaskIdentityList
()))
{
work
.
getProperties
().
setManualForceTaskIdentityList
(
wi
.
getManualForceTaskIdentityList
());
}
removeTask
(
business
,
work
);
if
(
BooleanUtils
.
isTrue
(
wi
.
getMergeWork
()))
{
/* 合并工作 */
work
.
setSplitting
(
false
);
work
.
setSplitToken
(
""
);
work
.
getSplitTokenList
().
clear
();
work
.
setSplitValue
(
""
);
removeAllTask
(
business
,
work
);
redirectOtherRead
(
business
,
work
);
removeOtherWork
(
business
,
work
);
removeOtherWorkLog
(
business
,
work
);
}
else
{
removeTask
(
business
,
work
);
}
emc
.
check
(
work
,
CheckPersistType
.
all
);
emc
.
commit
();
...
...
@@ -93,54 +97,6 @@ class V2Reroute extends BaseAction {
result
.
setData
(
wo
);
return
result
;
};
// Callable<ActionResult<Wo>> callable = new Callable<ActionResult<Wo>>() {
// public ActionResult<Wo> call() throws Exception {
// ActionResult<Wo> result = new ActionResult<>();
// Work work;
// try (EntityManagerContainer emc =
// EntityManagerContainerFactory.instance().create()) {
// Business business = new Business(emc);
// work = emc.find(id, Work.class);
// if (null == work) {
// throw new ExceptionEntityNotExist(id, Work.class);
// }
// Activity activity = business.element().getActivity(wi.getActivity());
// if (!StringUtils.equals(work.getProcess(), activity.getProcess())) {
// throw new ExceptionProcessNotMatch();
// }
// emc.beginTransaction(Work.class);
// emc.beginTransaction(Task.class);
// emc.beginTransaction(WorkLog.class);
// /** 重新设置表单 */
// setForm(business, work, activity);
// work.setDestinationActivity(activity.getId());
// work.setDestinationActivityType(activity.getActivityType());
// work.setDestinationRoute("");
// work.setDestinationRouteName("");
// work.getProperties().setManualForceTaskIdentityList(new ArrayList<String>());
// if (ListTools.isNotEmpty(wi.getManualForceTaskIdentityList())) {
// work.getProperties().setManualForceTaskIdentityList(wi.getManualForceTaskIdentityList());
// }
// removeTask(business, work);
// if (BooleanUtils.isTrue(wi.getMergeWork())) {
// /* 合并工作 */
// work.setSplitting(false);
// work.setSplitToken("");
// work.getSplitTokenList().clear();
// work.setSplitValue("");
// removeOtherWork(business, work);
// removeOtherWorkLog(business, work);
// }
// emc.check(work, CheckPersistType.all);
// emc.commit();
// }
// Wo wo = new Wo();
// wo.setValue(true);
// result.setData(wo);
// return result;
// }
// };
return
ProcessPlatformExecutorFactory
.
get
(
job
).
submit
(
callable
).
get
();
}
...
...
@@ -164,8 +120,7 @@ class V2Reroute extends BaseAction {
private
void
removeTask
(
Business
business
,
Work
work
)
throws
Exception
{
/* 删除可能的待办 */
List
<
Task
>
os
=
business
.
entityManagerContainer
().
listEqual
(
Task
.
class
,
Task
.
activityToken_FIELDNAME
,
work
.
getActivityToken
());
List
<
Task
>
os
=
business
.
entityManagerContainer
().
listEqual
(
Task
.
class
,
Task
.
work_FIELDNAME
,
work
.
getId
());
os
.
stream
().
forEach
(
o
->
{
try
{
business
.
entityManagerContainer
().
remove
(
o
,
CheckRemoveType
.
all
);
...
...
@@ -176,6 +131,30 @@ class V2Reroute extends BaseAction {
});
}
private
void
redirectOtherRead
(
Business
business
,
Work
work
)
throws
Exception
{
business
.
entityManagerContainer
()
.
listEqualAndNotEqual
(
Read
.
class
,
Read
.
job_FIELDNAME
,
work
.
getJob
(),
Read
.
work_FIELDNAME
,
work
.
getId
())
.
stream
().
forEach
(
o
->
{
try
{
o
.
setWork
(
work
.
getId
());
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
void
removeAllTask
(
Business
business
,
Work
work
)
throws
Exception
{
business
.
entityManagerContainer
().
listEqual
(
Task
.
class
,
Task
.
job_FIELDNAME
,
work
.
getJob
()).
stream
()
.
forEach
(
o
->
{
try
{
business
.
entityManagerContainer
().
remove
(
o
,
CheckRemoveType
.
all
);
MessageFactory
.
task_delete
(
o
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
void
removeOtherWork
(
Business
business
,
Work
work
)
throws
Exception
{
List
<
Work
>
os
=
business
.
entityManagerContainer
().
listEqualAndNotEqual
(
Work
.
class
,
Work
.
job_FIELDNAME
,
work
.
getJob
(),
JpaObject
.
id_FIELDNAME
,
work
.
getId
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录