|
|
@@ -57,6 +57,9 @@ class ViolationProduct extends Api
|
|
|
$shipment_city_id = request('shipment_city_id', '');
|
|
|
$province_id = request('province_id', '');
|
|
|
$city_id = request('city_id', '');
|
|
|
+ $first_responsible_person_name = request('first_responsible_person_name', '');
|
|
|
+ $responsible_person_name = request('responsible_person_name', '');
|
|
|
+ $source_responsible_person_name = request('source_responsible_person_name', '');
|
|
|
// 时间条件
|
|
|
if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
|
|
|
if ($end_time) $map[] = ['insert_time', '<=', strtotime($end_time)];
|
|
|
@@ -71,6 +74,23 @@ class ViolationProduct extends Api
|
|
|
if ($province_id) $map[] = ['province_id', '=', $province_id];
|
|
|
if ($city_id) $map[] = ['city_id', '=', $city_id];
|
|
|
|
|
|
+
|
|
|
+ // 第一责任人名称查询
|
|
|
+ if($first_responsible_person_name){
|
|
|
+ $first_responsible_person_id = $ViolationProductMemberModel->where('name', 'like', "%$first_responsible_person_name%")->pluck('department_id')->toarray();
|
|
|
+ $ViolationProductModel = $ViolationProductModel->whereIn('id',$first_responsible_person_id);
|
|
|
+ }
|
|
|
+ // 责任人名称查询
|
|
|
+ if($responsible_person_name){
|
|
|
+ $responsible_person_id = $ViolationProductMemberModel->where('name', 'like', "%$responsible_person_name%")->pluck('department_id')->toarray();
|
|
|
+ $ViolationProductModel = $ViolationProductModel->whereIn('id',$responsible_person_id);
|
|
|
+ }
|
|
|
+ // 来源责任人名称查询
|
|
|
+ if($source_responsible_person_name){
|
|
|
+ $source_responsible_person_id = $ViolationProductMemberModel->where('name', 'like', "%$source_responsible_person_name%")->pluck('department_id')->toarray();
|
|
|
+ $ViolationProductModel = $ViolationProductModel->whereIn('id',$source_responsible_person_id);
|
|
|
+ }
|
|
|
+
|
|
|
//多选平台查询
|
|
|
if($platform && is_string($platform)){
|
|
|
$platform = explode(',', $platform);
|