feat: There is no way the
This commit is contained in:
+16
-4
@@ -17,10 +17,7 @@ import org.springframework.stereotype.Component;
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
@@ -129,6 +126,8 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
Map<String,Object> getFullTextSearchForMap(Map<String,Object> attrInfoMap){
|
||||
boolean isForeign = false;
|
||||
Map<String,Object> fullTextSearchEO = new HashMap<>();
|
||||
Map<String,String> mapItems = new TreeMap<>();
|
||||
mapItems = net.sf.json.JSONObject.fromObject(attrInfoMap.get("mapItems").toString());
|
||||
fullTextSearchEO.put("id",String.valueOf(attrInfoMap.get("id")));
|
||||
if ("FOREIGN".equals(String.valueOf(attrInfoMap.get("standType")))){
|
||||
fullTextSearchEO.put("indexType",String.valueOf(attrInfoMap.get("standType")));
|
||||
@@ -220,6 +219,18 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
contentBuilder.append("标准文本: ").append(attrInfoMap.get("content")).append(" ");
|
||||
StringBuilder textContent = replaceAll(contentBuilder, "null", "--");
|
||||
fullTextSearchEO.put("textContent",textContent.toString());
|
||||
|
||||
// 全文检索 加入 发布稿 分解单条款内容逻辑
|
||||
StringBuilder itemBuilder = new StringBuilder();
|
||||
|
||||
mapItems.forEach((s, s2) -> {
|
||||
itemBuilder.append(s+" ").append("(模拟数据)-本标准规定了机动车的整车及主要总成、安全防护装置等有关运行安全的基本技术要求,以及消防车、救护车、" +
|
||||
"工程救险车和警车及残疾人专用汽车的附加要求。本标准适用于在我国道路上行驶的所有机动车,但不适用于有轨电车及并非为在道路上行驶和使用而设计和制造、" +
|
||||
"主要用于封闭道路和场所作业施工的轮式专用机械车。 注:有轨电车是指以电机驱动,架线供电,有轨道承载的道路车辆。").append("</br>");
|
||||
});
|
||||
StringBuilder textItemContent = replaceAll(itemBuilder, "null", "--");
|
||||
fullTextSearchEO.put("textItems",textItemContent.toString());
|
||||
|
||||
if (null != attrInfoMap.get("issueTime") && !"".equals(attrInfoMap.get("issueTime")) && !"null".equals(attrInfoMap.get("issueTime"))) {
|
||||
fullTextSearchEO.put("issue_time", attrInfoMap.get("issueTime"));
|
||||
}else {
|
||||
@@ -273,6 +284,7 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
contentBuilder.append("标准文本: ").append(attrInfoMap.get("content")).append(" ");
|
||||
StringBuilder textContent = replaceAll(contentBuilder, "null", "--");
|
||||
fullTextSearchEO.put("textContent",textContent.toString());
|
||||
|
||||
if (null != attrInfoMap.get("issue_time") && !"".equals(attrInfoMap.get("issue_time")) && !"null".equals(attrInfoMap.get("issue_time"))) {
|
||||
fullTextSearchEO.put("issue_time", attrInfoMap.get("issue_time"));
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user