Commit 789fc825 by 庄冰

push2ali

parent 0571a1b4
...@@ -22,23 +22,34 @@ class CenterorderService{ ...@@ -22,23 +22,34 @@ class CenterorderService{
async submitProgramme(pobj){ async submitProgramme(pobj){
var res = await this.reqCenterOrderApi(pobj); var res = await this.reqCenterOrderApi(pobj);
if(res && res.status==0 && res.data && res.data.needinfo && res.data.needsolution){ if(res && res.status==0 && res.data && res.data.needinfo && res.data.needsolution){
var needinfo = res.data.needinfo;//需求信息 // var needinfo = res.data.needinfo;//需求信息
var needsolution = res.data.needsolution;//方案信息 // var needsolution = res.data.needsolution;//方案信息
// //推送数据至阿 // var ab = pobj.actionBody;
// var bizType = pobj.actionBody.solutionContent.bizType || "";//业务类型里 // //推送数据至阿里
// var bizType = ab.solutionContent.bizType || "";//业务类型里
// var pushObj = { // var pushObj = {
// intentionBizId:needinfo.channelNeedNo,bizType:bizType,solution:ab.solutionContent.solution // intentionBizId:needinfo.channelNeedNo,bizType:bizType,solution:ab.solutionContent.solution
// }; // };
// var pushRes = await this.aliclient.reqbyget({action:"",reqbody:pushObj}); // //推送方案
// if(pushRes && pushRes.SolutionBizId){ // this.aliclient.reqbyget({action:"SubmitSolution",reqbody:pushObj}).then(pushRes=>{
// var reqObj2 = { // if(pushRes && pushRes.status==0 && pushRes.data){
// actionType:"receiveProgrammeNo", // var resData = pushRes.data;
// actionBody:{ // var reqObj2 = {
// solutionNo:needsolution.needsolution, // actionType:"receiveProgrammeNo",
// solutionBizId:pushRes.SolutionBizId // actionBody:{
// } // solutionNo:needsolution.solutionNo,
// solutionBizId:resData.SolutionBizId
// }
// };
// await this.reqCenterOrderApi(reqObj2);//保存渠道方案id
// }
// });
// //推送需求小记
// if(needinfo.pushflag && needinfo.pushflag==1){//推送标志 值为1推送需求小记
// var pushObj2={
// intentionBizId:needinfo.channelNeedNo,note:"创建方案"
// }; // };
// await this.reqCenterOrderApi(reqObj2);//保存渠道方案id // this.aliclient.reqbyget({action:"SubmitIntentionNote",reqbody:pushObj2});
// } // }
} }
return system.getResultSuccess(); return system.getResultSuccess();
...@@ -46,16 +57,22 @@ class CenterorderService{ ...@@ -46,16 +57,22 @@ class CenterorderService{
//服务商方案作废 //服务商方案作废
async abolishProgramme(pobj){ async abolishProgramme(pobj){
var res = await this.reqCenterOrderApi(pobj); var res = await this.reqCenterOrderApi(pobj);
if(res && res.status==0 && res.data && res.data.channelNeedNo){ if(res && res.status==0 && res.data && res.data.channelSolutionNo){
// //推送数据至阿 //推送数据至阿里
// var pushObj = { // var pushObj = {
// solutionBizId:res.data.channelNeedNo,note:pobj.actionBody.note || "" // solutionBizId:res.data.channelSolutionNo,note:pobj.actionBody.note || ""
// }; // };
// var pushRes = await this.aliclient.reqbyget({action:"",reqbody:pushObj}); // this.aliclient.reqbyget({action:"RejectSolution",reqbody:pushObj})
} }
return res; return res;
} }
} }
module.exports = CenterorderService; module.exports = CenterorderService;
// var task = new CenterorderService();
// task.aliclient.reqbyget({action:"SubmitSolution",reqbody:{}}).then(d=>{
// console.log(d,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
// })
// 提方案-SubmitSolution
// 作废方案-RejectSolution
// 提需求小记-SubmitIntentionNote
// 查需求小记-ListIntentionNote
\ 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