Procházet zdrojové kódy

图片的问题

tags/v1.1.0
qiujinyang před 2 roky
rodič
revize
dbe0ec4234
1 změnil soubory, kde provedl 15 přidání a 15 odebrání
  1. +15
    -15
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ReportServiceImpl.java

+ 15
- 15
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/ReportServiceImpl.java Zobrazit soubor

@@ -469,23 +469,23 @@ public class ReportServiceImpl extends BaseServiceImpl<ReportMapper, Report> imp
str = " 问题图片";
cell.add(new Paragraph(str, font));
} else{
// Image image = null;
// //String url = CommonConfig.imageURL + reportInfoVO.getQuestionReportList().get(i).getFileMarkerUrl();
// String url = reportInfoVO.getQuestionReportList().get(i).getFileMarkerUrl();
// if (new UrlResource(url).exists()) {
// image = Image.getInstance(url);
// image.setAlignment(Image.ALIGN_CENTER);
// image.scalePercent(100); //依照比例缩放
Image image = null;
//String url = CommonConfig.imageURL + reportInfoVO.getQuestionReportList().get(i).getFileMarkerUrl();
String url = reportInfoVO.getQuestionReportList().get(i).getFileMarkerUrl();
if (new UrlResource(url).exists()) {
image = Image.getInstance(url);
//image.setAlignment(Image.ALIGN_CENTER);
image.scalePercent(10); //依照比例缩放
// image.setAbsolutePosition(400, 600);
// image.scaleToFit(300, 300);//自定义大
// } else {
// log.error("图片不存在!" + url);
// }
// if (new UrlResource(url).exists()) {
// cell.add(image);
// } else {
// cell.add(new Paragraph(""));
// }
} else {
log.error("图片不存在!" + url);
}
if (new UrlResource(url).exists()) {
cell.add(image);
} else {
cell.add(new Paragraph(""));
}
}
table4.addCell(cell);


Načítá se…
Zrušit
Uložit