Commit 3e975747 by 高宇强

gyq

parent 526a5022
......@@ -1302,8 +1302,11 @@ auther:sy
res.data = [];
if (j.hits.total > 0) {
res.total = j.hits.total;
for (var x in j.hits.hits) {
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......@@ -1339,24 +1342,37 @@ auther:sy
}
},
"_source": [
"filing_name",
"pub_status_now",
"filing_no",
"pub_type",
"filing_time",
"pub_no",
"gr_time",
"gr_no",
"pub_time",
"pub_no",
"agency_code",
"agency_name",
"agent_name1",
"agent_name2",
"applicant_name",
"inventor_name",
"country_code",
"appl_zip",
"appl_address",
"main_ipc",
"abstr_text",
"pub_type"
"filing_name",
"pub_status",
"pub_status_now",
"ipc_version",
"other_ipc",
"prior_info",
"pct_info",
"img_path",
"claim_text"
],
"sort": [
{
"filing_date": "desc"
"filing_time": "desc"
}
]
};
......@@ -1371,8 +1387,11 @@ auther:sy
res.data = [];
if (j.hits.total > 0) {
res.total = j.hits.total;
for (var x in j.hits.hits) {
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......
......@@ -148,8 +148,11 @@ class CopyRightSearchApi extends ApiBase {
res.data = [];
if (j.hits.total >0){
res.total = j.hits.total;
for (var x in j.hits.hits){
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......@@ -224,8 +227,11 @@ class CopyRightSearchApi extends ApiBase {
res.data = [];
if (j.hits.total >0){
res.total = j.hits.total;
for (var x in j.hits.hits){
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......@@ -347,8 +353,11 @@ auther:sy
res.data = [];
if (j.hits.total >0){
res.total = j.hits.total;
for (var x in j.hits.hits){
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......@@ -422,8 +431,11 @@ auther:sy
res.data = [];
if (j.hits.total >0){
res.total = j.hits.total;
for (var x in j.hits.hits){
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......
......@@ -94,8 +94,11 @@ class EnterpriseService {
res.data = [];
if (j.hits.total > 0) {
res.total = j.hits.total;
for (var x in j.hits.hits) {
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......@@ -235,8 +238,11 @@ class EnterpriseService {
res.data = [];
if (j.hits.total > 0) {
res.total = j.hits.total;
for (var x in j.hits.hits) {
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......@@ -283,8 +289,11 @@ class EnterpriseService {
res.data = [];
if (j.hits.total > 0) {
res.total = j.hits.total;
for (var x in j.aggregations.group_by_licence.buckets) {
res.data.push(j.aggregations.group_by_licence.buckets[x]);
for (let index = 0; index < j.aggregations.group_by_licence.buckets.length; index++) {
const element = j.aggregations.group_by_licence.buckets[index];
if (element) {
res.data.push(element);
}
}
}
return System.getResult2(res, null);
......@@ -351,8 +360,11 @@ class EnterpriseService {
res.data = [];
if (j.hits.total > 0) {
res.total = j.hits.total;
for (var x in j.hits.hits) {
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......@@ -428,8 +440,11 @@ class EnterpriseService {
res.data = [];
if (j.hits.total > 0) {
res.total = j.hits.total;
for (var x in j.hits.hits) {
res.data.push(j.hits.hits[x]["_source"]);
for (let index = 0; index < j.hits.hits.length; index++) {
const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
}
}
return System.getResult2(res, null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment