From a4cfcc0fbb5aba83a4adbadfb89c93c97a9394b5 Mon Sep 17 00:00:00 2001 From: zhanghai <120228220@qq.com> Date: Thu, 16 Nov 2023 11:49:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 ---- .../java/com/docus/sw/fenpan/FenpanService.java | 17 ----------------- .../java/com/docus/sw/souyin/SuoyinService.java | 10 +++------- 3 files changed, 3 insertions(+), 28 deletions(-) diff --git a/pom.xml b/pom.xml index e1e929a..5210f91 100644 --- a/pom.xml +++ b/pom.xml @@ -101,10 +101,6 @@ - - - - diff --git a/src/main/java/com/docus/sw/fenpan/FenpanService.java b/src/main/java/com/docus/sw/fenpan/FenpanService.java index 64ee64b..493ed03 100644 --- a/src/main/java/com/docus/sw/fenpan/FenpanService.java +++ b/src/main/java/com/docus/sw/fenpan/FenpanService.java @@ -132,7 +132,6 @@ public class FenpanService { } catch (IOException e) { throw new RuntimeException(e); } -// ImageInfo imageInfo = Imaging.getImageInfo(inputFile); } else { try { @@ -162,7 +161,6 @@ public class FenpanService { File file = new File(piece.getAbsolutePath()); File parentFile = file.getParentFile(); String name = parentFile.getName(); -// System.out.println(name); Roll roll = rollMap.get(name); if (roll == null) { roll = new Roll(name, parentFile.getAbsolutePath()); @@ -176,7 +174,6 @@ public class FenpanService { if (zong == null) { zong = new Zong(parentFile.getParentFile().getAbsolutePath(), parentFile.getParentFile().getName()); } -// zong.put(rollMap.get(name)); zongMap.put(zongName, zong); } @@ -208,20 +205,6 @@ public class FenpanService { zong.put(roll); } } - -// //填充宗 -// for (String name : rollMap.keySet()) { -// Roll roll = rollMap.get(name); -// File file = new File(roll.getAbsolutePath()); -// String zongName = file.getParentFile().getName(); -// Zong zong = zongMap.get(zongName); -// if (zong == null) { -// zong = new Zong(file.getParentFile().getAbsolutePath(), file.getParentFile().getName()); -// } -// zong.put(rollMap.get(name)); -// zongMap.put(zongName, zong); -// } - return zongMap; diff --git a/src/main/java/com/docus/sw/souyin/SuoyinService.java b/src/main/java/com/docus/sw/souyin/SuoyinService.java index 016ec57..e959f1c 100644 --- a/src/main/java/com/docus/sw/souyin/SuoyinService.java +++ b/src/main/java/com/docus/sw/souyin/SuoyinService.java @@ -36,7 +36,6 @@ public class SuoyinService { } public void index(String path) { -// ArrayList indexPlates = new ArrayList<>(); Map map = new HashMap<>(); findAllDir(path, map); @@ -52,12 +51,12 @@ public class SuoyinService { //卷 for (File rollFile : files) { if (rollFile.getName().equals("片头")) { -//填充卷 + //填充卷 Roll roll = new Roll(rollFile.getName(), rollFile.getAbsolutePath()); rollList.add(roll); } else if (rollFile.getName().equals("片尾")) { -//填充卷 + //填充卷 Roll roll = new Roll(rollFile.getName(), rollFile.getAbsolutePath()); rollList.add(roll); @@ -88,7 +87,6 @@ public class SuoyinService { } catch (IOException e) { throw new RuntimeException(e); } -// ImageInfo imageInfo = Imaging.getImageInfo(inputFile); } else { try { @@ -99,13 +97,11 @@ public class SuoyinService { Document document = new Document(width, height, physicalHeightDpi); documentList.add(document); } catch (IOException e) { -// FileUtils.delete(file); throw new RuntimeException("非图片格式", e); } catch (ImageReadException e) { -// FileUtils.delete(file); throw new RuntimeException(e); } catch (IllegalArgumentException e) { -// FileUtils.delete(file); + throw new RuntimeException(e); } }