Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
f99d7b9c
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,发现更多精彩内容 >>
提交
f99d7b9c
编写于
4月 19, 2020
作者:
Z
Zhou Rui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
版本授权
上级
53abfc78
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
77 addition
and
46 deletion
+77
-46
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/empower/ActionListWithIdentityObject.java
...e/express/jaxrs/empower/ActionListWithIdentityObject.java
+44
-37
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empower/ActionListWithCurrentPersonEnable.java
...onal/jaxrs/empower/ActionListWithCurrentPersonEnable.java
+0
-3
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/accredit/Empower.java
...java/com/x/organization/core/entity/accredit/Empower.java
+15
-0
o2server/x_organization_core_express/src/main/java/com/x/organization/core/express/empower/ActionListWithIdentityObject.java
...on/core/express/empower/ActionListWithIdentityObject.java
+2
-1
o2server/x_organization_core_express/src/main/java/com/x/organization/core/express/empower/BaseAction.java
...a/com/x/organization/core/express/empower/BaseAction.java
+11
-0
o2server/x_organization_core_express/src/main/java/com/x/organization/core/express/empower/EmpowerFactory.java
...m/x/organization/core/express/empower/EmpowerFactory.java
+3
-3
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/manual/ManualProcessor.java
.../service/processing/processor/manual/ManualProcessor.java
+2
-2
未找到文件。
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/empower/ActionListWithIdentityObject.java
浏览文件 @
f99d7b9c
...
...
@@ -14,8 +14,6 @@ import javax.persistence.criteria.CriteriaQuery;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
org.apache.commons.lang3.StringUtils
;
import
com.google.gson.JsonElement
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
...
...
@@ -23,10 +21,8 @@ import com.x.base.core.entity.JpaObject;
import
com.x.base.core.project.Applications
;
import
com.x.base.core.project.x_processplatform_assemble_surface
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.cache.ApplicationCache
;
import
com.x.base.core.project.connection.ActionResponse
;
import
com.x.base.core.project.gson.GsonPropertyObject
;
import
com.x.base.core.project.gson.XGsonBuilder
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.base.core.project.logger.Logger
;
...
...
@@ -39,7 +35,7 @@ import com.x.organization.core.entity.accredit.Empower;
import
com.x.organization.core.entity.accredit.Empower_
;
import
com.x.organization.core.entity.accredit.Filter
;
import
net.sf.ehcache.Element
;
import
org.apache.commons.lang3.StringUtils
;
class
ActionListWithIdentityObject
extends
BaseAction
{
...
...
@@ -61,6 +57,9 @@ class ActionListWithIdentityObject extends BaseAction {
@FieldDescribe
(
"应用"
)
private
String
application
;
@FieldDescribe
(
"流程版本"
)
private
String
edition
;
@FieldDescribe
(
"流程"
)
private
String
process
;
...
...
@@ -102,6 +101,14 @@ class ActionListWithIdentityObject extends BaseAction {
this
.
work
=
work
;
}
public
String
getEdition
()
{
return
edition
;
}
public
void
setEdition
(
String
edition
)
{
this
.
edition
=
edition
;
}
}
public
static
class
Wo
extends
Empower
{
...
...
@@ -131,25 +138,7 @@ class ActionListWithIdentityObject extends BaseAction {
List
<
Empower
>
list
=
map
.
get
(
str
);
if
(
ListTools
.
isNotEmpty
(
list
))
{
list
.
sort
(
new
Comparator
<
Empower
>()
{
public
int
compare
(
Empower
o1
,
Empower
o2
)
{
if
(
StringUtils
.
equals
(
Empower
.
TYPE_FILTER
,
o1
.
getType
()))
{
return
-
1
;
}
else
if
(
StringUtils
.
equals
(
Empower
.
TYPE_FILTER
,
o2
.
getType
()))
{
return
1
;
}
else
if
(
StringUtils
.
equals
(
Empower
.
TYPE_PROCESS
,
o1
.
getType
()))
{
return
-
1
;
}
else
if
(
StringUtils
.
equals
(
Empower
.
TYPE_PROCESS
,
o2
.
getType
()))
{
return
1
;
}
else
if
(
StringUtils
.
equals
(
Empower
.
TYPE_APPLICATION
,
o1
.
getType
()))
{
return
-
1
;
}
else
if
(
StringUtils
.
equals
(
Empower
.
TYPE_APPLICATION
,
o2
.
getType
()))
{
return
1
;
}
else
{
return
0
;
}
}
});
list
.
sort
(
new
EmpowerComparator
());
Empower
empower
=
this
.
pick
(
business
,
list
,
wi
.
getWork
());
if
(
null
!=
empower
)
{
Wo
wo
=
new
Wo
(
str
,
str
);
...
...
@@ -163,6 +152,7 @@ class ActionListWithIdentityObject extends BaseAction {
private
Empower
pick
(
Business
business
,
List
<
Empower
>
list
,
String
work
)
throws
Exception
{
for
(
Empower
empower
:
list
)
{
if
(
StringUtils
.
equals
(
Empower
.
TYPE_FILTER
,
empower
.
getType
())
&&
StringUtils
.
isNotEmpty
(
empower
.
getFilterListData
()))
{
List
<
Filter
>
filters
=
gson
.
fromJson
(
empower
.
getFilterListData
(),
Filter
.
LISTTYPE
);
...
...
@@ -171,12 +161,8 @@ class ActionListWithIdentityObject extends BaseAction {
x_processplatform_assemble_surface
.
class
,
Applications
.
joinQueryUri
(
"data"
,
"work"
,
work
)
+
"/"
+
StringUtils
.
replace
(
filter
.
path
,
"."
,
"/"
));
if
(
null
!=
response
.
getData
())
{
switch
(
Objects
.
toString
(
filter
.
formatType
,
""
))
{
default
:
if
(
StringUtils
.
equals
(
filter
.
value
,
response
.
getData
().
getAsString
()))
{
return
empower
;
}
break
;
if
(
StringUtils
.
equals
(
filter
.
value
,
response
.
getData
().
getAsString
()))
{
return
empower
;
}
}
else
{
return
empower
;
...
...
@@ -186,6 +172,26 @@ class ActionListWithIdentityObject extends BaseAction {
return
list
.
get
(
0
);
}
private
class
EmpowerComparator
implements
Comparator
<
Empower
>
{
public
int
compare
(
Empower
o1
,
Empower
o2
)
{
if
(
StringUtils
.
equals
(
Empower
.
TYPE_FILTER
,
o1
.
getType
()))
{
return
-
1
;
}
else
if
(
StringUtils
.
equals
(
Empower
.
TYPE_FILTER
,
o2
.
getType
()))
{
return
1
;
}
else
if
(
StringUtils
.
equals
(
Empower
.
TYPE_PROCESS
,
o1
.
getType
()))
{
return
-
1
;
}
else
if
(
StringUtils
.
equals
(
Empower
.
TYPE_PROCESS
,
o2
.
getType
()))
{
return
1
;
}
else
if
(
StringUtils
.
equals
(
Empower
.
TYPE_APPLICATION
,
o1
.
getType
()))
{
return
-
1
;
}
else
if
(
StringUtils
.
equals
(
Empower
.
TYPE_APPLICATION
,
o2
.
getType
()))
{
return
1
;
}
else
{
return
0
;
}
}
}
private
List
<
Empower
>
list
(
Business
business
,
Wi
wi
)
throws
Exception
{
List
<
Identity
>
identities
=
business
.
identity
().
pick
(
wi
.
getIdentityList
());
...
...
@@ -198,18 +204,19 @@ class ActionListWithIdentityObject extends BaseAction {
Predicate
p
=
cb
.
or
(
cb
.
equal
(
root
.
get
(
Empower_
.
type
),
Empower
.
TYPE_ALL
),
cb
.
and
(
cb
.
equal
(
root
.
get
(
Empower_
.
type
),
Empower
.
TYPE_APPLICATION
),
cb
.
equal
(
root
.
get
(
Empower_
.
application
),
wi
.
getApplication
())),
cb
.
and
(
cb
.
equal
(
root
.
get
(
Empower_
.
type
),
Empower
.
TYPE_PROCESS
),
cb
.
equal
(
root
.
get
(
Empower_
.
process
),
wi
.
getProcess
())),
cb
.
and
(
cb
.
equal
(
root
.
get
(
Empower_
.
type
),
Empower
.
TYPE_FILTER
),
cb
.
equal
(
root
.
get
(
Empower_
.
process
),
wi
.
getProcess
())));
cb
.
and
(
cb
.
equal
(
root
.
get
(
Empower_
.
type
),
Empower
.
TYPE_PROCESS
),
cb
.
or
(
cb
.
and
(
cb
.
isNotNull
(
root
.
get
(
Empower_
.
edition
)),
cb
.
notEqual
(
root
.
get
(
Empower_
.
edition
),
""
),
cb
.
equal
(
root
.
get
(
Empower_
.
edition
),
wi
.
getEdition
())),
cb
.
equal
(
root
.
get
(
Empower_
.
process
),
wi
.
getProcess
()))),
cb
.
and
(
cb
.
equal
(
root
.
get
(
Empower_
.
type
),
Empower
.
TYPE_FILTER
),
cb
.
or
(
cb
.
and
(
cb
.
isNotNull
(
root
.
get
(
Empower_
.
edition
)),
cb
.
notEqual
(
root
.
get
(
Empower_
.
edition
),
""
),
cb
.
equal
(
root
.
get
(
Empower_
.
edition
),
wi
.
getEdition
())),
cb
.
equal
(
root
.
get
(
Empower_
.
process
),
wi
.
getProcess
()))));
p
=
cb
.
and
(
p
,
root
.
get
(
Empower_
.
fromIdentity
).
in
(
names
));
// p = cb.and(p, cb.isMember(root.get(Empower_.fromIdentity),
// cb.literal(names)));
p
=
cb
.
and
(
p
,
cb
.
equal
(
root
.
get
(
Empower_
.
enable
),
true
));
p
=
cb
.
and
(
p
,
cb
.
lessThan
(
root
.
get
(
Empower_
.
startTime
),
new
Date
()),
cb
.
greaterThan
(
root
.
get
(
Empower_
.
completedTime
),
new
Date
()));
return
em
.
createQuery
(
cq
.
select
(
root
).
where
(
p
).
distinct
(
true
)).
getResultList
();
}
}
\ No newline at end of file
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/jaxrs/empower/ActionListWithCurrentPersonEnable.java
浏览文件 @
f99d7b9c
...
...
@@ -7,14 +7,11 @@ import com.x.base.core.container.factory.EntityManagerContainerFactory;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.project.bean.WrapCopier
;
import
com.x.base.core.project.bean.WrapCopierFactory
;
import
com.x.base.core.project.cache.ApplicationCache
;
import
com.x.base.core.project.http.ActionResult
;
import
com.x.base.core.project.http.EffectivePerson
;
import
com.x.organization.assemble.personal.Business
;
import
com.x.organization.core.entity.accredit.Empower
;
import
net.sf.ehcache.Element
;
class
ActionListWithCurrentPersonEnable
extends
BaseAction
{
ActionResult
<
List
<
Wo
>>
execute
(
EffectivePerson
effectivePerson
)
throws
Exception
{
...
...
o2server/x_organization_core_entity/src/main/java/com/x/organization/core/entity/accredit/Empower.java
浏览文件 @
f99d7b9c
...
...
@@ -111,6 +111,13 @@ public class Empower extends SliceJpaObject {
@CheckPersist
(
allowEmpty
=
true
)
private
String
applicationAlias
;
public
static
final
String
edition_FIELDNAME
=
"edition"
;
@FieldDescribe
(
"流程版本."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
edition_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
edition_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
edition
;
public
static
final
String
process_FIELDNAME
=
"process"
;
@FieldDescribe
(
"流程ID."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
process_FIELDNAME
)
...
...
@@ -287,4 +294,12 @@ public class Empower extends SliceJpaObject {
this
.
type
=
type
;
}
public
String
getEdition
()
{
return
edition
;
}
public
void
setEdition
(
String
edition
)
{
this
.
edition
=
edition
;
}
}
\ No newline at end of file
o2server/x_organization_core_express/src/main/java/com/x/organization/core/express/empower/ActionListWithIdentityObject.java
浏览文件 @
f99d7b9c
...
...
@@ -9,7 +9,7 @@ import com.x.base.core.project.organization.Empower;
class
ActionListWithIdentityObject
extends
BaseAction
{
public
static
List
<
Empower
>
execute
(
AbstractContext
context
,
String
application
,
String
process
,
String
work
,
public
static
List
<
Empower
>
execute
(
AbstractContext
context
,
String
application
,
String
edition
,
String
process
,
String
work
,
Collection
<
String
>
collection
)
throws
Exception
{
Wi
wi
=
new
Wi
();
List
<
Empower
>
wos
=
new
ArrayList
<>();
...
...
@@ -17,6 +17,7 @@ class ActionListWithIdentityObject extends BaseAction {
wi
.
getIdentityList
().
addAll
(
collection
);
wi
.
setApplication
(
application
);
wi
.
setProcess
(
process
);
wi
.
setEdition
(
edition
);
wi
.
setWork
(
work
);
wos
=
context
.
applications
().
postQuery
(
applicationClass
,
"empower/list/identity/object"
,
wi
)
.
getDataAsList
(
Empower
.
class
);
...
...
o2server/x_organization_core_express/src/main/java/com/x/organization/core/express/empower/BaseAction.java
浏览文件 @
f99d7b9c
...
...
@@ -19,6 +19,9 @@ abstract class BaseAction {
@FieldDescribe
(
"应用"
)
private
String
application
;
@FieldDescribe
(
"流程版本"
)
private
String
edition
;
@FieldDescribe
(
"流程"
)
private
String
process
;
...
...
@@ -57,6 +60,14 @@ abstract class BaseAction {
this
.
process
=
process
;
}
public
String
getEdition
()
{
return
edition
;
}
public
void
setEdition
(
String
edition
)
{
this
.
edition
=
edition
;
}
}
}
o2server/x_organization_core_express/src/main/java/com/x/organization/core/express/empower/EmpowerFactory.java
浏览文件 @
f99d7b9c
...
...
@@ -16,13 +16,13 @@ public class EmpowerFactory {
private
AbstractContext
context
;
/** 根据应用和流程获取指定身份是否有委托 */
public
List
<
Empower
>
listWithIdentityObject
(
String
application
,
String
process
,
String
work
,
String
value
)
throws
Exception
{
public
List
<
Empower
>
listWithIdentityObject
(
String
application
,
String
edition
,
String
process
,
String
work
,
String
value
)
throws
Exception
{
return
ActionListWithIdentityObject
.
execute
(
context
,
application
,
process
,
work
,
Arrays
.
asList
(
value
));
}
/** 根据应用和流程获取指定身份是否有委托 */
public
List
<
Empower
>
listWithIdentityObject
(
String
application
,
String
process
,
String
work
,
public
List
<
Empower
>
listWithIdentityObject
(
String
application
,
String
edition
,
String
process
,
String
work
,
Collection
<
String
>
values
)
throws
Exception
{
return
ActionListWithIdentityObject
.
execute
(
context
,
application
,
process
,
work
,
values
);
}
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/processor/manual/ManualProcessor.java
浏览文件 @
f99d7b9c
...
...
@@ -330,8 +330,8 @@ public class ManualProcessor extends AbstractManualProcessor {
List
<
String
>
values
=
taskIdentities
.
identities
();
values
=
ListUtils
.
subtract
(
values
,
aeiObjects
.
getProcessingAttributes
().
getIgnoreEmpowerIdentityList
());
taskIdentities
.
empower
(
aeiObjects
.
business
().
organization
().
empower
().
listWithIdentityObject
(
aeiObjects
.
getWork
().
getApplication
(),
aeiObjects
.
get
Work
().
getProcess
(),
aeiObjects
.
getWork
().
getId
(),
values
));
aeiObjects
.
getWork
().
getApplication
(),
aeiObjects
.
get
Process
().
getEdition
(),
aeiObjects
.
getWork
().
get
Process
(),
aeiObjects
.
getWork
().
get
Id
(),
values
));
for
(
TaskIdentity
taskIdentity
:
taskIdentities
)
{
if
(
StringUtils
.
isNotEmpty
(
taskIdentity
.
getFromIdentity
()))
{
aeiObjects
.
getWork
().
getProperties
().
getManualEmpowerMap
().
put
(
taskIdentity
.
getIdentity
(),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录