Commit d7ce1dc1 by 王栋源

wdy

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