|
...
|
...
|
@@ -2,7 +2,6 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers\Aside\Project;
|
|
|
|
|
|
|
|
use App\Helper\Arr;
|
|
|
|
use App\Http\Controllers\Aside\BaseController;
|
|
|
|
use App\Http\Logic\Aside\Project\OnlineCheckLogic;
|
|
|
|
use App\Http\Logic\Aside\Project\ProcessRecordsLogic;
|
|
...
|
...
|
@@ -11,8 +10,9 @@ use App\Http\Requests\Aside\Project\ProcessRecordsRequest; |
|
|
|
use App\Http\Requests\Aside\Project\ProjectRequest;
|
|
|
|
use App\Models\City;
|
|
|
|
use App\Models\InquirySet;
|
|
|
|
use App\Models\Project\DeployBuild;
|
|
|
|
use App\Models\Project\DeployOptimize;
|
|
|
|
use App\Models\Project\Payment;
|
|
|
|
use App\Rules\Ids;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -29,11 +29,31 @@ class ProjectController extends BaseController |
|
|
|
public function list(ProjectLogic $logic)
|
|
|
|
{
|
|
|
|
$map = [];
|
|
|
|
//搜索类型
|
|
|
|
if(!empty($this->param['type'])){
|
|
|
|
$map[] = ['type', $this->param['type']];
|
|
|
|
}
|
|
|
|
if(!empty($this->param['search'])){
|
|
|
|
$map[] = ['title|company', $this->param['search']];
|
|
|
|
//搜索技术组
|
|
|
|
if(!empty($this->param['dep_id'])){
|
|
|
|
$map[] = ['id', 'in', DeployBuild::where('dept_id', $this->param['dep_id'])->pluck('project_id')->toArray()];
|
|
|
|
}
|
|
|
|
//搜索技术人员
|
|
|
|
if(!empty($this->param['manage_id'])){
|
|
|
|
$map[] = ['id', 'in', DeployBuild::where('leader_mid', $this->param['manage_id'])
|
|
|
|
->orwhere('manager_mid', $this->param['manage_id'])
|
|
|
|
->orwhere('designer_mid', $this->param['manage_id'])
|
|
|
|
->orwhere('tech_mid', $this->param['manage_id'])
|
|
|
|
->pluck('project_id')
|
|
|
|
->toArray()];
|
|
|
|
}
|
|
|
|
//按类型搜索
|
|
|
|
if(!empty($this->param['search']) && !empty($this->param['search_type'])){
|
|
|
|
if($this->param['search_type'] == 'domain'){
|
|
|
|
//搜索域名
|
|
|
|
$map[] = ['id', 'in', DeployOptimize::where('domain', 'like', "%{$this->param['search']}%")->pluck('project_id')->toArray()];
|
|
|
|
}else{
|
|
|
|
$map[] = [$this->param['search_type'], 'like', "%{$this->param['search']}%"];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$sort = ['id' => 'desc'];
|
|
|
|
$data = $logic->getList($map, $sort);
|
...
|
...
|
|