Commit ac5d6205 by Sxy

fix: 未分配查询

parent a0618ce4
...@@ -53,31 +53,34 @@ class DeliverDao extends Dao { ...@@ -53,31 +53,34 @@ class DeliverDao extends Dao {
break; break;
case '/deliveryManagement/deliveryAllocated': case '/deliveryManagement/deliveryAllocated':
if (!qc.where.$and) { if (!qc.where.$and) {
qc.where.$and = [] qc.where.$and = [];
} }
qc.where.$and.push(...[{ qc.where.$and.push(...[{
delivery_man_id: { delivery_man_opcode: {
$and: [{ $not: null }, { $not: '' }], $and: [{ $not: null }, { $not: '' }],
} }
}, { }, {
salesman_id: { salesman_opcode: {
$and: [{ $not: null }, { $not: '' }], $and: [{ $not: null }, { $not: '' }],
} }
}]); }]);
break; break;
case '/deliveryManagement/deliveryNoAllocate': case '/deliveryManagement/deliveryNoAllocate':
if (!qc.where.$or) { delete qc.where.$or;
qc.where.$or = [] if (!qc.where.$and) {
qc.where.$and = [];
} }
qc.where.$or.push(...[{ qc.where.$and.push({
delivery_man_id: { $or: [{
$or: [{ $eq: null }, { $eq: '' }], delivery_man_opcode: {
} $or: [{ $eq: null }, { $eq: '' }],
}, { }
salesman_id: { }, {
$or: [{ $eq: null }, { $eq: '' }], salesman_opcode: {
} $or: [{ $eq: null }, { $eq: '' }],
}]); }
}]
})
break; break;
case '/deliveryManagement/all': case '/deliveryManagement/all':
break; break;
......
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