diff --git a/src/com/engine/organization/entity/resume/po/PersonnelResumePO.java b/src/com/engine/organization/entity/resume/po/PersonnelResumePO.java index d5d603ff..1206bf87 100644 --- a/src/com/engine/organization/entity/resume/po/PersonnelResumePO.java +++ b/src/com/engine/organization/entity/resume/po/PersonnelResumePO.java @@ -61,6 +61,16 @@ public class PersonnelResumePO { String outPutPath = GCONST.getRootPath() + "hrm" + File.separator + "import" + File.separator + "template" + File.separator + manager.getImageFileName(); File f = new File(outPutPath); + if (!f.exists()) { + String substring = outPutPath.substring(0, outPutPath.lastIndexOf(File.separator)); + File file = new File(substring); + if (file.mkdirs()) { + boolean newFile = f.createNewFile(); + if (!newFile) { + throw new IOException(outPutPath + "文件创建失败"); + } + } + } Thumbnails.of(inputStream).forceSize(100, 120).toFile(f); InputStream fileInputStream = Files.newInputStream(f.toPath()); imageStr = "data:image/" + manager.getImageFileType() + ";base64," + Base64.getEncoder().encodeToString(IOUtils.toByteArray(fileInputStream));