Commit fd9b95a4 by 王昆

gsb

parent f3b6b102
...@@ -5,10 +5,12 @@ var settings = require("../../../../config/settings"); ...@@ -5,10 +5,12 @@ var settings = require("../../../../config/settings");
const CtlBase = require("../../ctlms.base"); const CtlBase = require("../../ctlms.base");
var cacheBaseComp = null; var cacheBaseComp = null;
class OrderCtl extends CtlBase { class OrderCtl extends CtlBase {
constructor() { constructor() {
super(); super();
this.orderSve = system.getObject("service.order.orderSve"); this.orderSve = system.getObject("service.order.orderSve");
this.userSve = system.getObject("service.uc.userSve");
} }
async processList(pobj, pobj2, req) { async processList(pobj, pobj2, req) {
...@@ -41,8 +43,33 @@ class OrderCtl extends CtlBase { ...@@ -41,8 +43,33 @@ class OrderCtl extends CtlBase {
} }
} }
async doProcess(pobj, pobj2, req) { async orderAssign(pobj, pobj2, req) {
var condition = {
id: this.trim(pobj.id),
status: pobj.status,
bd_id: Number(pobj.bd_id)
}
// * @bd_path String 业务员权限
let bd = await this.userSve.queryById({id: condition.bd_id});
console.log(bd);
bd = bd.data;
if (!bd) {
return system.getResult(null, "业务员不存在");
}
if (!bd.orgpath) {
return system.getResult(null, "用户组织机构异常");
}
condition.bd_path = bd.orgpath;
console.log(bd);
try {
return await this.orderSve.handleStatus(condition);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
} }
} }
module.exports = OrderCtl; module.exports = OrderCtl;
\ No newline at end of file
...@@ -22,6 +22,9 @@ class OrderService extends ServiceBase { ...@@ -22,6 +22,9 @@ class OrderService extends ServiceBase {
return rs; return rs;
} }
async handleStatus(params) {
return await this.callms("order", "handleStatus", params);
}
async statManageData(params) { async statManageData(params) {
var res = await this.callms("order", "statTransData", params); var res = await this.callms("order", "statTransData", 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