|
...
|
...
|
@@ -196,7 +196,7 @@ class ProjectController extends BaseController |
|
|
|
* @time :2023/9/7 17:28
|
|
|
|
*/
|
|
|
|
public function getManagerRole(&$query){
|
|
|
|
if($this->manage['role'] != 1){//1代表查看所有
|
|
|
|
if($this->manage['role'] != 1 || $this->manage['gid'] == 0){//1代表查看所有
|
|
|
|
//获取用户所在组
|
|
|
|
$managerHr = new ManageHr();
|
|
|
|
$info = $managerHr->read(['manage_id'=>$this->manage['id']]);
|
|
...
|
...
|
@@ -573,6 +573,7 @@ class ProjectController extends BaseController |
|
|
|
* @date 2023/9/11
|
|
|
|
*/
|
|
|
|
public function getProjectByChannel(){
|
|
|
|
$id = $this->param['id'] ?? [];
|
|
|
|
$source_id = $this->param['channel_id']; //原系统渠道id
|
|
|
|
$size = $this->param['page_size'] ?? 20;
|
|
|
|
$type = $this->param['type'] ?? '';
|
|
...
|
...
|
@@ -581,14 +582,19 @@ class ProjectController extends BaseController |
|
|
|
if(!$channel){
|
|
|
|
$this->response('渠道不存在',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
if ($id && FALSE == is_array($id))
|
|
|
|
$id = explode(',', $id);
|
|
|
|
|
|
|
|
$data = Project::with(['deploy_build', 'deploy_optimize', 'online_check'])->where('channel->channel_id', $channel->id)->where(function ($query) use ($type, $company){
|
|
|
|
$data = Project::with(['deploy_build', 'deploy_optimize', 'online_check'])->where(['channel->channel_id' => $channel->id, 'delete_status' => 0])->where(function ($query) use ($type, $company, $id){
|
|
|
|
if ($type) {
|
|
|
|
$query->where('type', $type);
|
|
|
|
}
|
|
|
|
if ($company) {
|
|
|
|
$query->where('company', 'like', '%' . $company . '%');
|
|
|
|
}
|
|
|
|
if ($id) {
|
|
|
|
$query->whereIn('id', $id);
|
|
|
|
}
|
|
|
|
})->orderBy('id', 'desc')->paginate($size)->toArray();
|
|
|
|
$list = [];
|
|
|
|
foreach ($data['list'] as $item){
|
...
|
...
|
|