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
此差异已折叠。
点击以展开。
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录