|
@@ -49,6 +49,7 @@ class ViolationProduct extends Controller
|
|
|
$company_scope = request('company_scope', '');
|
|
$company_scope = request('company_scope', '');
|
|
|
$category_id = request('category_id', '');
|
|
$category_id = request('category_id', '');
|
|
|
$product_brand = request('product_brand', '');
|
|
$product_brand = request('product_brand', '');
|
|
|
|
|
+ $company_name = request('company_name', '');
|
|
|
// 时间条件
|
|
// 时间条件
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
@@ -74,6 +75,15 @@ class ViolationProduct extends Controller
|
|
|
->distinct('product_id');;
|
|
->distinct('product_id');;
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ if ($company_name) {
|
|
|
|
|
+ $ViolationProductModel = $ViolationProductModel->whereIn('id', function ($query) use ($company_name) {
|
|
|
|
|
+ $query->select('washconfig_violation_product_company.violation_product_logid')
|
|
|
|
|
+ ->from('washconfig_violation_product_company')
|
|
|
|
|
+ ->join('washconfig_violation_store', 'washconfig_violation_store.id', '=', 'washconfig_violation_product_company.company_id')
|
|
|
|
|
+ ->where('washconfig_violation_store.company_name', 'like', "%$company_name%")
|
|
|
|
|
+ ->distinct('washconfig_violation_product_company.company_id');
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
$result = $ViolationProductModel
|
|
$result = $ViolationProductModel
|
|
|
->where($map)
|
|
->where($map)
|
|
|
->with(['product_keyword'])
|
|
->with(['product_keyword'])
|