From ec6e93746835e198869c14c65234c5f9b1fe5a8e Mon Sep 17 00:00:00 2001 From: zengwh Date: Mon, 24 Apr 2023 08:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=B0=E5=9D=80=E7=A9=BA?= =?UTF-8?q?=E6=8C=87=E9=92=88=E5=92=8C=E4=BF=AE=E6=94=B9=E5=86=85=E9=95=9C?= =?UTF-8?q?=E7=9A=84ftp=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ann/utils/DownloadUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ann/utils/DownloadUtils.java b/src/main/java/com/ann/utils/DownloadUtils.java index 54c4143..54e9f0f 100644 --- a/src/main/java/com/ann/utils/DownloadUtils.java +++ b/src/main/java/com/ann/utils/DownloadUtils.java @@ -4,6 +4,7 @@ package com.ann.utils; import com.ann.entity.constant.AliasName; import jcifs.smb.SmbFile; import jcifs.smb.SmbFileInputStream; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.net.ftp.FTPClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -240,8 +241,9 @@ public class DownloadUtils { password = "his_docus"; }else if(Objects.equals(type, AliasName.OTHER_REPORT)) { // 2020-8-18 后续接入的报告 统一走ftp、固定账号密码common/common + // 2023-04-23 卓瑞丰通知是内镜,修改密码为Njxt@123 userName = "common"; - password = "wzh@123456"; + password = "Njxt@123"; }else { // 电子病历 // 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"; } 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(); } }