Commit 1f291c4b by 王栋源

wdy

parent 3c157ecd
...@@ -44,11 +44,11 @@ class UtilsNeedService extends AppServiceBase { ...@@ -44,11 +44,11 @@ class UtilsNeedService extends AppServiceBase {
pobj.actionBody.type = pobj.actionBody.channel_type_code; pobj.actionBody.type = pobj.actionBody.channel_type_code;
if (pobj.actionBody.channel_type_code == 5) { if (pobj.actionBody.channel_type_code == 5) {
pobj.actionBody.type = "ali.icp"; 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"; 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"; pobj.actionBody.type = "ali.tmd";
} }
if (pobj.actionBody.description.indexOf("备#") < 0) { if (pobj.actionBody.description.indexOf("备#") < 0) {
pobj.actionBody.level = "A"; pobj.actionBody.level = "A";
...@@ -456,9 +456,21 @@ class UtilsNeedService extends AppServiceBase { ...@@ -456,9 +456,21 @@ class UtilsNeedService extends AppServiceBase {
status: "followingUp" status: "followingUp"
}, },
opType: "updateChanceStatus", opType: "updateChanceStatus",
appInfo: pobj.appInfo appInfo: pobj.appInfo,
userInfo: pobj.userInfo
} }
self.utilsPushSve.aliBusiness2Delivery(reqParams, "updateChanceStatus"); 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(); return system.getResultSuccess();
} }
...@@ -562,43 +574,43 @@ class UtilsNeedService extends AppServiceBase { ...@@ -562,43 +574,43 @@ class UtilsNeedService extends AppServiceBase {
// return system.getResult(null, "actionBody.userFeedBack can not be empty,100494"); // return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
// } // }
pobj.actionBody.data = []; pobj.actionBody.data = [];
await this.queryByAli(pobj,1); await this.queryByAli(pobj, 1);
pobj.actionType = "getUnCreated"; pobj.actionType = "getUnCreated";
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 queryByAli(pobj,page){ async queryByAli(pobj, page) {
let res = await this.aliclient.reqbyget({ let res = await this.aliclient.reqbyget({
action: "QueryTradeIntentionUserList", reqbody: { action: "QueryTradeIntentionUserList", reqbody: {
Begin: pobj.actionBody.Begin ? pobj.actionBody.Begin : "", Begin: pobj.actionBody.Begin ? pobj.actionBody.Begin : "",
End: pobj.actionBody.End ? pobj.actionBody.End : "", End: pobj.actionBody.End ? pobj.actionBody.End : "",
PageNum: page, PageNum: page,
PageSize: 10, PageSize: 10,
}, apiVersion: "2019-05-08" }, apiVersion: "2019-05-08"
}); });
if (res.status == 0) { if (res.status == 0) {
pobj.actionBody.data.push(...res.data.Data); pobj.actionBody.data.push(...res.data.Data);
if (page < res.data.TotalPageNum){ if (page < res.data.TotalPageNum) {
await this.queryByAli(pobj,page+1) await this.queryByAli(pobj, page + 1)
} }
} }
} }
async testsymq(pobj) { async testsymq(pobj) {
var a = null; var a = null;
......
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