From c1eeea3f1f85d0481caaf7c72d9f581de1821383 Mon Sep 17 00:00:00 2001 From: super_liu <396572590@qq.com> Date: Tue, 8 Mar 2022 16:33:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20There=20is=20no=20way=20the,=20?= =?UTF-8?q?=E8=B7=91=E8=B7=91=E8=B7=91=20=E8=B7=91=E6=95=B0=E6=8D=AE=20?= =?UTF-8?q?=E9=87=8D=E7=BD=AEes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/adc/da/mq/SendBussMQService.java | 8 +- .../java/com/adc/da/mq/SendLawsMQService.java | 14 +- .../com/adc/da/mq/SendStandMQService.java | 10 +- .../search/ResetSearchCenterController.java | 50 +- .../com/adc/da/search/bean/SearchCenter.java | 29 + .../server/ResetSearchCenterService.java | 267 ++-- .../impl/SarBussionessStandServiceImpl.java | 10 +- .../impl/SarLawsStandInfoServiceImpl.java | 10 +- .../impl/SarStandardsInfoServiceImpl.java | 6 +- .../service/impl/SarUpdLogServiceImpl.java | 2 +- .../sysInfo/service/SysInfoEOService.java | 6 +- .../SarStandardsInfoMapper.xml | 2 + .../java/com/adc/da/sys/dao/DicTypeEODao.java | 2 +- .../adc/da/sys/service/IDicTypeEOService.java | 2 +- .../service/impl/DicTypeEOServiceImpl.java | 4 +- .../mybatis/mapper/sys/DicTypeEOMapper.xml | 5 +- doc/es/es 创建索引字段_bussioness.txt | 666 ++++++++++ doc/es/es 创建索引字段_fulltextserch.txt | 63 + doc/es/es 创建索引字段_stand.txt | 1161 +++++++++++++++++ 19 files changed, 2190 insertions(+), 127 deletions(-) create mode 100644 adc-da-slrs/src/main/java/com/adc/da/search/bean/SearchCenter.java create mode 100644 doc/es/es 创建索引字段_bussioness.txt create mode 100644 doc/es/es 创建索引字段_fulltextserch.txt create mode 100644 doc/es/es 创建索引字段_stand.txt diff --git a/adc-da-slrs/src/main/java/com/adc/da/mq/SendBussMQService.java b/adc-da-slrs/src/main/java/com/adc/da/mq/SendBussMQService.java index 3ea60c6e..8c6da677 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/mq/SendBussMQService.java +++ b/adc-da-slrs/src/main/java/com/adc/da/mq/SendBussMQService.java @@ -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 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); } // 自定义属性字段 diff --git a/adc-da-slrs/src/main/java/com/adc/da/mq/SendLawsMQService.java b/adc-da-slrs/src/main/java/com/adc/da/mq/SendLawsMQService.java index 9ec25207..c81169d4 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/mq/SendLawsMQService.java +++ b/adc-da-slrs/src/main/java/com/adc/da/mq/SendLawsMQService.java @@ -149,7 +149,7 @@ public class SendLawsMQService { String lawsTypeName = ""; if(infoEO.getLawsTextState() != null && StringUtils.isNotBlank(infoEO.getLawsType())){ List 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 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 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 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 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 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); } // 自定义属性字段 diff --git a/adc-da-slrs/src/main/java/com/adc/da/mq/SendStandMQService.java b/adc-da-slrs/src/main/java/com/adc/da/mq/SendStandMQService.java index 1bebf78d..f8082445 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/mq/SendStandMQService.java +++ b/adc-da-slrs/src/main/java/com/adc/da/mq/SendStandMQService.java @@ -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 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 valArr = Arrays.asList(infoEO.getTextStatus().split(",")); - textStatusName = dicTypeEODao.getDicNamesByCodes(valArr); + textStatusName = dicTypeEODao.getDicNamesByCodes(valArr,""); } saveMap.put("textStatus",infoEO.getTextStatus()); saveMap.put("textStatusName",textStatusName); diff --git a/adc-da-slrs/src/main/java/com/adc/da/search/ResetSearchCenterController.java b/adc-da-slrs/src/main/java/com/adc/da/search/ResetSearchCenterController.java index 89e8dc56..6790a6c6 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/search/ResetSearchCenterController.java +++ b/adc-da-slrs/src/main/java/com/adc/da/search/ResetSearchCenterController.java @@ -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 idList; +} diff --git a/adc-da-slrs/src/main/java/com/adc/da/search/server/ResetSearchCenterService.java b/adc-da-slrs/src/main/java/com/adc/da/search/server/ResetSearchCenterService.java index 15c2dfe5..c961510c 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/search/server/ResetSearchCenterService.java +++ b/adc-da-slrs/src/main/java/com/adc/da/search/server/ResetSearchCenterService.java @@ -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 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> searchListData = elasticsearchService.searchListData("stand","","",""); + + List 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 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 rowsStand = iSarStandardsInfoService.getSarStandardsInfoPage(page); + List insList = new ArrayList<>(); + List updList = new ArrayList<>(); + if(!esIdList.isEmpty()){ + + // 差集 (list1 - list2) 新增 + List distinctByUniqueList = rowsStand.stream() + .filter(item -> !new ArrayList<>(esIdList) + .contains(item.getId())) + .collect(Collectors.toList()); + insList.addAll(distinctByUniqueList); + + // 交集 更新 + List 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> searchListData = elasticsearchService.searchListData("stand","","",""); + + List 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 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 rowsStand = iSarLawsStandInfoService.getSarStandardsInfoPage(sarLawsInfoEOPage); + List insList = new ArrayList<>(); + List updList = new ArrayList<>(); + if(!esIdList.isEmpty()){ + + // 差集 (list1 - list2) 新增 + List distinctByUniqueList = rowsStand.stream() + .filter(item -> !new ArrayList<>(esIdList) + .contains(item.getId())) + .collect(Collectors.toList()); + insList.addAll(distinctByUniqueList); + + // 交集 更新 + List 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 getAllList = new ArrayList<>(); + + List> searchListData = elasticsearchService.searchListData("stand","","",""); + + List 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 getAllList,int countSuccess) throws Exception { - for(SarBussionessStand sarBussionessStandEO : getAllList){ - countSuccess++; - Map 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 rowsStand = iSarBussionessStandService.getSarBussionStandPage(sarBussionessStandEOPage); + List insList = new ArrayList<>(); + List updList = new ArrayList<>(); + if(!esIdList.isEmpty()){ + + // 差集 (list1 - list2) 新增 + List distinctByUniqueList = rowsStand.stream() + .filter(item -> !new ArrayList<>(esIdList) + .contains(item.getId())) + .collect(Collectors.toList()); + insList.addAll(distinctByUniqueList); + + // 交集 更新 + List 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()+"条)"); } } diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussionessStand/service/impl/SarBussionessStandServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussionessStand/service/impl/SarBussionessStandServiceImpl.java index 86d38baa..22d85104 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussionessStand/service/impl/SarBussionessStandServiceImpl.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarBussionessStand/service/impl/SarBussionessStandServiceImpl.java @@ -225,7 +225,7 @@ public class SarBussionessStandServiceImpl extends ServiceImpl 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 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) { value = entry.getValue().toString(); List 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 0 && InitStandAttrUtil.selectionFieldListLaws.contains(name)) { value = entry.getValue().toString(); List 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 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 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 valArr = Arrays.asList(value.split(",")); - value = dicTypeEODao.getDicNamesByCodes(valArr); + value = dicTypeEODao.getDicNamesByCodes(valArr,""); } } entry.setValue(value); diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarUpdLog/service/impl/SarUpdLogServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarUpdLog/service/impl/SarUpdLogServiceImpl.java index df23df2e..3f7f4d93 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarUpdLog/service/impl/SarUpdLogServiceImpl.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarUpdLog/service/impl/SarUpdLogServiceImpl.java @@ -193,7 +193,7 @@ public class SarUpdLogServiceImpl extends ServiceImpl i } return value; default: - value = sysInfoEOService.getDicNamesByCodes(value); + value = sysInfoEOService.getDicNamesByCodes(value,""); return value; } } diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sysInfo/service/SysInfoEOService.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sysInfo/service/SysInfoEOService.java index 85e47fa2..025d6a05 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sysInfo/service/SysInfoEOService.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sysInfo/service/SysInfoEOService.java @@ -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 list1 = Arrays.asList(names1.split(",")); List list = list1.stream().distinct().collect(Collectors.toList()); @@ -214,7 +214,7 @@ public class SysInfoEOService { valueName = getRoleNamesByIds(value); } else { List valArr = Arrays.asList(value.split(",")); - valueName = dicTypeEODao.getDicNamesByCodes(valArr); + valueName = dicTypeEODao.getDicNamesByCodes(valArr,""); } } nameMap.put(field+"Show", valueName); diff --git a/adc-da-slrs/src/main/resources/mybatis/mapper/sarStandardsInfo/SarStandardsInfoMapper.xml b/adc-da-slrs/src/main/resources/mybatis/mapper/sarStandardsInfo/SarStandardsInfoMapper.xml index 89027ee5..d3a8b9a0 100644 --- a/adc-da-slrs/src/main/resources/mybatis/mapper/sarStandardsInfo/SarStandardsInfoMapper.xml +++ b/adc-da-slrs/src/main/resources/mybatis/mapper/sarStandardsInfo/SarStandardsInfoMapper.xml @@ -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 + + AND dicstandTextStatus.dic_id = 'JKSADFH564S' AND dicstandTextStatus.dic_id IS NOT NULL AND dicstandTextStatus.valid_flag = 0 ) diff --git a/adc-da-sys/src/main/java/com/adc/da/sys/dao/DicTypeEODao.java b/adc-da-sys/src/main/java/com/adc/da/sys/dao/DicTypeEODao.java index ecd5c956..18d9e1ac 100644 --- a/adc-da-sys/src/main/java/com/adc/da/sys/dao/DicTypeEODao.java +++ b/adc-da-sys/src/main/java/com/adc/da/sys/dao/DicTypeEODao.java @@ -66,7 +66,7 @@ public interface DicTypeEODao extends BaseMapper { public List getDicTypeByDicId(@Param("dicId") String dicId); - public String getDicNamesByCodes(@Param("codeList") List codeList); + public String getDicNamesByCodes(@Param("codeList") List codeList, @Param("dicId") String dicId); public int insertSelective(DicTypeEO dictionaryEO); diff --git a/adc-da-sys/src/main/java/com/adc/da/sys/service/IDicTypeEOService.java b/adc-da-sys/src/main/java/com/adc/da/sys/service/IDicTypeEOService.java index a2763196..0e02d4a7 100644 --- a/adc-da-sys/src/main/java/com/adc/da/sys/service/IDicTypeEOService.java +++ b/adc-da-sys/src/main/java/com/adc/da/sys/service/IDicTypeEOService.java @@ -64,7 +64,7 @@ public interface IDicTypeEOService extends IService { public List getDicTypeByDicId(String dicId); - public String getDicNamesByCodes(List codeList); + public String getDicNamesByCodes(List codeList,String dicId); public int insertSelective(DicTypeEO dictionaryEO); diff --git a/adc-da-sys/src/main/java/com/adc/da/sys/service/impl/DicTypeEOServiceImpl.java b/adc-da-sys/src/main/java/com/adc/da/sys/service/impl/DicTypeEOServiceImpl.java index a8b96227..9cf79cd6 100644 --- a/adc-da-sys/src/main/java/com/adc/da/sys/service/impl/DicTypeEOServiceImpl.java +++ b/adc-da-sys/src/main/java/com/adc/da/sys/service/impl/DicTypeEOServiceImpl.java @@ -391,8 +391,8 @@ public class DicTypeEOServiceImpl extends ServiceImpl im } @Override - public String getDicNamesByCodes(List codeList) { - return dicTypeEODao.getDicNamesByCodes(codeList); + public String getDicNamesByCodes(List codeList,String dicId) { + return dicTypeEODao.getDicNamesByCodes(codeList,dicId); } @Override diff --git a/adc-da-sys/src/main/resources/mybatis/mapper/sys/DicTypeEOMapper.xml b/adc-da-sys/src/main/resources/mybatis/mapper/sys/DicTypeEOMapper.xml index af630bc2..61e3a9b7 100644 --- a/adc-da-sys/src/main/resources/mybatis/mapper/sys/DicTypeEOMapper.xml +++ b/adc-da-sys/src/main/resources/mybatis/mapper/sys/DicTypeEOMapper.xml @@ -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 #{item} + + and TS_DICTYPE.DIC_ID = #{dicId} + diff --git a/doc/es/es 创建索引字段_bussioness.txt b/doc/es/es 创建索引字段_bussioness.txt new file mode 100644 index 00000000..82b20074 --- /dev/null +++ b/doc/es/es 创建索引字段_bussioness.txt @@ -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 +} +} +} +} +} +} \ No newline at end of file diff --git a/doc/es/es 创建索引字段_fulltextserch.txt b/doc/es/es 创建索引字段_fulltextserch.txt new file mode 100644 index 00000000..7f17d97b --- /dev/null +++ b/doc/es/es 创建索引字段_fulltextserch.txt @@ -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 + } + } + } + } + } +} \ No newline at end of file diff --git a/doc/es/es 创建索引字段_stand.txt b/doc/es/es 创建索引字段_stand.txt new file mode 100644 index 00000000..467cca1c --- /dev/null +++ b/doc/es/es 创建索引字段_stand.txt @@ -0,0 +1,1161 @@ +stand/stand/_mapping?pretty&include_type_name=true + +{ + "stand": { + "properties": { + "BBFDTBZ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "BBFDTBZName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "BDTBH": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "BFDTBZ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "BFDTBZName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "BPG": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "BPGName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "BYYBJ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "BYYBJName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CA": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CAName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CBBH": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CBBHName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CBCD": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CBCDName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CBCDShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CHJL": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CHJLName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CLLX": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CLLXName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CLLXShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CYCVPPSBM": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CYCVPPSBMName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CYCVPPSCN": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CYCVPPSCNName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CYSD": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CYSDName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CYSDShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CYZBPM": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CYZBPMName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "CYZBPMShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "DTBJH": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "DTBJHName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "DYBXH": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "DYBXHName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "DYMC": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "DYMCName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "FBGBJBD": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "FBGBJBDName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "GKDW": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "GKDWName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "GKDWShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "GLWJ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "GLWJName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "GXHBQ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "GXHBQName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "JDWJ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "JDWJName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "KCCVPPSBM": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "KCCVPPSBMName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "KCCVPPSCN": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "KCCVPPSCNName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "KWJ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "KWJName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "NYLX": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "NYLXName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "NYLXShow": { + "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 + } + } + }, + "SSG": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "SSGName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "SSRQ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "SSRQName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "SYCPX": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "SYCPXName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "SYCPXShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "SYRZ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "SYRZName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "SYRZShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "TXLB": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "TXLBName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "TXLBShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "WSSMR": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "WSSMRName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "WSSMRShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "XCXSSRQ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "XCXSSRQName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "XGD": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "XGDName": { + "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 + } + } + }, + "YYBJ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "YYBJName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZBJBD": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZBJBDName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZCCSSRQ": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZCCSSRQName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZQYJG": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZQYJGName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZRBM": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZRBMName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZRBMShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZRGCS": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZRGCSName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ZRGCSShow": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "baseSearchContent": { + "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 + } + } + }, + "isRelateAccess": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "isRelateAccessName": { + "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 + } + } + }, + "standEnName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "standName": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "standNature": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "standNatureName": { + "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 + } + } + }, + "standSystem": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "standType": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "standYear": { + "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_number": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "stand_sort": { + "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 + } + } + }, + "synopsis": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "textStatus": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "textStatusName": { + "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 + } + } + } + } + } +} \ No newline at end of file