Commit 5399ea51 by 张云飞

zyf

parent c6773883
......@@ -419,6 +419,21 @@ class ToolApi extends ApiBase {
return {};
}
}
//商标尼斯小项查询过滤
async getTmNclFilterSearch(pobj,o, req) {
var appkey = this.appKeyStr;
var data = {
appKey: appkey,
nclOneCodes: pobj.nclOneCodes,
nclSmallCodes: pobj.nclSmallCodes,
};
var ncllist = await this.gsbSearchApi.tmnclfiltersearch(data);
if (ncllist.status == 0) {
return ncllist;
} else {
return {};
}
}
async getCropperPic(qobj, obj, req) {
var that = this;
......
......@@ -1112,7 +1112,7 @@ class GsbIcSearchApi extends ApiBase {
return { status: -1, msg: "操作失败", data: null };
}
};
async companymgetsearch(obj) {
var self = this;
......
......@@ -28,7 +28,7 @@ class GsbTmSearchApi extends ApiBase {
};
async xzSearch(obj) {//续展查询-ok
var self = this;
var type = obj.searchType;
if (type == "" || type == null) {
return System.getResult2(null, null);
......@@ -168,7 +168,7 @@ class GsbTmSearchApi extends ApiBase {
}
};
async xzallSearch(obj) {//公司商机
var companyName = obj.companyName == null ? "" : obj.companyName;
var addr = obj.address == null ? "" : obj.address;
var pagesize = obj.pageSize == null ? 15 : obj.pageSize;
......@@ -253,7 +253,7 @@ class GsbTmSearchApi extends ApiBase {
};
async xzSearchDetail(obj) {//续展详情查询
var type = obj.searchType;
if (type == "" || type == null) {
return System.getResult2(null, null);
......@@ -334,7 +334,7 @@ class GsbTmSearchApi extends ApiBase {
};
async yySearchDetail(obj) {//异议详情查询-???
if (obj.companyName == null && obj.companyName == "") {
return System.getResult2(null, null);
}
......@@ -410,7 +410,7 @@ class GsbTmSearchApi extends ApiBase {
}
};
async byslSearch(obj) {//不予受理查询-???
var companyName = obj.companyName == null ? "" : obj.companyName;
var pagesize = obj.pageSize == null ? 15 : obj.pageSize;
if (obj.currentPage == null) {
......@@ -467,7 +467,7 @@ class GsbTmSearchApi extends ApiBase {
}
};
async byslDetail(obj) {//不予受理详情查询-???
if (obj.companyName == null && obj.companyName == "") {
return System.getResult2(null, null);
}
......@@ -524,7 +524,7 @@ class GsbTmSearchApi extends ApiBase {
};
async tmSearch(obj) {//商标查询-ok
var param = {
tm_name: obj.tmName,
reg_num: obj.regNum,
......@@ -536,7 +536,7 @@ class GsbTmSearchApi extends ApiBase {
};
async tmAccurateSearch(obj) {//根据商标名称进行精准查询
var tmName = obj.tmName == null ? "" : obj.tmName;
var sqlbtabkey = obj.sqlbtabkey == null ? "" : obj.sqlbtabkey;
var pagesize = obj.pagesize == null ? 15 : obj.pagesize;
......@@ -609,7 +609,7 @@ class GsbTmSearchApi extends ApiBase {
}
};
async tmAccurateJuheSearch(obj) {//根据商标名称精准查询,对查询结果进行类别聚合
var tmName = obj.tmName == null ? "" : obj.tmName;
if (tmName == "") {
......@@ -647,7 +647,7 @@ class GsbTmSearchApi extends ApiBase {
};
async tmNameSearch(obj) {//根据商标名称模糊查询
var tmName = obj.tmName == null ? "" : obj.tmName;
var sqlbtabkey = obj.sqlbtabkey == null ? "" : obj.sqlbtabkey;
var pagesize = obj.pagesize == null ? 15 : obj.pagesize;
......@@ -721,7 +721,7 @@ class GsbTmSearchApi extends ApiBase {
};
async tmNamejuheSearch(obj) {//根据商标名称模糊查询,对查询结果进行类别聚合
var tmName = obj.tmName == null ? "" : obj.tmName;
if (tmName == "") {
......@@ -759,7 +759,7 @@ class GsbTmSearchApi extends ApiBase {
};
async tmzchSearch(obj) {//根据商标商标号精准查询
var regNum = obj.regNum == null ? "" : obj.regNum;
var sqlbtabkey = obj.sqlbtabkey == null ? "" : obj.sqlbtabkey;
var pagesize = obj.pagesize == null ? 15 : obj.pagesize;
......@@ -833,7 +833,7 @@ class GsbTmSearchApi extends ApiBase {
};
async tmzchjuheSearch(obj) {//根据商标商标号精准查询,对查询结果进行类别聚合
var regNum = obj.regNum == null ? "" : obj.regNum;
if (regNum == "") {
......@@ -871,7 +871,7 @@ class GsbTmSearchApi extends ApiBase {
};
async tmzcrSearch(obj) {//根据商标注册人模糊查询
var applier = obj.applier == null ? "" : obj.applier;
var sqlbtabkey = obj.sqlbtabkey == null ? "" : obj.sqlbtabkey;
var pagesize = obj.pagesize == null ? 15 : obj.pagesize;
......@@ -945,7 +945,7 @@ class GsbTmSearchApi extends ApiBase {
};
async tmzcrjuheSearch(obj) {//根据商标注册人模糊查询,对查询结果进行类别聚合
var applier = obj.applier == null ? "" : obj.applier;
if (applier == "") {
......@@ -984,7 +984,7 @@ class GsbTmSearchApi extends ApiBase {
async tmSearchByRegNum(obj) {//商标查询(多注册号)-ok
var reqUrl = this.tmSearchUrl;
if (obj.regNums == null || obj.regNums.length < 1) {
return System.getResult2(null, null);
}
......@@ -1058,7 +1058,7 @@ class GsbTmSearchApi extends ApiBase {
};
async getTmFlow(obj) {//商标流程
var param = {
reg_num: obj.regNum
}
......@@ -1066,7 +1066,7 @@ class GsbTmSearchApi extends ApiBase {
}
async getTmNclSmallCodes(obj) {//商标小类
var param = {
reg_num: obj.regNum,
nclone_code: obj.nclOneCode
......@@ -1075,7 +1075,7 @@ class GsbTmSearchApi extends ApiBase {
}
async getNcl(obj) {//尼斯数据
var nclcode = obj.nclcode == null ? "" : obj.nclcode;
var level = obj.level == null ? "" : obj.level;
var nclcodelist = obj.nclcodelist || null;
......@@ -1150,7 +1150,7 @@ class GsbTmSearchApi extends ApiBase {
};
async getNclByLikeName_new(obj) {//尼斯数据
var ncls = obj.ncls || null;
var name = obj.name;
var reqUrl = this.nclUrl;
......@@ -1359,7 +1359,7 @@ class GsbTmSearchApi extends ApiBase {
}
}
async getNclByLikeName(obj) {//尼斯数据
var ncls = obj.ncls || null;
var name = obj.name;
var reqUrl = this.nclUrl;
......@@ -1550,7 +1550,7 @@ class GsbTmSearchApi extends ApiBase {
return tmpParams;
}
async imagesearch(obj) {//图像检索结果进行查询
var tmRegistNum = obj.tmRegistNum == null ? "" : obj.tmRegistNum;
var sqlbtabkey = obj.sqlbtabkey == null ? "" : obj.sqlbtabkey;
if (tmRegistNum == "" && tmRegistNum == null) {
......@@ -1614,7 +1614,7 @@ class GsbTmSearchApi extends ApiBase {
}
}
async imagesearchbycode(obj) {//图像检索结果进行分类查询
var tmRegistNumsAll = obj.tmRegistNumsAll == null ? "" : obj.tmRegistNumsAll;
var sqlbtabkey = obj.sqlbtabkey == null ? "" : obj.sqlbtabkey;
var pagesize = obj.pagesize == null ? 15 : obj.pagesize;
......@@ -1767,7 +1767,7 @@ class GsbTmSearchApi extends ApiBase {
}
}
async getAgencyName(obj) {//代理机构名称查询
var companyName = obj.companyName == null ? "" : obj.companyName;
companyName = await this.getConvertSemiangleStr(companyName);
var pageSize = obj.pageSize == null ? 15 : obj.pageSize;
......@@ -1806,6 +1806,76 @@ class GsbTmSearchApi extends ApiBase {
return rtn = System.getResult2(null, null);
}
}
//商标尼斯小项查询过滤
async tmnclfiltersearch(obj) {
var nclOneCodes = obj.nclOneCodes == null ? "" : obj.nclOneCodes;
var nclSmallCodes = obj.nclSmallCodes == [] ? "" : obj.nclSmallCodes;
var reqUrl = this.nclUrl;
var params = {
"query": {
"bool": {
"must": [
{
"term": {
"belong_to_onecode": nclOneCodes
}
},
{
"term": {
"level": 3
}
}
]
}
},
"size": 300,
"_source": [
"code",
"level",
"description",
"name",
"pid",
"belong_to_onecode"
]
};
if (nclSmallCodes.length > 0) {
var namelist = []
for (var k = 0; k < nclSmallCodes.length; k++) {
var c = nclSmallCodes[k];
namelist.push(c.name);
}
var dsl = {
"terms": {
"name.raw": namelist
}
}
params.query.bool.must.push(dsl);
}
var rc = System.getObject("util.execClient");
var rtn = null;
try {
rtn = await rc.execPost(params, reqUrl);
var j = JSON.parse(rtn.stdout);
var sources = [];
var data = {
"nclOneCodes": nclOneCodes,
"nclSmallCodes": sources
};
j.hits.hits.forEach(function (c) {
var source = {
code: c._source.code,
name: c._source.name,
pcode: c._source.pcode
};
sources.push(source);
});
var a = { status: 0, msg: "操作成功", data: data };
return a;
} catch (e) {
return { status: -1, msg: "操作失败", data: null };
}
}
async getConvertSemiangleStr(str) {
var result = "";
......
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