人员简历相关接口开发

pull/118/head
dxfeng 2 years ago
parent 207081aca2
commit 702092c5a2

@ -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));

Loading…
Cancel
Save