diff --git a/main/logbook/dto/chart/ResourceLog.java b/main/logbook/dto/chart/ResourceLog.java index 718f9e28..c67ee675 100644 --- a/main/logbook/dto/chart/ResourceLog.java +++ b/main/logbook/dto/chart/ResourceLog.java @@ -71,8 +71,13 @@ public static ResourceLog getInstance(File file) throws IOException { while (ite.hasNext()) { String line = ite.next(); // 日付,(直前のイベント,)燃料,弾薬,鋼材,ボーキ,高速建造材,高速修復材,開発資材,ネジ - // 高速建造材,高速修復材が逆になっているので注意 - String[] colums = line.split(","); + // 高速建造材,高速修復材が逆になっているので注意 + String[] colums; + if (line.contains(",")) { + colums = line.split(","); + } else { + colums = line.split("\t"); + } try { pos.setIndex(0); Date date = null; diff --git a/main/logbook/gui/logic/CreateReportLogic.java b/main/logbook/gui/logic/CreateReportLogic.java index ed94c02c..f3555320 100644 --- a/main/logbook/gui/logic/CreateReportLogic.java +++ b/main/logbook/gui/logic/CreateReportLogic.java @@ -864,7 +864,7 @@ public static List loadCreateShipReport() { File file = new File(FilenameUtils.concat(AppConfig.get().getReportPath(), AppConstants.LOG_CREATE_SHIP)); if (file.exists()) { CSVReader reader = new CSVReader(new InputStreamReader( - new FileInputStream(file), AppConstants.CHARSET)); + new FileInputStream(file), AppConstants.CHARSET), '\t'); dtoList = getCreateShip(reader.readAll()); reader.close(); } @@ -904,7 +904,7 @@ public static List loadCreateItemReport() { File file = new File(FilenameUtils.concat(AppConfig.get().getReportPath(), AppConstants.LOG_CREATE_ITEM)); if (file.exists()) { CSVReader reader = new CSVReader(new InputStreamReader( - new FileInputStream(file), AppConstants.CHARSET)); + new FileInputStream(file), AppConstants.CHARSET), '\t'); dtoList = getCreateItem(reader.readAll()); reader.close(); } @@ -944,7 +944,7 @@ public static List loadMissionReport() { File file = new File(FilenameUtils.concat(AppConfig.get().getReportPath(), AppConstants.LOG_MISSION)); if (file.exists()) { CSVReader reader = new CSVReader(new InputStreamReader( - new FileInputStream(file), AppConstants.CHARSET)); + new FileInputStream(file), AppConstants.CHARSET), '\t'); dtoList = getMissionResult(reader.readAll()); reader.close(); }