|
@@ -64,15 +64,15 @@ public class DatFileCreatUtils {
|
|
|
String sql = " /*dialect*/ select "+String.join(",", selector)+" from "+nckdentry;
|
|
|
DataSet dataSet = DB.queryDataSet(this.getClass().getName(),DBRoute.of(bizcloudnum),sql,null);
|
|
|
try {
|
|
|
- File file = new File(filePath);
|
|
|
- //文件路径不存在则创建文件
|
|
|
- if (!file.exists()) {
|
|
|
- File parentDir = file.getParentFile();
|
|
|
- if (parentDir != null && !parentDir.exists()) {
|
|
|
- parentDir.mkdirs();
|
|
|
- }
|
|
|
- file.createNewFile();
|
|
|
- }
|
|
|
+// File file = new File(filePath);
|
|
|
+// //文件路径不存在则创建文件
|
|
|
+// if (!file.exists()) {
|
|
|
+// File parentDir = file.getParentFile();
|
|
|
+// if (parentDir != null && !parentDir.exists()) {
|
|
|
+// parentDir.mkdirs();
|
|
|
+// }
|
|
|
+// file.createNewFile();
|
|
|
+// }
|
|
|
try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filePath), "GBK"))) {
|
|
|
while(dataSet.hasNext()) {
|
|
|
Row data = dataSet.next();
|
|
@@ -88,7 +88,6 @@ public class DatFileCreatUtils {
|
|
|
writer.newLine();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
} catch (IOException ex) {
|
|
|
ex.printStackTrace();
|
|
|
} catch (Exception e) {
|