Commit d7ce1dc1 by 王栋源

wdy

parents 7ea7454e 1c2fe25f
...@@ -19,8 +19,8 @@ class UtilsNeedService extends AppServiceBase { ...@@ -19,8 +19,8 @@ class UtilsNeedService extends AppServiceBase {
/** /**
* 提交需求 * 提交需求
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody * @param {*} actionBody
*/ */
async submitNeed(pobj, actionBody) { async submitNeed(pobj, actionBody) {
if (!actionBody.intentionBizId) { if (!actionBody.intentionBizId) {
...@@ -94,7 +94,7 @@ class UtilsNeedService extends AppServiceBase { ...@@ -94,7 +94,7 @@ class UtilsNeedService extends AppServiceBase {
} }
var self = this; var self = this;
pobj.actionType = "receiveIcpFeedback"; pobj.actionType = "receiveIcpFeedback";
// 2020 0803 lin 修改; // 2020 0803 lin 修改;
if (pobj.intentionStatus) { if (pobj.intentionStatus) {
// 如果需求当前字段为5(已关闭)则通知fq // 如果需求当前字段为5(已关闭)则通知fq
if (pobj.intentionStatus == 5) { if (pobj.intentionStatus == 5) {
...@@ -148,7 +148,7 @@ class UtilsNeedService extends AppServiceBase { ...@@ -148,7 +148,7 @@ class UtilsNeedService extends AppServiceBase {
/** /**
* 获取需求详情 * 获取需求详情
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody needNo 需求号 * @param {*} actionBody needNo 需求号
*/ */
async getItemByNeedNo(pobj, actionBody) { async getItemByNeedNo(pobj, actionBody) {
...@@ -161,7 +161,7 @@ class UtilsNeedService extends AppServiceBase { ...@@ -161,7 +161,7 @@ class UtilsNeedService extends AppServiceBase {
} }
/** /**
* 获取需求详情 * 获取需求详情
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody needNo 需求号 * @param {*} actionBody needNo 需求号
*/ */
async getItemByChannelNeedNo(pobj, actionBody) { async getItemByChannelNeedNo(pobj, actionBody) {
...@@ -174,7 +174,7 @@ class UtilsNeedService extends AppServiceBase { ...@@ -174,7 +174,7 @@ class UtilsNeedService extends AppServiceBase {
} }
/** /**
* 获取需求详情 * 获取需求详情
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody bizId 渠道方案号 * @param {*} actionBody bizId 渠道方案号
*/ */
async getItemByChannelSolutionNo(pobj, actionBody) { async getItemByChannelSolutionNo(pobj, actionBody) {
...@@ -187,8 +187,8 @@ class UtilsNeedService extends AppServiceBase { ...@@ -187,8 +187,8 @@ class UtilsNeedService extends AppServiceBase {
} }
/** /**
* 关闭需求 * 关闭需求
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody * @param {*} actionBody
*/ */
async needClose(pobj, actionBody) { async needClose(pobj, actionBody) {
if (!actionBody.intentionBizId) { if (!actionBody.intentionBizId) {
...@@ -206,8 +206,8 @@ class UtilsNeedService extends AppServiceBase { ...@@ -206,8 +206,8 @@ class UtilsNeedService extends AppServiceBase {
/** /**
* icp关闭需求 * icp关闭需求
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody * @param {*} actionBody
*/ */
async needCloseIcp(pobj, actionBody) { async needCloseIcp(pobj, actionBody) {
if (!actionBody.channelNeedNo) { if (!actionBody.channelNeedNo) {
...@@ -492,8 +492,8 @@ class UtilsNeedService extends AppServiceBase { ...@@ -492,8 +492,8 @@ class UtilsNeedService extends AppServiceBase {
/** /**
* 2020 0827 lin 新增 4.1 用户在公司宝前端提交需求 * 2020 0827 lin 新增 4.1 用户在公司宝前端提交需求
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody * @param {*} actionBody
*/ */
async submitIcpIntention(pobj, actionBody) { async submitIcpIntention(pobj, actionBody) {
// 校验文档上必填字段 // 校验文档上必填字段
...@@ -522,8 +522,8 @@ class UtilsNeedService extends AppServiceBase { ...@@ -522,8 +522,8 @@ class UtilsNeedService extends AppServiceBase {
/** /**
* 2020 0827 lin 新增 4.2 需求列表查询 * 2020 0827 lin 新增 4.2 需求列表查询
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody * @param {*} actionBody
*/ */
async queryIntentionList(pobj, actionBody) { async queryIntentionList(pobj, actionBody) {
var aliResult = await self.aliclient.reqbyget({ action: "QueryIntentionList", reqbody: actionBody, apiVersion: "2019-05-08" }); var aliResult = await self.aliclient.reqbyget({ action: "QueryIntentionList", reqbody: actionBody, apiVersion: "2019-05-08" });
...@@ -536,8 +536,8 @@ class UtilsNeedService extends AppServiceBase { ...@@ -536,8 +536,8 @@ class UtilsNeedService extends AppServiceBase {
/** /**
* 2020 0827 lin 新增 4.3 用户需求确认 未测试 * 2020 0827 lin 新增 4.3 用户需求确认 未测试
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody * @param {*} actionBody
*/ */
async confirmIcpIntention(pobj, actionBody) { async confirmIcpIntention(pobj, actionBody) {
if (!actionBody.intentionBizId) { if (!actionBody.intentionBizId) {
...@@ -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");
// } // }
pobj.actionBody.data = [];
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"
};
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);
}
return system.getResultFail(res.status,res.msg);
}
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 : "",
}, apiVersion: "2019-05-08" PageNum: page,
PageSize: 10,
}, apiVersion: "2019-05-08"
}); });
if (res.status == 0) { if (res.status == 0) {
pobj.actionType = "getUnCreated"; pobj.actionBody.data.push(...res.data.Data);
pobj.actionBody.data = res.data.Data; if (page < res.data.TotalPageNum){
let reqUrl = this.centerOrderUrl + "action/need/springBoard"; await this.queryByAli(pobj,page+1)
let result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) {
pobj.actionBody = {
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 });
console.log(res)
} }
return system.getResultSuccess(); }
} else {
return system.getResultFail(result.status, result.msg);
}
}
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