|
|
|
@ -36,7 +36,6 @@ public class SuoyinService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void index(String path) {
|
|
|
|
|
// ArrayList<IndexPlate> indexPlates = new ArrayList<>();
|
|
|
|
|
Map<String,IndexPlate> 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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|