Commit ac97458e by Sxy

fix: 产品名称筛选

parent 4694aff8
...@@ -18,13 +18,15 @@ class DeliverDao extends Dao { ...@@ -18,13 +18,15 @@ class DeliverDao extends Dao {
qc.where["delivery_man_opcode"] = { [this.db.Op.like]: `%${qobj.opath}%` } qc.where["delivery_man_opcode"] = { [this.db.Op.like]: `%${qobj.opath}%` }
} }
let { search: { product_code } } = qobj;
qc.raw = true; qc.raw = true;
let type = qobj.bizpath.split('/')[1]; let type = qobj.bizpath.split('/')[1];
if (type === 'deliveryManagement') { if (type === 'deliveryManagement') {
qc.where.product_code = qc.where.product_code && [system.SERVICECODE.EDI, system.SERVICECODE.ICP].includes(qc.where.product_code) ? qc.where.product_code : { qc.where.product_code = product_code && [system.SERVICECODE.EDI, system.SERVICECODE.ICP].includes(product_code) ? qc.where.product_code : {
$in: [system.SERVICECODE.EDI, system.SERVICECODE.ICP] $in: [system.SERVICECODE.EDI, system.SERVICECODE.ICP]
} }
switch (qobj.bizpath) { switch (qobj.bizpath) {
case "/deliveryManagement/wait": case "/deliveryManagement/wait":
qc.where.delivery_status = qc.where.delivery_status || { qc.where.delivery_status = qc.where.delivery_status || {
...@@ -37,7 +39,7 @@ class DeliverDao extends Dao { ...@@ -37,7 +39,7 @@ class DeliverDao extends Dao {
break break
} }
} else if (type === "annualReport") { } else if (type === "annualReport") {
qc.where.product_code = qc.where.product_code && [system.SERVICECODE.ICPANNUALREPORT, system.SERVICECODE.EDIANNUALREPORT].includes(qc.where.product_code) ? qc.where.product_code : { qc.where.product_code = product_code && [system.SERVICECODE.ICPANNUALREPORT, system.SERVICECODE.EDIANNUALREPORT].includes(product_code) ? qc.where.product_code : {
$in: [system.SERVICECODE.EDIANNUALREPORT, system.SERVICECODE.ICPANNUALREPORT] $in: [system.SERVICECODE.EDIANNUALREPORT, system.SERVICECODE.ICPANNUALREPORT]
} }
......
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