Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
02c81db4
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,发现更多精彩内容 >>
提交
02c81db4
编写于
7月 07, 2021
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
视图查询内容管理文档字段支持不等于条件
上级
6ef67d81
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
38 addition
and
24 deletion
+38
-24
o2server/x_query_core_express/src/main/java/com/x/query/core/express/plan/CmsPlan.java
.../src/main/java/com/x/query/core/express/plan/CmsPlan.java
+38
-24
未找到文件。
o2server/x_query_core_express/src/main/java/com/x/query/core/express/plan/CmsPlan.java
浏览文件 @
02c81db4
...
...
@@ -268,11 +268,12 @@ public class CmsPlan extends Plan {
private
Predicate
documentPredicate
(
CriteriaBuilder
cb
,
Root
<
Document
>
root
,
Runtime
runtime
,
List
<
FilterEntry
>
filterList
)
throws
Exception
{
List
<
Predicate
>
ps
=
new
TreeList
<>();
//
ps.add(this.documentPredicate_creator(cb, root));
ps
.
add
(
this
.
documentPredicate_creator
(
cb
,
root
));
ps
.
add
(
this
.
documentPredicate_appInfo
(
cb
,
root
));
//ps.add(this.documentPredicate_date(cb, root));
ps
.
add
(
this
.
documentPredicate_Filter
(
cb
,
root
,
runtime
,
filterList
));
//ps.add(this.documentPredicate_draft(cb, root));
ps
.
add
(
this
.
documentPredicate_date
(
cb
,
root
));
ps
.
add
(
this
.
documentPredicate_Filter_or
(
cb
,
root
,
runtime
,
filterList
));
ps
.
add
(
this
.
documentPredicate_Filter_and
(
cb
,
root
,
runtime
,
filterList
));
ps
.
add
(
this
.
documentPredicate_draft
(
cb
,
root
));
Predicate
predicate
=
this
.
documentPredicate_typeScope
(
cb
,
root
);
if
(
predicate
!=
null
)
{
...
...
@@ -384,12 +385,9 @@ public class CmsPlan extends Plan {
return
null
;
}
private
Predicate
documentPredicate_Filter
(
CriteriaBuilder
cb
,
Root
<
Document
>
root
,
Runtime
runtime
,
private
Predicate
documentPredicate_Filter
_or
(
CriteriaBuilder
cb
,
Root
<
Document
>
root
,
Runtime
runtime
,
List
<
FilterEntry
>
filterList
)
throws
Exception
{
boolean
flag
=
true
;
boolean
orFlag
=
false
;
boolean
andFlag
=
false
;
Predicate
rp
=
cb
.
conjunction
();
Predicate
p
=
cb
.
disjunction
();
List
<
FilterEntry
>
list
=
new
ArrayList
<>();
list
.
addAll
(
filterList
);
...
...
@@ -398,10 +396,9 @@ public class CmsPlan extends Plan {
}
for
(
FilterEntry
filterEntry
:
list
)
{
if
(
filterEntry
.
path
.
indexOf
(
"("
)
>
-
1
&&
filterEntry
.
path
.
indexOf
(
")"
)
>
-
1
)
{
flag
=
false
;
String
path
=
StringUtils
.
substringBetween
(
filterEntry
.
path
,
"("
,
")"
).
trim
();
if
(
"readPersonList"
.
equals
(
path
))
{
orFlag
=
tru
e
;
flag
=
fals
e
;
p
=
cb
.
or
(
p
,
cb
.
isMember
(
"所有人"
,
root
.
get
(
Document_
.
readPersonList
)));
p
=
cb
.
or
(
p
,
cb
.
isMember
(
runtime
.
person
,
root
.
get
(
Document_
.
readPersonList
)));
if
(
runtime
.
person
.
indexOf
(
"@"
)
>
-
1
)
{
...
...
@@ -409,22 +406,19 @@ public class CmsPlan extends Plan {
root
.
get
(
Document_
.
readPersonList
)));
}
}
else
if
(
"readUnitList"
.
equals
(
path
))
{
orFlag
=
tru
e
;
flag
=
fals
e
;
if
(
ListTools
.
isNotEmpty
(
runtime
.
unitAllList
))
{
p
=
cb
.
or
(
p
,
root
.
get
(
Document_
.
readUnitList
).
in
(
runtime
.
unitAllList
));
}
}
else
if
(
"readGroupList"
.
equals
(
path
))
{
orFlag
=
tru
e
;
flag
=
fals
e
;
if
(
ListTools
.
isNotEmpty
(
runtime
.
groupList
))
{
p
=
cb
.
or
(
p
,
root
.
get
(
Document_
.
readGroupList
).
in
(
runtime
.
groupList
));
}
}
else
{
if
(!
StringUtils
.
equals
(
"and"
,
filterEntry
.
logic
))
{
Predicate
fp
=
filterEntry
.
toCmsDocumentPredicate
(
cb
,
root
,
runtime
,
path
);
if
(
Comparison
.
isEquals
(
filterEntry
.
logic
))
{
andFlag
=
true
;
rp
=
cb
.
and
(
rp
,
fp
);
}
else
{
orFlag
=
true
;
flag
=
false
;
p
=
cb
.
or
(
p
,
fp
);
}
}
...
...
@@ -433,14 +427,34 @@ public class CmsPlan extends Plan {
if
(
flag
)
{
return
null
;
}
if
(
andFlag
){
if
(
orFlag
){
rp
=
cb
.
and
(
rp
,
p
);
return
p
;
}
}
else
{
rp
=
p
;
private
Predicate
documentPredicate_Filter_and
(
CriteriaBuilder
cb
,
Root
<
Document
>
root
,
Runtime
runtime
,
List
<
FilterEntry
>
filterList
)
throws
Exception
{
boolean
flag
=
true
;
Predicate
p
=
cb
.
conjunction
();
List
<
FilterEntry
>
list
=
new
ArrayList
<>();
list
.
addAll
(
filterList
);
if
(
runtime
.
filterList
!=
null
){
list
.
addAll
(
runtime
.
filterList
);
}
return
rp
;
for
(
FilterEntry
filterEntry
:
list
)
{
if
(
filterEntry
.
path
.
indexOf
(
"("
)
>
-
1
&&
filterEntry
.
path
.
indexOf
(
")"
)
>
-
1
)
{
String
path
=
StringUtils
.
substringBetween
(
filterEntry
.
path
,
"("
,
")"
).
trim
();
if
(!
"readPersonList"
.
equals
(
path
)
&&
!
"readUnitList"
.
equals
(
path
)
&&
!
"readGroupList"
.
equals
(
path
))
{
if
(
StringUtils
.
equals
(
"and"
,
filterEntry
.
logic
))
{
Predicate
fp
=
filterEntry
.
toCmsDocumentPredicate
(
cb
,
root
,
runtime
,
path
);
flag
=
false
;
p
=
cb
.
and
(
p
,
fp
);
}
}
}
}
if
(
flag
)
{
return
null
;
}
return
p
;
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录