|
|
@@ -69,41 +69,41 @@ public class TimeConverterUtil {
|
|
|
}
|
|
|
|
|
|
//无分组时间值
|
|
|
- public String getTimeValueConverter(String yColumn, String xColumn, String tableName, String dataType, String timeType, String xdata){
|
|
|
+ public String getTimeValueConverter(String yColumn, String xColumn, String tableName, String dataType, String timeType, String xdata, String screen){
|
|
|
|
|
|
String timeGroup = "'YYYY-MM-DD'";
|
|
|
String value = null;
|
|
|
//判断时间类型
|
|
|
if (xdata == null || "".equals(xdata)){
|
|
|
- value = showChartsMapper.getTimeIsNull(dataType, yColumn, tableName, xColumn);
|
|
|
+ value = showChartsMapper.getTimeIsNull(dataType, yColumn, tableName, xColumn, screen);
|
|
|
}else {
|
|
|
if ("halfYear".equals(timeType)) {
|
|
|
String[] str = xdata.split("-");
|
|
|
if ("H1".equals(str[1])) {
|
|
|
String firstIndex = str[0] + "-01";
|
|
|
String afterIndex = str[0] + "-06";
|
|
|
- value = showChartsMapper.getTimeValueYear(dataType, yColumn, tableName, xColumn, firstIndex, afterIndex);
|
|
|
+ value = showChartsMapper.getTimeValueYear(dataType, yColumn, tableName, xColumn, firstIndex, afterIndex, screen);
|
|
|
} else {
|
|
|
String firstIndex = str[0] + "-07";
|
|
|
String afterIndex = str[0] + "-12";
|
|
|
- value = showChartsMapper.getTimeValueYear(dataType, yColumn, tableName, xColumn, firstIndex, afterIndex);
|
|
|
+ value = showChartsMapper.getTimeValueYear(dataType, yColumn, tableName, xColumn, firstIndex, afterIndex, screen);
|
|
|
}
|
|
|
} else if ("year".equals(timeType)) {
|
|
|
timeGroup = "'YYYY'";
|
|
|
- value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata);
|
|
|
+ value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata, screen);
|
|
|
} else if ("month".equals(timeType)) {
|
|
|
timeGroup = "'YYYY-MM'";
|
|
|
- value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata);
|
|
|
+ value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata, screen);
|
|
|
} else if ("day".equals(timeType) || "".equals(timeType)) {
|
|
|
- value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata);
|
|
|
+ value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata, screen);
|
|
|
} else if ("quarter".equals(timeType)) {
|
|
|
timeGroup = "'YYYY-Q'";
|
|
|
- value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata);
|
|
|
+ value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata, screen);
|
|
|
} else if ("week".equals(timeType)) {
|
|
|
timeGroup = "'YYYY-WW'";
|
|
|
- value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata);
|
|
|
+ value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata, screen);
|
|
|
} else {
|
|
|
- value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata);
|
|
|
+ value = showChartsMapper.getTimeValue(dataType, yColumn, tableName, xColumn, timeGroup, xdata, screen);
|
|
|
}
|
|
|
}
|
|
|
return value;
|
|
|
@@ -111,12 +111,12 @@ public class TimeConverterUtil {
|
|
|
|
|
|
//有分组时间类型值处理
|
|
|
public String getGroupTimeConverter(String dataType, String yColumn, String tableName, String groupByName, String timeType,
|
|
|
- String groupsName, String xColumn, String xAxisDataOne){
|
|
|
+ String groupsName, String xColumn, String xAxisDataOne, String screen){
|
|
|
String timeGroup = "'YYYY-MM-DD'";
|
|
|
String value = null;
|
|
|
if(groupsName == null || "".equals(groupsName)){
|
|
|
value = showChartsMapper.getGroupsValueTimeIsNull(dataType, yColumn, tableName, groupByName, groupsName, xColumn,
|
|
|
- timeGroup, xAxisDataOne);
|
|
|
+ timeGroup, xAxisDataOne, screen);
|
|
|
}else {
|
|
|
if ("year".equals(timeType)) {
|
|
|
timeGroup = "'YYYY'";
|
|
|
@@ -142,11 +142,11 @@ public class TimeConverterUtil {
|
|
|
if ("上半年".equals(str[1])) {
|
|
|
String firstIndex = str[0] + "-01";
|
|
|
String afterIndex = str[0] + "-06";
|
|
|
- value = showChartsMapper.getTimeValueHalfYear(dataType, yColumn, tableName, xColumn, firstIndex, afterIndex, groupByName, groupsName);
|
|
|
+ value = showChartsMapper.getTimeValueHalfYear(dataType, yColumn, tableName, xColumn, firstIndex, afterIndex, groupByName, groupsName, screen);
|
|
|
} else {
|
|
|
String firstIndex = str[0] + "-07";
|
|
|
String afterIndex = str[0] + "-12";
|
|
|
- value = showChartsMapper.getTimeValueHalfYear(dataType, yColumn, tableName, xColumn, firstIndex, afterIndex, groupByName, groupsName);
|
|
|
+ value = showChartsMapper.getTimeValueHalfYear(dataType, yColumn, tableName, xColumn, firstIndex, afterIndex, groupByName, groupsName, screen);
|
|
|
}
|
|
|
} else {
|
|
|
value = showChartsMapper.getGroupsValueTime(dataType, yColumn, tableName, groupByName, groupsName, xColumn,
|