Commit 1437f1df by 宋毅

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

parents 617bfaeb 357d5758
...@@ -6,6 +6,7 @@ class IcAPI extends WEBBase { ...@@ -6,6 +6,7 @@ class IcAPI extends WEBBase {
super(); super();
// this.utilsProductSve = system.getObject("service.utilsSve.utilsProductSve"); // this.utilsProductSve = system.getObject("service.utilsSve.utilsProductSve");
this.centerorderSve = system.getObject("service.common.centerorderSve"); this.centerorderSve = system.getObject("service.common.centerorderSve");
// this.utilsFqAliyunSve = system.getObject("service.utilsSve.utilsFqAliyunSve");
} }
/** /**
* 接口跳转-POST请求 * 接口跳转-POST请求
...@@ -30,7 +31,10 @@ class IcAPI extends WEBBase { ...@@ -30,7 +31,10 @@ class IcAPI 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 "testPushBusinessOrder":
// opResult=await this.utilsFqAliyunSve.testPushBusinessOrder();
// break;
case "submitProgramme"://提交公司注册方案 case "submitProgramme"://提交公司注册方案
opResult = await this.centerorderSve.submitProgramme(pobj); opResult = await this.centerorderSve.submitProgramme(pobj);
break; break;
......
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class IcpAPI extends APIBase {
constructor() {
super();
// this.utilsProductSve = system.getObject("service.utilsSve.utilsProductSve");
this.centerorderSve = system.getObject("service.common.centerorderSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
if (pobj.actionType == 'getPolicyNeedList' || pobj.actionType == 'submitPolicyNeedNotes') {
if (!pobj.userInfo) {
return system.getResult(system.noLogin, "user no login!");
}
if (!pobj.appInfo) {
return system.getResult(system.noLogin, "app is null!");
}
}
var result = await this.opActionProcess(pobj, pobj.actionType, req);
return result;
}
async opActionProcess(pobj, action_type, req) {
var opResult = null;
switch (action_type) {
case "submitIcpProgramme"://icp方案提交
opResult = await this.centerorderSve.submitIcpProgramme(pobj);
break;
case "submitIcpMaterial"://icp材料提交
opResult = await this.centerorderSve.submitIcpMaterial(pobj);
break;
case "acceptIcpPartnerNotification"://icp通知状态变更
opResult = await this.centerorderSve.acceptIcpPartnerNotification(pobj);
break;
case "abolishIcpProgramme"://服务商icp方案关闭
opResult = await this.centerorderSve.abolishIcpProgramme(pobj);
break;
// case "updateStausByRefundOrder"://修改退款方案状态
// opResult = await this.needsolutionSve.updateStausByRefundOrder(pobj);
// break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = IcpAPI;
\ No newline at end of file
...@@ -20,6 +20,8 @@ class CenterorderService { ...@@ -20,6 +20,8 @@ class CenterorderService {
var data = JSON.parse(rtn.stdout); var data = JSON.parse(rtn.stdout);
return data; return data;
} }
//--------------------------阿里IC---start--------------------------------------------------------
//提交公司注册方案 //提交公司注册方案
async submitProgramme(pobj) { async submitProgramme(pobj) {
var res = await this.reqCenterOrderApi(pobj); var res = await this.reqCenterOrderApi(pobj);
...@@ -193,6 +195,102 @@ class CenterorderService { ...@@ -193,6 +195,102 @@ class CenterorderService {
} }
return system.getResultSuccess(); return system.getResultSuccess();
} }
//--------------------------阿里IC---end--------------------------------------------------------
//--------------------------阿里ICP---start--------------------------------------------------------
//提交公司注册方案
async submitIcpProgramme(pobj) {
var res = await this.reqCenterOrderApi(pobj,"action/icpapi/springBoard");
if(res && res.status==0 && res.data && res.data.needinfo && res.data.needsolution){
var needinfo = res.data.needinfo;//需求信息
var needsolution = res.data.needsolution;//方案信息
var ab = pobj.actionBody;
if(typeof(ab.solutionContent) == "string"){
ab.solutionContent = JSON.parse(ab.solutionContent);
}
var solution = ab.solutionContent.solution;
//推送数据至阿里
var bizType = needinfo.channelTypeCode;//业务类型里
var pushObj = {
IntentionBizId:needinfo.channelNeedNo,
CompanyName:solution.CompanyName,IcpType:solution.IcpType,CompanyAddress:solution.CompanyAddress,
Area:solution.Area,Note:solution.Note
};
var self = this;
//推送方案
// this.pushSubmitSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self);
return system.getResultSuccess();
}
return res;
}
//icp材料提交
async submitIcpMaterial(pobj) {
var res = await this.reqCenterOrderApi(pobj,"action/icpapi/springBoard");
if(res && res.status==0 && res.data){
var needsolution = res.data;//方案信息
var ab = pobj.actionBody;
if(typeof(ab.material) == "string"){
ab.material = JSON.parse(ab.material);
}
var material = ab.material;
//推送数据至阿里
var BizId = ab.BizId;//⽅案业务ID
var pushObj = {
"BizId":BizId,
"Domain":material.Domain,
"CorporateName":material.CorporateName,
"IncludeForeignInvestment":material.IncludeForeignInvestment,
"PartnerBusinessLicense":material.PartnerBusinessLicense,
"PartnerIdCardList":material.PartnerIdCardList,
"PartnerDomainCertificate":material.PartnerDomainCertificate,
"PartnerPreviewOtherList":material.PartnerPreviewOtherList || [],
"PartnerPlan":material.PartnerPlan || "",
"PartnerForeignInvestment":material.PartnerForeignInvestment || "",
"PartnerLaw":material.PartnerLaw || "",
"PartnerStampOtherList":material.PartnerStampOtherList || [],
"PartnerSignOtherList":material.PartnerSignOtherList || [],
"PartnerSignAndStampOtherList":material.PartnerSignAndStampOtherList || []
};
var self = this;
//推送方案
// this.pushSubmitSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self);
return system.getResultSuccess();
}
return res;
}
//icp通知状态变更
async acceptIcpPartnerNotification(pobj){
var res = await this.reqCenterOrderApi(pobj,"action/icpapi/springBoard");
if(res && res.status==0 && res.data){
var ab = pobj.actionBody;
//推送数据至阿里
var pushObj = res.data;
//推送方案
// this.pushSubmitSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self);
return system.getResultSuccess();
}
return res;
}
//服务商icp方案关闭
async abolishIcpProgramme(pobj){
var res = await this.reqCenterOrderApi(pobj,"action/icpapi/springBoard");
if(res && res.status==0 && res.data){
var needsolution = res.data;//方案信息
var ab = pobj.actionBody;
if(typeof(ab.material) == "string"){
ab.material = JSON.parse(ab.material);
}
//推送数据至阿里
var pushObj = {
BizId:ab.BizId,Note:ab.Note
};
//推送方案
// this.pushSubmitSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self);
return system.getResultSuccess();
}
return res;
}
//--------------------------阿里ICP---end--------------------------------------------------------
} }
module.exports = CenterorderService; module.exports = CenterorderService;
// var task = new CenterorderService(); // var task = new CenterorderService();
......
...@@ -110,6 +110,7 @@ module.exports = function (app) { ...@@ -110,6 +110,7 @@ module.exports = function (app) {
req.body.appInfo = result.data; req.body.appInfo = result.data;
req.body.actionProcess = result.data.app_code; req.body.actionProcess = result.data.app_code;
var lst = ["tmConfirm", var lst = ["tmConfirm",
"submitIcpProgramme","submitIcpMaterial","acceptIcpPartnerNotification","abolishIcpProgramme",
"addOrder", "getH5PayUrl", "getOrderQrCode", "queryOrderStatus", "getOrderInfo", "getOrderDeliveryInfo", "getOrderDetails", "addOrder", "getH5PayUrl", "getOrderQrCode", "queryOrderStatus", "getOrderInfo", "getOrderDeliveryInfo", "getOrderDetails",
"getOrderDeliveryFlowInfo", "getOrderDeliveryFlowList", "getOrderLogInfo", "updateContacts", "updateTmOrder", "delOrder", "getOrderDeliveryFlowInfo", "getOrderDeliveryFlowList", "getOrderLogInfo", "updateContacts", "updateTmOrder", "delOrder",
"submitProgramme", "getProgrammeListByUser", "getProgrammeInfoByNeedNo", "abolishProgramme", "getAliPayInfo" "submitProgramme", "getProgrammeListByUser", "getProgrammeInfoByNeedNo", "abolishProgramme", "getAliPayInfo"
......
...@@ -41,4 +41,7 @@ ...@@ -41,4 +41,7 @@
  1 [工商订单接口](doc/api/platform/icbcOrder.md)   1 [工商订单接口](doc/api/platform/icbcOrder.md)
## 11. 政策相关接口 ## 11. 政策相关接口
  1 [政策接口](doc/api/platform/policy.md)   1 [政策接口](doc/api/platform/policy.md)
\ No newline at end of file
## 12. ICP订单相关接口
  1 [ICP订单接口](doc/api/platform/icpOrder.md)
\ No newline at end of file
<a name="menu" href="/doc">返回主目录</a>
1. [icp方案提交](#submitIcpProgramme)
1. [icp材料提交](#submitIcpMaterial)
1. [根据需求产看方案详情](#getProgrammeInfoByNeedNo)
1. [icp通知状态变更](#acceptIcpPartnerNotification)
1. [服务商关闭icp方案](#abolishIcpProgramme)
## **<a name="submitIcpProgramme"> icp方案提交</a>**
[返回到目录](#menu)
##### URL
[/web/action/icpapi/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:submitIcpProgramme
``` javascript
{
"actionType":"submitIcpProgramme",
"actionBody":{
"needNo":"I20200320201737000zhb",
"solutionContent":{
"bizType":"gszc",
"solution":{
"CompanyName":"公司名",
"CompanyAddress":"公司地址",
"Area":"区域",
"Note":"备注"
}
}
}
}
```
#### 返回结果
```javascript
{
"status": 0,// 0为成功,否则失败
"msg": "success",
"data":null,
"requestId": "a277fb799d9f4dda9053fb8830f9d252"
}
```
## **<a name="submitIcpMaterial"> icp材料提交</a>**
[返回到目录](#menu)
##### URL
[/web/action/icpapi/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:submitIcpMaterial
``` javascript
{
"actionType":"submitIcpMaterial",
"actionBody":{
"BizId":"S20200323174838000zhb",
"material":{
"Domain":"备案域名",
"CorporateName":"法人名称",
"IncludeForeignInvestment":true,
"PartnerBusinessLicense":"营业执照",
"PartnerIdCardList":["相关人员身份证"],
"PartnerDomainCertificate":"域名证书",
"PartnerPreviewOtherList":["合作方递交其他供预览的件,只能传递ZIP包"],
"PartnerPlan":"收费方案计划书",
"PartnerForeignInvestment":"股东追溯不涉及外资承诺书",
"PartnerLaw":"依法经营电信业务承诺书",
"PartnerStampOtherList":["需要盖章,只能传递1个zip包"],
"PartnerSignOtherList":["需要签字,只能传递1个zip包"],
"PartnerSignAndStampOtherList":["需要盖章,只能传递1个zip包"]
}
}
}
```
#### 返回结果
```javascript
{
"status": 0,// 0为成功,否则失败
"msg": "success",
"data":null,
"requestId": "a277fb799d9f4dda9053fb8830f9d252"
}
```
## **<a name="getProgrammeInfoByNeedNo"> 根据需求产看方案详情</a>**
[返回到目录](#menu)
##### URL
[/web/action/icapi/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:getProgrammeInfoByNeedNo
``` javascript
{
"actionType":"getProgrammeInfoByNeedNo",
"actionBody":{
"needNo":"N202002141324bupnr8L"
}
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":[
{
"needNo":"N202002141324bupnr8L",
"solutionNo":"NS202003161734ay0SzH",
"orderNo":null,
"solutionContent":{
"bizType":"esp.companyreg",
"notes":"用户反馈",
"solution":{
}
},
"status":"yzf",
"statusName":"已作废"
}
],
"requestId":"4302ecc284e747a990e4ad61d8236b60"
}
```
## **<a name="acceptIcpPartnerNotification"> icp通知状态变更</a>**
[返回到目录](#menu)
##### URL
[/web/action/icapi/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:acceptIcpPartnerNotification
``` javascript
{
"actionType":"acceptIcpPartnerNotification",
"actionBody":{
"BizId":"S20200323174838000zhb",
"OfficialFileUrl":"官⽂下载地址",
"ApplicationStatus":"507"
}
}
ApplicationStatus
507, "完成账户注册"
508, "服务商完成提交资料到⼯信部"
509, "⼯商部已受理",可以传递发⽂
510, "⼯商部不予受理",可以传递发⽂
511, "⼯商部通过",可以传递发⽂
512, "⼯商部未通过",可以传递发⽂
```
#### 返回结果
```javascript
{
"status": 0,// 0为成功,否则失败
"msg": "success",
"data":null,
"requestId": "a277fb799d9f4dda9053fb8830f9d252"
}
```
## **<a name="abolishIcpProgramme"> 服务商关闭icp方案</a>**
[返回到目录](#menu)
##### URL
[/web/action/icapi/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:abolishIcpProgramme
``` javascript
{
"actionType":"abolishIcpProgramme",
"actionBody":{
"BizId":"S20200323174838000zhb",
"Note":"备注"
}
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":null,
"requestId":"40769e74e83f4505a78b24d84fed870b"
}
```
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