|
|
@@ -15,6 +15,7 @@ use App\Services\LogisticService;
|
|
|
use App\Services\OwnerService;
|
|
|
use App\Services\QualityLabelService;
|
|
|
use App\Services\RejectedService;
|
|
|
+use App\Services\UserService;
|
|
|
use Carbon\Carbon;
|
|
|
use Exception;
|
|
|
use Illuminate\Contracts\Foundation\Application;
|
|
|
@@ -33,9 +34,11 @@ use Oursdreams\Export\Export;
|
|
|
|
|
|
class RejectedController extends Controller
|
|
|
{
|
|
|
- public function __construct()
|
|
|
+ private $userService;
|
|
|
+ public function __construct(UserService $userService)
|
|
|
{
|
|
|
app()->singleton('RejectedService',RejectedService::class);
|
|
|
+ $this->userService = $userService;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -486,8 +489,13 @@ class RejectedController extends Controller
|
|
|
// 统计查询参数获取 zengjun
|
|
|
private function getAnalyzeSearchParams(Request $request)
|
|
|
{
|
|
|
+ $owner_id = $request->input('owner',[]);
|
|
|
+ $owner_ids = $this->userService->getPermittingLogisticIds(Auth::user());
|
|
|
+ if(!is_array($owner_id))$owner_id = [$owner_id];
|
|
|
+ if(count($owner_id) != 0) $owner_ids = array_intersect($owner_ids,$owner_id);
|
|
|
+ $owner_ids = implode(',',$owner_ids);
|
|
|
$searchParams = [
|
|
|
- 'owner_id' => $request->input('owner_id'),
|
|
|
+ 'owner_id' => $owner_ids,
|
|
|
'data'=> $request->input('data'),
|
|
|
'created_at_start' => $request->input('created_at_start'),
|
|
|
'created_at_end' => $request->input('created_at_end'),
|