Commit 93a66e8b by akexiu

Revert "经纪人名片4.经纪人电子名片由后端返回,支持PDF/png"

This reverts commit 7f3719dc.
parent a229b937
......@@ -5202,6 +5202,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
String tmpPathPDF = PDFConfiguration.getProperty("businessCardE.pdf.temp.path");
//PDF模板输出结果文件
String templateResultPDF = tmpPathPDF + practitionerId + "-businessCardE.pdf";
//JPG模板输出结果文件
String templateResultPNG = tmpPathPDF + practitionerId + "-businessCardE.png";
//填充数据
Map<String, String> initDatas = new HashMap<>();
Map<String, String> initImages = new HashMap<>();
......@@ -5258,25 +5260,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
PDFTemplate.generatePDF(templatePDF, templateResultPDF, initDatas, initImages);
try {
resp.setBusinessCardPdfUrl(putContractFileToOSS("businessCardEPDF", templateResultPDF, practitionerId));
// getBusinessCardImg(resp, practitionerId, templateResultPDF, tmpPathPDF);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 把PDF转换为图片
* @param resp
* @param practitionerId
* @param templateResultPDF
* @param tmpPathPDF
* @throws Exception
* @throws IOException
*/
private void getBusinessCardImg(PractitionerBusinessCardResponseVO resp, Long practitionerId,
String templateResultPDF,String tmpPathPDF) throws Exception, IOException {
//JPG模板输出结果文件
String templateResultPNG = tmpPathPDF + practitionerId + "-businessCardE.png";
PDDocument doc = null;
ByteArrayOutputStream os = null;
InputStream stream = null;
......@@ -5322,6 +5305,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
if (stream != null) stream.close();
if (out != null) out.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment