作者 lyh

gx

@@ -70,16 +70,14 @@ class ProjectController extends BaseController @@ -70,16 +70,14 @@ class ProjectController extends BaseController
70 * @time :2023/8/30 10:14 70 * @time :2023/8/30 10:14
71 */ 71 */
72 public function searchType(&$query){ 72 public function searchType(&$query){
73 - if(isset($this->map['type'])){  
74 - if($this->map['type'] == Project::TYPE_ZERO){  
75 - $query->where('gl_project.type',Project::TYPE_ZERO);  
76 - }elseif ($this->map['type'] == Project::TYPE_ONE){  
77 - $query->where('gl_project.type',Project::TYPE_ONE);  
78 - }elseif ($this->map['type'] == Project::TYPE_TWO){  
79 - $query->whereIn('gl_project.type', [Project::TYPE_TWO,Project::TYPE_THREE]);  
80 - }else{  
81 - $query->whereIn('gl_project.type', [Project::TYPE_FOUR,Project::TYPE_SIX]);  
82 - } 73 + if($this->map['type'] == Project::TYPE_ZERO){
  74 + $query->where('gl_project.type',Project::TYPE_ZERO);
  75 + }elseif ($this->map['type'] == Project::TYPE_ONE){
  76 + $query->where('gl_project.type',Project::TYPE_ONE);
  77 + }elseif ($this->map['type'] == Project::TYPE_TWO){
  78 + $query->whereIn('gl_project.type', [Project::TYPE_TWO,Project::TYPE_THREE]);
  79 + }else{
  80 + $query->whereIn('gl_project.type', [Project::TYPE_FOUR,Project::TYPE_SIX]);
83 } 81 }
84 return $query; 82 return $query;
85 } 83 }
@@ -137,25 +135,25 @@ class ProjectController extends BaseController @@ -137,25 +135,25 @@ class ProjectController extends BaseController
137 public function searchParam(&$query){ 135 public function searchParam(&$query){
138 //参数type 136 //参数type
139 $query = $this->searchType($query); 137 $query = $this->searchType($query);
140 - $query = $this->getManagerRole($query);  
141 - //搜索名称  
142 - if(isset($this->map['title'])){  
143 - $query = $query->orwhere('gl_project.title','like','%'.$this->map['title'].'%');  
144 - }  
145 - //搜索技术组  
146 - if(!empty($this->map['dept_id'])){  
147 - $query = $query->orwhere('gl_project_deploy_build.dept_id',$this->map['dept_id'])  
148 - ->orwhere('gl_project_deploy_optimize.dept_id',$this->map['dept_id']);  
149 - }  
150 - //搜索技术人员  
151 - $query = $this->searchManager($query);  
152 - //按类型搜索  
153 - if(!empty($param['search']) && !empty($param['search_type'])){  
154 - //搜索域名  
155 - $query = $query->orwhere('gl_project_deploy_optimize.domain','like','%'.$this->map['search'].'%')  
156 - ->orwhere('gl_project.company','like','%'.$this->map['search'].'%')  
157 - ->orwhere('gl_project.title','like','%'.$this->map['search'].'%');  
158 - } 138 +// $query = $this->getManagerRole($query);
  139 +// //搜索名称
  140 +// if(isset($this->map['title'])){
  141 +// $query = $query->orwhere('gl_project.title','like','%'.$this->map['title'].'%');
  142 +// }
  143 +// //搜索技术组
  144 +// if(!empty($this->map['dept_id'])){
  145 +// $query = $query->orwhere('gl_project_deploy_build.dept_id',$this->map['dept_id'])
  146 +// ->orwhere('gl_project_deploy_optimize.dept_id',$this->map['dept_id']);
  147 +// }
  148 +// //搜索技术人员
  149 +// $query = $this->searchManager($query);
  150 +// //按类型搜索
  151 +// if(!empty($param['search']) && !empty($param['search_type'])){
  152 +// //搜索域名
  153 +// $query = $query->orwhere('gl_project_deploy_optimize.domain','like','%'.$this->map['search'].'%')
  154 +// ->orwhere('gl_project.company','like','%'.$this->map['search'].'%')
  155 +// ->orwhere('gl_project.title','like','%'.$this->map['search'].'%');
  156 +// }
159 var_dump($query); 157 var_dump($query);
160 die(); 158 die();
161 return $query; 159 return $query;