|
@@ -1012,12 +1012,51 @@ public class InformationWriteQueryController extends BladeController {
|
|
}
|
|
}
|
|
//获取文件
|
|
//获取文件
|
|
List<InformationQuery> result = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getId, Arrays.asList(ids.split(","))));
|
|
List<InformationQuery> result = this.informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().in(InformationQuery::getId, Arrays.asList(ids.split(","))));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
if (result != null && result.size() > 0) {
|
|
if (result != null && result.size() > 0) {
|
|
//删除掉pdfUrl和eVisaPdfUrl都为空的数据
|
|
//删除掉pdfUrl和eVisaPdfUrl都为空的数据
|
|
|
|
+ /** 任务审批查看时,把节点附件列表跟在上报文件后面*/
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
result.removeIf(query -> StringUtils.isEmpty(query.getPdfUrl()) && StringUtils.isEmpty(query.getPdfUrl()));
|
|
result.removeIf(query -> StringUtils.isEmpty(query.getPdfUrl()) && StringUtils.isEmpty(query.getPdfUrl()));
|
|
if (result.size() > 0) {
|
|
if (result.size() > 0) {
|
|
List<String> urls = new ArrayList<>();
|
|
List<String> urls = new ArrayList<>();
|
|
- result.forEach(query -> urls.add(StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() + "@@@" + query.getName() + "-" + query.getId() : query.getPdfUrl() + "@@@" + query.getName() + "-" + query.getId()));
|
|
|
|
|
|
+ /* result.forEach(query -> urls.add(
|
|
|
|
+ StringUtils.isNotEmpty(query.getNodePdfUrl()) ? query.getNodePdfUrl() + "@@@" + query.getName() + "-" + query.getId() : query.getPdfUrl() + "@@@" + query.getName() + "-" + query.getId()));
|
|
|
|
+ */
|
|
|
|
+ for(InformationQuery query:result){
|
|
|
|
+ String url_link = "";
|
|
|
|
+ List<TaskApprovalVO.ApprovalFile> files = jdbcTemplate.query("select name as fileName,domain_url as fileUrl from m_table_file where is_deleted = 0 and type in(10,11,12)and tab_id = ?",new BeanPropertyRowMapper<>(TaskApprovalVO.ApprovalFile.class),query.getWbsId());
|
|
|
|
+ List<String> url = new ArrayList();
|
|
|
|
+ if (ObjectUtil.isNotEmpty(files)){
|
|
|
|
+ for (TaskApprovalVO.ApprovalFile da:files){
|
|
|
|
+ url.add(da.getFileUrl());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(query!=null && Func.isNull(query.getEVisaPdfUrl())){
|
|
|
|
+ url.add(query.getEVisaPdfUrl());
|
|
|
|
+ }else{
|
|
|
|
+ url.add(query.getPdfUrl());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(urls!=null && urls.size()>1){
|
|
|
|
+ String localUrl = FileUtils.getSysLocalFileUrl()+"\\" + query.getId()+".pdf";
|
|
|
|
+ FileUtils.mergePdfPublicMethods(url,localUrl);
|
|
|
|
+ BladeFile bladeFile = newIOSSClient.uploadFile(query.getId()+".pdf",localUrl);
|
|
|
|
+ if (bladeFile != null && ObjectUtils.isNotEmpty(bladeFile.getLink())) {
|
|
|
|
+ url.add( bladeFile.getLink());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else if(urls!=null && urls.size()==1){
|
|
|
|
+ url_link = url.get(0);
|
|
|
|
+ }
|
|
|
|
+ url.add(url_link+ "@@@" + query.getName() + "-" + query.getId());
|
|
|
|
+ }
|
|
|
|
+
|
|
//删除空数据
|
|
//删除空数据
|
|
urls.removeIf(StringUtils::isEmpty);
|
|
urls.removeIf(StringUtils::isEmpty);
|
|
//打包下载
|
|
//打包下载
|