Commit bebbf222 by 王悦

fix

parent 4ca345c2
...@@ -6,6 +6,7 @@ const CtlBase = require("../../ctl.base"); ...@@ -6,6 +6,7 @@ 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() {
...@@ -24,50 +25,51 @@ class searchCtl extends CtlBase { ...@@ -24,50 +25,51 @@ class searchCtl extends CtlBase {
* {"error": ""} * {"error": ""}
*/ */
async findAndCountAll(p, q, req) { async findAndCountAll(p, q, req) {
try { let query = {
"actionType": "",
let query = { "actionBody": {
"actionType": "", pageSize: p.pageInfo.pageSize,
"actionBody": { currentPage: p.pageInfo.pageNo,
pageSize: p.pageInfo.pageSize, "tmName": "",//商标名称
currentPage: p.pageInfo.pageNo, "regMan": "",
"tmName": "",//商标名称 "regNum": "",
"regMan": "", "sqlbtabkey": "",//商标类别
"regNum": "", "flzttabkey": "",//法律状态
"sqlbtabkey": "",//商标类别 "sqnftabkey": "",//申请年份
"flzttabkey": "",//法律状态 "ncl": [],//尼斯大类
"sqnftabkey": "",//申请年份 "xcl": [],//尼斯群组
"ncl": [],//尼斯大类 "nclNum": [],//尼斯大类
"xcl": [],//尼斯群组 }
"nclNum": [],//尼斯大类 };
} if (Object.keys(p.search).length > 0) {
}; if (p.search.sbzch) {//注册号查询
if (Object.keys(p.search).length > 0) { query.actionType = "findTrademarkzchAccurate";
if (p.search.sbzch) {//注册号查询 query.actionBody.regNum = p.search.sbzch
query.actionType = "findTrademarkzchAccurate"; } else if (p.search.zcren) {//申请人查询
query.actionBody.regNum = p.search.sbzch query.actionType = "findTrademarkzcr";
} else if (p.search.zcren) {//申请人查询 query.actionBody.regMan = p.search.zcren
query.actionType = "findTrademarkzcr"; } else if (p.search.sbmc) {//商标名称查询
query.actionBody.regMan = p.search.zcren query.actionType = "findTrademarkNameAccurate";
} else if (p.search.sbmc) {//商标名称查询 query.actionBody.tmName = p.search.sbmc
query.actionType = "findTrademarkNameAccurate"; }
query.actionBody.tmName = p.search.sbmc } else return;
} let tokenInfo = await this.service.getToken();
} else return; if (tokenInfo && tokenInfo.data && tokenInfo.data.token) {
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;
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) {
if (t.tm_code == item.sbzch) if (t.tm_code == item.sbzch)
item._disabled = true; item._disabled = true;
} }
}); });
}catch (e) {
return system.getResultFail(-1,e)
}
return system.getResultList(data.count, data.rows) return system.getResultList(data.count, data.rows)
}catch (e) { } else return system.getResultFail(-1, "token获取失败")
return system.getResultFail(-1, 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