Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
02b05220
提交
02b05220
authored
4月 12, 2022
作者:
junjun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 支持计数和去重计数
上级
eff4c2b2
显示空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
148 行增加
和
27 行删除
+148
-27
DorisQueryProvider.java
...io/dataease/provider/engine/doris/DorisQueryProvider.java
+10
-1
MysqlQueryProvider.java
...io/dataease/provider/engine/mysql/MysqlQueryProvider.java
+9
-1
CKQueryProvider.java
...n/java/io/dataease/provider/query/ck/CKQueryProvider.java
+9
-1
Db2QueryProvider.java
...java/io/dataease/provider/query/db2/Db2QueryProvider.java
+9
-0
EsQueryProvider.java
...n/java/io/dataease/provider/query/es/EsQueryProvider.java
+9
-1
HiveQueryProvider.java
...va/io/dataease/provider/query/hive/HiveQueryProvider.java
+9
-1
ImpalaQueryProvider.java
...o/dataease/provider/query/impala/ImpalaQueryProvider.java
+8
-0
MongoQueryProvider.java
...o/dataease/provider/query/mongodb/MongoQueryProvider.java
+9
-0
MysqlQueryProvider.java
.../io/dataease/provider/query/mysql/MysqlQueryProvider.java
+8
-0
OracleQueryProvider.java
...o/dataease/provider/query/oracle/OracleQueryProvider.java
+9
-1
PgQueryProvider.java
...n/java/io/dataease/provider/query/pg/PgQueryProvider.java
+9
-1
RedshiftQueryProvider.java
...taease/provider/query/redshift/RedshiftQueryProvider.java
+10
-2
SqlserverQueryProvider.java
...ease/provider/query/sqlserver/SqlserverQueryProvider.java
+9
-1
en.js
frontend/src/lang/en.js
+5
-1
tw.js
frontend/src/lang/tw.js
+5
-1
zh.js
frontend/src/lang/zh.js
+5
-1
QuotaExtItem.vue
...end/src/views/chart/components/drag-item/QuotaExtItem.vue
+8
-7
QuotaItem.vue
frontend/src/views/chart/components/drag-item/QuotaItem.vue
+8
-7
没有找到文件。
backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java
浏览文件 @
02b05220
...
@@ -11,8 +11,8 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
...
@@ -11,8 +11,8 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.DorisConstants
;
import
io.dataease.plugins.common.constants.DorisConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.provider.QueryProvider
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -1026,7 +1026,11 @@ public class DorisQueryProvider extends QueryProvider {
...
@@ -1026,7 +1026,11 @@ public class DorisQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getDataeaseName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getDataeaseName
(),
"*"
))
{
fieldName
=
DorisConstants
.
AGG_COUNT
;
fieldName
=
DorisConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
DorisConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
DorisConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
DorisConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
String
.
format
(
DorisConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
DorisConstants
.
DEFAULT_INT_FORMAT
:
DorisConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
DorisConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
DorisConstants
.
DEFAULT_INT_FORMAT
:
DorisConstants
.
DEFAULT_FLOAT_FORMAT
);
...
@@ -1035,9 +1039,13 @@ public class DorisQueryProvider extends QueryProvider {
...
@@ -1035,9 +1039,13 @@ public class DorisQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
DorisConstants
.
ROUND
,
cast1
,
"2"
);
fieldName
=
String
.
format
(
DorisConstants
.
ROUND
,
cast1
,
"2"
);
}
else
{
}
else
{
String
cast
=
String
.
format
(
DorisConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
DorisConstants
.
DEFAULT_INT_FORMAT
:
DorisConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
DorisConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
DorisConstants
.
DEFAULT_INT_FORMAT
:
DorisConstants
.
DEFAULT_FLOAT_FORMAT
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
DorisConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
DorisConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
DorisConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
@@ -1081,6 +1089,7 @@ public class DorisQueryProvider extends QueryProvider {
...
@@ -1081,6 +1089,7 @@ public class DorisQueryProvider extends QueryProvider {
private
String
reflectFieldName
(
DatasetTableField
field
)
{
private
String
reflectFieldName
(
DatasetTableField
field
)
{
return
field
.
getDataeaseName
();
return
field
.
getDataeaseName
();
}
}
private
String
calcFieldRegex
(
String
originField
,
SQLObj
tableObj
)
{
private
String
calcFieldRegex
(
String
originField
,
SQLObj
tableObj
)
{
originField
=
originField
.
replaceAll
(
"[\\t\\n\\r]]"
,
""
);
originField
=
originField
.
replaceAll
(
"[\\t\\n\\r]]"
,
""
);
// 正则提取[xxx]
// 正则提取[xxx]
...
...
backend/src/main/java/io/dataease/provider/engine/mysql/MysqlQueryProvider.java
浏览文件 @
02b05220
...
@@ -10,9 +10,9 @@ import io.dataease.dto.chart.ChartCustomFilterItemDTO;
...
@@ -10,9 +10,9 @@ import io.dataease.dto.chart.ChartCustomFilterItemDTO;
import
io.dataease.dto.chart.ChartFieldCustomFilterDTO
;
import
io.dataease.dto.chart.ChartFieldCustomFilterDTO
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.engine.MysqlConstants
;
import
io.dataease.plugins.common.constants.engine.MysqlConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -1030,7 +1030,11 @@ public class MysqlQueryProvider extends QueryProvider {
...
@@ -1030,7 +1030,11 @@ public class MysqlQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getDataeaseName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getDataeaseName
(),
"*"
))
{
fieldName
=
MysqlConstants
.
AGG_COUNT
;
fieldName
=
MysqlConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
MysqlConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
MysqlConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
MysqlConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
String
.
format
(
MysqlConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
MysqlConstants
.
DEFAULT_INT_FORMAT
:
MysqlConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
MysqlConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
MysqlConstants
.
DEFAULT_INT_FORMAT
:
MysqlConstants
.
DEFAULT_FLOAT_FORMAT
);
...
@@ -1039,9 +1043,13 @@ public class MysqlQueryProvider extends QueryProvider {
...
@@ -1039,9 +1043,13 @@ public class MysqlQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
MysqlConstants
.
ROUND
,
cast1
,
"2"
);
fieldName
=
String
.
format
(
MysqlConstants
.
ROUND
,
cast1
,
"2"
);
}
else
{
}
else
{
String
cast
=
String
.
format
(
MysqlConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
MysqlConstants
.
DEFAULT_INT_FORMAT
:
MysqlConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
MysqlConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
MysqlConstants
.
DEFAULT_INT_FORMAT
:
MysqlConstants
.
DEFAULT_FLOAT_FORMAT
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
MysqlConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
MysqlConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
MysqlConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/ck/CKQueryProvider.java
浏览文件 @
02b05220
...
@@ -12,8 +12,8 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
...
@@ -12,8 +12,8 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.CKConstants
;
import
io.dataease.plugins.common.constants.CKConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.provider.QueryProvider
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -1039,7 +1039,11 @@ public class CKQueryProvider extends QueryProvider {
...
@@ -1039,7 +1039,11 @@ public class CKQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
CKConstants
.
AGG_COUNT
;
fieldName
=
CKConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
CKConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
CKConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
CKConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
y
.
getDeType
()
==
2
?
String
.
format
(
CKConstants
.
toInt64
,
originField
)
:
String
.
format
(
CKConstants
.
toFloat64
,
originField
);
String
cast
=
y
.
getDeType
()
==
2
?
String
.
format
(
CKConstants
.
toInt64
,
originField
)
:
String
.
format
(
CKConstants
.
toFloat64
,
originField
);
...
@@ -1047,9 +1051,13 @@ public class CKQueryProvider extends QueryProvider {
...
@@ -1047,9 +1051,13 @@ public class CKQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
CKConstants
.
toDecimal
,
agg
);
fieldName
=
String
.
format
(
CKConstants
.
toDecimal
,
agg
);
}
else
{
}
else
{
String
cast
=
y
.
getDeType
()
==
2
?
String
.
format
(
CKConstants
.
toInt64
,
originField
)
:
String
.
format
(
CKConstants
.
toFloat64
,
originField
);
String
cast
=
y
.
getDeType
()
==
2
?
String
.
format
(
CKConstants
.
toInt64
,
originField
)
:
String
.
format
(
CKConstants
.
toFloat64
,
originField
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
CKConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
CKConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
CKConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/db2/Db2QueryProvider.java
浏览文件 @
02b05220
...
@@ -14,6 +14,7 @@ import io.dataease.dto.chart.ChartViewFieldDTO;
...
@@ -14,6 +14,7 @@ import io.dataease.dto.chart.ChartViewFieldDTO;
import
io.dataease.dto.datasource.Db2Configuration
;
import
io.dataease.dto.datasource.Db2Configuration
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.Db2Constants
;
import
io.dataease.plugins.common.constants.Db2Constants
;
import
io.dataease.plugins.common.constants.MySQLConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
...
@@ -993,7 +994,11 @@ public class Db2QueryProvider extends QueryProvider {
...
@@ -993,7 +994,11 @@ public class Db2QueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
Db2Constants
.
AGG_COUNT
;
fieldName
=
Db2Constants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
Db2Constants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
Db2Constants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
Db2Constants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
String
.
format
(
Db2Constants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
Db2Constants
.
DEFAULT_INT_FORMAT
:
Db2Constants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
Db2Constants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
Db2Constants
.
DEFAULT_INT_FORMAT
:
Db2Constants
.
DEFAULT_FLOAT_FORMAT
);
...
@@ -1001,9 +1006,13 @@ public class Db2QueryProvider extends QueryProvider {
...
@@ -1001,9 +1006,13 @@ public class Db2QueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
Db2Constants
.
CAST
,
agg
,
Db2Constants
.
DEFAULT_FLOAT_FORMAT
);
fieldName
=
String
.
format
(
Db2Constants
.
CAST
,
agg
,
Db2Constants
.
DEFAULT_FLOAT_FORMAT
);
}
else
{
}
else
{
String
cast
=
String
.
format
(
Db2Constants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
Db2Constants
.
DEFAULT_INT_FORMAT
:
Db2Constants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
Db2Constants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
Db2Constants
.
DEFAULT_INT_FORMAT
:
Db2Constants
.
DEFAULT_FLOAT_FORMAT
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
Db2Constants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
Db2Constants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
Db2Constants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/es/EsQueryProvider.java
浏览文件 @
02b05220
...
@@ -12,8 +12,8 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
...
@@ -12,8 +12,8 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.EsSqlLConstants
;
import
io.dataease.plugins.common.constants.EsSqlLConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.provider.QueryProvider
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -1032,7 +1032,11 @@ public class EsQueryProvider extends QueryProvider {
...
@@ -1032,7 +1032,11 @@ public class EsQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
EsSqlLConstants
.
AGG_COUNT
;
fieldName
=
EsSqlLConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
EsSqlLConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
EsSqlLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
EsSqlLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
String
.
format
(
EsSqlLConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
"bigint"
:
"double"
);
String
cast
=
String
.
format
(
EsSqlLConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
"bigint"
:
"double"
);
...
@@ -1040,9 +1044,13 @@ public class EsQueryProvider extends QueryProvider {
...
@@ -1040,9 +1044,13 @@ public class EsQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
EsSqlLConstants
.
ROUND
,
agg
,
"2"
);
fieldName
=
String
.
format
(
EsSqlLConstants
.
ROUND
,
agg
,
"2"
);
}
else
{
}
else
{
String
cast
=
String
.
format
(
EsSqlLConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
"bigint"
:
"double"
);
String
cast
=
String
.
format
(
EsSqlLConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
"bigint"
:
"double"
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
EsSqlLConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
EsSqlLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
EsSqlLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/hive/HiveQueryProvider.java
浏览文件 @
02b05220
...
@@ -12,8 +12,8 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
...
@@ -12,8 +12,8 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.HiveConstants
;
import
io.dataease.plugins.common.constants.HiveConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.provider.QueryProvider
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -1007,7 +1007,11 @@ public class HiveQueryProvider extends QueryProvider {
...
@@ -1007,7 +1007,11 @@ public class HiveQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
HiveConstants
.
AGG_COUNT
;
fieldName
=
HiveConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
HiveConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
HiveConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
HiveConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
String
.
format
(
HiveConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
HiveConstants
.
DEFAULT_INT_FORMAT
:
HiveConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
HiveConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
HiveConstants
.
DEFAULT_INT_FORMAT
:
HiveConstants
.
DEFAULT_FLOAT_FORMAT
);
...
@@ -1015,9 +1019,13 @@ public class HiveQueryProvider extends QueryProvider {
...
@@ -1015,9 +1019,13 @@ public class HiveQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
HiveConstants
.
CAST
,
agg
,
HiveConstants
.
DEFAULT_FLOAT_FORMAT
);
fieldName
=
String
.
format
(
HiveConstants
.
CAST
,
agg
,
HiveConstants
.
DEFAULT_FLOAT_FORMAT
);
}
else
{
}
else
{
String
cast
=
String
.
format
(
HiveConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
HiveConstants
.
DEFAULT_INT_FORMAT
:
HiveConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
HiveConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
HiveConstants
.
DEFAULT_INT_FORMAT
:
HiveConstants
.
DEFAULT_FLOAT_FORMAT
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
HiveConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
HiveConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
HiveConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/impala/ImpalaQueryProvider.java
浏览文件 @
02b05220
...
@@ -974,7 +974,11 @@ public class ImpalaQueryProvider extends QueryProvider {
...
@@ -974,7 +974,11 @@ public class ImpalaQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
ImpalaConstants
.
AGG_COUNT
;
fieldName
=
ImpalaConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
ImpalaConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
ImpalaConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
ImpalaConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
String
.
format
(
ImpalaConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
ImpalaConstants
.
DEFAULT_INT_FORMAT
:
ImpalaConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
ImpalaConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
ImpalaConstants
.
DEFAULT_INT_FORMAT
:
ImpalaConstants
.
DEFAULT_FLOAT_FORMAT
);
...
@@ -982,9 +986,13 @@ public class ImpalaQueryProvider extends QueryProvider {
...
@@ -982,9 +986,13 @@ public class ImpalaQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
ImpalaConstants
.
CAST
,
agg
,
ImpalaConstants
.
DEFAULT_FLOAT_FORMAT
);
fieldName
=
String
.
format
(
ImpalaConstants
.
CAST
,
agg
,
ImpalaConstants
.
DEFAULT_FLOAT_FORMAT
);
}
else
{
}
else
{
String
cast
=
String
.
format
(
ImpalaConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
ImpalaConstants
.
DEFAULT_INT_FORMAT
:
ImpalaConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
ImpalaConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
ImpalaConstants
.
DEFAULT_INT_FORMAT
:
ImpalaConstants
.
DEFAULT_FLOAT_FORMAT
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
ImpalaConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
ImpalaConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
ImpalaConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/mongodb/MongoQueryProvider.java
浏览文件 @
02b05220
...
@@ -12,6 +12,7 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
...
@@ -12,6 +12,7 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.MongoConstants
;
import
io.dataease.plugins.common.constants.MongoConstants
;
import
io.dataease.plugins.common.constants.MySQLConstants
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.provider.QueryProvider
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
...
@@ -915,10 +916,18 @@ public class MongoQueryProvider extends QueryProvider {
...
@@ -915,10 +916,18 @@ public class MongoQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
MongoConstants
.
AGG_COUNT
;
fieldName
=
MongoConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
MongoConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
MongoConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
MongoConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
MongoConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
}
else
{
fieldName
=
String
.
format
(
MongoConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
MongoConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/mysql/MysqlQueryProvider.java
浏览文件 @
02b05220
...
@@ -1011,7 +1011,11 @@ public class MysqlQueryProvider extends QueryProvider {
...
@@ -1011,7 +1011,11 @@ public class MysqlQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
MySQLConstants
.
AGG_COUNT
;
fieldName
=
MySQLConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
MySQLConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
MySQLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
MySQLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
String
.
format
(
MySQLConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
MySQLConstants
.
DEFAULT_INT_FORMAT
:
MySQLConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
MySQLConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
MySQLConstants
.
DEFAULT_INT_FORMAT
:
MySQLConstants
.
DEFAULT_FLOAT_FORMAT
);
...
@@ -1019,9 +1023,13 @@ public class MysqlQueryProvider extends QueryProvider {
...
@@ -1019,9 +1023,13 @@ public class MysqlQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
MySQLConstants
.
CAST
,
agg
,
MySQLConstants
.
DEFAULT_FLOAT_FORMAT
);
fieldName
=
String
.
format
(
MySQLConstants
.
CAST
,
agg
,
MySQLConstants
.
DEFAULT_FLOAT_FORMAT
);
}
else
{
}
else
{
String
cast
=
String
.
format
(
MySQLConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
MySQLConstants
.
DEFAULT_INT_FORMAT
:
MySQLConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
MySQLConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
MySQLConstants
.
DEFAULT_INT_FORMAT
:
MySQLConstants
.
DEFAULT_FLOAT_FORMAT
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
MySQLConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
MySQLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
MySQLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/oracle/OracleQueryProvider.java
浏览文件 @
02b05220
...
@@ -14,8 +14,8 @@ import io.dataease.dto.datasource.JdbcConfiguration;
...
@@ -14,8 +14,8 @@ import io.dataease.dto.datasource.JdbcConfiguration;
import
io.dataease.dto.datasource.OracleConfiguration
;
import
io.dataease.dto.datasource.OracleConfiguration
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.OracleConstants
;
import
io.dataease.plugins.common.constants.OracleConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.provider.QueryProvider
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -1083,7 +1083,11 @@ public class OracleQueryProvider extends QueryProvider {
...
@@ -1083,7 +1083,11 @@ public class OracleQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
OracleConstants
.
AGG_COUNT
;
fieldName
=
OracleConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
OracleConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
OracleConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
OracleConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
String
.
format
(
OracleConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
OracleConstants
.
DEFAULT_INT_FORMAT
:
OracleConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
OracleConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
OracleConstants
.
DEFAULT_INT_FORMAT
:
OracleConstants
.
DEFAULT_FLOAT_FORMAT
);
...
@@ -1091,9 +1095,13 @@ public class OracleQueryProvider extends QueryProvider {
...
@@ -1091,9 +1095,13 @@ public class OracleQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
OracleConstants
.
CAST
,
agg
,
OracleConstants
.
DEFAULT_FLOAT_FORMAT
);
fieldName
=
String
.
format
(
OracleConstants
.
CAST
,
agg
,
OracleConstants
.
DEFAULT_FLOAT_FORMAT
);
}
else
{
}
else
{
String
cast
=
String
.
format
(
OracleConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
OracleConstants
.
DEFAULT_INT_FORMAT
:
OracleConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
OracleConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
2
?
OracleConstants
.
DEFAULT_INT_FORMAT
:
OracleConstants
.
DEFAULT_FLOAT_FORMAT
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
OracleConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
OracleConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
OracleConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/pg/PgQueryProvider.java
浏览文件 @
02b05220
...
@@ -14,9 +14,9 @@ import io.dataease.dto.chart.ChartViewFieldDTO;
...
@@ -14,9 +14,9 @@ import io.dataease.dto.chart.ChartViewFieldDTO;
import
io.dataease.dto.datasource.JdbcConfiguration
;
import
io.dataease.dto.datasource.JdbcConfiguration
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.PgConstants
;
import
io.dataease.plugins.common.constants.PgConstants
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.SqlServerSQLConstants
;
import
io.dataease.plugins.common.constants.SqlServerSQLConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -1000,7 +1000,11 @@ public class PgQueryProvider extends QueryProvider {
...
@@ -1000,7 +1000,11 @@ public class PgQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
PgConstants
.
AGG_COUNT
;
fieldName
=
PgConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
String
.
format
(
PgConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
PgConstants
.
DEFAULT_INT_FORMAT
:
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
PgConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
PgConstants
.
DEFAULT_INT_FORMAT
:
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
...
@@ -1008,9 +1012,13 @@ public class PgQueryProvider extends QueryProvider {
...
@@ -1008,9 +1012,13 @@ public class PgQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
PgConstants
.
CAST
,
agg
,
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
fieldName
=
String
.
format
(
PgConstants
.
CAST
,
agg
,
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
}
else
{
}
else
{
String
cast
=
String
.
format
(
PgConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
PgConstants
.
DEFAULT_INT_FORMAT
:
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
PgConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
PgConstants
.
DEFAULT_INT_FORMAT
:
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/redshift/RedshiftQueryProvider.java
浏览文件 @
02b05220
...
@@ -13,11 +13,11 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
...
@@ -13,11 +13,11 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.datasource.JdbcConfiguration
;
import
io.dataease.dto.datasource.JdbcConfiguration
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.PgConstants
;
import
io.dataease.plugins.common.constants.RedshiftConstants
;
import
io.dataease.plugins.common.constants.RedshiftConstants
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.SqlServerSQLConstants
;
import
io.dataease.plugins.common.constants.SqlServerSQLConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.PgConstants
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -927,7 +927,11 @@ public class RedshiftQueryProvider extends QueryProvider {
...
@@ -927,7 +927,11 @@ public class RedshiftQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
PgConstants
.
AGG_COUNT
;
fieldName
=
PgConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
cast
=
String
.
format
(
PgConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
PgConstants
.
DEFAULT_INT_FORMAT
:
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
PgConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
PgConstants
.
DEFAULT_INT_FORMAT
:
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
...
@@ -935,9 +939,13 @@ public class RedshiftQueryProvider extends QueryProvider {
...
@@ -935,9 +939,13 @@ public class RedshiftQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
PgConstants
.
CAST
,
agg
,
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
fieldName
=
String
.
format
(
PgConstants
.
CAST
,
agg
,
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
}
else
{
}
else
{
String
cast
=
String
.
format
(
PgConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
PgConstants
.
DEFAULT_INT_FORMAT
:
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
String
cast
=
String
.
format
(
PgConstants
.
CAST
,
originField
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
PgConstants
.
DEFAULT_INT_FORMAT
:
PgConstants
.
DEFAULT_FLOAT_FORMAT
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
cast
);
}
else
{
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
fieldName
=
String
.
format
(
PgConstants
.
AGG_FIELD
,
y
.
getSummary
(),
cast
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
backend/src/main/java/io/dataease/provider/query/sqlserver/SqlserverQueryProvider.java
浏览文件 @
02b05220
...
@@ -13,9 +13,9 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
...
@@ -13,9 +13,9 @@ import io.dataease.dto.chart.ChartFieldCustomFilterDTO;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.chart.ChartViewFieldDTO
;
import
io.dataease.dto.datasource.JdbcConfiguration
;
import
io.dataease.dto.datasource.JdbcConfiguration
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.dto.sqlObj.SQLObj
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
io.dataease.plugins.common.constants.SqlServerSQLConstants
;
import
io.dataease.plugins.common.constants.SqlServerSQLConstants
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.provider.QueryProvider
;
import
io.dataease.plugins.common.constants.SQLConstants
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -1050,7 +1050,11 @@ public class SqlserverQueryProvider extends QueryProvider {
...
@@ -1050,7 +1050,11 @@ public class SqlserverQueryProvider extends QueryProvider {
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getOriginName
(),
"*"
))
{
fieldName
=
SqlServerSQLConstants
.
AGG_COUNT
;
fieldName
=
SqlServerSQLConstants
.
AGG_COUNT
;
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
}
else
if
(
SQLConstants
.
DIMENSION_TYPE
.
contains
(
y
.
getDeType
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
SqlServerSQLConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
originField
);
}
else
{
fieldName
=
String
.
format
(
SqlServerSQLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
fieldName
=
String
.
format
(
SqlServerSQLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
originField
);
}
}
else
{
}
else
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"avg"
)
||
StringUtils
.
containsIgnoreCase
(
y
.
getSummary
(),
"pop"
))
{
String
convert
=
String
.
format
(
SqlServerSQLConstants
.
CONVERT
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
SqlServerSQLConstants
.
DEFAULT_INT_FORMAT
:
SqlServerSQLConstants
.
DEFAULT_FLOAT_FORMAT
,
originField
);
String
convert
=
String
.
format
(
SqlServerSQLConstants
.
CONVERT
,
y
.
getDeType
()
==
DeTypeConstants
.
DE_INT
?
SqlServerSQLConstants
.
DEFAULT_INT_FORMAT
:
SqlServerSQLConstants
.
DEFAULT_FLOAT_FORMAT
,
originField
);
...
@@ -1058,9 +1062,13 @@ public class SqlserverQueryProvider extends QueryProvider {
...
@@ -1058,9 +1062,13 @@ public class SqlserverQueryProvider extends QueryProvider {
fieldName
=
String
.
format
(
SqlServerSQLConstants
.
CONVERT
,
SqlServerSQLConstants
.
DEFAULT_FLOAT_FORMAT
,
agg
);
fieldName
=
String
.
format
(
SqlServerSQLConstants
.
CONVERT
,
SqlServerSQLConstants
.
DEFAULT_FLOAT_FORMAT
,
agg
);
}
else
{
}
else
{
String
convert
=
String
.
format
(
SqlServerSQLConstants
.
CONVERT
,
y
.
getDeType
()
==
2
?
SqlServerSQLConstants
.
DEFAULT_INT_FORMAT
:
SqlServerSQLConstants
.
DEFAULT_FLOAT_FORMAT
,
originField
);
String
convert
=
String
.
format
(
SqlServerSQLConstants
.
CONVERT
,
y
.
getDeType
()
==
2
?
SqlServerSQLConstants
.
DEFAULT_INT_FORMAT
:
SqlServerSQLConstants
.
DEFAULT_FLOAT_FORMAT
,
originField
);
if
(
StringUtils
.
equalsIgnoreCase
(
y
.
getSummary
(),
"count_distinct"
))
{
fieldName
=
String
.
format
(
SqlServerSQLConstants
.
AGG_FIELD
,
"COUNT"
,
"DISTINCT "
+
convert
);
}
else
{
fieldName
=
String
.
format
(
SqlServerSQLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
convert
);
fieldName
=
String
.
format
(
SqlServerSQLConstants
.
AGG_FIELD
,
y
.
getSummary
(),
convert
);
}
}
}
}
}
return
SQLObj
.
builder
()
return
SQLObj
.
builder
()
.
fieldName
(
fieldName
)
.
fieldName
(
fieldName
)
.
fieldAlias
(
fieldAlias
)
.
fieldAlias
(
fieldAlias
)
...
...
frontend/src/lang/en.js
浏览文件 @
02b05220
...
@@ -1064,7 +1064,11 @@ export default {
...
@@ -1064,7 +1064,11 @@ export default {
total_pos_left
:
'Left'
,
total_pos_left
:
'Left'
,
total_pos_right
:
'Right'
,
total_pos_right
:
'Right'
,
chart_label
:
'Label'
,
chart_label
:
'Label'
,
drag_block_label
:
'Label'
drag_block_label
:
'Label'
,
count_distinct
:
'Distinct Count'
,
table_page_mode
:
'Page Mode'
,
page_mode_page
:
'Page'
,
page_mode_pull
:
'Pull'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'There are multiple sheet pages, and the first one is extracted by default'
,
sheet_warn
:
'There are multiple sheet pages, and the first one is extracted by default'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
02b05220
...
@@ -1064,7 +1064,11 @@ export default {
...
@@ -1064,7 +1064,11 @@ export default {
total_pos_left
:
'左側'
,
total_pos_left
:
'左側'
,
total_pos_right
:
'右側'
,
total_pos_right
:
'右側'
,
chart_label
:
'文本卡'
,
chart_label
:
'文本卡'
,
drag_block_label
:
'標簽'
drag_block_label
:
'標簽'
,
count_distinct
:
'去重計數'
,
table_page_mode
:
'分頁模式'
,
page_mode_page
:
'翻頁'
,
page_mode_pull
:
'下拉'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'有多個 Sheet 頁,默認抽取第一個'
,
sheet_warn
:
'有多個 Sheet 頁,默認抽取第一個'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
02b05220
...
@@ -1067,7 +1067,11 @@ export default {
...
@@ -1067,7 +1067,11 @@ export default {
total_pos_left
:
'左侧'
,
total_pos_left
:
'左侧'
,
total_pos_right
:
'右侧'
,
total_pos_right
:
'右侧'
,
chart_label
:
'文本卡'
,
chart_label
:
'文本卡'
,
drag_block_label
:
'标签'
drag_block_label
:
'标签'
,
count_distinct
:
'去重计数'
,
table_page_mode
:
'分页模式'
,
page_mode_page
:
'翻页'
,
page_mode_pull
:
'下拉'
},
},
dataset
:
{
dataset
:
{
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
sheet_warn
:
'有多个 Sheet 页,默认抽取第一个'
,
...
...
frontend/src/views/chart/components/drag-item/QuotaExtItem.vue
浏览文件 @
02b05220
...
@@ -49,13 +49,14 @@
...
@@ -49,13 +49,14 @@
<i
class=
"el-icon-arrow-right el-icon--right"
/>
<i
class=
"el-icon-arrow-right el-icon--right"
/>
</span>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
v-if=
"item.id === 'count' || item.deType === 0 || item.deType === 1"
:command=
"beforeSummary('count')"
>
{{
$t
(
'chart.count'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('sum')"
>
{{
$t
(
'chart.sum'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('sum')"
>
{{
$t
(
'chart.sum'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('avg')"
>
{{
$t
(
'chart.avg'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('avg')"
>
{{
$t
(
'chart.avg'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('max')"
>
{{
$t
(
'chart.max'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('max')"
>
{{
$t
(
'chart.max'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('min')"
>
{{
$t
(
'chart.min'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('min')"
>
{{
$t
(
'chart.min'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('stddev_pop')"
>
{{
$t
(
'chart.stddev_pop'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('stddev_pop')"
>
{{
$t
(
'chart.stddev_pop'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('var_pop')"
>
{{
$t
(
'chart.var_pop'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('var_pop')"
>
{{
$t
(
'chart.var_pop'
)
}}
</el-dropdown-item>
<el-dropdown-item
:command=
"beforeSummary('count')"
>
{{
$t
(
'chart.count'
)
}}
</el-dropdown-item>
<el-dropdown-item
:command=
"beforeSummary('count_distinct')"
>
{{
$t
(
'chart.count_distinct'
)
}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</el-dropdown-item>
</el-dropdown-item>
...
...
frontend/src/views/chart/components/drag-item/QuotaItem.vue
浏览文件 @
02b05220
...
@@ -49,13 +49,14 @@
...
@@ -49,13 +49,14 @@
<i
class=
"el-icon-arrow-right el-icon--right"
/>
<i
class=
"el-icon-arrow-right el-icon--right"
/>
</span>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
v-if=
"item.id === 'count' || item.deType === 0 || item.deType === 1"
:command=
"beforeSummary('count')"
>
{{
$t
(
'chart.count'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('sum')"
>
{{
$t
(
'chart.sum'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('sum')"
>
{{
$t
(
'chart.sum'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('avg')"
>
{{
$t
(
'chart.avg'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('avg')"
>
{{
$t
(
'chart.avg'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('max')"
>
{{
$t
(
'chart.max'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('max')"
>
{{
$t
(
'chart.max'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('min')"
>
{{
$t
(
'chart.min'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('min')"
>
{{
$t
(
'chart.min'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('stddev_pop')"
>
{{
$t
(
'chart.stddev_pop'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('stddev_pop')"
>
{{
$t
(
'chart.stddev_pop'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1 && item.deType !== 5"
:command=
"beforeSummary('var_pop')"
>
{{
$t
(
'chart.var_pop'
)
}}
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.id !== 'count' && item.deType !== 0 && item.deType !== 1"
:command=
"beforeSummary('var_pop')"
>
{{
$t
(
'chart.var_pop'
)
}}
</el-dropdown-item>
<el-dropdown-item
:command=
"beforeSummary('count')"
>
{{
$t
(
'chart.count'
)
}}
</el-dropdown-item>
<el-dropdown-item
:command=
"beforeSummary('count_distinct')"
>
{{
$t
(
'chart.count_distinct'
)
}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
</el-dropdown-item>
</el-dropdown-item>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论