feat: There is no way the, 跑跑跑 跑数据 重置es

This commit is contained in:
super_liu
2022-03-08 16:33:33 +08:00
parent f1ac00a8dc
commit c1eeea3f1f
19 changed files with 2190 additions and 127 deletions
@@ -125,7 +125,7 @@ public class SendBussMQService {
saveMap.put("standSort",infoEO.getStandSort());
saveMap.put("stand_sort",infoEO.getStandSort());
if(StringUtils.isNotEmpty(infoEO.getStandSort())){
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort());
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort(),"JKSADFH564S");
saveMap.put("standSortShow",codeName);
getCodeName = codeName;
}
@@ -145,20 +145,20 @@ public class SendBussMQService {
saveMap.put("statecode",infoEO.getStandStatus());
saveMap.put("stand_status",infoEO.getStandStatus());
if (StringUtils.isNotEmpty(infoEO.getStandStatus())) {
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandStatus());
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandStatus(),"");
saveMap.put("standstateshow",codeName);
}
String textStatusBussName = "";
if(infoEO.getTextStatusBuss() != null && StringUtils.isNotBlank(infoEO.getTextStatusBuss())){
List<String> valArr = Arrays.asList(infoEO.getTextStatusBuss().split(","));
textStatusBussName = dicTypeEODao.getDicNamesByCodes(valArr);
textStatusBussName = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
saveMap.put("textStatusBuss",infoEO.getTextStatusBuss());
saveMap.put("textStatusBussName",textStatusBussName);
//新加字段
saveMap.put("country",infoEO.getApplyCountry());
if(StringUtils.isNotEmpty(infoEO.getApplyCountry())){
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getApplyCountry());
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getApplyCountry(),"RFRFRFSCXVB");
saveMap.put("countryShow",codeName);
}
// 自定义属性字段
@@ -149,7 +149,7 @@ public class SendLawsMQService {
String lawsTypeName = "";
if(infoEO.getLawsTextState() != null && StringUtils.isNotBlank(infoEO.getLawsType())){
List<String> valArr = Arrays.asList(infoEO.getLawsType().split(","));
lawsTypeName = dicTypeEODao.getDicNamesByCodes(valArr);
lawsTypeName = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
saveMap.put("lawsType",infoEO.getLawsType());
saveMap.put("lawsTypeName",lawsTypeName);
@@ -161,14 +161,14 @@ public class SendLawsMQService {
String lawsSyqyName = "";
if(infoEO.getLawsTextState() != null && StringUtils.isNotBlank(infoEO.getLawsSyqy())){
List<String> valArr = Arrays.asList(infoEO.getLawsSyqy().split(","));
lawsSyqyName = dicTypeEODao.getDicNamesByCodes(valArr);
lawsSyqyName = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
saveMap.put("lawsSyqy",infoEO.getLawsSyqy());
saveMap.put("lawsSyqyName",lawsSyqyName);
String lawsSycxName = "";
if(infoEO.getLawsTextState() != null && StringUtils.isNotBlank(infoEO.getLawsSycx())){
List<String> valArr = Arrays.asList(infoEO.getLawsSycx().split(","));
lawsSycxName = dicTypeEODao.getDicNamesByCodes(valArr);
lawsSycxName = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
saveMap.put("lawsSycx",infoEO.getLawsSycx());
saveMap.put("lawsSycxName",lawsSycxName);
@@ -185,7 +185,7 @@ public class SendLawsMQService {
String lawsYearName = "";
if(infoEO.getLawsTextState() != null && StringUtils.isNotBlank(infoEO.getLawsYear())){
List<String> valArr = Arrays.asList(infoEO.getLawsYear().split(","));
lawsYearName = dicTypeEODao.getDicNamesByCodes(valArr);
lawsYearName = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
saveMap.put("lawsYear",infoEO.getLawsYear());
saveMap.put("lawsYearName",lawsYearName);
@@ -194,7 +194,7 @@ public class SendLawsMQService {
String lawsLabelName = "";
if(infoEO.getLawsTextState() != null && StringUtils.isNotBlank(infoEO.getLawsLabel())){
List<String> valArr = Arrays.asList(infoEO.getLawsLabel().split(","));
lawsLabelName = dicTypeEODao.getDicNamesByCodes(valArr);
lawsLabelName = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
saveMap.put("lawsLabel",infoEO.getLawsLabel());
saveMap.put("lawsLabelName",lawsLabelName);
@@ -202,14 +202,14 @@ public class SendLawsMQService {
String lawsTextStateName = "";
if(infoEO.getLawsTextState() != null && StringUtils.isNotBlank(infoEO.getLawsTextState())){
List<String> valArr = Arrays.asList(infoEO.getLawsTextState().split(","));
lawsTextStateName = dicTypeEODao.getDicNamesByCodes(valArr);
lawsTextStateName = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
saveMap.put("lawsTextState",infoEO.getLawsTextState());
saveMap.put("lawsTextStateName",lawsTextStateName);
//新加字段
saveMap.put("country",infoEO.getCountry());
if(StringUtils.isNotEmpty(infoEO.getCountry())){
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getCountry());
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getCountry(),"RFRFRFSCXVB");
saveMap.put("countryShow",codeName);
}
// 自定义属性字段
@@ -95,13 +95,13 @@ public class SendStandMQService {
saveMap.put("country",infoEO.getCountry());
if (StringUtils.isNotEmpty(infoEO.getCountry())) {
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getCountry());
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getCountry(),"RFRFRFSCXVB");
saveMap.put("countryShow",codeName);
}
saveMap.put("standSort",infoEO.getStandSort());
saveMap.put("stand_sort",infoEO.getStandSort());
if (StringUtils.isNotEmpty(infoEO.getStandSort())) {
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort());
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandSort(),"JKSADFH564S");
saveMap.put("standSortShow",codeName);
getCodeName = codeName;
}
@@ -117,7 +117,7 @@ public class SendStandMQService {
saveMap.put("stand_en_name",infoEO.getStandEnName());
if (StringUtils.isNotEmpty(infoEO.getStandState())) {
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandState());
String codeName = sysInfoEOService.getDicNamesByCodes(infoEO.getStandState(),"");
saveMap.put("standstateshow",codeName);
}
saveMap.put("issueTime",dateFormatToStr(infoEO.getIssueTime()));
@@ -137,7 +137,7 @@ public class SendStandMQService {
String standNatureName = "";
if(infoEO.getStandNature() != null && StringUtils.isNotBlank(infoEO.getStandNature())){
List<String> valArr = Arrays.asList(infoEO.getStandNature().split(","));
standNatureName = dicTypeEODao.getDicNamesByCodes(valArr);
standNatureName = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
saveMap.put("standNature",infoEO.getStandNature());
saveMap.put("standNatureName",standNatureName);
@@ -146,7 +146,7 @@ public class SendStandMQService {
String textStatusName = "";
if(infoEO.getTextStatus() != null && StringUtils.isNotBlank(infoEO.getTextStatus())){
List<String> valArr = Arrays.asList(infoEO.getTextStatus().split(","));
textStatusName = dicTypeEODao.getDicNamesByCodes(valArr);
textStatusName = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
saveMap.put("textStatus",infoEO.getTextStatus());
saveMap.put("textStatusName",textStatusName);
@@ -1,19 +1,20 @@
package com.adc.da.search;
import com.adc.da.base.web.BaseController;
import com.adc.da.search.bean.SearchCenter;
import com.adc.da.search.server.ResetSearchCenterService;
import com.adc.da.slrs.sarLawsInfo.page.SarLawsInfoEOPage;
import com.adc.da.slrs.sarLawsStandInfo.entity.SarLawsStandInfoPage;
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
import com.adc.da.util.http.ResponseMessage;
import com.adc.da.util.http.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@RestController
@@ -25,28 +26,55 @@ public class ResetSearchCenterController extends BaseController<Map<String, Obje
private ResetSearchCenterService resetSearchCenterService;
@ApiOperation(value = "|SearchCenter|重新创建ALL标准数据索引")
@PostMapping(value="/resetALLSearchCenter")
public ResponseMessage resetALLSearchCenter() throws Exception{
return resetSearchCenterService.resetALLSearchCenter();
public ResponseMessage resetALLSearchCenter(@RequestBody SearchCenter searchCenter) throws Exception{
ResponseMessage x = verifySearchCenter(searchCenter);
if (x != null){
return x;
}
return resetSearchCenterService.resetALLSearchCenter(searchCenter);
}
private ResponseMessage verifySearchCenter(SearchCenter searchCenter) {
if(searchCenter.getExecType() == null || "".equals(searchCenter.getExecType())){
return Result.error("执行参数 ALL 存在更新 不存在新增 ,UPD 只 更新存在 es 里的标准 ,ADD 只新增不存在 es 的标准");
}
if(searchCenter.getCountStand() == null || searchCenter.getCountStand() == 0){
return Result.error("分页总数不可为空和0");
}
return null;
}
@ApiOperation(value = "|SearchCenter|重新创建国内外标准数据索引")
@PostMapping(value="/resetAStandSearchCenter")
public ResponseMessage resetStandSearchCenter() throws Exception{
public ResponseMessage resetStandSearchCenter(@RequestBody SearchCenter searchCenter) throws Exception{
ResponseMessage x = verifySearchCenter(searchCenter);
if (x != null){
return x;
}
SarStandardsInfoEOPage sarStandardsInfoEOPage = new SarStandardsInfoEOPage();
return resetSearchCenterService.resetStandSearchCenter(sarStandardsInfoEOPage);
return resetSearchCenterService.resetStandSearchCenter(sarStandardsInfoEOPage,searchCenter);
}
@ApiOperation(value = "|SearchCenter|重新创建国内外政策数据索引")
@PostMapping(value="/resetBLawsSearchCenter")
public ResponseMessage resetLawsSearchCenter() throws Exception{
public ResponseMessage resetLawsSearchCenter(@RequestBody SearchCenter searchCenter) throws Exception{
ResponseMessage x = verifySearchCenter(searchCenter);
if (x != null){
return x;
}
SarLawsStandInfoPage sarLawsInfoEOPage = new SarLawsStandInfoPage();
return resetSearchCenterService.resetLawsSearchCenter(sarLawsInfoEOPage);
return resetSearchCenterService.resetLawsSearchCenter(sarLawsInfoEOPage,searchCenter);
}
@ApiOperation(value = "|SearchCenter|重新创建企业标准数据索引")
@PostMapping(value="/resetCBussStandSearchCenter")
public ResponseMessage resetBussStandSearchCenter() throws Exception{
public ResponseMessage resetBussStandSearchCenter(@RequestBody SearchCenter searchCenter) throws Exception{
ResponseMessage x = verifySearchCenter(searchCenter);
if (x != null){
return x;
}
SarBussionessStandEOPage sarBussionessStandEOPage = new SarBussionessStandEOPage();
return resetSearchCenterService.resetBussStandSearchCenter(sarBussionessStandEOPage);
return resetSearchCenterService.resetBussStandSearchCenter(sarBussionessStandEOPage,searchCenter);
}
}
@@ -0,0 +1,29 @@
package com.adc.da.search.bean;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @Description: TODO
* @author: super_liu
* @date: 2022年03月08日 14:21
*/
@Data
public class SearchCenter {
@NotNull
@ApiModelProperty(value = "分页查询总数")
private Integer countStand;
@NotNull
@ApiModelProperty(value = "执行参数 ALL 存在更新 不存在新增 ,UPD 只 更新存在 es 里的标准 ,ADD 只新增不存在 es 的标准")
private String execType;
@NotNull
@ApiModelProperty(value = "指定可执行的标准ID集合")
private List<String> idList;
}
@@ -1,6 +1,7 @@
package com.adc.da.search.server;
import com.adc.da.mq.CreateStandMQService;
import com.adc.da.search.bean.SearchCenter;
import com.adc.da.search.service.ElasticsearchService;
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
@@ -15,6 +16,7 @@ import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
import com.adc.da.util.http.ResponseMessage;
import com.adc.da.util.http.Result;
import com.adc.da.utils.util.DateUtil;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.client.transport.TransportClient;
@@ -27,9 +29,7 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
@Service("resetSearchCenterService")
@@ -65,26 +65,24 @@ public class ResetSearchCenterService {
}
@Async
public ResponseMessage resetALLSearchCenter() throws Exception{
public ResponseMessage resetALLSearchCenter(SearchCenter searchCenter) throws Exception{
Boolean getFulltextserchIndex = elasticsearchService.isIndexExist("fulltextserch");
if(getFulltextserchIndex){
Boolean deleteFulltextserchIndex = elasticsearchService.deleteIndex("fulltextserch");
}
ResponseMessage stand = resetStandSearchCenter(new SarStandardsInfoEOPage());
ResponseMessage stand = resetStandSearchCenter(new SarStandardsInfoEOPage(),searchCenter);
List<String> r = new ArrayList<>();
if(stand.isOk() && StringUtils.isNotBlank(stand.getData().toString())){
r.add(stand.getData().toString());
}
ResponseMessage laws = resetLawsSearchCenter(new SarLawsStandInfoPage());
if(laws.isOk() && StringUtils.isNotBlank(laws.getData().toString())){
r.add(laws.getData().toString());
}
ResponseMessage buss = resetBussStandSearchCenter(new SarBussionessStandEOPage());
if(buss.isOk() && StringUtils.isNotBlank(buss.getData().toString())){
r.add(buss.getData().toString());
}
// ResponseMessage laws = resetLawsSearchCenter(new SarLawsStandInfoPage(),searchCenter);
// if(laws.isOk() && StringUtils.isNotBlank(laws.getData().toString())){
// r.add(laws.getData().toString());
// }
//
// ResponseMessage buss = resetBussStandSearchCenter(new SarBussionessStandEOPage(),searchCenter);
// if(buss.isOk() && StringUtils.isNotBlank(buss.getData().toString())){
// r.add(buss.getData().toString());
// }
String res = String.join(", ", r);
@@ -92,23 +90,65 @@ public class ResetSearchCenterService {
}
//重建国内外标准
@Async
public ResponseMessage resetStandSearchCenter(SarStandardsInfoEOPage page) throws Exception{
public ResponseMessage resetStandSearchCenter(SarStandardsInfoEOPage page,SearchCenter searchCenter) throws Exception{
int countUpdateSuccess = 0;
int countAddSuccess = 0;
Boolean getStandIndex = elasticsearchService.isIndexExist("stand");
if(getStandIndex){
Boolean deleteStandIndex = elasticsearchService.deleteIndex("stand");
}
List<Map<String, Object>> searchListData = elasticsearchService.searchListData("stand","","","");
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
logger.info(searchListData.toString());
logger.info(esIdList.toString());
page.setValidFlag("0");
// int countStand = sarStandardsInfoEODao.getSarStandardsInfoCount(page);
int countStand = 10000;
int countSuccess = 0;
if(countStand>0){
page.setPageSize(countStand);
page.setMenuId("nomenu");
page.setStandType("ALL");
List<SarStandardsInfo> rowsStand = iSarStandardsInfoService.getSarStandardsInfoPage(page);
for(SarStandardsInfo sarStandardsInfoEO : rowsStand){
countSuccess++;
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
String[] result = searchCenter.getIdList().toArray(new String[0]);
page.setIdlist(result);
}
page.setPageSize(searchCenter.getCountStand());
page.setMenuId("nomenu");
page.setStandType("ALL");
List<SarStandardsInfo> rowsStand = iSarStandardsInfoService.getSarStandardsInfoPage(page);
List<SarStandardsInfo> insList = new ArrayList<>();
List<SarStandardsInfo> updList = new ArrayList<>();
if(!esIdList.isEmpty()){
// 差集 (list1 - list2) 新增
List<SarStandardsInfo> distinctByUniqueList = rowsStand.stream()
.filter(item -> !new ArrayList<>(esIdList)
.contains(item.getId()))
.collect(Collectors.toList());
insList.addAll(distinctByUniqueList);
// 交集 更新
List<SarStandardsInfo> intersection = rowsStand.stream()
.filter(item -> new ArrayList<>(esIdList)
.contains(item.getId()))
.collect(Collectors.toList());
updList.addAll(intersection);
}else {
// 新增
insList.addAll(rowsStand);
}
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "UPD".equals(searchCenter.getExecType()))){
for(SarStandardsInfo sarStandardsInfoEO : updList){
countUpdateSuccess++;
if (sarStandardsInfoEO.getAttrInfoMap() != null) {
sarStandardsInfoEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarStandardsInfoEO.getAttrInfoMap()));
}
createStandMQService.sendStandMQ(sarStandardsInfoEO,"update");
}
}
if(!insList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "ADD".equals(searchCenter.getExecType()))){
for(SarStandardsInfo sarStandardsInfoEO : insList){
countAddSuccess++;
if (sarStandardsInfoEO.getAttrInfoMap() != null) {
sarStandardsInfoEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarStandardsInfoEO.getAttrInfoMap()));
}
@@ -116,25 +156,62 @@ public class ResetSearchCenterService {
}
}
return Result.success("重置国内外"+ countSuccess + "");
return Result.success("重置国内外标准:新增-"+ countAddSuccess + " 更新-"+countUpdateSuccess+"条(国内外标准共:"+rowsStand.size()+"条)");
}
@Async
public ResponseMessage resetLawsSearchCenter(SarLawsStandInfoPage sarLawsInfoEOPage) throws Exception{
public ResponseMessage resetLawsSearchCenter(SarLawsStandInfoPage sarLawsInfoEOPage,SearchCenter searchCenter) throws Exception{
Boolean getLawsIndex = elasticsearchService.isIndexExist("laws");
if(getLawsIndex){
Boolean deleteLawsIndex = elasticsearchService.deleteIndex("laws");
}
List<Map<String, Object>> searchListData = elasticsearchService.searchListData("stand","","","");
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
sarLawsInfoEOPage.setLawsType("FOREIGN");
// sarLawsInfoEOPage.setMenuId("6bc1632eb6354d4fb725");
// int countLaws = sarLawsInfoEODao.queryByCount(sarLawsInfoEOPage);
int countLaws = 10000;
int countSuccess = 0;
if (countLaws>0) {
sarLawsInfoEOPage.setPageSize(countLaws);
List<SarLawsStandInfo> rowsLaws = iSarLawsStandInfoService.getSarStandardsInfoPage(sarLawsInfoEOPage);
for(SarLawsStandInfo sarLawsInfoEO : rowsLaws){
countSuccess++;
// page idlist 赋值
idListFunc(sarLawsInfoEOPage, searchCenter);
int countUpdateSuccess = 0;
int countAddSuccess = 0;
sarLawsInfoEOPage.setPageSize(searchCenter.getCountStand());
List<SarLawsStandInfo> rowsStand = iSarLawsStandInfoService.getSarStandardsInfoPage(sarLawsInfoEOPage);
List<SarLawsStandInfo> insList = new ArrayList<>();
List<SarLawsStandInfo> updList = new ArrayList<>();
if(!esIdList.isEmpty()){
// 差集 (list1 - list2) 新增
List<SarLawsStandInfo> distinctByUniqueList = rowsStand.stream()
.filter(item -> !new ArrayList<>(esIdList)
.contains(item.getId()))
.collect(Collectors.toList());
insList.addAll(distinctByUniqueList);
// 交集 更新
List<SarLawsStandInfo> intersection = rowsStand.stream()
.filter(item -> new ArrayList<>(esIdList)
.contains(item.getId()))
.collect(Collectors.toList());
updList.addAll(intersection);
}else {
// 新增
insList.addAll(rowsStand);
}
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "UPD".equals(searchCenter.getExecType()))){
for(SarLawsStandInfo sarLawsInfoEO : updList){
countUpdateSuccess++;
if (sarLawsInfoEO.getAttrInfoMap() != null) {
sarLawsInfoEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarLawsInfoEO.getAttrInfoMap()));
}
createStandMQService.sendLawsMQ(sarLawsInfoEO,"update");
}
}
if(!insList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "ADD".equals(searchCenter.getExecType()))){
for(SarLawsStandInfo sarLawsInfoEO : insList){
countAddSuccess++;
if (sarLawsInfoEO.getAttrInfoMap() != null) {
sarLawsInfoEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarLawsInfoEO.getAttrInfoMap()));
}
@@ -142,47 +219,81 @@ public class ResetSearchCenterService {
}
}
return Result.success("重置国内外政策:"+ countSuccess + "");
return Result.success("重置国内外政策:新增-"+ countAddSuccess + " 更新-"+countUpdateSuccess+"条(国内外政策共:"+rowsStand.size()+"条)");
}
private void idListFunc(SarLawsStandInfoPage sarLawsInfoEOPage, SearchCenter searchCenter) {
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
String[] result = searchCenter.getIdList().toArray(new String[0]);
sarLawsInfoEOPage.setIdlist(result);
}
}
@Async
public ResponseMessage resetBussStandSearchCenter(SarBussionessStandEOPage sarBussionessStandEOPage) throws Exception{
public ResponseMessage resetBussStandSearchCenter(SarBussionessStandEOPage sarBussionessStandEOPage,SearchCenter searchCenter) throws Exception{
Boolean getbussstandIndex = elasticsearchService.isIndexExist("bussstand");
int number = 0;
if(getbussstandIndex){
Boolean deletebussstandIndex = elasticsearchService.deleteIndex("bussstand");
}
List<SarBussionessStand> getAllList = new ArrayList<>();
List<Map<String, Object>> searchListData = elasticsearchService.searchListData("stand","","","");
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
sarBussionessStandEOPage.setValidFlag("0");
sarBussionessStandEOPage.setOrderBy("SAR_BUSSIONESS_STAND.issue_time is null,SAR_BUSSIONESS_STAND.issue_time desc,SAR_BUSSIONESS_STAND.id");
sarBussionessStandEOPage.setMenuRoleList(null);
sarBussionessStandEOPage.setMenuId("nomenu");
int countBuss = 10000;
int countSuccess = 0;
if(countBuss>0){
sarBussionessStandEOPage.setMenuId("0");
sarBussionessStandEOPage.setPageSize(countBuss);
getAllList = iSarBussionessStandService.getSarBussionStandPage(sarBussionessStandEOPage);
number = getAllList.size();
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty()){
String[] result = searchCenter.getIdList().toArray(new String[0]);
sarBussionessStandEOPage.setIdlist(result);
}
if (getAllList != null && !getAllList.isEmpty()) {
sendESForBussStand(getAllList,countSuccess);
}
return Result.success("重置企标:"+ number + "");
}
@Async
public void sendESForBussStand(List<SarBussionessStand> getAllList,int countSuccess) throws Exception {
for(SarBussionessStand sarBussionessStandEO : getAllList){
countSuccess++;
Map<String,Object> attrInfoMap = sarBussionessStandEO.getAttrInfoMap();
if (null != attrInfoMap && attrInfoMap.containsKey("QBMJ") && null != attrInfoMap.get("QBMJ") && String.valueOf(attrInfoMap.get("QBMJ")).contains("ACF675Z88W")){
countSuccess--;
}
if (sarBussionessStandEO.getAttrInfoMap() != null) {
sarBussionessStandEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarBussionessStandEO.getAttrInfoMap()));
}
createStandMQService.sendBussStandMQ(sarBussionessStandEO,"add");
int countUpdateSuccess = 0;
int countAddSuccess = 0;
sarBussionessStandEOPage.setMenuId("0");
sarBussionessStandEOPage.setPageSize(searchCenter.getCountStand());
List<SarBussionessStand> rowsStand = iSarBussionessStandService.getSarBussionStandPage(sarBussionessStandEOPage);
List<SarBussionessStand> insList = new ArrayList<>();
List<SarBussionessStand> updList = new ArrayList<>();
if(!esIdList.isEmpty()){
// 差集 (list1 - list2) 新增
List<SarBussionessStand> distinctByUniqueList = rowsStand.stream()
.filter(item -> !new ArrayList<>(esIdList)
.contains(item.getId()))
.collect(Collectors.toList());
insList.addAll(distinctByUniqueList);
// 交集 更新
List<SarBussionessStand> intersection = rowsStand.stream()
.filter(item -> new ArrayList<>(esIdList)
.contains(item.getId()))
.collect(Collectors.toList());
updList.addAll(intersection);
}else {
// 新增
insList.addAll(rowsStand);
}
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "UPD".equals(searchCenter.getExecType()))){
for(SarBussionessStand sarBussionessStandEO : updList){
countUpdateSuccess++;
if (sarBussionessStandEO.getAttrInfoMap() != null) {
sarBussionessStandEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarBussionessStandEO.getAttrInfoMap()));
}
createStandMQService.sendBussStandMQ(sarBussionessStandEO,"update");
}
}
if(!insList.isEmpty() && ("ALL".equals(searchCenter.getExecType()) || "ADD".equals(searchCenter.getExecType()))){
for(SarBussionessStand sarBussionessStandEO : insList){
countAddSuccess++;
if (sarBussionessStandEO.getAttrInfoMap() != null) {
sarBussionessStandEO.setSarStandAttrEOStr(JSONObject.toJSONString(sarBussionessStandEO.getAttrInfoMap()));
}
createStandMQService.sendBussStandMQ(sarBussionessStandEO,"add");
}
}
return Result.success("重置企标:新增-"+ countAddSuccess + "条 更新-"+countUpdateSuccess+"条(企标共:"+rowsStand.size()+"条)");
}
}
@@ -225,7 +225,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
createStandAttrInfo(sarBussionessStandEO);
}
// 增加关联事件
String sortName = sysInfoEOService.getDicNamesByCodes(sarBussionessStandEO.getStandSort());
String sortName = sysInfoEOService.getDicNamesByCodes(sarBussionessStandEO.getStandSort(),"JKSADFH564S");
String number = sortName + " " + sarBussionessStandEO.getStandCode();
if (StringUtils.isNotBlank(sarBussionessStandEO.getStandYear())) {
number += "-" + sarBussionessStandEO.getStandYear();
@@ -394,7 +394,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
}
} else {
List<String> valArr = Arrays.asList(value.split(","));
value = dicTypeEODao.getDicNamesByCodes(valArr);
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
entry.setValue(value);
}
@@ -530,7 +530,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
if(newMap != null && oldMap != null) {
newMap = changeMap(sarStandardsInfoEO,newMap);
oldMap = changeMap(beforeSarStandardsInfo,oldMap);
String sortName = sysInfoEOService.getDicNamesByCodes(sarStandardsInfoEO.getStandSort());
String sortName = sysInfoEOService.getDicNamesByCodes(sarStandardsInfoEO.getStandSort(),"JKSADFH564S");
String number = sortName + " " + sarStandardsInfoEO.getStandCode();
if (StringUtils.isNotBlank(sarStandardsInfoEO.getStandYear())) {
number += "-" + sarStandardsInfoEO.getStandYear();
@@ -886,7 +886,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
value = entry.getValue().toString();
List<String> valArr = Arrays.asList(value.split(","));
value = dicTypeEODao.getDicNamesByCodes(valArr);
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
Optional.ofNullable(value)
.ifPresent(val->{
@@ -1124,7 +1124,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
valArr = Arrays.asList(value.split(","));
}
if(!valArr.isEmpty()){
value = dicTypeEODao.getDicNamesByCodes(valArr);
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
}
entry.setValue(value);
@@ -383,7 +383,7 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
}else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListLaws != null && InitStandAttrUtil.selectionFieldListLaws.size() > 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) {
value = entry.getValue().toString();
List<String> valArr = Arrays.asList(value.split(","));
value = dicTypeEODao.getDicNamesByCodes(valArr);
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
entry.setValue(value);
}
}
@@ -505,7 +505,7 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
}
} else {
List<String> valArr = Arrays.asList(value.split(","));
value = dicTypeEODao.getDicNamesByCodes(valArr);
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
entry.setValue(value);
}
@@ -544,7 +544,7 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
}
} else {
List<String> valArr = Arrays.asList(value.split(","));
value = dicTypeEODao.getDicNamesByCodes(valArr);
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
entry.setValue(value);
}
@@ -662,7 +662,7 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
valArr = Arrays.asList(value.split(","));
}
if(!valArr.isEmpty()){
value = dicTypeEODao.getDicNamesByCodes(valArr);
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
}
entry.setValue(value);
@@ -711,7 +711,7 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
}
newMap = changeMap(sarStandardsInfoEO,newMap);
oldMap = changeMap(beforeSarStandardsInfo,oldMap);
String sortName = sysInfoEOService.getDicNamesByCodes(sarStandardsInfoEO.getLawsType());
String sortName = sysInfoEOService.getDicNamesByCodes(sarStandardsInfoEO.getLawsType(),"sg9gb7liywkrnv3pa5uh");
String number = sortName + " " + sarStandardsInfoEO.getLawsNumber();
String content = number + "" + sarStandardsInfoEO.getLawsName()+" " + sarStandardsInfoEO.getLawsEnName() + "";
sarUpdLogEOService.createUpdateLog(SarTypeEnum.BUSINESS.getValue(),sarStandardsInfoEO.getId(),oldMap,newMap,content);
@@ -653,7 +653,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
value= String.join(",", stringList.isEmpty() ? valArr : stringList);
break;
}
default:value = dicTypeEODao.getDicNamesByCodes(valArr);
default:value = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
@@ -683,7 +683,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
valArr = Arrays.asList(value.split(","));
}
if(!valArr.isEmpty()){
value = dicTypeEODao.getDicNamesByCodes(valArr);
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
}
entry.setValue(value);
@@ -731,7 +731,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
}
} else {
List<String> valArr = Arrays.asList(value.split(","));
value = dicTypeEODao.getDicNamesByCodes(valArr);
value = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
}
entry.setValue(value);
@@ -193,7 +193,7 @@ public class SarUpdLogServiceImpl extends ServiceImpl<SarUpdLogDao, SarUpdLog> i
}
return value;
default:
value = sysInfoEOService.getDicNamesByCodes(value);
value = sysInfoEOService.getDicNamesByCodes(value,"");
return value;
}
}
@@ -94,11 +94,11 @@ public class SysInfoEOService {
* @Param: [userIds]
* @Return: java.lang.String
*/
public String getDicNamesByCodes(String codes){
public String getDicNamesByCodes(String codes,String dicId){
String names = "";
if (StringUtils.isNotBlank(codes)) {
String[] idArr = codes.split(",");
String names1 = dicTypeEODao.getDicNamesByCodes(Arrays.asList(idArr));
String names1 = dicTypeEODao.getDicNamesByCodes(Arrays.asList(idArr),dicId);
if(StringUtils.isNotBlank(names1)){
List<String> list1 = Arrays.asList(names1.split(","));
List<String> list = list1.stream().distinct().collect(Collectors.toList());
@@ -214,7 +214,7 @@ public class SysInfoEOService {
valueName = getRoleNamesByIds(value);
} else {
List<String> valArr = Arrays.asList(value.split(","));
valueName = dicTypeEODao.getDicNamesByCodes(valArr);
valueName = dicTypeEODao.getDicNamesByCodes(valArr,"");
}
}
nameMap.put(field+"Show", valueName);
@@ -967,6 +967,8 @@
dicstandSort.dic_id is not null and dicstandSort.valid_flag = 0 and dicstandSort.PARENT_ID is null)
LEFT JOIN TS_DICTYPE dicstandTextStatus ON (
dicstandTextStatus.dic_type_code = SAR_STANDARDS_INFO.text_status
<!-- 标准类别DIC_ID 固定ID 区分 国家地区 -->
AND dicstandTextStatus.dic_id = 'JKSADFH564S'
AND dicstandTextStatus.dic_id IS NOT NULL
AND dicstandTextStatus.valid_flag = 0
)
@@ -66,7 +66,7 @@ public interface DicTypeEODao extends BaseMapper<DicTypeEO> {
public List<SelectionResult> getDicTypeByDicId(@Param("dicId") String dicId);
public String getDicNamesByCodes(@Param("codeList") List<String> codeList);
public String getDicNamesByCodes(@Param("codeList") List<String> codeList, @Param("dicId") String dicId);
public int insertSelective(DicTypeEO dictionaryEO);
@@ -64,7 +64,7 @@ public interface IDicTypeEOService extends IService<DicTypeEO> {
public List<SelectionResult> getDicTypeByDicId(String dicId);
public String getDicNamesByCodes(List<String> codeList);
public String getDicNamesByCodes(List<String> codeList,String dicId);
public int insertSelective(DicTypeEO dictionaryEO);
@@ -391,8 +391,8 @@ public class DicTypeEOServiceImpl extends ServiceImpl<DicTypeEODao,DicTypeEO> im
}
@Override
public String getDicNamesByCodes(List<String> codeList) {
return dicTypeEODao.getDicNamesByCodes(codeList);
public String getDicNamesByCodes(List<String> codeList,String dicId) {
return dicTypeEODao.getDicNamesByCodes(codeList,dicId);
}
@Override
@@ -587,10 +587,13 @@
FROM
TS_DICTYPE
WHERE
TS_DICTYPE.VALID_FLAG=0 and PARENT_ID is null and DIC_TYPE_CODE in
TS_DICTYPE.VALID_FLAG=0 and TS_DICTYPE.PARENT_ID is null and TS_DICTYPE.DIC_TYPE_CODE in
<foreach collection="codeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="dicId != null and dicId != ''">
and TS_DICTYPE.DIC_ID = #{dicId}
</if>
</select>
+666
View File
@@ -0,0 +1,666 @@
bussstand/bussstand/_mapping?pretty&include_type_name=true
{
"bussstand": {
"properties": {
"BDTQBBHBUSS": { "type": "text","fields": { "keyword": { "type": "keyword","ignore_above": 256}}},
"BDTQBBHBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"BZSMBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"BZSMBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"DTQBBHBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"DTQBBHBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"FBGBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"FBGBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"FSRQBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"FSRQBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}},
"FZRQBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"FZRQBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"GLWJBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"GLWJBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"LSBBBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"LSBBBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"NYLXCLASS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"NYLXCLASSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"QCDW": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"QCDWName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"QCDWShow": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"QCRBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"QCRBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"QTWJBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"QTWJBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"SYCPXCLASS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"SYCPXCLASSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"SYCXCLASS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"SYCXCLASSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"TXLBBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"TXLBBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"VPPSBMBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"VPPSBMBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"VPPSCNBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"VPPSCNBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"WJSCRYBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"WJSCRYBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"XCSJBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"XCSJBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"XGJLBUSS": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"XGJLBUSSName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"XGLC": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"XGLCName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"content": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"country": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"issueTime": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
},
"fielddata": true
},
"issue_time_data": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"nameshow": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"numberExpNull": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"numbershow": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"putTime": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"put_time_data": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"replaceStandNum": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"replace_stand_num": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"replacedStandNum": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"replaced_stand_num": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"standEnName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"standNumber": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"standSort": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"standSortShow": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"standYear": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"stand_code": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"stand_en_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"stand_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"stand_sort": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"stand_status": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"stand_year": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"standstateshow": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"statecode": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"textStatusBuss": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"textStatusBussName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"validFlag": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
@@ -0,0 +1,63 @@
fulltextserch/fulltextserch/_mapping?pretty&include_type_name=true
{
"fulltextserch": {
"properties": {
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"indexType": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"issue_time": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
},
"fielddata": true
},
"textContent": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"textItems": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"title": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
File diff suppressed because it is too large Load Diff