zhuwei 3 ヶ月 前
コミット
a766a6865b

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

@@ -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(","))));
+
+
+
             if (result != null && result.size() > 0) {
                 //删除掉pdfUrl和eVisaPdfUrl都为空的数据
+                /** 任务审批查看时,把节点附件列表跟在上报文件后面*/
+
+
+
                 result.removeIf(query -> StringUtils.isEmpty(query.getPdfUrl()) && StringUtils.isEmpty(query.getPdfUrl()));
                 if (result.size() > 0) {
                     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);
                     //打包下载

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

@@ -973,7 +973,16 @@ public class TaskController extends BladeController {
         vo.setFormDataId(formDataId);
         vo.setApprovalType(approvalType);
         //获取具体业务数据
-        return R.data(this.taskService.queryBusinessData(vo));
+        TaskApprovalVO taskApprovalVO = this.taskService.queryBusinessData(vo);
+        /** 任务审批查看时,把节点附件列表跟在上报文件后面*/
+        if(Func.isNull(approvalType) && approvalType==1){
+            List<TaskApprovalVO.ApprovalFile> files = jdbcTemplate.query("select name as fileName,domain_url as fileUrl from m_table_file where is_deleted = 0 and tab_id = ?",new BeanPropertyRowMapper<>(TaskApprovalVO.ApprovalFile.class),formDataId);
+            if (ObjectUtil.isNotEmpty(files)){
+                List<TaskApprovalVO.ApprovalFile> fileList = vo.getApprovalFileList();
+                fileList.addAll(files);
+            }
+        }
+        return R.data(taskApprovalVO);
     }
 
     /**

+ 0 - 6
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java

@@ -285,12 +285,6 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
                         vo.setApprovalFileList(query.getName() + "(关联试验工程部位信息文件)", getHppsToHttp(trailpdf));
                     }
 
-                    /** 任务审批查看时,把节点附件列表跟在上报文件后面*/
-                    List<TaskApprovalVO.ApprovalFile> files = jdbcTemplate.query("select name as fileName,domain_url as fileUrl from m_table_file where is_deleted = 0 and tab_id = ?",new BeanPropertyRowMapper<>(TaskApprovalVO.ApprovalFile.class),query.getWbsId());
-                    if (ObjectUtil.isNotEmpty(files)){
-                        List<TaskApprovalVO.ApprovalFile> fileList = vo.getApprovalFileList();
-                        fileList.addAll(files);
-                    }
                 }
             } else if (new Integer("2").equals(query.getType())) {
                 //试验

+ 3 - 2
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/EVisaController.java

@@ -56,11 +56,12 @@ public class EVisaController {
 
     // 电签主类
 
-    @Scheduled(cron = "0/10 * * * * ?")
+    @Scheduled(cron = "0/5 * * * * ?")
     public void SignInfo() {
         //执行代码
         log.info("扫描开始");
-        String sql = "SELECT * from u_task_batch where is_deleted<>5  LIMIT 10";
+        //String sql = "SELECT * from u_task_batch where json_data like '%1821798868568768512%' and is_deleted<>5  LIMIT 10";
+        String sql = "SELECT * from u_task_batch where is_deleted<>5  LIMIT 5";
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         if (maps != null && maps.size() >= 1) {
             for (Map<String, Object> dataInfo : maps) {

+ 5 - 1
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/EVisaServiceImpl.java

@@ -452,7 +452,11 @@ public class EVisaServiceImpl implements EVisaService {
                     //没有电签配置,默认当前任务为不签字审批,返回成功
                     System.out.println("------2------");
                     RedisTemplate.delete("sign-" + task.getFormDataId());
-                    return SUCCESS + "@@@@" + taskFile.getApprovalFileList().get(0).getFileUrl();
+                    if(resultMessage.indexOf(SUCCESS)>=0){
+                        return resultMessage;
+                    }else{
+                        return SUCCESS + "@@@@" + taskFile.getApprovalFileList().get(0).getFileUrl();
+                    }
                 }
                 String dataInfo = this.taskClient.queryTaskContractId(task.getParallelProcessInstanceId());
                 String ids = String.join(",", eVisaConfigList);