Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
fbf04c02
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,发现更多精彩内容 >>
提交
fbf04c02
编写于
5月 16, 2022
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改 reset 接口
上级
0b6c2b7a
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
207 addition
and
153 deletion
+207
-153
o2server/x_base_core_project/src/main/java/com/x/base/core/project/processplatform/ManualTaskIdentityMatrix.java
...ore/project/processplatform/ManualTaskIdentityMatrix.java
+40
-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
+4
-4
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ExceptionAdd.java
...essplatform/assemble/surface/jaxrs/task/ExceptionAdd.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
+18
-17
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/V2Extend.java
...processplatform/assemble/surface/jaxrs/task/V2Extend.java
+2
-2
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/V2Reset.java
.../processplatform/assemble/surface/jaxrs/task/V2Reset.java
+2
-2
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/task/ProcessingWi.java
...e/express/service/processing/jaxrs/task/ProcessingWi.java
+1
-23
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/task/ProcessingWo.java
...e/express/service/processing/jaxrs/task/ProcessingWo.java
+1
-1
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/task/V2ResetWi.java
...core/express/service/processing/jaxrs/task/V2ResetWi.java
+46
-25
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/ActionProcessing.java
...tform/service/processing/jaxrs/task/ActionProcessing.java
+2
-2
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/V2Add.java
.../processplatform/service/processing/jaxrs/task/V2Add.java
+20
-19
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/V2Extend.java
...ocessplatform/service/processing/jaxrs/task/V2Extend.java
+19
-18
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/V2Reset.java
...rocessplatform/service/processing/jaxrs/task/V2Reset.java
+37
-38
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/schedule/PassExpired.java
...cessplatform/service/processing/schedule/PassExpired.java
+2
-2
未找到文件。
o2server/x_base_core_project/src/main/java/com/x/base/core/project/processplatform/ManualTaskIdentityMatrix.java
浏览文件 @
fbf04c02
...
...
@@ -94,6 +94,46 @@ public class ManualTaskIdentityMatrix extends GsonPropertyObject {
return
this
.
add
(
identity
,
after
,
replace
,
Arrays
.
asList
(
arr
));
}
public
ManualTaskIdentityMatrix
reset
(
String
identity
,
List
<
String
>
addBeforeIdentities
,
List
<
String
>
extendIdentities
,
List
<
String
>
addAfterIdentities
,
boolean
remove
)
{
int
rowpos
=
0
;
int
colpos
=
-
1
;
for
(
Row
row
:
matrix
)
{
colpos
=
row
.
indexOf
(
identity
);
if
(
colpos
>
-
1
)
{
break
;
}
else
{
rowpos
++;
}
}
if
(
colpos
>
-
1
)
{
resetUpdate
(
rowpos
,
colpos
,
addBeforeIdentities
,
extendIdentities
,
addAfterIdentities
);
}
return
this
;
}
private
void
resetUpdate
(
int
rowpos
,
int
colpos
,
List
<
String
>
addBeforeIdentities
,
List
<
String
>
extendIdentities
,
List
<
String
>
addAfterIdentities
)
{
if
((
null
!=
addBeforeIdentities
)
&&
(!
addBeforeIdentities
.
isEmpty
()))
{
for
(
String
str
:
addBeforeIdentities
)
{
Row
row
=
new
Row
();
row
.
add
(
str
);
matrix
.
add
(
rowpos
++,
row
);
}
}
if
((
null
!=
extendIdentities
)
&&
(!
extendIdentities
.
isEmpty
()))
{
matrix
.
get
(
rowpos
).
addAll
(
colpos
,
extendIdentities
);
}
if
((
null
!=
addAfterIdentities
)
&&
(!
addAfterIdentities
.
isEmpty
()))
{
for
(
String
str
:
addAfterIdentities
)
{
Row
row
=
new
Row
();
row
.
add
(
str
);
matrix
.
add
(
rowpos
++,
row
);
}
compact
();
}
}
public
void
clear
()
{
this
.
matrix
.
clear
();
}
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ActionProcessing.java
浏览文件 @
fbf04c02
...
...
@@ -44,9 +44,9 @@ import com.x.processplatform.core.entity.element.Manual;
import
com.x.processplatform.core.entity.element.Route
;
import
com.x.processplatform.core.entity.log.SignalStack
;
import
com.x.processplatform.core.express.ProcessingAttributes
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.ActionProcessingWo
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.ProcessingWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.ProcessingWo
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapAppend
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapProcessing
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapUpdatePrevTaskIdentity
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapUpdatePrevTaskIdentity.PrevTask
;
import
com.x.processplatform.core.express.service.processing.jaxrs.taskcompleted.WrapUpdateNextTaskIdentity
;
...
...
@@ -275,7 +275,7 @@ class ActionProcessing extends BaseAction {
}
private
String
processingProcessingTask
(
String
processType
)
throws
Exception
{
WrapProcessing
req
=
new
WrapProcessing
();
ProcessingWi
req
=
new
ProcessingWi
();
req
.
setProcessingType
(
processType
);
WoId
resp
=
ThisApplication
.
context
().
applications
()
.
putQuery
(
x_processplatform_service_processing
.
class
,
...
...
@@ -491,7 +491,7 @@ class ActionProcessing extends BaseAction {
return
o
;
}
public
static
class
Wo
extends
Action
ProcessingWo
{
public
static
class
Wo
extends
ProcessingWo
{
private
static
final
long
serialVersionUID
=
-
1771383649634969945L
;
static
WrapCopier
<
Record
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
Record
.
class
,
Wo
.
class
,
null
,
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/ExceptionAdd.java
0 → 100644
浏览文件 @
fbf04c02
package
com.x.processplatform.assemble.surface.jaxrs.task
;
import
com.x.base.core.project.exception.LanguagePromptException
;
class
ExceptionAdd
extends
LanguagePromptException
{
private
static
final
long
serialVersionUID
=
-
1678718913437722938L
;
ExceptionAdd
(
String
id
)
{
super
(
"添加待办人失败, task:{}."
,
id
);
}
}
\ No newline at end of file
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/V2Add.java
浏览文件 @
fbf04c02
...
...
@@ -35,8 +35,8 @@ import com.x.processplatform.core.entity.content.Work;
import
com.x.processplatform.core.entity.content.WorkCompleted
;
import
com.x.processplatform.core.entity.content.WorkLog
;
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.V2AddWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapProcessing
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapUpdatePrevTaskIdentity
;
import
com.x.processplatform.core.express.service.processing.jaxrs.taskcompleted.WrapUpdateNextTaskIdentity
;
...
...
@@ -103,8 +103,8 @@ public class V2Add extends BaseAction {
if
(
BooleanUtils
.
isNotTrue
(
control
.
getAllowReset
()))
{
throw
new
ExceptionAccessDenied
(
effectivePerson
,
task
);
}
this
.
existTaskIds
=
emc
.
idsEqualAndEqual
(
Task
.
class
,
Task
.
job_FIELDNAME
,
task
.
getJob
(),
Task
.
activityToken_FIELDNAME
,
task
.
getActivityToken
());
this
.
existTaskIds
=
emc
.
idsEqualAndEqual
(
Task
.
class
,
Task
.
job_FIELDNAME
,
task
.
getJob
(),
Task
.
work_FIELDNAME
,
task
.
getWork
());
this
.
identites
=
business
.
organization
().
identity
().
list
(
wi
.
getIdentityList
());
// 在新扩充待办人员中去除已经有待办人员
identites
.
remove
(
task
.
getIdentity
());
...
...
@@ -125,13 +125,13 @@ public class V2Add extends BaseAction {
req
,
task
.
getJob
())
.
getData
(
WrapBoolean
.
class
);
if
(
BooleanUtils
.
isNotTrue
(
resp
.
getValue
()))
{
throw
new
Exception
Exten
d
(
task
.
getId
());
throw
new
Exception
Ad
d
(
task
.
getId
());
}
}
private
String
processingTask
(
Task
task
)
throws
Exception
{
WrapProcessing
req
=
new
WrapProcessing
();
req
.
setProcessingType
(
TaskCompleted
.
PROCESSINGTYPE_
EXTEN
D
);
ProcessingWi
req
=
new
ProcessingWi
();
req
.
setProcessingType
(
TaskCompleted
.
PROCESSINGTYPE_
AD
D
);
WoId
resp
=
ThisApplication
.
context
().
applications
()
.
putQuery
(
x_processplatform_service_processing
.
class
,
Applications
.
joinQueryUri
(
"task"
,
task
.
getId
(),
"processing"
),
req
,
task
.
getJob
())
...
...
@@ -145,7 +145,7 @@ public class V2Add extends BaseAction {
private
void
processingWork
(
Task
task
)
throws
Exception
{
ProcessingAttributes
req
=
new
ProcessingAttributes
();
req
.
setType
(
ProcessingAttributes
.
TYPE_TASK
EXTEN
D
);
req
.
setType
(
ProcessingAttributes
.
TYPE_TASK
AD
D
);
req
.
setSeries
(
this
.
series
);
WoId
resp
=
ThisApplication
.
context
().
applications
()
.
putQuery
(
effectivePerson
.
getDebugger
(),
x_processplatform_service_processing
.
class
,
...
...
@@ -168,8 +168,8 @@ public class V2Add extends BaseAction {
concreteRecord
.
setWorkCompleted
(
workCompleted
.
getId
());
}
concreteRecord
.
setPerson
(
effectivePerson
.
getDistinguishedName
());
concreteRecord
.
setType
(
Record
.
TYPE_TASK
EXTEN
D
);
r
ecordAdjust
(
business
,
task
,
concreteRecord
);
concreteRecord
.
setType
(
Record
.
TYPE_TASK
AD
D
);
createR
ecordAdjust
(
business
,
task
,
concreteRecord
);
}
WoId
resp
=
ThisApplication
.
context
().
applications
()
.
postQuery
(
effectivePerson
.
getDebugger
(),
x_processplatform_service_processing
.
class
,
...
...
@@ -180,15 +180,15 @@ public class V2Add extends BaseAction {
}
}
private
void
recordAdjust
(
Business
business
,
Task
task
,
Record
concreteRecord
)
throws
Exception
{
final
List
<
String
>
nextTaskIdentities
=
new
ArrayList
<>();
private
void
createRecordAdjust
(
Business
business
,
Task
task
,
Record
concreteRecord
)
throws
Exception
{
List
<
String
>
ids
=
business
.
entityManagerContainer
().
idsEqualAndEqual
(
Task
.
class
,
Task
.
job_FIELDNAME
,
task
.
getJob
(),
Task
.
activity_FIELDNAME
,
task
.
getActivity
());
task
.
getJob
(),
Task
.
work_FIELDNAME
,
task
.
getWork
());
ids
=
ListUtils
.
subtract
(
ids
,
existTaskIds
);
List
<
Task
>
list
=
business
.
entityManagerContainer
().
fetch
(
ids
,
Task
.
class
,
ListTools
.
toList
(
Task
.
identity_FIELDNAME
,
Task
.
job_FIELDNAME
,
Task
.
work_FIELDNAME
,
Task
.
activity_FIELDNAME
,
Task
.
activityAlias_FIELDNAME
,
Task
.
activityName_FIELDNAME
,
Task
.
activityToken_FIELDNAME
,
Task
.
activityType_FIELDNAME
,
Task
.
identity_FIELDNAME
));
final
List
<
String
>
nextTaskIdentities
=
new
ArrayList
<>();
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
Task:
:
getActivity
,
Collectors
.
toList
())).
entrySet
().
stream
()
.
forEach
(
o
->
{
Task
next
=
o
.
getValue
().
get
(
0
);
...
...
@@ -209,7 +209,7 @@ public class V2Add extends BaseAction {
}
private
void
updateTaskCompleted
()
throws
Exception
{
/
* 记录下一处理人信息 */
/
/ 记录下一处理人信息
WrapUpdateNextTaskIdentity
req
=
new
WrapUpdateNextTaskIdentity
();
req
.
getTaskCompletedList
().
add
(
this
.
taskCompletedId
);
req
.
setNextTaskIdentityList
(
concreteRecord
.
getProperties
().
getNextManualTaskIdentityList
());
...
...
@@ -220,7 +220,7 @@ public class V2Add extends BaseAction {
}
private
void
updateTask
()
throws
Exception
{
/
* 记录上一处理人信息 */
/
/ 记录上一处理人信息
if
(
ListTools
.
isNotEmpty
(
newTasks
))
{
WrapUpdatePrevTaskIdentity
req
=
new
WrapUpdatePrevTaskIdentity
();
req
.
setTaskList
(
newTasks
);
...
...
@@ -243,18 +243,19 @@ public class V2Add extends BaseAction {
public
static
class
Wi
extends
V2AddWi
{
private
static
final
long
serialVersionUID
=
-
3241215869441470402
L
;
private
static
final
long
serialVersionUID
=
-
6251874269093504136
L
;
}
public
static
class
WoControl
extends
WorkControl
{
private
static
final
long
serialVersionUID
=
-
8781558581462660831L
;
private
static
final
long
serialVersionUID
=
-
8675239528577375846L
;
}
public
static
class
Wo
extends
WrapBoolean
{
private
static
final
long
serialVersionUID
=
4883624438858385234
L
;
private
static
final
long
serialVersionUID
=
8155067200427920853
L
;
}
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/V2Extend.java
浏览文件 @
fbf04c02
...
...
@@ -35,8 +35,8 @@ import com.x.processplatform.core.entity.content.Work;
import
com.x.processplatform.core.entity.content.WorkCompleted
;
import
com.x.processplatform.core.entity.content.WorkLog
;
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.V2ExtendWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapProcessing
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapUpdatePrevTaskIdentity
;
import
com.x.processplatform.core.express.service.processing.jaxrs.taskcompleted.WrapUpdateNextTaskIdentity
;
...
...
@@ -129,7 +129,7 @@ public class V2Extend extends BaseAction {
}
private
String
processingTask
(
Task
task
)
throws
Exception
{
WrapProcessing
req
=
new
WrapProcessing
();
ProcessingWi
req
=
new
ProcessingWi
();
req
.
setProcessingType
(
TaskCompleted
.
PROCESSINGTYPE_EXTEND
);
WoId
resp
=
ThisApplication
.
context
().
applications
()
.
putQuery
(
x_processplatform_service_processing
.
class
,
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/task/V2Reset.java
浏览文件 @
fbf04c02
...
...
@@ -37,8 +37,8 @@ import com.x.processplatform.core.entity.content.Work;
import
com.x.processplatform.core.entity.content.WorkCompleted
;
import
com.x.processplatform.core.entity.content.WorkLog
;
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.V2ResetWi
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapProcessing
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.WrapUpdatePrevTaskIdentity
;
import
com.x.processplatform.core.express.service.processing.jaxrs.taskcompleted.WrapUpdateNextTaskIdentity
;
...
...
@@ -137,7 +137,7 @@ public class V2Reset extends BaseAction {
}
private
void
processingTask
()
throws
Exception
{
WrapProcessing
req
=
new
WrapProcessing
();
ProcessingWi
req
=
new
ProcessingWi
();
req
.
setProcessingType
(
TaskCompleted
.
PROCESSINGTYPE_RESET
);
WoId
resp
=
ThisApplication
.
context
().
applications
()
.
putQuery
(
x_processplatform_service_processing
.
class
,
...
...
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/task/
WrapProcessing
.java
→
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/task/
ProcessingWi
.java
浏览文件 @
fbf04c02
...
...
@@ -3,7 +3,7 @@ package com.x.processplatform.core.express.service.processing.jaxrs.task;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.gson.GsonPropertyObject
;
public
class
WrapProcessing
extends
GsonPropertyObject
{
public
class
ProcessingWi
extends
GsonPropertyObject
{
private
static
final
long
serialVersionUID
=
-
2272062779655632688L
;
...
...
@@ -11,12 +11,6 @@ public class WrapProcessing extends GsonPropertyObject {
public
static
final
String
PROCESSINGTYPE_RESET
=
"reset"
;
// @FieldDescribe("当前处理人")
// private String processingPerson;
//
// @FieldDescribe("当前处理身份")
// private String processingIdentity;
@FieldDescribe
(
"流转类型."
)
private
String
processingType
;
...
...
@@ -28,20 +22,4 @@ public class WrapProcessing extends GsonPropertyObject {
this
.
processingType
=
processingType
;
}
// public String getProcessingPerson() {
// return processingPerson;
// }
//
// public void setProcessingPerson(String processingPerson) {
// this.processingPerson = processingPerson;
// }
//
// public String getProcessingIdentity() {
// return processingIdentity;
// }
//
// public void setProcessingIdentity(String processingIdentity) {
// this.processingIdentity = processingIdentity;
// }
}
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/task/
Action
ProcessingWo.java
→
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/task/ProcessingWo.java
浏览文件 @
fbf04c02
...
...
@@ -3,7 +3,7 @@ package com.x.processplatform.core.express.service.processing.jaxrs.task;
import
com.x.processplatform.core.entity.content.Record
;
import
com.x.processplatform.core.entity.log.SignalStack
;
public
class
Action
ProcessingWo
extends
Record
{
public
class
ProcessingWo
extends
Record
{
private
static
final
long
serialVersionUID
=
-
8450939016187545724L
;
...
...
o2server/x_processplatform_core_express/src/main/java/com/x/processplatform/core/express/service/processing/jaxrs/task/V2ResetWi.java
浏览文件 @
fbf04c02
...
...
@@ -2,6 +2,8 @@ package com.x.processplatform.core.express.service.processing.jaxrs.task;
import
java.util.List
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.gson.GsonPropertyObject
;
import
com.x.base.core.project.tools.StringTools
;
...
...
@@ -10,17 +12,23 @@ public class V2ResetWi extends GsonPropertyObject {
private
static
final
long
serialVersionUID
=
-
8631082471633729236L
;
@FieldDescribe
(
"
路由名称
"
)
private
String
routeName
;
@FieldDescribe
(
"
待办
"
)
private
String
task
;
@FieldDescribe
(
"意见"
)
private
String
opinion
;
@FieldDescribe
(
"在指定待办前添加身份"
)
private
List
<
String
>
addBeforeList
;
@FieldDescribe
(
"在指定待办扩充的身份"
)
private
List
<
String
>
extendList
;
@FieldDescribe
(
"在指定待办后添加身份"
)
private
List
<
String
>
addAfterList
;
@FieldDescribe
(
"
重置
身份"
)
private
List
<
String
>
identityList
;
@FieldDescribe
(
"
是否删除指定待办
身份"
)
private
Boolean
remove
;
@FieldDescribe
(
"
保留自身待办.
"
)
private
Boolean
keep
;
@FieldDescribe
(
"
意见
"
)
private
String
opinion
;
@FieldDescribe
(
"操作串号"
)
private
String
series
;
...
...
@@ -29,27 +37,44 @@ public class V2ResetWi extends GsonPropertyObject {
this
.
series
=
StringTools
.
uniqueToken
();
}
public
Boolean
getKeep
()
{
if
(
null
==
keep
)
{
keep
=
false
;
}
return
keep
;
public
String
getTask
()
{
return
task
;
}
public
List
<
String
>
getIdentityList
(
)
{
return
identityList
;
public
void
setTask
(
String
task
)
{
this
.
task
=
task
;
}
public
void
setIdentityList
(
List
<
String
>
identityList
)
{
this
.
identityList
=
identity
List
;
public
List
<
String
>
getAddBeforeList
(
)
{
return
addBefore
List
;
}
public
String
getRouteName
(
)
{
return
routeName
;
public
void
setAddBeforeList
(
List
<
String
>
addBeforeList
)
{
this
.
addBeforeList
=
addBeforeList
;
}
public
void
setRouteName
(
String
routeName
)
{
this
.
routeName
=
routeName
;
public
List
<
String
>
getExtendList
()
{
return
extendList
;
}
public
void
setExtendList
(
List
<
String
>
extendList
)
{
this
.
extendList
=
extendList
;
}
public
List
<
String
>
getAddAfterList
()
{
return
addAfterList
;
}
public
void
setAddAfterList
(
List
<
String
>
addAfterList
)
{
this
.
addAfterList
=
addAfterList
;
}
public
Boolean
getRemove
()
{
return
BooleanUtils
.
isTrue
(
remove
);
}
public
void
setRemove
(
Boolean
remove
)
{
this
.
remove
=
remove
;
}
public
String
getOpinion
()
{
...
...
@@ -60,10 +85,6 @@ public class V2ResetWi extends GsonPropertyObject {
this
.
opinion
=
opinion
;
}
public
void
setKeep
(
Boolean
keep
)
{
this
.
keep
=
keep
;
}
public
String
getSeries
()
{
return
series
;
}
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/ActionProcessing.java
浏览文件 @
fbf04c02
...
...
@@ -33,7 +33,7 @@ import com.x.processplatform.core.entity.element.ActivityType;
import
com.x.processplatform.core.entity.element.Manual
;
import
com.x.processplatform.core.entity.element.Process
;
import
com.x.processplatform.core.express.ProcessingAttributes
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.
WrapProcessing
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.
ProcessingWi
;
import
com.x.processplatform.service.processing.Business
;
import
com.x.processplatform.service.processing.MessageFactory
;
import
com.x.processplatform.service.processing.WorkContext
;
...
...
@@ -226,7 +226,7 @@ class ActionProcessing extends BaseAction {
private
static
final
long
serialVersionUID
=
1L
;
}
public
static
class
Wi
extends
WrapProcessing
{
public
static
class
Wi
extends
ProcessingWi
{
private
static
final
long
serialVersionUID
=
-
6828623155146710691L
;
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/V2Add.java
浏览文件 @
fbf04c02
...
...
@@ -7,6 +7,7 @@ import java.util.concurrent.TimeUnit;
import
com.google.gson.JsonElement
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.entity.annotation.CheckPersistType
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.executor.ProcessPlatformExecutorFactory
;
...
...
@@ -20,6 +21,7 @@ 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.express.service.processing.jaxrs.task.V2AddWi
;
import
com.x.processplatform.service.processing.Business
;
class
V2Add
extends
BaseAction
{
...
...
@@ -33,14 +35,17 @@ class V2Add extends BaseAction {
LOGGER
.
debug
(
"execute:{}."
,
effectivePerson:
:
getDistinguishedName
);
}
Task
task
=
getTask
(
wi
.
getTask
())
;
Task
task
=
null
;
if
(
null
==
task
)
{
throw
new
ExceptionEntityNotExist
(
wi
.
getTask
(),
Task
.
class
);
}
if
(
null
==
this
.
getWork
(
task
.
getWork
()))
{
throw
new
ExceptionEntityNotExist
(
task
.
getWork
(),
Work
.
class
);
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
task
=
getTask
(
business
,
wi
.
getTask
());
if
(
null
==
task
)
{
throw
new
ExceptionEntityNotExist
(
wi
.
getTask
(),
Task
.
class
);
}
if
(!
this
.
checkWorkExist
(
business
,
task
.
getWork
()))
{
throw
new
ExceptionEntityNotExist
(
task
.
getWork
(),
Work
.
class
);
}
}
return
ProcessPlatformExecutorFactory
.
get
(
task
.
getJob
()).
submit
(
new
CallableImpl
(
task
.
getWork
(),
...
...
@@ -48,17 +53,13 @@ class V2Add extends BaseAction {
}
private
Task
getTask
(
String
id
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
return
emc
.
fetch
(
id
,
Task
.
class
,
ListTools
.
toList
(
Task
.
job_FIELDNAME
,
Task
.
identity_FIELDNAME
,
Task
.
work_FIELDNAME
));
}
private
Task
getTask
(
Business
business
,
String
id
)
throws
Exception
{
return
business
.
entityManagerContainer
().
fetch
(
id
,
Task
.
class
,
ListTools
.
toList
(
Task
.
job_FIELDNAME
,
Task
.
identity_FIELDNAME
,
Task
.
work_FIELDNAME
));
}
private
Work
getWork
(
String
id
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
return
emc
.
fetch
(
id
,
Work
.
class
,
ListTools
.
toList
());
}
private
boolean
checkWorkExist
(
Business
business
,
String
id
)
throws
Exception
{
return
business
.
entityManagerContainer
().
countEqual
(
Work
.
class
,
JpaObject
.
id_FIELDNAME
,
id
)
>
0
;
}
private
class
CallableImpl
implements
Callable
<
ActionResult
<
Wo
>>
{
...
...
@@ -105,14 +106,14 @@ class V2Add extends BaseAction {
public
static
class
Wi
extends
V2AddWi
{
private
static
final
long
serialVersionUID
=
-
3542693358569393097
L
;
private
static
final
long
serialVersionUID
=
7870902860170655791
L
;
}
public
static
class
Wo
extends
WrapBoolean
{
private
static
final
long
serialVersionUID
=
6457473592503074552
L
;
private
static
final
long
serialVersionUID
=
-
8882214104176786739
L
;
}
}
}
\ No newline at end of file
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/V2Extend.java
浏览文件 @
fbf04c02
...
...
@@ -7,6 +7,7 @@ import java.util.concurrent.TimeUnit;
import
com.google.gson.JsonElement
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.entity.annotation.CheckPersistType
;
import
com.x.base.core.project.exception.ExceptionEntityNotExist
;
import
com.x.base.core.project.executor.ProcessPlatformExecutorFactory
;
...
...
@@ -20,6 +21,7 @@ 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.express.service.processing.jaxrs.task.V2ExtendWi
;
import
com.x.processplatform.service.processing.Business
;
class
V2Extend
extends
BaseAction
{
...
...
@@ -32,15 +34,18 @@ class V2Extend extends BaseAction {
if
(
LOGGER
.
isDebugEnabled
())
{
LOGGER
.
debug
(
"execute:{}."
,
effectivePerson:
:
getDistinguishedName
);
}
Task
task
=
null
;
Task
task
=
getTask
(
wi
.
getTask
());
if
(
null
==
task
)
{
throw
new
ExceptionEntityNotExist
(
wi
.
getTask
(),
Task
.
class
);
}
if
(
null
==
this
.
getWork
(
task
.
getWork
()))
{
throw
new
ExceptionEntityNotExist
(
task
.
getWork
(),
Work
.
class
);
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
task
=
getTask
(
business
,
wi
.
getTask
());
if
(
null
==
task
)
{
throw
new
ExceptionEntityNotExist
(
wi
.
getTask
(),
Task
.
class
);
}
if
(!
this
.
checkWorkExist
(
business
,
task
.
getWork
()))
{
throw
new
ExceptionEntityNotExist
(
task
.
getWork
(),
Work
.
class
);
}
}
return
ProcessPlatformExecutorFactory
.
get
(
task
.
getJob
())
...
...
@@ -49,17 +54,13 @@ class V2Extend extends BaseAction {
}
private
Task
getTask
(
String
id
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
return
emc
.
fetch
(
id
,
Task
.
class
,
ListTools
.
toList
(
Task
.
job_FIELDNAME
,
Task
.
identity_FIELDNAME
,
Task
.
work_FIELDNAME
));
}
private
Task
getTask
(
Business
business
,
String
id
)
throws
Exception
{
return
business
.
entityManagerContainer
().
fetch
(
id
,
Task
.
class
,
ListTools
.
toList
(
Task
.
job_FIELDNAME
,
Task
.
identity_FIELDNAME
,
Task
.
work_FIELDNAME
));
}
private
Work
getWork
(
String
id
)
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
return
emc
.
fetch
(
id
,
Work
.
class
,
ListTools
.
toList
());
}
private
boolean
checkWorkExist
(
Business
business
,
String
id
)
throws
Exception
{
return
business
.
entityManagerContainer
().
countEqual
(
Work
.
class
,
JpaObject
.
id_FIELDNAME
,
id
)
>
0
;
}
private
class
CallableImpl
implements
Callable
<
ActionResult
<
Wo
>>
{
...
...
@@ -113,4 +114,4 @@ class V2Extend extends BaseAction {
}
}
}
\ No newline at end of file
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/task/V2Reset.java
浏览文件 @
fbf04c02
...
...
@@ -4,9 +4,6 @@ import java.util.List;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.TimeUnit
;
import
org.apache.commons.collections4.ListUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.google.gson.JsonElement
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
...
...
@@ -18,11 +15,10 @@ 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.LoggerFactory
;
import
com.x.base.core.project.processplatform.ManualTaskIdentityMatrix
;
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.ActivityType
;
import
com.x.processplatform.core.entity.element.Manual
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.V2ResetWi
;
import
com.x.processplatform.service.processing.Business
;
...
...
@@ -36,17 +32,40 @@ class V2Reset extends BaseAction {
final
Wi
wi
=
this
.
convertToWrapIn
(
jsonElement
,
Wi
.
class
);
final
String
job
;
Task
task
=
null
;
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Task
task
=
emc
.
fetch
(
id
,
Task
.
class
,
ListTools
.
toList
(
Task
.
job_FIELDNAME
));
task
=
emc
.
fetch
(
id
,
Task
.
class
,
ListTools
.
toList
(
Task
.
job_FIELDNAME
));
if
(
null
==
task
)
{
throw
new
ExceptionEntityNotExist
(
id
,
Task
.
class
);
}
job
=
task
.
getJob
();
}
Callable
<
ActionResult
<
Wo
>>
callable
=
()
->
{
return
ProcessPlatformExecutorFactory
.
get
(
task
.
getJob
()).
submit
(
new
CallableImpl
(
task
.
getId
(),
wi
.
getAddBeforeList
(),
wi
.
getExtendList
(),
wi
.
getAddAfterList
(),
wi
.
getRemove
()))
.
get
(
300
,
TimeUnit
.
SECONDS
);
}
private
class
CallableImpl
implements
Callable
<
ActionResult
<
Wo
>>
{
private
String
id
;
private
List
<
String
>
addBeforeIdentities
;
private
List
<
String
>
extendIdentities
;
private
List
<
String
>
addAfterIdentities
;
private
boolean
remove
;
private
CallableImpl
(
String
id
,
List
<
String
>
addBeforeIdentities
,
List
<
String
>
extendIdentities
,
List
<
String
>
addAfterIdentities
,
boolean
remove
)
{
this
.
id
=
id
;
this
.
addBeforeIdentities
=
addBeforeIdentities
;
this
.
extendIdentities
=
extendIdentities
;
this
.
addAfterIdentities
=
addAfterIdentities
;
this
.
remove
=
remove
;
}
@Override
public
ActionResult
<
Wo
>
call
()
throws
Exception
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
Business
business
=
new
Business
(
emc
);
Task
task
=
emc
.
find
(
id
,
Task
.
class
);
...
...
@@ -58,35 +77,17 @@ class V2Reset extends BaseAction {
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
);
}
/* 检查reset人员 */
List
<
String
>
identites
=
ListTools
.
trim
(
business
.
organization
().
identity
().
list
(
wi
.
getIdentityList
()),
this
.
addBeforeIdentities
=
ListTools
.
trim
(
business
.
organization
().
identity
().
list
(
addBeforeIdentities
),
true
,
true
);
this
.
extendIdentities
=
ListTools
.
trim
(
business
.
organization
().
identity
().
list
(
extendIdentities
),
true
,
true
);
this
.
addAfterIdentities
=
ListTools
.
trim
(
business
.
organization
().
identity
().
list
(
addAfterIdentities
),
true
,
true
);
if
(
identites
.
isEmpty
())
{
throw
new
ExceptionResetEmpty
();
}
emc
.
beginTransaction
(
Work
.
class
);
List
<
String
>
os
=
ListTools
.
trim
(
work
.
getManualTaskIdentityMatrix
().
flat
(),
true
,
true
);
os
=
ListUtils
.
sum
(
os
,
identites
);
/* 在新增待办人员中删除当前的处理人 */
if
(
BooleanUtils
.
isNotTrue
(
wi
.
getKeep
()))
{
os
=
ListUtils
.
subtract
(
os
,
ListTools
.
toList
(
task
.
getIdentity
()));
}
if
(
ListTools
.
isEmpty
(
os
))
{
throw
new
ExceptionResetEmpty
();
}
work
.
setManualTaskIdentityMatrix
(
manual
.
identitiesToManualTaskIdentityMatrix
(
ListTools
.
trim
(
os
,
true
,
true
)));
// work.setManualTaskIdentityList(ListTools.trim(os, true, true));
ManualTaskIdentityMatrix
matrix
=
work
.
getManualTaskIdentityMatrix
();
matrix
.
reset
(
task
.
getIdentity
(),
addBeforeIdentities
,
extendIdentities
,
addAfterIdentities
,
remove
);
work
.
setManualTaskIdentityMatrix
(
matrix
);
emc
.
check
(
work
,
CheckPersistType
.
all
);
emc
.
commit
();
...
...
@@ -96,9 +97,7 @@ class V2Reset extends BaseAction {
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
result
.
setData
(
wo
);
return
result
;
};
return
ProcessPlatformExecutorFactory
.
get
(
job
).
submit
(
callable
).
get
(
300
,
TimeUnit
.
SECONDS
);
}
}
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/schedule/PassExpired.java
浏览文件 @
fbf04c02
...
...
@@ -42,7 +42,7 @@ import com.x.processplatform.core.entity.content.WorkLog;
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.
WrapProcessing
;
import
com.x.processplatform.core.express.service.processing.jaxrs.task.
ProcessingWi
;
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.service.processing.Business
;
...
...
@@ -124,7 +124,7 @@ public class PassExpired extends AbstractJob {
}
private
String
porcessingTask
(
Task
task
)
throws
Exception
{
WrapProcessing
req
=
new
WrapProcessing
();
ProcessingWi
req
=
new
ProcessingWi
();
req
.
setProcessingType
(
TaskCompleted
.
PROCESSINGTYPE_PASSEXPIRED
);
WoId
resp
=
ThisApplication
.
context
().
applications
()
.
putQuery
(
x_processplatform_service_processing
.
class
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录