|
@@ -51,6 +51,7 @@ import java.sql.Date;
|
|
import java.sql.SQLException;
|
|
import java.sql.SQLException;
|
|
import java.sql.Time;
|
|
import java.sql.Time;
|
|
import java.sql.Timestamp;
|
|
import java.sql.Timestamp;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalTime;
|
|
import java.time.LocalTime;
|
|
import java.time.ZoneId;
|
|
import java.time.ZoneId;
|
|
@@ -315,7 +316,6 @@ public class FormExecuteController {
|
|
}
|
|
}
|
|
|
|
|
|
// 检查类层次结构
|
|
// 检查类层次结构
|
|
-
|
|
|
|
if (value instanceof Integer) {
|
|
if (value instanceof Integer) {
|
|
value = Integer.toString((Integer) value);
|
|
value = Integer.toString((Integer) value);
|
|
}
|
|
}
|
|
@@ -325,6 +325,11 @@ public class FormExecuteController {
|
|
if (value instanceof Long) {
|
|
if (value instanceof Long) {
|
|
value = Long.toString((Long) value);
|
|
value = Long.toString((Long) value);
|
|
}
|
|
}
|
|
|
|
+ if (value instanceof Date) {
|
|
|
|
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ // 将Date对象格式化为字符串
|
|
|
|
+ value = formatter.format((Date) value);
|
|
|
|
+ }
|
|
|
|
|
|
Cell cell = dataRow.createCell(i);
|
|
Cell cell = dataRow.createCell(i);
|
|
cell.setCellValue((String)value);
|
|
cell.setCellValue((String)value);
|