Browse Source

线形图时间区间筛选BUG修复

chenw 6 years ago
parent
commit
52d9dbc472

+ 1 - 1
bi-server/src/main/java/com/usoftchina/bi/server/dao/chart/ShowChartsMapper.java

@@ -56,7 +56,7 @@ public interface ShowChartsMapper {
 
 
     //时间类型的X轴
-    @Select("select distinct to_char(${xAxisName},${timeType})time from ${tableName} where rownum <= #{count} ORDER by to_char(${xAxisName},${timeType}) ASC")
+    @Select("select distinct to_char(${xAxisName},${timeType})time from ${tableName} ${screen} and rownum <= #{count} ORDER by to_char(${xAxisName},${timeType}) ASC")
     List<String> getTimeDate(@Param("xAxisName") String xAxisName, @Param("tableName") String tableName,
                              @Param("timeType") String timeType, @Param("screen") String screen, @Param("count") int count);
 

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

@@ -111,7 +111,7 @@ public class ShowLineService {
 
         //X轴
         //判断是否为日期类型
-            timeReture = timeConverterUtil.timeConverter(xColumn, tableName, xAxisType, screen, 366);
+            timeReture = timeConverterUtil.timeConverter(xColumn, tableName, xAxisType, screen, lineConfigInfo.getMaxCount());
             xAxisData = timeReture.getValues();
             chartsDataInfo.setTooMany(timeReture.isOverdose());