This commit is contained in:
jiangs 2025-09-30 15:09:22 +08:00
parent 30e08cf2d1
commit 53ec5f5d9e

View File

@ -130,7 +130,7 @@ public class ReportUtil {
if (base64) {
//删除图片文件
String[] pic = barCodeParam.getPic();
if(pic.length > 0){
if(pic != null && pic.length > 0){
for (int i = 0; i < pic.length; i++) {
String picFilePath = RuoYiConfig.getProfile() + "/config/static/graphs/"+ StrUtil.splitToArray(pic[i], "graphs/")[1];
FileUtils.deleteFile(picFilePath);
@ -346,6 +346,7 @@ public class ReportUtil {
barCodeParam.setSqh(sqh);
barCodeParam.setHospitalName(hospitalName);
String[] filename = getReportpic(jyrq, yq, ybh);
if(filename != null && filename.length > 0) {
String httpPath = getHttpURL("graphs");
String[] picPath = new String[filename.length];
for (int i = 0; i < filename.length; i++) {
@ -354,6 +355,7 @@ public class ReportUtil {
log.info("传给模板的地址:{}", httpPath + "/" + filename[i]);
}
barCodeParam.setPic(picPath);
}
return printToPdf("report_image2", barCodeParam, UUID.randomUUID().toString(), true);
}