Commit 3c9aeb12 by 兰国旗

laolan

parent 8ccd9019
...@@ -34,16 +34,19 @@ class RegAPI extends APIBase { ...@@ -34,16 +34,19 @@ class RegAPI extends APIBase {
case "receiveSolutionPayInfoNew"://接收reg方案状态及支付信息(方案支付后创建订单时调用) case "receiveSolutionPayInfoNew"://接收reg方案状态及支付信息(方案支付后创建订单时调用)
opResult = await this.regCenterOrderSve.receiveSolutionPayInfoNew(pobj); opResult = await this.regCenterOrderSve.receiveSolutionPayInfoNew(pobj);
break; break;
// case "receiveOrderStatusNotify"://接收订单状态推送 百度reg 2.3
// opResult = await this.regCenterOrderSve.receiveOrderStatusNotify(pobj);
// break;
case "getItemByChannelSolutionNo"://渠道方案号获取需求详情 case "getItemByChannelSolutionNo"://渠道方案号获取需求详情
opResult = await this.regCenterOrderSve.getItemByChannelSolutionNo(pobj, pobj.actionBody, req); opResult = await this.regCenterOrderSve.getItemByChannelSolutionNo(pobj, pobj.actionBody, req);
break; break;
case "getRegOrderStatus"://接收订单状态推送 百度reg 2.3 case "regOrderStatus"://接收订单状态推送 百度reg 2.3
opResult = await this.regCenterOrderSve.getRegOrderStatus(pobj); opResult = await this.regCenterOrderSve.regOrderStatus(pobj);
break; break;
case "addRegSalesmanInfo"://添加业务员信息,用于直接下单的reg订单 case "addRegSalesmanInfo"://添加业务员信息,用于直接下单的reg订单
opResult = await this.regCenterOrderSve.addRegSalesmanInfo(pobj); opResult = await this.regCenterOrderSve.addRegSalesmanInfo(pobj);
break; break;
case "submitRegNeed"://提交需求 case "submitRegNeed"://提交需求 2.1
opResult = await this.regCenterOrderSve.submitRegNeed(pobj, pobj.actionBody, req); opResult = await this.regCenterOrderSve.submitRegNeed(pobj, pobj.actionBody, req);
break; break;
...@@ -59,9 +62,12 @@ class RegAPI extends APIBase { ...@@ -59,9 +62,12 @@ class RegAPI extends APIBase {
case "updateRegOrdertatus"://提交交付信息/修改订单状态 case "updateRegOrdertatus"://提交交付信息/修改订单状态
opResult = await this.regCenterOrderSve.updateRegOrdertatus(pobj); opResult = await this.regCenterOrderSve.updateRegOrdertatus(pobj);
break; break;
case "closeRegNeed"://需求关闭 case "closeRegNeed"://前端关闭reg需求及方案
opResult = await this.regCenterOrderSve.closeRegNeed(pobj); opResult = await this.regCenterOrderSve.closeRegNeed(pobj);
break; break;
case "getRegInfoByChannelNeedNo"://获取需求方案列表
opResult = await this.regCenterOrderSve.reqCenterOrderApi(pobj);
break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
const system = require("../../../system");
const Dao = require("../../dao.base");
class RegCenterorderDao extends Dao {
constructor() {
super(Dao.getModelName(RegCenterorderDao));
}
async getItemByNeedNo(needNo) {
return await this.model.findOne({
where: {
needNo: needNo
},
attributes: [
"id",
"uapp_id",
"needNo",
"channelNeedNo",
"channelUserId",
"followManUserId",
"followManMobile",
"city",
"province",
"publishContent",
"publishName",
"publishMobile",
"notes",
"followContent",
"disposeNotes",
"status",
"statusName",
"typeCode",
"typeName",
"channelTypeCode",
"channelTypeName",
"publisherOnlyCode",
"followManName",
"followManOnlyCode",
"created_at"],
raw: true
});
}
async getItemByChannelNeedNo(channelNeedNo) {
return await this.model.findOne({
where: {
channelNeedNo: channelNeedNo
},
attributes: [
"id",
"uapp_id",
"needNo",
"channelNeedNo",
"channelUserId",
"followManUserId",
"followManMobile",
"city",
"province",
"publishContent",
"publishName",
"publishMobile",
"notes",
"followContent",
"disposeNotes",
"status",
"typeCode",
"typeName",
"channelTypeCode",
"channelTypeName",
"publisherOnlyCode",
"followManName",
"followManOnlyCode"],
raw: true
});
}
}
module.exports = RegCenterorderDao;
const system = require("../../../system");
const settings = require("../../../../config/settings");
const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => {
return db.define("regcenterorder", {
uapp_id: DataTypes.INTEGER,
channelNeedNo: DataTypes.STRING(128), //渠道需求号(页面中列表中显示该需求号)
needNo: DataTypes.STRING(128), //需求号--用于服务商或需求表中创建订单
channelUserId: DataTypes.INTEGER,//发布者id
publishName: DataTypes.STRING,//发布者姓名
publisherOnlyCode: DataTypes.STRING(50),//发布者唯一码
publishContent: DataTypes.STRING,//发布内容
publishMobile: DataTypes.STRING,//发布者手机号
followManUserId: DataTypes.INTEGER,//跟进人id
followManName: DataTypes.STRING,//跟进人姓名
followManMobile: DataTypes.STRING,//跟进人手机号(合伙人)
followManOnlyCode: DataTypes.STRING(50),//跟进者唯一码
followContent: DataTypes.JSON,//跟进内容
productOneType_id: DataTypes.STRING,//产品大类Id
productType_id: DataTypes.STRING,//产品类型Id
notes: DataTypes.STRING,//备注
disposeNotes: DataTypes.STRING,//处理的备注
statusName: DataTypes.STRING,
status: {
//wts未推送,yts已推送,ygj已跟进,ycd已成单
type: DataTypes.ENUM,
values: Object.keys(uiconfig.config.pdict.push_chance_type),
set: function (val) {
this.setDataValue("status", val);
this.setDataValue("statusName", uiconfig.config.pdict.push_chance_type[val]);
}
},
city: DataTypes.STRING(50), // 城市
province: DataTypes.STRING(50), // 省份
typeCode: DataTypes.STRING(50), //产品类型编码',
typeName: DataTypes.STRING(50), //类型产品名称',
channelTypeCode: DataTypes.STRING(50), //渠道产品类型编码',
channelTypeName: DataTypes.STRING(255), //渠道产品类型名称',
level: DataTypes.STRING(20), //商机等级
probability: DataTypes.STRING(20), //商机概率
}, {
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'n_need_info',
validate: {
},
indexes: [
]
});
}
...@@ -992,6 +992,15 @@ class OrderInfoService extends ServiceBase { ...@@ -992,6 +992,15 @@ class OrderInfoService extends ServiceBase {
await this.dao.delOrderByOrderNo(actionBody.orderNo, pobj.appInfo.uapp_id, pobj.userInfo.channel_userid); await this.dao.delOrderByOrderNo(actionBody.orderNo, pobj.appInfo.uapp_id, pobj.userInfo.channel_userid);
return system.getResultSuccess(); return system.getResultSuccess();
} }
//reg关闭订单 2020-12-20
async delOrders(pobj, actionBody) {//删除订单
var i;
var len = actionBody.orderNo.length
for(i=0;i<len;i++){
await this.dao.delOrderByOrderNo(actionBody.orderNo[i], pobj.appInfo.uapp_id, pobj.userInfo.channel_userid);
}
return system.getResultSuccess();
}
// 2020 0918 lin 新增 根据OrderStatus查询订单 // 2020 0918 lin 新增 根据OrderStatus查询订单
async queryVOrderByOrderStatusAndItemCode(pobj, actionBody) { async queryVOrderByOrderStatusAndItemCode(pobj, actionBody) {
var sql = "select `id`,`isSolution`,`orderNo`,`channelServiceNo`,`channelOrderNo`,`channelUserId`,`ownerUserId`,`payTime`,`quantity`,`serviceQuantity`,`orderStatusName`,`orderStatus`,`totalSum`,`payTotalSum`,`refundSum`," var sql = "select `id`,`isSolution`,`orderNo`,`channelServiceNo`,`channelOrderNo`,`channelUserId`,`ownerUserId`,`payTime`,`quantity`,`serviceQuantity`,`orderStatusName`,`orderStatus`,`totalSum`,`payTotalSum`,`refundSum`,"
......
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