Browse Source

处理排序字段引起的SQL错误

chenw 6 years ago
parent
commit
c16de0761c

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

@@ -111,6 +111,8 @@ public class ShowHistogramService {
             //Y轴排序
             if (sort.equals(yColumn)) {
                 sort = yAxisType + "(" + yColumn + ")";
+            } else {
+                sort = xColumn;
             }
             String fieldName = yAxisType
                     + "(nvl(" + yColumn + ",0)) as value,"