作者 lyh

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

... ... @@ -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);
... ...
... ... @@ -34,7 +34,7 @@ class TaskController extends BaseController
$map[] = ['created_manage_id', $this->param['created_manage_id']];
}
if(!empty($this->param['owner_manage_id'])){
$map[] = ['id', 'in', TaskOwner::where('manage_id', $this->param['owner_manage_id'])->pluck('task_id')];
$map[] = ['id', 'in', TaskOwner::where('manage_id', $this->param['owner_manage_id'])->pluck('task_id')->toArray()];
}
$sort = ['id' => 'desc'];
... ...