This commit is contained in:
caozehui
2025-07-01 10:47:59 +08:00
parent a5791ef76b
commit f19a467300
2 changed files with 8 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ public enum ReportResponseEnum {
REPORT_VERSION_PATTERN_ERROR("A012013", "报告版本号格式错误可包含中文、字母、数字、中划线、点号、空格长度不能超过32个字符"),
FILE_SIZE_ERROR("A012014", "文件大小不能超过5MB"),
GENERATE_REPORT_ERROR("A012015", "生成报告失败"),
;
FTP_CONNECTION_FAILED("A012016", "FTP连接失败无法将二维码文件上传至装置");
private String code;
private String message;

View File

@@ -726,11 +726,13 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
data.set("password", devPsd);
data.set("port", devPort);
data.set("path", "ftp://" + devIp + devPath);
} else {
} else if (testFTPConnection(cloudUrl, gcDevPort, gcDevName, gcDevPsd)) {
data.set("name", gcDevName);
data.set("password", gcDevPsd);
data.set("port", gcDevPort);
data.set("path", "ftp://" + devIp + gcDevPath);
} else {
throw new BusinessException(ReportResponseEnum.FTP_CONNECTION_FAILED);
}
data.set("file", base64String);
sendFileMsg.setData(data.toString());