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
4b87a854
Commit
4b87a854
authored
Mar 22, 2021
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试印章上传
parent
5cad6c31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsInsurerServiceImpl.java
+6
-5
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsInsurerServiceImpl.java
View file @
4b87a854
...
@@ -47,8 +47,9 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
...
@@ -47,8 +47,9 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
byte
[]
bytes
=
sealFile
.
getBytes
();
byte
[]
bytes
=
sealFile
.
getBytes
();
InputStream
in
=
new
ByteArrayInputStream
(
bytes
);
InputStream
in
=
new
ByteArrayInputStream
(
bytes
);
InetAddress
address
=
InetAddress
.
getLocalHost
();
InetAddress
address
=
InetAddress
.
getLocalHost
();
File
outFile
=
new
File
(
signImage
+
sealFile
.
getName
());
File
outFile
=
new
File
(
signImage
+
sealFile
.
getOriginalFilename
());
System
.
out
.
println
(
"http://"
+
address
+
signImage
);
System
.
out
.
println
(
address
.
getHostAddress
());
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
);
FileOutputStream
out
=
new
FileOutputStream
(
outFile
);
byte
[]
bts
=
new
byte
[
1024
];
byte
[]
bts
=
new
byte
[
1024
];
...
@@ -59,7 +60,7 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
...
@@ -59,7 +60,7 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
if
(!
CommonUtil
.
isNullOrZero
(
insurerBranchId
))
{
if
(!
CommonUtil
.
isNullOrZero
(
insurerBranchId
))
{
AclInsurerBranch
branch
=
new
AclInsurerBranch
();
AclInsurerBranch
branch
=
new
AclInsurerBranch
();
branch
.
setId
(
insurerBranchId
);
branch
.
setId
(
insurerBranchId
);
branch
.
setElectronicTaxSeal
(
"http://"
+
address
+
signImage
);
branch
.
setElectronicTaxSeal
(
"http://"
+
address
.
getHostAddress
()
+
signImage
+
sealFile
.
getOriginalFilename
()
);
branch
.
setUpdatedAt
(
new
Date
());
branch
.
setUpdatedAt
(
new
Date
());
branch
.
setUpdatedBy
(
loginId
);
branch
.
setUpdatedBy
(
loginId
);
aclInsurerBranchDALService
.
update
(
branch
);
aclInsurerBranchDALService
.
update
(
branch
);
...
@@ -67,12 +68,12 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
...
@@ -67,12 +68,12 @@ public class AgmsInsurerServiceImpl implements AgmsInsurerService {
if
(!
CommonUtil
.
isNullOrZero
(
insurerBranchDeptId
))
{
if
(!
CommonUtil
.
isNullOrZero
(
insurerBranchDeptId
))
{
AclInsurerBranchDept
dept
=
new
AclInsurerBranchDept
();
AclInsurerBranchDept
dept
=
new
AclInsurerBranchDept
();
dept
.
setId
(
insurerBranchDeptId
);
dept
.
setId
(
insurerBranchDeptId
);
dept
.
setElectronicTaxSeal
(
"http://"
+
address
+
signImage
);
dept
.
setElectronicTaxSeal
(
"http://"
+
address
.
getHostAddress
()
+
signImage
+
sealFile
.
getOriginalFilename
()
);
dept
.
setUpdatedAt
(
new
Date
());
dept
.
setUpdatedAt
(
new
Date
());
dept
.
setUpdatedBy
(
loginId
);
dept
.
setUpdatedBy
(
loginId
);
aclInsurerBranchDeptDALService
.
update
(
dept
);
aclInsurerBranchDeptDALService
.
update
(
dept
);
}
}
responseVO
.
setFileUrl
(
"http://"
+
address
+
signImage
);
responseVO
.
setFileUrl
(
"http://"
+
address
.
getHostAddress
()
+
signImage
+
sealFile
.
getOriginalFilename
()
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
success
=
false
;
success
=
false
;
message
=
ZHBErrorConfig
.
getErrorInfo
(
"830025"
);
message
=
ZHBErrorConfig
.
getErrorInfo
(
"830025"
);
...
...
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