Commit 6eae1f3e authored by Quxl's avatar Quxl

x

parent 76c9a00b
......@@ -637,8 +637,15 @@ public class ExportServiceImpl implements ExportService {
mvPhotoConn.setConnectTimeout(50 * 1000);
InputStream mvPhotoInstream = mvPhotoConn.getInputStream();
byte[] mvPhotoBytes = FileUtil.streamToBytes(mvPhotoInstream);
ClientAnchor anchor = new HSSFClientAnchor(0,0,0,0,(short)0,3,(short)9,3);
patriarch.createPicture(anchor, wb.addPicture(mvPhotoBytes, HSSFWorkbook.PICTURE_TYPE_JPEG));
ClientAnchor anchor = new HSSFClientAnchor(0,0,1023,255,(short)0,3,(short)9,3);
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) {
e.printStackTrace();
}
......@@ -656,8 +663,15 @@ public class ExportServiceImpl implements ExportService {
directorPhotoConn.setConnectTimeout(50 * 1000);
InputStream directorPhotoInstream = directorPhotoConn.getInputStream();
byte[] directorPhotoBytes = FileUtil.streamToBytes(directorPhotoInstream);
ClientAnchor anchor = new HSSFClientAnchor(0,0,0,0,(short)2,18,(short)3,25);
patriarch.createPicture(anchor, wb.addPicture(directorPhotoBytes, HSSFWorkbook.PICTURE_TYPE_JPEG));
ClientAnchor anchor = new HSSFClientAnchor(0,0,1023,255,(short)2,18,(short)3,25);
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) {
e.printStackTrace();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment