Просмотр исходного кода

委托单新增bug,甬台温的批量下载

chenr 5 месяцев назад
Родитель
Сommit
9e2de1d74a

+ 3 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/EntrustInfo.java

@@ -147,4 +147,7 @@ public class EntrustInfo extends BaseEntity {
 	@ApiModelProperty(value = "委托单类型 1=客户 2=rfId")
 	private Integer entrustType;
 
+    @ApiModelProperty(value = "节点id")
+    private String nodeId;
+
 }

+ 10 - 10
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -1085,9 +1085,9 @@ public R<String> batchDownloadFileToZip(String ids, HttpServletResponse response
                  /*   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) {
+                for (int i=0;i<result.size();i++) {
                     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<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), result.get(i).getWbsId());
                     List<String> url = new ArrayList();
                     if (ObjectUtil.isNotEmpty(files)) {
                         for (TaskApprovalVO.ApprovalFile da : files) {
@@ -1095,24 +1095,24 @@ public R<String> batchDownloadFileToZip(String ids, HttpServletResponse response
                         }
                     }
 
-                    if (query != null && Func.isNull(query.getEVisaPdfUrl())) {
-                        url.add(query.getEVisaPdfUrl());
+                    if (result.get(i) != null && result.get(i).getEVisaPdfUrl()!=null) {
+                        url.add(result.get(i).getEVisaPdfUrl());
                     } else {
-                        url.add(query.getPdfUrl());
+                        url.add(result.get(i).getPdfUrl());
                     }
 
-                    if (urls != null && urls.size() > 1) {
-                        String localUrl = FileUtils.getSysLocalFileUrl() + "\\" + query.getId() + ".pdf";
+                    if (url != null && url.size() > 1) {
+                        String localUrl = FileUtils.getSysLocalFileUrl() + "\\" + result.get(i).getId() + ".pdf";
                         FileUtils.mergePdfPublicMethods(url, localUrl);
-                        BladeFile bladeFile = newIOSSClient.uploadFile(query.getId() + ".pdf", localUrl);
+                        BladeFile bladeFile = newIOSSClient.uploadFile(result.get(i).getId() + ".pdf", localUrl);
                         if (bladeFile != null && ObjectUtils.isNotEmpty(bladeFile.getLink())) {
                             url.add(bladeFile.getLink());
                         }
 
-                    } else if (urls != null && urls.size() == 1) {
+                    } else if (url != null && url.size() == 1) {
                         url_link = url.get(0);
                     }
-                    url.add(url_link + "@@@" + query.getName() + "-" + query.getId());
+                    urls.add(url_link + "@@@" + result.get(i).getName() + "-" + result.get(i).getId());
                 }
 
                 //删除空数据

+ 1 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/EntrustInfoServiceImpl.java

@@ -169,6 +169,7 @@ public class EntrustInfoServiceImpl extends BaseServiceImpl<EntrustInfoMapper, E
 				}
 			}
 		}
+        entrustInfo.setNodeId(dataInfo.get("nodeId").toString());
 		entrustInfo.setEntrustName(wbsTreePrivate.getNodeName());
         if(dataInfo.containsKey("id")){
             entrustInfo.setId(Long.parseLong(dataInfo.get("id").toString()));