Commit af6716cd by 王昆

gsb

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