Commit cd89e383 by 宋毅

Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel

parents 34b7d890 3d975343
...@@ -53,6 +53,18 @@ class ProductAPI extends WEBBase { ...@@ -53,6 +53,18 @@ class ProductAPI extends WEBBase {
// case "getIcbcOrderDetails"://获取工商详情 // case "getIcbcOrderDetails"://获取工商详情
// opResult = await this.utilsOrderSve.addOrder(pobj, pobj.actionBody); // opResult = await this.utilsOrderSve.addOrder(pobj, pobj.actionBody);
// break; // break;
case "addUsuallyContacts"://添加常用联系人、申请人
opResult = await this.utilsOrderSve.addUsuallyContacts(pobj,pobj.actionBody);
break;
case "delUsuallyContacts"://删除常用联系人、申请人
opResult = await this.utilsOrderSve.delUsuallyContacts(pobj,pobj.actionBody);
break;
case "updateUsuallyContacts"://修改常用联系人、申请人
opResult = await this.utilsOrderSve.updateUsuallyContacts(pobj,pobj.actionBody);
break;
case "getUsuallyContacts"://查询常用联系人、申请人
opResult = await this.utilsOrderSve.getUsuallyContacts(pobj,pobj.actionBody);
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -231,7 +231,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -231,7 +231,7 @@ class QcCenterOrderService extends AppServiceBase {
OperateType: res.data.ApplicationStatus OperateType: res.data.ApplicationStatus
}; };
//推送状态变更 //推送状态变更
this.aliclient.reqbyget({ action: "OperateProduceForPartner", reqbody: pushObj, apiVersion: "2019-03-06" }); this.aliclient.reqbyget({ action: "OperateProduceForPartner", reqbody: pushObj, apiVersion: "2020-03-06" });
return system.getResultSuccess(); return system.getResultSuccess();
} }
return res; return res;
...@@ -242,14 +242,16 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -242,14 +242,16 @@ class QcCenterOrderService extends AppServiceBase {
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard"); var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) { if (res && res.status == 0 && res.data) {
console.log('datadatadata',res.data)
//推送数据至阿里 //推送数据至阿里
var pushObj = { var pushObj = {
intentionBizId: res.data.channelNeedNo, intentionBizId: res.data.needinfo.channelNeedNo,
bizType: res.data.bizType, bizType: res.data.needinfo.channelTypeCode,
solution: res.data.solutionContent solution: res.data.needsolution.solutionContent
}; };
//推送状态变更 //推送状态变更
this.aliclient.reqbyget({ action: "SubmitSolution", reqbody: pushObj, apiVersion: "2019-03-06" }); var r = await this.aliclient.reqbyget({ action: "SubmitSolution", reqbody: pushObj, apiVersion: "2020-03-06" });
console.log('rrrrrrrrr',r)
return system.getResultSuccess(); return system.getResultSuccess();
} }
return res; return res;
...@@ -309,7 +311,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -309,7 +311,7 @@ class QcCenterOrderService extends AppServiceBase {
optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery", optitle: "updateChanceStatus推送蜂擎获取的接口信息->aliBusiness2Delivery",
}); });
// 推送ali // 推送ali
var a = await self.aliclient.reqbyget({ action: "CloseIntentionForPartner", reqbody: { BizId: pobj.actionBody.needNo, BizType: "esp.wangwen" }, apiVersion: "2019-03-06" }); var a = await self.aliclient.reqbyget({ action: "CloseIntentionForPartner", reqbody: { BizId: pobj.actionBody.needNo, BizType: "esp.wangwen" }, apiVersion: "2020-03-06" });
self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed"); self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
return system.getResultSuccess(); return system.getResultSuccess();
} else { } else {
...@@ -345,7 +347,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -345,7 +347,7 @@ class QcCenterOrderService extends AppServiceBase {
note: pobj.actionBody.note note: pobj.actionBody.note
}; };
//提交沟通记录 //提交沟通记录
this.aliclient.reqbyget({ action: "SubmitIntentionNote", reqbody: pushObj, apiVersion: "2019-03-06" }); this.aliclient.reqbyget({ action: "SubmitIntentionNote", reqbody: pushObj, apiVersion: "2020-03-06" });
return system.getResultSuccess(); return system.getResultSuccess();
} }
...@@ -361,7 +363,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -361,7 +363,7 @@ class QcCenterOrderService extends AppServiceBase {
IntentionBizId: pobj.actionBody.needNo, IntentionBizId: pobj.actionBody.needNo,
PageNum: pobj.actionBody.pageNum || 1, PageNum: pobj.actionBody.pageNum || 1,
PageSize: pobj.actionBody.pageSize || 10, PageSize: pobj.actionBody.pageSize || 10,
}, apiVersion: "2019-03-06" }, apiVersion: "2020-03-06"
}); });
return system.getResultSuccess(res); return system.getResultSuccess(res);
} }
......
...@@ -593,7 +593,9 @@ class UtilsNeedService extends AppServiceBase { ...@@ -593,7 +593,9 @@ class UtilsNeedService extends AppServiceBase {
if (item.Type == 1 && item.RegisterNumber) { if (item.Type == 1 && item.RegisterNumber) {
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.Area = item.Area || "北京"
pobj.actionBody.area = '大陆地区 '
pobj.actionBody.userName = item.UserName ? item.UserName : "";
pobj.actionBody.description = item.RegisterNumber pobj.actionBody.description = item.RegisterNumber
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 });
......
...@@ -1069,5 +1069,57 @@ class UtilsOrderService extends AppServiceBase { ...@@ -1069,5 +1069,57 @@ class UtilsOrderService extends AppServiceBase {
return result; return result;
} }
} }
//增加常用联系人,常用申请人
async addUsuallyContacts(pobj,actionBody){
if (!actionBody.channel_user_id) {
return system.getResultFail(-1, "渠道用户id不能为空");
}
if (!actionBody.contacts){
return system.getResultFail(-1,'用户信息不能为空')
}
if(Object.keys(actionBody.contacts).length<0){
return system.getResultFail(-1,'用户信息不能为空')
}
var reqUrl = this.centerOrderUrl + "action/tmOrder/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
//删除常用联系人,常用申请人
async delUsuallyContacts(pobj,actionBody){
if(!actionBody.id){
return system.getResultFail(-1,'id不能为空')
}
var reqUrl = this.centerOrderUrl + "action/tmOrder/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
//修改常用联系人,常用申请人
async updateUsuallyContacts(pobj,actionBody){
if(!actionBody.id){
return system.getResultFail(-1,'id 不能为空');
}
if(!actionBody.channel_user_id){
return system.getResultFail(-1,'id 不能为空');
}
if(Object.keys(actionBody.contacts).length<0){
return system.getResultFail(-1,'信息不能为空');
}
var reqUrl = this.centerOrderUrl + "action/tmOrder/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
//查询常用联系人,常用申请人
async getUsuallyContacts(pobj,actionBody){
if(!actionBody.channel_user_id){
return system.getResultFail(-1,'用户id不能为空')
}
var reqUrl = this.centerOrderUrl + "action/tmOrder/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
} }
module.exports = UtilsOrderService; module.exports = UtilsOrderService;
...@@ -18,6 +18,11 @@ ...@@ -18,6 +18,11 @@
1. [推送委托书模板邮件(阿里云)](#sendAliWtsEmail) 1. [推送委托书模板邮件(阿里云)](#sendAliWtsEmail)
1. [商标智能推荐](#getNclByCode) 1. [商标智能推荐](#getNclByCode)
1. [全类保护](#getAllNcl) 1. [全类保护](#getAllNcl)
1. [添加常用联系人、申请人](#addUsuallyContacts)
1. [删除常用联系人、申请人](#delUsuallyContacts)
1. [修改常用联系人、申请人](#updateUsuallyContacts)
1. [获取常用联系人、申请人](#getUsuallyContacts)
## **<a name="getNcl"> 尼斯查询(一)</a>** ## **<a name="getNcl"> 尼斯查询(一)</a>**
...@@ -4973,4 +4978,153 @@ ...@@ -4973,4 +4978,153 @@
"requestId": "23830ec10c5b49fd8afb974401e86429" "requestId": "23830ec10c5b49fd8afb974401e86429"
} }
``` ```
\ No newline at end of file
## **<a name="addUsuallyContacts"> 添加常用联系人、申请人</a>**
[返回到目录](#menu)
##### URL
[/web/opaction/order/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:addUsuallyContacts
``` javascript
{
"actionType":"addUsuallyContacts",
"actionBody":{
"channel_user_id":"",//Y ic 用户id
"type":"contact", //Y 联系人 contact
"contacts":{
"contacts": "张三",// Y 联系人
"mobile": "15010929368",// Y 联系人电话
"tel":"010-11111",// N 固定电话
"email": "saa@gongsibao.com",// N 联系人邮箱
"fax": ""// N 传真
}
}
}
{
"actionType":"addUsuallyContacts",
"actionBody":{
"channel_user_id":"",//Y ic 用户id
"type":"applicant",//Y 申请人 applicant
"contacts":{
"code": "91310110398635929J",//统一社会信用代码
"customerType": "ent",//申请人类型 person个人,ent企业
"identityCardNo": "",//申请人身份证号--(申请类型为个人有此值)
"name": "上海辰者信息科技有限公司", //申请人名称
"zipCode": "100000"//邮政编码
"applyAddr": "上海市杨浦区国定路346号三楼0624室"//执照详细地址
}
}
}
```
#### 返回结果
``` javascript
{
"status": 0,
"msg": "success",
"data": null,
"requestId": "2a3eada5bd6a4e30807bbb2af8c0b4a8"
}
```
## **<a name="delUsuallyContacts"> 删除常用联系人、申请人</a>**
[返回到目录](#menu)
##### URL
[/web/opaction/order/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:delUsuallyContacts
``` javascript
{
"actionType":"delUsuallyContacts",
"actionBody":{
"id":2
}
}
```
#### 返回结果
``` javascript
{
"status": 0,
"msg": "success",
"data": null,
"requestId": "2a3eada5bd6a4e30807bbb2af8c0b4a8"
}
```
## **<a name="updateUsuallyContacts"> 添加常用联系人、申请人</a>**
[返回到目录](#menu)
##### URL
[/web/opaction/order/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:updateUsuallyContacts
``` javascript
{
"actionType":"updateUsuallyContacts",
"actionBody":{
"id":7,
"channel_user_id":"19219084323984",
"contacts":{
"contacts": "张三23",
"mobile": "15010929368",
"tel":"010-222",
"email": "saa@gongsibao.com",
"fax": ""
}
}
}
```
#### 返回结果
``` javascript
{
"status": 0,
"msg": "success",
"data": null,
"requestId": "2a3eada5bd6a4e30807bbb2af8c0b4a8"
}
```
## **<a name="getUsuallyContacts"> 获取常用联系人、申请人</a>**
[返回到目录](#menu)
##### URL
[/web/opaction/order/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getUsuallyContacts
``` javascript
{
"actionType":"getUsuallyContacts",
"actionBody":{
"channel_user_id":"19219084323984",
"type":"contact",
}
}
```
#### 返回结果
``` javascript
{
"status": 0,
"msg": "success",
"data": null,
"requestId": "2a3eada5bd6a4e30807bbb2af8c0b4a8"
}
```
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