Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+2
@@ -11,6 +11,7 @@ import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCollectEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCollectEOService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -192,6 +193,7 @@ public class ProblemKnowledgeBaseCollectEOController extends JeroController<Prob
|
||||
|
||||
QueryWrapper<ProblemKnowledgeBaseCollectEO> collectEOQueryWrapper = new QueryWrapper<>();
|
||||
collectEOQueryWrapper.lambda().eq(ProblemKnowledgeBaseCollectEO::getCollectUserId,currentUser.getId());
|
||||
collectEOQueryWrapper.lambda().eq(ProblemKnowledgeBaseCollectEO::getCollectStatus, CollectStatusEnum.COLLECT.getValue());
|
||||
List<ProblemKnowledgeBaseCollectEO> collectEOList = this.problemKnowledgeBaseCollectEOService.list(collectEOQueryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(collectEOList)){
|
||||
|
||||
+2
@@ -463,6 +463,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
Map<String, Object> map25 = new HashMap<>();
|
||||
Map<String, Object> map45 = new HashMap<>();
|
||||
map25.put("query", selectValue);
|
||||
map25.put("fields", fieldList.toArray());
|
||||
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
|
||||
map45.put("query_string", map25);
|
||||
queryMapJson.add(map45);
|
||||
@@ -490,6 +491,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
Map<String, Object> map25 = new HashMap<>();
|
||||
Map<String, Object> map45 = new HashMap<>();
|
||||
map25.put("query", selectValue);
|
||||
map25.put("fields", fieldList.toArray());
|
||||
map25.put("allow_leading_wildcard", false); //禁用了前置通配符
|
||||
map45.put("query_string", map25);
|
||||
queryMapJson.add(map45);
|
||||
|
||||
+13
-4
@@ -118,6 +118,7 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
Map<String, Object> map25 = new HashMap<>();
|
||||
Map<String, Object> map45 = new HashMap<>();
|
||||
map25.put("query", selectValue);
|
||||
map25.put("fields", fieldList.toArray());
|
||||
map25.put("allow_leading_wildcard", false);
|
||||
map45.put("query_string", map25);
|
||||
queryMapJsonTwo.add(map45);
|
||||
@@ -248,9 +249,9 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
Map<String, Object> map31 = new HashMap<>();
|
||||
Map<String, Object> map41 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map31.put("boost",1);
|
||||
map31.put("boost",10);
|
||||
}else if("content".equals(field)){
|
||||
map31.put("boost",0.01);
|
||||
map31.put("boost",2);
|
||||
}
|
||||
map31.put("value", selectValue);
|
||||
map21.put(field + ".keyword", map31);
|
||||
@@ -262,9 +263,9 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
Map<String, Object> map32 = new HashMap<>();
|
||||
Map<String, Object> map42 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map32.put("boost",1);
|
||||
map32.put("boost",10);
|
||||
}else if("content".equals(field)){
|
||||
map32.put("boost",0.01);
|
||||
map32.put("boost",2);
|
||||
}
|
||||
map32.put("query", selectValue);
|
||||
map22.put(field, map32);
|
||||
@@ -274,7 +275,15 @@ public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSea
|
||||
// match分词匹配查询
|
||||
// 情况举例:用户可能他知道开头的前缀几个字,知道中间的几个字
|
||||
Map<String, Object> map23 = new HashMap<>();
|
||||
Map<String, Object> map33 = new HashMap<>();
|
||||
Map<String, Object> map43 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map33.put("boost",10);
|
||||
}else if("content".equals(field)){
|
||||
map33.put("boost",2);
|
||||
}
|
||||
map33.put("query", selectValue);
|
||||
map23.put(field, map33);
|
||||
map23.put(field, selectValue);
|
||||
map43.put("match", map23);
|
||||
queryMapJson.add(map43);
|
||||
|
||||
+60
@@ -165,12 +165,22 @@ public class FileSpiltService {
|
||||
paragraphString = paragraphString.trim();
|
||||
}
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
paragraphString = paragraphString.replaceAll("\r\n","");
|
||||
paragraphString = paragraphString.replaceAll("\n","");
|
||||
paragraphString = paragraphString.trim();
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (StringUtils.isNotEmpty(p.getNumLevelText()) && p.getNumLevelText().indexOf(".") > 0) {
|
||||
@@ -682,12 +692,22 @@ public class FileSpiltService {
|
||||
paragraphString = paragraphString.trim();
|
||||
}
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
paragraphString = paragraphString.replaceAll("\r\n","");
|
||||
paragraphString = paragraphString.replaceAll("\n","");
|
||||
paragraphString = paragraphString.trim();
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// if (StringUtils.isNotEmpty(p.getNumLevelText())&& p.getNumLevelText().indexOf(".")>0) {
|
||||
@@ -864,12 +884,22 @@ public class FileSpiltService {
|
||||
paragraphString = paragraphString.trim();
|
||||
}
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
paragraphString = paragraphString.replaceAll("\r\n","");
|
||||
paragraphString = paragraphString.replaceAll("\n","");
|
||||
paragraphString = paragraphString.trim();
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// if (StringUtils.isNotEmpty(p.getNumLevelText())&& p.getNumLevelText().indexOf(".")>0) {
|
||||
@@ -1056,12 +1086,22 @@ public class FileSpiltService {
|
||||
paragraphString = paragraphString.trim();
|
||||
}
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
paragraphString = paragraphString.replaceAll("\r\n","");
|
||||
paragraphString = paragraphString.replaceAll("\n","");
|
||||
paragraphString = paragraphString.trim();
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// if (StringUtils.isNotEmpty(p.getNumLevelText())&& p.getNumLevelText().indexOf(".")>0) {
|
||||
@@ -1418,12 +1458,22 @@ public class FileSpiltService {
|
||||
paragraphString = paragraphString.trim();
|
||||
}
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
paragraphString = paragraphString.replaceAll("\r\n","");
|
||||
paragraphString = paragraphString.replaceAll("\n","");
|
||||
paragraphString = paragraphString.trim();
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// if (StringUtils.isNotEmpty(p.getNumLevelText())&& p.getNumLevelText().indexOf(".")>0) {
|
||||
@@ -1613,12 +1663,22 @@ public class FileSpiltService {
|
||||
paragraphString = paragraphString.trim();
|
||||
}
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
paragraphString = paragraphString.replaceAll("\r\n","");
|
||||
paragraphString = paragraphString.replaceAll("\n","");
|
||||
paragraphString = paragraphString.trim();
|
||||
if(StringUtils.isEmpty(paragraphString)){
|
||||
// 处理当前段落仅为图片的情况
|
||||
List<String> imageBundleList = readImageInParagraph((XWPFParagraph) p);
|
||||
if (CollectionUtils.isNotEmpty(imageBundleList)) {
|
||||
addItermsConditionsImage(messageList.get(messageList.size() - 1), itemValList, p, imageBundleList);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
+7
-1
@@ -1702,8 +1702,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
InputStream is = new FileInputStream(file);
|
||||
String name = file.getName().toLowerCase();
|
||||
// 创建excel操作对象
|
||||
if (name.contains(".xlsx") || name.contains(".xls")) {
|
||||
if (name.contains(".xlsx")) {
|
||||
workbook = WorkbookFactory.create(is);
|
||||
} else {
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
} else {
|
||||
throw new JeroBootException("Please import the correct template");
|
||||
}
|
||||
}
|
||||
//得到一个工作表
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
Reference in New Issue
Block a user