Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
e9115940
o2oa
项目概览
fuyue82
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
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,发现更多精彩内容 >>
提交
e9115940
编写于
8月 20, 2020
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加预计下一处理人接口
上级
3f548547
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
304 addition
and
7 deletion
+304
-7
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionWill.java
...ocessplatform/assemble/surface/jaxrs/task/ActionWill.java
+50
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/TaskAction.java
...ocessplatform/assemble/surface/jaxrs/task/TaskAction.java
+19
-2
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/task/WillWo.java
...rm/core/express/service/processing/jaxrs/task/WillWo.java
+93
-0
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/ActionWill.java
...essplatform/service/processing/jaxrs/task/ActionWill.java
+116
-0
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/TaskAction.java
...essplatform/service/processing/jaxrs/task/TaskAction.java
+19
-1
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/choice/ChoiceProcessor.java
.../service/processing/processor/choice/ChoiceProcessor.java
+3
-3
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/parallel/ParallelProcessor.java
...vice/processing/processor/parallel/ParallelProcessor.java
+3
-1
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/split/SplitProcessor.java
...rm/service/processing/processor/split/SplitProcessor.java
+1
-0
未找到文件。
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionWill.java
0 → 100644
浏览文件 @
e9115940
package
com.x.processplatform.assemble.surface.jaxrs.task
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.Applications
;
import
com.x.base.core.project.x_processplatform_service_processing
;
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.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
import
com.x.processplatform.core.entity.content.Task
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WillWo
;
class
ActionWill
extends
BaseAction
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ActionWill
.
class
);
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Business
business
=
new
Business
(
emc
);
Task
task
=
emc
.
find
(
id
,
Task
.
class
);
if
(
null
==
task
)
{
throw
new
ExceptionEntityNotExist
(
id
,
Task
.
class
);
}
if
(!
business
.
readable
(
effectivePerson
,
task
))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
,
task
);
}
Wo
wo
=
get
(
task
);
result
.
setData
(
wo
);
return
result
;
}
}
private
Wo
get
(
Task
task
)
throws
Exception
{
return
ThisApplication
.
context
().
applications
().
getQuery
(
x_processplatform_service_processing
.
class
,
Applications
.
joinQueryUri
(
"task"
,
task
.
getId
(),
"will"
),
task
.
getJob
()).
getData
(
Wo
.
class
);
}
public
static
class
Wo
extends
WillWo
{
private
static
final
long
serialVersionUID
=
2279846765261247910L
;
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/TaskAction.java
浏览文件 @
e9115940
...
...
@@ -388,6 +388,24 @@ public class TaskAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"预计下一活动处理状态及处理人."
,
action
=
ActionWill
.
class
)
@GET
@Path
(
"{id}/will"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
will
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"标识"
)
@PathParam
(
"id"
)
String
id
)
{
ActionResult
<
ActionWill
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionWill
().
execute
(
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"取得复合的待办."
,
action
=
ActionReference
.
class
)
@GET
@Path
(
"{id}/reference"
)
...
...
@@ -815,14 +833,13 @@ public class TaskAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"待办提醒,message类型:task_press."
,
action
=
ActionManagePress
.
class
)
@GET
@Path
(
"{id}/press/manage"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
managePress
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"标识"
)
@PathParam
(
"id"
)
String
id
)
{
@JaxrsParameterDescribe
(
"标识"
)
@PathParam
(
"id"
)
String
id
)
{
ActionResult
<
ActionManagePress
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
...
...
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/task/WillWo.java
0 → 100644
浏览文件 @
e9115940
package
com.x.processplatform.core.express.service.processing.jaxrs.task
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.x.base.core.project.gson.GsonPropertyObject
;
import
com.x.processplatform.core.entity.element.ActivityType
;
public
class
WillWo
extends
GsonPropertyObject
{
private
static
final
long
serialVersionUID
=
2279846765261247910L
;
private
String
defaultRouteName
;
private
Boolean
hasSole
;
private
ActivityType
nextActivityType
;
private
String
nextActivityName
;
private
String
nextActivityDescription
;
private
String
nextActivityAlias
;
private
Boolean
allowRapid
;
private
List
<
String
>
nextTaskIdentityList
=
new
ArrayList
<>();
public
String
getDefaultRouteName
()
{
return
defaultRouteName
;
}
public
void
setDefaultRouteName
(
String
defaultRouteName
)
{
this
.
defaultRouteName
=
defaultRouteName
;
}
public
List
<
String
>
getNextTaskIdentityList
()
{
return
nextTaskIdentityList
;
}
public
void
setNextTaskIdentityList
(
List
<
String
>
nextTaskIdentityList
)
{
this
.
nextTaskIdentityList
=
nextTaskIdentityList
;
}
public
Boolean
getAllowRapid
()
{
return
allowRapid
;
}
public
void
setAllowRapid
(
Boolean
allowRapid
)
{
this
.
allowRapid
=
allowRapid
;
}
public
ActivityType
getNextActivityType
()
{
return
nextActivityType
;
}
public
void
setNextActivityType
(
ActivityType
nextActivityType
)
{
this
.
nextActivityType
=
nextActivityType
;
}
public
Boolean
getHasSole
()
{
return
hasSole
;
}
public
void
setHasSole
(
Boolean
hasSole
)
{
this
.
hasSole
=
hasSole
;
}
public
String
getNextActivityName
()
{
return
nextActivityName
;
}
public
void
setNextActivityName
(
String
nextActivityName
)
{
this
.
nextActivityName
=
nextActivityName
;
}
public
String
getNextActivityDescription
()
{
return
nextActivityDescription
;
}
public
void
setNextActivityDescription
(
String
nextActivityDescription
)
{
this
.
nextActivityDescription
=
nextActivityDescription
;
}
public
String
getNextActivityAlias
()
{
return
nextActivityAlias
;
}
public
void
setNextActivityAlias
(
String
nextActivityAlias
)
{
this
.
nextActivityAlias
=
nextActivityAlias
;
}
}
\ No newline at end of file
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/ActionWill.java
0 → 100644
浏览文件 @
e9115940
package
com.x.processplatform.service.processing.jaxrs.task
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.util.concurrent.Callable
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.executor.ProcessPlatformExecutorFactory
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.content.Task
;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.entity.element.Activity
;
import
com.x.processplatform.core.entity.element.ActivityType
;
import
com.x.processplatform.core.entity.element.Manual
;
import
com.x.processplatform.core.entity.element.Route
;
import
com.x.processplatform.core.express.ProcessingAttributes
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WillWo
;
import
com.x.processplatform.service.processing.Business
;
import
com.x.processplatform.service.processing.configurator.ProcessingConfigurator
;
import
com.x.processplatform.service.processing.processor.AeiObjects
;
import
com.x.processplatform.service.processing.processor.manual.TaskIdentities
;
import
com.x.processplatform.service.processing.processor.manual.TranslateTaskIdentityTools
;
class
ActionWill
extends
BaseAction
{
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
)
throws
Exception
{
String
executorSeed
=
null
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Task
task
=
emc
.
fetch
(
id
,
Task
.
class
,
ListTools
.
toList
(
Task
.
job_FIELDNAME
));
if
(
null
==
task
)
{
throw
new
ExceptionEntityNotExist
(
id
,
Task
.
class
);
}
executorSeed
=
task
.
getJob
();
}
return
ProcessPlatformExecutorFactory
.
get
(
executorSeed
).
submit
(
new
CallableImpl
(
id
)).
get
();
}
private
class
CallableImpl
implements
Callable
<
ActionResult
<
Wo
>>
{
private
String
id
;
private
CallableImpl
(
String
id
)
{
this
.
id
=
id
;
}
public
ActionResult
<
Wo
>
call
()
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
Wo
wo
=
new
Wo
();
Task
task
=
emc
.
find
(
id
,
Task
.
class
);
Work
work
=
emc
.
find
(
task
.
getWork
(),
Work
.
class
);
if
(
null
==
work
)
{
throw
new
ExceptionEntityNotExist
(
task
.
getWork
(),
Work
.
class
);
}
Manual
manual
=
(
Manual
)
business
.
element
().
get
(
work
.
getActivity
(),
ActivityType
.
manual
);
if
(
null
==
manual
)
{
throw
new
ExceptionEntityNotExist
(
work
.
getActivity
(),
Manual
.
class
);
}
if
(
BooleanUtils
.
isTrue
(
manual
.
getAllowRapid
()))
{
wo
.
setAllowRapid
(
true
);
}
List
<
Route
>
routes
=
business
.
element
().
listRouteWithManual
(
manual
.
getId
());
Route
route
=
null
;
if
(
routes
.
size
()
==
1
)
{
route
=
routes
.
get
(
0
);
}
else
{
Optional
<
Route
>
optional
=
routes
.
stream
().
filter
(
o
->
BooleanUtils
.
isTrue
(
o
.
getSole
()))
.
findFirst
();
if
(
optional
.
isPresent
())
{
route
=
optional
.
get
();
wo
.
setHasSole
(
route
.
getSole
());
}
}
if
(
null
!=
route
)
{
wo
.
setDefaultRouteName
(
route
.
getName
());
wo
.
setNextActivityType
(
route
.
getActivityType
());
Activity
nextActivity
=
business
.
element
().
getActivity
(
route
.
getActivity
());
if
(
null
!=
nextActivity
)
{
wo
.
setNextActivityName
(
nextActivity
.
getName
());
wo
.
setNextActivityAlias
(
nextActivity
.
getAlias
());
wo
.
setNextActivityDescription
(
nextActivity
.
getDescription
());
if
(
Objects
.
equals
(
ActivityType
.
manual
,
nextActivity
.
getActivityType
()))
{
Manual
nextManual
=
(
Manual
)
nextActivity
;
AeiObjects
aeiObjects
=
new
AeiObjects
(
business
,
work
,
nextManual
,
new
ProcessingConfigurator
(),
new
ProcessingAttributes
());
TaskIdentities
taskIdentities
=
TranslateTaskIdentityTools
.
translate
(
aeiObjects
,
nextManual
);
wo
.
setNextTaskIdentityList
(
taskIdentities
.
identities
());
}
}
}
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
result
.
setData
(
wo
);
return
result
;
}
}
}
public
static
class
Wo
extends
WillWo
{
private
static
final
long
serialVersionUID
=
663543271322651720L
;
}
}
\ No newline at end of file
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/TaskAction.java
浏览文件 @
e9115940
...
...
@@ -85,6 +85,24 @@ public class TaskAction extends StandardJaxrsAction {
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"预计下一活动处理状态及处理人."
,
action
=
ActionWill
.
class
)
@GET
@Path
(
"{id}/will"
)
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
will
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"标识"
)
@PathParam
(
"id"
)
String
id
)
{
ActionResult
<
ActionWill
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
result
=
new
ActionWill
().
execute
(
effectivePerson
,
id
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
,
effectivePerson
,
request
,
null
);
result
.
error
(
e
);
}
asyncResponse
.
resume
(
ResponseFactory
.
getEntityTagActionResultResponse
(
request
,
result
));
}
@JaxrsMethodDescribe
(
value
=
"删除待办."
,
action
=
ActionDelete
.
class
)
@DELETE
@Path
(
"{id}"
)
...
...
@@ -217,7 +235,7 @@ public class TaskAction extends StandardJaxrsAction {
@Produces
(
HttpMediaType
.
APPLICATION_JSON_UTF_8
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
public
void
press
(
@Suspended
final
AsyncResponse
asyncResponse
,
@Context
HttpServletRequest
request
,
@JaxrsParameterDescribe
(
"标识"
)
@PathParam
(
"id"
)
String
id
)
{
@JaxrsParameterDescribe
(
"标识"
)
@PathParam
(
"id"
)
String
id
)
{
ActionResult
<
ActionPress
.
Wo
>
result
=
new
ActionResult
<>();
EffectivePerson
effectivePerson
=
this
.
effectivePerson
(
request
);
try
{
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/choice/ChoiceProcessor.java
浏览文件 @
e9115940
...
...
@@ -34,7 +34,7 @@ public class ChoiceProcessor extends AbstractChoiceProcessor {
@Override
protected
void
arrivingCommitted
(
AeiObjects
aeiObjects
,
Choice
choice
)
throws
Exception
{
//nothing
}
@Override
...
...
@@ -46,7 +46,7 @@ public class ChoiceProcessor extends AbstractChoiceProcessor {
@Override
protected
void
executingCommitted
(
AeiObjects
aeiObjects
,
Choice
choice
)
throws
Exception
{
//nothing
}
@Override
...
...
@@ -73,6 +73,6 @@ public class ChoiceProcessor extends AbstractChoiceProcessor {
@Override
protected
void
inquiringCommitted
(
AeiObjects
aeiObjects
,
Choice
choice
)
throws
Exception
{
// nothing
}
}
\ No newline at end of file
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/parallel/ParallelProcessor.java
浏览文件 @
e9115940
...
...
@@ -41,7 +41,7 @@ public class ParallelProcessor extends AbstractParallelProcessor {
@Override
protected
void
arrivingCommitted
(
AeiObjects
aeiObjects
,
Parallel
parallel
)
throws
Exception
{
//nothing
}
@Override
...
...
@@ -102,6 +102,7 @@ public class ParallelProcessor extends AbstractParallelProcessor {
@Override
protected
void
executingCommitted
(
AeiObjects
aeiObjects
,
Parallel
parallel
)
throws
Exception
{
//nothing
}
@Override
...
...
@@ -124,5 +125,6 @@ public class ParallelProcessor extends AbstractParallelProcessor {
@Override
protected
void
inquiringCommitted
(
AeiObjects
aeiObjects
,
Parallel
parallel
)
throws
Exception
{
//nothing
}
}
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/split/SplitProcessor.java
浏览文件 @
e9115940
...
...
@@ -33,6 +33,7 @@ public class SplitProcessor extends AbstractSplitProcessor {
@Override
protected
void
arrivingCommitted
(
AeiObjects
aeiObjects
,
Split
split
)
throws
Exception
{
// nothing
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录