Commit 9ada1384 by linboxuan

submitIcpIntention,queryIntentionList,confirmIcpIntention add

parent 2a2571be
...@@ -43,7 +43,9 @@ class OpNeed extends APIBase { ...@@ -43,7 +43,9 @@ class OpNeed extends APIBase {
case "getItemByNeedNo"://需求详情 case "getItemByNeedNo"://需求详情
opResult = await this.utilsOpNeedSve.getItemByNeedNo(pobj, pobj.actionBody); opResult = await this.utilsOpNeedSve.getItemByNeedNo(pobj, pobj.actionBody);
break; break;
case "test"://2020 0826 lin 测试使用
opResult = await this.utilsOpNeedSve.test(pobj, pobj.actionBody);
break;
// case "getItemByChannelNeedNo"://方案反馈 // case "getItemByChannelNeedNo"://方案反馈
// opResult = await this.utilsOpNeedSve.getItemByChannelNeedNo(pobj, pobj.actionBody); // opResult = await this.utilsOpNeedSve.getItemByChannelNeedNo(pobj, pobj.actionBody);
......
...@@ -76,6 +76,15 @@ class Need extends APIBase { ...@@ -76,6 +76,15 @@ class Need extends APIBase {
case "getaliicpProduce"://方案询价 case "getaliicpProduce"://方案询价
opResult = await this.centerorderSve.getaliicpProduce(pobj); opResult = await this.centerorderSve.getaliicpProduce(pobj);
break; break;
case "submitIcpIntention":// 2020 0827 lin 新增 4.1 提交需求
opResult = await this.utilsNeedSve.submitIcpIntention(pobj, pobj.actionBody);
break;
case "queryIntentionList":// 2020 0827 lin 新增 4.2 需求列表查询
opResult = await this.utilsNeedSve.queryIntentionList(pobj, pobj.actionBody);
break;
case "confirmIcpIntention":// 2020 0827 lin 新增 4.3 用户需求确认
opResult = await this.utilsNeedSve.confirmIcpIntention(pobj, pobj.actionBody);
break;
case "testsymq": case "testsymq":
opResult = await this.utilsNeedSve.testsymq(pobj); opResult = await this.utilsNeedSve.testsymq(pobj);
break; break;
......
...@@ -462,6 +462,69 @@ class UtilsNeedService extends AppServiceBase { ...@@ -462,6 +462,69 @@ class UtilsNeedService extends AppServiceBase {
return system.getResultSuccess(res); return system.getResultSuccess(res);
} }
/**
* 2020 0827 lin 新增 4.1 用户在公司宝前端提交需求
* @param {*} pobj
* @param {*} actionBody
*/
async submitIcpIntention(pobj, actionBody) {
// 校验文档上必填字段
if (!actionBody.UserName) {
return system.getResult(null, "actionBody.UserName can not be empty,100400");
}
if (!actionBody.Description) {
return system.getResult(null, "actionBody.Description can not be empty,100405");
}
if (!actionBody.Area) {
return system.getResult(null, "actionBody.Area can not be empty,100410");
}
if (!actionBody.BizType) {
return system.getResult(null, "actionBody.BizType can not be empty,100415");
}
// 调用center-order 生成新的需求
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
// 生成成功 通知ali
if(result.status == 0) {
var aliResult = await this.aliclient.reqbyget({ action: "SubmitIcpIntention", reqbody: actionBody, apiVersion: "2019-05-08" });
console.log(aliResult);
}
return result;
}
/**
* 2020 0827 lin 新增 4.2 需求列表查询
* @param {*} pobj
* @param {*} actionBody
*/
async queryIntentionList(pobj, actionBody) {
var aliResult = await self.aliclient.reqbyget({ action: "QueryIntentionList", reqbody: actionBody, apiVersion: "2019-05-08" });
if (aliResult.code == 200) {
return system.getResultSuccess();
} else {
return system.getResult(null, "查询失败 10420");
}
}
/**
* 2020 0827 lin 新增 4.3 用户需求确认 未测试
* @param {*} pobj
* @param {*} actionBody
*/
async confirmIcpIntention(pobj, actionBody) {
if (!actionBody.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,100395");
}
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
if (result.status == 0) {
this.utilsPushSve.aliBusiness2Fq(pobj, "pushCloseNeed");
return system.getResultSuccess();
} else {
return system.getResult(null, "推送失敗 100388");
}
}
async testsymq(pobj) { async testsymq(pobj) {
var a=null; var a=null;
try { try {
......
...@@ -296,10 +296,13 @@ class UtilsOpNeedService extends AppServiceBase { ...@@ -296,10 +296,13 @@ class UtilsOpNeedService extends AppServiceBase {
} }
return jsonarr; return jsonarr;
} }
//2020 0826 lin 测试使用
//  async opNeedDetailByChannelNo(pobj, actionBody){ async test(pobj, actionBody){
pobj.actionType = "receiveIcpStatusNotify";
// } var url = settings.centerOrderUrl() + "action/qcapi/springBoard";
var rtn = await this.restPostUrl(pobj, url);
return rtn;
}
} }
module.exports = UtilsOpNeedService; module.exports = UtilsOpNeedService;
......
...@@ -246,7 +246,8 @@ module.exports = function (app) { ...@@ -246,7 +246,8 @@ module.exports = function (app) {
"getPaidLogoListByUser","getCollectibleLogoListByUser","collectLogo","getLogoMaterial","cancelCollectLogo","icpNotify","createName","getNameDetail","orderConfirm", "getPaidLogoListByUser","getCollectibleLogoListByUser","collectLogo","getLogoMaterial","cancelCollectLogo","icpNotify","createName","getNameDetail","orderConfirm",
"orderTotalSum", "collect", "reg", "orderCheck","getReOrderList","getOfficalList","addReviewList","opSubmitNeed","opNeedClose","opNeedList","getItemByNeedNo","opNeedDetailByChannelNo", "orderTotalSum", "collect", "reg", "orderCheck","getReOrderList","getOfficalList","addReviewList","opSubmitNeed","opNeedClose","opNeedList","getItemByNeedNo","opNeedDetailByChannelNo",
"getNeedListUser", "getNeedListUser",
"manualEvaluation", "diagnosisInfo", "check", "enterpriseInfo", "diagnosisDetail" "manualEvaluation", "diagnosisInfo", "check", "enterpriseInfo", "diagnosisDetail",
"submitIcpIntention", "queryIntentionList", "confirmIcpIntention"
]; ];
if (lst.indexOf(req.body.actionType) >= 0) { if (lst.indexOf(req.body.actionType) >= 0) {
var userpin = req.headers["userpin"] || ""; var userpin = req.headers["userpin"] || "";
......
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