|
|
@@ -5372,7 +5372,15 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
|
|
|
if(auto.getOutUrl()==null||auto.getOutUrl().isEmpty()){
|
|
|
continue;
|
|
|
}
|
|
|
- String fileUrl=auto.getOutUrl().substring(0,auto.getOutUrl().indexOf("@"));
|
|
|
+ String sql=" select * from u_archive_file where is_deleted = 0 and archive_id="+auto.getId();
|
|
|
+ List<ArchiveFile> archiveFiles = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ArchiveFile.class));
|
|
|
+ if(archiveFiles.isEmpty()){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String fileUrl=StringUtils.isNotEmpty(archiveFiles.get(0).getPdfFileUrl())?archiveFiles.get(0).getPdfFileUrl():StringUtils.isNotEmpty(archiveFiles.get(0).getFileUrl())?archiveFiles.get(0).getFileUrl():null;
|
|
|
+ if(fileUrl==null){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
String filePath=url+auto.getName()+".pdf";
|
|
|
System.out.println("开始保存:"+fileUrl);
|
|
|
Boolean b = FileUtils.saveInputStreamByUrl(fileUrl, filePath);
|