Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
bbf87b9a
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,发现更多精彩内容 >>
提交
bbf87b9a
编写于
9月 22, 2020
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
批量查询组织、身份、群组信息修改
上级
b311fff2
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
148 addition
and
27 deletion
+148
-27
o2server/x_base_core_project/src/main/java/com/x/base/core/project/organization/Group.java
...main/java/com/x/base/core/project/organization/Group.java
+63
-0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/organization/Identity.java
...n/java/com/x/base/core/project/organization/Identity.java
+10
-0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/organization/Person.java
...ain/java/com/x/base/core/project/organization/Person.java
+10
-0
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/group/ActionListObject.java
...zation/assemble/express/jaxrs/group/ActionListObject.java
+7
-3
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/group/BaseAction.java
...organization/assemble/express/jaxrs/group/BaseAction.java
+18
-6
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/identity/ActionListObject.java
...ion/assemble/express/jaxrs/identity/ActionListObject.java
+7
-3
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListObject.java
...ation/assemble/express/jaxrs/person/ActionListObject.java
+7
-3
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/unit/ActionListObject.java
...ization/assemble/express/jaxrs/unit/ActionListObject.java
+25
-10
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/unit/BaseAction.java
.../organization/assemble/express/jaxrs/unit/BaseAction.java
+1
-2
未找到文件。
o2server/x_base_core_project/src/main/java/com/x/base/core/project/organization/Group.java
浏览文件 @
bbf87b9a
...
...
@@ -8,6 +8,10 @@ import com.x.base.core.project.gson.GsonPropertyObject;
public
class
Group
extends
GsonPropertyObject
{
@FieldDescribe
(
"匹配字段"
)
private
String
matchKey
;
@FieldDescribe
(
"群组id"
)
private
String
id
;
@FieldDescribe
(
"群组名称"
)
private
String
name
;
@FieldDescribe
(
"群组标识"
)
...
...
@@ -26,6 +30,33 @@ public class Group extends GsonPropertyObject {
private
List
<
String
>
unitList
=
new
ArrayList
<>();
@FieldDescribe
(
"身份成员"
)
private
List
<
String
>
identityList
=
new
ArrayList
<>();
@FieldDescribe
(
"直接下级组织数量"
)
private
Long
subDirectGroupCount
=
0L
;
@FieldDescribe
(
"直接下级用户数量"
)
private
Long
subDirectPersonCount
=
0L
;
@FieldDescribe
(
"直接下级身份数量"
)
private
Long
subDirectIdentityCount
=
0L
;
@FieldDescribe
(
"直接下级组织数量"
)
private
Long
subDirectOrgCount
=
0L
;
public
String
getMatchKey
()
{
return
matchKey
;
}
public
void
setMatchKey
(
String
matchKey
)
{
this
.
matchKey
=
matchKey
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
...
...
@@ -98,4 +129,36 @@ public class Group extends GsonPropertyObject {
public
void
setIdentityList
(
List
<
String
>
identityList
)
{
this
.
identityList
=
identityList
;
}
public
Long
getSubDirectGroupCount
()
{
return
subDirectGroupCount
;
}
public
void
setSubDirectGroupCount
(
Long
subDirectGroupCount
)
{
this
.
subDirectGroupCount
=
subDirectGroupCount
;
}
public
Long
getSubDirectPersonCount
()
{
return
subDirectPersonCount
;
}
public
void
setSubDirectPersonCount
(
Long
subDirectPersonCount
)
{
this
.
subDirectPersonCount
=
subDirectPersonCount
;
}
public
Long
getSubDirectIdentityCount
()
{
return
subDirectIdentityCount
;
}
public
void
setSubDirectIdentityCount
(
Long
subDirectIdentityCount
)
{
this
.
subDirectIdentityCount
=
subDirectIdentityCount
;
}
public
Long
getSubDirectOrgCount
()
{
return
subDirectOrgCount
;
}
public
void
setSubDirectOrgCount
(
Long
subDirectOrgCount
)
{
this
.
subDirectOrgCount
=
subDirectOrgCount
;
}
}
o2server/x_base_core_project/src/main/java/com/x/base/core/project/organization/Identity.java
浏览文件 @
bbf87b9a
...
...
@@ -5,6 +5,8 @@ import com.x.base.core.project.gson.GsonPropertyObject;
public
class
Identity
extends
GsonPropertyObject
{
@FieldDescribe
(
"匹配字段"
)
private
String
matchKey
;
@FieldDescribe
(
"身份名称"
)
private
String
name
;
@FieldDescribe
(
"身份标识"
)
...
...
@@ -28,6 +30,14 @@ public class Identity extends GsonPropertyObject {
@FieldDescribe
(
"是否是设定的主身份"
)
private
Boolean
major
;
public
String
getMatchKey
()
{
return
matchKey
;
}
public
void
setMatchKey
(
String
matchKey
)
{
this
.
matchKey
=
matchKey
;
}
public
String
getName
()
{
return
name
;
}
...
...
o2server/x_base_core_project/src/main/java/com/x/base/core/project/organization/Person.java
浏览文件 @
bbf87b9a
...
...
@@ -8,6 +8,8 @@ import com.x.base.core.project.gson.GsonPropertyObject;
public
class
Person
extends
GsonPropertyObject
{
@FieldDescribe
(
"匹配字段"
)
private
String
matchKey
;
@FieldDescribe
(
"数据库主键"
)
private
String
id
;
@FieldDescribe
(
"个人名称"
)
...
...
@@ -53,6 +55,14 @@ public class Person extends GsonPropertyObject {
@FieldDescribe
(
"华为WeLink id"
)
private
String
weLinkId
;
public
String
getMatchKey
()
{
return
matchKey
;
}
public
void
setMatchKey
(
String
matchKey
)
{
this
.
matchKey
=
matchKey
;
}
public
String
getWeLinkId
()
{
return
weLinkId
;
}
...
...
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/group/ActionListObject.java
浏览文件 @
bbf87b9a
...
...
@@ -57,10 +57,14 @@ class ActionListObject extends BaseAction {
}
private
List
<
Wo
>
list
(
Business
business
,
Wi
wi
)
throws
Exception
{
List
<
Group
>
os
=
business
.
group
().
pick
(
wi
.
getGroupList
());
List
<
Wo
>
wos
=
new
ArrayList
<>();
for
(
Group
o
:
os
)
{
wos
.
add
(
this
.
convert
(
business
,
o
,
Wo
.
class
));
for
(
String
str
:
wi
.
getGroupList
())
{
Group
o
=
business
.
group
().
pick
(
str
);
if
(
o
!=
null
){
Wo
wo
=
this
.
convert
(
business
,
o
,
Wo
.
class
);
wo
.
setMatchKey
(
str
);
wos
.
add
(
wo
);
}
}
return
wos
;
}
...
...
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/group/BaseAction.java
浏览文件 @
bbf87b9a
...
...
@@ -21,8 +21,7 @@ import com.x.organization.core.entity.accredit.Empower;
class
BaseAction
extends
StandardJaxrsAction
{
CacheCategory
cacheCategory
=
new
CacheCategory
(
Identity
.
class
,
Unit
.
class
,
UnitAttribute
.
class
,
UnitDuty
.
class
,
Role
.
class
,
Person
.
class
,
PersonAttribute
.
class
,
Group
.
class
,
Empower
.
class
);
CacheCategory
cacheCategory
=
new
CacheCategory
(
Identity
.
class
,
Unit
.
class
,
Person
.
class
,
Group
.
class
);
static
class
WoGroupAbstract
extends
GsonPropertyObject
{
...
...
@@ -42,6 +41,7 @@ class BaseAction extends StandardJaxrsAction {
protected
<
T
extends
com
.
x
.
base
.
core
.
project
.
organization
.
Group
>
T
convert
(
Business
business
,
Group
group
,
Class
<
T
>
clz
)
throws
Exception
{
T
t
=
clz
.
newInstance
();
t
.
setId
(
group
.
getId
());
t
.
setName
(
group
.
getName
());
t
.
setDescription
(
group
.
getDescription
());
t
.
setUnique
(
group
.
getUnique
());
...
...
@@ -50,26 +50,38 @@ class BaseAction extends StandardJaxrsAction {
if
(
ListTools
.
isNotEmpty
(
group
.
getPersonList
()))
{
for
(
String
str
:
group
.
getPersonList
())
{
Person
o
=
business
.
person
().
pick
(
str
);
t
.
getPersonList
().
add
(
o
.
getDistinguishedName
());
if
(
o
!=
null
)
{
t
.
getPersonList
().
add
(
o
.
getDistinguishedName
());
}
}
t
.
setSubDirectPersonCount
((
long
)
t
.
getPersonList
().
size
());
}
if
(
ListTools
.
isNotEmpty
(
group
.
getGroupList
()))
{
for
(
String
str
:
group
.
getGroupList
())
{
Group
o
=
business
.
group
().
pick
(
str
);
t
.
getGroupList
().
add
(
o
.
getDistinguishedName
());
if
(
o
!=
null
)
{
t
.
getGroupList
().
add
(
o
.
getDistinguishedName
());
}
}
t
.
setSubDirectGroupCount
((
long
)
t
.
getGroupList
().
size
());
}
if
(
ListTools
.
isNotEmpty
(
group
.
getUnitList
()))
{
for
(
String
str
:
group
.
getUnitList
())
{
Unit
o
=
business
.
unit
().
pick
(
str
);
t
.
getUnitList
().
add
(
o
.
getDistinguishedName
());
if
(
o
!=
null
)
{
t
.
getUnitList
().
add
(
o
.
getDistinguishedName
());
}
}
t
.
setSubDirectOrgCount
((
long
)
t
.
getUnitList
().
size
());
}
if
(
ListTools
.
isNotEmpty
(
group
.
getIdentityList
()))
{
for
(
String
str
:
group
.
getIdentityList
())
{
Identity
o
=
business
.
identity
().
pick
(
str
);
t
.
getIdentityList
().
add
(
o
.
getDistinguishedName
());
if
(
o
!=
null
)
{
t
.
getIdentityList
().
add
(
o
.
getDistinguishedName
());
}
}
t
.
setSubDirectIdentityCount
((
long
)
t
.
getIdentityList
().
size
());
}
return
t
;
}
...
...
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/identity/ActionListObject.java
浏览文件 @
bbf87b9a
...
...
@@ -57,10 +57,14 @@ class ActionListObject extends BaseAction {
}
private
List
<
Wo
>
list
(
Business
business
,
Wi
wi
)
throws
Exception
{
List
<
Identity
>
os
=
business
.
identity
().
pick
(
wi
.
getIdentityList
());
List
<
Wo
>
wos
=
new
ArrayList
<>();
for
(
Identity
o
:
os
)
{
wos
.
add
(
this
.
convert
(
business
,
o
,
Wo
.
class
));
for
(
String
str
:
wi
.
getIdentityList
())
{
Identity
o
=
business
.
identity
().
pick
(
str
);
if
(
o
!=
null
){
Wo
wo
=
this
.
convert
(
business
,
o
,
Wo
.
class
);
wo
.
setMatchKey
(
str
);
wos
.
add
(
wo
);
}
}
return
wos
;
}
...
...
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListObject.java
浏览文件 @
bbf87b9a
...
...
@@ -57,10 +57,14 @@ class ActionListObject extends BaseAction {
}
private
List
<
Wo
>
list
(
Business
business
,
Wi
wi
)
throws
Exception
{
List
<
Person
>
os
=
business
.
person
().
pick
(
wi
.
getPersonList
());
List
<
Wo
>
wos
=
new
ArrayList
<>();
for
(
Person
o
:
os
)
{
wos
.
add
(
this
.
convert
(
business
,
o
,
Wo
.
class
));
for
(
String
str
:
wi
.
getPersonList
())
{
Person
o
=
business
.
person
().
pick
(
str
);
if
(
o
!=
null
){
Wo
wo
=
this
.
convert
(
business
,
o
,
Wo
.
class
);
wo
.
setMatchKey
(
str
);
wos
.
add
(
wo
);
}
}
return
wos
;
}
...
...
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/unit/ActionListObject.java
浏览文件 @
bbf87b9a
...
...
@@ -72,6 +72,9 @@ class ActionListObject extends BaseAction {
public
static
class
Wo
extends
Unit
{
private
static
final
long
serialVersionUID
=
-
7913547275132005308L
;
@FieldDescribe
(
"匹配字段"
)
private
String
matchKey
;
@FieldDescribe
(
"直接下级组织数量"
)
private
Long
subDirectUnitCount
=
0L
;
...
...
@@ -81,6 +84,14 @@ class ActionListObject extends BaseAction {
static
WrapCopier
<
Unit
,
Wo
>
copier
=
WrapCopierFactory
.
wo
(
Unit
.
class
,
Wo
.
class
,
null
,
ListTools
.
toList
(
JpaObject
.
FieldsInvisible
,
Unit
.
controllerList_FIELDNAME
,
Unit
.
inheritedControllerList_FIELDNAME
));
public
String
getMatchKey
()
{
return
matchKey
;
}
public
void
setMatchKey
(
String
matchKey
)
{
this
.
matchKey
=
matchKey
;
}
public
Long
getSubDirectUnitCount
()
{
return
subDirectUnitCount
;
}
...
...
@@ -100,18 +111,22 @@ class ActionListObject extends BaseAction {
}
private
List
<
Wo
>
list
(
Business
business
,
Wi
wi
)
throws
Exception
{
List
<
Unit
>
os
=
business
.
unit
().
pick
(
wi
.
getUnitList
());
List
<
Wo
>
wos
=
Wo
.
copier
.
copy
(
os
);
for
(
Wo
wo
:
wos
)
{
if
(
StringUtils
.
isNotEmpty
(
wo
.
getSuperior
()))
{
Unit
superior
=
business
.
unit
().
pick
(
wo
.
getSuperior
());
if
(
null
!=
superior
)
{
wo
.
setSuperior
(
superior
.
getDistinguishedName
());
List
<
Wo
>
wos
=
new
ArrayList
<>();
for
(
String
str
:
wi
.
getUnitList
())
{
Unit
o
=
business
.
unit
().
pick
(
str
);
if
(
o
!=
null
){
Wo
wo
=
Wo
.
copier
.
copy
(
o
);
wo
.
setMatchKey
(
str
);
if
(
StringUtils
.
isNotEmpty
(
wo
.
getSuperior
()))
{
Unit
superior
=
business
.
unit
().
pick
(
wo
.
getSuperior
());
if
(
null
!=
superior
)
{
wo
.
setSuperior
(
superior
.
getDistinguishedName
());
}
}
wo
.
setSubDirectIdentityCount
(
this
.
countSubDirectIdentity
(
business
,
wo
));
wo
.
setSubDirectUnitCount
(
this
.
countSubDirectUnit
(
business
,
wo
));
wos
.
add
(
wo
);
}
wo
.
setSubDirectIdentityCount
(
this
.
countSubDirectIdentity
(
business
,
wo
));
wo
.
setSubDirectUnitCount
(
this
.
countSubDirectUnit
(
business
,
wo
));
}
return
wos
;
}
...
...
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/unit/BaseAction.java
浏览文件 @
bbf87b9a
...
...
@@ -22,8 +22,7 @@ import com.x.organization.core.entity.accredit.Empower;
class
BaseAction
extends
StandardJaxrsAction
{
CacheCategory
cacheCategory
=
new
CacheCategory
(
Identity
.
class
,
Unit
.
class
,
UnitAttribute
.
class
,
UnitDuty
.
class
,
Role
.
class
,
Person
.
class
,
PersonAttribute
.
class
,
Group
.
class
,
Empower
.
class
);
CacheCategory
cacheCategory
=
new
CacheCategory
(
Identity
.
class
,
Unit
.
class
,
UnitAttribute
.
class
,
UnitDuty
.
class
,
Person
.
class
);
static
class
WoUnitListAbstract
extends
GsonPropertyObject
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录