Commit a7f225a4 by 王勇飞

gyq

parents a6dc8a8e 1f291c4b
...@@ -7,11 +7,14 @@ class PatentQueryAPI extends WEBBase { ...@@ -7,11 +7,14 @@ class PatentQueryAPI extends WEBBase {
} }
/** /**
* 接口跳转-POST请求 * 接口跳转-POST请求
* action_type 执行的类型 * action_type 执行的类型
* action_body 执行的参数 * action_body 执行的参数
*/ */
async springBoard(pobj, qobj, req) { async springBoard(pobj, qobj, req) {
console.log("==================================================");
console.log(pobj);
console.log("==================================================");
if (!pobj.actionProcess) { if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空"); return system.getResult(null, "actionProcess参数不能为空");
} }
...@@ -25,9 +28,10 @@ class PatentQueryAPI extends WEBBase { ...@@ -25,9 +28,10 @@ class PatentQueryAPI extends WEBBase {
async opActionProcess(pobj, action_type, req) { async opActionProcess(pobj, action_type, req) {
var opResult = null; var opResult = null;
switch (action_type) { switch (action_type) {
case "test"://测试 case "test": //测试
opResult = system.getResultSuccess(null, "测试成功"); opResult = system.getResultSuccess(null, "测试成功");
break; break;
<<<<<<< HEAD
case "CommomSearchbyApplicant"://根据申请人查询聚合 case "CommomSearchbyApplicant"://根据申请人查询聚合
case "paCountByApplicantName"://根据申请人获取专利量 case "paCountByApplicantName"://根据申请人获取专利量
case "paShortListByApplicantName"://根据申请人获取专利详情列表 case "paShortListByApplicantName"://根据申请人获取专利详情列表
...@@ -43,6 +47,23 @@ class PatentQueryAPI extends WEBBase { ...@@ -43,6 +47,23 @@ class PatentQueryAPI extends WEBBase {
case "CommomSearchbyInventor"://根据发明人查询聚合 case "CommomSearchbyInventor"://根据发明人查询聚合
case "CommomSearchbyFilingno"://根据申请号查询聚合 case "CommomSearchbyFilingno"://根据申请号查询聚合
case "CommomSearchbyPubno"://根据公开号查询聚合 case "CommomSearchbyPubno"://根据公开号查询聚合
=======
case "CommomSearchbyApplicant": //根据申请人查询聚合
case "paCountByApplicantName": //根据申请人获取专利量
case "paShortListByApplicantName": //根据申请人获取专利详情列表
case "paDetailsBypubNo": //根据公开或授权号获取专利详情列表
case "paDetailsByfilingNo": //根据申请号获取专利详情列表
case "softwareCountByAuthor": //根据公司名称得到软著量
case "softwareListByAuthor": //根据公司名称得到软著详情
case "softwareDetailsByregNum": //根据登记号获取软著详情
case "worksCountByAuthor": //根据公司名称得到著作权量
case "worksListByAuthor": //根据公司名称得到著作权详情
case "worksDetailsByregNum": //根据登记号获取著作权详情
case "CommomSearchbyTitle": //根据标题查询聚合
case "CommomSearchbyFilingno": //根据申请号查询聚合
case "CommomSearchbyPubno": //根据公开号查询聚合
case "CommomSearchbyInventor": //根据发明人查询聚合
>>>>>>> 1f291c4bd811d0cd3a2e4d15a61274bfcceee4bd
opResult = await this.patentSve.opReqResult(pobj, req); opResult = await this.patentSve.opReqResult(pobj, req);
break; break;
default: default:
......
...@@ -44,11 +44,11 @@ class UtilsNeedService extends AppServiceBase { ...@@ -44,11 +44,11 @@ class UtilsNeedService extends AppServiceBase {
pobj.actionBody.type = pobj.actionBody.channel_type_code; pobj.actionBody.type = pobj.actionBody.channel_type_code;
if (pobj.actionBody.channel_type_code == 5) { if (pobj.actionBody.channel_type_code == 5) {
pobj.actionBody.type = "ali.icp"; pobj.actionBody.type = "ali.icp";
} else if (pobj.actionBody.channel_type_code == 7){ } else if (pobj.actionBody.channel_type_code == 7) {
pobj.actionBody.type = "ali.edi"; pobj.actionBody.type = "ali.edi";
} else if (pobj.actionBody.channel_type_code == "tmjy"){ } else if (pobj.actionBody.channel_type_code == "tmjy") {
pobj.actionBody.type = "ali.tmd"; pobj.actionBody.type = "ali.tmd";
} }
if (pobj.actionBody.description.indexOf("备#") < 0) { if (pobj.actionBody.description.indexOf("备#") < 0) {
pobj.actionBody.level = "A"; pobj.actionBody.level = "A";
...@@ -456,9 +456,21 @@ class UtilsNeedService extends AppServiceBase { ...@@ -456,9 +456,21 @@ class UtilsNeedService extends AppServiceBase {
status: "followingUp" status: "followingUp"
}, },
opType: "updateChanceStatus", opType: "updateChanceStatus",
appInfo: pobj.appInfo appInfo: pobj.appInfo,
userInfo: pobj.userInfo
} }
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus"); self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
// var reqParams = {
// actionBody: {
// "bizId": pobj.actionBody.intentionBizId,
// "follow_date": (new Date()).toISOString(),
// "follow_content": pobj.actionBody.note
// },
// opType: "updateChanceStatus",
// appInfo: pobj.appInfo,
// userInfo: pobj.userInfo
// }
// self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
return system.getResultSuccess(); return system.getResultSuccess();
} }
...@@ -562,43 +574,43 @@ class UtilsNeedService extends AppServiceBase { ...@@ -562,43 +574,43 @@ class UtilsNeedService extends AppServiceBase {
// return system.getResult(null, "actionBody.userFeedBack can not be empty,100494"); // return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
// } // }
pobj.actionBody.data = []; pobj.actionBody.data = [];
await this.queryByAli(pobj,1); await this.queryByAli(pobj, 1);
pobj.actionType = "getUnCreated"; pobj.actionType = "getUnCreated";
let reqUrl = this.centerOrderUrl + "action/need/springBoard"; let reqUrl = this.centerOrderUrl + "action/need/springBoard";
let result = await this.restPostUrl(pobj, reqUrl); let result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) { if (result.status == 0) {
pobj.actionBody = { pobj.actionBody = {
type:"tmjy" type: "tmjy"
}; };
for (let item of result.data){ for (let item of result.data) {
pobj.actionBody.intentionBizId=item.BizId; pobj.actionBody.intentionBizId = item.BizId;
pobj.actionBody.mobile=item.Mobile?item.Mobile:""; pobj.actionBody.mobile = item.Mobile ? item.Mobile : "";
pobj.actionBody.userName=item.UserName?item.UserName:""; pobj.actionBody.userName = item.UserName ? item.UserName : "";
pobj.notes=`${item.RegisterNumber?"RegisterNumber:"+item.RegisterNumber:""}${item.Classification?"Classification:"+item.Classification:""}`; pobj.notes = `${item.RegisterNumber ? "RegisterNumber:" + item.RegisterNumber : ""}${item.Classification ? "Classification:" + item.Classification : ""}`;
let res = await this.submitNeed(JSON.parse(JSON.stringify(pobj)),{intentionBizId:item.BizId}); let res = await this.submitNeed(JSON.parse(JSON.stringify(pobj)), { intentionBizId: item.BizId });
console.log(res) console.log(res)
} }
return system.getResultSuccess(); return system.getResultSuccess();
}else { } else {
return system.getResultFail(result.status,result.msg); return system.getResultFail(result.status, result.msg);
} }
return system.getResultFail(res.status,res.msg); return system.getResultFail(res.status, res.msg);
} }
async queryByAli(pobj,page){ async queryByAli(pobj, page) {
let res = await this.aliclient.reqbyget({ let res = await this.aliclient.reqbyget({
action: "QueryTradeIntentionUserList", reqbody: { action: "QueryTradeIntentionUserList", reqbody: {
Begin: pobj.actionBody.Begin ? pobj.actionBody.Begin : "", Begin: pobj.actionBody.Begin ? pobj.actionBody.Begin : "",
End: pobj.actionBody.End ? pobj.actionBody.End : "", End: pobj.actionBody.End ? pobj.actionBody.End : "",
PageNum: page, PageNum: page,
PageSize: 10, PageSize: 10,
}, apiVersion: "2019-05-08" }, apiVersion: "2019-05-08"
}); });
if (res.status == 0) { if (res.status == 0) {
pobj.actionBody.data.push(...res.data.Data); pobj.actionBody.data.push(...res.data.Data);
if (page < res.data.TotalPageNum){ if (page < res.data.TotalPageNum) {
await this.queryByAli(pobj,page+1) await this.queryByAli(pobj, page + 1)
} }
} }
} }
async testsymq(pobj) { async testsymq(pobj) {
var a = null; var a = null;
......
...@@ -277,13 +277,13 @@ class UtilsOrderService extends AppServiceBase { ...@@ -277,13 +277,13 @@ class UtilsOrderService extends AppServiceBase {
} }
pobj.actionType = "getPayOrderInfo"; pobj.actionType = "getPayOrderInfo";
var orderUrl = settings.centerOrderUrl() + "action/order/springBoard"; var orderUrl = settings.centerOrderUrl() + "action/order/springBoard";
var orderResult = await this.restPostUrl(pobj, url); var orderResult = await this.restPostUrl(pobj, orderUrl);
if (orderResult.status != 0) { if (orderResult.status != 0) {
return orderResult; return orderResult;
} }
//检查流水号是否已经支付 //检查流水号是否已经支付
var receiptVoucher = orderResult.data.receiptVoucher; var receiptVoucher = orderResult.data.receiptVoucher;
var payTrxid = opType == "wx" ? receiptVoucher.wxPayOrderCode : receiptVoucher.aliPayOrderCode; var payTrxid = actionBody.opType == "wx" ? receiptVoucher.wxPayOrderCode : receiptVoucher.aliPayOrderCode;
pobj.actionBody.trxid = payTrxid; pobj.actionBody.trxid = payTrxid;
pobj.actionType = "queryOrderStatus"; pobj.actionType = "queryOrderStatus";
...@@ -305,6 +305,7 @@ class UtilsOrderService extends AppServiceBase { ...@@ -305,6 +305,7 @@ class UtilsOrderService extends AppServiceBase {
// payStatus.data.out_trade_no = attachList[0]; // payStatus.data.out_trade_no = attachList[0];
// payStatus.data.company_id = attachList[1]; // payStatus.data.company_id = attachList[1];
// return await this.utilstlbankSve.opBackNotify(payStatus.data, "页面回调"); // return await this.utilstlbankSve.opBackNotify(payStatus.data, "页面回调");
return system.getResultFail(-100130,'订单已支付,请勿重复付款,100130')
} }
else if (payStatus.data && payStatus.data.trxstatus == "3045") { else if (payStatus.data && payStatus.data.trxstatus == "3045") {
return system.getResultFail(-100170, "超时未支付,请刷新页面,100170"); return system.getResultFail(-100170, "超时未支付,请刷新页面,100170");
...@@ -800,6 +801,32 @@ class UtilsOrderService extends AppServiceBase { ...@@ -800,6 +801,32 @@ class UtilsOrderService extends AppServiceBase {
async tmAccept(pobj) {// 2020 0828 lin 新增 ali商标交易 创建订单接口 async tmAccept(pobj) {// 2020 0828 lin 新增 ali商标交易 创建订单接口
try { try {
var actionBody = pobj.actionBody; var actionBody = pobj.actionBody;
// 检查商标注册号是否为上架
pobj.actionType = "tmStatusCheck";
pobj.actionBody.code = pobj.actionBody.registerNumber;
var url = settings.centerTmtransactionUrl() + "tmtransaction/action/trademarktransaction/springBoard";
var tmStatusCheckResult = await this.restPostUrl(pobj, url);
if(!tmStatusCheckResult.data) {
var result = {
"errorCode": "error",
"errorMsg": "标源状态不符合",
"module": { "orderNumber": "" },
"requestId": pobj.requestId,
"success": false
}
return result;
}
if(tmStatusCheckResult.data.publish_status != "uppershelf") {
var result = {
"errorCode": "error",
"errorMsg": "标源状态不符合",
"module": { "orderNumber": "" },
"requestId": pobj.requestId,
"success": false
}
return result;
}
//走addOrder流程
pobj.actionType = "getProductDetail"; pobj.actionType = "getProductDetail";
var url = settings.centerAppUrl() + "action/opProduct/springBoard"; var url = settings.centerAppUrl() + "action/opProduct/springBoard";
var productItemResult = await this.restPostUrl(pobj, url); var productItemResult = await this.restPostUrl(pobj, url);
...@@ -821,6 +848,15 @@ class UtilsOrderService extends AppServiceBase { ...@@ -821,6 +848,15 @@ class UtilsOrderService extends AppServiceBase {
var reqUrl = this.centerOrderUrl + "action/order/springBoard"; var reqUrl = this.centerOrderUrl + "action/order/springBoard";
pobj.actionBody.channelOrder.orderStatus = 64;// 2020 0908 lin 新增。64作为orderinfo的orderStatus的值。含义为已付部分款 pobj.actionBody.channelOrder.orderStatus = 64;// 2020 0908 lin 新增。64作为orderinfo的orderStatus的值。含义为已付部分款
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
// 2020 0911 lin 新增 addOrder后修改标源状态
pobj.actionType = "tmStatusUpdate";
pobj.actionBody.tm = [{
id: tmStatusCheckResult.data.id,
code: tmStatusCheckResult.data.code
}]
pobj.actionBody.status = "lowershelf"
var url = settings.centerTmtransactionUrl() + "tmtransaction/action/trademarktransaction/springBoard";
var tmStatusUpdateResult = await this.restPostUrl(pobj, url);
if(result) { if(result) {
var tmResult = { var tmResult = {
"errorCode": "OK", "errorCode": "OK",
......
...@@ -17,9 +17,13 @@ class UtilsTmOrderCallService extends AppServiceBase { ...@@ -17,9 +17,13 @@ class UtilsTmOrderCallService extends AppServiceBase {
PageSize: 20, PageSize: 20,
SortFiled: "updateTime", SortFiled: "updateTime",
SortOrder: "DESC", SortOrder: "DESC",
type: "TM"
}; };
let orderList = await this.aliclient.reqbyget({ action: "QueryTradeProduceList", reqbody: obj }); var object = {
action: "QueryTradeProduceList",
reqbody: obj,
type: 'TM'
}
let orderList = await this.aliclient.reqbyget(object);
console.log("orderList",orderList) console.log("orderList",orderList)
return system.getResultSuccess(orderList); return system.getResultSuccess(orderList);
} }
......
...@@ -102,6 +102,13 @@ var settings = { ...@@ -102,6 +102,13 @@ var settings = {
return "http://center-app-service/"; return "http://center-app-service/";
} }
}, },
centerTmtransactionUrl: function () {
if (this.env == "dev") {
return "http://centerTmtransactioon.apps.com:4006/";
} else {
return "http://center-app-service/";
}
},
zzzdUrl: function () { zzzdUrl: function () {
if (this.env == "dev") { if (this.env == "dev") {
return "http://106.13.228.212:80"; return "http://106.13.228.212:80";
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
1. [获取偏好信息](#getPreference) 1. [获取偏好信息](#getPreference)
1. [提交选择信息起名](#createName) 1. [提交选择信息起名](#createName)
## **<a name="getCache">询价</a>** ## **<a name="getCache">获取行业信息</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/nmaction/name/springBoard] [/web/nmaction/name/springBoard]
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
1. [获取订单详情信息](#getOrderDetails) 1. [获取订单详情信息](#getOrderDetails)
1. [获取订单操作日志信息](#getOrderLogInfo) 1. [获取订单操作日志信息](#getOrderLogInfo)
1. [删除订单](#delOrder) 1. [删除订单](#delOrder)
1. [渠道订单支付通知](#channelPayNotify)
## **<a name="addOrder"> 下商标订单</a>** ## **<a name="addOrder"> 下商标订单</a>**
...@@ -176,7 +177,8 @@ ...@@ -176,7 +177,8 @@
"channelServiceNo":"",// N 渠道订单号 "channelServiceNo":"",// N 渠道订单号
"orderStatus":"",// N 订单状态 "orderStatus":"",// N 订单状态
"startTime": "2019-10-27",// N 开始时间 "startTime": "2019-10-27",// N 开始时间
"entTime": "2019-10-31"// N 结束时间 "entTime": "2019-10-31",// N 结束时间
"typeCode":"gsfu" //N 大类code
} }
``` ```
...@@ -363,3 +365,33 @@ ...@@ -363,3 +365,33 @@
} }
``` ```
## **<a name="channelPayNotify"> 渠道订单支付通知</a>**
[返回到目录](#menu)
##### URL
[/orderNotify/channelPayNotify]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### signature方式:md5(appkey+orderNo+payTotalSum+secret),secret是申请的密钥
``` javascript
{
"appkey":"202001170336",// Y appkey
"orderNo":"TM26202002271337mkgN",// Y 订单号
"payTotalSum":300.00,// Y 订单金额
"signature":"DC18F27EFC1A251AFC5F2FCF36ABE6FA"
}
```
#### 返回结果
```javascript
{
"status": 0,// 0为成功,否则失败
"msg": "success",
"data":null,
"requestId": "f21446617c5e46ad889f3fab7bb69456"
}
```
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
1. [合成事实与理由文件模板 docx](#composeDocAndDownload) 1. [合成事实与理由文件模板 docx](#composeDocAndDownload)
1. [合成委托申请书模板 docx](#getEntrustDoc) 1. [合成委托申请书模板 docx](#getEntrustDoc)
## **<a name="addorder">询价</a>** ## **<a name="addorder">创建驳回复审订单</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/opaction/order/springBoard] [/web/opaction/order/springBoard]
......
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