Commit 1f291c4b by 王栋源

wdy

parent 3c157ecd
......@@ -44,9 +44,9 @@ class UtilsNeedService extends AppServiceBase {
pobj.actionBody.type = pobj.actionBody.channel_type_code;
if (pobj.actionBody.channel_type_code == 5) {
pobj.actionBody.type = "ali.icp";
} else if (pobj.actionBody.channel_type_code == 7){
} else if (pobj.actionBody.channel_type_code == 7) {
pobj.actionBody.type = "ali.edi";
} else if (pobj.actionBody.channel_type_code == "tmjy"){
} else if (pobj.actionBody.channel_type_code == "tmjy") {
pobj.actionBody.type = "ali.tmd";
}
......@@ -456,9 +456,21 @@ class UtilsNeedService extends AppServiceBase {
status: "followingUp"
},
opType: "updateChanceStatus",
appInfo: pobj.appInfo
appInfo: pobj.appInfo,
userInfo: pobj.userInfo
}
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus");
// var reqParams = {
// actionBody: {
// "bizId": pobj.actionBody.intentionBizId,
// "follow_date": (new Date()).toISOString(),
// "follow_content": pobj.actionBody.note
// },
// opType: "updateChanceStatus",
// appInfo: pobj.appInfo,
// userInfo: pobj.userInfo
// }
// self.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseICPNeed");
return system.getResultSuccess();
}
......@@ -562,29 +574,29 @@ class UtilsNeedService extends AppServiceBase {
// return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
// }
pobj.actionBody.data = [];
await this.queryByAli(pobj,1);
await this.queryByAli(pobj, 1);
pobj.actionType = "getUnCreated";
let reqUrl = this.centerOrderUrl + "action/need/springBoard";
let result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) {
pobj.actionBody = {
type:"tmjy"
type: "tmjy"
};
for (let item of result.data){
pobj.actionBody.intentionBizId=item.BizId;
pobj.actionBody.mobile=item.Mobile?item.Mobile:"";
pobj.actionBody.userName=item.UserName?item.UserName:"";
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});
for (let item of result.data) {
pobj.actionBody.intentionBizId = item.BizId;
pobj.actionBody.mobile = item.Mobile ? item.Mobile : "";
pobj.actionBody.userName = item.UserName ? item.UserName : "";
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 });
console.log(res)
}
return system.getResultSuccess();
}else {
return system.getResultFail(result.status,result.msg);
} else {
return system.getResultFail(result.status, result.msg);
}
return system.getResultFail(res.status,res.msg);
return system.getResultFail(res.status, res.msg);
}
async queryByAli(pobj,page){
async queryByAli(pobj, page) {
let res = await this.aliclient.reqbyget({
action: "QueryTradeIntentionUserList", reqbody: {
Begin: pobj.actionBody.Begin ? pobj.actionBody.Begin : "",
......@@ -595,8 +607,8 @@ class UtilsNeedService extends AppServiceBase {
});
if (res.status == 0) {
pobj.actionBody.data.push(...res.data.Data);
if (page < res.data.TotalPageNum){
await this.queryByAli(pobj,page+1)
if (page < res.data.TotalPageNum) {
await this.queryByAli(pobj, page + 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