Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
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
AutogeneralShanghai
yd-backend
Commits
4d9938b7
Commit
4d9938b7
authored
Mar 23, 2021
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关闭流
parent
4b87a854
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsInsurerServiceImpl.java
+19
-6
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsInsurerServiceImpl.java
View file @
4d9938b7
...
@@ -15,10 +15,7 @@ import org.springframework.context.annotation.PropertySource;
...
@@ -15,10 +15,7 @@ import org.springframework.context.annotation.PropertySource;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.ByteArrayInputStream
;
import
java.io.*
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.InputStream
;
import
java.net.InetAddress
;
import
java.net.InetAddress
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -43,15 +40,17 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
...
@@ -43,15 +40,17 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
SealUploadResponseVO
responseVO
=
new
SealUploadResponseVO
();
SealUploadResponseVO
responseVO
=
new
SealUploadResponseVO
();
boolean
success
=
true
;
boolean
success
=
true
;
String
message
=
ZHBErrorConfig
.
getErrorInfo
(
"800000"
);
String
message
=
ZHBErrorConfig
.
getErrorInfo
(
"800000"
);
InputStream
in
=
null
;
FileOutputStream
out
=
null
;
try
{
try
{
byte
[]
bytes
=
sealFile
.
getBytes
();
byte
[]
bytes
=
sealFile
.
getBytes
();
InputStream
in
=
new
ByteArrayInputStream
(
bytes
);
in
=
new
ByteArrayInputStream
(
bytes
);
InetAddress
address
=
InetAddress
.
getLocalHost
();
InetAddress
address
=
InetAddress
.
getLocalHost
();
File
outFile
=
new
File
(
signImage
+
sealFile
.
getOriginalFilename
());
File
outFile
=
new
File
(
signImage
+
sealFile
.
getOriginalFilename
());
System
.
out
.
println
(
address
.
getHostAddress
());
System
.
out
.
println
(
address
.
getHostAddress
());
System
.
out
.
println
(
"http://"
+
address
.
getHostAddress
()
+
signImage
+
sealFile
.
getOriginalFilename
());
System
.
out
.
println
(
"http://"
+
address
.
getHostAddress
()
+
signImage
+
sealFile
.
getOriginalFilename
());
// File outFile = new File("D:\\"+sealFile.getOriginalFilename());
// File outFile = new File("D:\\"+sealFile.getOriginalFilename());
FileOutputStream
out
=
new
FileOutputStream
(
outFile
);
out
=
new
FileOutputStream
(
outFile
);
byte
[]
bts
=
new
byte
[
1024
];
byte
[]
bts
=
new
byte
[
1024
];
int
len
=
0
;
int
len
=
0
;
while
((
len
=
in
.
read
(
bts
))
!=
-
1
)
{
while
((
len
=
in
.
read
(
bts
))
!=
-
1
)
{
...
@@ -78,6 +77,20 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
...
@@ -78,6 +77,20 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
success
=
false
;
success
=
false
;
message
=
ZHBErrorConfig
.
getErrorInfo
(
"830025"
);
message
=
ZHBErrorConfig
.
getErrorInfo
(
"830025"
);
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
try
{
assert
in
!=
null
;
in
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
try
{
assert
out
!=
null
;
out
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
responseVO
.
setCommonResult
(
new
CommonResult
(
success
,
message
));
responseVO
.
setCommonResult
(
new
CommonResult
(
success
,
message
));
...
...
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