Commit 554a127a by 宋毅

tj

parent c8e114d8
......@@ -83,7 +83,7 @@ class APIBase {
var selfAppInfo = await this.cacheManager["AppTokenByHostsCache"].getCache(token, system.exTime);
if (selfAppInfo.status != 0) {
return result;
return selfAppInfo;
}
req.app = selfAppInfo.data;
......
......@@ -54,7 +54,7 @@ class TmOrderAPI extends APIBase {
// action_body.app = { id:2,uappKey:"201911131657",uAppId:9,appSecret:"eeb18393aade40149287b024d8ba0850"};
// action_body.user = { id: 6, app_id: 2, nickname: "测试用户",channelUserId:"testUserId01" };
var opResult = null;
if (["getOrderInfo", "subOtherOrder", "subTmOrder", "offlinePaymentOrder", "getTmOrderList", "getTmOrderInfo", "getTmApplyInfo", "getTmNclList", "getNeedInfo",
if (["getOrderDeliveryInfo", "getOrderInfo", "subOtherOrder", "subTmOrder", "offlinePaymentOrder", "getTmOrderList", "getTmOrderInfo", "getTmApplyInfo", "getTmNclList", "getNeedInfo",
"tmConfirm", "updateTmInfo", "updateNclInfo", "updateContacts", "addQifuOrder",
"updateCustomerInfo", "addOrderAndDelivery", "updateOrderPayStatus"].indexOf(action_type) >= 0) {
if (!action_body.channelUserId) {
......@@ -75,6 +75,9 @@ class TmOrderAPI extends APIBase {
case "getOrderInfo":
opResult = await this.orderSve.getOrderInfo(pobj, action_body, req);
break;
case "getOrderDeliveryInfo":
opResult = await this.orderSve.getOrderDeliveryInfo(pobj, action_body, req);
break;
case "getIcbcOrderDetails":
opResult = await this.orderSve.getIcbcOrderDetails(pobj, req);
break;
......
......@@ -853,7 +853,50 @@ class OrderService extends ServiceBase {
}
}
//------------新的产品查询----start---------
/**
* 获取启服务通订单交付信息
* @param {*} pobj
* @param {*} actionBody
*/
async getOrderDeliveryInfo(pobj, actionBody, req) {
if (!actionBody.channelUserId) {
return system.getResult(null, "actionBody.channelUserId must not empty");
}
var token = "";
var tokenRes = await this.getCenterChannelToken(req.app);
if (tokenRes && tokenRes.status == 0 && tokenRes.data) {
token = tokenRes.data.token;
}
if (!token) {
return system.getResultFail(-88, "获取token失败");
}
//获取用户userpin
var userpin = "";
pobj.actionType = "getLoginByUserName";
pobj.actionBody.userName = actionBody.channelUserId;
pobj.actionBody.mobile = req.user.userMoblie;
var url = settings.centerChannelUrl() + "web/auth/accessAuth/springBoard";
var userpinResult = await this.execClient.execPushDataPost(pobj, url, token);
if (!userpinResult || !userpinResult.stdout) {
return system.getResult(null, userpinResult.msg);
}
var userpinResultTmp = JSON.parse(userpinResult.stdout);
if (userpinResultTmp.status != 0 && userpinResultTmp.status != 2060) {
return system.getResultFail(-99, "获取userpin失败");
}
userpin = userpinResultTmp.data.userpin;
if (!userpin) {
return system.getResultFail(-88, "获取userpin失败!!");
}
url = settings.centerChannelUrl() + "web/opaction/order/springBoard";
pobj.actionType = "getOrderDeliveryInfo";
var rtn = await this.execClient.execDataPostByTokenUserPin(pobj, url, token, userpin);
if (!rtn || !rtn.stdout) {
return system.getResult(null, "execPost is empty");
}
var result = JSON.parse(rtn.stdout);
return result;
}
/**
* 获取启服务通订单列表信息
* @param {*} pobj
......
......@@ -4,6 +4,7 @@
1. [产品列表-根据产品二类获取](#getProductListByTwoCode)
1. [产品详情](#getProductDetail)
1. [获取订单列表信息](#getOrderList)
1. [获取工商订单交付流程信息](#getIcbcOrderDeliveryStatus)
## **<a name="getIcbcOrderDetails"> 获取公司注册详情信息</a>**
[返回到目录](#menu)
......@@ -374,6 +375,7 @@
{
"status": 0,// 0为成功,否则失败
"msg": "success",
"dataCount":2,//总条数
"data": [
{
"orderNo": "OT31202002191443AVlJ",// 订单号
......@@ -426,3 +428,43 @@
}
```
## **<a name="getIcbcOrderDeliveryStatus"> 获取工商订单交付流程信息</a>**
[返回到目录](#menu)
##### URL
[/web/opaction/order/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:getOrderDeliveryInfo
``` javascript
{
"channelUserId":"15010929366",// Y 渠道用户Id
"orderNo":"OT31202002191453Hpib33"// Y 订单号
}
```
#### 返回结果
```javascript
{
"status": 0,// 0为成功,否则失败
"msg": "success",
"data": [
{
"updated": "", //更新时间
"orderDeliveryStatus": "已下单", //流程状态编码
"orderDeliveryStatusName": "已下单"//流程状态名称
},
{
"updated": "",
"orderDeliveryStatus": "已提交材料",
"orderDeliveryStatusName": "已提交材料"
}
],
"requestId": "a277fb799d9f4dda9053fb8830f9d252"
}
```
\ No newline at end of file
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