Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
4017ad5f
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,发现更多精彩内容 >>
提交
4017ad5f
编写于
9月 28, 2020
作者:
O
o2null
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into 'develop'
Master See merge request o2oa/o2oa!1761
上级
bda34700
b8e18ae7
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
608 addition
and
62 deletion
+608
-62
o2server/x_base_core_project/src/main/java/com/x/base/core/project/Context.java
...roject/src/main/java/com/x/base/core/project/Context.java
+1
-0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/http/HttpToken.java
...src/main/java/com/x/base/core/project/http/HttpToken.java
+6
-6
o2server/x_console/src/main/java/com/x/server/console/server/web/Proxy.java
.../src/main/java/com/x/server/console/server/web/Proxy.java
+2
-2
o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/ws/collaboration/WsConfigurator.java
...assemble/communicate/ws/collaboration/WsConfigurator.java
+1
-1
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/SnapProperties.java
...x/processplatform/core/entity/content/SnapProperties.java
+14
-0
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/snap/ActionRestore.java
...platform/service/processing/jaxrs/snap/ActionRestore.java
+17
-4
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/snap/ActionTypeSnap.java
...latform/service/processing/jaxrs/snap/ActionTypeSnap.java
+25
-1
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/snap/ActionTypeSuspend.java
...form/service/processing/jaxrs/snap/ActionTypeSuspend.java
+30
-5
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/snap/BaseAction.java
...essplatform/service/processing/jaxrs/snap/BaseAction.java
+508
-40
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/ActionAppend.java
...splatform/service/processing/jaxrs/task/ActionAppend.java
+3
-3
o2server/x_program_center/src/main/java/com/x/program/center/Context.java
...am_center/src/main/java/com/x/program/center/Context.java
+1
-0
未找到文件。
o2server/x_base_core_project/src/main/java/com/x/base/core/project/Context.java
浏览文件 @
4017ad5f
...
...
@@ -134,6 +134,7 @@ public class Context extends AbstractContext {
private
AbstractQueue
<
WrapClearCacheRequest
>
clearCacheRequestQueue
;
@Override
public
AbstractQueue
<
WrapClearCacheRequest
>
clearCacheRequestQueue
()
{
return
this
.
clearCacheRequestQueue
;
}
...
...
o2server/x_base_core_project/src/main/java/com/x/base/core/project/http/HttpToken.java
浏览文件 @
4017ad5f
...
...
@@ -38,7 +38,7 @@ public class HttpToken {
private
static
final
String
RegularExpression_Token
=
"^(anonymous|user|manager|cipher)([2][0][1-2][0-9][0-1][0-9][0-3][0-9][0-5][0-9][0-5][0-9][0-5][0-9])(\\S{1,})$"
;
public
EffectivePerson
who
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
key
)
throws
Exception
{
EffectivePerson
effectivePerson
=
this
.
who
(
this
.
getToken
(
request
),
key
);
EffectivePerson
effectivePerson
=
this
.
who
(
this
.
getToken
(
request
),
key
,
remoteAddress
(
request
)
);
effectivePerson
.
setRemoteAddress
(
HttpToken
.
remoteAddress
(
request
));
effectivePerson
.
setUserAgent
(
this
.
userAgent
(
request
));
effectivePerson
.
setUri
(
request
.
getRequestURI
());
...
...
@@ -50,7 +50,7 @@ public class HttpToken {
return
effectivePerson
;
}
public
EffectivePerson
who
(
String
token
,
String
key
)
{
public
EffectivePerson
who
(
String
token
,
String
key
,
String
address
)
{
if
(
StringUtils
.
length
(
token
)
<
16
)
{
/* token应该是8的倍数有可能前台会输入null空值等可以通过这个过滤掉 */
return
EffectivePerson
.
anonymous
();
...
...
@@ -60,14 +60,14 @@ public class HttpToken {
try
{
plain
=
Crypto
.
decrypt
(
token
,
key
);
}
catch
(
Exception
e
)
{
logger
.
warn
(
"can not decrypt token:{}, {}
."
,
token
,
e
.
getMessage
()
);
logger
.
warn
(
"can not decrypt token:{}, {}
, remote address:{}."
,
token
,
e
.
getMessage
(),
address
);
return
EffectivePerson
.
anonymous
();
}
Pattern
pattern
=
Pattern
.
compile
(
RegularExpression_Token
,
Pattern
.
CASE_INSENSITIVE
);
Matcher
matcher
=
pattern
.
matcher
(
plain
);
if
(!
matcher
.
find
())
{
// 不报错,跳过错误,将用户设置为anonymous
logger
.
warn
(
"token format error:{}
."
,
plain
);
logger
.
warn
(
"token format error:{}
, remote address:{}."
,
plain
,
address
);
return
EffectivePerson
.
anonymous
();
}
Date
date
=
DateUtils
.
parseDate
(
matcher
.
group
(
2
),
DateTools
.
formatCompact_yyyyMMddHHmmss
);
...
...
@@ -77,8 +77,8 @@ public class HttpToken {
if
(
TokenType
.
user
.
equals
(
tokenType
)
||
TokenType
.
manager
.
equals
(
tokenType
))
{
if
(
diff
>
(
60000L
*
Config
.
person
().
getTokenExpiredMinutes
()))
{
// 不报错,跳过错误,将用户设置为anonymous
logger
.
warn
(
"token expired, user:{}, token:{}."
,
URLDecoder
.
decode
(
matcher
.
group
(
3
),
StandardCharsets
.
UTF_8
.
name
()),
plain
);
logger
.
warn
(
"token expired, user:{}, token:{}
, remote address:{}
."
,
URLDecoder
.
decode
(
matcher
.
group
(
3
),
StandardCharsets
.
UTF_8
.
name
()),
plain
,
address
);
return
EffectivePerson
.
anonymous
();
}
}
...
...
o2server/x_console/src/main/java/com/x/server/console/server/web/Proxy.java
浏览文件 @
4017ad5f
...
...
@@ -3,9 +3,9 @@ package com.x.server.console.server.web;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.commons.lang3.StringUtils
;
import
org.eclipse.jetty.proxy.ProxyServlet
;
import
org.eclipse.jetty.proxy.
Async
ProxyServlet
;
public
class
Proxy
extends
ProxyServlet
{
public
class
Proxy
extends
Async
ProxyServlet
{
private
static
final
long
serialVersionUID
=
2737360000716631564L
;
...
...
o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/ws/collaboration/WsConfigurator.java
浏览文件 @
4017ad5f
...
...
@@ -34,7 +34,7 @@ public class WsConfigurator extends ServerEndpointConfig.Configurator {
}
if
(
StringUtils
.
isNotEmpty
(
token
))
{
HttpToken
httpToken
=
new
HttpToken
();
return
httpToken
.
who
(
token
,
Config
.
token
().
getCipher
());
return
httpToken
.
who
(
token
,
Config
.
token
().
getCipher
()
,
""
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/SnapProperties.java
浏览文件 @
4017ad5f
...
...
@@ -46,6 +46,9 @@ public class SnapProperties extends JsonProperties {
@FieldDescribe
(
"工作日志"
)
private
List
<
WorkLog
>
workLogList
=
new
ArrayList
<>();
@FieldDescribe
(
"版式文件版本"
)
private
List
<
DocumentVersion
>
documentVersionList
=
new
ArrayList
<>();
public
Data
getData
()
{
return
data
;
}
...
...
@@ -129,6 +132,13 @@ public class SnapProperties extends JsonProperties {
return
workLogList
;
}
public
List
<
DocumentVersion
>
getDocumentVersionList
()
{
if
(
null
==
this
.
documentVersionList
)
{
this
.
documentVersionList
=
new
ArrayList
<>();
}
return
documentVersionList
;
}
public
void
setJob
(
String
job
)
{
this
.
job
=
job
;
}
...
...
@@ -169,4 +179,8 @@ public class SnapProperties extends JsonProperties {
this
.
workLogList
=
workLogList
;
}
public
void
setDocumentVersionList
(
List
<
DocumentVersion
>
documentVersionList
)
{
documentVersionList
=
documentVersionList
;
}
}
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/snap/ActionRestore.java
浏览文件 @
4017ad5f
...
...
@@ -2,6 +2,7 @@ package com.x.processplatform.service.processing.jaxrs.snap;
import
java.util.List
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.CompletableFuture
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
...
...
@@ -17,6 +18,7 @@ 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.Attachment
;
import
com.x.processplatform.core.entity.content.DocumentVersion
;
import
com.x.processplatform.core.entity.content.Read
;
import
com.x.processplatform.core.entity.content.ReadCompleted
;
import
com.x.processplatform.core.entity.content.Record
;
...
...
@@ -63,8 +65,15 @@ class ActionRestore extends BaseAction {
if
(
null
==
snap
)
{
throw
new
ExceptionEntityNotExist
(
id
,
Snap
.
class
);
}
clean
(
business
,
snap
.
getJob
());
CompletableFuture
.
allOf
(
deleteItem
(
business
,
snap
.
getJob
()),
deleteWork
(
business
,
snap
.
getJob
()),
deleteTask
(
business
,
snap
.
getJob
()),
deleteTaskCompleted
(
business
,
snap
.
getJob
()),
deleteRead
(
business
,
snap
.
getJob
()),
deleteReadCompleted
(
business
,
snap
.
getJob
()),
deleteReview
(
business
,
snap
.
getJob
()),
deleteWorkLog
(
business
,
snap
.
getJob
()),
deleteRecord
(
business
,
snap
.
getJob
()),
deleteAttachment
(
business
,
snap
.
getJob
()),
deleteDocumentVersion
(
business
,
snap
.
getJob
())).
get
();
emc
.
commit
();
restore
(
business
,
snap
);
emc
.
commit
();
emc
.
beginTransaction
(
Snap
.
class
);
emc
.
remove
(
snap
,
CheckRemoveType
.
all
);
emc
.
commit
();
...
...
@@ -107,10 +116,11 @@ class ActionRestore extends BaseAction {
emc
.
beginTransaction
(
Read
.
class
);
emc
.
beginTransaction
(
ReadCompleted
.
class
);
emc
.
beginTransaction
(
Review
.
class
);
emc
.
beginTransaction
(
Record
.
class
);
emc
.
beginTransaction
(
WorkLog
.
class
);
emc
.
beginTransaction
(
Attachment
.
class
);
emc
.
beginTransaction
(
Record
.
class
);
emc
.
beginTransaction
(
DocumentVersion
.
class
);
emc
.
beginTransaction
(
Item
.
class
);
emc
.
beginTransaction
(
Attachment
.
class
);
for
(
Task
o
:
snap
.
getProperties
().
getTaskList
())
{
emc
.
persist
(
o
,
CheckPersistType
.
all
);
}
...
...
@@ -126,10 +136,13 @@ class ActionRestore extends BaseAction {
for
(
Review
o
:
snap
.
getProperties
().
getReviewList
())
{
emc
.
persist
(
o
,
CheckPersistType
.
all
);
}
for
(
WorkLog
o
:
snap
.
getProperties
().
getWorkLogList
())
{
emc
.
persist
(
o
,
CheckPersistType
.
all
);
}
for
(
Record
o
:
snap
.
getProperties
().
getRecordList
())
{
emc
.
persist
(
o
,
CheckPersistType
.
all
);
}
for
(
WorkLog
o
:
snap
.
getProperties
().
getWorkLog
List
())
{
for
(
DocumentVersion
o
:
snap
.
getProperties
().
getDocumentVersion
List
())
{
emc
.
persist
(
o
,
CheckPersistType
.
all
);
}
for
(
Attachment
o
:
snap
.
getProperties
().
getAttachmentList
())
{
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/snap/ActionTypeSnap.java
浏览文件 @
4017ad5f
package
com.x.processplatform.service.processing.jaxrs.snap
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.Callable
;
import
com.x.base.core.container.EntityManagerContainer
;
...
...
@@ -13,9 +15,19 @@ import com.x.base.core.project.jaxrs.WoId;
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.Attachment
;
import
com.x.processplatform.core.entity.content.DocumentVersion
;
import
com.x.processplatform.core.entity.content.Read
;
import
com.x.processplatform.core.entity.content.ReadCompleted
;
import
com.x.processplatform.core.entity.content.Record
;
import
com.x.processplatform.core.entity.content.Review
;
import
com.x.processplatform.core.entity.content.Snap
;
import
com.x.processplatform.core.entity.content.Task
;
import
com.x.processplatform.core.entity.content.TaskCompleted
;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.entity.content.WorkLog
;
import
com.x.processplatform.service.processing.Business
;
import
com.x.query.core.entity.Item
;
class
ActionTypeSnap
extends
BaseAction
{
...
...
@@ -49,8 +61,20 @@ class ActionTypeSnap extends BaseAction {
if
(
null
==
work
)
{
throw
new
ExceptionEntityNotExist
(
id
,
Work
.
class
);
}
List
<
Item
>
items
=
new
ArrayList
<>();
List
<
Work
>
works
=
new
ArrayList
<>();
List
<
Task
>
tasks
=
new
ArrayList
<>();
List
<
TaskCompleted
>
taskCompleteds
=
new
ArrayList
<>();
List
<
Read
>
reads
=
new
ArrayList
<>();
List
<
ReadCompleted
>
readCompleteds
=
new
ArrayList
<>();
List
<
Review
>
reviews
=
new
ArrayList
<>();
List
<
WorkLog
>
workLogs
=
new
ArrayList
<>();
List
<
Record
>
records
=
new
ArrayList
<>();
List
<
Attachment
>
attachments
=
new
ArrayList
<>();
List
<
DocumentVersion
>
documentVersions
=
new
ArrayList
<>();
Snap
snap
=
new
Snap
(
work
);
snap
.
setProperties
(
snap
(
business
,
work
.
getId
()));
snap
.
setProperties
(
snap
(
business
,
work
.
getJob
(),
items
,
works
,
tasks
,
taskCompleteds
,
reads
,
readCompleteds
,
reviews
,
workLogs
,
records
,
attachments
,
documentVersions
));
snap
.
setType
(
Snap
.
TYPE_SNAP
);
emc
.
beginTransaction
(
Snap
.
class
);
emc
.
persist
(
snap
,
CheckPersistType
.
all
);
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/snap/ActionTypeSuspend.java
浏览文件 @
4017ad5f
package
com.x.processplatform.service.processing.jaxrs.snap
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.Callable
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.annotation.CheckPersistType
;
import
com.x.base.core.project.config.Communicate.Clean
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.executor.ProcessPlatformExecutorFactory
;
import
com.x.base.core.project.http.ActionResult
;
...
...
@@ -13,9 +16,19 @@ import com.x.base.core.project.jaxrs.WoId;
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.Attachment
;
import
com.x.processplatform.core.entity.content.DocumentVersion
;
import
com.x.processplatform.core.entity.content.Read
;
import
com.x.processplatform.core.entity.content.ReadCompleted
;
import
com.x.processplatform.core.entity.content.Record
;
import
com.x.processplatform.core.entity.content.Review
;
import
com.x.processplatform.core.entity.content.Snap
;
import
com.x.processplatform.core.entity.content.Task
;
import
com.x.processplatform.core.entity.content.TaskCompleted
;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.entity.content.WorkLog
;
import
com.x.processplatform.service.processing.Business
;
import
com.x.query.core.entity.Item
;
class
ActionTypeSuspend
extends
BaseAction
{
...
...
@@ -50,12 +63,26 @@ class ActionTypeSuspend extends BaseAction {
throw
new
ExceptionEntityNotExist
(
id
,
Work
.
class
);
}
Snap
snap
=
new
Snap
(
work
);
snap
.
setProperties
(
snap
(
business
,
work
.
getId
()));
snap
.
setType
(
Snap
.
TYPE_SUSPEND
);
List
<
Item
>
items
=
new
ArrayList
<>();
List
<
Work
>
works
=
new
ArrayList
<>();
List
<
Task
>
tasks
=
new
ArrayList
<>();
List
<
TaskCompleted
>
taskCompleteds
=
new
ArrayList
<>();
List
<
Read
>
reads
=
new
ArrayList
<>();
List
<
ReadCompleted
>
readCompleteds
=
new
ArrayList
<>();
List
<
Review
>
reviews
=
new
ArrayList
<>();
List
<
WorkLog
>
workLogs
=
new
ArrayList
<>();
List
<
Record
>
records
=
new
ArrayList
<>();
List
<
Attachment
>
attachments
=
new
ArrayList
<>();
List
<
DocumentVersion
>
documentVersions
=
new
ArrayList
<>();
snap
.
setProperties
(
snap
(
business
,
work
.
getJob
(),
items
,
works
,
tasks
,
taskCompleteds
,
reads
,
readCompleteds
,
reviews
,
workLogs
,
records
,
attachments
,
documentVersions
));
snap
.
setType
(
Snap
.
TYPE_SNAP
);
emc
.
beginTransaction
(
Snap
.
class
);
emc
.
persist
(
snap
,
CheckPersistType
.
all
);
emc
.
commit
();
clean
(
business
,
work
.
getJob
());
clean
(
business
,
items
,
works
,
tasks
,
taskCompleteds
,
reads
,
readCompleteds
,
reviews
,
workLogs
,
records
,
attachments
,
documentVersions
);
emc
.
commit
();
Wo
wo
=
new
Wo
();
wo
.
setId
(
snap
.
getId
());
result
.
setData
(
wo
);
...
...
@@ -70,6 +97,4 @@ class ActionTypeSuspend extends BaseAction {
}
}
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/snap/BaseAction.java
浏览文件 @
4017ad5f
package
com.x.processplatform.service.processing.jaxrs.snap
;
import
com.x.base.core.container.EntityManagerContainer
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ExecutionException
;
import
java.util.stream.Collectors
;
import
com.google.gson.JsonElement
;
import
com.x.base.core.entity.dataitem.DataItem
;
import
com.x.base.core.entity.dataitem.DataItemConverter
;
import
com.x.base.core.entity.dataitem.ItemCategory
;
import
com.x.base.core.project.jaxrs.StandardJaxrsAction
;
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.Attachment
;
import
com.x.processplatform.core.entity.content.Data
;
import
com.x.processplatform.core.entity.content.DocumentVersion
;
import
com.x.processplatform.core.entity.content.Read
;
import
com.x.processplatform.core.entity.content.ReadCompleted
;
import
com.x.processplatform.core.entity.content.Record
;
...
...
@@ -16,54 +28,510 @@ import com.x.processplatform.core.entity.content.TaskCompleted;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.entity.content.WorkLog
;
import
com.x.processplatform.service.processing.Business
;
import
com.x.processplatform.service.processing.WorkDataHelper
;
import
com.x.query.core.entity.Item
;
abstract
class
BaseAction
extends
StandardJaxrsAction
{
protected
SnapProperties
snap
(
Business
business
,
String
job
)
throws
Exception
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
BaseAction
.
class
);
protected
SnapProperties
snap
(
Business
business
,
String
job
,
List
<
Item
>
items
,
List
<
Work
>
works
,
List
<
Task
>
tasks
,
List
<
TaskCompleted
>
taskCompleteds
,
List
<
Read
>
reads
,
List
<
ReadCompleted
>
readCompleteds
,
List
<
Review
>
reviews
,
List
<
WorkLog
>
workLogs
,
List
<
Record
>
records
,
List
<
Attachment
>
attachments
,
List
<
DocumentVersion
>
documentVersions
)
throws
InterruptedException
,
ExecutionException
{
SnapProperties
properties
=
new
SnapProperties
();
EntityManagerContainer
emc
=
business
.
entityManagerContainer
();
properties
.
setJob
(
job
);
properties
.
setWorkList
(
emc
.
listEqual
(
Work
.
class
,
Work
.
job_FIELDNAME
,
job
));
properties
.
setTaskList
(
emc
.
listEqual
(
Task
.
class
,
Task
.
job_FIELDNAME
,
job
));
properties
.
setTaskCompletedList
(
emc
.
listEqual
(
TaskCompleted
.
class
,
TaskCompleted
.
job_FIELDNAME
,
job
));
properties
.
setReadList
(
emc
.
listEqual
(
Read
.
class
,
Read
.
job_FIELDNAME
,
job
));
properties
.
setReadCompletedList
(
emc
.
listEqual
(
ReadCompleted
.
class
,
ReadCompleted
.
job_FIELDNAME
,
job
));
properties
.
setReviewList
(
emc
.
listEqual
(
Review
.
class
,
Review
.
job_FIELDNAME
,
job
));
properties
.
setAttachmentList
(
emc
.
listEqual
(
Attachment
.
class
,
Attachment
.
job_FIELDNAME
,
job
));
properties
.
setRecordList
(
emc
.
listEqual
(
Record
.
class
,
Record
.
job_FIELDNAME
,
job
));
properties
.
setWorkLogList
(
emc
.
listEqual
(
WorkLog
.
class
,
WorkLog
.
job_FIELDNAME
,
job
));
if
(
ListTools
.
isNotEmpty
(
properties
.
getWorkList
()))
{
Work
work
=
properties
.
getWorkList
().
get
(
0
);
properties
.
setTitle
(
work
.
getTitle
());
WorkDataHelper
workDataHelper
=
new
WorkDataHelper
(
business
.
entityManagerContainer
(),
work
);
properties
.
setData
(
workDataHelper
.
get
());
CompletableFuture
.
allOf
(
mergeItem
(
business
,
job
,
properties
,
items
),
mergeWork
(
business
,
job
,
properties
,
works
),
mergeTask
(
business
,
job
,
properties
,
tasks
),
mergeTaskCompleted
(
business
,
job
,
properties
,
taskCompleteds
),
mergeRead
(
business
,
job
,
properties
,
reads
),
mergeReadCompleted
(
business
,
job
,
properties
,
readCompleteds
),
mergeReview
(
business
,
job
,
properties
,
reviews
),
mergeWorkLog
(
business
,
job
,
properties
,
workLogs
),
mergeRecord
(
business
,
job
,
properties
,
records
),
mergeAttachment
(
business
,
job
,
properties
,
attachments
),
mergeDocumentVersion
(
business
,
job
,
properties
,
documentVersions
)).
get
();
if
(
ListTools
.
isNotEmpty
(
works
))
{
properties
.
setTitle
(
works
.
get
(
0
).
getTitle
());
}
return
properties
;
}
protected
void
clean
(
Business
business
,
String
job
)
throws
Exception
{
EntityManagerContainer
emc
=
business
.
entityManagerContainer
();
emc
.
beginTransaction
(
Work
.
class
);
emc
.
beginTransaction
(
Task
.
class
);
emc
.
beginTransaction
(
TaskCompleted
.
class
);
emc
.
beginTransaction
(
Read
.
class
);
emc
.
beginTransaction
(
ReadCompleted
.
class
);
emc
.
beginTransaction
(
Review
.
class
);
emc
.
beginTransaction
(
Record
.
class
);
emc
.
beginTransaction
(
WorkLog
.
class
);
emc
.
beginTransaction
(
Item
.
class
);
emc
.
deleteEqual
(
Work
.
class
,
Work
.
job_FIELDNAME
,
job
);
emc
.
deleteEqual
(
Task
.
class
,
Task
.
job_FIELDNAME
,
job
);
emc
.
deleteEqual
(
TaskCompleted
.
class
,
TaskCompleted
.
job_FIELDNAME
,
job
);
emc
.
deleteEqual
(
Read
.
class
,
Read
.
job_FIELDNAME
,
job
);
emc
.
deleteEqual
(
ReadCompleted
.
class
,
ReadCompleted
.
job_FIELDNAME
,
job
);
emc
.
deleteEqual
(
Review
.
class
,
Review
.
job_FIELDNAME
,
job
);
emc
.
deleteEqual
(
Record
.
class
,
Record
.
job_FIELDNAME
,
job
);
emc
.
deleteEqual
(
WorkLog
.
class
,
WorkLog
.
job_FIELDNAME
,
job
);
emc
.
deleteEqualAndEqual
(
Item
.
class
,
DataItem
.
bundle_FIELDNAME
,
job
,
DataItem
.
itemCategory_FIELDNAME
,
ItemCategory
.
pp
);
emc
.
commit
();
protected
void
clean
(
Business
business
,
List
<
Item
>
items
,
List
<
Work
>
works
,
List
<
Task
>
tasks
,
List
<
TaskCompleted
>
taskCompleteds
,
List
<
Read
>
reads
,
List
<
ReadCompleted
>
readCompleteds
,
List
<
Review
>
reviews
,
List
<
WorkLog
>
workLogs
,
List
<
Record
>
records
,
List
<
Attachment
>
attachments
,
List
<
DocumentVersion
>
documentVersions
)
throws
InterruptedException
,
ExecutionException
{
CompletableFuture
.
allOf
(
deleteItem
(
business
,
items
),
deleteWork
(
business
,
works
),
deleteTask
(
business
,
tasks
),
deleteTaskCompleted
(
business
,
taskCompleteds
),
deleteRead
(
business
,
reads
),
deleteReadCompleted
(
business
,
readCompleteds
),
deleteReview
(
business
,
reviews
),
deleteWorkLog
(
business
,
workLogs
),
deleteRecord
(
business
,
records
),
deleteAttachment
(
business
,
attachments
),
deleteDocumentVersion
(
business
,
documentVersions
))
.
get
();
}
private
CompletableFuture
<
Void
>
mergeItem
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
Item
>
items
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
Item
>
os
=
business
.
entityManagerContainer
().
listEqualAndEqual
(
Item
.
class
,
DataItem
.
bundle_FIELDNAME
,
job
,
DataItem
.
itemCategory_FIELDNAME
,
ItemCategory
.
pp
);
DataItemConverter
<
Item
>
converter
=
new
DataItemConverter
<>(
Item
.
class
);
JsonElement
jsonElement
=
converter
.
assemble
(
os
);
snapProperties
.
setData
(
gson
.
fromJson
(
jsonElement
,
Data
.
class
));
items
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
mergeWork
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
Work
>
works
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
Work
>
os
=
business
.
entityManagerContainer
().
listEqual
(
Work
.
class
,
Work
.
job_FIELDNAME
,
job
)
.
stream
()
.
sorted
(
Comparator
.
comparing
(
Work:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
collect
(
Collectors
.
toList
());
snapProperties
.
setWorkList
(
os
);
works
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
mergeTask
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
Task
>
tasks
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
Task
>
os
=
business
.
entityManagerContainer
().
listEqual
(
Task
.
class
,
Task
.
job_FIELDNAME
,
job
)
.
stream
()
.
sorted
(
Comparator
.
comparing
(
Task:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
collect
(
Collectors
.
toList
());
snapProperties
.
setTaskList
(
os
);
tasks
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
mergeTaskCompleted
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
TaskCompleted
>
taskCompleteds
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
TaskCompleted
>
os
=
business
.
entityManagerContainer
()
.
listEqual
(
TaskCompleted
.
class
,
TaskCompleted
.
job_FIELDNAME
,
job
).
stream
().
sorted
(
Comparator
.
comparing
(
TaskCompleted:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
collect
(
Collectors
.
toList
());
snapProperties
.
setTaskCompletedList
(
os
);
taskCompleteds
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
mergeRead
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
Read
>
reads
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
Read
>
os
=
business
.
entityManagerContainer
().
listEqual
(
Read
.
class
,
Read
.
job_FIELDNAME
,
job
)
.
stream
()
.
sorted
(
Comparator
.
comparing
(
Read:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
collect
(
Collectors
.
toList
());
snapProperties
.
setReadList
(
os
);
reads
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
mergeReadCompleted
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
ReadCompleted
>
readCompleteds
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
ReadCompleted
>
os
=
business
.
entityManagerContainer
()
.
listEqual
(
ReadCompleted
.
class
,
ReadCompleted
.
job_FIELDNAME
,
job
).
stream
().
sorted
(
Comparator
.
comparing
(
ReadCompleted:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
collect
(
Collectors
.
toList
());
snapProperties
.
setReadCompletedList
(
os
);
readCompleteds
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
mergeReview
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
Review
>
reviews
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
Review
>
os
=
business
.
entityManagerContainer
().
listEqual
(
Review
.
class
,
Review
.
job_FIELDNAME
,
job
)
.
stream
()
.
sorted
(
Comparator
.
comparing
(
Review:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
collect
(
Collectors
.
toList
());
snapProperties
.
setReviewList
(
os
);
reviews
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
mergeWorkLog
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
WorkLog
>
workLogs
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
WorkLog
>
os
=
business
.
entityManagerContainer
()
.
listEqual
(
WorkLog
.
class
,
WorkLog
.
job_FIELDNAME
,
job
).
stream
()
.
sorted
(
Comparator
.
comparing
(
WorkLog:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
collect
(
Collectors
.
toList
());
snapProperties
.
setWorkLogList
(
os
);
workLogs
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
mergeRecord
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
Record
>
records
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
Record
>
os
=
business
.
entityManagerContainer
().
listEqual
(
Record
.
class
,
Record
.
job_FIELDNAME
,
job
)
.
stream
()
.
sorted
(
Comparator
.
comparing
(
Record:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
collect
(
Collectors
.
toList
());
snapProperties
.
setRecordList
(
os
);
records
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
mergeAttachment
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
Attachment
>
attachments
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
Attachment
>
os
=
business
.
entityManagerContainer
()
.
listEqual
(
Attachment
.
class
,
Attachment
.
job_FIELDNAME
,
job
).
stream
()
.
sorted
(
Comparator
.
comparing
(
Attachment:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
collect
(
Collectors
.
toList
());
snapProperties
.
setAttachmentList
(
os
);
attachments
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
mergeDocumentVersion
(
Business
business
,
String
job
,
SnapProperties
snapProperties
,
List
<
DocumentVersion
>
documentVersions
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
List
<
DocumentVersion
>
os
=
business
.
entityManagerContainer
()
.
listEqual
(
DocumentVersion
.
class
,
DocumentVersion
.
job_FIELDNAME
,
job
).
stream
().
sorted
(
Comparator
.
comparing
(
DocumentVersion:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)))
.
collect
(
Collectors
.
toList
());
snapProperties
.
setDocumentVersionList
(
os
);
documentVersions
.
addAll
(
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteItem
(
Business
business
,
List
<
Item
>
items
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Item
.
class
);
for
(
Item
o
:
items
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteWork
(
Business
business
,
List
<
Work
>
works
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Work
.
class
);
for
(
Work
o
:
works
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteTask
(
Business
business
,
List
<
Task
>
tasks
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Task
.
class
);
for
(
Task
o
:
tasks
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteTaskCompleted
(
Business
business
,
List
<
TaskCompleted
>
taskCompleteds
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
TaskCompleted
.
class
);
for
(
TaskCompleted
o
:
taskCompleteds
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteRead
(
Business
business
,
List
<
Read
>
reads
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Read
.
class
);
for
(
Read
o
:
reads
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteReadCompleted
(
Business
business
,
List
<
ReadCompleted
>
readCompleteds
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
ReadCompleted
.
class
);
for
(
ReadCompleted
o
:
readCompleteds
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteReview
(
Business
business
,
List
<
Review
>
reviews
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Review
.
class
);
for
(
Review
o
:
reviews
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteWorkLog
(
Business
business
,
List
<
WorkLog
>
workLogs
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
WorkLog
.
class
);
for
(
WorkLog
o
:
workLogs
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteRecord
(
Business
business
,
List
<
Record
>
records
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Record
.
class
);
for
(
Record
o
:
records
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteAttachment
(
Business
business
,
List
<
Attachment
>
attachments
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Attachment
.
class
);
for
(
Attachment
o
:
attachments
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
deleteDocumentVersion
(
Business
business
,
List
<
DocumentVersion
>
documentVersions
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
DocumentVersion
.
class
);
for
(
DocumentVersion
o
:
documentVersions
)
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteItem
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Item
.
class
);
for
(
Item
o
:
business
.
entityManagerContainer
().
listEqual
(
Item
.
class
,
DataItem
.
bundle_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteWork
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Work
.
class
);
for
(
Work
o
:
business
.
entityManagerContainer
().
listEqual
(
Work
.
class
,
Work
.
job_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteTask
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Task
.
class
);
for
(
Task
o
:
business
.
entityManagerContainer
().
listEqual
(
Task
.
class
,
Task
.
job_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteTaskCompleted
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
TaskCompleted
.
class
);
for
(
TaskCompleted
o
:
business
.
entityManagerContainer
().
listEqual
(
TaskCompleted
.
class
,
TaskCompleted
.
job_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteRead
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Read
.
class
);
for
(
Read
o
:
business
.
entityManagerContainer
().
listEqual
(
Read
.
class
,
Read
.
job_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteReadCompleted
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
ReadCompleted
.
class
);
for
(
ReadCompleted
o
:
business
.
entityManagerContainer
().
listEqual
(
ReadCompleted
.
class
,
ReadCompleted
.
job_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteReview
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Review
.
class
);
for
(
Review
o
:
business
.
entityManagerContainer
().
listEqual
(
Review
.
class
,
Review
.
job_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteWorkLog
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
WorkLog
.
class
);
for
(
WorkLog
o
:
business
.
entityManagerContainer
().
listEqual
(
WorkLog
.
class
,
WorkLog
.
job_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteRecord
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Record
.
class
);
for
(
Record
o
:
business
.
entityManagerContainer
().
listEqual
(
Record
.
class
,
Record
.
job_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteAttachment
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
Attachment
.
class
);
for
(
Attachment
o
:
business
.
entityManagerContainer
().
listEqual
(
Attachment
.
class
,
Attachment
.
job_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
protected
CompletableFuture
<
Void
>
deleteDocumentVersion
(
Business
business
,
String
job
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
business
.
entityManagerContainer
().
beginTransaction
(
DocumentVersion
.
class
);
for
(
DocumentVersion
o
:
business
.
entityManagerContainer
().
listEqual
(
DocumentVersion
.
class
,
DocumentVersion
.
job_FIELDNAME
,
job
))
{
business
.
entityManagerContainer
().
remove
(
o
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
}
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/ActionAppend.java
浏览文件 @
4017ad5f
...
...
@@ -129,9 +129,9 @@ class ActionAppend extends BaseAction {
emc
.
beginTransaction
(
Work
.
class
);
work
.
setManualTaskIdentityList
(
identities
);
// 转派后设置过期为空
emc
.
beginTransaction
(
Task
.
class
);
task
.
setExpired
(
false
);
task
.
setExpireTime
(
null
);
//
emc.beginTransaction(Task.class);
//
task.setExpired(false);
//
task.setExpireTime(null);
emc
.
commit
();
}
result
.
setData
(
wo
);
...
...
o2server/x_program_center/src/main/java/com/x/program/center/Context.java
浏览文件 @
4017ad5f
...
...
@@ -136,6 +136,7 @@ public class Context extends AbstractContext {
/* 清除缓存指定队列 */
private
AbstractQueue
<
WrapClearCacheRequest
>
clearCacheRequestQueue
;
@Override
public
AbstractQueue
<
WrapClearCacheRequest
>
clearCacheRequestQueue
()
{
return
this
.
clearCacheRequestQueue
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录