Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
sentinel
Commits
bdd4b0cc
Commit
bdd4b0cc
authored
Mar 06, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
7aaeb993
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
ExportServiceImpl.java
...va/com/egolm/film/api/service/impl/ExportServiceImpl.java
+3
-10
No files found.
src/main/java/com/egolm/film/api/service/impl/ExportServiceImpl.java
View file @
bdd4b0cc
...
...
@@ -15,6 +15,7 @@ import java.util.Map;
import
javax.annotation.Resource
;
import
javax.servlet.ServletOutputStream
;
import
org.apache.poi.hssf.usermodel.HSSFClientAnchor
;
import
org.apache.poi.hssf.usermodel.HSSFPatriarch
;
import
org.apache.poi.hssf.usermodel.HSSFSheet
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
...
...
@@ -637,11 +638,7 @@ public class ExportServiceImpl implements ExportService {
mvPhotoConn
.
setConnectTimeout
(
50
*
1000
);
InputStream
mvPhotoInstream
=
mvPhotoConn
.
getInputStream
();
byte
[]
mvPhotoBytes
=
FileUtil
.
streamToBytes
(
mvPhotoInstream
);
CreationHelper
helper
=
sheet
.
getWorkbook
().
getCreationHelper
();
ClientAnchor
anchor
=
helper
.
createClientAnchor
();
anchor
.
setRow1
(
3
);
anchor
.
setCol1
(
0
);
anchor
.
setAnchorType
(
3
);
ClientAnchor
anchor
=
new
HSSFClientAnchor
(
0
,
0
,
0
,
0
,(
short
)
0
,
3
,(
short
)
8
,
3
);
patriarch
.
createPicture
(
anchor
,
wb
.
addPicture
(
mvPhotoBytes
,
HSSFWorkbook
.
PICTURE_TYPE_JPEG
));
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
...
...
@@ -660,11 +657,7 @@ public class ExportServiceImpl implements ExportService {
directorPhotoConn
.
setConnectTimeout
(
50
*
1000
);
InputStream
directorPhotoInstream
=
directorPhotoConn
.
getInputStream
();
byte
[]
directorPhotoBytes
=
FileUtil
.
streamToBytes
(
directorPhotoInstream
);
CreationHelper
helper
=
sheet
.
getWorkbook
().
getCreationHelper
();
ClientAnchor
anchor
=
helper
.
createClientAnchor
();
anchor
.
setRow1
(
3
);
anchor
.
setCol1
(
0
);
anchor
.
setAnchorType
(
3
);
ClientAnchor
anchor
=
new
HSSFClientAnchor
(
0
,
0
,
0
,
0
,(
short
)
2
,
18
,(
short
)
3
,
25
);
patriarch
.
createPicture
(
anchor
,
wb
.
addPicture
(
directorPhotoBytes
,
HSSFWorkbook
.
PICTURE_TYPE_JPEG
));
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
...
...
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