Commit aad96e60 by 王悦

fix

parent 8f561376
...@@ -6,7 +6,6 @@ const CtlBase = require("../../ctl.base"); ...@@ -6,7 +6,6 @@ const CtlBase = require("../../ctl.base");
const logCtl = system.getObject("web.common.oplogCtl"); const logCtl = system.getObject("web.common.oplogCtl");
const tmtransactionPath = "/api/action/tmQuery/springBoard"; const tmtransactionPath = "/api/action/tmQuery/springBoard";
const tmurl = settings.channelApiUrl() + tmtransactionPath; const tmurl = settings.channelApiUrl() + tmtransactionPath;
//标源检索 //标源检索
class searchCtl extends CtlBase { class searchCtl extends CtlBase {
constructor() { constructor() {
...@@ -25,43 +24,37 @@ class searchCtl extends CtlBase { ...@@ -25,43 +24,37 @@ class searchCtl extends CtlBase {
* {"error": ""} * {"error": ""}
*/ */
async findAndCountAll(p, q, req) { async findAndCountAll(p, q, req) {
let query = { let query = {
"actionType": "", "actionType": "",
"actionBody": { "actionBody": {
pageSize: p.pageInfo.pageSize, pageSize: p.pageInfo.pageSize,
currentPage: p.pageInfo.pageNo, currentPage: p.pageInfo.pageNo,
"tmName": "",//商标名称 "tmName": "",//商标名称
"regMan": "", "regMan": "",
"regNum": "", "regNum": "",
"sqlbtabkey": "",//商标类别 "sqlbtabkey": "",//商标类别
"flzttabkey": "",//法律状态 "flzttabkey": "",//法律状态
"sqnftabkey": "",//申请年份 "sqnftabkey": "",//申请年份
"ncl": [],//尼斯大类 "ncl": [],//尼斯大类
"xcl": [],//尼斯群组 "xcl": [],//尼斯群组
"nclNum": [],//尼斯大类 "nclNum": [],//尼斯大类
} }
}; };
if (Object.keys(p.search).length > 0) { if (Object.keys(p.search).length > 0) {
if (p.search.sbzch) {//注册号查询 if (p.search.sbzch) {//注册号查询
query.actionType = "findTrademarkzchAccurate"; query.actionType = "findTrademarkzchAccurate";
query.actionBody.regNum = p.search.sbzch query.actionBody.regNum = p.search.sbzch
} else if (p.search.zcren) {//申请人查询 } else if (p.search.zcren) {//申请人查询
query.actionType = "findTrademarkzcr"; query.actionType = "findTrademarkzcr";
query.actionBody.regMan = p.search.zcren query.actionBody.regMan = p.search.zcren
} else if (p.search.sbmc) {//商标名称查询 } else if (p.search.sbmc) {//商标名称查询
query.actionType = "findTrademarkNameAccurate"; query.actionType = "findTrademarkNameAccurate";
query.actionBody.tmName = p.search.sbmc query.actionBody.tmName = p.search.sbmc
} }
} else return; } else return;
let tokenInfo = await this.service.getToken();
let tokenInfo = await this.service.getToken();
try {
let rtn = await this.execClient.execPostTK(query, tmurl, tokenInfo.data.token); let rtn = await this.execClient.execPostTK(query, tmurl, tokenInfo.data.token);
let data = rtn.data; let data = rtn.data;
} catch (e) {
return system.getResultFail(-8, e)
}
try {
let published = await this.service.findAll({company_id: p.company_id}); let published = await this.service.findAll({company_id: p.company_id});
data.rows.forEach(item => { data.rows.forEach(item => {
for (let t of published) { for (let t of published) {
...@@ -70,9 +63,6 @@ class searchCtl extends CtlBase { ...@@ -70,9 +63,6 @@ class searchCtl extends CtlBase {
} }
}); });
return system.getResultList(data.count, data.rows) return system.getResultList(data.count, data.rows)
} catch (e) {
return system.getResultFail(-9, e)
}
} }
} }
......
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