Commit b13d4d14 by linboxuan

Merge remote-tracking branch 'origin/center-order' into center-order

parents f5acc34a 255b9181
......@@ -28,7 +28,10 @@ class APIBase {
return system.getResultSuccess();
}
}
if (["updateTmStatus","bulkCreateNeeds","bulkCreateOrders"].indexOf(methodname) >= 0) {
if (["updateTmStatus","bulkCreateNeeds","bulkCreateOrders","getNeedComparisonList"].indexOf(methodname) >= 0) {
return system.getResultSuccess();
}
if (["getNeedComparisonList"].indexOf(method) >= 0) {
return system.getResultSuccess();
}
if (!pobj.appInfo) {
......
......@@ -59,6 +59,9 @@ class IcAPI extends APIBase {
case "getSolutionByChannelOrderNo"://渠道订单号获取方案详情
opResult = await this.needinfoSve.getSolutionByChannelOrderNo(pobj, pobj.actionBody, req);
break;
case "getOrderInfoByChannelOrderNo"://渠道订单号获取订单信息
opResult = await this.needinfoSve.getOrderInfoByChannelOrderNo(pobj, pobj.actionBody, req);
break;
case "writeCommunicationLog"://渠道方案号获取需求详情
opResult = await this.needinfoSve2.writeCommunicationLog(pobj, pobj.actionBody, req);
break;
......
var APIBase = require("../../api.base");
// var system = require("../../../system");
var system = require("../../../system");
// var settings = require("../../../../config/settings");
class TaskAction extends APIBase {
// constructor() {//由dba进行处理了
......@@ -14,10 +14,11 @@ class TaskAction extends APIBase {
// * action_type 执行的类型
// * action_body 执行的参数
// */
// async taskNeed(pobj, qobj, req) {
async taskNeed(pobj, qobj, req) {
return system.getResultSuccess();
// var result = await this.opneedinfoSve.syncNeedBusiness();
// return result;
// }
}
//
// async taskProduct(pobj, qobj, req) {
// var result = await this.orderproductSve.syncProductData();
......
......@@ -237,6 +237,13 @@ class NeedinfoService extends ServiceBase {
return system.getResultSuccess(item);
}
async getOrderInfoByChannelOrderNo(pobj){
var orderinfo = await this.orderinfoDao.findOne({ channelOrderNo: pobj.actionBody.orderNo });
if (!orderinfo || !orderinfo.orderNo) {
return system.getResult(null, "订单数据为空,302101");
}
return system.getResultSuccess(orderinfo);
}
async submitIcpIntention(pobj, actionBody, req) {
var needNo = await this.getBusUid("n");
var nobj = {
......
......@@ -88,7 +88,7 @@ class NeedinfoService2 extends ServiceBase {
return system.getResult(null, "actionBody.userFeedBack can not be empty,100494");
}
}
var sql = "select uapp_id from n_need_info where channelNeedNo = :channelNeedNo ";
var sql = "select uapp_id,followContent from n_need_info where channelNeedNo = :channelNeedNo ";
var where = {
channelNeedNo:pobj.actionBody.intentionBizId
}
......
......@@ -189,14 +189,22 @@ class BaseQcService {
}
}
if(needinfo.uapp_id == 52){
if (needinfo.channelTypeCode == "7") {//edi
if (needinfo.channelTypeCode == "7") {//edisq
ab.solutionContent.solution.IcpType = 2;
} else if (needinfo.channelTypeCode == "5") {//icp
} else if (needinfo.channelTypeCode == "5") {//icpsq
ab.solutionContent.solution.IcpType = 1;
} else if (needinfo.channelTypeCode == "icpnb") {//icpnb
} else if (needinfo.channelTypeCode == "ICPNB") {//ICPNB
ab.solutionContent.solution.IcpType = 3;
} else if (needinfo.channelTypeCode == "edinb") {//edinb
} else if (needinfo.channelTypeCode == "EIDNB") {//EIDNB
ab.solutionContent.solution.IcpType = 4;
}else if (needinfo.channelTypeCode == "ICPXQ") {//ICPXQ
ab.solutionContent.solution.IcpType = 5;
} else if (needinfo.channelTypeCode == "EIDXQ") {//EIDXQ
ab.solutionContent.solution.IcpType = 6;
} else if (needinfo.channelTypeCode == "ICPWZ") {//ICPWZ
ab.solutionContent.solution.IcpType = 7;
} else if (needinfo.channelTypeCode == "EIDWZ") {//EIDWZ
ab.solutionContent.solution.IcpType = 8;
} else {
return system.getResultFail(-208, "需求业务类型有误-52");
}
......@@ -503,19 +511,19 @@ class BaseQcService {
var uappId = orderuappId.uapp_id;
}
if (uappId != '50') {
if (!needsolutioninfo.channelNeedNo) {
return system.getResultFail(-401, "方案需求信息有误");
}
//获取需求信息
var needinfo = await this.needinfoDao.model.findOne({
where: { channelNeedNo: needsolutioninfo.channelNeedNo }, raw: true
});
if (!needinfo || !needinfo.id) {
return system.getResultFail(-201, "未知需求信息");
}
if (needinfo.status == "ygb") {
return system.getResultFail(-202, "serviceProviderSubmitMateria" + needinfo.statusName + ",不能执行此操作");
}
// if (!needsolutioninfo.channelNeedNo) {
// return system.getResultFail(-401, "方案需求信息有误");
// }
// //获取需求信息
// var needinfo = await this.needinfoDao.model.findOne({
// where: { channelNeedNo: needsolutioninfo.channelNeedNo }, raw: true
// });
// if (!needinfo || !needinfo.id) {
// return system.getResultFail(-201, "未知需求信息");
// }
// if (needinfo.status == "ygb") {
// return system.getResultFail(-202, "serviceProviderSubmitMateria" + needinfo.statusName + ",不能执行此操作");
// }
}
if (ab.ApplicationStatus == 507) {//完成账户注册
if (uappId == '18') {
......
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