|
...
|
...
|
@@ -70,16 +70,14 @@ class ProjectController extends BaseController |
|
|
|
* @time :2023/8/30 10:14
|
|
|
|
*/
|
|
|
|
public function searchType(&$query){
|
|
|
|
if(isset($this->map['type'])){
|
|
|
|
if($this->map['type'] == Project::TYPE_ZERO){
|
|
|
|
$query->where('gl_project.type',Project::TYPE_ZERO);
|
|
|
|
}elseif ($this->map['type'] == Project::TYPE_ONE){
|
|
|
|
$query->where('gl_project.type',Project::TYPE_ONE);
|
|
|
|
}elseif ($this->map['type'] == Project::TYPE_TWO){
|
|
|
|
$query->whereIn('gl_project.type', [Project::TYPE_TWO,Project::TYPE_THREE]);
|
|
|
|
}else{
|
|
|
|
$query->whereIn('gl_project.type', [Project::TYPE_FOUR,Project::TYPE_SIX]);
|
|
|
|
}
|
|
|
|
if($this->map['type'] == Project::TYPE_ZERO){
|
|
|
|
$query->where('gl_project.type',Project::TYPE_ZERO);
|
|
|
|
}elseif ($this->map['type'] == Project::TYPE_ONE){
|
|
|
|
$query->where('gl_project.type',Project::TYPE_ONE);
|
|
|
|
}elseif ($this->map['type'] == Project::TYPE_TWO){
|
|
|
|
$query->whereIn('gl_project.type', [Project::TYPE_TWO,Project::TYPE_THREE]);
|
|
|
|
}else{
|
|
|
|
$query->whereIn('gl_project.type', [Project::TYPE_FOUR,Project::TYPE_SIX]);
|
|
|
|
}
|
|
|
|
return $query;
|
|
|
|
}
|
|
...
|
...
|
@@ -137,25 +135,25 @@ class ProjectController extends BaseController |
|
|
|
public function searchParam(&$query){
|
|
|
|
//参数type
|
|
|
|
$query = $this->searchType($query);
|
|
|
|
$query = $this->getManagerRole($query);
|
|
|
|
//搜索名称
|
|
|
|
if(isset($this->map['title'])){
|
|
|
|
$query = $query->orwhere('gl_project.title','like','%'.$this->map['title'].'%');
|
|
|
|
}
|
|
|
|
//搜索技术组
|
|
|
|
if(!empty($this->map['dept_id'])){
|
|
|
|
$query = $query->orwhere('gl_project_deploy_build.dept_id',$this->map['dept_id'])
|
|
|
|
->orwhere('gl_project_deploy_optimize.dept_id',$this->map['dept_id']);
|
|
|
|
}
|
|
|
|
//搜索技术人员
|
|
|
|
$query = $this->searchManager($query);
|
|
|
|
//按类型搜索
|
|
|
|
if(!empty($param['search']) && !empty($param['search_type'])){
|
|
|
|
//搜索域名
|
|
|
|
$query = $query->orwhere('gl_project_deploy_optimize.domain','like','%'.$this->map['search'].'%')
|
|
|
|
->orwhere('gl_project.company','like','%'.$this->map['search'].'%')
|
|
|
|
->orwhere('gl_project.title','like','%'.$this->map['search'].'%');
|
|
|
|
}
|
|
|
|
// $query = $this->getManagerRole($query);
|
|
|
|
// //搜索名称
|
|
|
|
// if(isset($this->map['title'])){
|
|
|
|
// $query = $query->orwhere('gl_project.title','like','%'.$this->map['title'].'%');
|
|
|
|
// }
|
|
|
|
// //搜索技术组
|
|
|
|
// if(!empty($this->map['dept_id'])){
|
|
|
|
// $query = $query->orwhere('gl_project_deploy_build.dept_id',$this->map['dept_id'])
|
|
|
|
// ->orwhere('gl_project_deploy_optimize.dept_id',$this->map['dept_id']);
|
|
|
|
// }
|
|
|
|
// //搜索技术人员
|
|
|
|
// $query = $this->searchManager($query);
|
|
|
|
// //按类型搜索
|
|
|
|
// if(!empty($param['search']) && !empty($param['search_type'])){
|
|
|
|
// //搜索域名
|
|
|
|
// $query = $query->orwhere('gl_project_deploy_optimize.domain','like','%'.$this->map['search'].'%')
|
|
|
|
// ->orwhere('gl_project.company','like','%'.$this->map['search'].'%')
|
|
|
|
// ->orwhere('gl_project.title','like','%'.$this->map['search'].'%');
|
|
|
|
// }
|
|
|
|
var_dump($query);
|
|
|
|
die();
|
|
|
|
return $query;
|
...
|
...
|
|