|
@@ -204,14 +204,15 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
|
|
|
row.createCell(12).setCellValue(vo.getFrozen());
|
|
|
}
|
|
|
|
|
|
- //先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
|
|
- ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
|
|
+
|
|
|
|
|
|
//查询 图片 url
|
|
|
List<String> imageUrlList = reportSettlementMapper.getAccountImagesBytedance(accountId,paramsVo.getUploadYears());
|
|
|
|
|
|
if (!Check.isNull(imageUrlList)){
|
|
|
for (int j = 0; j < imageUrlList.size(); j++) {
|
|
|
+ //先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
|
|
+ ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
|
|
String imagePath = imageUrlList.get(j);
|
|
|
//通过图片网络地址 获取输入流
|
|
|
/* InputStream is = createExcelByTemplate.getInputStreamByUrl(imagePath);
|
|
@@ -220,8 +221,6 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
|
|
|
URL url = new URL(imagePath);
|
|
|
Image imageTookittitle = Toolkit.getDefaultToolkit().createImage(url);
|
|
|
BufferedImage bufferImg = createExcelByTemplate.toBufferedImage(imageTookittitle);
|
|
|
-
|
|
|
-
|
|
|
ImageIO.write(bufferImg, imagePath.substring(imagePath.lastIndexOf(".") + 1), byteArrayOut);
|
|
|
int startIndex = settlementList.size() +6;
|
|
|
//anchor主要用于设置图片的属性
|
|
@@ -396,14 +395,15 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
|
|
|
row.createCell(12).setCellValue(vo.getBalance());
|
|
|
}
|
|
|
|
|
|
- //先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
|
|
- ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
|
|
+
|
|
|
|
|
|
//查询 图片 url
|
|
|
List<String> imageUrlList = reportSettlementMapper.getAccountImagesBytedance(accountId,paramsVo.getUploadYears());
|
|
|
|
|
|
if (!Check.isNull(imageUrlList)){
|
|
|
for (int j = 0; j < imageUrlList.size(); j++) {
|
|
|
+ //先把读进来的图片放到一个ByteArrayOutputStream中,以便产生ByteArray
|
|
|
+ ByteArrayOutputStream byteArrayOut = new ByteArrayOutputStream();
|
|
|
String imagePath = imageUrlList.get(j);
|
|
|
//通过图片网络地址 获取输入流
|
|
|
/* InputStream is = createExcelByTemplate.getInputStreamByUrl(imagePath);
|
|
@@ -412,11 +412,9 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
|
|
|
URL url = new URL(imagePath);
|
|
|
Image imageTookittitle = Toolkit.getDefaultToolkit().createImage(url);
|
|
|
BufferedImage bufferImg = createExcelByTemplate.toBufferedImage(imageTookittitle);
|
|
|
-
|
|
|
ImageIO.write(bufferImg, imagePath.substring(imagePath.lastIndexOf(".") + 1), byteArrayOut);
|
|
|
//anchor主要用于设置图片的属性
|
|
|
int startIndex = settlementList.size()+7;
|
|
|
-
|
|
|
HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 255, 255, (short) 2, startIndex+(5*j)+50*j, (short) 10, startIndex+(5*j)+50*(j+1));
|
|
|
//HSSFClientAnchor anchor2 = new HSSFClientAnchor(0, 0, 255, 255, (short) 5, settlementList.size() + 40, (short) 10, 40 * 2);
|
|
|
anchor.setAnchorType(ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE);
|