Commit 9220be86 by 王昆

gsb

parent 16c84808
......@@ -59,7 +59,9 @@ class ActionAPI extends APIBase {
case "orderInfoAll": // 查订单信息
opResult = await this.oorderSve.infoAll(action_body);
break;
case "orderAndDeliver": // 查订单信息
opResult = await this.oorderSve.orderAndDeliver(action_body);
break;
case "orders": //订单管理(平台)
opResult = await this.oorderSve.orders(action_body);
break;
......@@ -96,6 +98,9 @@ class ActionAPI extends APIBase {
case "queryObusinessmen": //查询个体工商户信息
opResult = await this.obusinessmenSve.queryObusinessmen(action_body);
break;
case "businessmenByOrderId": //查询个体工商户信息
opResult = await this.obusinessmenSve.businessmenByOrderId(action_body);
break;
case "queryObusinessmenInfo": //查询个体工商户信息
opResult = await this.obusinessmenSve.queryObusinessmenInfo(action_body);
break;
......
......@@ -36,6 +36,11 @@ class ObusinessmenService extends ServiceBase {
}
}
async businessmenByOrderId(params) {
let obusinessmen = await this.obusinessmenDao.findOne({order_id: params.order_id});
return system.getResultSuccess(obusinessmen);
}
/**
* 查询 saas推送 相关的信息
* @param {*} params
......
......@@ -206,6 +206,13 @@ class OorderService extends ServiceBase {
return system.getResultSuccess(result);
}
async orderAndDeliver(params) {
let order = await this.dao.getById(params.id);
let orderDeliver = await this.oorderdeliverDao.getById(order.deliver_id) || {};
orderDeliver.deliver_divide = system.f2y(orderDeliver.deliver_divide);
return system.getResultSuccess({order: order, orderDeliver: orderDeliver});
}
/**
* 构建产品流程对象
* @param productPid
......@@ -313,14 +320,14 @@ class OorderService extends ServiceBase {
//查出订单的所有流程
let oorderProcessInfo = await this.oorderprocessDao.findAllByOrderId(_order.id);
//筛选出每个状态对应的 产品ID 格式 1010 -> 10100100
let filterMap = {};
let filterMap = {};
//查询每个状态对应的产品id
let oproductInfo =await this.oprocessDao.findAllByPorductId(productIds);
for(let item of oproductInfo){
filterMap[item.status] = item.product_id;
}
//遍历 oorderProcessInfo 数组 为每一个值都添加 delete_mark product_id change_func三个属性
for(let item of oorderProcessInfo){
item.productId=filterMap[item.status];
item.delete_mark=false;
......@@ -334,7 +341,7 @@ class OorderService extends ServiceBase {
if(oorderProcessInfo[i+1]){
oorderProcessInfo[i+1].change_func=oorderProcessInfo[i].func;
}
if(!productIds.includes(oorderProcessInfo[i].productId)){
oorderProcessInfo[i].delete_mark=true;
if(oorderProcessInfo[i+1]){
......@@ -362,7 +369,7 @@ class OorderService extends ServiceBase {
preNextStatus.next_name=current.name;
pre.next_status=`[${JSON.stringify(preNextStatus)}]`;
}
}
}
return new_oorderProcessInfo;
} catch (error) {
console.log(error);
......@@ -619,7 +626,7 @@ class OorderService extends ServiceBase {
/**
* 平台数据统计 (订单数量和交易额度)
* @param {*} params
* @param {*} params
*/
async statTransData(params) {
if (!params.current_date) {
......@@ -685,7 +692,7 @@ class OorderService extends ServiceBase {
/**
* 待办事项
* @param {*} params
* @param {*} params
*/
async needToBeDealtWith(params) {
if (!params.current_date) {
......@@ -744,7 +751,7 @@ class OorderService extends ServiceBase {
/**
* 交付商业务概览
* @param {*} params
* @param {*} params
*/
async deliverData(params){
if(!params.current_date){
......
......@@ -626,6 +626,7 @@ class OorderstatusService extends ServiceBase {
_obusinessmenProperty.deliver_id = this.trim(params.deliver_id);
_obusinessmenProperty.delier_user_id = this.trim(params.delier_user_id);
_obusinessmenProperty.deliver_user_path= this.trim(params.deliver_user_path);
_obusinessmenProperty.company_id = this.trim(params.company_id);
let orderProperty = {};
orderProperty.id = _order.id;
orderProperty.status = this.trim(params.status);
......@@ -1041,7 +1042,6 @@ class OorderstatusService extends ServiceBase {
}
}
/**
* 阿里建账
* @param params
......
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