Commit ea3b6fea by 宋毅

Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel

parents b123328b 857dda5b
...@@ -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);
......
...@@ -68,6 +68,9 @@ class TmToolsAPI extends WEBBase { ...@@ -68,6 +68,9 @@ class TmToolsAPI extends WEBBase {
case "adjustWTSSize"://调整委托书 case "adjustWTSSize"://调整委托书
opResult = await this.toolSve.adjustWTSSize(action_body, req); opResult = await this.toolSve.adjustWTSSize(action_body, req);
break; break;
case "getTmNclFilterSearch"://尼斯过滤
opResult = await this.toolSve.getTmNclFilterSearch(action_body, req);
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -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;
......
...@@ -72,6 +72,11 @@ class ToolService extends AppServiceBase { ...@@ -72,6 +72,11 @@ class ToolService extends AppServiceBase {
var url = this.zcApiUrl + "api/trademark/tmqueryApi/icheming"; var url = this.zcApiUrl + "api/trademark/tmqueryApi/icheming";
return await this.opReqResult(url, queryobj, req); return await this.opReqResult(url, queryobj, req);
} }
//尼斯过滤
async getTmNclFilterSearch(queryobj, req) {
var url = this.zcApiUrl + "api/tool/toolApi/getTmNclFilterSearch";
return await this.opReqResult(url, queryobj, req);
}
async opReqResult(reqUrl, queryobj, req) { async opReqResult(reqUrl, queryobj, req) {
var rtn = await this.execClient.execPushDataPost(queryobj, reqUrl, req.headers["token"], req.headers["request-id"]); var rtn = await this.execClient.execPushDataPost(queryobj, reqUrl, req.headers["token"], req.headers["request-id"]);
var data = JSON.parse(rtn.stdout); var data = JSON.parse(rtn.stdout);
......
...@@ -16,7 +16,7 @@ class utilsDeliverSve extends AppServiceBase{ ...@@ -16,7 +16,7 @@ class utilsDeliverSve extends AppServiceBase{
*/ */
async pushTmReDeliver(pobj){ async pushTmReDeliver(pobj){
try{ try{
var verifyResult = await this.verifyParam(pobj); var verifyResult = await this.verifyParam(pobj.actionBody);
if(verifyResult.status !=0){ if(verifyResult.status !=0){
return system.getResultFail(); return system.getResultFail();
} }
...@@ -35,14 +35,13 @@ class utilsDeliverSve extends AppServiceBase{ ...@@ -35,14 +35,13 @@ class utilsDeliverSve extends AppServiceBase{
* @returns {Promise<{msg: *, data, status: number}>} * @returns {Promise<{msg: *, data, status: number}>}
*/ */
async verifyParam(actionBody) { async verifyParam(actionBody) {
let verify = system.getResultSuccess();
let deliveryData =""; let deliveryData ="";
let orderNo = ""; let orderNo = "";
let tradeStatus = ''; let tradeStatus = '';
let applicant ={}; let applicant ={};
if(actionBody.delivery_content){ if(actionBody.delivery_content){
deliveryData = actionBody.delivery_content[0].deliveryContent; deliveryData = actionBody.delivery_content;
orderNo = actionBody.delivery_content[0].sourceOrderNo; orderNo = actionBody.order_info.orderNo;
} }
if(actionBody.deliveryData){ if(actionBody.deliveryData){
deliveryData = actionBody.deliveryData; deliveryData = actionBody.deliveryData;
...@@ -89,8 +88,8 @@ class utilsDeliverSve extends AppServiceBase{ ...@@ -89,8 +88,8 @@ class utilsDeliverSve extends AppServiceBase{
askForData:deliveryData.askForData, askForData:deliveryData.askForData,
supData:deliveryData.supData supData:deliveryData.supData
} }
verify.data = postData;
return verify; return system.getResultSuccess(postData);
} }
/** /**
......
...@@ -471,6 +471,68 @@ class UtilsNeedService extends AppServiceBase { ...@@ -471,6 +471,68 @@ 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 queryTradeIntentionUserList(pobj) { async queryTradeIntentionUserList(pobj) {
if (!pobj.actionBody.intentionBizId) { if (!pobj.actionBody.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,100493"); return system.getResult(null, "actionBody.intentionBizId can not be empty,100493");
......
...@@ -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"] || "";
...@@ -340,7 +341,7 @@ module.exports = function (app) { ...@@ -340,7 +341,7 @@ module.exports = function (app) {
res.end(JSON.stringify(result)); res.end(JSON.stringify(result));
return; return;
} }
if (["getAppTokenByHosts", "getAppTokenByAppKey"].indexOf(req.body.actionType) >= 0) { if (["getAppTokenByHosts", "getAppTokenByAppKey", "getTmNclFilterSearch"].indexOf(req.body.actionType) >= 0) {
req.body.actionBody.appHosts = req.host; req.body.actionBody.appHosts = req.host;
next(); next();
return; return;
......
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