Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
54df2ce6
o2oa
项目概览
weixin_42566577
/
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,发现更多精彩内容 >>
提交
54df2ce6
编写于
5月 31, 2022
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加addManualTaskIdentityMatrix返回
上级
9fd288b5
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
220 addition
and
116 deletion
+220
-116
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/RecordBuilder.java
...com/x/processplatform/assemble/surface/RecordBuilder.java
+38
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessing.java
...latform/assemble/surface/jaxrs/task/ActionProcessing.java
+5
-47
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ExceptionEmptyOption.java
...orm/assemble/surface/jaxrs/task/ExceptionEmptyOption.java
+13
-0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/V2Add.java
.../x/processplatform/assemble/surface/jaxrs/task/V2Add.java
+87
-43
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/V2Reset.java
.../processplatform/assemble/surface/jaxrs/task/V2Reset.java
+26
-11
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2AddManualTaskIdentityMatrix.java
...ble/surface/jaxrs/work/V2AddManualTaskIdentityMatrix.java
+25
-10
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/work/V2AddManualTaskIdentityMatrixWo.java
...rocessing/jaxrs/work/V2AddManualTaskIdentityMatrixWo.java
+20
-0
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2AddManualTaskIdentityMatrix.java
.../processing/jaxrs/work/V2AddManualTaskIdentityMatrix.java
+6
-5
未找到文件。
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/RecordBuilder.java
浏览文件 @
54df2ce6
...
@@ -17,6 +17,7 @@ import com.x.base.core.project.x_processplatform_service_processing;
...
@@ -17,6 +17,7 @@ import com.x.base.core.project.x_processplatform_service_processing;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.processplatform.assemble.surface.jaxrs.task.ExceptionWorkProcessing
;
import
com.x.processplatform.core.entity.content.Record
;
import
com.x.processplatform.core.entity.content.Record
;
import
com.x.processplatform.core.entity.content.RecordProperties.NextManual
;
import
com.x.processplatform.core.entity.content.RecordProperties.NextManual
;
import
com.x.processplatform.core.entity.content.Task
;
import
com.x.processplatform.core.entity.content.Task
;
...
@@ -134,6 +135,43 @@ public class RecordBuilder {
...
@@ -134,6 +135,43 @@ public class RecordBuilder {
rec
.
getProperties
().
setNextManualTaskIdentityList
(
new
ArrayList
<>(
identities
));
rec
.
getProperties
().
setNextManualTaskIdentityList
(
new
ArrayList
<>(
identities
));
}
}
public
static
Record
ofTaskEmpower
(
Task
task
,
String
empowerFromIdentity
,
String
empowerFromPerson
,
String
empowerFromUnit
)
{
Record
o
=
new
Record
();
o
.
setType
(
Record
.
TYPE_EMPOWER
);
o
.
setApplication
(
task
.
getApplication
());
o
.
setProcess
(
task
.
getProcess
());
o
.
setJob
(
task
.
getJob
());
o
.
setCompleted
(
false
);
o
.
setWork
(
task
.
getWork
());
o
.
setFromActivity
(
task
.
getActivity
());
o
.
setFromActivityAlias
(
task
.
getActivityAlias
());
o
.
setFromActivityName
(
task
.
getActivityName
());
o
.
setFromActivityToken
(
task
.
getActivityToken
());
o
.
setFromActivityType
(
task
.
getActivityType
());
o
.
setArrivedActivity
(
task
.
getActivity
());
o
.
setArrivedActivityAlias
(
task
.
getActivityAlias
());
o
.
setArrivedActivityName
(
task
.
getActivityName
());
o
.
setArrivedActivityToken
(
task
.
getActivityToken
());
o
.
setArrivedActivityType
(
task
.
getActivityType
());
o
.
getProperties
().
setEmpowerToPerson
(
task
.
getPerson
());
o
.
getProperties
().
setEmpowerToIdentity
(
task
.
getIdentity
());
o
.
getProperties
().
setEmpowerToUnit
(
task
.
getUnit
());
o
.
setIdentity
(
task
.
getEmpowerFromIdentity
());
o
.
setPerson
(
empowerFromPerson
);
o
.
setUnit
(
empowerFromUnit
);
o
.
getProperties
().
setElapsed
(
0L
);
NextManual
nextManual
=
new
NextManual
();
nextManual
.
setActivity
(
task
.
getActivity
());
nextManual
.
setActivityAlias
(
task
.
getActivityAlias
());
nextManual
.
setActivityName
(
task
.
getActivityName
());
nextManual
.
setActivityToken
(
task
.
getActivityToken
());
nextManual
.
setActivityType
(
task
.
getActivityType
());
o
.
getProperties
().
getNextManualList
().
add
(
nextManual
);
o
.
getProperties
().
getNextManualTaskIdentityList
().
add
(
task
.
getIdentity
());
return
o
;
}
public
static
String
processing
(
Record
r
)
throws
Exception
{
public
static
String
processing
(
Record
r
)
throws
Exception
{
WoId
resp
=
ThisApplication
.
context
().
applications
()
WoId
resp
=
ThisApplication
.
context
().
applications
()
.
postQuery
(
false
,
x_processplatform_service_processing
.
class
,
.
postQuery
(
false
,
x_processplatform_service_processing
.
class
,
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessing.java
浏览文件 @
54df2ce6
...
@@ -30,6 +30,7 @@ import com.x.base.core.project.logger.LoggerFactory;
...
@@ -30,6 +30,7 @@ import com.x.base.core.project.logger.LoggerFactory;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.base.core.project.tools.StringTools
;
import
com.x.base.core.project.tools.StringTools
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.RecordBuilder
;
import
com.x.processplatform.assemble.surface.TaskBuilder
;
import
com.x.processplatform.assemble.surface.TaskBuilder
;
import
com.x.processplatform.assemble.surface.TaskCompletedBuilder
;
import
com.x.processplatform.assemble.surface.TaskCompletedBuilder
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
...
@@ -442,61 +443,18 @@ class ActionProcessing extends BaseAction {
...
@@ -442,61 +443,18 @@ class ActionProcessing extends BaseAction {
}
}
if
(!
empowerTasks
.
isEmpty
())
{
if
(!
empowerTasks
.
isEmpty
())
{
List
<
Record
>
empowerRecords
=
new
ArrayList
<>();
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
Business
business
=
new
Business
(
emc
);
for
(
Task
o
:
empowerTasks
)
{
for
(
Task
o
:
empowerTasks
)
{
empowerRecords
.
add
(
createEmpowerRecord
(
business
,
o
));
Record
r
=
RecordBuilder
.
ofTaskEmpower
(
o
,
task
.
getEmpowerFromIdentity
(),
}
business
.
organization
().
person
().
getWithIdentity
(
task
.
getEmpowerFromIdentity
()),
}
business
.
organization
().
unit
().
getWithIdentity
(
task
.
getEmpowerFromIdentity
()));
for
(
Record
r
:
empowerRecords
)
{
RecordBuilder
.
processing
(
r
);
WoId
resp
=
ThisApplication
.
context
().
applications
()
.
postQuery
(
effectivePerson
.
getDebugger
(),
x_processplatform_service_processing
.
class
,
Applications
.
joinQueryUri
(
"record"
,
"job"
,
this
.
work
.
getJob
()),
r
,
this
.
task
.
getJob
())
.
getData
(
WoId
.
class
);
if
(
StringUtils
.
isBlank
(
resp
.
getId
()))
{
throw
new
ExceptionWorkProcessing
(
this
.
work
.
getId
());
}
}
}
}
}
}
}
}
private
Record
createEmpowerRecord
(
Business
business
,
Task
task
)
throws
Exception
{
Record
o
=
new
Record
();
o
.
setType
(
Record
.
TYPE_EMPOWER
);
o
.
setApplication
(
task
.
getApplication
());
o
.
setProcess
(
task
.
getProcess
());
o
.
setJob
(
task
.
getJob
());
o
.
setCompleted
(
false
);
o
.
setWork
(
task
.
getWork
());
o
.
setFromActivity
(
task
.
getActivity
());
o
.
setFromActivityAlias
(
task
.
getActivityAlias
());
o
.
setFromActivityName
(
task
.
getActivityName
());
o
.
setFromActivityToken
(
task
.
getActivityToken
());
o
.
setFromActivityType
(
task
.
getActivityType
());
o
.
setArrivedActivity
(
task
.
getActivity
());
o
.
setArrivedActivityAlias
(
task
.
getActivityAlias
());
o
.
setArrivedActivityName
(
task
.
getActivityName
());
o
.
setArrivedActivityToken
(
task
.
getActivityToken
());
o
.
setArrivedActivityType
(
task
.
getActivityType
());
o
.
getProperties
().
setEmpowerToPerson
(
task
.
getPerson
());
o
.
getProperties
().
setEmpowerToIdentity
(
task
.
getIdentity
());
o
.
getProperties
().
setEmpowerToUnit
(
task
.
getUnit
());
o
.
setIdentity
(
task
.
getEmpowerFromIdentity
());
o
.
setPerson
(
business
.
organization
().
person
().
getWithIdentity
(
o
.
getIdentity
()));
o
.
setUnit
(
business
.
organization
().
unit
().
getWithIdentity
(
o
.
getIdentity
()));
o
.
getProperties
().
setElapsed
(
0L
);
NextManual
nextManual
=
new
NextManual
();
nextManual
.
setActivity
(
task
.
getActivity
());
nextManual
.
setActivityAlias
(
task
.
getActivityAlias
());
nextManual
.
setActivityName
(
task
.
getActivityName
());
nextManual
.
setActivityToken
(
task
.
getActivityToken
());
nextManual
.
setActivityType
(
task
.
getActivityType
());
o
.
getProperties
().
getNextManualList
().
add
(
nextManual
);
o
.
getProperties
().
getNextManualTaskIdentityList
().
add
(
task
.
getIdentity
());
return
o
;
}
public
static
class
Wo
extends
ProcessingWo
{
public
static
class
Wo
extends
ProcessingWo
{
private
static
final
long
serialVersionUID
=
-
1771383649634969945L
;
private
static
final
long
serialVersionUID
=
-
1771383649634969945L
;
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ExceptionEmptyOption.java
0 → 100644
浏览文件 @
54df2ce6
package
com.x.processplatform.assemble.surface.jaxrs.task
;
import
com.x.base.core.project.exception.LanguagePromptException
;
class
ExceptionEmptyOption
extends
LanguagePromptException
{
private
static
final
long
serialVersionUID
=
-
5515077418025884395L
;
ExceptionEmptyOption
()
{
super
(
"otpion empty."
);
}
}
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/V2Add.java
浏览文件 @
54df2ce6
...
@@ -2,7 +2,9 @@ package com.x.processplatform.assemble.surface.jaxrs.task;
...
@@ -2,7 +2,9 @@ package com.x.processplatform.assemble.surface.jaxrs.task;
import
java.lang.reflect.InvocationTargetException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Optional
;
import
org.apache.commons.collections4.ListUtils
;
import
org.apache.commons.collections4.ListUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
...
@@ -22,13 +24,14 @@ import com.x.base.core.project.exception.ExceptionEntityNotExist;
...
@@ -22,13 +24,14 @@ import com.x.base.core.project.exception.ExceptionEntityNotExist;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.base.core.project.jaxrs.WrapBoolean
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.
tools.ListTools
;
import
com.x.base.core.project.
processplatform.ManualTaskIdentityMatrix
;
import
com.x.base.core.project.tools.StringTools
;
import
com.x.base.core.project.tools.StringTools
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.RecordBuilder
;
import
com.x.processplatform.assemble.surface.RecordBuilder
;
import
com.x.processplatform.assemble.surface.TaskBuilder
;
import
com.x.processplatform.assemble.surface.TaskCompletedBuilder
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
import
com.x.processplatform.assemble.surface.ThisApplication
;
import
com.x.processplatform.assemble.surface.WorkControl
;
import
com.x.processplatform.assemble.surface.WorkControl
;
import
com.x.processplatform.core.entity.content.Record
;
import
com.x.processplatform.core.entity.content.Record
;
...
@@ -40,9 +43,9 @@ import com.x.processplatform.core.express.ProcessingAttributes;
...
@@ -40,9 +43,9 @@ import com.x.processplatform.core.express.ProcessingAttributes;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.ProcessingWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.ProcessingWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.V2AddWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.V2AddWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.V2EditWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.V2EditWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapUpdatePrevTaskIdentity
;
import
com.x.processplatform.core.express.service.processing.jaxrs.taskcompleted.WrapUpdateNextTaskIdentity
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWi.Option
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWo
;
public
class
V2Add
extends
BaseAction
{
public
class
V2Add
extends
BaseAction
{
...
@@ -65,13 +68,17 @@ public class V2Add extends BaseAction {
...
@@ -65,13 +68,17 @@ public class V2Add extends BaseAction {
private
WorkLog
workLog
=
null
;
private
WorkLog
workLog
=
null
;
// 本环节创建的record
// 本环节创建的record
private
Record
rec
=
null
;
private
Record
rec
=
null
;
// 执行前已经存在的已办
private
List
<
TaskCompleted
>
taskCompleteds
;
// 返回的ManualTaskIdentityMatrix
private
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
;
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
JsonElement
jsonElement
)
throws
Exception
{
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
JsonElement
jsonElement
)
throws
Exception
{
if
(
LOGGER
.
isDebugEnabled
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"execute:{}."
,
effectivePerson:
:
getDistinguishedName
);
LOGGER
.
debug
(
"execute:{}."
,
effectivePerson:
:
getDistinguishedName
);
}
}
this
.
init
(
effectivePerson
,
id
,
jsonElement
);
this
.
init
(
effectivePerson
,
id
,
jsonElement
);
this
.
add
(
this
.
task
,
wi
.
getOptionList
(),
wi
.
getRemove
());
this
.
manualTaskIdentityMatrix
=
this
.
add
(
this
.
task
,
wi
.
getOptionList
(),
wi
.
getRemove
());
if
(
BooleanUtils
.
isTrue
(
wi
.
getRemove
()))
{
if
(
BooleanUtils
.
isTrue
(
wi
.
getRemove
()))
{
taskCompletedId
=
this
.
processingTask
(
this
.
task
);
taskCompletedId
=
this
.
processingTask
(
this
.
task
);
}
}
...
@@ -91,9 +98,10 @@ public class V2Add extends BaseAction {
...
@@ -91,9 +98,10 @@ public class V2Add extends BaseAction {
RecordBuilder
.
processing
(
rec
);
RecordBuilder
.
processing
(
rec
);
if
(
StringUtils
.
isNotEmpty
(
taskCompletedId
))
{
if
(
StringUtils
.
isNotEmpty
(
taskCompletedId
))
{
this
.
updateTaskCompleted
();
TaskCompletedBuilder
.
updateNextTaskIdentity
(
this
.
taskCompletedId
,
rec
.
getProperties
().
getNextManualTaskIdentityList
(),
task
.
getJob
());
}
}
this
.
updateTask
(
);
TaskBuilder
.
updatePrevTaskIdentity
(
this
.
newTaskIds
,
this
.
taskCompleteds
,
this
.
task
);
return
result
();
return
result
();
}
}
...
@@ -112,14 +120,13 @@ public class V2Add extends BaseAction {
...
@@ -112,14 +120,13 @@ public class V2Add extends BaseAction {
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
Business
business
=
new
Business
(
emc
);
this
.
effectivePerson
=
effectivePerson
;
this
.
effectivePerson
=
effectivePerson
;
this
.
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
this
.
task
=
emc
.
find
(
id
,
Task
.
class
);
this
.
task
=
emc
.
find
(
id
,
Task
.
class
);
if
(
null
==
task
)
{
if
(
null
==
task
)
{
throw
new
ExceptionEntityNotExist
(
id
,
Task
.
class
);
throw
new
ExceptionEntityNotExist
(
id
,
Task
.
class
);
}
}
if
(
emc
.
countEqual
(
Work
.
class
,
JpaObject
.
id_FIELDNAME
,
task
.
getWork
())
<
1
)
{
this
.
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
throw
new
ExceptionEntityNotExist
(
task
.
getWork
(),
Work
.
class
);
this
.
initFilterOptionIdentities
(
business
,
wi
,
task
.
getWork
()
);
}
this
.
initCheckOptionIdentities
(
wi
);
this
.
workLog
=
emc
.
firstEqualAndEqual
(
WorkLog
.
class
,
WorkLog
.
job_FIELDNAME
,
task
.
getJob
(),
this
.
workLog
=
emc
.
firstEqualAndEqual
(
WorkLog
.
class
,
WorkLog
.
job_FIELDNAME
,
task
.
getJob
(),
WorkLog
.
fromActivityToken_FIELDNAME
,
task
.
getActivityToken
());
WorkLog
.
fromActivityToken_FIELDNAME
,
task
.
getActivityToken
());
if
(
null
==
workLog
)
{
if
(
null
==
workLog
)
{
...
@@ -131,21 +138,47 @@ public class V2Add extends BaseAction {
...
@@ -131,21 +138,47 @@ public class V2Add extends BaseAction {
}
}
this
.
existTaskIds
=
emc
.
idsEqualAndEqual
(
Task
.
class
,
Task
.
job_FIELDNAME
,
task
.
getJob
(),
Task
.
work_FIELDNAME
,
this
.
existTaskIds
=
emc
.
idsEqualAndEqual
(
Task
.
class
,
Task
.
job_FIELDNAME
,
task
.
getJob
(),
Task
.
work_FIELDNAME
,
task
.
getWork
());
task
.
getWork
());
this
.
taskCompleteds
=
business
.
entityManagerContainer
().
listEqual
(
TaskCompleted
.
class
,
TaskCompleted
.
activityToken_FIELDNAME
,
task
.
getActivityToken
());
}
}
private
void
initFilterOptionIdentities
(
Business
business
,
Wi
wi
,
String
workId
)
throws
Exception
{
Work
work
=
business
.
entityManagerContainer
().
find
(
workId
,
Work
.
class
);
if
(
null
==
work
)
{
throw
new
ExceptionEntityNotExist
(
workId
,
Task
.
class
);
}
List
<
String
>
identities
=
work
.
getManualTaskIdentityMatrix
().
flat
();
for
(
Option
option
:
wi
.
getOptionList
())
{
Iterator
<
String
>
iterator
=
option
.
getIdentityList
().
iterator
();
while
(
iterator
.
hasNext
())
{
if
(
identities
.
contains
(
iterator
.
next
()))
{
iterator
.
remove
();
}
}
}
}
private
void
initCheckOptionIdentities
(
Wi
wi
)
throws
Exception
{
Optional
<
List
<
String
>>
optional
=
wi
.
getOptionList
().
stream
().
map
(
Option:
:
getIdentityList
)
.
filter
(
o
->
!
o
.
isEmpty
()).
findAny
();
if
(
optional
.
isEmpty
())
{
throw
new
ExceptionEmptyOption
();
}
}
}
}
private
void
add
(
Task
task
,
List
<
V2AddManualTaskIdentityMatrixWi
.
Option
>
options
,
Boolean
remove
)
throws
Exception
{
private
ManualTaskIdentityMatrix
add
(
Task
task
,
List
<
V2AddManualTaskIdentityMatrixWi
.
Option
>
options
,
Boolean
remove
)
throws
Exception
{
V2AddManualTaskIdentityMatrixWi
req
=
new
V2AddManualTaskIdentityMatrixWi
();
V2AddManualTaskIdentityMatrixWi
req
=
new
V2AddManualTaskIdentityMatrixWi
();
req
.
setIdentity
(
task
.
getIdentity
());
req
.
setIdentity
(
task
.
getIdentity
());
req
.
setOptionList
(
options
);
req
.
setOptionList
(
options
);
req
.
setRemove
(
remove
);
req
.
setRemove
(
remove
);
WrapBoolean
resp
=
ThisApplication
.
context
().
applications
()
return
ThisApplication
.
context
().
applications
()
.
postQuery
(
x_processplatform_service_processing
.
class
,
Applications
.
joinQueryUri
(
"work"
,
"v2"
,
.
postQuery
(
x_processplatform_service_processing
.
class
,
task
.
getWork
(),
"add"
,
"manual"
,
"task"
,
"identity"
,
"matrix"
),
req
,
task
.
getJob
())
Applications
.
joinQueryUri
(
"work"
,
"v2"
,
task
.
getWork
(),
"add"
,
"manual"
,
"task"
,
"identity"
,
.
getData
(
WrapBoolean
.
class
);
"matrix"
),
if
(
BooleanUtils
.
isNotTrue
(
resp
.
getValue
()))
{
req
,
task
.
getJob
())
throw
new
ExceptionAdd
(
task
.
getId
());
.
getData
(
V2AddManualTaskIdentityMatrixWo
.
class
).
getManualTaskIdentityMatrix
();
}
}
}
private
String
processingTask
(
Task
task
)
throws
Exception
{
private
String
processingTask
(
Task
task
)
throws
Exception
{
...
@@ -175,35 +208,36 @@ public class V2Add extends BaseAction {
...
@@ -175,35 +208,36 @@ public class V2Add extends BaseAction {
}
}
}
}
private
void
updateTaskCompleted
()
throws
Exception
{
//
private void updateTaskCompleted() throws Exception {
// 记录下一处理人信息
//
// 记录下一处理人信息
WrapUpdateNextTaskIdentity
req
=
new
WrapUpdateNextTaskIdentity
();
//
WrapUpdateNextTaskIdentity req = new WrapUpdateNextTaskIdentity();
req
.
getTaskCompletedList
().
add
(
this
.
taskCompletedId
);
//
req.getTaskCompletedList().add(this.taskCompletedId);
req
.
setNextTaskIdentityList
(
rec
.
getProperties
().
getNextManualTaskIdentityList
());
//
req.setNextTaskIdentityList(rec.getProperties().getNextManualTaskIdentityList());
ThisApplication
.
context
().
applications
()
//
ThisApplication.context().applications()
.
putQuery
(
effectivePerson
.
getDebugger
(),
x_processplatform_service_processing
.
class
,
//
.putQuery(effectivePerson.getDebugger(), x_processplatform_service_processing.class,
Applications
.
joinQueryUri
(
"taskcompleted"
,
"next"
,
"task"
,
"identity"
),
req
,
task
.
getJob
())
//
Applications.joinQueryUri("taskcompleted", "next", "task", "identity"), req, task.getJob())
.
getData
(
WrapBoolean
.
class
);
//
.getData(WrapBoolean.class);
}
//
}
//
private
void
updateTask
()
throws
Exception
{
//
private void updateTask() throws Exception {
// 记录上一处理人信息
//
// 记录上一处理人信息
if
(
ListTools
.
isNotEmpty
(
this
.
newTaskIds
))
{
//
if (ListTools.isNotEmpty(this.newTaskIds)) {
WrapUpdatePrevTaskIdentity
req
=
new
WrapUpdatePrevTaskIdentity
();
//
WrapUpdatePrevTaskIdentity req = new WrapUpdatePrevTaskIdentity();
req
.
setTaskList
(
this
.
newTaskIds
);
//
req.setTaskList(this.newTaskIds);
req
.
setPrevTaskIdentity
(
task
.
getIdentity
());
//
req.setPrevTaskIdentity(task.getIdentity());
req
.
getPrevTaskIdentityList
().
add
(
task
.
getIdentity
());
//
req.getPrevTaskIdentityList().add(task.getIdentity());
ThisApplication
.
context
().
applications
()
//
ThisApplication.context().applications()
.
putQuery
(
effectivePerson
.
getDebugger
(),
x_processplatform_service_processing
.
class
,
//
.putQuery(effectivePerson.getDebugger(), x_processplatform_service_processing.class,
Applications
.
joinQueryUri
(
"task"
,
"prev"
,
"task"
,
"identity"
),
req
,
task
.
getJob
())
//
Applications.joinQueryUri("task", "prev", "task", "identity"), req, task.getJob())
.
getData
(
WrapBoolean
.
class
);
//
.getData(WrapBoolean.class);
}
//
}
}
//
}
private
ActionResult
<
Wo
>
result
()
throws
InstantiationException
,
IllegalAccessException
,
IllegalArgumentException
,
private
ActionResult
<
Wo
>
result
()
throws
InstantiationException
,
IllegalAccessException
,
IllegalArgumentException
,
InvocationTargetException
,
NoSuchMethodException
,
SecurityException
{
InvocationTargetException
,
NoSuchMethodException
,
SecurityException
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Wo
wo
=
Wo
.
copier
.
copy
(
this
.
rec
);
Wo
wo
=
Wo
.
copier
.
copy
(
this
.
rec
);
wo
.
setManualTaskIdentityMatrix
(
this
.
manualTaskIdentityMatrix
);
result
.
setData
(
wo
);
result
.
setData
(
wo
);
return
result
;
return
result
;
}
}
...
@@ -249,6 +283,16 @@ public class V2Add extends BaseAction {
...
@@ -249,6 +283,16 @@ public class V2Add extends BaseAction {
static
WrapCopier
<
Record
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
Record
.
class
,
Wo
.
class
,
null
,
static
WrapCopier
<
Record
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
Record
.
class
,
Wo
.
class
,
null
,
JpaObject
.
FieldsInvisible
);
JpaObject
.
FieldsInvisible
);
private
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
;
public
ManualTaskIdentityMatrix
getManualTaskIdentityMatrix
()
{
return
manualTaskIdentityMatrix
;
}
public
void
setManualTaskIdentityMatrix
(
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
)
{
this
.
manualTaskIdentityMatrix
=
manualTaskIdentityMatrix
;
}
}
}
}
}
\ No newline at end of file
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/V2Reset.java
浏览文件 @
54df2ce6
...
@@ -20,7 +20,6 @@ import com.x.base.core.project.exception.ExceptionEntityNotExist;
...
@@ -20,7 +20,6 @@ import com.x.base.core.project.exception.ExceptionEntityNotExist;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.base.core.project.jaxrs.WrapBoolean
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.processplatform.ManualTaskIdentityMatrix
;
import
com.x.base.core.project.processplatform.ManualTaskIdentityMatrix
;
...
@@ -45,6 +44,7 @@ import com.x.processplatform.core.express.service.processing.jaxrs.task.Processi
...
@@ -45,6 +44,7 @@ import com.x.processplatform.core.express.service.processing.jaxrs.task.Processi
import
com.x.processplatform.core.express.service.processing.jaxrs.task.V2EditWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.V2EditWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.V2ResetWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.V2ResetWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWo
;
public
class
V2Reset
extends
BaseAction
{
public
class
V2Reset
extends
BaseAction
{
...
@@ -66,10 +66,11 @@ public class V2Reset extends BaseAction {
...
@@ -66,10 +66,11 @@ public class V2Reset extends BaseAction {
private
String
taskCompletedId
;
private
String
taskCompletedId
;
private
Wi
wi
;
private
Wi
wi
;
private
EffectivePerson
effectivePerson
;
private
EffectivePerson
effectivePerson
;
// 返回的ManualTaskIdentityMatrix
private
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
;
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
JsonElement
jsonElement
)
throws
Exception
{
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
JsonElement
jsonElement
)
throws
Exception
{
LOGGER
.
debug
(
"execute:{}."
,
effectivePerson:
:
getDistinguishedName
);
LOGGER
.
debug
(
"execute:{}."
,
effectivePerson:
:
getDistinguishedName
);
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
this
.
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
this
.
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
this
.
effectivePerson
=
effectivePerson
;
this
.
effectivePerson
=
effectivePerson
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
...
@@ -85,7 +86,7 @@ public class V2Reset extends BaseAction {
...
@@ -85,7 +86,7 @@ public class V2Reset extends BaseAction {
}
}
this
.
reset
(
this
.
task
,
(!
wi
.
getKeep
()),
identities
,
manual
);
this
.
manualTaskIdentityMatrix
=
reset
(
this
.
task
,
(!
wi
.
getKeep
()),
identities
,
manual
);
if
(
StringUtils
.
isNotEmpty
(
wi
.
getOpinion
())
||
StringUtils
.
isNotEmpty
(
wi
.
getRouteName
()))
{
if
(
StringUtils
.
isNotEmpty
(
wi
.
getOpinion
())
||
StringUtils
.
isNotEmpty
(
wi
.
getRouteName
()))
{
updateTask
(
wi
.
getOpinion
(),
wi
.
getRouteName
());
updateTask
(
wi
.
getOpinion
(),
wi
.
getRouteName
());
...
@@ -114,7 +115,9 @@ public class V2Reset extends BaseAction {
...
@@ -114,7 +115,9 @@ public class V2Reset extends BaseAction {
if
(!
taskCompleteds
.
isEmpty
())
{
if
(!
taskCompleteds
.
isEmpty
())
{
TaskBuilder
.
updatePrevTaskIdentity
(
newTaskIds
,
taskCompleteds
,
this
.
task
);
TaskBuilder
.
updatePrevTaskIdentity
(
newTaskIds
,
taskCompleteds
,
this
.
task
);
}
}
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Wo
wo
=
Wo
.
copier
.
copy
(
rec
);
Wo
wo
=
Wo
.
copier
.
copy
(
rec
);
wo
.
setManualTaskIdentityMatrix
(
this
.
manualTaskIdentityMatrix
);
result
.
setData
(
wo
);
result
.
setData
(
wo
);
return
result
;
return
result
;
}
}
...
@@ -172,7 +175,8 @@ public class V2Reset extends BaseAction {
...
@@ -172,7 +175,8 @@ public class V2Reset extends BaseAction {
}
}
}
}
private
void
reset
(
Task
task
,
boolean
remove
,
List
<
String
>
identities
,
Manual
manual
)
throws
Exception
{
private
ManualTaskIdentityMatrix
reset
(
Task
task
,
boolean
remove
,
List
<
String
>
identities
,
Manual
manual
)
throws
Exception
{
V2AddManualTaskIdentityMatrixWi
req
=
new
V2AddManualTaskIdentityMatrixWi
();
V2AddManualTaskIdentityMatrixWi
req
=
new
V2AddManualTaskIdentityMatrixWi
();
req
.
setIdentity
(
task
.
getIdentity
());
req
.
setIdentity
(
task
.
getIdentity
());
req
.
setRemove
(
remove
);
req
.
setRemove
(
remove
);
...
@@ -187,13 +191,13 @@ public class V2Reset extends BaseAction {
...
@@ -187,13 +191,13 @@ public class V2Reset extends BaseAction {
List
<
V2AddManualTaskIdentityMatrixWi
.
Option
>
optionList
=
new
ArrayList
<>();
List
<
V2AddManualTaskIdentityMatrixWi
.
Option
>
optionList
=
new
ArrayList
<>();
optionList
.
add
(
option
);
optionList
.
add
(
option
);
req
.
setOptionList
(
optionList
);
req
.
setOptionList
(
optionList
);
WrapBoolean
resp
=
ThisApplication
.
context
().
applications
()
return
ThisApplication
.
context
().
applications
()
.
postQuery
(
x_processplatform_service_processing
.
class
,
Applications
.
joinQueryUri
(
"work"
,
"v2"
,
.
postQuery
(
x_processplatform_service_processing
.
class
,
task
.
getWork
(),
"add"
,
"manual"
,
"task"
,
"identity"
,
"matrix"
),
req
,
task
.
getJob
())
Applications
.
joinQueryUri
(
"work"
,
"v2"
,
task
.
getWork
(),
"add"
,
"manual"
,
"task"
,
"identity"
,
.
getData
(
WrapBoolean
.
class
);
"matrix"
),
if
(
BooleanUtils
.
isNotTrue
(
resp
.
getValue
()))
{
req
,
task
.
getJob
())
throw
new
ExceptionReset
(
task
.
getId
()
);
.
getData
(
V2AddManualTaskIdentityMatrixWo
.
class
).
getManualTaskIdentityMatrix
(
);
}
}
}
private
void
processingWork
()
throws
Exception
{
private
void
processingWork
()
throws
Exception
{
...
@@ -225,6 +229,17 @@ public class V2Reset extends BaseAction {
...
@@ -225,6 +229,17 @@ public class V2Reset extends BaseAction {
static
WrapCopier
<
Record
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
Record
.
class
,
Wo
.
class
,
null
,
static
WrapCopier
<
Record
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
Record
.
class
,
Wo
.
class
,
null
,
JpaObject
.
FieldsInvisible
);
JpaObject
.
FieldsInvisible
);
private
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
;
public
void
setManualTaskIdentityMatrix
(
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
)
{
this
.
manualTaskIdentityMatrix
=
manualTaskIdentityMatrix
;
}
public
ManualTaskIdentityMatrix
getManualTaskIdentityMatrix
()
{
return
manualTaskIdentityMatrix
;
}
}
}
}
}
\ No newline at end of file
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/work/V2AddManualTaskIdentityMatrix.java
浏览文件 @
54df2ce6
...
@@ -19,9 +19,9 @@ import com.x.base.core.project.exception.ExceptionEntityNotExist;
...
@@ -19,9 +19,9 @@ import com.x.base.core.project.exception.ExceptionEntityNotExist;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.base.core.project.jaxrs.WoId
;
import
com.x.base.core.project.jaxrs.WrapBoolean
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.processplatform.ManualTaskIdentityMatrix
;
import
com.x.base.core.project.tools.StringTools
;
import
com.x.base.core.project.tools.StringTools
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.Business
;
import
com.x.processplatform.assemble.surface.RecordBuilder
;
import
com.x.processplatform.assemble.surface.RecordBuilder
;
...
@@ -35,6 +35,7 @@ import com.x.processplatform.core.entity.element.ActivityType;
...
@@ -35,6 +35,7 @@ import com.x.processplatform.core.entity.element.ActivityType;
import
com.x.processplatform.core.entity.element.Manual
;
import
com.x.processplatform.core.entity.element.Manual
;
import
com.x.processplatform.core.express.ProcessingAttributes
;
import
com.x.processplatform.core.express.ProcessingAttributes
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWo
;
class
V2AddManualTaskIdentityMatrix
extends
BaseAction
{
class
V2AddManualTaskIdentityMatrix
extends
BaseAction
{
...
@@ -53,6 +54,8 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
...
@@ -53,6 +54,8 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
private
WorkLog
workLog
;
private
WorkLog
workLog
;
// work活动
// work活动
private
Manual
manual
;
private
Manual
manual
;
// 返回的ManualTaskIdentityMatrix
private
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
;
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
JsonElement
jsonElement
)
throws
Exception
{
ActionResult
<
Wo
>
execute
(
EffectivePerson
effectivePerson
,
String
id
,
JsonElement
jsonElement
)
throws
Exception
{
if
(
LOGGER
.
isDebugEnabled
())
{
if
(
LOGGER
.
isDebugEnabled
())
{
...
@@ -60,7 +63,7 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
...
@@ -60,7 +63,7 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
}
}
this
.
init
(
effectivePerson
,
id
,
jsonElement
);
this
.
init
(
effectivePerson
,
id
,
jsonElement
);
this
.
add
(
wi
.
getOptionList
(),
wi
.
getRemove
());
this
.
manualTaskIdentityMatrix
=
add
(
wi
.
getOptionList
(),
wi
.
getRemove
());
this
.
processingWork
(
work
);
this
.
processingWork
(
work
);
...
@@ -75,6 +78,7 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
...
@@ -75,6 +78,7 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Wo
wo
=
Wo
.
copier
.
copy
(
rec
);
Wo
wo
=
Wo
.
copier
.
copy
(
rec
);
wo
.
setManualTaskIdentityMatrix
(
this
.
manualTaskIdentityMatrix
);
result
.
setData
(
wo
);
result
.
setData
(
wo
);
return
result
;
return
result
;
...
@@ -103,18 +107,19 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
...
@@ -103,18 +107,19 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
}
}
}
}
private
void
add
(
List
<
V2AddManualTaskIdentityMatrixWi
.
Option
>
options
,
Boolean
remove
)
throws
Exception
{
private
ManualTaskIdentityMatrix
add
(
List
<
V2AddManualTaskIdentityMatrixWi
.
Option
>
options
,
Boolean
remove
)
throws
Exception
{
V2AddManualTaskIdentityMatrixWi
req
=
new
V2AddManualTaskIdentityMatrixWi
();
V2AddManualTaskIdentityMatrixWi
req
=
new
V2AddManualTaskIdentityMatrixWi
();
req
.
setIdentity
(
identity
);
req
.
setIdentity
(
identity
);
req
.
setOptionList
(
options
);
req
.
setOptionList
(
options
);
req
.
setRemove
(
remove
);
req
.
setRemove
(
remove
);
WrapBoolean
resp
=
ThisApplication
.
context
().
applications
()
return
ThisApplication
.
context
().
applications
()
.
postQuery
(
x_processplatform_service_processing
.
class
,
Applications
.
joinQueryUri
(
"work"
,
"v2"
,
.
postQuery
(
x_processplatform_service_processing
.
class
,
work
.
getId
(),
"add"
,
"manual"
,
"task"
,
"identity"
,
"matrix"
),
req
,
work
.
getJob
())
Applications
.
joinQueryUri
(
"work"
,
"v2"
,
work
.
getId
(),
"add"
,
"manual"
,
"task"
,
"identity"
,
.
getData
(
WrapBoolean
.
class
);
"matrix"
),
if
(
BooleanUtils
.
isNotTrue
(
resp
.
getValue
()))
{
req
,
work
.
getJob
())
throw
new
ExceptionAddManualTaskIdentityMatrix
(
work
.
getId
()
);
.
getData
(
V2AddManualTaskIdentityMatrixWo
.
class
).
getManualTaskIdentityMatrix
(
);
}
}
}
private
void
processingWork
(
Work
work
)
throws
Exception
{
private
void
processingWork
(
Work
work
)
throws
Exception
{
...
@@ -148,6 +153,16 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
...
@@ -148,6 +153,16 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
static
WrapCopier
<
Record
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
Record
.
class
,
Wo
.
class
,
null
,
static
WrapCopier
<
Record
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
Record
.
class
,
Wo
.
class
,
null
,
JpaObject
.
FieldsInvisible
);
JpaObject
.
FieldsInvisible
);
private
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
;
public
ManualTaskIdentityMatrix
getManualTaskIdentityMatrix
()
{
return
manualTaskIdentityMatrix
;
}
public
void
setManualTaskIdentityMatrix
(
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
)
{
this
.
manualTaskIdentityMatrix
=
manualTaskIdentityMatrix
;
}
}
}
}
}
\ No newline at end of file
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/work/V2AddManualTaskIdentityMatrixWo.java
0 → 100644
浏览文件 @
54df2ce6
package
com.x.processplatform.core.express.service.processing.jaxrs.work
;
import
com.x.base.core.project.gson.GsonPropertyObject
;
import
com.x.base.core.project.processplatform.ManualTaskIdentityMatrix
;
public
class
V2AddManualTaskIdentityMatrixWo
extends
GsonPropertyObject
{
private
static
final
long
serialVersionUID
=
-
8631082471633729236L
;
private
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
;
public
ManualTaskIdentityMatrix
getManualTaskIdentityMatrix
()
{
return
manualTaskIdentityMatrix
;
}
public
void
setManualTaskIdentityMatrix
(
ManualTaskIdentityMatrix
manualTaskIdentityMatrix
)
{
this
.
manualTaskIdentityMatrix
=
manualTaskIdentityMatrix
;
}
}
\ No newline at end of file
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2AddManualTaskIdentityMatrix.java
浏览文件 @
54df2ce6
...
@@ -16,13 +16,13 @@ import com.x.base.core.project.exception.ExceptionEntityNotExist;
...
@@ -16,13 +16,13 @@ import com.x.base.core.project.exception.ExceptionEntityNotExist;
import
com.x.base.core.project.executor.ProcessPlatformExecutorFactory
;
import
com.x.base.core.project.executor.ProcessPlatformExecutorFactory
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.jaxrs.WrapBoolean
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.Logger
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.processplatform.ManualTaskIdentityMatrix
;
import
com.x.base.core.project.processplatform.ManualTaskIdentityMatrix
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.base.core.project.tools.ListTools
;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.entity.content.Work
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.work.V2AddManualTaskIdentityMatrixWo
;
import
com.x.processplatform.service.processing.Business
;
import
com.x.processplatform.service.processing.Business
;
class
V2AddManualTaskIdentityMatrix
extends
BaseAction
{
class
V2AddManualTaskIdentityMatrix
extends
BaseAction
{
...
@@ -77,6 +77,7 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
...
@@ -77,6 +77,7 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
@Override
@Override
public
ActionResult
<
Wo
>
call
()
throws
Exception
{
public
ActionResult
<
Wo
>
call
()
throws
Exception
{
ManualTaskIdentityMatrix
matrix
=
null
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
Business
business
=
new
Business
(
emc
);
emc
.
beginTransaction
(
Work
.
class
);
emc
.
beginTransaction
(
Work
.
class
);
...
@@ -84,7 +85,7 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
...
@@ -84,7 +85,7 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
if
(
null
==
work
)
{
if
(
null
==
work
)
{
throw
new
ExceptionEntityNotExist
(
id
,
Work
.
class
);
throw
new
ExceptionEntityNotExist
(
id
,
Work
.
class
);
}
}
ManualTaskIdentityMatrix
matrix
=
work
.
getManualTaskIdentityMatrix
();
matrix
=
work
.
getManualTaskIdentityMatrix
();
for
(
V2AddManualTaskIdentityMatrixWi
.
Option
option
:
optionList
)
{
for
(
V2AddManualTaskIdentityMatrixWi
.
Option
option
:
optionList
)
{
List
<
String
>
identities
=
business
.
organization
().
identity
().
list
(
option
.
getIdentityList
());
List
<
String
>
identities
=
business
.
organization
().
identity
().
list
(
option
.
getIdentityList
());
if
(!
ListTools
.
isEmpty
(
identities
))
{
if
(!
ListTools
.
isEmpty
(
identities
))
{
...
@@ -102,7 +103,7 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
...
@@ -102,7 +103,7 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
}
}
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
Wo
wo
=
new
Wo
();
Wo
wo
=
new
Wo
();
wo
.
set
Value
(
true
);
wo
.
set
ManualTaskIdentityMatrix
(
matrix
);
result
.
setData
(
wo
);
result
.
setData
(
wo
);
return
result
;
return
result
;
}
}
...
@@ -115,9 +116,9 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
...
@@ -115,9 +116,9 @@ class V2AddManualTaskIdentityMatrix extends BaseAction {
}
}
public
static
class
Wo
extends
WrapBoolean
{
public
static
class
Wo
extends
V2AddManualTaskIdentityMatrixWo
{
private
static
final
long
serialVersionUID
=
-
8882214104176786739
L
;
private
static
final
long
serialVersionUID
=
-
1377290527826280418
L
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录