|
@@ -598,14 +598,6 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
|
|
return CommonResult.fail("数据集为空!");
|
|
return CommonResult.fail("数据集为空!");
|
|
}
|
|
}
|
|
evaluate_entity.setInputPath(entity.getInputPath() + ";" + entity.getOutputPath() + File.separator + "txt");
|
|
evaluate_entity.setInputPath(entity.getInputPath() + ";" + entity.getOutputPath() + File.separator + "txt");
|
|
-// if (file________.listFiles() != null && file________.listFiles().length > 0) {
|
|
|
|
-// for (File file___________________tmp : file________.listFiles()) {
|
|
|
|
-// if (file___________________tmp.isDirectory()) {
|
|
|
|
-// evaluate_entity.setInputPath(file___________________tmp.getPath() + ";" + entity.getOutputPath() + File.separator + "txt");
|
|
|
|
-// break;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
} else {
|
|
} else {
|
|
return CommonResult.fail("命名错误!");
|
|
return CommonResult.fail("命名错误!");
|
|
}
|
|
}
|
|
@@ -711,21 +703,18 @@ public class TrackSequenceServiceImpl extends BaseServiceImpl<TrackSequenceMappe
|
|
String fileName_without_suffix = removeFileExtension(fileName);
|
|
String fileName_without_suffix = removeFileExtension(fileName);
|
|
|
|
|
|
Path path = Paths.get(resourcePath);
|
|
Path path = Paths.get(resourcePath);
|
|
- Path resultPath = path.resolveSibling(entity.getId().toString() + BizConstant.TRACK_SEQUENCE_SUFFIX + File.separator + "evaluate_result" + File.separator + "test.csv");
|
|
|
|
|
|
+ Path resultPath = path.resolveSibling(entity.getId().toString() + BizConstant.TRACK_SEQUENCE_SUFFIX + File.separator + BizConstant.RESULT_JSON_NAME);
|
|
|
|
|
|
if (!new File(resultPath.toString()).exists()) {
|
|
if (!new File(resultPath.toString()).exists()) {
|
|
return CommonResult.fail("评估结果文件不存在!");
|
|
return CommonResult.fail("评估结果文件不存在!");
|
|
}
|
|
}
|
|
|
|
|
|
- Map<String, String> map = null;
|
|
|
|
- try {
|
|
|
|
- map = CsvReadUtils.readCSVForLastRowAsMap(resultPath.toString(), ",");
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- return CommonResult.fail("读取结果集失败!");
|
|
|
|
|
|
+ List<Dict> resultMap = parseJsonMapList(resultPath);
|
|
|
|
+ if (ObjectUtil.isEmpty(resultMap)) {
|
|
|
|
+ return CommonResult.fail("获取结果文件失败");
|
|
}
|
|
}
|
|
|
|
|
|
- return CommonResult.success(map);
|
|
|
|
|
|
+ return CommonResult.success(resultMap);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|