fix:gamma自动处理生成报告
This commit is contained in:
parent
a807f410c3
commit
f838ba0a08
|
@ -152,6 +152,22 @@ public class Sample_G_Analysis {
|
|||
// 生成日志文件
|
||||
writeLog(middleData.getAnalyses_LogPath(), middleData);
|
||||
// todo 报告文件
|
||||
String reportContent = gammaFileUtil.GetReportContent(phdFile, false);
|
||||
String reportPath = StringUtils.substringBeforeLast(middleData.getAnalyses_ReportPath(), StringPool.SLASH);
|
||||
String reportName = StringUtils.substringAfterLast(middleData.getAnalyses_ReportPath(), StringPool.SLASH) + ".txt";
|
||||
String savePath = StringPool.SLASH + spectrumPathProperties.getRootPath() + StringPool.SLASH + reportPath;
|
||||
String tempDir = System.getProperty("java.io.tmpdir");
|
||||
// 创建文件
|
||||
File reportFile = FileUtil.writeString(reportContent, tempDir + System.currentTimeMillis(), "utf8");
|
||||
try {
|
||||
ftpUtil.saveFile(savePath, reportName, new FileInputStream(reportFile));
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
if (null != reportFile) {
|
||||
reportFile.delete();
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
|
||||
|
@ -207,7 +223,7 @@ public class Sample_G_Analysis {
|
|||
* @param middleData
|
||||
*/
|
||||
private void writeLog(String logFilePath, GStoreMiddleProcessData middleData) {
|
||||
logFilePath = StringPool.SLASH + spectrumPathProperties.getRootPath() + StringPool.SLASH + logFilePath;
|
||||
logFilePath = StringPool.SLASH + spectrumPathProperties.getLogPath() + StringPool.SLASH + logFilePath;
|
||||
String sampleId = middleData.getSample_id();
|
||||
MyLogFormatUtil myLogFormatUtil = new MyLogFormatUtil();
|
||||
List<String> writes = new LinkedList<>();
|
||||
|
|
Loading…
Reference in New Issue
Block a user