Commit 413d5fd7 by 王栋源

wdy

parent f9b8fc60
......@@ -4,6 +4,7 @@ var settings = require("../../../../config/settings");
class Ic extends APIBase {
constructor() {
super();
this.centerorderSve = system.getObject("service.common.centerorderSve");
}
/**
......@@ -12,23 +13,26 @@ class Ic extends APIBase {
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
async springBoard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = await this.opActionProcess(pobj,pobj.actionProcess, pobj.actionType, pobj.actionBody, req);
var result = await this.opActionProcess(pobj, pobj.actionProcess, pobj.actionType, pobj.actionBody, req);
return result;
}
async opActionProcess(pobj,action_process, action_type, action_body, req) {
async opActionProcess(pobj, action_process, action_type, action_body, req) {
var opResult = null;
switch (action_type) {
case "deliveryInfo"://办理公司表单数据
break;
case "deliveryStatus"://办理公司状态
break;
break;
case "reqCenterOrderApi"://办理公司状态
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
......
......@@ -25,10 +25,10 @@ class CenterorderService{
var needinfo = res.data.needinfo;//需求信息
var needsolution = res.data.needsolution;//方案信息
//推送数据至阿
// var bizType = pobj.actionBody.solutionContent.bizType || "";//业务类型里
// var pushObj = {
// intentionBizId:needinfo.channelNeedNo,bizType:bizType,solution:ab.solutionContent.solution
// };
var bizType = pobj.actionBody.solutionContent.bizType || "";//业务类型里
var pushObj = {
intentionBizId:needinfo.channelNeedNo,bizType:bizType,solution:ab.solutionContent.solution
};
// var pushRes = await this.aliclient.reqbyget({action:"",reqbody:pushObj});
// if(pushRes && pushRes.SolutionBizId){
// var reqObj2 = {
......@@ -40,9 +40,8 @@ class CenterorderService{
// };
// await this.reqCenterOrderApi(reqObj2);//保存渠道方案id
// }
return system.getResultSuccess();
}
return res;
return system.getResultSuccess();
}
//服务商方案作废
async abolishProgramme(pobj){
......@@ -53,9 +52,10 @@ class CenterorderService{
solutionBizId:res.data.channelNeedNo,note:pobj.actionBody.note || ""
};
// var pushRes = await this.aliclient.reqbyget({action:"",reqbody:pushObj});
return system.getResultSuccess();
}
return res;
}
}
module.exports = CenterorderService;
......@@ -14,11 +14,11 @@ class UtilsNeedSve extends AppServiceBase {
* @param {*} actionBody
*/
async submitNeed(pobj, actionBody) {
if (!actionBody.needNo) {
return system.getResult(null, "actionBody.needNo can not be empty,100380");
if (!actionBody.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,100380");
}
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
return await this.restPostUrl(pobj, url);
return await this.restPostUrl(pobj, reqUrl);
}
/**
* 获取需求详情
......@@ -26,8 +26,8 @@ class UtilsNeedSve extends AppServiceBase {
* @param {*} actionBody needNo 需求号
*/
async getItemByNeedNo(pobj, actionBody) {
if (!actionBody.needNo) {
return system.getResult(null, "actionBody.needNo can not be empty,100380");
if (!actionBody.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,100380");
}
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var itemResult = await this.restPostUrl(pobj, reqUrl);
......@@ -39,11 +39,11 @@ class UtilsNeedSve extends AppServiceBase {
* @param {*} actionBody
*/
async needClose(pobj, actionBody) {
if (!actionBody.needNo) {
return system.getResult(null, "actionBody.needNo can not be empty,100380");
if (!actionBody.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,100380");
}
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
return await this.restPostUrl(pobj, url);
return await this.restPostUrl(pobj, reqUrl);
}
}
module.exports = UtilsNeedSve;
......
......@@ -57,7 +57,7 @@ var settings = {
},
centerOrderUrl: function () {
if (this.env == "dev") {
return "http://centerorder.apps.com:4011/";
return "http://192.168.0.103:4011/";
} else {
return "http://center-order-service/";
}
......
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