Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
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
曲欣亮
member-api
Commits
6eae1f3e
Commit
6eae1f3e
authored
Mar 06, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
76c9a00b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
ExportServiceImpl.java
...va/com/egolm/film/api/service/impl/ExportServiceImpl.java
+18
-4
No files found.
src/main/java/com/egolm/film/api/service/impl/ExportServiceImpl.java
View file @
6eae1f3e
...
@@ -637,8 +637,15 @@ public class ExportServiceImpl implements ExportService {
...
@@ -637,8 +637,15 @@ public class ExportServiceImpl implements ExportService {
mvPhotoConn
.
setConnectTimeout
(
50
*
1000
);
mvPhotoConn
.
setConnectTimeout
(
50
*
1000
);
InputStream
mvPhotoInstream
=
mvPhotoConn
.
getInputStream
();
InputStream
mvPhotoInstream
=
mvPhotoConn
.
getInputStream
();
byte
[]
mvPhotoBytes
=
FileUtil
.
streamToBytes
(
mvPhotoInstream
);
byte
[]
mvPhotoBytes
=
FileUtil
.
streamToBytes
(
mvPhotoInstream
);
ClientAnchor
anchor
=
new
HSSFClientAnchor
(
0
,
0
,
0
,
0
,(
short
)
0
,
3
,(
short
)
9
,
3
);
ClientAnchor
anchor
=
new
HSSFClientAnchor
(
0
,
0
,
1023
,
255
,(
short
)
0
,
3
,(
short
)
9
,
3
);
patriarch
.
createPicture
(
anchor
,
wb
.
addPicture
(
mvPhotoBytes
,
HSSFWorkbook
.
PICTURE_TYPE_JPEG
));
int
pritureType
=
HSSFWorkbook
.
PICTURE_TYPE_JPEG
;
String
fileName
=
filmExt
.
getPhoto_director
().
toUpperCase
();
if
(
fileName
.
endsWith
(
".JPG"
)
||
fileName
.
endsWith
(
".JPEG"
))
{
pritureType
=
HSSFWorkbook
.
PICTURE_TYPE_JPEG
;
}
else
if
(
fileName
.
endsWith
(
".PNG"
))
{
pritureType
=
HSSFWorkbook
.
PICTURE_TYPE_PNG
;
}
patriarch
.
createPicture
(
anchor
,
wb
.
addPicture
(
mvPhotoBytes
,
pritureType
));
}
catch
(
FileNotFoundException
e
)
{
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -656,8 +663,15 @@ public class ExportServiceImpl implements ExportService {
...
@@ -656,8 +663,15 @@ public class ExportServiceImpl implements ExportService {
directorPhotoConn
.
setConnectTimeout
(
50
*
1000
);
directorPhotoConn
.
setConnectTimeout
(
50
*
1000
);
InputStream
directorPhotoInstream
=
directorPhotoConn
.
getInputStream
();
InputStream
directorPhotoInstream
=
directorPhotoConn
.
getInputStream
();
byte
[]
directorPhotoBytes
=
FileUtil
.
streamToBytes
(
directorPhotoInstream
);
byte
[]
directorPhotoBytes
=
FileUtil
.
streamToBytes
(
directorPhotoInstream
);
ClientAnchor
anchor
=
new
HSSFClientAnchor
(
0
,
0
,
0
,
0
,(
short
)
2
,
18
,(
short
)
3
,
25
);
ClientAnchor
anchor
=
new
HSSFClientAnchor
(
0
,
0
,
1023
,
255
,(
short
)
2
,
18
,(
short
)
3
,
25
);
patriarch
.
createPicture
(
anchor
,
wb
.
addPicture
(
directorPhotoBytes
,
HSSFWorkbook
.
PICTURE_TYPE_JPEG
));
int
pritureType
=
HSSFWorkbook
.
PICTURE_TYPE_JPEG
;
String
fileName
=
filmExt
.
getPhoto_director
().
toUpperCase
();
if
(
fileName
.
endsWith
(
".JPG"
)
||
fileName
.
endsWith
(
".JPEG"
))
{
pritureType
=
HSSFWorkbook
.
PICTURE_TYPE_JPEG
;
}
else
if
(
fileName
.
endsWith
(
".PNG"
))
{
pritureType
=
HSSFWorkbook
.
PICTURE_TYPE_PNG
;
}
patriarch
.
createPicture
(
anchor
,
wb
.
addPicture
(
directorPhotoBytes
,
pritureType
));
}
catch
(
FileNotFoundException
e
)
{
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
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