Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
b5e0c6bd
提交
b5e0c6bd
authored
10月 12, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev' into dev
上级
30a7ec80
f8a4a56d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
248 行增加
和
153 行删除
+248
-153
CKQueryProvider.java
...rc/main/java/io/dataease/provider/ck/CKQueryProvider.java
+0
-0
DorisQueryProvider.java
...n/java/io/dataease/provider/doris/DorisQueryProvider.java
+31
-9
EsQueryProvider.java
...rc/main/java/io/dataease/provider/es/EsQueryProvider.java
+22
-6
MysqlQueryProvider.java
...n/java/io/dataease/provider/mysql/MysqlQueryProvider.java
+31
-9
OracleQueryProvider.java
...java/io/dataease/provider/oracle/OracleQueryProvider.java
+35
-13
PgQueryProvider.java
...rc/main/java/io/dataease/provider/pg/PgQueryProvider.java
+22
-6
SqlserverQueryProvider.java
...o/dataease/provider/sqlserver/SqlserverQueryProvider.java
+26
-10
en.js
frontend/src/lang/en.js
+4
-2
tw.js
frontend/src/lang/tw.js
+4
-2
zh.js
frontend/src/lang/zh.js
+2
-0
DimensionFilterEditor.vue
...c/views/chart/components/filter/DimensionFilterEditor.vue
+57
-62
QuotaFilterEditor.vue
...d/src/views/chart/components/filter/QuotaFilterEditor.vue
+0
-10
ResultFilterEditor.vue
.../src/views/chart/components/filter/ResultFilterEditor.vue
+11
-21
ChartEdit.vue
frontend/src/views/chart/view/ChartEdit.vue
+3
-3
没有找到文件。
backend/src/main/java/io/dataease/provider/ck/CKQueryProvider.java
浏览文件 @
b5e0c6bd
差异被折叠。
点击展开。
backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java
浏览文件 @
b5e0c6bd
...
...
@@ -700,7 +700,7 @@ public class DorisQueryProvider extends QueryProvider {
}
@Override
public
String
convertTableToSql
(
String
tableName
,
Datasource
ds
){
public
String
convertTableToSql
(
String
tableName
,
Datasource
ds
)
{
return
createSQLPreview
(
"SELECT * FROM "
+
String
.
format
(
DorisConstants
.
KEYWORD_TABLE
,
tableName
),
null
);
}
...
...
@@ -734,9 +734,13 @@ public class DorisQueryProvider extends QueryProvider {
case
"not like"
:
return
" NOT LIKE "
;
case
"null"
:
return
" I
N
"
;
return
" I
S NULL
"
;
case
"not_null"
:
return
" IS NOT NULL AND %s <> ''"
;
return
" IS NOT NULL "
;
case
"empty"
:
return
" = "
;
case
"not_empty"
:
return
" <> "
;
case
"between"
:
return
" BETWEEN "
;
default
:
...
...
@@ -783,9 +787,15 @@ public class DorisQueryProvider extends QueryProvider {
whereName
=
originName
;
}
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"null"
))
{
whereValue
=
DorisConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originName
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
value
,
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"like"
))
{
...
...
@@ -952,9 +962,15 @@ public class DorisQueryProvider extends QueryProvider {
whereName
=
originField
;
}
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"null"
))
{
whereValue
=
DorisConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originField
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
f
.
getValue
(),
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"like"
))
{
...
...
@@ -1003,9 +1019,15 @@ public class DorisQueryProvider extends QueryProvider {
String
whereValue
=
""
;
// 原始类型不是时间,在de中被转成时间的字段做处理
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"null"
))
{
whereValue
=
DorisConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originField
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
f
.
getValue
(),
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"like"
))
{
...
...
backend/src/main/java/io/dataease/provider/es/EsQueryProvider.java
浏览文件 @
b5e0c6bd
...
...
@@ -682,9 +682,13 @@ public class EsQueryProvider extends QueryProvider {
case
"not like"
:
return
" NOT LIKE "
;
case
"null"
:
return
" I
N
"
;
return
" I
S NULL
"
;
case
"not_null"
:
return
" IS NOT NULL AND %s <> ''"
;
return
" IS NOT NULL "
;
case
"empty"
:
return
" = "
;
case
"not_empty"
:
return
" <> "
;
case
"between"
:
return
" BETWEEN "
;
default
:
...
...
@@ -730,9 +734,15 @@ public class EsQueryProvider extends QueryProvider {
whereName
=
originName
;
}
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"null"
))
{
whereValue
=
EsSqlLConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originName
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
value
,
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"like"
))
{
...
...
@@ -913,9 +923,15 @@ public class EsQueryProvider extends QueryProvider {
String
whereValue
=
""
;
// 原始类型不是时间,在de中被转成时间的字段做处理
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"null"
))
{
whereValue
=
EsSqlLConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originField
);
// whereTerm = String.format(whereTerm, originField);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
f
.
getValue
(),
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"like"
))
{
...
...
backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java
浏览文件 @
b5e0c6bd
...
...
@@ -694,7 +694,7 @@ public class MysqlQueryProvider extends QueryProvider {
}
@Override
public
String
convertTableToSql
(
String
tableName
,
Datasource
ds
){
public
String
convertTableToSql
(
String
tableName
,
Datasource
ds
)
{
return
createSQLPreview
(
"SELECT * FROM "
+
String
.
format
(
MySQLConstants
.
KEYWORD_TABLE
,
tableName
),
null
);
}
...
...
@@ -721,9 +721,13 @@ public class MysqlQueryProvider extends QueryProvider {
case
"not like"
:
return
" NOT LIKE "
;
case
"null"
:
return
" I
N
"
;
return
" I
S NULL
"
;
case
"not_null"
:
return
" IS NOT NULL AND %s <> ''"
;
return
" IS NOT NULL "
;
case
"empty"
:
return
" = "
;
case
"not_empty"
:
return
" <> "
;
case
"between"
:
return
" BETWEEN "
;
default
:
...
...
@@ -769,9 +773,15 @@ public class MysqlQueryProvider extends QueryProvider {
whereName
=
originName
;
}
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"null"
))
{
whereValue
=
MySQLConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originName
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
value
,
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"like"
))
{
...
...
@@ -936,9 +946,15 @@ public class MysqlQueryProvider extends QueryProvider {
whereName
=
originField
;
}
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"null"
))
{
whereValue
=
MySQLConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originField
);
// whereTerm = String.format(whereTerm, originField);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
f
.
getValue
(),
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"like"
))
{
...
...
@@ -986,9 +1002,15 @@ public class MysqlQueryProvider extends QueryProvider {
String
whereValue
=
""
;
// 原始类型不是时间,在de中被转成时间的字段做处理
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"null"
))
{
whereValue
=
MySQLConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originField
);
// whereTerm = String.format(whereTerm, originField);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
f
.
getValue
(),
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"like"
))
{
...
...
backend/src/main/java/io/dataease/provider/oracle/OracleQueryProvider.java
浏览文件 @
b5e0c6bd
...
...
@@ -109,10 +109,10 @@ public class OracleQueryProvider extends QueryProvider {
return
st_sql
.
render
();
}
public
void
setSchema
(
SQLObj
tableObj
,
Datasource
ds
){
if
(
ds
!=
null
&&
!
tableObj
.
getTableName
().
startsWith
(
"("
)
&&
!
tableObj
.
getTableName
().
endsWith
(
")"
))
{
public
void
setSchema
(
SQLObj
tableObj
,
Datasource
ds
)
{
if
(
ds
!=
null
&&
!
tableObj
.
getTableName
().
startsWith
(
"("
)
&&
!
tableObj
.
getTableName
().
endsWith
(
")"
))
{
String
schema
=
new
Gson
().
fromJson
(
ds
.
getConfiguration
(),
JdbcConfiguration
.
class
).
getSchema
();
schema
=
String
.
format
(
OracleConstants
.
KEYWORD_TABLE
,
schema
);
schema
=
String
.
format
(
OracleConstants
.
KEYWORD_TABLE
,
schema
);
tableObj
.
setTableName
(
schema
+
"."
+
tableObj
.
getTableName
());
}
}
...
...
@@ -744,9 +744,9 @@ public class OracleQueryProvider extends QueryProvider {
}
@Override
public
String
convertTableToSql
(
String
tableName
,
Datasource
ds
){
public
String
convertTableToSql
(
String
tableName
,
Datasource
ds
)
{
String
schema
=
new
Gson
().
fromJson
(
ds
.
getConfiguration
(),
JdbcConfiguration
.
class
).
getSchema
();
schema
=
String
.
format
(
OracleConstants
.
KEYWORD_TABLE
,
schema
);
schema
=
String
.
format
(
OracleConstants
.
KEYWORD_TABLE
,
schema
);
return
createSQLPreview
(
"SELECT * FROM "
+
schema
+
"."
+
String
.
format
(
OracleConstants
.
KEYWORD_TABLE
,
tableName
),
null
);
}
...
...
@@ -773,9 +773,13 @@ public class OracleQueryProvider extends QueryProvider {
case
"not like"
:
return
" NOT LIKE "
;
case
"null"
:
return
" I
N
"
;
return
" I
S NULL
"
;
case
"not_null"
:
return
" IS NOT NULL AND %s <> ''"
;
return
" IS NOT NULL "
;
case
"empty"
:
return
" = "
;
case
"not_empty"
:
return
" <> "
;
case
"between"
:
return
" BETWEEN "
;
default
:
...
...
@@ -823,9 +827,15 @@ public class OracleQueryProvider extends QueryProvider {
whereName
=
originName
;
}
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"null"
))
{
whereValue
=
OracleConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originName
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
value
,
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"like"
))
{
...
...
@@ -1009,9 +1019,15 @@ public class OracleQueryProvider extends QueryProvider {
whereName
=
originField
;
}
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"null"
))
{
whereValue
=
OracleConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originField
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
f
.
getValue
(),
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"like"
))
{
...
...
@@ -1059,9 +1075,15 @@ public class OracleQueryProvider extends QueryProvider {
String
whereValue
=
""
;
// 原始类型不是时间,在de中被转成时间的字段做处理
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"null"
))
{
whereValue
=
OracleConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originField
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
f
.
getValue
(),
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"like"
))
{
...
...
backend/src/main/java/io/dataease/provider/pg/PgQueryProvider.java
浏览文件 @
b5e0c6bd
...
...
@@ -750,9 +750,13 @@ public class PgQueryProvider extends QueryProvider {
case
"not like"
:
return
" NOT LIKE "
;
case
"null"
:
return
" I
N
"
;
return
" I
S NULL
"
;
case
"not_null"
:
return
" IS NOT NULL AND %s <> ''"
;
return
" IS NOT NULL "
;
case
"empty"
:
return
" = "
;
case
"not_empty"
:
return
" <> "
;
case
"between"
:
return
" BETWEEN "
;
default
:
...
...
@@ -798,9 +802,15 @@ public class PgQueryProvider extends QueryProvider {
whereName
=
originName
;
}
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"null"
))
{
whereValue
=
PgConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originName
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
value
,
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"like"
))
{
...
...
@@ -980,9 +990,15 @@ public class PgQueryProvider extends QueryProvider {
String
whereValue
=
""
;
// 原始类型不是时间,在de中被转成时间的字段做处理
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"null"
))
{
whereValue
=
PgConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originField
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
f
.
getValue
(),
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"like"
))
{
...
...
backend/src/main/java/io/dataease/provider/sqlserver/SqlserverQueryProvider.java
浏览文件 @
b5e0c6bd
...
...
@@ -149,7 +149,7 @@ public class SqlserverQueryProvider extends QueryProvider {
@Override
public
String
createQueryTableWithPage
(
String
table
,
List
<
DatasetTableField
>
fields
,
Integer
page
,
Integer
pageSize
,
Integer
realSize
,
boolean
isGroup
,
Datasource
ds
)
{
Integer
size
=
(
page
-
1
)*
pageSize
+
realSize
;
Integer
size
=
(
page
-
1
)
*
pageSize
+
realSize
;
return
String
.
format
(
"SELECT top %s * from ( %s ) AS DE_SQLSERVER_TMP "
,
size
.
toString
(),
createQuerySQL
(
table
,
fields
,
isGroup
,
ds
));
}
...
...
@@ -162,7 +162,7 @@ public class SqlserverQueryProvider extends QueryProvider {
@Override
public
String
createQuerySQLWithPage
(
String
sql
,
List
<
DatasetTableField
>
fields
,
Integer
page
,
Integer
pageSize
,
Integer
realSize
,
boolean
isGroup
)
{
Integer
size
=
(
page
-
1
)*
pageSize
+
realSize
;
Integer
size
=
(
page
-
1
)
*
pageSize
+
realSize
;
return
String
.
format
(
"SELECT top %s * from ( %s ) AS DE_SQLSERVER_TMP "
,
size
.
toString
(),
createQuerySQLAsTmp
(
sql
,
fields
,
isGroup
));
}
...
...
@@ -677,9 +677,9 @@ public class SqlserverQueryProvider extends QueryProvider {
}
@Override
public
String
convertTableToSql
(
String
tableName
,
Datasource
ds
){
public
String
convertTableToSql
(
String
tableName
,
Datasource
ds
)
{
String
schema
=
new
Gson
().
fromJson
(
ds
.
getConfiguration
(),
JdbcConfiguration
.
class
).
getSchema
();
schema
=
String
.
format
(
SqlServerSQLConstants
.
KEYWORD_TABLE
,
schema
);
schema
=
String
.
format
(
SqlServerSQLConstants
.
KEYWORD_TABLE
,
schema
);
return
createSQLPreview
(
"SELECT * FROM "
+
schema
+
"."
+
String
.
format
(
SqlServerSQLConstants
.
KEYWORD_TABLE
,
tableName
),
null
);
}
...
...
@@ -706,9 +706,13 @@ public class SqlserverQueryProvider extends QueryProvider {
case
"not like"
:
return
" NOT LIKE "
;
case
"null"
:
return
" I
N
"
;
return
" I
S NULL
"
;
case
"not_null"
:
return
" IS NOT NULL AND %s <> ''"
;
return
" IS NOT NULL "
;
case
"empty"
:
return
" = "
;
case
"not_empty"
:
return
" <> "
;
case
"between"
:
return
" BETWEEN "
;
default
:
...
...
@@ -748,9 +752,15 @@ public class SqlserverQueryProvider extends QueryProvider {
whereName
=
originName
;
}
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"null"
))
{
whereValue
=
SqlServerSQLConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originName
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
request
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
value
,
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
request
.
getTerm
(),
"like"
))
{
...
...
@@ -937,9 +947,15 @@ public class SqlserverQueryProvider extends QueryProvider {
String
whereValue
=
""
;
// 原始类型不是时间,在de中被转成时间的字段做处理
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"null"
))
{
whereValue
=
SqlServerSQLConstants
.
WHERE_VALUE_NULL
;
// whereValue = MySQLConstants.WHERE_VALUE_NULL;
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_null"
))
{
whereTerm
=
String
.
format
(
whereTerm
,
originField
);
// whereTerm = String.format(whereTerm, originName);
whereValue
=
""
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
f
.
getTerm
(),
"not_empty"
))
{
whereValue
=
"''"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"in"
))
{
whereValue
=
"('"
+
StringUtils
.
join
(
f
.
getValue
(),
"','"
)
+
"')"
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
f
.
getTerm
(),
"like"
))
{
...
...
frontend/src/lang/en.js
浏览文件 @
b5e0c6bd
...
...
@@ -762,8 +762,10 @@ export default {
filter_le
:
'Less than or equal to'
,
filter_gt
:
'Greater than'
,
filter_ge
:
'Greater than or equal to'
,
filter_null
:
'Empty'
,
filter_not_null
:
'Not Empty'
,
filter_null
:
'Null'
,
filter_not_null
:
'Not Null'
,
filter_empty
:
'Empty String'
,
filter_not_empty
:
'Not Empty String'
,
filter_include
:
'Contain'
,
filter_not_include
:
'Not Contain'
,
rose_type
:
'Rose pattern'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
b5e0c6bd
...
...
@@ -763,8 +763,10 @@ export default {
filter_le
:
'小于等于'
,
filter_gt
:
'大于'
,
filter_ge
:
'大于等于'
,
filter_null
:
'爲空'
,
filter_not_null
:
'不爲空'
,
filter_null
:
'為空'
,
filter_not_null
:
'不為空'
,
filter_empty
:
'空字符串'
,
filter_not_empty
:
'非空字符串'
,
filter_include
:
'包含'
,
filter_not_include
:
'不包含'
,
rose_type
:
'玫瑰圖模式'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
b5e0c6bd
...
...
@@ -765,6 +765,8 @@ export default {
filter_ge
:
'大于等于'
,
filter_null
:
'为空'
,
filter_not_null
:
'不为空'
,
filter_empty
:
'空字符串'
,
filter_not_empty
:
'非空字符串'
,
filter_include
:
'包含'
,
filter_not_include
:
'不包含'
,
rose_type
:
'玫瑰图模式'
,
...
...
frontend/src/views/chart/components/filter/DimensionFilterEditor.vue
浏览文件 @
b5e0c6bd
...
...
@@ -23,7 +23,7 @@
</el-select>
</el-col>
<el-col
:span=
"6"
>
<el-input
v-show=
"!f.term.includes('null')"
v-model=
"f.value"
class=
"value-item"
:placeholder=
"$t('chart.condition')"
size=
"mini"
clearable
/>
<el-input
v-show=
"!f.term.includes('null')
&& !f.term.includes('empty')
"
v-model=
"f.value"
class=
"value-item"
:placeholder=
"$t('chart.condition')"
size=
"mini"
clearable
/>
</el-col>
<el-col
:span=
"6"
>
<el-button
type=
"text"
icon=
"el-icon-delete"
circle
style=
"float: right"
@
click=
"removeFilter(index)"
/>
...
...
@@ -44,56 +44,48 @@ export default {
},
data
()
{
return
{
options
:
[{
label
:
''
,
options
:
[{
value
:
'eq'
,
label
:
this
.
$t
(
'chart.filter_eq'
)
},
{
value
:
'not_eq'
,
label
:
this
.
$t
(
'chart.filter_not_eq'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'like'
,
label
:
this
.
$t
(
'chart.filter_like'
)
},
{
value
:
'not like'
,
label
:
this
.
$t
(
'chart.filter_not_like'
)
}]
},
// {
// label: '',
// options: [{
// value: 'lt',
// label: this.$t('chart.filter_lt')
// }, {
// value: 'gt',
// label: this.$t('chart.filter_gt')
// }]
// },
// {
// label: '',
// options: [{
// value: 'le',
// label: this.$t('chart.filter_le')
// }, {
// value: 'ge',
// label: this.$t('chart.filter_ge')
// }]
// },
{
label
:
''
,
options
:
[{
value
:
'null'
,
label
:
this
.
$t
(
'chart.filter_null'
)
},
{
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
}]
options
:
[
{
label
:
''
,
options
:
[{
value
:
'eq'
,
label
:
this
.
$t
(
'chart.filter_eq'
)
},
{
value
:
'not_eq'
,
label
:
this
.
$t
(
'chart.filter_not_eq'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'like'
,
label
:
this
.
$t
(
'chart.filter_like'
)
},
{
value
:
'not like'
,
label
:
this
.
$t
(
'chart.filter_not_like'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'null'
,
label
:
this
.
$t
(
'chart.filter_null'
)
},
{
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'empty'
,
label
:
this
.
$t
(
'chart.filter_empty'
)
},
{
value
:
'not_empty'
,
label
:
this
.
$t
(
'chart.filter_not_empty'
)
}]
}
]
}
},
mounted
()
{
...
...
@@ -113,7 +105,7 @@ export default {
</
script
>
<
style
scoped
>
.filter-item
{
.filter-item
{
width
:
100%
;
border-radius
:
4px
;
border
:
1px
solid
#DCDFE6
;
...
...
@@ -123,19 +115,22 @@ export default {
justify-content
:
left
;
align-items
:
center
;
}
.form-item
>>>
.el-form-item__label
{
.form-item
>>>
.el-form-item__label
{
font-size
:
12px
;
}
span
{
font-size
:
12px
;
}
.value-item
>>>
.el-input
{
position
:
relative
;
display
:
inline-block
;
width
:
80px
!important
;
}
.el-select-dropdown__item
{
span
{
font-size
:
12px
;
}
.value-item
>>>
.el-input
{
position
:
relative
;
display
:
inline-block
;
width
:
80px
!important
;
}
.el-select-dropdown__item
{
padding
:
0
20px
;
font-size
:
12px
;
}
...
...
frontend/src/views/chart/components/filter/QuotaFilterEditor.vue
浏览文件 @
b5e0c6bd
...
...
@@ -83,16 +83,6 @@ export default {
value
:
'ge'
,
label
:
this
.
$t
(
'chart.filter_ge'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'null'
,
label
:
this
.
$t
(
'chart.filter_null'
)
},
{
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
}]
}
},
...
...
frontend/src/views/chart/components/filter/ResultFilterEditor.vue
浏览文件 @
b5e0c6bd
...
...
@@ -23,7 +23,7 @@
</el-select>
</el-col>
<el-col
:span=
"6"
>
<el-input
v-show=
"!f.term.includes('null')"
v-model=
"f.value"
class=
"value-item"
:placeholder=
"$t('chart.condition')"
size=
"mini"
clearable
/>
<el-input
v-show=
"!f.term.includes('null')
&& !f.term.includes('empty')
"
v-model=
"f.value"
class=
"value-item"
:placeholder=
"$t('chart.condition')"
size=
"mini"
clearable
/>
</el-col>
<el-col
:span=
"6"
>
<el-button
type=
"text"
icon=
"el-icon-delete"
circle
style=
"float: right"
@
click=
"removeFilter(index)"
/>
...
...
@@ -80,6 +80,16 @@ export default {
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'empty'
,
label
:
this
.
$t
(
'chart.filter_empty'
)
},
{
value
:
'not_empty'
,
label
:
this
.
$t
(
'chart.filter_not_empty'
)
}]
}
],
dateOptions
:
[
...
...
@@ -112,16 +122,6 @@ export default {
value
:
'ge'
,
label
:
this
.
$t
(
'chart.filter_ge'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'null'
,
label
:
this
.
$t
(
'chart.filter_null'
)
},
{
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
}
],
valueOptions
:
[
...
...
@@ -154,16 +154,6 @@ export default {
value
:
'ge'
,
label
:
this
.
$t
(
'chart.filter_ge'
)
}]
},
{
label
:
''
,
options
:
[{
value
:
'null'
,
label
:
this
.
$t
(
'chart.filter_null'
)
},
{
value
:
'not_null'
,
label
:
this
.
$t
(
'chart.filter_not_null'
)
}]
}
],
options
:
[]
...
...
frontend/src/views/chart/view/ChartEdit.vue
浏览文件 @
b5e0c6bd
...
...
@@ -1201,7 +1201,7 @@ export default {
saveDimensionFilter
()
{
for
(
let
i
=
0
;
i
<
this
.
dimensionItem
.
filter
.
length
;
i
++
)
{
const
f
=
this
.
dimensionItem
.
filter
[
i
]
if
(
!
f
.
term
.
includes
(
'null'
)
&&
(
!
f
.
value
||
f
.
value
===
''
))
{
if
(
!
f
.
term
.
includes
(
'null'
)
&&
!
f
.
term
.
includes
(
'empty'
)
&&
(
!
f
.
value
||
f
.
value
===
''
))
{
this
.
$message
({
message
:
this
.
$t
(
'chart.filter_value_can_null'
),
type
:
'error'
,
...
...
@@ -1225,7 +1225,7 @@ export default {
saveQuotaFilter
()
{
for
(
let
i
=
0
;
i
<
this
.
quotaItem
.
filter
.
length
;
i
++
)
{
const
f
=
this
.
quotaItem
.
filter
[
i
]
if
(
!
f
.
term
.
includes
(
'null'
)
&&
(
!
f
.
value
||
f
.
value
===
''
))
{
if
(
!
f
.
term
.
includes
(
'null'
)
&&
!
f
.
term
.
includes
(
'empty'
)
&&
(
!
f
.
value
||
f
.
value
===
''
))
{
this
.
$message
({
message
:
this
.
$t
(
'chart.filter_value_can_null'
),
type
:
'error'
,
...
...
@@ -1258,7 +1258,7 @@ export default {
saveResultFilter
()
{
for
(
let
i
=
0
;
i
<
this
.
filterItem
.
filter
.
length
;
i
++
)
{
const
f
=
this
.
filterItem
.
filter
[
i
]
if
(
!
f
.
term
.
includes
(
'null'
)
&&
(
!
f
.
value
||
f
.
value
===
''
))
{
if
(
!
f
.
term
.
includes
(
'null'
)
&&
!
f
.
term
.
includes
(
'empty'
)
&&
(
!
f
.
value
||
f
.
value
===
''
))
{
this
.
$message
({
message
:
this
.
$t
(
'chart.filter_value_can_null'
),
type
:
'error'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论