Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
e38335c6
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,发现更多精彩内容 >>
提交
e38335c6
编写于
10月 27, 2020
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加work/V2GetWorkOrWorkCompleted
上级
d045c084
变更
32
隐藏空白更改
内联
并排
Showing
32 changed file
with
321 addition
and
273 deletion
+321
-273
o2server/configSample/centerServer.json
o2server/configSample/centerServer.json
+3
-1
o2server/configSample/node_127.0.0.1.json
o2server/configSample/node_127.0.0.1.json
+9
-3
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ApplicationServer.java
...ava/com/x/base/core/project/config/ApplicationServer.java
+10
-0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/CenterServer.java
...ain/java/com/x/base/core/project/config/CenterServer.java
+10
-0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/WebServer.java
...c/main/java/com/x/base/core/project/config/WebServer.java
+10
-0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/ResponseFactory.java
...n/java/com/x/base/core/project/jaxrs/ResponseFactory.java
+1
-0
o2server/x_console/src/main/java/com/x/server/console/action/HttpStatus.java
...src/main/java/com/x/server/console/action/HttpStatus.java
+30
-9
o2server/x_console/src/main/java/com/x/server/console/server/JettySeverTools.java
...ain/java/com/x/server/console/server/JettySeverTools.java
+9
-7
o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java
...er/console/server/application/ApplicationServerTools.java
+5
-7
o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java
...com/x/server/console/server/center/CenterServerTools.java
+2
-2
o2server/x_console/src/main/java/com/x/server/console/server/web/WebServerTools.java
.../java/com/x/server/console/server/web/WebServerTools.java
+2
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionListWithWorkOrWorkCompleted.java
...e/jaxrs/attachment/ActionListWithWorkOrWorkCompleted.java
+0
-1
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java
...e/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java
+0
-20
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/ActionGetWithWorkOrWorkCompleted.java
.../surface/jaxrs/form/ActionGetWithWorkOrWorkCompleted.java
+0
-1
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/FormAction.java
...ocessplatform/assemble/surface/jaxrs/form/FormAction.java
+0
-19
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2LookupWorkOrWorkCompletedMobile.java
...surface/jaxrs/form/V2LookupWorkOrWorkCompletedMobile.java
+0
-133
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompleted.java
...rface/jaxrs/record/ActionListWithWorkOrWorkCompleted.java
+0
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionGetWithWorkOrWorkCompleted.java
.../surface/jaxrs/work/ActionGetWithWorkOrWorkCompleted.java
+0
-1
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2GetWorkOrWorkCompleted.java
...assemble/surface/jaxrs/work/V2GetWorkOrWorkCompleted.java
+111
-24
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListWithWorkOrWorkCompleted.java
...face/jaxrs/worklog/ActionListWithWorkOrWorkCompleted.java
+0
-2
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Activity.java
...a/com/x/processplatform/core/entity/element/Activity.java
+2
-0
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Agent.java
...java/com/x/processplatform/core/entity/element/Agent.java
+11
-6
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Begin.java
...java/com/x/processplatform/core/entity/element/Begin.java
+11
-4
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Cancel.java
...ava/com/x/processplatform/core/entity/element/Cancel.java
+7
-4
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Delay.java
...java/com/x/processplatform/core/entity/element/Delay.java
+12
-5
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Embed.java
...java/com/x/processplatform/core/entity/element/Embed.java
+12
-5
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/End.java
...n/java/com/x/processplatform/core/entity/element/End.java
+7
-4
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Invoke.java
...ava/com/x/processplatform/core/entity/element/Invoke.java
+11
-1
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Merge.java
...java/com/x/processplatform/core/entity/element/Merge.java
+11
-4
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Message.java
...va/com/x/processplatform/core/entity/element/Message.java
+13
-1
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Service.java
...va/com/x/processplatform/core/entity/element/Service.java
+11
-4
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Split.java
...java/com/x/processplatform/core/entity/element/Split.java
+11
-1
未找到文件。
o2server/configSample/centerServer.json
浏览文件 @
e38335c6
...
...
@@ -13,6 +13,7 @@
"statExclusions"
:
"*.js,*.gif,*.jpg,*.png,*.css,*.ico"
,
"maxFormContent"
:
20.0
,
"exposeJest"
:
true
,
"persistentConnectionsEnable"
:
false
,
"###enable"
:
"是否启用###"
,
"###order"
:
"center节点顺序,顺序排列0,1,2...###"
,
"###sslEnable"
:
"是否启用ssl传输加密,如果启用将使用config/keystore文件作为密钥文件.使用config/token.json文件中的sslKeyStorePassword字段为密钥密码,sslKeyManagerPassword为管理密码.###"
,
...
...
@@ -27,5 +28,6 @@
"###statEnable"
:
"启用统计,默认启用统计.###"
,
"###statExclusions"
:
"统计忽略路径,默认忽略*.js,*.gif,*.jpg,*.png,*.css,*.ico###"
,
"###maxFormContent"
:
"最大提交数据限制(M),限制有所上传的内容大小,包括附件.###"
,
"###exposeJest"
:
"暴露jest接口.###"
"###exposeJest"
:
"暴露jest接口.###"
,
"###persistentConnectionsEnable"
:
"是否启用长连接,默认false.###"
}
\ No newline at end of file
o2server/configSample/node_127.0.0.1.json
浏览文件 @
e38335c6
...
...
@@ -16,6 +16,7 @@
"statExclusions"
:
"*.js,*.gif,*.jpg,*.png,*.css,*.ico"
,
"maxFormContent"
:
20.0
,
"exposeJest"
:
true
,
"persistentConnectionsEnable"
:
false
,
"###enable"
:
"是否启用###"
,
"###order"
:
"center节点顺序,顺序排列0,1,2...###"
,
"###sslEnable"
:
"是否启用ssl传输加密,如果启用将使用config/keystore文件作为密钥文件.使用config/token.json文件中的sslKeyStorePassword字段为密钥密码,sslKeyManagerPassword为管理密码.###"
,
...
...
@@ -30,7 +31,8 @@
"###statEnable"
:
"启用统计,默认启用统计.###"
,
"###statExclusions"
:
"统计忽略路径,默认忽略*.js,*.gif,*.jpg,*.png,*.css,*.ico###"
,
"###maxFormContent"
:
"最大提交数据限制(M),限制有所上传的内容大小,包括附件.###"
,
"###exposeJest"
:
"暴露jest接口.###"
"###exposeJest"
:
"暴露jest接口.###"
,
"###persistentConnectionsEnable"
:
"是否启用长连接,默认false.###"
},
"application"
:
{
"enable"
:
true
,
...
...
@@ -48,6 +50,7 @@
"statExclusions"
:
"*.js,*.gif,*.jpg,*.png,*.css,*.ico"
,
"maxFormContent"
:
20.0
,
"exposeJest"
:
true
,
"persistentConnectionsEnable"
:
false
,
"###enable"
:
"是否启用###"
,
"###port"
:
"http/https端口,负责向前端提供数据访问接口.默认为20020端口.###"
,
"###sslEnable"
:
"是否启用ssl传输加密,如果启用将使用config/keystore文件作为密钥文件.使用config/token.json文件中的sslKeyStorePassword字段为密钥密码,sslKeyManagerPassword为管理密码.###"
,
...
...
@@ -62,7 +65,8 @@
"###statEnable"
:
"启用统计,默认启用统计.###"
,
"###statExclusions"
:
"统计忽略路径,默认忽略*.js,*.gif,*.jpg,*.png,*.css,*.ico###"
,
"###maxFormContent"
:
"最大提交数据限制(M),限制有所上传的内容大小,包括附件.###"
,
"###exposeJest"
:
"暴露jest接口.###"
"###exposeJest"
:
"暴露jest接口.###"
,
"###persistentConnectionsEnable"
:
"是否启用长连接,默认false.###"
},
"web"
:
{
"enable"
:
true
,
...
...
@@ -73,6 +77,7 @@
"statEnable"
:
false
,
"statExclusions"
:
"*.gif,*.jpg,*.png,*.ico"
,
"cacheControlMaxAge"
:
0.0
,
"persistentConnectionsEnable"
:
true
,
"###enable"
:
"是否启用###"
,
"###port"
:
"http/https端口,用户输入网址后实际访问的第一个端口.http协议默认为80端口,https默认为443端口.###"
,
"###sslEnable"
:
"是否启用ssl传输加密,如果启用将使用config/keystore文件作为密钥文件.使用config/token.json文件中的sslKeyStorePassword字段为密钥密码,sslKeyManagerPassword为管理密码.###"
,
...
...
@@ -84,7 +89,8 @@
"###statExclusions"
:
"统计忽略路径,默认忽略*.gif,*.jpg,*.png,*.ico###"
,
"###cacheControlMaxAge"
:
"服务器max-age缓存时间(秒)###"
,
"###proxyCenterEnable"
:
"是否启用center服务器代理.###"
,
"###proxyApplicationEnable"
:
"是否启用application服务器代理###"
"###proxyApplicationEnable"
:
"是否启用application服务器代理###"
,
"###persistentConnectionsEnable"
:
"是否启用长连接,默认false.###"
},
"data"
:
{
"enable"
:
true
,
...
...
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ApplicationServer.java
浏览文件 @
e38335c6
...
...
@@ -21,6 +21,7 @@ public class ApplicationServer extends ConfigObject {
private
static
final
String
DEFAULT_STATEXCLUSIONS
=
"*.js,*.gif,*.jpg,*.png,*.css,*.ico"
;
private
static
final
Integer
DEFAULT_MAXFORMCONTENT
=
20
;
private
static
final
Boolean
DEFAULT_EXPOSEJEST
=
true
;
private
static
final
Boolean
DEFAULT_PERSISTENTCONNECTIONSENABLE
=
false
;
public
ApplicationServer
()
{
this
.
enable
=
true
;
...
...
@@ -38,6 +39,7 @@ public class ApplicationServer extends ConfigObject {
this
.
statExclusions
=
DEFAULT_STATEXCLUSIONS
;
this
.
maxFormContent
=
DEFAULT_MAXFORMCONTENT
;
this
.
exposeJest
=
DEFAULT_EXPOSEJEST
;
this
.
persistentConnectionsEnable
=
DEFAULT_PERSISTENTCONNECTIONSENABLE
;
}
@FieldDescribe
(
"是否启用"
)
...
...
@@ -71,6 +73,14 @@ public class ApplicationServer extends ConfigObject {
@FieldDescribe
(
"暴露jest接口."
)
private
Boolean
exposeJest
;
@FieldDescribe
(
"是否启用长连接,默认false."
)
private
Boolean
persistentConnectionsEnable
;
public
Boolean
getPersistentConnectionsEnable
()
{
return
persistentConnectionsEnable
==
null
?
DEFAULT_PERSISTENTCONNECTIONSENABLE
:
this
.
persistentConnectionsEnable
;
}
public
Boolean
getExposeJest
()
{
return
BooleanUtils
.
isNotFalse
(
this
.
exposeJest
);
}
...
...
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/CenterServer.java
浏览文件 @
e38335c6
...
...
@@ -22,6 +22,7 @@ public class CenterServer extends ConfigObject {
private
static
final
String
DEFAULT_STATEXCLUSIONS
=
"*.js,*.gif,*.jpg,*.png,*.css,*.ico"
;
private
static
final
Integer
DEFAULT_MAXFORMCONTENT
=
20
;
private
static
final
Boolean
DEFAULT_EXPOSEJEST
=
true
;
private
static
final
Boolean
DEFAULT_PERSISTENTCONNECTIONSENABLE
=
false
;
public
static
CenterServer
defaultInstance
()
{
return
new
CenterServer
();
...
...
@@ -42,6 +43,7 @@ public class CenterServer extends ConfigObject {
this
.
statExclusions
=
DEFAULT_STATEXCLUSIONS
;
this
.
maxFormContent
=
DEFAULT_MAXFORMCONTENT
;
this
.
exposeJest
=
DEFAULT_EXPOSEJEST
;
this
.
persistentConnectionsEnable
=
DEFAULT_PERSISTENTCONNECTIONSENABLE
;
}
@FieldDescribe
(
"是否启用"
)
...
...
@@ -75,6 +77,14 @@ public class CenterServer extends ConfigObject {
@FieldDescribe
(
"暴露jest接口."
)
private
Boolean
exposeJest
;
@FieldDescribe
(
"是否启用长连接,默认false."
)
private
Boolean
persistentConnectionsEnable
;
public
Boolean
getPersistentConnectionsEnable
()
{
return
persistentConnectionsEnable
==
null
?
DEFAULT_PERSISTENTCONNECTIONSENABLE
:
this
.
persistentConnectionsEnable
;
}
public
Boolean
getExposeJest
()
{
return
BooleanUtils
.
isNotFalse
(
this
.
exposeJest
);
}
...
...
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/WebServer.java
浏览文件 @
e38335c6
...
...
@@ -22,6 +22,7 @@ public class WebServer extends ConfigObject {
this
.
statEnable
=
DEFAULT_STATENABLE
;
this
.
statExclusions
=
DEFAULT_STATEXCLUSIONS
;
this
.
cacheControlMaxAge
=
DEFAULT_CACHECONTROLMAXAGE
;
this
.
persistentConnectionsEnable
=
DEFAULT_PERSISTENTCONNECTIONSENABLE
;
}
private
static
final
Integer
DEFAULT_HTTP_PORT
=
80
;
...
...
@@ -33,6 +34,7 @@ public class WebServer extends ConfigObject {
private
static
final
Integer
DEFAULT_CACHECONTROLMAXAGE
=
0
;
private
static
final
Boolean
DEFAULT_PROXYCENTERENABLE
=
true
;
private
static
final
Boolean
DEFAULT_PROXYAPPLICATIONENABLE
=
true
;
private
static
final
Boolean
DEFAULT_PERSISTENTCONNECTIONSENABLE
=
false
;
@FieldDescribe
(
"是否启用"
)
private
Boolean
enable
;
...
...
@@ -61,6 +63,14 @@ public class WebServer extends ConfigObject {
@FieldDescribe
(
"是否启用application服务器代理"
)
private
Boolean
proxyApplicationEnable
;
@FieldDescribe
(
"是否启用长连接,默认false."
)
private
Boolean
persistentConnectionsEnable
;
public
Boolean
getPersistentConnectionsEnable
()
{
return
persistentConnectionsEnable
==
null
?
DEFAULT_PERSISTENTCONNECTIONSENABLE
:
this
.
persistentConnectionsEnable
;
}
public
Boolean
getProxyCenterEnable
()
{
return
proxyCenterEnable
==
null
?
DEFAULT_PROXYCENTERENABLE
:
this
.
proxyCenterEnable
;
}
...
...
o2server/x_base_core_project/src/main/java/com/x/base/core/project/jaxrs/ResponseFactory.java
浏览文件 @
e38335c6
...
...
@@ -182,6 +182,7 @@ public class ResponseFactory {
}
else
{
crc
.
update
(
XGsonBuilder
.
toJson
(
o
).
getBytes
(
DefaultCharset
.
charset_utf_8
));
}
// crc.update(XGsonBuilder.toJson(o).getBytes(DefaultCharset.charset_utf_8));
return
crc
.
getValue
()
+
""
;
}
...
...
o2server/x_console/src/main/java/com/x/server/console/action/HttpStatus.java
浏览文件 @
e38335c6
package
com.x.server.console.action
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.OutputStreamWriter
;
import
java.lang.management.ManagementFactory
;
import
java.lang.management.ThreadMXBean
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
com.x.server.console.server.Servers
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.tools.DateTools
;
import
com.x.server.console.server.Servers
;
/**
* @author
*/
...
...
@@ -31,24 +37,39 @@ public class HttpStatus extends Thread {
bean
.
getTotalStartedThreadCount
(),
bean
.
getThreadCount
(),
bean
.
getPeakThreadCount
(),
bean
.
getDaemonThreadCount
(),
deadLockedCount
));
if
(
BooleanUtils
.
isTrue
(
Servers
.
centerServerIsRunning
()))
{
list
.
add
(
String
.
format
(
" +++ center server thread pool size:%d, idle:%d."
,
String
file
=
"centerServer_"
+
DateTools
.
compact
(
new
Date
())
+
".txt"
;
list
.
add
(
String
.
format
(
" +++ center server thread pool size:%d, idle:%d, detail:%d."
,
Servers
.
centerServer
.
getThreadPool
().
getThreads
(),
Servers
.
centerServer
.
getThreadPool
().
getIdleThreads
()));
Servers
.
centerServer
.
getThreadPool
().
getIdleThreads
(),
file
));
try
(
FileOutputStream
stream
=
new
FileOutputStream
(
new
File
(
Config
.
dir_logs
(
true
),
file
));
OutputStreamWriter
writer
=
new
OutputStreamWriter
(
stream
))
{
Servers
.
centerServer
.
dump
(
writer
);
}
}
if
(
BooleanUtils
.
isTrue
(
Servers
.
applicationServerIsRunning
()))
{
list
.
add
(
String
.
format
(
" +++ application server thread pool size:%d, idle:%d."
,
String
file
=
"applicationServer_"
+
DateTools
.
compact
(
new
Date
())
+
".txt"
;
list
.
add
(
String
.
format
(
" +++ application server thread pool size:%d, idle:%d, detail:%d."
,
Servers
.
applicationServer
.
getThreadPool
().
getThreads
(),
Servers
.
applicationServer
.
getThreadPool
().
getIdleThreads
()));
Servers
.
applicationServer
.
getThreadPool
().
getIdleThreads
(),
file
));
try
(
FileOutputStream
stream
=
new
FileOutputStream
(
new
File
(
Config
.
dir_logs
(
true
),
file
));
OutputStreamWriter
writer
=
new
OutputStreamWriter
(
stream
))
{
Servers
.
applicationServer
.
dump
(
writer
);
}
}
if
(
BooleanUtils
.
isTrue
(
Servers
.
webServerIsRunning
()))
{
list
.
add
(
String
.
format
(
" +++ web server thread pool size:%d, idle:%d."
,
String
file
=
"webServer_"
+
DateTools
.
compact
(
new
Date
())
+
".txt"
;
list
.
add
(
String
.
format
(
" +++ web server thread pool size:%d, idle:%d, detail:%d."
,
Servers
.
webServer
.
getThreadPool
().
getThreads
(),
Servers
.
webServer
.
getThreadPool
().
getIdleThreads
()));
Servers
.
webServer
.
getThreadPool
().
getIdleThreads
(),
file
));
try
(
FileOutputStream
stream
=
new
FileOutputStream
(
new
File
(
Config
.
dir_logs
(
true
),
file
));
OutputStreamWriter
writer
=
new
OutputStreamWriter
(
stream
))
{
Servers
.
webServer
.
dump
(
writer
);
}
}
System
.
out
.
println
(
StringUtils
.
join
(
list
,
StringUtils
.
LF
));
Thread
.
sleep
(
2000
);
}
}
catch
(
Interrupted
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
...
...
o2server/x_console/src/main/java/com/x/server/console/server/JettySeverTools.java
浏览文件 @
e38335c6
...
...
@@ -27,7 +27,8 @@ import com.x.base.core.project.config.Config;
public
abstract
class
JettySeverTools
{
protected
static
void
addHttpsConnector
(
Server
server
,
Integer
port
)
throws
Exception
{
protected
static
void
addHttpsConnector
(
Server
server
,
Integer
port
,
boolean
persistentConnectionsEnable
)
throws
Exception
{
SslContextFactory
sslContextFactory
=
new
SslContextFactory
.
Server
();
sslContextFactory
.
setKeyStorePath
(
Config
.
sslKeyStore
().
getAbsolutePath
());
sslContextFactory
.
setKeyStorePassword
(
Config
.
token
().
getSslKeyStorePassword
());
...
...
@@ -35,12 +36,11 @@ public abstract class JettySeverTools {
sslContextFactory
.
setTrustAll
(
true
);
HttpConfiguration
config
=
new
HttpConfiguration
();
config
.
setSecureScheme
(
"https"
);
config
.
set
OutputBufferSize
(
1024
*
2048
);
config
.
set
PersistentConnectionsEnabled
(
persistentConnectionsEnable
);
config
.
setRequestHeaderSize
(
8192
*
2
);
config
.
setResponseHeaderSize
(
8192
*
2
);
config
.
setSendServerVersion
(
tru
e
);
config
.
setSendServerVersion
(
fals
e
);
config
.
setSendDateHeader
(
false
);
ServerConnector
https
=
new
ServerConnector
(
server
,
new
SslConnectionFactory
(
sslContextFactory
,
HttpVersion
.
HTTP_1_1
.
asString
()),
new
HttpConnectionFactory
(
config
));
...
...
@@ -50,12 +50,14 @@ public abstract class JettySeverTools {
server
.
addConnector
(
https
);
}
protected
static
void
addHttpConnector
(
Server
server
,
Integer
port
)
throws
Exception
{
protected
static
void
addHttpConnector
(
Server
server
,
Integer
port
,
boolean
persistentConnectionsEnable
)
throws
Exception
{
HttpConfiguration
config
=
new
HttpConfiguration
();
config
.
setOutputBufferSize
(
1024
*
2048
);
// config.setOutputBufferSize(1024 * 2048);
config
.
setPersistentConnectionsEnabled
(
persistentConnectionsEnable
);
config
.
setRequestHeaderSize
(
8192
*
2
);
config
.
setResponseHeaderSize
(
8192
*
2
);
config
.
setSendServerVersion
(
tru
e
);
config
.
setSendServerVersion
(
fals
e
);
config
.
setSendDateHeader
(
false
);
ServerConnector
http
=
new
ServerConnector
(
server
,
new
HttpConnectionFactory
(
config
));
http
.
setAcceptQueueSize
(-
1
);
...
...
o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java
浏览文件 @
e38335c6
...
...
@@ -101,9 +101,8 @@ public class ApplicationServerTools extends JettySeverTools {
x_portal_assemble_surface
.
class
.
getName
(),
x_attendance_assemble_control
.
class
.
getName
(),
x_bbs_assemble_control
.
class
.
getName
(),
x_file_assemble_control
.
class
.
getName
(),
x_meeting_assemble_control
.
class
.
getName
(),
x_mind_assemble_control
.
class
.
getName
(),
x_hotpic_assemble_control
.
class
.
getName
(),
x_query_service_processing
.
class
.
getName
(),
x_query_assemble_designer
.
class
.
getName
(),
x_query_assemble_surface
.
class
.
getName
());
x_hotpic_assemble_control
.
class
.
getName
(),
x_query_service_processing
.
class
.
getName
(),
x_query_assemble_designer
.
class
.
getName
(),
x_query_assemble_surface
.
class
.
getName
());
public
static
Server
start
(
ApplicationServer
applicationServer
)
throws
Exception
{
...
...
@@ -129,9 +128,9 @@ public class ApplicationServerTools extends JettySeverTools {
server
.
setAttribute
(
"maxFormContentSize"
,
applicationServer
.
getMaxFormContent
()
*
1024
*
1024
);
if
(
BooleanUtils
.
isTrue
(
applicationServer
.
getSslEnable
()))
{
addHttpsConnector
(
server
,
applicationServer
.
getPort
());
addHttpsConnector
(
server
,
applicationServer
.
getPort
()
,
applicationServer
.
getPersistentConnectionsEnable
()
);
}
else
{
addHttpConnector
(
server
,
applicationServer
.
getPort
());
addHttpConnector
(
server
,
applicationServer
.
getPort
()
,
applicationServer
.
getPersistentConnectionsEnable
()
);
}
GzipHandler
gzipHandler
=
new
GzipHandler
();
...
...
@@ -185,8 +184,7 @@ public class ApplicationServerTools extends JettySeverTools {
}
if
(
BooleanUtils
.
isFalse
(
applicationServer
.
getExposeJest
()))
{
FilterHolder
denialOfServiceFilterHolder
=
new
FilterHolder
(
new
DenialOfServiceFilter
());
webApp
.
addFilter
(
denialOfServiceFilterHolder
,
"/jest/*"
,
EnumSet
.
of
(
DispatcherType
.
REQUEST
));
webApp
.
addFilter
(
denialOfServiceFilterHolder
,
"/jest/*"
,
EnumSet
.
of
(
DispatcherType
.
REQUEST
));
}
handlers
.
addHandler
(
webApp
);
}
else
if
(
Files
.
exists
(
dir
))
{
...
...
o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java
浏览文件 @
e38335c6
...
...
@@ -89,9 +89,9 @@ public class CenterServerTools extends JettySeverTools {
server
.
setAttribute
(
"maxFormContentSize"
,
centerServer
.
getMaxFormContent
()
*
1024
*
1024
);
if
(
BooleanUtils
.
isTrue
(
centerServer
.
getSslEnable
()))
{
addHttpsConnector
(
server
,
centerServer
.
getPort
());
addHttpsConnector
(
server
,
centerServer
.
getPort
()
,
centerServer
.
getPersistentConnectionsEnable
()
);
}
else
{
addHttpConnector
(
server
,
centerServer
.
getPort
());
addHttpConnector
(
server
,
centerServer
.
getPort
()
,
centerServer
.
getPersistentConnectionsEnable
()
);
}
GzipHandler
gzipHandler
=
new
GzipHandler
();
...
...
o2server/x_console/src/main/java/com/x/server/console/server/web/WebServerTools.java
浏览文件 @
e38335c6
...
...
@@ -70,9 +70,9 @@ public class WebServerTools extends JettySeverTools {
threadPool
.
setMaxThreads
(
WEBSERVER_THREAD_POOL_SIZE_MAX
);
Server
server
=
new
Server
(
threadPool
);
if
(
webServer
.
getSslEnable
())
{
addHttpsConnector
(
server
,
webServer
.
getPort
());
addHttpsConnector
(
server
,
webServer
.
getPort
()
,
webServer
.
getPersistentConnectionsEnable
()
);
}
else
{
addHttpConnector
(
server
,
webServer
.
getPort
());
addHttpConnector
(
server
,
webServer
.
getPort
()
,
webServer
.
getPersistentConnectionsEnable
()
);
}
WebAppContext
context
=
new
WebAppContext
();
context
.
setContextPath
(
"/"
);
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/attachment/ActionListWithWorkOrWorkCompleted.java
浏览文件 @
e38335c6
...
...
@@ -33,7 +33,6 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction {
ActionResult
<
List
<
Wo
>>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
CompletableFuture
<
List
<
Wo
>>
_wos
=
CompletableFuture
.
supplyAsync
(()
->
{
List
<
Wo
>
wos
=
new
ArrayList
<>();
try
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/control/ActionGetWorkOrWorkCompleted.java
浏览文件 @
e38335c6
...
...
@@ -48,9 +48,7 @@ class ActionGetWorkOrWorkCompleted extends BaseAction {
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
workOrWorkCompleted
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
CompletableFuture
<
Wo
>
_wo
=
CompletableFuture
.
supplyAsync
(()
->
{
Wo
wo
=
null
;
try
{
...
...
@@ -84,24 +82,6 @@ class ActionGetWorkOrWorkCompleted extends BaseAction {
result
.
setData
(
_wo
.
get
());
return
result
;
// if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted,
// new ExceptionEntityNotExist(workOrWorkCompleted))) {
// throw new ExceptionAccessDenied(effectivePerson);
// }
//
// Wo wo = null;
//
// Work work = emc.find(workOrWorkCompleted, Work.class);
//
// if (null != work) {
// wo = this.work(business, effectivePerson, work);
// } else {
// wo = this.workCompleted(business, effectivePerson, emc.flag(workOrWorkCompleted, WorkCompleted.class));
// }
//
// result.setData(wo);
// return result;
}
}
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/ActionGetWithWorkOrWorkCompleted.java
浏览文件 @
e38335c6
...
...
@@ -31,7 +31,6 @@ class ActionGetWithWorkOrWorkCompleted extends BaseAction {
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
workOrWorkCompleted
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
CompletableFuture
<
Wo
>
_wo
=
CompletableFuture
.
supplyAsync
(()
->
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/FormAction.java
浏览文件 @
e38335c6
...
...
@@ -159,25 +159,6 @@ public class FormAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"查询移动端表单,如果有表单那么返回表单id,如果使用的是combine的表单直接返回内容."
,
action
=
V2LookupWorkOrWorkCompletedMobile
.
class
)
@GET
@Path
(
"v2/lookup/workorworkcompleted/{workOrWorkCompleted}/mobile"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
V2LookupWorkOrWorkCompletedMobile
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"工作或已完成工作标识"
)
@PathParam
(
"workOrWorkCompleted"
)
String
workOrWorkCompleted
)
{
ActionResult
<
V2LookupWorkOrWorkCompletedMobile
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
V2LookupWorkOrWorkCompletedMobile
().
execute
(
effectivePerson
,
workOrWorkCompleted
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"获取表单."
,
action
=
V2Get
.
class
)
@GET
@Path
(
"v2/{id}"
)
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2LookupWorkOrWorkCompletedMobile.java
已删除
100644 → 0
浏览文件 @
d045c084
package
com.x.processplatform.assemble.surface.jaxrs.form
;
import
java.util.Map.Entry
;
import
org.apache.commons.lang3.StringUtils
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.exception.ExceptionAccessDenied
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.tools.PropertyTools
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.jaxrs.form.ActionGetWithWorkOrWorkCompletedMobile.Wo
;
import
com.x.processplatform.assemble.surface.jaxrs.form.BaseAction.AbstractWo
;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.entity.content.WorkCompleted
;
import
com.x.processplatform.core.entity.content.WorkCompletedProperties
;
import
com.x.processplatform.core.entity.element.Activity
;
import
com.x.processplatform.core.entity.element.Form
;
import
com.x.processplatform.core.entity.element.Script
;
class
V2LookupWorkOrWorkCompletedMobile
extends
BaseAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
V2LookupWorkOrWorkCompletedMobile
.
class
);
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
workOrWorkCompleted
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
if
(!
business
.
readableWithWorkOrWorkCompleted
(
effectivePerson
,
workOrWorkCompleted
,
new
ExceptionEntityNotExist
(
workOrWorkCompleted
)))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
);
}
Wo
wo
=
new
Wo
();
Work
work
=
emc
.
find
(
workOrWorkCompleted
,
Work
.
class
);
if
(
null
!=
work
)
{
this
.
work
(
business
,
work
,
wo
);
}
else
{
this
.
workCompleted
(
business
,
emc
.
flag
(
workOrWorkCompleted
,
WorkCompleted
.
class
),
wo
);
}
result
.
setData
(
wo
);
return
result
;
}
}
private
void
work
(
Business
business
,
Work
work
,
Wo
wo
)
throws
Exception
{
String
id
=
work
.
getForm
();
if
(!
StringUtils
.
isEmpty
(
id
))
{
wo
.
setId
(
id
);
}
else
{
Activity
activity
=
business
.
getActivity
(
work
);
id
=
PropertyTools
.
getOrElse
(
activity
,
Activity
.
form_FIELDNAME
,
String
.
class
,
""
);
}
wo
.
setId
(
id
);
}
private
void
workCompleted
(
Business
business
,
WorkCompleted
workCompleted
,
Wo
wo
)
throws
Exception
{
// 先使用当前库的表单,如果不存在使用储存的表单.
if
(
StringUtils
.
isNotEmpty
(
workCompleted
.
getForm
()))
{
Form
form
=
business
.
form
().
pick
(
workCompleted
.
getForm
());
if
(
null
!=
form
)
{
wo
.
setForm
(
toWoFormDataOrMobileData
(
form
));
related
(
business
,
wo
,
form
);
}
}
else
if
(
null
!=
workCompleted
.
getProperties
().
getForm
())
{
wo
.
setForm
(
toWoFormDataOrMobileData
(
workCompleted
.
getProperties
().
getForm
()));
if
(
StringUtils
.
isNotBlank
(
workCompleted
.
getProperties
().
getForm
().
getData
()))
{
workCompleted
.
getProperties
().
getRelatedFormList
()
.
forEach
(
o
->
wo
.
getRelatedFormMap
().
put
(
o
.
getId
(),
toWoFormDataOrMobileData
(
o
)));
}
else
{
workCompleted
.
getProperties
().
getMobileRelatedFormList
()
.
forEach
(
o
->
wo
.
getRelatedFormMap
().
put
(
o
.
getId
(),
toWoFormMobileDataOrData
(
o
)));
}
}
workCompleted
.
getProperties
().
getRelatedScriptList
().
stream
()
.
forEach
(
o
->
wo
.
getRelatedScriptMap
().
put
(
o
.
getId
(),
toWoScript
(
o
)));
}
private
void
related
(
Business
business
,
Wo
wo
,
Form
form
)
throws
Exception
{
if
(
StringUtils
.
isNotBlank
(
form
.
getMobileData
()))
{
for
(
String
mobileRelatedFormId
:
form
.
getProperties
().
getMobileRelatedFormList
())
{
Form
relatedForm
=
business
.
form
().
pick
(
mobileRelatedFormId
);
if
(
null
!=
relatedForm
)
{
wo
.
getRelatedFormMap
().
put
(
mobileRelatedFormId
,
toWoFormMobileDataOrData
(
relatedForm
));
}
}
}
else
{
for
(
String
relatedFormId
:
form
.
getProperties
().
getRelatedFormList
())
{
Form
relatedForm
=
business
.
form
().
pick
(
relatedFormId
);
if
(
null
!=
relatedForm
)
{
wo
.
getRelatedFormMap
().
put
(
relatedFormId
,
toWoFormDataOrMobileData
(
relatedForm
));
}
}
}
relatedScript
(
business
,
wo
,
form
);
}
protected
void
relatedScript
(
Business
business
,
AbstractWo
wo
,
Form
form
)
throws
Exception
{
for
(
Entry
<
String
,
String
>
entry
:
form
.
getProperties
().
getMobileRelatedScriptMap
().
entrySet
())
{
switch
(
entry
.
getValue
())
{
case
WorkCompletedProperties
.
Script
.
TYPE_PROCESSPLATFORM
:
Script
relatedScript
=
business
.
script
().
pick
(
entry
.
getKey
());
if
(
null
!=
relatedScript
)
{
wo
.
getRelatedScriptMap
().
put
(
entry
.
getKey
(),
toWoScript
(
relatedScript
));
}
break
;
case
WorkCompletedProperties
.
Script
.
TYPE_CMS
:
com
.
x
.
cms
.
core
.
entity
.
element
.
Script
relatedCmsScript
=
business
.
cms
().
script
().
pick
(
entry
.
getKey
());
if
(
null
!=
relatedCmsScript
)
{
wo
.
getRelatedScriptMap
().
put
(
entry
.
getKey
(),
toWoScript
(
relatedCmsScript
));
}
break
;
case
WorkCompletedProperties
.
Script
.
TYPE_PORTAL
:
com
.
x
.
portal
.
core
.
entity
.
Script
relatedPortalScript
=
business
.
portal
().
script
().
pick
(
entry
.
getKey
());
if
(
null
!=
relatedPortalScript
)
{
wo
.
getRelatedScriptMap
().
put
(
entry
.
getKey
(),
toWoScript
(
relatedPortalScript
));
}
break
;
default
:
break
;
}
}
}
public
static
class
Wo
extends
AbstractWo
{
}
}
\ No newline at end of file
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/record/ActionListWithWorkOrWorkCompleted.java
浏览文件 @
e38335c6
...
...
@@ -32,9 +32,7 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction {
ActionResult
<
List
<
Wo
>>
execute
(
EffectivePerson
effectivePerson
,
String
workOrWorkCompleted
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
List
<
Wo
>>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
CompletableFuture
<
List
<
Wo
>>
_wos
=
CompletableFuture
.
supplyAsync
(()
->
{
List
<
Wo
>
wos
=
new
ArrayList
<>();
try
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/ActionGetWithWorkOrWorkCompleted.java
浏览文件 @
e38335c6
...
...
@@ -45,7 +45,6 @@ class ActionGetWithWorkOrWorkCompleted extends BaseAction {
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
CompletableFuture
<
Wo
>
_wo
=
CompletableFuture
.
supplyAsync
(()
->
{
Wo
wo
=
null
;
try
{
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2GetWorkOrWorkCompleted.java
浏览文件 @
e38335c6
...
...
@@ -35,6 +35,7 @@ import com.x.processplatform.assemble.surface.Business;
import
com.x.processplatform.core.entity.content.Attachment
;
import
com.x.processplatform.core.entity.content.Data
;
import
com.x.processplatform.core.entity.content.Read
;
import
com.x.processplatform.core.entity.content.Record
;
import
com.x.processplatform.core.entity.content.Task
;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.entity.content.WorkCompleted
;
...
...
@@ -53,21 +54,40 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
if
(!
business
.
readableWithWorkOrWorkCompleted
(
effectivePerson
,
workOrWorkCompleted
,
new
ExceptionEntityNotExist
(
workOrWorkCompleted
)))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
);
}
Wo
wo
=
null
;
Work
work
=
business
.
entityManagerContainer
().
find
(
workOrWorkCompleted
,
Work
.
class
);
if
(
null
!=
work
)
{
wo
=
this
.
work
(
effectivePerson
,
business
,
work
);
}
else
{
WorkCompleted
workCompleted
=
emc
.
flag
(
workOrWorkCompleted
,
WorkCompleted
.
class
);
if
(
null
!=
workCompleted
)
{
wo
=
this
.
workCompleted
(
business
,
effectivePerson
,
workCompleted
);
CompletableFuture
<
Wo
>
_wo
=
CompletableFuture
.
supplyAsync
(()
->
{
Wo
wo
=
null
;
try
{
Work
work
=
business
.
entityManagerContainer
().
find
(
workOrWorkCompleted
,
Work
.
class
);
if
(
null
!=
work
)
{
wo
=
this
.
work
(
effectivePerson
,
business
,
work
);
}
else
{
WorkCompleted
workCompleted
=
emc
.
flag
(
workOrWorkCompleted
,
WorkCompleted
.
class
);
if
(
null
!=
workCompleted
)
{
wo
=
this
.
workCompleted
(
business
,
effectivePerson
,
workCompleted
);
}
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
return
wo
;
});
CompletableFuture
<
Boolean
>
_control
=
CompletableFuture
.
supplyAsync
(()
->
{
Boolean
value
=
false
;
try
{
value
=
business
.
readableWithWorkOrWorkCompleted
(
effectivePerson
,
workOrWorkCompleted
,
new
ExceptionEntityNotExist
(
workOrWorkCompleted
));
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
return
value
;
});
if
(
BooleanUtils
.
isFalse
(
_control
.
get
()))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
,
workOrWorkCompleted
);
}
result
.
setData
(
wo
);
result
.
setData
(
_wo
.
get
()
);
return
result
;
}
}
...
...
@@ -75,17 +95,34 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
private
Wo
work
(
EffectivePerson
effectivePerson
,
Business
business
,
Work
work
)
throws
InterruptedException
,
ExecutionException
{
Wo
wo
=
new
Wo
();
// Date s = new Date();
CompletableFuture
.
allOf
(
workJson
(
work
,
wo
),
activity
(
business
,
work
,
wo
),
data
(
business
,
work
,
wo
),
task
(
effectivePerson
,
business
,
work
,
wo
),
read
(
effectivePerson
,
business
,
work
.
getJob
(),
wo
),
creatorIdentity
(
business
,
work
.
getCreatorIdentity
(),
wo
),
creatorPerson
(
business
,
work
.
getCreatorPerson
(),
wo
),
creatorUnit
(
business
,
work
.
getCreatorUnit
(),
wo
),
attachment
(
effectivePerson
,
business
,
work
.
getJob
(),
wo
)).
get
();
// System.out.println("!!!!!!!!!!!!!!!!work:" + ((new Date()).getTime() -
// s.getTime()));
attachment
(
effectivePerson
,
business
,
work
.
getJob
(),
wo
),
record
(
effectivePerson
,
business
,
work
.
getJob
(),
wo
)).
get
();
for
(
WoTask
woTask
:
wo
.
getTaskList
())
{
wo
.
getRecordList
().
add
(
taskToRecord
(
woTask
));
}
return
wo
;
}
private
WoRecord
taskToRecord
(
WoTask
woTask
)
{
WoRecord
o
=
new
WoRecord
();
o
.
setType
(
Record
.
TYPE_CURRENTTASK
);
o
.
setFromActivity
(
woTask
.
getActivity
());
o
.
setFromActivityAlias
(
woTask
.
getActivityAlias
());
o
.
setFromActivityName
(
woTask
.
getActivityName
());
o
.
setFromActivityToken
(
woTask
.
getActivityToken
());
o
.
setFromActivityType
(
woTask
.
getActivityType
());
o
.
setPerson
(
woTask
.
getPerson
());
o
.
setIdentity
(
o
.
getIdentity
());
o
.
setUnit
(
woTask
.
getUnit
());
o
.
getProperties
().
setStartTime
(
woTask
.
getStartTime
());
o
.
getProperties
().
setEmpowerFromIdentity
(
woTask
.
getEmpowerFromIdentity
());
return
o
;
}
private
CompletableFuture
<
Void
>
data
(
Business
business
,
Work
work
,
Wo
wo
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
...
...
@@ -107,6 +144,36 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
});
}
private
CompletableFuture
<
Void
>
record
(
EffectivePerson
effectivePerson
,
Business
business
,
String
job
,
Wo
wo
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
wo
.
setRecordList
(
business
.
entityManagerContainer
()
.
fetchEqual
(
Record
.
class
,
WoRecord
.
copier
,
Record
.
job_FIELDNAME
,
job
).
stream
()
.
sorted
(
Comparator
.
comparing
(
WoRecord:
:
getOrder
)).
collect
(
Collectors
.
toList
()));
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
completedRecord
(
EffectivePerson
effectivePerson
,
Business
business
,
WorkCompleted
workCompleted
,
Wo
wo
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
if
(
ListTools
.
isNotEmpty
(
workCompleted
.
getProperties
().
getRecordList
()))
{
wo
.
setRecordList
(
WoRecord
.
copier
.
copy
(
workCompleted
.
getProperties
().
getRecordList
()).
stream
()
.
sorted
(
Comparator
.
comparing
(
WoRecord:
:
getOrder
)).
collect
(
Collectors
.
toList
()));
}
else
{
wo
.
setRecordList
(
business
.
entityManagerContainer
()
.
fetchEqual
(
Record
.
class
,
WoRecord
.
copier
,
Record
.
job_FIELDNAME
,
workCompleted
.
getJob
())
.
stream
().
sorted
(
Comparator
.
comparing
(
WoRecord:
:
getOrder
)).
collect
(
Collectors
.
toList
()));
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
});
}
private
CompletableFuture
<
Void
>
activity
(
Business
business
,
Work
work
,
Wo
wo
)
{
return
CompletableFuture
.
runAsync
(()
->
{
try
{
...
...
@@ -117,12 +184,9 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
activity
.
copyTo
(
woActivity
);
wo
.
setActivity
(
woActivity
);
if
(
Objects
.
equals
(
ActivityType
.
manual
,
activity
.
getActivityType
()))
{
wo
.
setRouteList
(
business
.
entityManagerContainer
().
fetchIn
(
Route
.
class
,
WoRoute
.
copier
,
JpaObject
.
id_FIELDNAME
,
((
Manual
)
activity
).
getRouteList
()));
wo
.
setRouteList
(
WoRoute
.
copier
.
copy
(
business
.
route
().
pick
(((
Manual
)
activity
).
getRouteList
())));
}
}
// System.out.println("!!!!!!!!!!!!!!!!activity:" + ((new Date()).getTime() -
// s.getTime()));
}
catch
(
Exception
e
)
{
logger
.
error
(
e
);
}
...
...
@@ -256,7 +320,8 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
creatorIdentity
(
business
,
workCompleted
.
getCreatorIdentity
(),
wo
),
creatorPerson
(
business
,
workCompleted
.
getCreatorPerson
(),
wo
),
creatorUnit
(
business
,
workCompleted
.
getCreatorUnit
(),
wo
),
attachment
(
effectivePerson
,
business
,
workCompleted
.
getJob
(),
wo
)).
get
();
attachment
(
effectivePerson
,
business
,
workCompleted
.
getJob
(),
wo
),
completedRecord
(
effectivePerson
,
business
,
workCompleted
,
wo
)).
get
();
return
wo
;
}
...
...
@@ -373,6 +438,9 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
// work和workCompleted都有
private
List
<
WoAttachment
>
attachmentList
;
// work和workCompleted都有
private
List
<
WoRecord
>
recordList
;
// 只有work有
private
WoActivity
activity
;
// 只有work有
...
...
@@ -478,6 +546,14 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
this
.
attachmentList
=
attachmentList
;
}
public
List
<
WoRecord
>
getRecordList
()
{
return
recordList
;
}
public
void
setRecordList
(
List
<
WoRecord
>
recordList
)
{
this
.
recordList
=
recordList
;
}
}
public
static
class
WoWork
extends
Work
{
...
...
@@ -616,7 +692,10 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
public
static
class
WoRoute
extends
GsonPropertyObject
{
public
static
class
WoRoute
extends
Route
{
private
static
final
long
serialVersionUID
=
556378904185283486L
;
static
WrapCopier
<
Route
,
WoRoute
>
copier
=
WrapCopierFactory
.
wo
(
Route
.
class
,
WoRoute
.
class
,
ListTools
.
toList
(
JpaObject
.
id_FIELDNAME
,
Route
.
name_FIELDNAME
,
Route
.
description_FIELDNAME
,
Route
.
alias_FIELDNAME
),
...
...
@@ -636,7 +715,6 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
public
void
setControl
(
WoAttachmentControl
control
)
{
this
.
control
=
control
;
}
}
public
static
class
WoAttachmentControl
extends
GsonPropertyObject
{
...
...
@@ -671,4 +749,13 @@ class V2GetWorkOrWorkCompleted extends BaseAction {
}
public
static
class
WoRecord
extends
Record
{
private
static
final
long
serialVersionUID
=
-
7666329770246726197L
;
static
WrapCopier
<
Record
,
WoRecord
>
copier
=
WrapCopierFactory
.
wo
(
Record
.
class
,
WoRecord
.
class
,
JpaObject
.
singularAttributeField
(
Record
.
class
,
true
,
false
),
JpaObject
.
FieldsInvisible
);
}
}
\ No newline at end of file
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/worklog/ActionListWithWorkOrWorkCompleted.java
浏览文件 @
e38335c6
...
...
@@ -46,7 +46,6 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction {
ActionResult
<
List
<
Wo
>>
execute
(
EffectivePerson
effectivePerson
,
String
workOrWorkCompleted
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
List
<
Wo
>>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
final
String
job
=
business
.
job
().
findWithWorkOrWorkCompleted
(
workOrWorkCompleted
);
...
...
@@ -138,7 +137,6 @@ class ActionListWithWorkOrWorkCompleted extends BaseAction {
ListTools
.
groupStick
(
wos
,
readCompleteds
,
WorkLog
.
fromActivityToken_FIELDNAME
,
ReadCompleted
.
activityToken_FIELDNAME
,
READCOMPLETEDLIST_FIELDNAME
);
result
.
setData
(
wos
);
result
.
setData
(
wos
);
return
result
;
}
}
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Activity.java
浏览文件 @
e38335c6
...
...
@@ -100,6 +100,8 @@ public abstract class Activity extends SliceJpaObject {
public
abstract
String
getOpinionGroup
();
public
abstract
List
<
String
>
getRouteList
();
public
abstract
void
setOpinionGroup
(
String
opinionGroup
);
// 是否允许调度
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Agent.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Basic
;
...
...
@@ -14,6 +15,7 @@ import javax.persistence.OrderColumn;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -26,6 +28,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
@Entity
...
...
@@ -60,12 +63,14 @@ public class Agent extends Activity {
// nothing
}
/* 更新运行方法 */
// public static String[] FLA GS = new String[] { "id", "alias" };
/* flag标志位 */
/* Entity 默认字段结束 */
@Override
public
List
<
String
>
getRouteList
()
{
if
(
StringUtils
.
isNotEmpty
(
this
.
getRoute
()))
{
return
ListTools
.
toList
(
this
.
getRoute
());
}
else
{
return
new
ArrayList
<>();
}
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Begin.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Basic
;
...
...
@@ -14,6 +15,7 @@ import javax.persistence.OrderColumn;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -27,6 +29,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
@Entity
...
...
@@ -60,10 +63,14 @@ public class Begin extends Activity {
// nothing
}
/* 更新运行方法 */
/* flag标志位 */
/* Entity 默认字段结束 */
@Override
public
List
<
String
>
getRouteList
()
{
if
(
StringUtils
.
isNotEmpty
(
this
.
getRoute
()))
{
return
ListTools
.
toList
(
this
.
getRoute
());
}
else
{
return
new
ArrayList
<>();
}
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Cancel.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Basic
;
...
...
@@ -14,6 +15,7 @@ import javax.persistence.OrderColumn;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -26,6 +28,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
@Entity
...
...
@@ -59,10 +62,10 @@ public class Cancel extends Activity {
// nothing
}
/* 更新运行方法 */
/* flag标志位 */
/* Entity 默认字段结束 */
@Override
public
List
<
String
>
getRouteList
()
{
return
new
ArrayList
<>();
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Delay.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -17,6 +18,7 @@ import javax.persistence.OrderColumn;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -29,6 +31,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
@Entity
...
...
@@ -62,10 +65,14 @@ public class Delay extends Activity {
// nothing
}
/* 更新运行方法 */
/* flag标志位 */
/* Entity 默认字段结束 */
@Override
public
List
<
String
>
getRouteList
()
{
if
(
StringUtils
.
isNotEmpty
(
this
.
getRoute
()))
{
return
ListTools
.
toList
(
this
.
getRoute
());
}
else
{
return
new
ArrayList
<>();
}
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
@@ -337,7 +344,7 @@ public class Delay extends Activity {
@CheckPersist
(
allowEmpty
=
true
)
@Column
(
name
=
ColumnNamePrefix
+
allowSuspend_FIELDNAME
)
private
Boolean
allowSuspend
;
public
static
final
String
route_FIELDNAME
=
"route"
;
@IdReference
(
Route
.
class
)
@FieldDescribe
(
"出口路由."
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Embed.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Basic
;
...
...
@@ -23,8 +24,10 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -64,10 +67,14 @@ public class Embed extends Activity {
/* 更新运行方法 */
// public static String[] FLA GS = new String[] { "id", "alias" };
/* flag标志位 */
/* Entity 默认字段结束 */
@Override
public
List
<
String
>
getRouteList
()
{
if
(
StringUtils
.
isNotEmpty
(
this
.
getRoute
()))
{
return
ListTools
.
toList
(
this
.
getRoute
());
}
else
{
return
new
ArrayList
<>();
}
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
@@ -334,7 +341,7 @@ public class Embed extends Activity {
@Column
(
name
=
ColumnNamePrefix
+
allowRerouteTo_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
allowRerouteTo_FIELDNAME
)
private
Boolean
allowRerouteTo
;
@FieldDescribe
(
"允许挂起"
)
@CheckPersist
(
allowEmpty
=
true
)
@Column
(
name
=
ColumnNamePrefix
+
allowSuspend_FIELDNAME
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/End.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Basic
;
...
...
@@ -20,8 +21,10 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -59,10 +62,10 @@ public class End extends Activity {
// nothing
}
/* 更新运行方法 */
/* flag标志位 */
/* Entity 默认字段结束 */
@Override
public
List
<
String
>
getRouteList
()
{
return
new
ArrayList
<>();
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Invoke.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Basic
;
...
...
@@ -16,6 +17,7 @@ import javax.persistence.OrderColumn;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -29,6 +31,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
@Entity
...
...
@@ -62,7 +65,14 @@ public class Invoke extends Activity {
// nothing
}
/* 更新运行方法 */
@Override
public
List
<
String
>
getRouteList
()
{
if
(
StringUtils
.
isNotEmpty
(
this
.
getRoute
()))
{
return
ListTools
.
toList
(
this
.
getRoute
());
}
else
{
return
new
ArrayList
<>();
}
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Merge.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Basic
;
...
...
@@ -14,6 +15,7 @@ import javax.persistence.OrderColumn;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -26,6 +28,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
@Entity
...
...
@@ -59,10 +62,14 @@ public class Merge extends Activity {
// nothing
}
/* 更新运行方法 */
/* flag标志位 */
/* Entity 默认字段结束 */
@Override
public
List
<
String
>
getRouteList
()
{
if
(
StringUtils
.
isNotEmpty
(
this
.
getRoute
()))
{
return
ListTools
.
toList
(
this
.
getRoute
());
}
else
{
return
new
ArrayList
<>();
}
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Message.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Basic
;
...
...
@@ -14,6 +15,7 @@ import javax.persistence.OrderColumn;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -27,6 +29,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
@Entity
...
...
@@ -60,6 +63,15 @@ public class Message extends Activity {
// nothing
}
@Override
public
List
<
String
>
getRouteList
()
{
if
(
StringUtils
.
isNotEmpty
(
this
.
getRoute
()))
{
return
ListTools
.
toList
(
this
.
getRoute
());
}
else
{
return
new
ArrayList
<>();
}
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
@Column
(
length
=
JpaObject
.
length_255B
,
name
=
ColumnNamePrefix
+
group_FIELDNAME
)
...
...
@@ -325,7 +337,7 @@ public class Message extends Activity {
@Column
(
name
=
ColumnNamePrefix
+
allowRerouteTo_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
allowRerouteTo_FIELDNAME
)
private
Boolean
allowRerouteTo
;
@FieldDescribe
(
"允许挂起"
)
@CheckPersist
(
allowEmpty
=
true
)
@Column
(
name
=
ColumnNamePrefix
+
allowSuspend_FIELDNAME
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Service.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Basic
;
...
...
@@ -14,6 +15,7 @@ import javax.persistence.OrderColumn;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -26,6 +28,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
@Entity
...
...
@@ -59,10 +62,14 @@ public class Service extends Activity {
// nothing
}
/* 更新运行方法 */
/* flag标志位 */
/* Entity 默认字段结束 */
@Override
public
List
<
String
>
getRouteList
()
{
if
(
StringUtils
.
isNotEmpty
(
this
.
getRoute
()))
{
return
ListTools
.
toList
(
this
.
getRoute
());
}
else
{
return
new
ArrayList
<>();
}
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/Split.java
浏览文件 @
e38335c6
package
com.x.processplatform.core.entity.element
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.persistence.Basic
;
...
...
@@ -14,6 +15,7 @@ import javax.persistence.OrderColumn;
import
javax.persistence.Table
;
import
javax.persistence.UniqueConstraint
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.PersistentCollection
;
import
org.apache.openjpa.persistence.jdbc.ContainerTable
;
import
org.apache.openjpa.persistence.jdbc.ElementColumn
;
...
...
@@ -27,6 +29,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import
com.x.base.core.entity.annotation.Flag
;
import
com.x.base.core.entity.annotation.IdReference
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.PersistenceProperties
;
/**
...
...
@@ -63,7 +66,14 @@ public class Split extends Activity {
// nothing
}
/* 更新运行方法 */
@Override
public
List
<
String
>
getRouteList
()
{
if
(
StringUtils
.
isNotEmpty
(
this
.
getRoute
()))
{
return
ListTools
.
toList
(
this
.
getRoute
());
}
else
{
return
new
ArrayList
<>();
}
}
@FieldDescribe
(
"分组"
)
@CheckPersist
(
allowEmpty
=
true
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录