Commit 8fc483a8 by 王昆

gsb

parent 2bf175d3
......@@ -5,5 +5,15 @@ class OprocessDao extends Dao {
super(Dao.getModelName(OprocessDao));
}
async findMapByIds(ids) {
var result = {};
if (!ids || ids.length == 0) {
return result;
}
var sql = "SELECT ";
}
}
module.exports = OprocessDao;
\ No newline at end of file
......@@ -26,7 +26,7 @@ class OorderService extends ServiceBase {
async addSourceOrder(params) {
// 整理参数
let order = {
merchantId : "",
merchantId: "",
channelOrderNo: "",
busi_type: 1,
busi_id: "",
......@@ -38,8 +38,20 @@ class OorderService extends ServiceBase {
order.notes = this.trim(params.notes);
order.contactMobile = this.trim(params.contactMobile);
// 验证sourceId
// 验证来源
let source = await this.osourceDao.findById(order.sourceId);
if (!source) {
return system.getResult(null, "来源错误");
}
// 验证产品
let product = await this.oproductDao.findById(order.productId);
if (!product) {
return system.getResult(null, "产品错误");
}
// 获取产品状态
await this.getProductProcess();
// 查询产品订单状态
......@@ -66,6 +78,34 @@ class OorderService extends ServiceBase {
// 调用状态func(order, nextObj, params)
}
async getProductProcessList(params) {
var options = {};
options.where = params;
options.raw = true;
options.order = [['sort', 'ASC']];
var oplist = await this.oproductprocessDao.model.findAll(options);
if (!oplist) {
return [];
}
let processIds = [];
for (var item of oplist) {
processIds.push(item.processId);
}
var optionsProcess = {};
optionsProcess.where = {
};
optionsProcess.raw = true;
optionsProcess.order = [['sort', 'ASC']];
await this.oprocessDao.model.findAll();
}
}
module.exports = OorderService;
\ 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