|
|
@ -948,17 +948,17 @@ public class InspectOfflineServiceImpl implements IOfflineDataService { |
|
|
|
if (!file.exists()) { |
|
|
|
if (!file.exists()) { |
|
|
|
throw new RuntimeException("文件名称为:" + fileName + "不存在,上传失败!"); |
|
|
|
throw new RuntimeException("文件名称为:" + fileName + "不存在,上传失败!"); |
|
|
|
} |
|
|
|
} |
|
|
|
R<BladeFile> r = null; |
|
|
|
R<BladeFile> r; |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
r = putFile(file); |
|
|
|
r = putFile(file); |
|
|
|
if (!r.isSuccess()) { |
|
|
|
if (!r.isSuccess()) { |
|
|
|
throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:" + r); |
|
|
|
throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错" ); |
|
|
|
} |
|
|
|
} |
|
|
|
BladeFile bladeFile = r.getData(); |
|
|
|
BladeFile bladeFile = r.getData(); |
|
|
|
return bladeFile != null ? bladeFile.getLink() : null; |
|
|
|
return bladeFile != null ? bladeFile.getLink() : null; |
|
|
|
} catch (Exception ex) { |
|
|
|
} catch (Exception ex) { |
|
|
|
throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:" + r.toString(), ex); |
|
|
|
throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:", ex); |
|
|
|
} |
|
|
|
} |
|
|
|
}).filter(StringUtils::isNotBlank).collect(Collectors.toList()); |
|
|
|
}).filter(StringUtils::isNotBlank).collect(Collectors.toList()); |
|
|
|
bo.setFiles(urls); |
|
|
|
bo.setFiles(urls); |
|
|
|