Commit b970d779 by 宋毅

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

parents e703ccf1 f863e335
const system = require("../system"); const system = require("../system");
const settings = require("../../config/settings"); const settings = require("../../config/settings");
const uuidv4 = require('uuid/v4'); const uuidv4 = require('uuid/v4');
const sha256 = require('sha256');
const md5 = require("MD5"); const md5 = require("MD5");
class APIBase { class APIBase {
constructor() { constructor() {
this.restClient = system.getObject("util.restClient"); this.restClient = system.getObject("util.restClient");
this.redisClient = system.getObject("util.redisClient");
this.cacheManager = system.getObject("db.common.cacheManager"); this.cacheManager = system.getObject("db.common.cacheManager");
this.logCtl = system.getObject("service.common.oplogSve"); this.logCtl = system.getObject("service.common.oplogSve");
this.toolSve = system.getObject("service.trademark.toolSve"); this.toolSve = system.getObject("service.trademark.toolSve");
this.exTime = 6 * 3600;//缓存过期时间,6小时 this.exTime = 6 * 3600;//缓存过期时间,6小时
this.cacheMethodList = [
];
} }
getUUID() { getUUID() {
var uuid = uuidv4(); var uuid = uuidv4();
...@@ -20,6 +25,12 @@ class APIBase { ...@@ -20,6 +25,12 @@ class APIBase {
async doexecMethod(gname, methodname, pobj, query, req) { async doexecMethod(gname, methodname, pobj, query, req) {
req.requestId = this.getUUID(); req.requestId = this.getUUID();
try { try {
var shaStr = await sha256(JSON.stringify(pobj));
//查询缓存
var cacheRes = await this.redisClient.get(shaStr);
if (cacheRes) {
return JSON.parse(cacheRes);
}
var rtn = await this[methodname](pobj, query, req); var rtn = await this[methodname](pobj, query, req);
this.logCtl.createDb({ this.logCtl.createDb({
appid: req.app.id, appid: req.app.id,
...@@ -33,6 +44,10 @@ class APIBase { ...@@ -33,6 +44,10 @@ class APIBase {
opTitle: "api服务提供方appKey:" + settings.appKey, opTitle: "api服务提供方appKey:" + settings.appKey,
}); });
rtn.requestId = req.requestId; rtn.requestId = req.requestId;
if(this.cacheMethodList.indexOf(methodname)>=0 && rtn.status && rtn.status==0){
//保存缓存
await this.redisClient.setWithEx(shaStr, JSON.stringify(rtn), 3600);
}
return rtn; return rtn;
} catch (e) { } catch (e) {
console.log(e.stack, "api调用出现异常,请联系管理员..........") console.log(e.stack, "api调用出现异常,请联系管理员..........")
......
...@@ -23,11 +23,14 @@ class QcAPI extends APIBase { ...@@ -23,11 +23,14 @@ class QcAPI extends APIBase {
var opResult = null; var opResult = null;
switch (action_type) { switch (action_type) {
case "getNeedSolutionDetailByUser"://获取方案详情 case "getNeedSolutionDetailByUser"://获取方案详情
opResult = await this.centerorderSve.reqCenterOrderApi(pobj,"action/icpapi/springBoard"); opResult = await this.centerorderSve.reqCenterOrderApi(pobj,"action/qcapi/springBoard");
break; break;
case "submitIcpProgramme"://icp方案提交 case "submitIcpProgramme"://icp方案提交
opResult = await this.centerorderSve.submitIcpProgramme(pobj); opResult = await this.centerorderSve.submitIcpProgramme(pobj);
break; break;
case "receiveProgrammeNo"://接收渠道方案号(测试)
opResult = await this.centerorderSve.reqCenterOrderApi(pobj);
break;
case "submitIcpMaterial"://icp材料提交 case "submitIcpMaterial"://icp材料提交
opResult = await this.centerorderSve.submitIcpMaterial(pobj); opResult = await this.centerorderSve.submitIcpMaterial(pobj);
break; break;
...@@ -38,7 +41,17 @@ class QcAPI extends APIBase { ...@@ -38,7 +41,17 @@ class QcAPI extends APIBase {
opResult = await this.centerorderSve.abolishIcpProgramme(pobj); opResult = await this.centerorderSve.abolishIcpProgramme(pobj);
break; break;
case "getProgrammeInfoByChannelNeedNo"://获取需求方案列表 case "getProgrammeInfoByChannelNeedNo"://获取需求方案列表
opResult = await this.centerorderSve.reqCenterOrderApi(pobj,"action/icpapi/springBoard"); opResult = await this.centerorderSve.reqCenterOrderApi(pobj,"action/qcapi/springBoard");
break;
case "serviceProviderSubmitMaterial"://交付商提交材料信息
opResult = await this.centerorderSve.serviceProviderSubmitMaterial(pobj);
break;
case "serviceProviderNotification"://交付商通知状态变更
opResult = await this.centerorderSve.serviceProviderNotification(pobj);
break;
case "closeOrderDelivery"://交付商关闭交付单
opResult = await this.centerorderSve.closeOrderDelivery(pobj);
break; break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
......
...@@ -58,16 +58,22 @@ class Need extends APIBase { ...@@ -58,16 +58,22 @@ class Need extends APIBase {
break; break;
case "icpFeedbackSubmit"://icp接收方案反馈信息 case "icpFeedbackSubmit"://icp接收方案反馈信息
pobj.actionType = "receiveIcpFeedback"; pobj.actionType = "receiveIcpFeedback";
opResult = await this.utilsNeedSve.reqCenterOrderApi(pobj); opResult = await this.utilsNeedSve.reqCenterOrderQcApi(pobj);
break; break;
case "icpNotify"://icp方案更新 case "icpNotify"://icp方案更新
var rtn = await this.utilsNeedSve.icpNotify(pobj, pobj.actionBody); var rtn = await this.utilsNeedSve.icpNotify(pobj, pobj.actionBody);
if (pobj.actionBody.status == 4 && rtn.status == 0) { if (pobj.actionBody.status == 2 && rtn.status == 0) {
opResult = await self.centerorderSve.icppaysuccess(pobj, pobj.actionBody); opResult = await self.centerorderSve.icppaysuccess(pobj, pobj.actionBody);
} else { } else {
opResult = rtn; opResult = rtn;
} }
break; break;
case "writeCommunicationLog"://icp接收方案反馈信息
opResult = await this.utilsNeedSve.writeCommunicationLog(pobj);
break;
case "queryExpertApplyCommunicationLogs"://icp接收方案反馈信息
opResult = await this.utilsNeedSve.queryExpertApplyCommunicationLogs(pobj);
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -3,7 +3,7 @@ const crypto = require('crypto'); ...@@ -3,7 +3,7 @@ const crypto = require('crypto');
var settings = require("../../../../config/settings"); var settings = require("../../../../config/settings");
const AppServiceBase = require("../../app.base"); const AppServiceBase = require("../../app.base");
/** /**
* 资质信息提报相关接口 * 资质信息提报相关接口(ICP\EDI)
*/ */
class QcCenterOrderService extends AppServiceBase { class QcCenterOrderService extends AppServiceBase {
constructor() { constructor() {
...@@ -50,7 +50,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -50,7 +50,7 @@ class QcCenterOrderService extends AppServiceBase {
}; };
var self = this; var self = this;
//推送方案 //推送方案
// this.pushIcpSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self); this.pushIcpSolution(pushObj,needsolution.solutionNo,pobj.appInfo,self);
return system.getResultSuccess(); return system.getResultSuccess();
} }
return res; return res;
...@@ -78,7 +78,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -78,7 +78,7 @@ class QcCenterOrderService extends AppServiceBase {
} }
} }
} }
//icp材料提交 //icp材料提交(停用)
async submitIcpMaterial(pobj) { async submitIcpMaterial(pobj) {
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) {
...@@ -108,12 +108,12 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -108,12 +108,12 @@ class QcCenterOrderService extends AppServiceBase {
}; };
var self = this; var self = this;
//推送方案材料 //推送方案材料
self.aliclient.reqbyget({action:"SavePartnerSubmitMaterial",reqbody:pushObj,apiVersion:"2019-05-08"}); // self.aliclient.reqbyget({action:"SavePartnerSubmitMaterial",reqbody:pushObj,apiVersion:"2019-05-08"});
return system.getResultSuccess(); return system.getResultSuccess();
} }
return res; return res;
} }
//icp通知状态变更 //icp通知状态变更(停用)
async acceptIcpPartnerNotification(pobj) { async acceptIcpPartnerNotification(pobj) {
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) {
...@@ -126,7 +126,7 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -126,7 +126,7 @@ class QcCenterOrderService extends AppServiceBase {
ApplicationStatus:res.data.ApplicationStatus ApplicationStatus:res.data.ApplicationStatus
}; };
//推送方案 //推送方案
this.aliclient.reqbyget({action:"AcceptPartnerNotification",reqbody:pushObj,apiVersion:"2019-05-08"}); // this.aliclient.reqbyget({action:"AcceptPartnerNotification",reqbody:pushObj,apiVersion:"2019-05-08"});
return system.getResultSuccess(); return system.getResultSuccess();
} }
return res; return res;
...@@ -150,5 +150,73 @@ class QcCenterOrderService extends AppServiceBase { ...@@ -150,5 +150,73 @@ class QcCenterOrderService extends AppServiceBase {
} }
return res; return res;
} }
//交付材料提交
async serviceProviderSubmitMaterial(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/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 = needsolution.channelSolutionNo;//⽅案业务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;
//推送方案材料
self.aliclient.reqbyget({action:"SavePartnerSubmitMaterial",reqbody:pushObj,apiVersion:"2019-05-08"});
return system.getResultSuccess();
}
return res;
}
//通知交付状态变更
async serviceProviderNotification(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) {
//推送数据至阿里
var pushObj = {
BizId:res.data.BizId,
OfficialFileURL:res.data.OfficialFileURL,
ApplicationStatus:res.data.ApplicationStatus
};
//推送状态变更
this.aliclient.reqbyget({action:"AcceptPartnerNotification",reqbody:pushObj,apiVersion:"2019-05-08"});
return system.getResultSuccess();
}
return res;
}
//交付单关闭
async closeOrderDelivery(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) {
var needsolution = res.data;//方案信息
var ab = pobj.actionBody;
//推送数据至阿里
var pushObj = {
BizId: needsolution.channelSolutionNo, Note: ab.note
};
//关闭方案
this.aliclient.reqbyget({action:"CloseIcpProduce",reqbody:pushObj,apiVersion:"2019-05-08"});
return system.getResultSuccess();
}
return res;
}
} }
module.exports = QcCenterOrderService; module.exports = QcCenterOrderService;
\ No newline at end of file
...@@ -45,17 +45,17 @@ class UtilsNeedService extends AppServiceBase { ...@@ -45,17 +45,17 @@ class UtilsNeedService extends AppServiceBase {
this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedBusiness"); this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedBusiness");
}else{ }else{
if(pobj.actionBody.channel_type_code==5){ if(pobj.actionBody.channel_type_code==5){
pobj.actionBody.regType="ali.icp"; pobj.actionBody.type="ali.icp";
}else{ }else{
pobj.actionBody.regType="ali.edi"; pobj.actionBody.type="ali.edi";
} }
this.utilsPushSve.aliBusiness2Fq(pobj, "intention"); this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedICPBusiness");
} }
} }
return result; return result;
} }
//调用center-order icp需求反馈 //调用center-order
async reqCenterOrderApi(pobj, reqUrl) { async reqCenterOrderApi(pobj, reqUrl) {
var url = this.centerOrderUrl + "action/icpapi/springBoard"; var url = this.centerOrderUrl + "action/icpapi/springBoard";
if (reqUrl) { if (reqUrl) {
...@@ -67,6 +67,18 @@ class UtilsNeedService extends AppServiceBase { ...@@ -67,6 +67,18 @@ class UtilsNeedService extends AppServiceBase {
return data; return data;
} }
//调用center-order icp需求反馈
async reqCenterOrderQcApi(pobj, reqUrl) {
var url = this.centerOrderUrl + "action/qcapi/springBoard";
if (reqUrl) {
var url = this.centerOrderUrl + reqUrl;
}
pobj.actionType = "receiveIcpFeedback";
var rtn = await this.execClient.execPost(pobj, url);
var data = JSON.parse(rtn.stdout);
return data;
}
/** /**
* 提交需求 * 提交需求
* @param {*} pobj * @param {*} pobj
...@@ -192,9 +204,9 @@ class UtilsNeedService extends AppServiceBase { ...@@ -192,9 +204,9 @@ class UtilsNeedService extends AppServiceBase {
var reqUrl = this.centerOrderUrl + "action/need/springBoard"; var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl); var result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) { if (result.status == 0) {
//推送ali // 推送ali
// await self.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: actionBody.channelNeedNo }, apiVersion: "2019-05-08" }); await self.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: actionBody.channelNeedNo }, apiVersion: "2019-05-08" });
// self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseNeed"); self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
return system.getResultSuccess(); return system.getResultSuccess();
} else { } else {
return system.getResult(null, "close fail 100389"); return system.getResult(null, "close fail 100389");
...@@ -254,10 +266,16 @@ class UtilsNeedService extends AppServiceBase { ...@@ -254,10 +266,16 @@ class UtilsNeedService extends AppServiceBase {
actionBody.newuserOtherList = newuserOtherList; actionBody.newuserOtherList = newuserOtherList;
} }
pobj.actionType = "receiveIcpStatusNotify"; pobj.actionType = "receiveIcpStatusNotify";
var url = settings.centerOrderUrl() + "action/icpapi/springBoard"; var url = settings.centerOrderUrl() + "action/qcapi/springBoard";
var rtn = await this.restPostUrl(pobj, url); var rtn = await this.restPostUrl(pobj, url);
return rtn; return rtn;
} }
/**
* 推送交付信息至企业宝(交付系统)
*/
async pushOrderDelivery2Qfb(pobj,needsolution){
}
async opDownFileInfo(docUrl, result) { //从oss下载到本地并上传到自己oss,之后删除本地文件 async opDownFileInfo(docUrl, result) { //从oss下载到本地并上传到自己oss,之后删除本地文件
/*docUrl下载链接,全路径,如:https://XXXXXX.pdf?XXXXX */ /*docUrl下载链接,全路径,如:https://XXXXXX.pdf?XXXXX */
...@@ -318,6 +336,37 @@ class UtilsNeedService extends AppServiceBase { ...@@ -318,6 +336,37 @@ class UtilsNeedService extends AppServiceBase {
return itemResult; return itemResult;
} }
async writeCommunicationLog(pobj) {
if (!pobj.actionBody.BizId) {
return system.getResult(null, "actionBody.BizId can not be empty,100491");
}
if (!pobj.actionBody.Note) {
return system.getResult(null, "actionBody.Note can not be empty,100492");
}
var self = this;
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
let res = await self.aliclient.reqbyget({ action: "WriteCommunicationLog", reqbody: { BizId: pobj.actionBody.BizId ,Note:pobj.actionBody.Note}, apiVersion: "2019-05-08" });
return result;
}
async queryExpertApplyCommunicationLogs(pobj) {
if (!pobj.actionBody.BizId) {
return system.getResult(null, "actionBody.BizId can not be empty,100493");
}
if (!pobj.actionBody.UserFeedBack) {
return system.getResult(null, "actionBody.UserFeedBack can not be empty,100494");
}
let res = await self.aliclient.reqbyget({ action: "queryExpertApplyCommunicationLogs", reqbody: {
BeginTime: pobj.actionBody.BeginTime ? pobj.actionBody.BeginTime : "",
EndTime:pobj.actionBody.EndTime ? pobj.actionBody.EndTime : "",
BizId:pobj.actionBody.BizId,
UserFeedBack:pobj.actionBody.UserFeedBack,
apiVersion: "2019-05-08"
}});
return res;
}
// async test1() { // async test1() {
// var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" }); // var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" });
......
...@@ -12,6 +12,7 @@ class UtilsPushService extends AppServiceBase { ...@@ -12,6 +12,7 @@ class UtilsPushService extends AppServiceBase {
var reqUrl = settings.centerAppUrl() + "action/opProduct/springBoard"; var reqUrl = settings.centerAppUrl() + "action/opProduct/springBoard";
var productItemInterfaceResult = await this.restPostUrl(pobj, reqUrl); var productItemInterfaceResult = await this.restPostUrl(pobj, reqUrl);
pobj.interface_info = productItemInterfaceResult.data; pobj.interface_info = productItemInterfaceResult.data;
debugger;
//日志记录 //日志记录
this.logCtl.info({ this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "", appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
......
...@@ -27,7 +27,7 @@ module.exports = function (app) { ...@@ -27,7 +27,7 @@ module.exports = function (app) {
app.all('*', function (req, res, next) { app.all('*', function (req, res, next) {
req.objs = system; req.objs = system;
res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild'); res.header('Access-Control-Allow-Headers', 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild,Authorization,XAPPKEY,XFROMAPPKEY,XFROMCOMPANYKEY,XREGROLE,XBIZPATH');
res.header('Access-Control-Allow-Methods', 'PUT, POST, GET, DELETE, OPTIONS'); res.header('Access-Control-Allow-Methods', 'PUT, POST, GET, DELETE, OPTIONS');
// res.header('Access-Control-Allow-Credentials', 'true'); // res.header('Access-Control-Allow-Credentials', 'true');
res.header('content-type', 'text/html;charset=UTF-8'); res.header('content-type', 'text/html;charset=UTF-8');
......
...@@ -229,18 +229,15 @@ module.exports = function (app) { ...@@ -229,18 +229,15 @@ module.exports = function (app) {
return; return;
} }
var cacheManager = system.getObject("db.common.cacheManager"); var cacheManager = system.getObject("db.common.cacheManager");
// 2020 0727 lin新增 增加验证token打印日志
console.log("验证token------------------------",token)
console.log("req.body-------------------------",req.body)
var result = await cacheManager["AppTokenByHostsCache"].getCache(token, system.exTime); var result = await cacheManager["AppTokenByHostsCache"].getCache(token, system.exTime);
console.log("验证token返回结果------------------------",result)
if (result.status != 0) { if (result.status != 0) {
res.end(JSON.stringify(result)); res.end(JSON.stringify(result));
return; return;
} }
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", "getNeedSolutionDetailByUser","getProgrammeInfoByChannelNeedNo", var lst = ["serviceProviderSubmitMaterial","closeOrderDelivery","serviceProviderNotification",
"tmConfirm", "getNeedSolutionDetailByUser","getProgrammeInfoByChannelNeedNo",
"submitIcpProgramme", "submitIcpMaterial", "acceptIcpPartnerNotification", "abolishIcpProgramme", "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",
......
var path = require('path'); var path = require('path');
var AlipaySdk = require('alipay-sdk').default; var AlipaySdk = require('alipay-sdk').default;
var WXPay = require('wx-pay'); var WXPay = require('wx-pay');
const tenpay = require('tenpay'); // const tenpay = require('tenpay');
var ENVINPUT = { var ENVINPUT = {
DB_HOST: process.env.DB_HOST, DB_HOST: process.env.DB_HOST,
DB_PORT: process.env.DB_PORT, DB_PORT: process.env.DB_PORT,
...@@ -58,6 +58,13 @@ var settings = { ...@@ -58,6 +58,13 @@ var settings = {
return "http://gsb.qifu.gongsibao.com/tlpay/notify"; return "http://gsb.qifu.gongsibao.com/tlpay/notify";
} }
}, },
qifubaoUrl: function () {//企服宝(交付系统)
if (this.env == "dev") {
return "http://xxxx:xxxx/";
} else {
return "";
}
},
paasUrl: function () { paasUrl: function () {
if (this.env == "dev") { if (this.env == "dev") {
return "http://p.apps.com:4001/"; return "http://p.apps.com:4001/";
......
...@@ -8,11 +8,14 @@ ...@@ -8,11 +8,14 @@
1. [获取方案详情](#getNeedSolutionDetailByUser) 1. [获取方案详情](#getNeedSolutionDetailByUser)
1. [获取需求详情](#getItemByNeedNo) 1. [获取需求详情](#getItemByNeedNo)
1. [需求关闭](#needCloseIcp) 1. [需求关闭](#needCloseIcp)
1. [交付商提交材料信息](#serviceProviderSubmitMaterial)
1. [交付商通知状态变更](#serviceProviderNotification)
1. [交付商关闭交付单](#closeOrderDelivery)
## **<a name="submitIcpProgramme"> icp方案提交</a>** ## **<a name="submitIcpProgramme"> icp方案提交</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/action/icpapi/springBoard] [/web/action/qcapi/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值 #### 请求头中需要增加userpin(用户登录后的凭证)的值
...@@ -52,7 +55,7 @@ ...@@ -52,7 +55,7 @@
## **<a name="submitIcpMaterial"> icp材料提交</a>** ## **<a name="submitIcpMaterial"> icp材料提交</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/action/icpapi/springBoard] [/web/action/qcapi/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值 #### 请求头中需要增加userpin(用户登录后的凭证)的值
...@@ -98,7 +101,7 @@ ...@@ -98,7 +101,7 @@
## **<a name="getProgrammeInfoByChannelNeedNo"> 根据需求查看方案详情</a>** ## **<a name="getProgrammeInfoByChannelNeedNo"> 根据需求查看方案详情</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/action/icpapi/springBoard] [/web/action/qcapi/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值 #### 请求头中需要增加userpin(用户登录后的凭证)的值
...@@ -339,7 +342,7 @@ ...@@ -339,7 +342,7 @@
## **<a name="acceptIcpPartnerNotification"> icp通知状态变更</a>** ## **<a name="acceptIcpPartnerNotification"> icp通知状态变更</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/action/icapi/springBoard] [/web/action/qcapi/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值 #### 请求头中需要增加userpin(用户登录后的凭证)的值
...@@ -377,7 +380,7 @@ ApplicationStatus: ...@@ -377,7 +380,7 @@ ApplicationStatus:
## **<a name="abolishIcpProgramme"> 服务商关闭icp方案</a>** ## **<a name="abolishIcpProgramme"> 服务商关闭icp方案</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/action/icapi/springBoard] [/web/action/qcapi/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值 #### 请求头中需要增加userpin(用户登录后的凭证)的值
...@@ -406,7 +409,7 @@ ApplicationStatus: ...@@ -406,7 +409,7 @@ ApplicationStatus:
## **<a name="getNeedSolutionDetailByUser"> 获取方案详情</a>** ## **<a name="getNeedSolutionDetailByUser"> 获取方案详情</a>**
[返回到目录](#menu) [返回到目录](#menu)
##### URL ##### URL
[/web/action/icpapi/springBoard] [/web/action/qcapi/springBoard]
#### 参数格式 `JSON` #### 参数格式 `JSON`
#### HTTP请求方式 `POST` #### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值 #### 请求头中需要增加userpin(用户登录后的凭证)的值
...@@ -597,3 +600,125 @@ ApplicationStatus: ...@@ -597,3 +600,125 @@ ApplicationStatus:
## **<a name="serviceProviderSubmitMaterial"> 交付商提交材料信息</a>**
[返回到目录](#menu)
##### URL
[/web/action/qcapi/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:serviceProviderSubmitMaterial
``` javascript
{
"actionType": "serviceProviderSubmitMaterial",
"actionBody": {
"orderNo": "NS202007281012kdOHlK",//订单号 必填
"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="serviceProviderNotification"> 交付商通知状态变更</a>**
[返回到目录](#menu)
##### URL
[/web/action/qcapi/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:serviceProviderNotification
``` javascript
{
"actionType": "serviceProviderNotification",
"actionBody": {
"orderNo": "NS202007281012kdOHlK",//订单号 必填
"status": 507,//交付状态 必填
"officialFileURL":""//官文url 非必填
}
}
status
507, "完成账户注册"
508, "服务商完成提交资料到⼯信部"
509, "⼯商部已受理",可以传递发⽂
510, "⼯商部不予受理",可以传递发⽂
511, "⼯商部通过",可以传递发⽂
512, "⼯商部未通过",可以传递发⽂
```
#### 返回结果
```javascript
{
"status": 0,// 0为成功,否则失败
"msg": "success",
"data":null,
"requestId": "a277fb799d9f4dda9053fb8830f9d252"
}
```
## **<a name="closeOrderDelivery"> 交付商关闭交付单</a>**
[返回到目录](#menu)
##### URL
[/web/action/qcapi/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:closeOrderDelivery
``` javascript
{
"actionType": "closeOrderDelivery",
"actionBody": {
"orderNo": "NS202007281012kdOHlK",//订单号 必填
"note": "交付商关闭交付单"//关闭原因 必填
}
}
```
#### 返回结果
```javascript
{
"status":0,
"msg":"success",
"data":null,
"requestId":"40769e74e83f4505a78b24d84fed870b"
}
```
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
"sequelize-cli": "^4.1.1", "sequelize-cli": "^4.1.1",
"serve-favicon": "^2.4.5", "serve-favicon": "^2.4.5",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"sha256": "^0.2.0",
"socket.io": "^2.1.1", "socket.io": "^2.1.1",
"tenpay": "^2.1.18", "tenpay": "^2.1.18",
"uuid": "^3.2.1", "uuid": "^3.2.1",
......
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