Commit 641e4576 by 杨树贤

恢复

parent 24015c64
...@@ -259,15 +259,16 @@ class SupplierFilter ...@@ -259,15 +259,16 @@ class SupplierFilter
break; break;
//附件里面缺少品质协议的 //附件里面缺少品质协议的
case "no_quality_assurance_agreement": case "no_quality_assurance_agreement":
$query->leftjoin('supplier_attachments', 'supplier_channel.supplier_id', '=', $query->leftjoin('supplier_attachment', 'supplier_channel.supplier_id', '=',
'supplier_attachments.supplier_id') 'supplier_attachment.supplier_id')
->selectRaw('lie_supplier_channel.*, ->selectRaw('lie_supplier_channel.*,
lie_supplier_attachments.field_name,lie_supplier_attachments.supplier_id as supplier_attachments_supplier_id') lie_supplier_attachment.quality_assurance_agreement,lie_supplier_attachment.supplier_id as supplier_attachment_supplier_id')
->where(function ($q) { ->where(function ($q) {
$q->whereRaw("(SELECT count(1) FROM lie_supplier_attachments WHERE `lie_supplier_attachments`.`supplier_id` = `lie_supplier_channel`.`supplier_id` AND `lie_supplier_attachments`.field_name = 'quality_assurance_agreement') = 0"); $q->where('supplier_attachment.quality_assurance_agreement', '')
->orWhereNull('supplier_attachment.supplier_id');
}); });
// $query->whereNotIn('status', $query->whereNotIn('status',
// [SupplierChannelModel::STATUS_DISABLE, SupplierChannelModel::STATUS_BLOCK]); [SupplierChannelModel::STATUS_DISABLE, SupplierChannelModel::STATUS_BLOCK]);
//而且还是现货商类型的供应商 //而且还是现货商类型的供应商
$query->where('supplier_group', 2); $query->where('supplier_group', 2);
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 sign in to comment