|
|
@ -4,6 +4,7 @@ package com.ann.utils;
|
|
|
|
import com.ann.entity.constant.AliasName;
|
|
|
|
import com.ann.entity.constant.AliasName;
|
|
|
|
import jcifs.smb.SmbFile;
|
|
|
|
import jcifs.smb.SmbFile;
|
|
|
|
import jcifs.smb.SmbFileInputStream;
|
|
|
|
import jcifs.smb.SmbFileInputStream;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.net.ftp.FTPClient;
|
|
|
|
import org.apache.commons.net.ftp.FTPClient;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
@ -240,8 +241,9 @@ public class DownloadUtils {
|
|
|
|
password = "his_docus";
|
|
|
|
password = "his_docus";
|
|
|
|
}else if(Objects.equals(type, AliasName.OTHER_REPORT)) {
|
|
|
|
}else if(Objects.equals(type, AliasName.OTHER_REPORT)) {
|
|
|
|
// 2020-8-18 后续接入的报告 统一走ftp、固定账号密码common/common
|
|
|
|
// 2020-8-18 后续接入的报告 统一走ftp、固定账号密码common/common
|
|
|
|
|
|
|
|
// 2023-04-23 卓瑞丰通知是内镜,修改密码为Njxt@123
|
|
|
|
userName = "common";
|
|
|
|
userName = "common";
|
|
|
|
password = "wzh@123456";
|
|
|
|
password = "Njxt@123";
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
// 电子病历
|
|
|
|
// 电子病历
|
|
|
|
// ftp://10.6.0.155/2020-01-25/000593857900_1_000593857900_0_4_EMR06.02.04_3_5_0.pdf
|
|
|
|
// ftp://10.6.0.155/2020-01-25/000593857900_1_000593857900_0_4_EMR06.02.04_3_5_0.pdf
|
|
|
@ -250,7 +252,7 @@ public class DownloadUtils {
|
|
|
|
password = "pdf";
|
|
|
|
password = "pdf";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FTPClient ftpClient = FTPUtil.connectFtpServer(url, port, userName, password);
|
|
|
|
FTPClient ftpClient = FTPUtil.connectFtpServer(url, port, userName, password);
|
|
|
|
if (FTPUtil.downloadFtp(path, ftpClient, pdfFile)) {
|
|
|
|
if (StringUtils.isNotBlank(path) && FTPUtil.downloadFtp(path, ftpClient, pdfFile)) {
|
|
|
|
return pdfFile.getAbsolutePath();
|
|
|
|
return pdfFile.getAbsolutePath();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|