Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dizhen
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
dizhen
Commits
44552bee
Commit
44552bee
authored
Aug 21, 2025
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
90894d90
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
src/main/java/com/ruoyi/project/dz/SampleReadRoutine.java
+4
-3
src/main/java/com/ruoyi/project/dz/controller/DzController.java
+30
-1
No files found.
src/main/java/com/ruoyi/project/dz/SampleReadRoutine.java
View file @
44552bee
...
...
@@ -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
src/main/java/com/ruoyi/project/dz/controller/DzController.java
View file @
44552bee
...
...
@@ -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.se
gy"
;
private
static
String
tempPath
=
"D:\\qianhe\\file\\地震\\
20250715-04segy\\gx_line509_stk.s
gy"
;
//
// 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
);
}
}
/**
* 获取工区坐标范围
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment