Sfoglia il codice sorgente

审核裁决书接口优化

hejinbo 2 anni fa
parent
commit
7a2a662c5f

+ 17
- 14
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java Vedi File

@@ -188,9 +188,12 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
188 188
                     if (caseAttach.getAnnexType() == 3) {
189 189
                         String annexPath = caseAttach.getAnnexPath();
190 190
                         //File file = new File("/home/ruoyi/" + annexPath);
191
-                        String path = "/home/ruoyi/" + annexPath;
192
-                        File file = new File(path);
193
-                        System.out.println("文件是:" + file);
191
+                        String path = "/home/ruoyi" + annexPath;
192
+                        System.out.println("原文件路径是:" + path);
193
+                        String newpath = path.replace("/", "\\");
194
+                        System.out.println("新文件路径是:" + newpath);
195
+                        File file = new File(newpath);
196
+                        System.out.println("新文件是:" + file);
194 197
                         fileList.add(file);
195 198
                     }
196 199
                 }
@@ -385,21 +388,21 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
385 388
         return AjaxResult.success(archivesDetailVO);
386 389
     }
387 390
 
388
-    /*public static void main(String[] args) {
391
+    public static void main(String[] args) {
389 392
         try {
390
-            List<File> fileList = new ArrayList<>();
391
-            fileList.add(new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\b442880179844a848f1f8b08c29e3d0c.docx"));
392
-            File file = fileList.get(0);
393
+//            List<File> fileList = new ArrayList<>();
394
+//            fileList.add(new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\b442880179844a848f1f8b08c29e3d0c.docx"));
395
+ //           File file = fileList.get(0);//System.out.println("这是文件"+file);
393 396
             //电子邮件送达
394
-            EmailOutUtil emailOutUtil = new EmailOutUtil();
395
-            JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
396
-            if (javaMailSender != null) {
397
-                emailOutUtil.sendMessageCarryFile("1154956315@qq.com", "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
398
-                        , "hjbjava@163.com", javaMailSender);
399
-            }
397
+//            EmailOutUtil emailOutUtil = new EmailOutUtil();
398
+//            JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
399
+//            if (javaMailSender != null) {
400
+//                emailOutUtil.sendMessageCarryFile("1154956315@qq.com", "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
401
+//                        , "hjbjava@163.com", javaMailSender);
402
+//            }
400 403
         } catch (MailSendException e) {
401 404
             e.printStackTrace();
402 405
         }
403
-    }*/
406
+    }
404 407
 
405 408
 }