Commit fea47653 by Sxy

fix: bug

parent d0bb75e6
......@@ -5,10 +5,10 @@ class DeliverDao extends Dao {
constructor() {
super(Dao.getModelName(DeliverDao));
}
orderBy () {
orderBy() {
return [["updated_at", "DESC"]];
}
extraWhere (qobj, qw, qc) {
extraWhere(qobj, qw, qc) {
// 权限添加
//需要添加公司查询条件
......@@ -40,12 +40,19 @@ class DeliverDao extends Dao {
break
case "/deliveryManagement/deliveryAllocated":
qc.where.delivery_man_id = qc.where.delivery_man_id || {
$and:[{$not:null},{$not:""}]
$and: [{ $not: null }, { $not: "" }]
}
break
case "/deliveryManagement/deliveryNoAllocate":
qc.where.delivery_man_id = qc.where.delivery_man_id || {
$or: [{$eq:null} ,{$eq:""}]
$or: [{ $eq: null }, { $eq: "" }]
}
if (qc.where['$or']) {
qc.where['$or'].push({
salesman_opcode: {
$eq: null
}
})
}
break
case "/deliveryManagement/all":
......@@ -105,7 +112,7 @@ class DeliverDao extends Dao {
return qw;
}
async findInfo (pobj) {
async findInfo(pobj) {
const result = await this.model.findOne({
where: {
id: pobj.id
......@@ -124,7 +131,7 @@ class DeliverDao extends Dao {
});
return result;
}
async findAnnualReportInfo (pobj) {
async findAnnualReportInfo(pobj) {
const result = await this.model.findOne({
where: {
id: pobj.id
......
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