|
|
@@ -5,6 +5,7 @@ import com.dao.ShowChartsMapper;
|
|
|
import com.model.bo.LineSeries;
|
|
|
import com.model.bo.LineSeriesMap;
|
|
|
import com.model.bo.Screen;
|
|
|
+import com.model.bo.ScreenStr;
|
|
|
import com.model.pojo.RepCode;
|
|
|
import com.model.pojo.RepEntity;
|
|
|
import com.model.vo.configVo.ScatterConfigInfo;
|
|
|
@@ -78,6 +79,21 @@ public class ShowScatterService {
|
|
|
List<String> xAxisData = new ArrayList<String>(); //X轴自己用
|
|
|
List<String> xData = new ArrayList<String>(); //X轴前端用
|
|
|
|
|
|
+ //取筛选列表
|
|
|
+ List<Screen> screens = scatterConfigInfo.getFilters();
|
|
|
+ ScreenStr scr = new ScreenStr();
|
|
|
+ String screen = "";
|
|
|
+ String screenToColumn = "";
|
|
|
+ if ("".equals(screens) || screens == null){
|
|
|
+ screen = "";
|
|
|
+ }else {
|
|
|
+ scr = screenUtil.screensUtil(screens, xColumn);
|
|
|
+ screen = scr.getRet();
|
|
|
+ screenToColumn = scr.getWithColumnRet();
|
|
|
+ StringBuilder sb = new StringBuilder(screenToColumn);
|
|
|
+ screenToColumn = String.valueOf(sb .replace(1, 5, "where "));
|
|
|
+ }
|
|
|
+
|
|
|
//X轴
|
|
|
//判断是否为日期类型
|
|
|
if ("time".equals(xColumnType)){
|
|
|
@@ -85,7 +101,7 @@ public class ShowScatterService {
|
|
|
xData = timeConverterUtil.toRespons(xAxisData,xAxisType );
|
|
|
System.out.println("data:"+xAxisData);
|
|
|
}else {
|
|
|
- xAxisData = showChartsMapper.getXAxis(xColumn, tableName);
|
|
|
+ xAxisData = showChartsMapper.getXAxis(xColumn, tableName, screenToColumn);
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -93,16 +109,6 @@ public class ShowScatterService {
|
|
|
return new RepEntity(RepCode.Null);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- //取筛选列表
|
|
|
- List<Screen> screens = scatterConfigInfo.getFilters();
|
|
|
- String screen = "";
|
|
|
- if ("".equals(screens) || screens == null){
|
|
|
- screen = "";
|
|
|
- }else {
|
|
|
- screen = screenUtil.screensUtil(screens);
|
|
|
- }
|
|
|
-
|
|
|
//无分组时Y值
|
|
|
Iterator itX = xAxisData.iterator();
|
|
|
while (itX.hasNext()){
|
|
|
@@ -112,7 +118,7 @@ public class ShowScatterService {
|
|
|
if ("time".equals(xColumnType)){
|
|
|
valueOnes = timeConverterUtil.getTimeValueConverter(yColumn, xColumn, tableName, yAxisType, xAxisType, xdata, screen);
|
|
|
}else {
|
|
|
- valueOnes = showChartsMapper.getValues(yColumn, xColumn, tableName, yAxisType, xdata,"");
|
|
|
+ valueOnes = showChartsMapper.getValues(yColumn, xColumn, tableName, yAxisType, xdata, screen);
|
|
|
}
|
|
|
if (valueOnes == null || "".equals(valueOnes)){
|
|
|
valueOne = 0;
|