feat: 搜索中心 es 入库 国内外标准修改
This commit is contained in:
+6
-6
@@ -2127,10 +2127,10 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
// 根据文件attid 读取文件内容
|
||||
if (org.apache.commons.lang.StringUtils.isNotEmpty(String.valueOf(attrInfoMap.get("content")))) {
|
||||
String[] attidlist = String.valueOf(attrInfoMap.get("content")).split(" , ");
|
||||
String[] attidlist = String.valueOf(attrInfoMap.get("content")).split(",");
|
||||
StringBuilder content = new StringBuilder("");
|
||||
for (int i = 0; i < attidlist.length; i++) {
|
||||
if(org.apache.commons.lang.StringUtils.isNotEmpty(attidlist[i]) && !"null".equals(attidlist[i])){
|
||||
if(StringUtils.isNotEmpty(attidlist[i]) && !"null".equals(attidlist[i])){
|
||||
AttFileEO attFileEO = attFileEOService.getFileInfo(attidlist[i]);
|
||||
String readFilePath = filePath + "/" + attFileEO.getFilePath() + attFileEO.getFileName();
|
||||
try {
|
||||
@@ -2160,10 +2160,10 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
// String readFilePath = "E:\\上汽企标流程总览.pdf";
|
||||
FileInputStream fis = new FileInputStream(readFilePath);
|
||||
WordExtractor wordExtractor = new WordExtractor(fis);
|
||||
String txt = wordExtractor.getText();
|
||||
content.append(txt);
|
||||
// FileInputStream fis = new FileInputStream(readFilePath);
|
||||
// WordExtractor wordExtractor = new WordExtractor(fis);
|
||||
// String txt = wordExtractor.getText();
|
||||
// content.append(txt);
|
||||
} catch (Exception e) {
|
||||
logger.error("搜索中心修改数据读取文档内容时失败");
|
||||
logger.error(e.getMessage(),e);
|
||||
|
||||
Reference in New Issue
Block a user