费用清单上传兼容中科方德

master
hcy 2 years ago
parent 80ba9be5d5
commit 71212687c1

@ -1051,8 +1051,15 @@ public class CommomService {
try {
String osName = System.getProperty("os.name").toLowerCase();
String costPath ="";
if (osName.contains("linux")) {
costPath = "/mnt/share/cost";
}else{
costPath = costPdfPath;
}
//解析压缩包文件上传并解压返回存放pdf的全路径
String saveFileName = UploadUtil.resolveCompressUploadFile(request, multipartFile, costPdfPath);
String saveFileName = UploadUtil.resolveCompressUploadFile(request, multipartFile, costPath);
//获取pdf文件名
List<String> pdfNameList = Pdf2ImgUtil.getPdfName(saveFileName);
//导出失败病案号,出院日期数组

@ -24,7 +24,7 @@ public class Pdf2ImgUtil {
public static List<String> pdfToPic(String fileAddress, String filename, String type, String picPath) throws IOException {
//long startTime = System.currentTimeMillis();
// 将文件地址和文件名拼接成路径 注意:线上环境不能使用\\拼接
File file = new File(fileAddress + "\\" + filename + ".pdf");
File file = new File(fileAddress + File.separator + filename + ".pdf");
List<String> picNameList = new ArrayList<>();
PDDocument doc = null;
try {
@ -36,7 +36,7 @@ public class Pdf2ImgUtil {
// dpi为144越高越清晰转换越慢
BufferedImage image = renderer.renderImageWithDPI(i, 150); // Windows native DPI
// 将图片写出到该路径下
ImageIO.write(image, type, new File(picPath + "\\" + "FY_" + filename + "_" + String.format("%04d",i + 1)+ "." + type));
ImageIO.write(image, type, new File(picPath + File.separator + "FY_" + filename + "_" + String.format("%04d",i + 1)+ "." + type));
picNameList.add("FY_" + filename + "_" + String.format("%04d",i + 1)+ "." + type);
}

Loading…
Cancel
Save