gamma功能报告名称问题修改
gamma功能增加自动处理报告,日志文件查看不存在错误提示
This commit is contained in:
parent
93d30902f3
commit
0c150e6b7e
|
@ -2315,9 +2315,9 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
map.put("AllData", datalist);
|
map.put("AllData", datalist);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String GetReportContent(PHDFile phd, boolean bLog) {
|
public String GetReportContent(PHDFile phd, String userName, boolean bLog) {
|
||||||
GStoreMiddleProcessData middleData = new GStoreMiddleProcessData();
|
GStoreMiddleProcessData middleData = new GStoreMiddleProcessData();
|
||||||
GetInterMiddlData(phd, "", middleData);
|
GetInterMiddlData(phd, userName, middleData);
|
||||||
if(bLog) {
|
if(bLog) {
|
||||||
return GetLogContent(middleData);
|
return GetLogContent(middleData);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3505,6 +3505,9 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
||||||
public void viewARR(Integer sampleId, HttpServletResponse response) {
|
public void viewARR(Integer sampleId, HttpServletResponse response) {
|
||||||
//获取自动处理生成的报告地址
|
//获取自动处理生成的报告地址
|
||||||
String reportPath = spectrumAnalysisMapper.viewARR(sampleId);
|
String reportPath = spectrumAnalysisMapper.viewARR(sampleId);
|
||||||
|
if (StringUtils.isBlank(reportPath)){
|
||||||
|
throw new RuntimeException("自动处理程序生成报告不存在!");
|
||||||
|
}
|
||||||
String pathName = StringPool.SLASH + spectrumPathProperties.getSaveFilePath() + StringPool.SLASH + reportPath.substring(0, reportPath.lastIndexOf(StringPool.SLASH));
|
String pathName = StringPool.SLASH + spectrumPathProperties.getSaveFilePath() + StringPool.SLASH + reportPath.substring(0, reportPath.lastIndexOf(StringPool.SLASH));
|
||||||
String fileName = reportPath.substring(reportPath.lastIndexOf(StringPool.SLASH)+1)+".txt";
|
String fileName = reportPath.substring(reportPath.lastIndexOf(StringPool.SLASH)+1)+".txt";
|
||||||
//连接ftp
|
//连接ftp
|
||||||
|
@ -3615,7 +3618,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
||||||
result.error500("Please select the parse file first!");
|
result.error500("Please select the parse file first!");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
String reportContent = gammaFileUtil.GetReportContent(phd, false);
|
String reportContent = gammaFileUtil.GetReportContent(phd, userName, false);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
result.setResult(reportContent);
|
result.setResult(reportContent);
|
||||||
return result;
|
return result;
|
||||||
|
@ -3629,7 +3632,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
||||||
if (Objects.isNull(phd)) {
|
if (Objects.isNull(phd)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String reportContent = gammaFileUtil.GetReportContent(phd, false);
|
String reportContent = gammaFileUtil.GetReportContent(phd, userName, false);
|
||||||
OutputStream fos = null;
|
OutputStream fos = null;
|
||||||
try {
|
try {
|
||||||
//设置响应类型
|
//设置响应类型
|
||||||
|
@ -4093,6 +4096,9 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
||||||
@Override
|
@Override
|
||||||
public void viewAutomaticAnalysisLog(Integer sampleId, HttpServletResponse response) {
|
public void viewAutomaticAnalysisLog(Integer sampleId, HttpServletResponse response) {
|
||||||
String logPath = spectrumAnalysisMapper.findAutomaticLogPath(sampleId);
|
String logPath = spectrumAnalysisMapper.findAutomaticLogPath(sampleId);
|
||||||
|
if (StringUtils.isBlank(logPath)){
|
||||||
|
throw new RuntimeException("自动处理程序生成日志不存在!");
|
||||||
|
}
|
||||||
String pathName = StringPool.SLASH + spectrumPathProperties.getLogPath() + StringPool.SLASH + logPath.substring(0, logPath.lastIndexOf(StringPool.SLASH));
|
String pathName = StringPool.SLASH + spectrumPathProperties.getLogPath() + StringPool.SLASH + logPath.substring(0, logPath.lastIndexOf(StringPool.SLASH));
|
||||||
String fileName = logPath.substring(logPath.lastIndexOf(StringPool.SLASH) + 1);
|
String fileName = logPath.substring(logPath.lastIndexOf(StringPool.SLASH) + 1);
|
||||||
//连接ftp
|
//连接ftp
|
||||||
|
@ -4149,7 +4155,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
||||||
result.error500("Please select the parse file first!");
|
result.error500("Please select the parse file first!");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
String reportContent = gammaFileUtil.GetReportContent(phd, true);
|
String reportContent = gammaFileUtil.GetReportContent(phd, userName, true);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
result.setResult(reportContent);
|
result.setResult(reportContent);
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user