兼容中科方德修改

master
hcy 2 years ago
parent e8b5530715
commit baf2f4e5dd

@ -655,7 +655,13 @@ public class CommomService {
} else {
//需要水印
//组织加水印后图片存放目录
String waterPicRoot = WATERPICPATH + patientId + File.separator + sourceList[i] + File.separator;//D:/jiashi/reload/patientId/1/
String waterPicRoot ="";
if(srcPath.contains("/mnt/share")){
waterPicRoot = "/mnt/share/jiashi/reload/"+ patientId + File.separator + sourceList[i] + File.separator;//D:/jiashi/reload/patientId/1/
}else{
waterPicRoot = WATERPICPATH + patientId + File.separator + sourceList[i] + File.separator;//D:/jiashi/reload/patientId/1/
}
//目录不存在则创建
if (!new File(waterPicRoot).isDirectory()) {
new File(waterPicRoot).mkdirs();
@ -673,6 +679,9 @@ public class CommomService {
}
//组织输出地址
String root = selectRootByNotWater(WATERPICPATH);
if(srcPath.contains("/mnt/share")){
root = "picShare";
}
outSrc = EMRRECORDJSP + File.separator + root + "/jiashi/reload/" + patientId + File.separator + sourceList[i] + File.separator + nameList[i];
}
} else {
@ -710,7 +719,13 @@ public class CommomService {
//获取盘符并转换映射地址的头部地址
root = selectRootByNotWater(driveLetterPath);
if (root == null) {
if(srcPath.contains("/mnt/share")){
srcPath = srcPath.replace("/mnt/share", "picShare");
outSrc = EMRRECORDJSP + File.separator + srcPath;
}else{
outSrc = srcPath;
}
} else {
//获取盘符后面的地址
picPath = driveLetterPath.substring(driveLetterPath.indexOf('/'));

@ -309,7 +309,9 @@ public class BatchExportServiceImpl implements BatchExportService {
outFlag = true;
}
String imagePath = scanPathVos.get(i).getFilePath();
if(imagePath.contains("/mnt/share")){
imagePath = imagePath.replace("\\", "/");
}
Image image = Image.getInstance(imagePath);
/*处理图片缩放比例*/
w = image.getWidth();

@ -5,7 +5,7 @@ import java.io.*;
import java.util.Properties;
public class PropertiesUtils {
private static String fileName = "\\config\\config.properties";
private static String fileName = "/config/config.properties";
private static Properties props;
synchronized static private void loadProps(){

@ -101,6 +101,9 @@ public class imgToPdfUtil {
}
}
String imagePath = scanPathVos.get(i).getFileRealPath();
if(imagePath.contains("/mnt/share")){
imagePath = imagePath.replace("\\", "/");
}
Image image = Image.getInstance(imagePath);
float w = image.getWidth();
float h = image.getHeight();

@ -57,6 +57,7 @@
<mvc:resources mapping="/reloadJ/**" location="file:J:/" />
<mvc:resources mapping="/reloadK/**" location="file:K:/" />
<mvc:resources mapping="/reloadZ/**" location="file:Z:/" />
<mvc:resources mapping="/picShare/**" location="file:/mnt/share/" />
<!-- 当上面要访问的静态资源不包括在上面的配置中时,则根据此配置来访问 -->

Loading…
Cancel
Save