Commit d7ce1dc1 by 王栋源

wdy

parents 7ea7454e 1c2fe25f
...@@ -559,37 +559,45 @@ class UtilsNeedService extends AppServiceBase { ...@@ -559,37 +559,45 @@ class UtilsNeedService extends AppServiceBase {
// if (!pobj.actionBody.userFeedBack) { // if (!pobj.actionBody.userFeedBack) {
// return system.getResult(null, "actionBody.userFeedBack can not be empty,100494"); // return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
// } // }
let res = await this.aliclient.reqbyget({ pobj.actionBody.data = [];
action: "QueryTradeIntentionUserList", reqbody: { await this.queryByAli(pobj,1);
Begin: pobj.actionBody.Begin ? pobj.actionBody.Begin : "",
End: pobj.actionBody.End ? pobj.actionBody.End : "",
}, apiVersion: "2019-05-08"
});
if (res.status == 0) {
pobj.actionType = "getUnCreated"; pobj.actionType = "getUnCreated";
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);
}
async queryByAli(pobj,page){
let res = await this.aliclient.reqbyget({
action: "QueryTradeIntentionUserList", reqbody: {
Begin: pobj.actionBody.Begin ? pobj.actionBody.Begin : "",
End: pobj.actionBody.End ? pobj.actionBody.End : "",
PageNum: page,
PageSize: 10,
}, apiVersion: "2019-05-08"
});
if (res.status == 0) {
pobj.actionBody.data.push(...res.data.Data);
if (page < res.data.TotalPageNum){
await this.queryByAli(pobj,page+1)
} }
} }
return system.getResultFail(res.status, res.msg);
} }
async testsymq(pobj) { async testsymq(pobj) {
var a = null; var a = null;
try { try {
......
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