Browse Source

"半年"取数BUG修复

chenw 6 years ago
parent
commit
879bfcf493

+ 4 - 0
bi-server/src/main/java/com/usoftchina/bi/server/service/chart/TimeConverterUtil.java

@@ -4,6 +4,7 @@ import com.usoftchina.bi.server.dao.chart.ShowChartsMapper;
 import com.usoftchina.bi.server.model.bo.TimeReture;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -72,6 +73,9 @@ public class TimeConverterUtil {
             }else {
                 timeReture.setOverdose(true);
             }
+            if (StringUtils.isEmpty(screen)) {
+                screen = "where 1 = 1";
+            }
             value = showChartsMapper.getTimeYear(xColumnName, tableName, screen);
             timeReture.setValues(value);
         }else {