Commit c099cb21 by 兰国旗

delcopy2

parent bbfd3a2e
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class QcAPI2 extends APIBase {
constructor() {
super();
this.centerorderSve = system.getObject("service.common.qcCenterOrderSve");
this.baseOrderSve = system.getObject("service.common.baseCenterOrderSve");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = await this.opActionProcess(pobj, pobj.actionType, req);
return result;
}
async opActionProcess(pobj, action_type, req) {
var opResult = null;
switch (action_type) {
case "getNeedSolutionDetailByUser"://获取方案详情
opResult = await this.centerorderSve.reqCenterOrderApi(pobj, "action/baseapi/springBoard");
break;
case "submitIcpProgramme"://icp方案提交
opResult = await this.baseOrderSve.submitIcpProgramme(pobj);
break;
case "receiveProgrammeNo"://接收渠道方案号(测试)
opResult = await this.centerorderSve.reqCenterOrderApi(pobj);
break;
// case "submitIcpMaterial"://icp材料提交
// opResult = await this.baseOrderSve.submitIcpMaterial(pobj);
// break;
// case "acceptIcpPartnerNotification"://icp通知状态变更
// opResult = await this.baseOrderSve.acceptIcpPartnerNotification(pobj);
// break;
case "abolishIcpProgramme"://服务商icp方案关闭
opResult = await this.centerorderSve.abolishIcpProgramme(pobj);
break;
case "getProgrammeInfoByChannelNeedNo"://获取需求方案列表
opResult = await this.centerorderSve.reqCenterOrderApi(pobj, "action/baseapi/springBoard");
break;
case "serviceProviderSubmitMaterial"://交付商提交材料信息
opResult = await this.baseOrderSve.serviceProviderSubmitMaterial(pobj);
break;
case "serviceProviderNotification"://交付商通知状态变更
opResult = await this.baseOrderSve.serviceProviderNotification(pobj);
break;
case "closeOrderDelivery"://交付商关闭交付单
opResult = await this.centerorderSve.closeOrderDelivery(pobj);
break;
// --------- 文网文 ---------
case "serviceSubmitOption"://服务商提交服务操作(文网文)2020-9-26
opResult = await this.baseOrderSve.serviceSubmitOption(pobj);
break;
case "submitWangwenSolution"://提交方案(文网文)2020-9-26
opResult = await this.baseOrderSve.submitWangwenSolution(pobj);
break;
case "closeNeed"://关闭需求(文网文)2020-9-28
opResult = await this.baseOrderSve.closeNeed(pobj);
break;
case "recordLog"://提交沟通记录(文网文)2020-9-28
opResult = await this.baseOrderSve.recordLog(pobj);
break;
case "recordLogList"://查询沟通记录(文网文)2020-9-29
opResult = await this.baseOrderSve.recordLogList(pobj);
break;
// --------- 食品 ---------
case "foodServiceSubmitOption"://服务商提交服务操作(文网文)2020-9-26
opResult = await this.baseOrderSve.foodServiceSubmitOption(pobj);
break;
case "submitFoodSolution"://提交方案(文网文)2020-9-26
opResult = await this.baseOrderSve.submitFoodSolution(pobj);
break;
case "foodCloseNeed"://关闭需求(文网文)2020-9-28
opResult = await this.baseOrderSve.foodCloseNeed(pobj);
break;
case "foodRecordLog"://提交沟通记录(文网文)2020-9-28
opResult = await this.baseOrderSve.foodRecordLog(pobj);
break;
case "foodRecordLogList"://查询沟通记录(文网文)2020-9-29
opResult = await this.baseOrderSve.foodRecordLogList(pobj);
break;
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = QcAPI2;
\ No newline at end of file
var APIBase = require("../../api.base");
var system = require("../../../system");
var settings = require("../../../../config/settings");
class Need2 extends APIBase {
constructor() {
super();
this.utilsNeedSve = system.getObject("service.utilsSve.utilsNeedSve");
this.centerorderSve = system.getObject("service.common.centerorderSve");
this.utilsNeedSve2 = system.getObject("service.utilsSve.utilsNeedSve2");
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async springBoard(pobj, qobj, req) {
if (!pobj.actionProcess) {
return system.getResult(null, "actionProcess参数不能为空");
}
if (!pobj.actionType) {
return system.getResult(null, "actionType参数不能为空");
}
var result = await this.opActionProcess(pobj, pobj.actionProcess, pobj.actionType, pobj.actionBody, req);
return result;
}
async opActionProcess(pobj, action_process, action_type, action_body, req) {
pobj.requestId = req.requestId;
var self = this;
var opResult = null;
switch (action_type) {
case "submitNeedH5"://提交需求----del
opResult = await this.utilsNeedSve.submitNeedH5(pobj, pobj.actionBody);
break;
//--------------------------------------跟ali合作---------------------------
case "submitNeed"://提交需求
opResult = await this.utilsNeedSve.submitNeed(pobj, pobj.actionBody);
break;
case "needClose"://关闭需求
opResult = await this.utilsNeedSve.needClose(pobj, pobj.actionBody);
break;
case "needCloseIcp"://关闭需求
opResult = await this.utilsNeedSve2.needCloseIcp(pobj, pobj.actionBody);
break;
case "needDetailByChannelNo":
opResult = await this.utilsNeedSve.needDetailByChannelNo(pobj, pobj.actionBody);
break;
case "getItemByChannelNeedNo":
opResult = await this.utilsNeedSve.getItemByChannelNeedNo(pobj, pobj.actionBody);
break;
case "getItemByNeedNo":
opResult = await this.utilsNeedSve.getItemByNeedNo(pobj, pobj.actionBody);
break;
case "receiveFeedback"://接收方案反馈信息
opResult = await this.centerorderSve.reqCenterOrderApi(pobj);
break;
case "getItemByChannelSolutionNo":
opResult = await this.utilsNeedSve.getItemByChannelSolutionNo(pobj, pobj.actionBody);
break;
case "icpFeedbackSubmit"://icp接收方案反馈信息
pobj.actionType = "receiveIcpFeedback";
opResult = await this.utilsNeedSve.reqCenterOrderQcApi(pobj);
break;
case "icpNotify"://icp方案更新
opResult = await this.utilsNeedSve.icpNotify(pobj, pobj.actionBody);
if (opResult.status == 0 && pobj.actionBody.status == 1) {
opResult = await self.centerorderSve.icppaysuccess(pobj, pobj.actionBody);
}
break;
case "writeCommunicationLog"://icp接收方案反馈信息2020-11-2 laolan 写入沟通记录
opResult = await this.utilsNeedSve2.writeCommunicationLog(pobj);
break;
case "queryExpertApplyCommunicationLogs"://icp接收方案反馈信息 2020-11-2 laolan 查询沟通记录
opResult = await this.utilsNeedSve2.queryExpertApplyCommunicationLogs(pobj);
break;
case "getaliicpProduce"://方案询价
opResult = await this.centerorderSve.getaliicpProduce(pobj);
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.utilsNeedSve2.queryIntentionList(pobj, pobj.actionBody);
break;
case "confirmIcpIntention":// 2020 0827 lin 新增 4.3 用户需求确认
opResult = await this.utilsNeedSve.confirmIcpIntention(pobj, pobj.actionBody);
break;
case "needBatchUpload":// 2020 0914 lin 新增 刷单一条龙服务
opResult = await this.utilsNeedSve.needBatchUpload(pobj, pobj.actionBody);
break;
case "testsymq":
opResult = await this.utilsNeedSve.testsymq(pobj);
break;
//-----------接入百度ICP------start----zhuangbing--2020.10.22----------------------------
case "submitIcpNeed"://提交需求
opResult = await this.utilsNeedSve.submitNeed2(pobj, pobj.actionBody);
break;
case "icpFeedbackSubmitNew"://icp接收方案反馈信息
pobj.actionType = "receiveIcpFeedback";
opResult = await this.utilsNeedSve.reqCenterOrderQcApi(pobj);
break;
case "icpNotifyNew"://icp方案更新
opResult = await this.utilsNeedSve.icpNotifyNew(pobj, pobj.actionBody);
if (opResult.status == 0 && pobj.actionBody.status == 1) {
opResult = await self.centerorderSve.icppaysuccessNew(pobj, pobj.actionBody);
}
break;
//-----------接入百度ICP------end----------------------------------
default:
opResult = system.getResult(null, "action_type参数错误");
break;
}
return opResult;
}
}
module.exports = Need2;
\ No newline at end of file
......@@ -91,7 +91,7 @@ class BaseCenterOrderService extends AppServiceBase {
//提交Icp注册方案
async submitIcpProgramme(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard");
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data && res.data.needinfo && res.data.needsolution) {
var needinfo = res.data.needinfo;//需求信息
var needsolution = res.data.needsolution;//方案信息
......@@ -280,7 +280,7 @@ class BaseCenterOrderService extends AppServiceBase {
//交付材料提交
async serviceProviderSubmitMaterial(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard");
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) {
var needsolution = res.data;//方案信息
var ab = pobj.actionBody;
......@@ -354,7 +354,7 @@ class BaseCenterOrderService extends AppServiceBase {
}
//通知交付状态变更
async serviceProviderNotification(pobj) {
var res = await this.reqCenterOrderApi(pobj, "action/baseapi/springBoard");
var res = await this.reqCenterOrderApi(pobj, "action/qcapi/springBoard");
if (res && res.status == 0 && res.data) {
if(res.data.uapp_id == uappId.ali){
//推送数据至阿里
......
......@@ -271,7 +271,7 @@ class UtilsNeedService2 extends AppServiceBase {
var self = this;
pobj.actionBody.intentionBizId = pobj.actionBody.channelNeedNo;
pobj.actionType = "abolishIcpProgrammeByNeed"
var reqUrl = this.centerOrderUrl + "action/baseapi/springBoard";
var reqUrl = this.centerOrderUrl + "action/qcapi/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
this.logCtl.info({
appid: pobj.appInfo ? pobj.appInfo.uapp_id || "" : "",
......
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