Commit 44552bee by jiang'yun

修改

parent 90894d90
......@@ -77,7 +77,7 @@ public class SampleReadRoutine {
makeBinHeaderFormat(),
makeTraceHeaderFormat());
final long startTime = System.currentTimeMillis();
// final long startTime = System.currentTimeMillis();
// At this point reading actually started. EBCDIC and binary headers are parsed on
// object construction.
......@@ -95,7 +95,7 @@ public class SampleReadRoutine {
}
System.out.println(i);
final long timeEnd = System.currentTimeMillis() - startTime;
// final long timeEnd = System.currentTimeMillis() - startTime;
} catch (FileNotFoundException e) {
logger.error(e.getLocalizedMessage());
System.exit(2);
......@@ -126,6 +126,6 @@ public class SampleReadRoutine {
System.out.println(trace.getValues()[i]);
}
System.out.printf("Values: %.10f : %.10f%n", trace.getMin(), trace.getMax());
// System.out.printf("Values: %.10f : %.10f%n", trace.getMin(), trace.getMax());
}
}
\ No newline at end of file
......@@ -44,7 +44,7 @@ public class DzController extends BaseController
// private static String tempPath = "/root/nandongyong/temp.Sgy";
// private static String tempPath = "C:\\ruoyi\\uploadPath\\11-VPVS.Sgy";
// private static String tempPath = "D:\\qianhe\\file\\地震\\cgm及配对的效果图\\line603_out.segy";
private static String tempPath = "D:\\qianhe\\file\\地震\\segy对比图\\line603_out_new_20250508.segy";
private static String tempPath = "D:\\qianhe\\file\\地震\\20250715-04segy\\gx_line509_stk.sgy";
//
// private static String inPath = "/root/nandongyong/1-VPVS.Sgy";
// private static String inPath = "D:\\SoftWork\\2023-06-05 物地震\\地震\\1-VPVS.Sgy";
......@@ -83,6 +83,35 @@ public class DzController extends BaseController
log.error("下载文件失败", e);
}
}
@GetMapping("/getSegyDataFile2")
public void getSegyDataFile2(String fileName, HttpServletResponse response, HttpServletRequest request)
{
try
{
if (!FileUtils.checkAllowDownload(fileName))
{
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
}
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
String filePath = RuoYiConfig.getDownloadPath() + fileName;
filePath = "/root" + filePath;
// filePath = "D:\\SoftWork\\2023-06-05 物地震\\地震\\temp.Sgy";
filePath = tempPath;
System.out.println("/n/n filePath = " + filePath + "/n/n");
// String filePath = "/root/D:/home/ruoyi/uploadPath/avatar/2023/06/13/density.segy";
// String filePath = "D:\\SoftWork\\2023-06-05 钻井院难动用\\density.segy";
// String realFileName = "density.segy";
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, realFileName);
FileUtils.writeBytes(filePath, response.getOutputStream());
}
catch (Exception e)
{
log.error("下载文件失败", e);
}
}
/**
* 获取工区坐标范围
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment