*
Showing
2 changed files
with
9 additions
and
6 deletions
... | @@ -5,9 +5,6 @@ namespace App\Http\Controllers\Release; | ... | @@ -5,9 +5,6 @@ namespace App\Http\Controllers\Release; |
5 | use App\Helper\CacheKeyTools; | 5 | use App\Helper\CacheKeyTools; |
6 | use App\Helper\Response; | 6 | use App\Helper\Response; |
7 | use App\Http\Controllers\Controller; | 7 | use App\Http\Controllers\Controller; |
8 | use GuzzleHttp\Client; | ||
9 | use Illuminate\Support\Facades\Cache; | ||
10 | use Illuminate\Support\Facades\Log; | ||
11 | 8 | ||
12 | 9 | ||
13 | class BaseController extends Controller | 10 | class BaseController extends Controller | ... | ... |
... | @@ -64,11 +64,17 @@ class IssueService extends Service | ... | @@ -64,11 +64,17 @@ class IssueService extends Service |
64 | */ | 64 | */ |
65 | public function subCompany() | 65 | public function subCompany() |
66 | { | 66 | { |
67 | $filter = ['HNBX', 'HNHZGJ', 'WHCE']; | ||
68 | |||
67 | $company_ids = Stakeholder::query()->whereIn('id', $this->request->get('stakeholder_ids'))->pluck('company_id')->toArray(); | 69 | $company_ids = Stakeholder::query()->whereIn('id', $this->request->get('stakeholder_ids'))->pluck('company_id')->toArray(); |
68 | $subject = Subject::query()->whereIn('company_id', $company_ids) | 70 | $subject = Subject::query()->whereIn('company_id', $company_ids) |
69 | ->where('attr', 'like', "%3%") | 71 | ->where('brand_id', '>', 0) |
70 | ->groupBy('no') | 72 | ->get(['no as value', 'name', 'company_id'])->filter(function ($item) use ($filter) { |
71 | ->get(['no as value', 'name']); | 73 | if ($item->company_id != 1) { |
74 | return true; | ||
75 | } | ||
76 | return !in_array($item->value, $filter); | ||
77 | }); | ||
72 | 78 | ||
73 | return Response::success($subject); | 79 | return Response::success($subject); |
74 | } | 80 | } | ... | ... |
-
Please register or sign in to post a comment