|
@@ -2,7 +2,6 @@ |
|
@@ -2,7 +2,6 @@ |
|
2
|
|
2
|
|
|
3
|
namespace App\Http\Controllers\Aside\Project;
|
3
|
namespace App\Http\Controllers\Aside\Project;
|
|
4
|
|
4
|
|
|
5
|
-use App\Helper\Arr;
|
|
|
|
6
|
use App\Http\Controllers\Aside\BaseController;
|
5
|
use App\Http\Controllers\Aside\BaseController;
|
|
7
|
use App\Http\Logic\Aside\Project\OnlineCheckLogic;
|
6
|
use App\Http\Logic\Aside\Project\OnlineCheckLogic;
|
|
8
|
use App\Http\Logic\Aside\Project\ProcessRecordsLogic;
|
7
|
use App\Http\Logic\Aside\Project\ProcessRecordsLogic;
|
|
@@ -11,8 +10,9 @@ use App\Http\Requests\Aside\Project\ProcessRecordsRequest; |
|
@@ -11,8 +10,9 @@ use App\Http\Requests\Aside\Project\ProcessRecordsRequest; |
|
11
|
use App\Http\Requests\Aside\Project\ProjectRequest;
|
10
|
use App\Http\Requests\Aside\Project\ProjectRequest;
|
|
12
|
use App\Models\City;
|
11
|
use App\Models\City;
|
|
13
|
use App\Models\InquirySet;
|
12
|
use App\Models\InquirySet;
|
|
|
|
13
|
+use App\Models\Project\DeployBuild;
|
|
|
|
14
|
+use App\Models\Project\DeployOptimize;
|
|
14
|
use App\Models\Project\Payment;
|
15
|
use App\Models\Project\Payment;
|
|
15
|
-use App\Rules\Ids;
|
|
|
|
16
|
use Illuminate\Http\Request;
|
16
|
use Illuminate\Http\Request;
|
|
17
|
|
17
|
|
|
18
|
|
18
|
|
|
@@ -29,11 +29,31 @@ class ProjectController extends BaseController |
|
@@ -29,11 +29,31 @@ class ProjectController extends BaseController |
|
29
|
public function list(ProjectLogic $logic)
|
29
|
public function list(ProjectLogic $logic)
|
|
30
|
{
|
30
|
{
|
|
31
|
$map = [];
|
31
|
$map = [];
|
|
|
|
32
|
+ //搜索类型
|
|
32
|
if(!empty($this->param['type'])){
|
33
|
if(!empty($this->param['type'])){
|
|
33
|
$map[] = ['type', $this->param['type']];
|
34
|
$map[] = ['type', $this->param['type']];
|
|
34
|
}
|
35
|
}
|
|
35
|
- if(!empty($this->param['search'])){
|
|
|
|
36
|
- $map[] = ['title|company', $this->param['search']];
|
36
|
+ //搜索技术组
|
|
|
|
37
|
+ if(!empty($this->param['dep_id'])){
|
|
|
|
38
|
+ $map[] = ['id', 'in', DeployBuild::where('dept_id', $this->param['dep_id'])->pluck('project_id')->toArray()];
|
|
|
|
39
|
+ }
|
|
|
|
40
|
+ //搜索技术人员
|
|
|
|
41
|
+ if(!empty($this->param['manage_id'])){
|
|
|
|
42
|
+ $map[] = ['id', 'in', DeployBuild::where('leader_mid', $this->param['manage_id'])
|
|
|
|
43
|
+ ->orwhere('manager_mid', $this->param['manage_id'])
|
|
|
|
44
|
+ ->orwhere('designer_mid', $this->param['manage_id'])
|
|
|
|
45
|
+ ->orwhere('tech_mid', $this->param['manage_id'])
|
|
|
|
46
|
+ ->pluck('project_id')
|
|
|
|
47
|
+ ->toArray()];
|
|
|
|
48
|
+ }
|
|
|
|
49
|
+ //按类型搜索
|
|
|
|
50
|
+ if(!empty($this->param['search']) && !empty($this->param['search_type'])){
|
|
|
|
51
|
+ if($this->param['search_type'] == 'domain'){
|
|
|
|
52
|
+ //搜索域名
|
|
|
|
53
|
+ $map[] = ['id', 'in', DeployOptimize::where('domain', 'like', "%{$this->param['search']}%")->pluck('project_id')->toArray()];
|
|
|
|
54
|
+ }else{
|
|
|
|
55
|
+ $map[] = [$this->param['search_type'], 'like', "%{$this->param['search']}%"];
|
|
|
|
56
|
+ }
|
|
37
|
}
|
57
|
}
|
|
38
|
$sort = ['id' => 'desc'];
|
58
|
$sort = ['id' => 'desc'];
|
|
39
|
$data = $logic->getList($map, $sort);
|
59
|
$data = $logic->getList($map, $sort);
|