feat: There is no way the,xxx

This commit is contained in:
super_liu
2022-05-26 11:58:02 +08:00
parent 1439176a86
commit 55afc3e507
@@ -314,7 +314,8 @@ public class ResetSearchCenterService {
} }
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase()))){ if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase())
|| "UPDATENONEXISTENT".equals(searchCenter.getExecType().toUpperCase()))){
for(SarStandardsInfo sarStandardsInfoEO : updList){ for(SarStandardsInfo sarStandardsInfoEO : updList){
countUpdateSuccess++; countUpdateSuccess++;
standFunc(sarStandardsInfoEO); standFunc(sarStandardsInfoEO);
@@ -534,7 +535,19 @@ public class ResetSearchCenterService {
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("fulltextserch",search); List<Map<String, Object>> searchListData = elasticsearchService.searchAll("fulltextserch",search);
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList()); List<String> esIdList = new ArrayList<>();
if("UPDATENONEXISTENT".equals(searchCenter.getExecType().toUpperCase())){
List<Map<String, Object>> filterList = searchListData.stream().filter(stringObjectMap -> {
if(stringObjectMap.get("standTypeOrder") == null){
return true;
}else {
return false;
}
}).collect(Collectors.toList());
esIdList = filterList.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
}else {
esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
}
sarLawsInfoEOPage.setLawsType("FOREIGN"); sarLawsInfoEOPage.setLawsType("FOREIGN");
@@ -557,8 +570,9 @@ public class ResetSearchCenterService {
if(!esIdList.isEmpty()){ if(!esIdList.isEmpty()){
// 交集 更新 // 交集 更新
List<String> finalEsIdList = esIdList;
List<SarLawsStandInfo> intersection = rowsStand.stream() List<SarLawsStandInfo> intersection = rowsStand.stream()
.filter(item -> new ArrayList<>(esIdList) .filter(item -> new ArrayList<>(finalEsIdList)
.contains(item.getId())) .contains(item.getId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty() && !intersection.isEmpty()){ if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty() && !intersection.isEmpty()){
@@ -572,7 +586,8 @@ public class ResetSearchCenterService {
} }
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase()))){ if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase())
|| "UPDATENONEXISTENT".equals(searchCenter.getExecType().toUpperCase()))){
for(SarLawsStandInfo sarLawsInfoEO : updList){ for(SarLawsStandInfo sarLawsInfoEO : updList){
countUpdateSuccess++; countUpdateSuccess++;
lawsAttrInfoShowSearchDetails(sarLawsInfoEO); lawsAttrInfoShowSearchDetails(sarLawsInfoEO);
@@ -852,7 +867,19 @@ public class ResetSearchCenterService {
List<Map<String, Object>> searchListData = elasticsearchService.searchAll("fulltextserch",search); List<Map<String, Object>> searchListData = elasticsearchService.searchAll("fulltextserch",search);
List<String> esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList()); List<String> esIdList = new ArrayList<>();
if("UPDATENONEXISTENT".equals(searchCenter.getExecType().toUpperCase())){
List<Map<String, Object>> filterList = searchListData.stream().filter(stringObjectMap -> {
if(stringObjectMap.get("standTypeOrder") == null){
return true;
}else {
return false;
}
}).collect(Collectors.toList());
esIdList = filterList.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
}else {
esIdList = searchListData.stream().map(stringObjectMap -> stringObjectMap.get("id").toString()).collect(Collectors.toList());
}
sarBussionessStandEOPage.setValidFlag("0"); sarBussionessStandEOPage.setValidFlag("0");
sarBussionessStandEOPage.setOrderBy("SAR_BUSSIONESS_STAND.issue_time is null,SAR_BUSSIONESS_STAND.issue_time desc,SAR_BUSSIONESS_STAND.id"); sarBussionessStandEOPage.setOrderBy("SAR_BUSSIONESS_STAND.issue_time is null,SAR_BUSSIONESS_STAND.issue_time desc,SAR_BUSSIONESS_STAND.id");
@@ -881,8 +908,9 @@ public class ResetSearchCenterService {
if(!esIdList.isEmpty()){ if(!esIdList.isEmpty()){
// 交集 更新 // 交集 更新
List<String> finalEsIdList = esIdList;
List<SarBussionessStand> intersection = rowsStand.stream() List<SarBussionessStand> intersection = rowsStand.stream()
.filter(item -> new ArrayList<>(esIdList) .filter(item -> new ArrayList<>(finalEsIdList)
.contains(item.getId())) .contains(item.getId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty() && !intersection.isEmpty()){ if(searchCenter.getIdList() != null && !searchCenter.getIdList().isEmpty() && !intersection.isEmpty()){
@@ -894,7 +922,8 @@ public class ResetSearchCenterService {
} }
} }
if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase()))){ if(!updList.isEmpty() && ("ALL".equals(searchCenter.getExecType().toUpperCase()) || "UPD".equals(searchCenter.getExecType().toUpperCase())
|| "UPDATENONEXISTENT".equals(searchCenter.getExecType().toUpperCase()))){
for(SarBussionessStand sarBussionessStandEO : updList){ for(SarBussionessStand sarBussionessStandEO : updList){
countUpdateSuccess++; countUpdateSuccess++;
bussAttrInfoShowSearchDetails(sarBussionessStandEO); bussAttrInfoShowSearchDetails(sarBussionessStandEO);