青羊经侦大队-数据平台
wl
2022-07-19 df8b1094a09897b3f881529a31db8893d298ed12
src/main/java/com/example/jz/service/impl/ReportServiceImpl.java
@@ -113,6 +113,17 @@
                    ArrayList<ImageData> imageDataList = new ArrayList<>();
                    if (StringUtils.isNotBlank(a.getReportMaterials())) {
                        String[] urls = a.getReportMaterials().split(",");
                        if (urls.length==1){
                            int width=600;
                            try {
                                ImageData imageData = new ImageData();
                                imageData.setImage(IoUtils.toByteArray(new URL(minIOService.getPreviewFileUrl(urls[0])).openConnection().getInputStream()));
                                imageData.setRight(width/2);
                                imageDataList.add(imageData);
                            } catch (Exception e) {
                                throw new RuntimeException(e);
                            }
                        }else {
                        for (int i = 0; i < urls.length; i++) {
                            int width=600;
                            try {
@@ -126,6 +137,7 @@
                            }
                        }
                        }
                        }
                        objectWriteCellData.setImageDataList(imageDataList);
                        exportExcelReportVo.setWriteCellData(objectWriteCellData);
                        exportExcelReportVos.add(exportExcelReportVo);