Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
af3d66f7
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
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,发现更多精彩内容 >>
提交
af3d66f7
编写于
12月 03, 2021
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
人员组织查询缓存修改
上级
0e2595bd
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
47 addition
and
40 deletion
+47
-40
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/GroupFactory.java
...x/organization/assemble/control/factory/GroupFactory.java
+6
-4
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/IdentityFactory.java
...rganization/assemble/control/factory/IdentityFactory.java
+6
-4
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/PersonFactory.java
.../organization/assemble/control/factory/PersonFactory.java
+6
-4
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/UnitDutyFactory.java
...rganization/assemble/control/factory/UnitDutyFactory.java
+7
-5
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/UnitFactory.java
.../x/organization/assemble/control/factory/UnitFactory.java
+7
-5
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/factory/IdentityFactory.java
...rganization/assemble/express/factory/IdentityFactory.java
+2
-2
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/factory/PersonFactory.java
.../organization/assemble/express/factory/PersonFactory.java
+3
-3
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/factory/UnitDutyFactory.java
...rganization/assemble/express/factory/UnitDutyFactory.java
+6
-3
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/factory/UnitFactory.java
.../x/organization/assemble/express/factory/UnitFactory.java
+3
-3
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListWithUnitSubDirectObject.java
...press/jaxrs/person/ActionListWithUnitSubDirectObject.java
+1
-7
未找到文件。
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/GroupFactory.java
浏览文件 @
af3d66f7
...
@@ -41,13 +41,15 @@ public class GroupFactory extends AbstractFactory {
...
@@ -41,13 +41,15 @@ public class GroupFactory extends AbstractFactory {
}
}
Group
o
=
null
;
Group
o
=
null
;
CacheKey
cacheKey
=
new
CacheKey
(
flag
);
CacheKey
cacheKey
=
new
CacheKey
(
Group
.
class
.
getName
(),
flag
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
o
=
(
Group
)
optional
.
get
();
o
=
(
Group
)
optional
.
get
();
}
else
{
}
else
{
o
=
this
.
pickObject
(
flag
);
o
=
this
.
pickObject
(
flag
);
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
if
(
null
!=
o
)
{
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
}
}
}
return
o
;
return
o
;
}
}
...
@@ -55,7 +57,7 @@ public class GroupFactory extends AbstractFactory {
...
@@ -55,7 +57,7 @@ public class GroupFactory extends AbstractFactory {
public
List
<
Group
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
public
List
<
Group
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
List
<
Group
>
list
=
new
ArrayList
<>();
List
<
Group
>
list
=
new
ArrayList
<>();
for
(
String
str
:
flags
)
{
for
(
String
str
:
flags
)
{
CacheKey
cacheKey
=
new
CacheKey
(
str
);
CacheKey
cacheKey
=
new
CacheKey
(
Group
.
class
.
getName
(),
str
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
list
.
add
((
Group
)
optional
.
get
());
list
.
add
((
Group
)
optional
.
get
());
...
@@ -258,4 +260,4 @@ public class GroupFactory extends AbstractFactory {
...
@@ -258,4 +260,4 @@ public class GroupFactory extends AbstractFactory {
return
this
.
entityManagerContainer
().
list
(
Group
.
class
,
ids
);
return
this
.
entityManagerContainer
().
list
(
Group
.
class
,
ids
);
}
}
}
}
\ No newline at end of file
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/IdentityFactory.java
浏览文件 @
af3d66f7
...
@@ -37,13 +37,15 @@ public class IdentityFactory extends AbstractFactory {
...
@@ -37,13 +37,15 @@ public class IdentityFactory extends AbstractFactory {
return
null
;
return
null
;
}
}
Identity
o
=
null
;
Identity
o
=
null
;
CacheKey
cacheKey
=
new
CacheKey
(
flag
);
CacheKey
cacheKey
=
new
CacheKey
(
Identity
.
class
.
getName
(),
flag
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
o
=
(
Identity
)
optional
.
get
();
o
=
(
Identity
)
optional
.
get
();
}
else
{
}
else
{
o
=
this
.
pickObject
(
flag
);
o
=
this
.
pickObject
(
flag
);
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
if
(
null
!=
o
)
{
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
}
}
}
return
o
;
return
o
;
}
}
...
@@ -82,14 +84,14 @@ public class IdentityFactory extends AbstractFactory {
...
@@ -82,14 +84,14 @@ public class IdentityFactory extends AbstractFactory {
public
List
<
Identity
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
public
List
<
Identity
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
List
<
Identity
>
list
=
new
ArrayList
<>();
List
<
Identity
>
list
=
new
ArrayList
<>();
for
(
String
str
:
flags
)
{
for
(
String
str
:
flags
)
{
CacheKey
cacheKey
=
new
CacheKey
(
str
);
CacheKey
cacheKey
=
new
CacheKey
(
Identity
.
class
.
getName
(),
str
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
list
.
add
((
Identity
)
optional
.
get
());
list
.
add
((
Identity
)
optional
.
get
());
}
else
{
}
else
{
Identity
o
=
this
.
pickObject
(
str
);
Identity
o
=
this
.
pickObject
(
str
);
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
if
(
null
!=
o
)
{
if
(
null
!=
o
)
{
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
list
.
add
(
o
);
list
.
add
(
o
);
}
}
}
}
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/PersonFactory.java
浏览文件 @
af3d66f7
...
@@ -36,13 +36,15 @@ public class PersonFactory extends AbstractFactory {
...
@@ -36,13 +36,15 @@ public class PersonFactory extends AbstractFactory {
return
null
;
return
null
;
}
}
Person
o
=
null
;
Person
o
=
null
;
CacheKey
cacheKey
=
new
CacheKey
(
flag
);
CacheKey
cacheKey
=
new
CacheKey
(
Person
.
class
.
getName
(),
flag
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
o
=
(
Person
)
optional
.
get
();
o
=
(
Person
)
optional
.
get
();
}
else
{
}
else
{
o
=
this
.
pickObject
(
flag
);
o
=
this
.
pickObject
(
flag
);
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
if
(
null
!=
o
)
{
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
}
}
}
return
o
;
return
o
;
}
}
...
@@ -81,14 +83,14 @@ public class PersonFactory extends AbstractFactory {
...
@@ -81,14 +83,14 @@ public class PersonFactory extends AbstractFactory {
public
List
<
Person
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
public
List
<
Person
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
List
<
Person
>
list
=
new
ArrayList
<>();
List
<
Person
>
list
=
new
ArrayList
<>();
for
(
String
str
:
flags
)
{
for
(
String
str
:
flags
)
{
CacheKey
cacheKey
=
new
CacheKey
(
str
);
CacheKey
cacheKey
=
new
CacheKey
(
Person
.
class
.
getName
(),
str
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
list
.
add
((
Person
)
optional
.
get
());
list
.
add
((
Person
)
optional
.
get
());
}
else
{
}
else
{
Person
o
=
this
.
pickObject
(
str
);
Person
o
=
this
.
pickObject
(
str
);
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
if
(
null
!=
o
)
{
if
(
null
!=
o
)
{
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
list
.
add
(
o
);
list
.
add
(
o
);
}
}
}
}
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/UnitDutyFactory.java
浏览文件 @
af3d66f7
...
@@ -36,13 +36,15 @@ public class UnitDutyFactory extends AbstractFactory {
...
@@ -36,13 +36,15 @@ public class UnitDutyFactory extends AbstractFactory {
return
null
;
return
null
;
}
}
UnitDuty
o
=
null
;
UnitDuty
o
=
null
;
CacheKey
cacheKey
=
new
CacheKey
(
flag
);
CacheKey
cacheKey
=
new
CacheKey
(
UnitDuty
.
class
.
getName
(),
flag
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
o
=
(
UnitDuty
)
optional
.
get
();
o
=
(
UnitDuty
)
optional
.
get
();
}
else
{
}
else
{
o
=
this
.
pickObject
(
flag
);
o
=
this
.
pickObject
(
flag
);
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
if
(
null
!=
o
)
{
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
}
}
}
return
o
;
return
o
;
}
}
...
@@ -81,14 +83,14 @@ public class UnitDutyFactory extends AbstractFactory {
...
@@ -81,14 +83,14 @@ public class UnitDutyFactory extends AbstractFactory {
public
List
<
UnitDuty
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
public
List
<
UnitDuty
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
List
<
UnitDuty
>
list
=
new
ArrayList
<>();
List
<
UnitDuty
>
list
=
new
ArrayList
<>();
for
(
String
str
:
flags
)
{
for
(
String
str
:
flags
)
{
CacheKey
cacheKey
=
new
CacheKey
(
str
);
CacheKey
cacheKey
=
new
CacheKey
(
UnitDuty
.
class
.
getName
(),
str
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
list
.
add
((
UnitDuty
)
optional
.
get
());
list
.
add
((
UnitDuty
)
optional
.
get
());
}
else
{
}
else
{
UnitDuty
o
=
this
.
pickObject
(
str
);
UnitDuty
o
=
this
.
pickObject
(
str
);
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
if
(
null
!=
o
)
{
if
(
null
!=
o
)
{
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
list
.
add
(
o
);
list
.
add
(
o
);
}
}
}
}
...
@@ -103,4 +105,4 @@ public class UnitDutyFactory extends AbstractFactory {
...
@@ -103,4 +105,4 @@ public class UnitDutyFactory extends AbstractFactory {
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
return
list
;
return
list
;
}
}
}
}
\ No newline at end of file
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/factory/UnitFactory.java
浏览文件 @
af3d66f7
...
@@ -42,13 +42,15 @@ public class UnitFactory extends AbstractFactory {
...
@@ -42,13 +42,15 @@ public class UnitFactory extends AbstractFactory {
return
null
;
return
null
;
}
}
Unit
o
=
null
;
Unit
o
=
null
;
CacheKey
cacheKey
=
new
CacheKey
(
flag
);
CacheKey
cacheKey
=
new
CacheKey
(
Unit
.
class
.
getName
(),
flag
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
o
=
(
Unit
)
optional
.
get
();
o
=
(
Unit
)
optional
.
get
();
}
else
{
}
else
{
o
=
this
.
pickObject
(
flag
);
o
=
this
.
pickObject
(
flag
);
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
if
(
null
!=
o
)
{
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
}
}
}
return
o
;
return
o
;
}
}
...
@@ -104,14 +106,14 @@ public class UnitFactory extends AbstractFactory {
...
@@ -104,14 +106,14 @@ public class UnitFactory extends AbstractFactory {
public
List
<
Unit
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
public
List
<
Unit
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
List
<
Unit
>
list
=
new
ArrayList
<>();
List
<
Unit
>
list
=
new
ArrayList
<>();
for
(
String
str
:
flags
)
{
for
(
String
str
:
flags
)
{
CacheKey
cacheKey
=
new
CacheKey
(
str
);
CacheKey
cacheKey
=
new
CacheKey
(
Unit
.
class
.
getName
(),
str
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cache
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
list
.
add
((
Unit
)
optional
.
get
());
list
.
add
((
Unit
)
optional
.
get
());
}
else
{
}
else
{
Unit
o
=
this
.
pickObject
(
str
);
Unit
o
=
this
.
pickObject
(
str
);
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
if
(
null
!=
o
)
{
if
(
null
!=
o
)
{
CacheManager
.
put
(
cache
,
cacheKey
,
o
);
list
.
add
(
o
);
list
.
add
(
o
);
}
}
}
}
...
@@ -343,4 +345,4 @@ public class UnitFactory extends AbstractFactory {
...
@@ -343,4 +345,4 @@ public class UnitFactory extends AbstractFactory {
}
}
}
}
}
}
\ No newline at end of file
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/factory/IdentityFactory.java
浏览文件 @
af3d66f7
...
@@ -42,7 +42,7 @@ public class IdentityFactory extends AbstractFactory {
...
@@ -42,7 +42,7 @@ public class IdentityFactory extends AbstractFactory {
return
null
;
return
null
;
}
}
Identity
o
=
null
;
Identity
o
=
null
;
CacheKey
cacheKey
=
new
CacheKey
(
flag
);
CacheKey
cacheKey
=
new
CacheKey
(
Identity
.
class
.
getName
(),
flag
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
o
=
(
Identity
)
optional
.
get
();
o
=
(
Identity
)
optional
.
get
();
...
@@ -89,7 +89,7 @@ public class IdentityFactory extends AbstractFactory {
...
@@ -89,7 +89,7 @@ public class IdentityFactory extends AbstractFactory {
public
List
<
Identity
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
public
List
<
Identity
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
List
<
Identity
>
list
=
new
ArrayList
<>();
List
<
Identity
>
list
=
new
ArrayList
<>();
for
(
String
str
:
flags
)
{
for
(
String
str
:
flags
)
{
CacheKey
cacheKey
=
new
CacheKey
(
str
);
CacheKey
cacheKey
=
new
CacheKey
(
Identity
.
class
.
getName
(),
str
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
list
.
add
((
Identity
)
optional
.
get
());
list
.
add
((
Identity
)
optional
.
get
());
...
...
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/factory/PersonFactory.java
浏览文件 @
af3d66f7
...
@@ -40,7 +40,7 @@ public class PersonFactory extends AbstractFactory {
...
@@ -40,7 +40,7 @@ public class PersonFactory extends AbstractFactory {
return
null
;
return
null
;
}
}
Person
o
=
null
;
Person
o
=
null
;
CacheKey
cacheKey
=
new
CacheKey
(
flag
);
CacheKey
cacheKey
=
new
CacheKey
(
Person
.
class
.
getName
(),
flag
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
o
=
(
Person
)
optional
.
get
();
o
=
(
Person
)
optional
.
get
();
...
@@ -90,7 +90,7 @@ public class PersonFactory extends AbstractFactory {
...
@@ -90,7 +90,7 @@ public class PersonFactory extends AbstractFactory {
public
List
<
Person
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
public
List
<
Person
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
List
<
Person
>
list
=
new
ArrayList
<>();
List
<
Person
>
list
=
new
ArrayList
<>();
for
(
String
str
:
ListTools
.
trim
(
flags
,
true
,
false
))
{
for
(
String
str
:
ListTools
.
trim
(
flags
,
true
,
false
))
{
CacheKey
cacheKey
=
new
CacheKey
(
str
);
CacheKey
cacheKey
=
new
CacheKey
(
Person
.
class
.
getName
(),
str
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
list
.
add
((
Person
)
optional
.
get
());
list
.
add
((
Person
)
optional
.
get
());
...
@@ -210,4 +210,4 @@ public class PersonFactory extends AbstractFactory {
...
@@ -210,4 +210,4 @@ public class PersonFactory extends AbstractFactory {
List
<
String
>
values
=
ListTools
.
extractProperty
(
list
,
JpaObject
.
DISTINGUISHEDNAME
,
String
.
class
,
true
,
true
);
List
<
String
>
values
=
ListTools
.
extractProperty
(
list
,
JpaObject
.
DISTINGUISHEDNAME
,
String
.
class
,
true
,
true
);
return
values
;
return
values
;
}
}
}
}
\ No newline at end of file
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/factory/UnitDutyFactory.java
浏览文件 @
af3d66f7
...
@@ -23,6 +23,9 @@ import com.x.organization.assemble.express.Business;
...
@@ -23,6 +23,9 @@ import com.x.organization.assemble.express.Business;
import
com.x.organization.core.entity.UnitDuty
;
import
com.x.organization.core.entity.UnitDuty
;
import
com.x.organization.core.entity.UnitDuty_
;
import
com.x.organization.core.entity.UnitDuty_
;
/**
* @author sword
*/
public
class
UnitDutyFactory
extends
AbstractFactory
{
public
class
UnitDutyFactory
extends
AbstractFactory
{
private
CacheCategory
cacheCategory
=
new
CacheCategory
(
UnitDuty
.
class
);
private
CacheCategory
cacheCategory
=
new
CacheCategory
(
UnitDuty
.
class
);
...
@@ -36,7 +39,7 @@ public class UnitDutyFactory extends AbstractFactory {
...
@@ -36,7 +39,7 @@ public class UnitDutyFactory extends AbstractFactory {
return
null
;
return
null
;
}
}
UnitDuty
o
=
null
;
UnitDuty
o
=
null
;
CacheKey
cacheKey
=
new
CacheKey
(
flag
);
CacheKey
cacheKey
=
new
CacheKey
(
UnitDuty
.
class
.
getSimpleName
(),
flag
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
o
=
(
UnitDuty
)
optional
.
get
();
o
=
(
UnitDuty
)
optional
.
get
();
...
@@ -83,7 +86,7 @@ public class UnitDutyFactory extends AbstractFactory {
...
@@ -83,7 +86,7 @@ public class UnitDutyFactory extends AbstractFactory {
public
List
<
UnitDuty
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
public
List
<
UnitDuty
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
List
<
UnitDuty
>
list
=
new
ArrayList
<>();
List
<
UnitDuty
>
list
=
new
ArrayList
<>();
for
(
String
str
:
flags
)
{
for
(
String
str
:
flags
)
{
CacheKey
cacheKey
=
new
CacheKey
(
str
);
CacheKey
cacheKey
=
new
CacheKey
(
UnitDuty
.
class
.
getSimpleName
(),
str
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
list
.
add
((
UnitDuty
)
optional
.
get
());
list
.
add
((
UnitDuty
)
optional
.
get
());
...
@@ -105,4 +108,4 @@ public class UnitDutyFactory extends AbstractFactory {
...
@@ -105,4 +108,4 @@ public class UnitDutyFactory extends AbstractFactory {
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
return
list
;
return
list
;
}
}
}
}
\ No newline at end of file
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/factory/UnitFactory.java
浏览文件 @
af3d66f7
...
@@ -42,7 +42,7 @@ public class UnitFactory extends AbstractFactory {
...
@@ -42,7 +42,7 @@ public class UnitFactory extends AbstractFactory {
return
null
;
return
null
;
}
}
Unit
o
=
null
;
Unit
o
=
null
;
CacheKey
cacheKey
=
new
CacheKey
(
flag
);
CacheKey
cacheKey
=
new
CacheKey
(
Unit
.
class
.
getName
(),
flag
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
o
=
(
Unit
)
optional
.
get
();
o
=
(
Unit
)
optional
.
get
();
...
@@ -106,7 +106,7 @@ public class UnitFactory extends AbstractFactory {
...
@@ -106,7 +106,7 @@ public class UnitFactory extends AbstractFactory {
public
List
<
Unit
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
public
List
<
Unit
>
pick
(
List
<
String
>
flags
)
throws
Exception
{
List
<
Unit
>
list
=
new
ArrayList
<>();
List
<
Unit
>
list
=
new
ArrayList
<>();
for
(
String
str
:
flags
)
{
for
(
String
str
:
flags
)
{
CacheKey
cacheKey
=
new
CacheKey
(
str
);
CacheKey
cacheKey
=
new
CacheKey
(
Unit
.
class
.
getName
(),
str
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
Optional
<?>
optional
=
CacheManager
.
get
(
cacheCategory
,
cacheKey
);
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
list
.
add
((
Unit
)
optional
.
get
());
list
.
add
((
Unit
)
optional
.
get
());
...
@@ -307,4 +307,4 @@ public class UnitFactory extends AbstractFactory {
...
@@ -307,4 +307,4 @@ public class UnitFactory extends AbstractFactory {
List
<
String
>
values
=
ListTools
.
extractProperty
(
list
,
JpaObject
.
DISTINGUISHEDNAME
,
String
.
class
,
true
,
true
);
List
<
String
>
values
=
ListTools
.
extractProperty
(
list
,
JpaObject
.
DISTINGUISHEDNAME
,
String
.
class
,
true
,
true
);
return
values
;
return
values
;
}
}
}
}
\ No newline at end of file
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/jaxrs/person/ActionListWithUnitSubDirectObject.java
浏览文件 @
af3d66f7
...
@@ -68,13 +68,7 @@ class ActionListWithUnitSubDirectObject extends BaseAction {
...
@@ -68,13 +68,7 @@ class ActionListWithUnitSubDirectObject extends BaseAction {
private
List
<
Wo
>
list
(
Business
business
,
Wi
wi
)
throws
Exception
{
private
List
<
Wo
>
list
(
Business
business
,
Wi
wi
)
throws
Exception
{
List
<
Wo
>
wos
=
new
ArrayList
<>();
List
<
Wo
>
wos
=
new
ArrayList
<>();
List
<
Unit
>
os
=
business
.
unit
().
pick
(
wi
.
getUnitList
());
List
<
Unit
>
os
=
business
.
unit
().
pick
(
wi
.
getUnitList
());
List
<
String
>
unitIds
=
new
ArrayList
<>();
List
<
String
>
unitIds
=
ListTools
.
extractField
(
os
,
Unit
.
id_FIELDNAME
,
String
.
class
,
true
,
true
);
for
(
Unit
o
:
os
)
{
if
(!
unitIds
.
contains
(
o
.
getId
()))
{
unitIds
.
add
(
o
.
getId
());
}
}
unitIds
=
ListTools
.
trim
(
unitIds
,
true
,
true
);
List
<
Identity
>
list
=
new
ArrayList
<>();
List
<
Identity
>
list
=
new
ArrayList
<>();
if
(
ListTools
.
isNotEmpty
(
unitIds
))
{
if
(
ListTools
.
isNotEmpty
(
unitIds
))
{
list
=
business
.
entityManagerContainer
().
fetchIn
(
Identity
.
class
,
list
=
business
.
entityManagerContainer
().
fetchIn
(
Identity
.
class
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录