chenw 6 лет назад
Родитель
Сommit
21c4eb9559

+ 1 - 1
bi-server/src/main/java/com/usoftchina/bi/server/service/chart/ShowHistogramService.java

@@ -118,7 +118,7 @@ public class ShowHistogramService {
             }
             String fieldName = yAxisType
                     + "(nvl(" + yColumn + ",0)) as value,"
-                    + ("scale".equals(xColumnType) ? "nvl(" + xColumn + ",0)" : "nvl(" + xColumn + ",'空')")
+                    + ("scale".equals(xColumnType) ? "nvl(" + xColumn + ",0)" : ("time".equals(xColumnType) ? xColumn : "nvl(" + xColumn + ",'空')"))
                     + " as name ";
             String condition = screenToColumnS + " GROUP BY " + xColumn;
             if (yAxisType.contains("distinct")) {

+ 2 - 2
bi-server/src/main/java/com/usoftchina/bi/server/service/chart/ShowLineService.java

@@ -91,9 +91,9 @@ public class ShowLineService {
                 screenToColumnS = " 1 = 1 ";
             }
             xColumn = TimeConverterUtil.convertToOracleDateStr(xColumn, xAxisType);         //X轴 -> 折线图X轴只能为日期类型
-            String fieldName = yAxisType + "(nvl(" + yColumn + ",0)) as value,nvl(" + xColumn + ",'空') as name ";
+            String fieldName = yAxisType + "(nvl(" + yColumn + ",0)) as value," + xColumn + " as name ";
             if ("time".equals(yColumnType)) {
-                fieldName = yAxisType + "(" + yColumn + ")) as value,nvl(" + xColumn + ",'空') as name ";
+                fieldName = yAxisType + "(" + yColumn + ")) as value," + xColumn + " as name ";
             }
             String condition = screenToColumnS + " GROUP BY " + xColumn;
             if (yAxisType.contains("distinct")) {

+ 1 - 1
bi-server/src/main/java/com/usoftchina/bi/server/service/chart/ShowPieService.java

@@ -100,7 +100,7 @@ public class ShowPieService {
             }
             String fieldName = yAxisType
                     + "(nvl(" + yColumn + ",0)) as value,"
-                    + ("scale".equals(xColumnType) ? "nvl(" + xColumn + ",0)" : "nvl(" + xColumn + ",'空')")
+                    + ("scale".equals(xColumnType) ? "nvl(" + xColumn + ",0)" : ("time".equals(xColumnType) ? xColumn : "nvl(" + xColumn + ",'空')"))
                     + " as name ";
             if ("time".equals(yColumnType)) {
                 fieldName = yAxisType + "(" + yColumn + ") as value," + ("scale".equals(xColumnType) ? "nvl(" + xColumn + ",0)" : "nvl(" + xColumn + ",'空')") + " as name ";

+ 1 - 1
bi-server/src/main/java/com/usoftchina/bi/server/service/chart/ShowScatterService.java

@@ -99,7 +99,7 @@ public class ShowScatterService {
             if ("time".equals(xColumnType)){
                 xColumn = TimeConverterUtil.convertToOracleDateStr(xColumn, xAxisType);         //X轴
             }
-            String fieldName = yAxisType + "(nvl(" + yColumn + ",0)) as value," + ("scale".equals(xColumnType) ? "nvl(" + xColumn + ",0)" : "nvl(" + xColumn + ",'空')") + " as \"date\" ";
+            String fieldName = yAxisType + "(nvl(" + yColumn + ",0)) as value," + ("scale".equals(xColumnType) ? "nvl(" + xColumn + ",0)" : ("time".equals(xColumnType) ? xColumn : "nvl(" + xColumn + ",'空')")) + " as \"date\" ";
             if ("time".equals(yColumnType)) {
                 fieldName = yAxisType + "(" + yColumn + ") as value," + ("scale".equals(xColumnType) ? "nvl(" + xColumn + ",0)" : "nvl(" + xColumn + ",'空')") + " as name ";
             }