Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
此号慢热型
o2oa
提交
3ad7fbff
o2oa
项目概览
此号慢热型
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
5
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,发现更多精彩内容 >>
提交
3ad7fbff
编写于
2月 19, 2021
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
自建表支持数组查询和展现2
上级
a0908373
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
17 deletion
+28
-17
o2server/x_query_core_express/src/main/java/com/x/query/core/express/plan/Plan.java
...ess/src/main/java/com/x/query/core/express/plan/Plan.java
+11
-7
o2server/x_query_core_express/src/main/java/com/x/query/core/express/plan/Row.java
...ress/src/main/java/com/x/query/core/express/plan/Row.java
+17
-10
未找到文件。
o2server/x_query_core_express/src/main/java/com/x/query/core/express/plan/Plan.java
浏览文件 @
3ad7fbff
...
...
@@ -128,6 +128,8 @@ public abstract class Plan extends GsonPropertyObject {
comp
=
-
1
;
}
else
if
(
null
==
o2
)
{
comp
=
1
;
}
else
if
(
o1
instanceof
Collection
<?>
||
o2
instanceof
Collection
<?>)
{
comp
=
0
;
}
else
{
if
(
o1
.
getClass
()
==
o2
.
getClass
())
{
c1
=
(
Comparable
)
o1
;
...
...
@@ -522,7 +524,9 @@ public abstract class Plan extends GsonPropertyObject {
root
.
get
(
Item_
.
itemStringValueType
),
root
.
get
(
Item_
.
stringShortValue
),
root
.
get
(
Item_
.
stringLongValue
),
root
.
get
(
Item_
.
dateValue
),
root
.
get
(
Item_
.
timeValue
),
root
.
get
(
Item_
.
dateTimeValue
),
root
.
get
(
Item_
.
booleanValue
),
root
.
get
(
Item_
.
numberValue
)).
where
(
p
);
boolean
isList
=
false
;
if
(!
orderList
.
isEmpty
()){
isList
=
true
;
cq
.
orderBy
(
orderList
);
}
List
<
Tuple
>
list
=
em
.
createQuery
(
cq
).
getResultList
();
...
...
@@ -535,25 +539,25 @@ public abstract class Plan extends GsonPropertyObject {
case
s:
if
(
null
!=
o
.
get
(
3
))
{
if
((
null
!=
o
.
get
(
4
))
&&
StringUtils
.
isNotEmpty
(
Objects
.
toString
(
o
.
get
(
4
))))
{
row
.
put
(
selectEntry
.
getColumn
(),
Objects
.
toString
(
o
.
get
(
4
)));
row
.
put
(
selectEntry
.
getColumn
(),
Objects
.
toString
(
o
.
get
(
4
))
,
isList
);
}
else
{
row
.
put
(
selectEntry
.
getColumn
(),
Objects
.
toString
(
o
.
get
(
3
)));
row
.
put
(
selectEntry
.
getColumn
(),
Objects
.
toString
(
o
.
get
(
3
))
,
isList
);
}
}
break
;
case
d:
if
(
null
!=
o
.
get
(
5
))
{
row
.
put
(
selectEntry
.
getColumn
(),
JpaObjectTools
.
confirm
((
Date
)
o
.
get
(
5
)));
row
.
put
(
selectEntry
.
getColumn
(),
JpaObjectTools
.
confirm
((
Date
)
o
.
get
(
5
))
,
isList
);
}
break
;
case
t:
if
(
null
!=
o
.
get
(
6
))
{
row
.
put
(
selectEntry
.
getColumn
(),
JpaObjectTools
.
confirm
((
Date
)
o
.
get
(
6
)));
row
.
put
(
selectEntry
.
getColumn
(),
JpaObjectTools
.
confirm
((
Date
)
o
.
get
(
6
))
,
isList
);
}
break
;
case
dt:
if
(
null
!=
o
.
get
(
7
))
{
row
.
put
(
selectEntry
.
getColumn
(),
JpaObjectTools
.
confirm
((
Date
)
o
.
get
(
7
)));
row
.
put
(
selectEntry
.
getColumn
(),
JpaObjectTools
.
confirm
((
Date
)
o
.
get
(
7
))
,
isList
);
}
break
;
default
:
...
...
@@ -562,12 +566,12 @@ public abstract class Plan extends GsonPropertyObject {
break
;
case
b:
if
(
null
!=
o
.
get
(
8
))
{
row
.
put
(
selectEntry
.
getColumn
(),
(
Boolean
)
o
.
get
(
8
));
row
.
put
(
selectEntry
.
getColumn
(),
(
Boolean
)
o
.
get
(
8
)
,
isList
);
}
break
;
case
n:
if
(
null
!=
o
.
get
(
9
))
{
row
.
put
(
selectEntry
.
getColumn
(),
(
Number
)
o
.
get
(
9
));
row
.
put
(
selectEntry
.
getColumn
(),
(
Number
)
o
.
get
(
9
)
,
isList
);
}
break
;
default
:
...
...
o2server/x_query_core_express/src/main/java/com/x/query/core/express/plan/Row.java
浏览文件 @
3ad7fbff
package
com.x.query.core.express.plan
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.TreeMap
;
import
org.apache.commons.lang3.StringUti
ls
;
import
com.x.base.core.project.tools.ListToo
ls
;
import
org.apache.commons.lang3.math.NumberUtils
;
import
com.x.base.core.project.gson.GsonPropertyObject
;
...
...
@@ -24,16 +25,22 @@ public class Row extends GsonPropertyObject {
}
public
void
put
(
String
key
,
Object
value
)
{
Object
o
=
this
.
data
.
get
(
key
);
if
(
o
!=
null
){
String
s
=
String
.
valueOf
(
o
);
if
(
StringUtils
.
isNotEmpty
(
s
)){
s
=
s
+
","
+
value
;
this
.
data
.
put
(
key
,
s
);
}
else
{
this
.
data
.
put
(
key
,
value
);
this
.
data
.
put
(
key
,
value
);
}
public
void
put
(
String
key
,
Object
value
,
boolean
isList
)
{
if
(
isList
)
{
Object
o
=
this
.
data
.
get
(
key
);
if
(
o
!=
null
)
{
if
(
o
instanceof
List
<?>)
{
((
List
)
o
).
add
(
value
);
}
else
{
this
.
data
.
put
(
key
,
ListTools
.
toList
(
value
));
}
}
else
{
this
.
data
.
put
(
key
,
ListTools
.
toList
(
value
));
}
}
else
{
}
else
{
this
.
data
.
put
(
key
,
value
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录