feat 重写了一些诡异的代码
This commit is contained in:
+4
-1
@@ -64,9 +64,12 @@
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.adc</groupId>-->
|
||||
<!-- <artifactId>adc-da-search</artifactId>-->
|
||||
<!-- <version>3.0.0</version>-->
|
||||
<!-- <version>1.0.0</version>-->
|
||||
<!-- <scope>compile</scope>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.adc</groupId>-->
|
||||
<!-- <artifactId>adc-da-gen</artifactId>-->
|
||||
|
||||
+190
-224
@@ -1,247 +1,213 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>foton-slrs-system-rest</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
<parent>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>foton-slrs-system-rest</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>adc-da-search</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<artifactId>adc-da-search</artifactId>
|
||||
<version>1.0.0</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<java_source_version>1.7</java_source_version>
|
||||
<java_target_version>1.8</java_target_version>
|
||||
<ehcache.version>2.6.6</ehcache.version>
|
||||
<shiro.version>1.4.0-RC2</shiro.version>
|
||||
<spring.version>4.3.9.RELEASE</spring.version>
|
||||
</properties>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<java_source_version>1.7</java_source_version>
|
||||
<java_target_version>1.8</java_target_version>
|
||||
<ehcache.version>2.6.6</ehcache.version>
|
||||
<shiro.version>1.4.0-RC2</shiro.version>
|
||||
<spring.version>4.3.9.RELEASE</spring.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>adc</id>
|
||||
<url>http://60.247.58.121:8182/nexus/content/groups/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>adc</id>
|
||||
<url>http://60.247.58.121:8182/nexus/content/groups/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
|
||||
</repositories>
|
||||
</repositories>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>thirdparty</id>
|
||||
<name>Nexus Thirdparty Repository</name>
|
||||
<url>http://60.247.58.121:8182/nexus/content/repositories/thirdparty/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>thirdparty</id>
|
||||
<name>Nexus Thirdparty Repository</name>
|
||||
<url>http://60.247.58.121:8182/nexus/content/repositories/thirdparty/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.adc</groupId>-->
|
||||
<!-- <artifactId>adc-da-activiti</artifactId>-->
|
||||
<!-- <version>2.2.02</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependencies>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.adc</groupId>-->
|
||||
<!-- <artifactId>adc-da-activiti</artifactId>-->
|
||||
<!-- <version>2.2.02</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>adc-da-base</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>adc-da-base</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>adc-da-util</artifactId>
|
||||
<version>2.2.41</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk14</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>adc-da-sys</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>adc-da-excel</artifactId>
|
||||
<version>2.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>adc-da-sys</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- rabbitMQ -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch.client</groupId>
|
||||
<artifactId>transport</artifactId>
|
||||
<version>6.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch</artifactId>
|
||||
<version>6.3.2</version>
|
||||
</dependency>
|
||||
<!-- 6.0版本es需添加此依赖,解决依赖冲突 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<!-- 如果要使用内嵌Jetty服务器,需排除tomcat依赖 -->
|
||||
<!--<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>-->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>adc-da-file</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.javacsv</groupId>
|
||||
<artifactId>javacsv</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.opencsv</groupId>
|
||||
<artifactId>opencsv</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>adc-da-druid</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>adc-da-excel</artifactId>
|
||||
<version>2.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>19.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mashape.unirest</groupId>
|
||||
<artifactId>unirest-java</artifactId>
|
||||
<version>1.4.9</version>
|
||||
</dependency>
|
||||
|
||||
<!-- rabbitMQ -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch.client</groupId>
|
||||
<artifactId>transport</artifactId>
|
||||
<version>6.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch</artifactId>
|
||||
<version>6.3.2</version>
|
||||
</dependency>
|
||||
<!-- 6.0版本es需添加此依赖,解决依赖冲突 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<!-- 如果要使用内嵌Jetty服务器,需排除tomcat依赖 -->
|
||||
<!--<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>-->
|
||||
</dependency>
|
||||
<!-- SpringBoot内嵌的Jetty服务器 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jetty</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.json-lib</groupId>
|
||||
<artifactId>json-lib</artifactId>
|
||||
<version>2.4</version>
|
||||
<classifier>jdk15</classifier>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<groupId>commons-collections</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.javacsv</groupId>
|
||||
<artifactId>javacsv</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.opencsv</groupId>
|
||||
<artifactId>opencsv</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>19.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mashape.unirest</groupId>
|
||||
<artifactId>unirest-java</artifactId>
|
||||
<version>1.4.9</version>
|
||||
</dependency>
|
||||
<!-- easypoi使用到 -->
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-base</artifactId>
|
||||
<version>4.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-web</artifactId>
|
||||
<version>4.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-annotation</artifactId>
|
||||
<version>4.1.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.json-lib</groupId>
|
||||
<artifactId>json-lib</artifactId>
|
||||
<version>2.4</version>
|
||||
<classifier>jdk15</classifier>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<groupId>commons-collections</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- easypoi使用到 -->
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-base</artifactId>
|
||||
<version>4.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-web</artifactId>
|
||||
<version>4.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-annotation</artifactId>
|
||||
<version>4.1.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>commons-lang</groupId> -->
|
||||
<!-- <artifactId>commons-lang</artifactId> -->
|
||||
<!-- </dependency> -->
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<compilerVersion>${java.version}</compilerVersion>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>commons-lang</groupId> -->
|
||||
<!-- <artifactId>commons-lang</artifactId> -->
|
||||
<!-- </dependency> -->
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<compilerVersion>${java.version}</compilerVersion>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
+11
-11
@@ -1,24 +1,25 @@
|
||||
package com.adc.da.search.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.excel.poi.excel.ExcelExportUtil;
|
||||
import com.adc.da.excel.poi.excel.entity.ExportParams;
|
||||
import com.adc.da.excel.poi.excel.entity.enums.ExcelType;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.search.dto.*;
|
||||
import com.adc.da.search.entity.SarAdvanceSearchVO;
|
||||
import com.adc.da.search.entity.SeniorSearchInfoEO;
|
||||
import com.adc.da.search.service.ElasticsearchService;
|
||||
import com.adc.da.search.service.SearchCenterService;
|
||||
import com.adc.da.util.exception.AdcDaBaseException;
|
||||
import com.adc.da.util.http.PageInfo;
|
||||
import com.adc.da.util.http.ResponseMessage;
|
||||
import com.adc.da.util.http.Result;
|
||||
import com.adc.da.util.utils.IOUtils;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.util.IOUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.elasticsearch.client.transport.TransportClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -33,7 +34,6 @@ import java.io.OutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static com.adc.da.sys.common.ReadExcelName.encodeFileName;
|
||||
|
||||
@RestController
|
||||
@@ -271,7 +271,7 @@ public class SearchCenterController extends BaseController<Map<String, Object>>
|
||||
dtoDatas.add(exportDto);
|
||||
}
|
||||
//导出数据到Excel
|
||||
workbook = ExcelExportUtil.exportExcel(exportParams, SearchMsgExportDto.class, dtoDatas);
|
||||
workbook = com.adc.da.excel.poi.excel.ExcelExportUtil.exportExcel(exportParams, SearchMsgExportDto.class, dtoDatas);
|
||||
}
|
||||
|
||||
os = response.getOutputStream();
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ package com.adc.da.search.controller;
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.search.service.ElasticsearchService;
|
||||
import com.adc.da.util.http.ResponseMessage;
|
||||
import com.adc.da.util.http.Result;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
|
||||
+1
-1
@@ -2,8 +2,8 @@ package com.adc.da.search.service.impl;
|
||||
|
||||
import com.adc.da.search.entity.EsPage;
|
||||
import com.adc.da.search.service.ElasticsearchService;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder;
|
||||
import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
|
||||
import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse;
|
||||
|
||||
+75
-88
@@ -7,8 +7,7 @@ import com.adc.da.search.entity.SeniorSearchInfoEO;
|
||||
import com.adc.da.search.service.SearchCenterService;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.elasticsearch.action.search.SearchRequestBuilder;
|
||||
import org.elasticsearch.action.search.SearchResponse;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
@@ -120,30 +119,17 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
if(StringUtils.isNotEmpty(searchInfoEO.getSelectValue())){
|
||||
boolQueryBuilder.should(boolQueryShould);
|
||||
}
|
||||
BoolQueryBuilder boolQueryBuilder1=null;
|
||||
if(searchInfoEO.getSelectIndex().equals("stand")) {
|
||||
BoolQueryBuilder standBoolQueryBuilder = queryStandMsg(searchInfoEO,boolQueryMust,searchRequestBuilder);
|
||||
boolQueryBuilder.must(standBoolQueryBuilder);
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder);
|
||||
//在结果中检索
|
||||
if (StringUtils.isNotEmpty(searchInfoEO.getResultKeyword()) && StringUtils.isNotBlank(searchInfoEO.getIsHigh())) {
|
||||
QueryBuilder multiQuery = queryInResult(searchInfoEO);
|
||||
boolQueryBuilder.must(multiQuery);
|
||||
}
|
||||
result = countStandSearchResult(searchRequestBuilder,searchInfoEO);
|
||||
boolQueryBuilder1 = queryStandMsg(searchInfoEO,boolQueryMust,searchRequestBuilder);
|
||||
} else if(searchInfoEO.getSelectIndex().equals("laws")){
|
||||
BoolQueryBuilder lawsBoolQueryBuilder = queryLawsMsg(searchInfoEO,boolQueryMust,searchRequestBuilder);
|
||||
boolQueryBuilder.must(lawsBoolQueryBuilder);
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder);
|
||||
//在结果中检索
|
||||
if (StringUtils.isNotEmpty(searchInfoEO.getResultKeyword()) && StringUtils.isNotBlank(searchInfoEO.getIsHigh())) {
|
||||
QueryBuilder multiQuery = queryInResult(searchInfoEO);
|
||||
boolQueryBuilder.must(multiQuery);
|
||||
}
|
||||
// 获取查询到的结果
|
||||
result = countStandSearchResult(searchRequestBuilder,searchInfoEO);
|
||||
boolQueryBuilder1 = queryLawsMsg(searchInfoEO,boolQueryMust,searchRequestBuilder);
|
||||
} else if(searchInfoEO.getSelectIndex().equals("bussstand")){
|
||||
BoolQueryBuilder bussstandBoolQueryBuilder = queryBussStandMsg(searchInfoEO,boolQueryMust,searchRequestBuilder);
|
||||
boolQueryBuilder.must(bussstandBoolQueryBuilder);
|
||||
boolQueryBuilder1 = queryBussStandMsg(searchInfoEO,boolQueryMust,searchRequestBuilder);
|
||||
}
|
||||
|
||||
if(boolQueryBuilder1!=null){
|
||||
boolQueryBuilder.must(boolQueryBuilder1);
|
||||
searchRequestBuilder.setQuery(boolQueryBuilder);
|
||||
//在结果中检索
|
||||
if (StringUtils.isNotEmpty(searchInfoEO.getResultKeyword()) && StringUtils.isNotBlank(searchInfoEO.getIsHigh())) {
|
||||
@@ -153,6 +139,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
// 获取查询到的结果
|
||||
result = countStandSearchResult(searchRequestBuilder,searchInfoEO);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -278,7 +265,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (StringUtil.isNotBlank(field) && StringUtil.isNotBlank(value)) {
|
||||
if (StringUtils.isNotBlank(field) && StringUtils.isNotBlank(value)) {
|
||||
String type = searchVO.getType();
|
||||
String connect = searchVO.getConnect();
|
||||
if ("stand_name".equals(field) || "laws_name".equals(field)) {
|
||||
@@ -368,12 +355,12 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
public BoolQueryBuilder queryStandMsg(SeniorSearchInfoEO searchInfoEO, BoolQueryBuilder boolQueryBuilder, SearchRequestBuilder searchRequestBuilder) throws Exception{
|
||||
String nameshowStr = "nameshow";
|
||||
// 高级搜索项,只针对标准
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandType())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandType())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("standType", searchInfoEO.getStandType()));
|
||||
}
|
||||
//标准类别,国内外标准有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandSort())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandSort())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getStandSort().equals("all") && !searchInfoEO.getStandSort().equals("[]")) {
|
||||
String[] arrlist = searchInfoEO.getStandSort().split(",");
|
||||
@@ -382,51 +369,51 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
}
|
||||
//编号,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandNumber())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandNumber())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standNumber", "*"+searchInfoEO.getStandNumber()+"*"));
|
||||
}
|
||||
//标准年份
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandYear())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandYear())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("standYear", searchInfoEO.getStandYear()));
|
||||
}
|
||||
//名称,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getNameShow())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getNameShow())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery(nameshowStr, "*"+searchInfoEO.getNameShow()+"*"));
|
||||
}
|
||||
//标准英文名称
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandEnName())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandEnName())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("standEnName", searchInfoEO.getStandEnName()));
|
||||
}
|
||||
//标准状态,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandState())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandState())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getStandState().equals("all") && !searchInfoEO.getStandState().equals("[]") ) {
|
||||
String[] arrlist = searchInfoEO.getStandState().split(",");
|
||||
boolQueryBuilder.must(QueryBuilders.termsQuery("statecode.keyword", arrlist));
|
||||
}
|
||||
}
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getCLLX())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getCLLX())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getCLLX().equals("all") && !searchInfoEO.getCLLX().equals("[]") ) {
|
||||
String[] arrlist = searchInfoEO.getCLLX().split(",");
|
||||
boolQueryBuilder.must(QueryBuilders.termsQuery("CLLX.keyword", arrlist));
|
||||
}
|
||||
}
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getCYSD())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getCYSD())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getCYSD().equals("all") && !searchInfoEO.getCYSD().equals("[]") ) {
|
||||
String[] arrlist = searchInfoEO.getCYSD().split(",");
|
||||
boolQueryBuilder.must(QueryBuilders.termsQuery("CYSD.keyword", arrlist));
|
||||
}
|
||||
}
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getCBCD())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getCBCD())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getCBCD().equals("all") && !searchInfoEO.getCBCD().equals("[]") ) {
|
||||
String[] arrlist = searchInfoEO.getCBCD().split(",");
|
||||
boolQueryBuilder.must(QueryBuilders.termsQuery("CBCD.keyword", arrlist));
|
||||
}
|
||||
}
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getZRLX())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getZRLX())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getZRLX().equals("all") && !searchInfoEO.getZRLX().equals("[]") ) {
|
||||
String[] arrlist = searchInfoEO.getZRLX().split(",");
|
||||
@@ -444,7 +431,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
String replacedStandNumStr = "replaced_stand_num";
|
||||
String replaceStandNumStr = "replace_stand_num";
|
||||
//国家,国内外标准,国内外法规有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getCountry())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getCountry())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getCountry().equals("all") && !searchInfoEO.getCountry().equals("[]")) {
|
||||
// String[] arrlist = searchInfoEO.getCountry().split(",");
|
||||
@@ -453,35 +440,35 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
}
|
||||
//标准性质,国内外标准,法规有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getNature())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getNature())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getNature().equals("all") && !searchInfoEO.getNature().equals("[]")) {
|
||||
String[] arrlist = searchInfoEO.getNature().split(",");
|
||||
boolQueryBuilder.must(QueryBuilders.termsQuery("nature.keyword", arrlist));
|
||||
}
|
||||
}
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getSYCLLX())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getSYCLLX())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getSYCLLX().equals("all") && !searchInfoEO.getSYCLLX().equals("[]") ) {
|
||||
String[] arrlist = searchInfoEO.getSYCLLX().split(",");
|
||||
boolQueryBuilder.must(QueryBuilders.termsQuery("SYCLLX.keyword", arrlist));
|
||||
}
|
||||
}
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getWSSFCY())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getWSSFCY())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getWSSFCY().equals("all") && !searchInfoEO.getWSSFCY().equals("[]") ) {
|
||||
String[] arrlist = searchInfoEO.getWSSFCY().split(",");
|
||||
boolQueryBuilder.must(QueryBuilders.termsQuery("WSSFCY.keyword", arrlist));
|
||||
}
|
||||
}
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getCBCD())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getCBCD())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getCBCD().equals("all") && !searchInfoEO.getCBCD().equals("[]") ) {
|
||||
String[] arrlist = searchInfoEO.getCBCD().split(",");
|
||||
boolQueryBuilder.must(QueryBuilders.termsQuery("CBCD.keyword", arrlist));
|
||||
}
|
||||
}
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getZRLX())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getZRLX())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getZRLX().equals("all") && !searchInfoEO.getZRLX().equals("[]") ) {
|
||||
String[] arrlist = searchInfoEO.getZRLX().split(",");
|
||||
@@ -489,19 +476,19 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
}
|
||||
//编号,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getNumberShow())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getNumberShow())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery(numbershowStr, "*"+searchInfoEO.getNumberShow()+"*"));
|
||||
}
|
||||
//名称,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getNameShow())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getNameShow())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery(nameshowStr, "*"+searchInfoEO.getNameShow()+"*"));
|
||||
}
|
||||
//发布部门
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getIssueUnit())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getIssueUnit())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("issueUnit", searchInfoEO.getIssueUnit()));
|
||||
}
|
||||
//文件状态,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandState())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandState())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getStandState().equals("all") && !searchInfoEO.getStandState().equals("[]")) {
|
||||
String[] arrlist = searchInfoEO.getStandState().split(",");
|
||||
@@ -510,32 +497,32 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
}
|
||||
//代替文件号
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getReplaceStandNum())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getReplaceStandNum())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("replace_laws_num", searchInfoEO.getReplaceStandNum()));
|
||||
}
|
||||
//适用车型,国内外标准,国内外法规,企业标准 有此属性 录入可多选
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getApplyArctic())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getApplyArctic())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getApplyArctic().equals("all") && !searchInfoEO.getApplyArctic().equals("[]")) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("apply_arctic", searchInfoEO.getApplyArctic()));
|
||||
}
|
||||
}
|
||||
//能源种类,国内外标准,国内外法规,企业标准 有此属性 录入可多选
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getEnergyKind())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getEnergyKind())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getEnergyKind().equals("all") && !searchInfoEO.getEnergyKind().equals("[]") ) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("energy_kind", searchInfoEO.getEnergyKind()));
|
||||
}
|
||||
}
|
||||
//适用认证,国内外标准,国内外法规 有此属性 录入可多选
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getApplyAuth())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getApplyAuth())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getApplyAuth().equals("all") && !searchInfoEO.getApplyAuth().equals("[]")) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("apply_auth", searchInfoEO.getApplyAuth()));
|
||||
}
|
||||
}
|
||||
//责任部门
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getResponsibleUnit())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getResponsibleUnit())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("responsibleUnit", searchInfoEO.getResponsibleUnit()));
|
||||
}
|
||||
//发布日期
|
||||
@@ -553,11 +540,11 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
boolQueryBuilder.filter(rangeQueryBuilder);
|
||||
}
|
||||
//内容摘要
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getSynopsis())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getSynopsis())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("synopsis", searchInfoEO.getSynopsis()));
|
||||
}
|
||||
//标准英文名称
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandEnName())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandEnName())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("standEnName", searchInfoEO.getStandEnName()));
|
||||
}
|
||||
//新定型车实施日期
|
||||
@@ -589,15 +576,15 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
boolQueryBuilder.filter(rangeQueryBuilder);
|
||||
}
|
||||
//被代替标准号
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getReplacedStandNum())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getReplacedStandNum())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery(replacedStandNumStr, searchInfoEO.getReplacedStandNum()));
|
||||
}
|
||||
//关键词
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getTags())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getTags())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("standTag", searchInfoEO.getTags()));
|
||||
}
|
||||
//所属类别,国内外标准, 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getCategory())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getCategory())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getCategory().equals("all") && !searchInfoEO.getCategory().equals("[]")) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("category", searchInfoEO.getCategory()));
|
||||
@@ -652,38 +639,38 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
String replaceStandNumStr = "replace_stand_num";
|
||||
// 高级搜索项,只针对标准
|
||||
//分类代号
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getClassifyCode())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getClassifyCode())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("classifyCode", searchInfoEO.getClassifyCode()));
|
||||
}
|
||||
//编号,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandNumber())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandNumber())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("standNumber", "*"+searchInfoEO.getStandNumber()+"*"));
|
||||
}
|
||||
//名称,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getNameShow())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getNameShow())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery(nameshowStr, "*"+searchInfoEO.getNameShow()+"*"));
|
||||
}
|
||||
//标准英文名称
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandEnName())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandEnName())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("standEnName", searchInfoEO.getStandEnName()));
|
||||
}
|
||||
if (searchInfoEO.getPutYear() != null && StringUtils.isNotEmpty(searchInfoEO.getPutYear())) {
|
||||
boolQueryBuilder.must(QueryBuilders.wildcardQuery("putYear", "*"+searchInfoEO.getPutYear()+"*"));
|
||||
}
|
||||
//代替标准号
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getReplaceStandNum())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getReplaceStandNum())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery(replaceStandNumStr, searchInfoEO.getReplaceStandNum()));
|
||||
}
|
||||
//主起草部门
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getZQCBM())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getZQCBM())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("ZQCBM", searchInfoEO.getZQCBM()));
|
||||
}
|
||||
//被代替标准号
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getReplacedStandNum())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getReplacedStandNum())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery(replacedStandNumStr, searchInfoEO.getReplacedStandNum()));
|
||||
}
|
||||
//标准状态,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandState())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandState())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getStandState().equals("all") && !searchInfoEO.getStandState().equals("[]")) {
|
||||
String[] arrlist = searchInfoEO.getStandState().split(",");
|
||||
@@ -706,7 +693,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
boolQueryBuilder.filter(rangeQueryBuilder);
|
||||
}
|
||||
//国家,国内外标准,国内外法规有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getCountry())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getCountry())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getCountry().equals("all") && !searchInfoEO.getCountry().equals("[]") ) {
|
||||
String[] arrlist = searchInfoEO.getCountry().split(",");
|
||||
@@ -714,7 +701,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
}
|
||||
//标准类别,国内外标准有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandSort())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandSort())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getStandSort().equals("all")&& !searchInfoEO.getStandSort().equals("[]")) {
|
||||
String[] arrlist = searchInfoEO.getStandSort().split(",");
|
||||
@@ -913,7 +900,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
String nameshowStr = "nameshow";
|
||||
String replacedStandNumStr = "replaced_stand_num";
|
||||
String replaceStandNumStr = "replace_stand_num";
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectKey())){
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectKey())){
|
||||
switch (searchInfoEO.getSelectKey()){
|
||||
// 修改过后,前台不会传 all
|
||||
case "all":
|
||||
@@ -926,19 +913,19 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
case "standNumber":
|
||||
case "lawsNumber":
|
||||
case "bussstandsNumber":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())){
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())){
|
||||
boolQueryBuilder.must(QueryBuilders.matchPhraseQuery(numbershowStr,searchInfoEO.getSelectValue()));
|
||||
}
|
||||
break;
|
||||
case "standName":
|
||||
case "lawsName":
|
||||
case "bussstandName":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery(nameshowStr, searchInfoEO.getSelectValue()));
|
||||
}
|
||||
break;
|
||||
case "standState":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("standstateshow", searchInfoEO.getSelectValue()));
|
||||
}
|
||||
break;
|
||||
@@ -946,44 +933,44 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
//标准正文 暂缺
|
||||
break;
|
||||
case "applyArctic":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("applyarcticshow", searchInfoEO.getSelectValue()));
|
||||
}
|
||||
break;
|
||||
case "issueTime":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
RangeQueryBuilder rangeQueryBuilder = QueryBuilders.rangeQuery(ISSUE_TIME).format(EPOCH_MILLIS).from(searchInfoEO.getSelectStartTime().getTime()).to(searchInfoEO.getSelectEndTime().getTime()).includeLower(true).includeUpper(true);
|
||||
boolQueryBuilder.filter(rangeQueryBuilder);
|
||||
}
|
||||
break;
|
||||
case "putTime":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
RangeQueryBuilder rangeQueryBuilders = QueryBuilders.rangeQuery("put_time").format(EPOCH_MILLIS).from(searchInfoEO.getSelectStartTime().getTime()).to(searchInfoEO.getSelectEndTime().getTime()).includeLower(true).includeUpper(true);
|
||||
boolQueryBuilder.filter(rangeQueryBuilders);
|
||||
}
|
||||
break;
|
||||
case "draftUser":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("draft_user", searchInfoEO.getSelectValue()));
|
||||
}
|
||||
break;
|
||||
case "draftingUnit":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("drafting_unit", searchInfoEO.getSelectValue()));
|
||||
}
|
||||
break;
|
||||
case "replaceStandNum":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery(replaceStandNumStr, searchInfoEO.getSelectValue()));
|
||||
}
|
||||
break;
|
||||
case "replacedStandNum":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery(replacedStandNumStr, searchInfoEO.getSelectValue()));
|
||||
}
|
||||
break;
|
||||
case "msgTitle":
|
||||
if(StringUtil.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("title", searchInfoEO.getSelectValue()));
|
||||
}
|
||||
break;
|
||||
@@ -999,7 +986,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
if(searchInfoEO.getSelectIndex().equals("stand")) {
|
||||
// 高级搜索项,只针对标准
|
||||
//标准性质,国内外标准,法规有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getNature())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getNature())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getNature().equals("all") && !searchInfoEO.getNature().equals("[]")) {
|
||||
String[] arrlist = searchInfoEO.getNature().split(",");
|
||||
@@ -1007,7 +994,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
}
|
||||
//国家,国内外标准,国内外法规有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getCountry())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getCountry())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getCountry().equals("all") && !searchInfoEO.getCountry().equals("[]")) {
|
||||
String[] arrlist = searchInfoEO.getCountry().split(",");
|
||||
@@ -1015,7 +1002,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
}
|
||||
//标准类别,国内外标准有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandSort())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandSort())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getStandSort().equals("all") && !searchInfoEO.getStandSort().equals("[]")) {
|
||||
String[] arrlist = searchInfoEO.getStandSort().split(",");
|
||||
@@ -1023,15 +1010,15 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
}
|
||||
//编号,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getNumberShow())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getNumberShow())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery(numbershowStr, searchInfoEO.getNumberShow()));
|
||||
}
|
||||
//名称,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getNameShow())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getNameShow())) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery(nameshowStr, searchInfoEO.getNameShow()));
|
||||
}
|
||||
//适用认证,国内外标准,国内外法规,企业标准 有此属性 录入可多选
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getApplyArctic())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getApplyArctic())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getApplyArctic().equals("all") && !searchInfoEO.getApplyArctic().equals("[]")) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("apply_arctic", searchInfoEO.getApplyArctic()));
|
||||
@@ -1039,28 +1026,28 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
|
||||
//认证类型,国内外标准,国内外法规 有此属性 录入可多选
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getApplyAuth())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getApplyAuth())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getApplyAuth().equals("all") && !searchInfoEO.getApplyAuth().equals("[]")) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("apply_auth", searchInfoEO.getApplyAuth()));
|
||||
}
|
||||
}
|
||||
//所属类别,国内外标准, 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getCategory())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getCategory())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getCategory().equals("all") && !searchInfoEO.getCategory().equals("[]")) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("category", searchInfoEO.getCategory()));
|
||||
}
|
||||
}
|
||||
//能源种类,国内外标准,国内外法规,企业标准 有此属性 录入可多选
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getEnergyKind())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getEnergyKind())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getEnergyKind().equals("all") && !searchInfoEO.getEnergyKind().equals("[]")) {
|
||||
boolQueryBuilder.must(QueryBuilders.matchQuery("energy_kind", searchInfoEO.getEnergyKind()));
|
||||
}
|
||||
}
|
||||
//采标程度,国内外标准, 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getAdoptExtent())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getAdoptExtent())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getAdoptExtent().equals("all") && !searchInfoEO.getAdoptExtent().equals("[]")) {
|
||||
/*String[] arrlist = searchInfoEO.getAdoptExtent().split(",");
|
||||
@@ -1069,7 +1056,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
}
|
||||
}
|
||||
//标准状态,国内外标准,国内外法规,企业标准 有此属性
|
||||
if (StringUtil.isNotBlank(searchInfoEO.getStandState())) {
|
||||
if (StringUtils.isNotBlank(searchInfoEO.getStandState())) {
|
||||
// 如果等于All,相当于不限制,查询全部
|
||||
if (!searchInfoEO.getStandState().equals("all") && !searchInfoEO.getStandState().equals("[]")) {
|
||||
/*String[] arrlist = searchInfoEO.getStandState().split(",");
|
||||
|
||||
+2
-2
@@ -4,10 +4,10 @@ import com.adc.da.search.entity.FullTextSearchEO;
|
||||
import com.adc.da.search.entity.StandLawsEO;
|
||||
import com.adc.da.search.service.ElasticsearchService;
|
||||
import com.adc.da.search.service.StandLawsSearchService;
|
||||
import com.adc.da.util.utils.DateUtils;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.adc.da.util.DateUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.elasticsearch.client.transport.TransportClient;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
Reference in New Issue
Block a user