Commit af6716cd by 王昆

gsb

parent 86bd6971
...@@ -17,6 +17,8 @@ class ActionAPI extends APIBase { ...@@ -17,6 +17,8 @@ class ActionAPI extends APIBase {
this.oorderSve = system.getObject("service.order.oorderSve"); this.oorderSve = system.getObject("service.order.oorderSve");
this.oorderdeliverSve = system.getObject("service.order.oorderdeliverSve"); this.oorderdeliverSve = system.getObject("service.order.oorderdeliverSve");
this.oprocessSve = system.getObject("service.product.oprocessSve");
} }
/** /**
* 接口跳转 * 接口跳转
...@@ -63,6 +65,10 @@ class ActionAPI extends APIBase { ...@@ -63,6 +65,10 @@ class ActionAPI extends APIBase {
opResult = await this.oorderSve.addSourceOrder(action_body); opResult = await this.oorderSve.addSourceOrder(action_body);
break; break;
case "allProcess": // 查询业务进度
opResult = await this.oprocessSve.allNames(action_body);
break;
//******************************************************************** */ //******************************************************************** */
// 订单 // 订单
......
...@@ -5,11 +5,15 @@ class OprocessDao extends Dao { ...@@ -5,11 +5,15 @@ class OprocessDao extends Dao {
super(Dao.getModelName(OprocessDao)); super(Dao.getModelName(OprocessDao));
} }
async mapAll(attrs) { async getAll(attrs) {
var result = {};
attrs = attrs || "*"; attrs = attrs || "*";
var sql = "SELECT " + attrs + " FROM `o_process`"; let sql = "SELECT " + attrs + " FROM `o_process` ORDER BY `status` ASC";
var list = await this.customQuery(sql); return await this.customQuery(sql);
}
async mapAll(attrs) {
let result = {};
let list = await this.getAll(attrs);
if (!list || list.length == 0) { if (!list || list.length == 0) {
return result; return result;
} }
...@@ -20,14 +24,14 @@ class OprocessDao extends Dao { ...@@ -20,14 +24,14 @@ class OprocessDao extends Dao {
} }
async findMapByIds(ids, attrs) { async findMapByIds(ids, attrs) {
var result = {}; let result = {};
if (!ids || ids.length == 0) { if (!ids || ids.length == 0) {
return result; return result;
} }
attrs = attrs || "*"; attrs = attrs || "*";
var sql = "SELECT " + attrs + " FROM `o_process` WHERE id IN (:ids)"; let sql = "SELECT " + attrs + " FROM `o_process` WHERE id IN (:ids)";
var list = await this.customQuery(sql, { let list = await this.customQuery(sql, {
ids: ids ids: ids
}); });
......
const system = require("../../../system"); const system = require("../../../system");
const ServiceBase = require("../../sve.base") const ServiceBase = require("../../sve.base")
/** /**
* 订单产品表 * 订单产品表
*/ */
...@@ -8,6 +9,10 @@ class OprocessService extends ServiceBase { ...@@ -8,6 +9,10 @@ class OprocessService extends ServiceBase {
super("product", ServiceBase.getDaoName(OprocessService)); super("product", ServiceBase.getDaoName(OprocessService));
} }
async allNames() {
let all = await this.dao.getAll("status, name");
return system.getResultSuccess(all);
}
} }
module.exports = OprocessService; module.exports = OprocessService;
\ 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