Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
bb7df08b
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,发现更多精彩内容 >>
提交
bb7df08b
编写于
9月 07, 2020
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
loop for processingSignal
上级
864848dd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
54 addition
and
43 deletion
+54
-43
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/JpaObject.java
...oject/src/main/java/com/x/base/core/entity/JpaObject.java
+8
-12
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessing.java
...latform/assemble/surface/jaxrs/task/ActionProcessing.java
+4
-4
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Record.java
...ava/com/x/processplatform/core/entity/content/Record.java
+10
-8
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/wrap/WrapRoute.java
...x/processplatform/core/entity/element/wrap/WrapRoute.java
+3
-2
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/ActionProcessingSignal.java
...service/processing/jaxrs/work/ActionProcessingSignal.java
+28
-16
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/WorkAction.java
...essplatform/service/processing/jaxrs/work/WorkAction.java
+1
-1
未找到文件。
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/JpaObject.java
浏览文件 @
bb7df08b
...
@@ -82,28 +82,24 @@ public abstract class JpaObject extends GsonPropertyObject implements Serializab
...
@@ -82,28 +82,24 @@ public abstract class JpaObject extends GsonPropertyObject implements Serializab
public
static
final
String
scratchInteger_FIELDNAME
=
"scratchInteger"
;
public
static
final
String
scratchInteger_FIELDNAME
=
"scratchInteger"
;
public
static
final
String
properties_FIELDNAME
=
"properties"
;
public
static
final
String
JsonPropertiesValueHandler
=
"com.x.base.core.entity.annotation.JsonPropertiesValueHandler"
;
public
static
final
String
JsonPropertiesValueHandler
=
"com.x.base.core.entity.annotation.JsonPropertiesValueHandler"
;
public
static
final
List
<
String
>
FieldsUnmodify
=
ListUtils
public
static
final
List
<
String
>
FieldsUnmodify
=
ListUtils
.
unmodifiableList
(
Arrays
.
asList
(
id_FIELDNAME
,
.
unmodifiableList
(
Arrays
.
asList
(
id_FIELDNAME
,
distributeFactor_FIELDNAME
,
createTime_FIELDNAME
,
distributeFactor_FIELDNAME
,
createTime_FIELDNAME
,
updateTime_FIELDNAME
,
sequence_FIELDNAME
,
updateTime_FIELDNAME
,
sequence_FIELDNAME
,
scratchString_FIELDNAME
,
scratchBoolean_FIELDNAME
,
scratchString_FIELDNAME
,
scratchBoolean_FIELDNAME
,
scratchDate_FIELDNAME
,
scratchInteger_FIELDNAME
));
scratchDate_FIELDNAME
,
scratchInteger_FIELDNAME
,
properties_FIELDNAME
));
public
static
final
List
<
String
>
FieldsUnmodifyExcludeId
=
ListUtils
public
static
final
List
<
String
>
FieldsUnmodifyExcludeId
=
ListUtils
.
unmodifiableList
(
Arrays
.
asList
(
.
unmodifiableList
(
Arrays
.
asList
(
distributeFactor_FIELDNAME
,
createTime_FIELDNAME
,
updateTime_FIELDNAME
,
distributeFactor_FIELDNAME
,
createTime_FIELDNAME
,
updateTime_FIELDNAME
,
sequence_FIELDNAME
,
sequence_FIELDNAME
,
scratchString_FIELDNAME
,
scratchBoolean_FIELDNAME
,
scratchDate_FIELDNAME
,
scratchString_FIELDNAME
,
scratchBoolean_FIELDNAME
,
scratchDate_FIELDNAME
,
scratchInteger_FIELDNAME
));
scratchInteger_FIELDNAME
,
properties_FIELDNAME
));
public
static
final
List
<
String
>
FieldsInvisible
=
ListUtils
.
unmodifiableList
(
public
static
final
List
<
String
>
FieldsInvisible
=
ListUtils
.
unmodifiableList
(
Arrays
.
asList
(
distributeFactor_FIELDNAME
,
sequence_FIELDNAME
,
password_FIELDNAME
,
scratchString_FIELDNAME
,
Arrays
.
asList
(
distributeFactor_FIELDNAME
,
sequence_FIELDNAME
,
password_FIELDNAME
,
scratchString_FIELDNAME
,
scratchBoolean_FIELDNAME
,
scratchDate_FIELDNAME
,
scratchInteger_FIELDNAME
,
properties_FIELDNAME
));
scratchBoolean_FIELDNAME
,
scratchDate_FIELDNAME
,
scratchInteger_FIELDNAME
));
public
static
final
List
<
String
>
FieldsDefault
=
ListUtils
public
static
final
List
<
String
>
FieldsDefault
=
ListUtils
.
unmodifiableList
(
Arrays
.
asList
(
id_FIELDNAME
,
key_FIELDNAME
,
createTime_FIELDNAME
,
updateTime_FIELDNAME
,
.
unmodifiableList
(
Arrays
.
asList
(
id_FIELDNAME
,
key_FIELDNAME
,
createTime_FIELDNAME
,
updateTime_FIELDNAME
,
sequence_FIELDNAME
,
distributeFactor_FIELDNAME
,
password_FIELDNAME
,
scratchString_FIELDNAME
,
sequence_FIELDNAME
,
distributeFactor_FIELDNAME
,
password_FIELDNAME
,
scratchString_FIELDNAME
,
scratchBoolean_FIELDNAME
,
scratchDate_FIELDNAME
,
scratchInteger_FIELDNAME
,
properties_FIELDNAME
));
scratchBoolean_FIELDNAME
,
scratchDate_FIELDNAME
,
scratchInteger_FIELDNAME
));
@FieldDescribe
(
"创建时间,自动生成,索引创建在约束中."
)
@FieldDescribe
(
"创建时间,自动生成,索引创建在约束中."
)
@Column
(
name
=
ColumnNamePrefix
+
createTime_FIELDNAME
)
@Column
(
name
=
ColumnNamePrefix
+
createTime_FIELDNAME
)
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessing.java
浏览文件 @
bb7df08b
...
@@ -114,10 +114,10 @@ class ActionProcessing extends BaseAction {
...
@@ -114,10 +114,10 @@ class ActionProcessing extends BaseAction {
new
Thread
(()
->
{
new
Thread
(()
->
{
RespProcessingSignal
resp
=
null
;
RespProcessingSignal
resp
=
null
;
try
{
try
{
resp
=
ThisApplication
resp
=
ThisApplication
.
context
().
applications
()
.
context
().
applications
().
getQuery
(
effectivePerson
.
getDebugger
()
,
.
getQuery
(
effectivePerson
.
getDebugger
(),
x_processplatform_service_processing
.
class
,
x_processplatform_service_processing
.
class
,
Applications
.
joinQueryUri
(
"work
"
,
Applications
.
joinQueryUri
(
"work"
,
task
.
getWork
(),
"series"
,
series
,
"activitytoken
"
,
t
ask
.
getWork
(),
"series"
,
series
,
"processing"
,
"signal"
),
t
his
.
task
.
getActivityToken
()
,
"processing"
,
"signal"
),
task
.
getJob
())
task
.
getJob
())
.
getData
(
RespProcessingSignal
.
class
);
.
getData
(
RespProcessingSignal
.
class
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/content/Record.java
浏览文件 @
bb7df08b
...
@@ -107,12 +107,12 @@ public class Record extends SliceJpaObject {
...
@@ -107,12 +107,12 @@ public class Record extends SliceJpaObject {
public
void
onPersist
()
throws
Exception
{
public
void
onPersist
()
throws
Exception
{
switch
(
Objects
.
toString
(
this
.
type
))
{
switch
(
Objects
.
toString
(
this
.
type
))
{
case
TYPE_URGE:
case
TYPE_URGE:
case
TYPE_EXPIRE:
case
TYPE_EXPIRE:
this
.
display
=
false
;
this
.
display
=
false
;
break
;
break
;
default
:
default
:
this
.
display
=
true
;
this
.
display
=
true
;
}
}
}
}
/* 更新运行方法 */
/* 更新运行方法 */
...
@@ -162,6 +162,10 @@ public class Record extends SliceJpaObject {
...
@@ -162,6 +162,10 @@ public class Record extends SliceJpaObject {
return
this
.
properties
;
return
this
.
properties
;
}
}
public
void
setProperties
(
RecordProperties
properties
)
{
this
.
properties
=
properties
;
}
public
static
final
String
application_FIELDNAME
=
"application"
;
public
static
final
String
application_FIELDNAME
=
"application"
;
@FieldDescribe
(
"应用."
)
@FieldDescribe
(
"应用."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
application_FIELDNAME
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
application_FIELDNAME
)
...
@@ -467,8 +471,6 @@ public class Record extends SliceJpaObject {
...
@@ -467,8 +471,6 @@ public class Record extends SliceJpaObject {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
String
getApplication
()
{
public
String
getApplication
()
{
return
application
;
return
application
;
}
}
...
...
o2server/x_processplatform_core_entity/src/main/java/com/x/processplatform/core/entity/element/wrap/WrapRoute.java
浏览文件 @
bb7df08b
...
@@ -3,6 +3,7 @@ package com.x.processplatform.core.entity.element.wrap;
...
@@ -3,6 +3,7 @@ package com.x.processplatform.core.entity.element.wrap;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.project.bean.WrapCopier
;
import
com.x.base.core.project.bean.WrapCopier
;
import
com.x.base.core.project.bean.WrapCopierFactory
;
import
com.x.base.core.project.bean.WrapCopierFactory
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.element.Route
;
import
com.x.processplatform.core.entity.element.Route
;
public
class
WrapRoute
extends
Route
{
public
class
WrapRoute
extends
Route
{
...
@@ -10,8 +11,8 @@ public class WrapRoute extends Route {
...
@@ -10,8 +11,8 @@ public class WrapRoute extends Route {
private
static
final
long
serialVersionUID
=
6333586002792120317L
;
private
static
final
long
serialVersionUID
=
6333586002792120317L
;
public
static
WrapCopier
<
Route
,
WrapRoute
>
outCopier
=
WrapCopierFactory
.
wo
(
Route
.
class
,
WrapRoute
.
class
,
null
,
public
static
WrapCopier
<
Route
,
WrapRoute
>
outCopier
=
WrapCopierFactory
.
wo
(
Route
.
class
,
WrapRoute
.
class
,
null
,
JpaObject
.
FieldsInvisible
);
ListTools
.
toList
(
JpaObject
.
FieldsInvisible
,
Route
.
properties_FIELDNAME
)
);
public
static
WrapCopier
<
WrapRoute
,
Route
>
inCopier
=
WrapCopierFactory
.
wi
(
WrapRoute
.
class
,
Route
.
class
,
null
,
public
static
WrapCopier
<
WrapRoute
,
Route
>
inCopier
=
WrapCopierFactory
.
wi
(
WrapRoute
.
class
,
Route
.
class
,
null
,
JpaObject
.
FieldsUnmodifyExcludeId
);
ListTools
.
toList
(
JpaObject
.
FieldsUnmodifyExcludeId
,
Route
.
properties_FIELDNAME
)
);
}
}
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/ActionProcessingSignal.java
浏览文件 @
bb7df08b
...
@@ -16,27 +16,21 @@ class ActionProcessingSignal extends BaseAction {
...
@@ -16,27 +16,21 @@ class ActionProcessingSignal extends BaseAction {
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
String
series
,
String
activityToken
)
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
String
series
,
String
activityToken
)
throws
Exception
{
throws
Exception
{
Wo
wo
=
new
Wo
();
Wo
wo
=
null
;
Thread
.
sleep
(
Config
.
processPlatform
().
getProcessingSignalThreshold
());
Optional
<
SignalStack
>
optional
=
ThisApplication
.
getProcessingToProcessingSignalStack
().
find
(
id
,
series
);
int
loop
=
0
;
int
loop
=
0
;
while
((!
optional
.
isPresent
())
&&
(
loop
++
<
20
))
{
Thread
.
sleep
(
Config
.
processPlatform
().
getProcessingSignalThreshold
());
Thread
.
sleep
(
200
);
optional
=
ThisApplication
.
getProcessingToProcessingSignalStack
().
find
(
id
,
series
);
while
((
null
==
wo
)
&&
(
loop
++
<
50
))
{
wo
=
dataReady
(
activityToken
,
ThisApplication
.
getProcessingToProcessingSignalStack
().
find
(
id
,
series
));
if
(
null
==
wo
)
{
Thread
.
sleep
(
200
);
}
}
}
if
(
optional
.
isPresent
())
{
if
(
null
==
wo
)
{
optional
.
get
().
forEach
(
o
->
{
wo
=
new
Wo
();
if
(((
null
!=
o
.
getManualExecute
())
||
(
null
!=
o
.
getSplitExecute
()))
&&
(!
StringUtils
.
equals
(
activityToken
,
o
.
getActivityToken
())))
{
wo
.
getSignalStack
().
add
(
o
);
}
});
}
else
{
wo
.
setSignalStack
(
new
SignalStack
());
wo
.
setSignalStack
(
new
SignalStack
());
}
}
...
@@ -45,6 +39,24 @@ class ActionProcessingSignal extends BaseAction {
...
@@ -45,6 +39,24 @@ class ActionProcessingSignal extends BaseAction {
return
result
;
return
result
;
}
}
private
Wo
dataReady
(
String
activityToken
,
Optional
<
SignalStack
>
optional
)
{
if
(!
optional
.
isPresent
())
{
return
null
;
}
Wo
wo
=
new
Wo
();
optional
.
get
().
forEach
(
o
->
{
if
(((
null
!=
o
.
getManualExecute
())
||
(
null
!=
o
.
getSplitExecute
()))
&&
(!
StringUtils
.
equals
(
activityToken
,
o
.
getActivityToken
())))
{
wo
.
getSignalStack
().
add
(
o
);
}
});
if
(
wo
.
getSignalStack
().
isEmpty
())
{
return
null
;
}
else
{
return
wo
;
}
}
public
static
class
Wo
extends
ActionProcessingSignalWo
{
public
static
class
Wo
extends
ActionProcessingSignalWo
{
private
static
final
long
serialVersionUID
=
-
3206075665001702872L
;
private
static
final
long
serialVersionUID
=
-
3206075665001702872L
;
}
}
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/WorkAction.java
浏览文件 @
bb7df08b
...
@@ -110,7 +110,7 @@ public class WorkAction extends StandardJaxrsAction {
...
@@ -110,7 +110,7 @@ public class WorkAction extends StandardJaxrsAction {
@Path
(
"{id}/series/{series}/activitytoken/{activityToken}/processing/signal"
)
@Path
(
"{id}/series/{series}/activitytoken/{activityToken}/processing/signal"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
processing
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
public
void
processing
Signal
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"工作标识"
)
@PathParam
(
"id"
)
String
id
,
@JaxrsParameterDescribe
(
"工作标识"
)
@PathParam
(
"id"
)
String
id
,
@JaxrsParameterDescribe
(
"串号"
)
@PathParam
(
"series"
)
String
series
,
@JaxrsParameterDescribe
(
"串号"
)
@PathParam
(
"series"
)
String
series
,
@JaxrsParameterDescribe
(
"活动Token"
)
@PathParam
(
"activityToken"
)
String
activityToken
)
{
@JaxrsParameterDescribe
(
"活动Token"
)
@PathParam
(
"activityToken"
)
String
activityToken
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录