Commit 7ea7454e by 王栋源

wdy

parent 7c0797f0
...@@ -47,12 +47,12 @@ class UtilsNeedService extends AppServiceBase { ...@@ -47,12 +47,12 @@ class UtilsNeedService extends AppServiceBase {
pobj.actionBody.type = "ali.edi"; pobj.actionBody.type = "ali.edi";
} }
if (pobj.actionBody.description.indexOf("#备#")<0) { if (pobj.actionBody.description.indexOf("#备#") < 0) {
pobj.actionBody.level = "A"; pobj.actionBody.level = "A";
} else { } else {
var levelurl = "http://106.13.228.212:8000/recProbability"; var levelurl = "http://106.13.228.212:8000/recProbability";
var levelresult = await this.restPostUrl({ intentionBizId: pobj.actionBody.intentionBizId, type: pobj.actionBody.type, note: pobj.actionBody.description }, levelurl); var levelresult = await this.restPostUrl({ intentionBizId: pobj.actionBody.intentionBizId, type: pobj.actionBody.type, note: pobj.actionBody.description }, levelurl);
if (levelresult.status == 0) { if (levelresult.status == 0) {
pobj.actionBody.level = levelresult.data.level; pobj.actionBody.level = levelresult.data.level;
pobj.actionBody.probability = levelresult.data.per; pobj.actionBody.probability = levelresult.data.per;
} else { } else {
...@@ -74,6 +74,10 @@ class UtilsNeedService extends AppServiceBase { ...@@ -74,6 +74,10 @@ class UtilsNeedService extends AppServiceBase {
} }
this.utilsPushSve.aliBusiness2Delivery(reqParams, "addChance"); this.utilsPushSve.aliBusiness2Delivery(reqParams, "addChance");
pobj.actionBody.description = pobj.actionBody.description + " 成交概率:" + pobj.actionBody.level
if (pobj.actionBody.probability) {
pobj.actionBody.description = pobj.actionBody.description + "(" + pobj.actionBody.probability + ") "
}
this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedICPBusiness"); this.utilsPushSve.aliBusiness2Fq(pobj, "pushNeedICPBusiness");
} }
} }
...@@ -561,29 +565,29 @@ class UtilsNeedService extends AppServiceBase { ...@@ -561,29 +565,29 @@ class UtilsNeedService extends AppServiceBase {
End: pobj.actionBody.End ? pobj.actionBody.End : "", End: pobj.actionBody.End ? pobj.actionBody.End : "",
}, apiVersion: "2019-05-08" }, apiVersion: "2019-05-08"
}); });
if (res.status == 0){ if (res.status == 0) {
pobj.actionType = "getUnCreated"; pobj.actionType = "getUnCreated";
pobj.actionBody.data = res.data.Data; pobj.actionBody.data = res.data.Data;
let reqUrl = this.centerOrderUrl + "action/need/springBoard"; let reqUrl = this.centerOrderUrl + "action/need/springBoard";
let result = await this.restPostUrl(pobj, reqUrl); let result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) { if (result.status == 0) {
pobj.actionBody = { pobj.actionBody = {
type:"tmjy" type: "tmjy"
}; };
for (let item of result.data){ for (let item of result.data) {
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.userName = item.UserName ? item.UserName : "";
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 });
console.log(res) console.log(res)
} }
return system.getResultSuccess(); return system.getResultSuccess();
}else { } else {
return system.getResultFail(result.status,result.msg); return system.getResultFail(result.status, result.msg);
} }
} }
return system.getResultFail(res.status,res.msg); return system.getResultFail(res.status, res.msg);
} }
async testsymq(pobj) { async testsymq(pobj) {
......
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