Commit e21d8faf by 王昆

gsb

parent 3bad1f9d
...@@ -84,140 +84,146 @@ class ActionAPI extends APIBase { ...@@ -84,140 +84,146 @@ class ActionAPI extends APIBase {
opResult = await this.obusinessmenSve.queryObusinessmen(action_body); opResult = await this.obusinessmenSve.queryObusinessmen(action_body);
break; break;
//******************************************************************** */
// 订单
case "createOrder": //创建订单
opResult = await this.iborderbaseSve.apiCreateOrder(action_body);
break;
case "completedOrder": //完善信息接口
opResult = await this.iborderbaseSve.apiCompletedOrder(action_body);
break;
case "handling": //订单办理接口
opResult = await this.iborderbaseSve.apiHandling(action_body);
break;
// case "orders": //订单列表
// opResult = await this.iborderbaseSve.apiOrders(action_body);
// break;
case "addOrder":
opResult = await this.iborderSve.apiAdd(action_body);
break;
case "updOrder":
opResult = await this.iborderSve.apiUpd(action_body);
break;
// -------------------
case "allOrderList":
opResult = await this.iborderSve.apiAllList(action_body);
break;
// case "orderInfo":
// opResult = await this.iborderSve.apiInfo(action_body);
// break;
// case "orderInfoAll":
// opResult = await this.iborderSve.apiAllInfo(action_body);
// break;
case "byChannelOrderId":
opResult = await this.iborderSve.apiByChannelOrderId(action_body);
break;
case "orderEdit":
opResult = await this.iborderSve.apiEdit(action_body);
break;
case "orderAssign":
opResult = await this.iborderSve.apiAssign(action_body);
break;
case "myOrderPage":
opResult = await this.iborderSve.apiMyPage(action_body);
break;
case "orderPay":
opResult = await this.iborderSve.apiOrderPay(action_body);
break;
case "orderClose":
opResult = await this.iborderSve.apiOrderClose(action_body);
break;
case "closeOrderById":
opResult = await this.iborderSve.apiCloseById(action_body);
break;
case "orderComplete":
opResult = await this.iborderSve.apiComplete(action_body);
break;
case "orderByDeliverId":
opResult = await this.iborderSve.apiByDeliverId(action_body);
break;
// 订单办理 // 个体户
case "orderDeliverList":
opResult = await this.iborderdeliverSve.apiPage(action_body);
break;
case "orderDeliverHandle":
opResult = await this.iborderdeliverSve.apiHandle(action_body);
break;
case "orderDeliverInfo":
opResult = await this.iborderdeliverSve.apiInfo(action_body);
break;
case "orderDeliverEdit":
opResult = await this.iborderdeliverSve.apiEdit(action_body);
break;
case "orderDeliverAudit":
opResult = await this.iborderdeliverSve.apiAudit(action_body);
break;
case "orderDeliverClose":
opResult = await this.iborderdeliverSve.apiClose(action_body);
break;
// 个体户管理
case "businessmenByOrderId":
opResult = await this.businessmenSve.apiByOrderId(action_body);
break;
case "businessmenByChannelOrderNo":
opResult = await this.businessmenSve.apiByChannelOrderNo(action_body);
break;
case "businessmenNameList":
opResult = await this.businessmenSve.apiNameList(action_body);
break;
case "businessmenPage": case "businessmenPage":
opResult = await this.businessmenSve.apiPage(action_body); opResult = await this.businessmenSve.apiPage(action_body);
break; break;
case "businessmenInfo":
opResult = await this.businessmenSve.apiInfo(action_body);
break;
case "businessmenSign":
opResult = await this.businessmenSve.apiSign(action_body);
break;
case "businessmenSignPage":
opResult = await this.businessmenSve.apiSignPage(action_body);
break;
case "businessmenInfoPage":
opResult = await this.businessmenSve.apiInfoPage(action_body);
break;
case "businessmenUserPage":
opResult = await this.businessmenSve.apiUserPage(action_body);
break;
case "businessmenDeliverPage":
opResult = await this.businessmenSve.apiDeliverPage(action_body);
break;
case "addBusinessmenContract":
opResult = await this.businessmenSve.apiAddContract(action_body);
break;
case "businessmenCompleteMapByCreditCodes": //******************************************************************** */
opResult = await this.businessmenSve.apiCompleteMapByCreditCodes(action_body);
break;
// 统计数据 // // 订单
case "statTransData": // case "createOrder": //创建订单
opResult = await this.iborderSve.apiStatTransData(action_body); // opResult = await this.iborderbaseSve.apiCreateOrder(action_body);
break; // break;
case "statBusinessData": // case "completedOrder": //完善信息接口
opResult = await this.iborderSve.apiStatBusinessData(action_body); // opResult = await this.iborderbaseSve.apiCompletedOrder(action_body);
break; // break;
case "statDeliverData": // case "handling": //订单办理接口
opResult = await this.iborderdeliverSve.apiStatDeliverData(action_body); // opResult = await this.iborderbaseSve.apiHandling(action_body);
break; // break;
// // case "orders": //订单列表
// // opResult = await this.iborderbaseSve.apiOrders(action_body);
// // break;
// case "addOrder":
// opResult = await this.iborderSve.apiAdd(action_body);
// break;
// case "updOrder":
// opResult = await this.iborderSve.apiUpd(action_body);
// break;
//
// // -------------------
// case "allOrderList":
// opResult = await this.iborderSve.apiAllList(action_body);
// break;
// // case "orderInfo":
// // opResult = await this.iborderSve.apiInfo(action_body);
// // break;
// // case "orderInfoAll":
// // opResult = await this.iborderSve.apiAllInfo(action_body);
// // break;
// case "byChannelOrderId":
// opResult = await this.iborderSve.apiByChannelOrderId(action_body);
// break;
//
//
// case "orderEdit":
// opResult = await this.iborderSve.apiEdit(action_body);
// break;
// case "orderAssign":
// opResult = await this.iborderSve.apiAssign(action_body);
// break;
// case "myOrderPage":
// opResult = await this.iborderSve.apiMyPage(action_body);
// break;
// case "orderPay":
// opResult = await this.iborderSve.apiOrderPay(action_body);
// break;
// case "orderClose":
// opResult = await this.iborderSve.apiOrderClose(action_body);
// break;
// case "closeOrderById":
// opResult = await this.iborderSve.apiCloseById(action_body);
// break;
// case "orderComplete":
// opResult = await this.iborderSve.apiComplete(action_body);
// break;
// case "orderByDeliverId":
// opResult = await this.iborderSve.apiByDeliverId(action_body);
// break;
//
//
// // 订单办理
// case "orderDeliverList":
// opResult = await this.iborderdeliverSve.apiPage(action_body);
// break;
// case "orderDeliverHandle":
// opResult = await this.iborderdeliverSve.apiHandle(action_body);
// break;
// case "orderDeliverInfo":
// opResult = await this.iborderdeliverSve.apiInfo(action_body);
// break;
// case "orderDeliverEdit":
// opResult = await this.iborderdeliverSve.apiEdit(action_body);
// break;
//
// case "orderDeliverAudit":
// opResult = await this.iborderdeliverSve.apiAudit(action_body);
// break;
//
// case "orderDeliverClose":
// opResult = await this.iborderdeliverSve.apiClose(action_body);
// break;
//
// // 个体户管理
// case "businessmenByOrderId":
// opResult = await this.businessmenSve.apiByOrderId(action_body);
// break;
// case "businessmenByChannelOrderNo":
// opResult = await this.businessmenSve.apiByChannelOrderNo(action_body);
// break;
// case "businessmenNameList":
// opResult = await this.businessmenSve.apiNameList(action_body);
// break;
// case "businessmenPage":
// opResult = await this.businessmenSve.apiPage(action_body);
// break;
// case "businessmenInfo":
// opResult = await this.businessmenSve.apiInfo(action_body);
// break;
// case "businessmenSign":
// opResult = await this.businessmenSve.apiSign(action_body);
// break;
// case "businessmenSignPage":
// opResult = await this.businessmenSve.apiSignPage(action_body);
// break;
// case "businessmenInfoPage":
// opResult = await this.businessmenSve.apiInfoPage(action_body);
// break;
// case "businessmenUserPage":
// opResult = await this.businessmenSve.apiUserPage(action_body);
// break;
// case "businessmenDeliverPage":
// opResult = await this.businessmenSve.apiDeliverPage(action_body);
// break;
// case "addBusinessmenContract":
// opResult = await this.businessmenSve.apiAddContract(action_body);
// break;
//
// case "businessmenCompleteMapByCreditCodes":
// opResult = await this.businessmenSve.apiCompleteMapByCreditCodes(action_body);
// break;
//
// // 统计数据
// case "statTransData":
// opResult = await this.iborderSve.apiStatTransData(action_body);
// break;
// case "statBusinessData":
// opResult = await this.iborderSve.apiStatBusinessData(action_body);
// break;
// case "statDeliverData":
// opResult = await this.iborderdeliverSve.apiStatDeliverData(action_body);
// break;
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
......
...@@ -49,6 +49,8 @@ module.exports = function (db, DataTypes) { ...@@ -49,6 +49,8 @@ module.exports = function (db, DataTypes) {
sign_notes: {type: DataTypes.STRING, field: 'sign_notes', allowNull: true, defaultValue:'', comment:'签约备注' }, sign_notes: {type: DataTypes.STRING, field: 'sign_notes', allowNull: true, defaultValue:'', comment:'签约备注' },
sign_time: {type: DataTypes.DATE, field: 'sign_time', allowNull: true, defaultValue:null, comment:'签约时间' }, sign_time: {type: DataTypes.DATE, field: 'sign_time', allowNull: true, defaultValue:null, comment:'签约时间' },
is_create_account: {type: DataTypes.BOOLEAN, field: 'is_create_account', allowNull: true, defaultValue:false, comment:'是否建帐' }, is_create_account: {type: DataTypes.BOOLEAN, field: 'is_create_account', allowNull: true, defaultValue:false, comment:'是否建帐' },
bd_id: {type: DataTypes.INTEGER, field: 'bd_id', allowNull: true, defaultValue:'', comment:'业务员id' },
bd_path: {type: DataTypes.STRING, field: 'bd_path', allowNull: true, defaultValue:'', comment:'业务员权限路径' },
created_at: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW }, created_at: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW },
updated_at: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW }, updated_at: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW },
deleted_at: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true } deleted_at: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true }
......
...@@ -15,8 +15,8 @@ module.exports = function (db, DataTypes) { ...@@ -15,8 +15,8 @@ module.exports = function (db, DataTypes) {
assign_user_id: {type: DataTypes.BIGINT, field: 'assign_user_id', allowNull: true, defaultValue:'0', comment:'分配人id' }, assign_user_id: {type: DataTypes.BIGINT, field: 'assign_user_id', allowNull: true, defaultValue:'0', comment:'分配人id' },
deliver_id: {type: DataTypes.STRING, field: 'deliver_id', allowNull: true, defaultValue:'', comment:'交付商id common微服务下' }, deliver_id: {type: DataTypes.STRING, field: 'deliver_id', allowNull: true, defaultValue:'', comment:'交付商id common微服务下' },
desc: {type: DataTypes.STRING, field: 'desc', allowNull: true, defaultValue:'', comment:'订单信息' }, desc: {type: DataTypes.STRING, field: 'desc', allowNull: true, defaultValue:'', comment:'订单信息' },
bd_id: {type: DataTypes.STRING, field: 'bd_id', allowNull: true, defaultValue:'', comment:'业务员id' }, bd_id: {type: DataTypes.INTEGER, field: 'bd_id', allowNull: true, defaultValue:'', comment:'业务员id' },
bd_path: {type: DataTypes.BIGINT, field: 'bd_path', allowNull: true, defaultValue:'', comment:'业务员权限路径' }, bd_path: {type: DataTypes.STRING, field: 'bd_path', allowNull: true, defaultValue:'', comment:'业务员权限路径' },
service_items: {type: DataTypes.STRING, field: 'service_items', allowNull: true, defaultValue:'', comment:'服务项json' }, service_items: {type: DataTypes.STRING, field: 'service_items', allowNull: true, defaultValue:'', comment:'服务项json' },
service_remark: {type: DataTypes.STRING, field: 'service_remark', allowNull: true, defaultValue:'', comment:'服务信息备注' }, service_remark: {type: DataTypes.STRING, field: 'service_remark', allowNull: true, defaultValue:'', comment:'服务信息备注' },
source_id: {type: DataTypes.BIGINT, field: 'source_id', allowNull: true, defaultValue:0, comment:'来源id' }, source_id: {type: DataTypes.BIGINT, field: 'source_id', allowNull: true, defaultValue:0, comment:'来源id' },
......
...@@ -23,6 +23,54 @@ class ObusinessmenService extends ServiceBase { ...@@ -23,6 +23,54 @@ class ObusinessmenService extends ServiceBase {
} }
} }
async businessmenPage(params) {
let currentPage = Number(params.currentPage || 1);
let pageSize = Number(params.pageSize || 10);
let bd_id = this.trim(params.bd_id);
let bd_path = this.trim(params.bd_path);
let bdPath = this.trim(params.bdPath);
let ostatuses = params.ostatuses;
var where = {};
var orderby = [
["id", 'desc']
];
if (bdId) {
where.merchant_id = bdId;
}
if (bdPath && bdPath.length > 0) {
where.id = {
[this.db.Op.like]: bdPath + "%"
}
}
if (userId) {
where.userId = userId;
}
if (ostatuses && ostatuses.length > 0) {
where.ostatus = {
[this.db.Op.in]: ostatuses
}
}
this.addWhereTime(where, 'created_at', params.createdBegin, params.createdEnd);
var page = await this.getPageList(currentPage, pageSize, where, orderby, null);
if (page && page.rows) {
for (var row of page.rows) {
await this.dao.setRowCodeName(row, "status");
await this.dao.setRowCodeName(row, "ostatus");
await this.dao.setRowCodeName(row, "deliverType");
this.handleDate(row, ["created_at", "assignTime"], null, -8);
}
}
return system.getResultSuccess(page);
}
} }
module.exports = ObusinessmenService; module.exports = ObusinessmenService;
\ No newline at end of file
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