LOGOURL错误处理

This commit is contained in:
yujh 2024-10-30 13:51:04 +08:00
parent 50f0412f5a
commit 134b56edf7
4 changed files with 5 additions and 2 deletions

View File

@ -1100,6 +1100,7 @@ public class Report1Gener {
if(headerlogo.size()>0){
FormFile formFile = headerlogo.get(0);
DCContext dc = SDK.getBOAPI().getFileDCContext(formFile);
dataMap.put("LOGOURL",dc.getFilePath());
InputStream inputStream = SDK.getDCAPI().read(dc);
try {
// 使用ByteArrayOutputStream来收集InputStream中的数据

View File

@ -704,9 +704,9 @@ public class OutputWordUtil {
TableCell cellImg = table.getRows().get(0).getCells().get(1);
//创建 DocPicture 类的对象
DocPicture picture = new DocPicture(templateDoc);
/*
String logoUrl = dataMap.getString("LOGOURL");
picture.loadImage(logoUrl);*/
picture.loadImage(logoUrl);
//设置图片大小
picture.setWidth(75);
picture.setHeight(90);

View File

@ -717,6 +717,7 @@ public class Report1Gener {
if(headerlogo.size()>0){
FormFile formFile = headerlogo.get(0);
DCContext dc = SDK.getBOAPI().getFileDCContext(formFile);
dataMap.put("LOGOURL",dc.getFilePath());
InputStream inputStream = SDK.getDCAPI().read(dc);
try {
// 使用ByteArrayOutputStream来收集InputStream中的数据

View File

@ -338,6 +338,7 @@ public class Report1Gener {
if(headerlogo.size()>0){
FormFile formFile = headerlogo.get(0);
DCContext dc = SDK.getBOAPI().getFileDCContext(formFile);
dataMap.put("LOGOURL",dc.getFilePath());
InputStream inputStream = SDK.getDCAPI().read(dc);
try {
// 使用ByteArrayOutputStream来收集InputStream中的数据