Merge branch 'develop_migration' into 'develop_master'

feat: There is no way the, 优化ES 坑

See merge request LiuChao/foton-slrs-system-rest!473
This commit is contained in:
super_liu
2022-05-01 13:13:23 +08:00
@@ -2979,16 +2979,20 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
XWPFWordExtractor extractor = new XWPFWordExtractor(doc);
String txt = extractor.getText();
content.append(txt);
extractor.close();
}else {
WordExtractor wordExtractor = new WordExtractor(fis);
String txt = wordExtractor.getText();
content.append(txt);
wordExtractor.close();
}
fis.close();
} else {
OPCPackage opcPackage = XWPFDocument.openPackage(readFilePath);
XWPFWordExtractor extractor = new XWPFWordExtractor(opcPackage);
String txt = extractor.getText();
content.append(txt);
opcPackage.close();
}
} else {
PDDocument document = PDDocument.load(new File(readFilePath));
@@ -3000,6 +3004,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
String pdfFileInText = tStripper.getText(document);
// String[] lines = pdfFileInText.split("\\r?\\n");
content.append(pdfFileInText);
document.close();
}
}
} catch (Exception e) {