|
|
@@ -469,25 +469,17 @@ 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(); |
|
|
|
UrlResource urlResource = new UrlResource(url); |
|
|
|
boolean exists = urlResource.exists(); |
|
|
|
// if (exists) { |
|
|
|
// image = Image.getInstance(url); |
|
|
|
// image.setAlignment(Image.ALIGN_CENTER); |
|
|
|
// image.scalePercent(50); //依照比例缩放 |
|
|
|
// //image.setAbsolutePosition(400, 600); |
|
|
|
// image.scaleToFit(50, 50);//自定义大 |
|
|
|
// } else { |
|
|
|
// log.error("图片不存在!" + url); |
|
|
|
// } |
|
|
|
if (exists) { |
|
|
|
File file = urlResource.getFile(); |
|
|
|
cell.add(file); |
|
|
|
if (urlResource.exists()) { |
|
|
|
Image image = Image.getInstance(url); |
|
|
|
image.setAlignment(Image.ALIGN_CENTER); |
|
|
|
image.setAbsolutePosition(0, 0); |
|
|
|
cell.add(image); |
|
|
|
} else { |
|
|
|
cell.add(new Paragraph("")); |
|
|
|
log.error("图片不存在!" + url); |
|
|
|
} |
|
|
|
} |
|
|
|
table4.addCell(cell); |