Commit 4aa8a588 by fudahua

feat:时间格式hh-》HH

parent 06d8e682
...@@ -213,12 +213,12 @@ public class CsvResultSetHelper implements ResultSetHelper { ...@@ -213,12 +213,12 @@ public class CsvResultSetHelper implements ResultSetHelper {
result.add(resultSet.getTimestamp(i+1) != null ? timeFormatter_threadLocal.get().format(resultSet.getTimestamp(i+1)) : ""); result.add(resultSet.getTimestamp(i+1) != null ? timeFormatter_threadLocal.get().format(resultSet.getTimestamp(i+1)) : "");
break; break;
default: default:
String s2 = String.valueOf(resultSet.getObject(i + 1)); // String s2 = String.valueOf(resultSet.getObject(i + 1));
// Object val = resultSet.getObject(i + 1); Object val = resultSet.getObject(i + 1);
// String s2=""; String s2="";
// if (val != null) { if (val != null) {
// s2 = String.valueOf(val); s2 = String.valueOf(val);
// } }
// if(org.apache.commons.lang3.StringUtils.isNotBlank(s2)){ // if(org.apache.commons.lang3.StringUtils.isNotBlank(s2)){
// if(s2.contains("E0") || s2.startsWith("0")){ // if(s2.contains("E0") || s2.startsWith("0")){
// s2 = s2 + "\t"; // s2 = s2 + "\t";
......
...@@ -995,7 +995,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService { ...@@ -995,7 +995,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
Integer type = columnMate.get(j).getValue(); Integer type = columnMate.get(j).getValue();
Cell midCell = row.createCell(j); Cell midCell = row.createCell(j);
String columnValue = columnValues[j]; String columnValue = columnValues[j];
if (columnValue.equals("null")) { if (StringUtils.isBlank(columnValue)) {
midCell.setCellValue(columnValue); midCell.setCellValue(columnValue);
continue; continue;
} }
......
...@@ -660,7 +660,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService { ...@@ -660,7 +660,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
case Types.INTEGER: case Types.INTEGER:
String intStr = rs.getString(j + 1); String intStr = rs.getString(j + 1);
if (StringUtils.isBlank(intStr)){ if (StringUtils.isBlank(intStr)){
midCell.setCellValue(intStr); midCell.setCellValue(0);
}else { }else {
midCell.setCellValue(Integer.valueOf(intStr)); midCell.setCellValue(Integer.valueOf(intStr));
} }
...@@ -668,7 +668,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService { ...@@ -668,7 +668,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
case Types.BIGINT: case Types.BIGINT:
String bigintStr = rs.getString(j + 1); String bigintStr = rs.getString(j + 1);
if (StringUtils.isBlank(bigintStr)){ if (StringUtils.isBlank(bigintStr)){
midCell.setCellValue(bigintStr); midCell.setCellValue(0);
}else { }else {
midCell.setCellValue(Long.valueOf(bigintStr)); midCell.setCellValue(Long.valueOf(bigintStr));
} }
...@@ -677,7 +677,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService { ...@@ -677,7 +677,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
case Types.DECIMAL: case Types.DECIMAL:
String doubleStr = rs.getString(j + 1); String doubleStr = rs.getString(j + 1);
if (StringUtils.isBlank(doubleStr)) { if (StringUtils.isBlank(doubleStr)) {
midCell.setCellValue(doubleStr); midCell.setCellValue(0);
}else { }else {
midCell.setCellValue(Double.valueOf(doubleStr)); midCell.setCellValue(Double.valueOf(doubleStr));
} }
...@@ -685,7 +685,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService { ...@@ -685,7 +685,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
case Types.FLOAT: case Types.FLOAT:
String floatStr = rs.getString(j + 1); String floatStr = rs.getString(j + 1);
if (StringUtils.isBlank(floatStr)) { if (StringUtils.isBlank(floatStr)) {
midCell.setCellValue(floatStr); midCell.setCellValue(0);
}else { }else {
midCell.setCellValue(Float.valueOf(floatStr)); midCell.setCellValue(Float.valueOf(floatStr));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment