|
@@ -235,7 +235,10 @@ public class MergePersonService extends ServiceImpl<MergePersonMapper, MergePers
|
|
|
dto.setAddress(person.getAddress());
|
|
|
dto.setCountry(person.getCountry());
|
|
|
dto.setRemark(person.getRemark());
|
|
|
+ dto.setAbbreviation(person.getAbbreviation());
|
|
|
dto.setCreateTime(person.getCreateTime());
|
|
|
+ List<String> names = JSONArray.parseArray(person.getMergedName(), String.class);
|
|
|
+ dto.setMergedName(names);
|
|
|
list.add(dto);
|
|
|
}
|
|
|
Records records = new Records();
|
|
@@ -253,16 +256,24 @@ public class MergePersonService extends ServiceImpl<MergePersonMapper, MergePers
|
|
|
Integer pageSize = vo.getPageSize();
|
|
|
Integer type = vo.getType();
|
|
|
String searchCondition = "";
|
|
|
- if (type == 0) {
|
|
|
- searchCondition = searchCondition + "MAT = " + vo.getName();
|
|
|
- } else {
|
|
|
- searchCondition = searchCondition + "MAT = " + vo.getName();
|
|
|
+ if (type == 0 && StringUtils.isNotEmpty(vo.getName())) {
|
|
|
+ searchCondition = searchCondition + "PA = " + vo.getName();
|
|
|
+ } else if (type == 2 && StringUtils.isNotEmpty(vo.getName())){
|
|
|
+ searchCondition = searchCondition + "IN = " + vo.getName();
|
|
|
}
|
|
|
if (taskId != null) {
|
|
|
- searchCondition = "taskId = " + taskId;
|
|
|
+ if (searchCondition != null && !"".equals(searchCondition.trim())) {
|
|
|
+ searchCondition = "taskId = " + taskId + " AND " + searchCondition;
|
|
|
+ } else {
|
|
|
+ searchCondition = "taskId = " + taskId;
|
|
|
+ }
|
|
|
} else {
|
|
|
if (projectId != null) {
|
|
|
- searchCondition = "projectId = " + projectId;
|
|
|
+ if (searchCondition != null && !"".equals(searchCondition.trim())) {
|
|
|
+ searchCondition = "projectId = " + projectId + " AND " + searchCondition;
|
|
|
+ } else {
|
|
|
+ searchCondition = "projectId = " + projectId;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
SearchRequest.Builder builder = new SearchRequest.Builder();
|
|
@@ -273,11 +284,11 @@ public class MergePersonService extends ServiceImpl<MergePersonMapper, MergePers
|
|
|
//格式化检索式
|
|
|
//3. 从es中检索数据
|
|
|
Query q = formatQueryService.EsQueryToQuery((operateNode) tree, "patent");
|
|
|
+ builder.query(q);
|
|
|
//分页
|
|
|
if (pageNum > 0 && pageSize > 0) {
|
|
|
builder.from((pageNum - 1) * pageSize).size(pageSize);
|
|
|
}
|
|
|
- builder.query(q);
|
|
|
SearchResponse<Patent> response = client.search(builder.build(), Patent.class);
|
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
|
long total = response.hits().total().value();
|