|
@@ -284,7 +284,7 @@ public class EsService {
|
|
BeanUtils.copyProperties(patent1, columnDTO);
|
|
BeanUtils.copyProperties(patent1, columnDTO);
|
|
if (projectId != null) {
|
|
if (projectId != null) {
|
|
try {
|
|
try {
|
|
- columnDTO.setMergeApplicant(esPatentService.getMergeApp(projectId,id));
|
|
|
|
|
|
+ columnDTO.setMergeApplicant(esPatentService.getMergeApp(projectId, id));
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
columnDTO.setMergeApplicant(new ArrayList<>());
|
|
columnDTO.setMergeApplicant(new ArrayList<>());
|
|
}
|
|
}
|
|
@@ -317,7 +317,7 @@ public class EsService {
|
|
BeanUtils.copyProperties(esMess, columnDTO);
|
|
BeanUtils.copyProperties(esMess, columnDTO);
|
|
if (projectId != null) {
|
|
if (projectId != null) {
|
|
try {
|
|
try {
|
|
- columnDTO.setMergeApplicant(esPatentService.getMergeApp(projectId,id));
|
|
|
|
|
|
+ columnDTO.setMergeApplicant(esPatentService.getMergeApp(projectId, id));
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
columnDTO.setMergeApplicant(new ArrayList<>());
|
|
columnDTO.setMergeApplicant(new ArrayList<>());
|
|
}
|
|
}
|
|
@@ -493,6 +493,7 @@ public class EsService {
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
//更新patent
|
|
//更新patent
|
|
public Integer updatePatentById(Patent patent, String id) {
|
|
public Integer updatePatentById(Patent patent, String id) {
|
|
UpdateRequest<Patent, Patent> req;
|
|
UpdateRequest<Patent, Patent> req;
|
|
@@ -827,7 +828,7 @@ public class EsService {
|
|
req = UpdateRequest.of(
|
|
req = UpdateRequest.of(
|
|
b -> b.index("legal_event")
|
|
b -> b.index("legal_event")
|
|
.id(id)
|
|
.id(id)
|
|
- .doc(legalEvent)
|
|
|
|
|
|
+ .doc(legalEvent).refresh(Refresh.True).waitForActiveShards(WaitForActiveShards.of(i -> i.count(1)))
|
|
);
|
|
);
|
|
try {
|
|
try {
|
|
client.update(req, LegalEvent.class);
|
|
client.update(req, LegalEvent.class);
|
|
@@ -847,7 +848,7 @@ public class EsService {
|
|
public String addLegalEvent(LegalEvent legalEvent) throws Exception {
|
|
public String addLegalEvent(LegalEvent legalEvent) throws Exception {
|
|
IndexResponse indexResponse = client.index(i -> i
|
|
IndexResponse indexResponse = client.index(i -> i
|
|
.index("legal_event")
|
|
.index("legal_event")
|
|
- .document(legalEvent)
|
|
|
|
|
|
+ .document(legalEvent).refresh(Refresh.True).waitForActiveShards(WaitForActiveShards.of(t -> t.count(1)))
|
|
);
|
|
);
|
|
return indexResponse.id();
|
|
return indexResponse.id();
|
|
|
|
|
|
@@ -1038,7 +1039,7 @@ public class EsService {
|
|
legalEvent1.setDescription(item.getLegalStatusInfo());
|
|
legalEvent1.setDescription(item.getLegalStatusInfo());
|
|
legalEvent1.setName(item.getLegalStatus());
|
|
legalEvent1.setName(item.getLegalStatus());
|
|
try {
|
|
try {
|
|
- String reId =this.addLegalEvent(legalEvent1);
|
|
|
|
|
|
+ String reId = this.addLegalEvent(legalEvent1);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw new XiaoShiException(e.getMessage());
|
|
throw new XiaoShiException(e.getMessage());
|
|
}
|
|
}
|