|
...
|
...
|
@@ -55,7 +55,7 @@ class ProjectController extends BaseController |
|
|
|
$map['type'] = $this->searchType($this->map['type']);
|
|
|
|
$map['extend_type'] = 0;//排除未续费项目
|
|
|
|
}
|
|
|
|
$filed = ['id', 'title', 'mysql_id' ,'channel','cooperate_date' ,'type', 'created_at'];
|
|
|
|
$filed = ['id', 'title', 'mysql_id' ,'channel','cooperate_date' ,'type', 'remain_day' ,'created_at'];
|
|
|
|
$lists = $project->formatQuery($map)->orderBy('id','desc')->select($filed)->with('payment')->with('deploy_build')
|
|
|
|
->with('deploy_optimize')->with('online_check')->paginate($this->row, ['*'], 'page', $this->page);
|
|
|
|
if(!empty($lists)){
|
|
...
|
...
|
@@ -108,31 +108,12 @@ class ProjectController extends BaseController |
|
|
|
'task_pending_num' => Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]),
|
|
|
|
'optimist_status'=>$item['online_check']['optimist_status'] ?? 0,
|
|
|
|
'qa_status'=>$item['online_check']['qa_status'] ?? 0,
|
|
|
|
'service_day'=>$item['deploy_build']['service_duration'] - $this->compliance_day($item['id']),
|
|
|
|
'service_day'=>$item['remain_day'] ?? 0,
|
|
|
|
];
|
|
|
|
return $item;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param $yesterday
|
|
|
|
* @name :(服务达标天数)compliance_day
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/6/14 15:48
|
|
|
|
*/
|
|
|
|
public function compliance_day($project_id){
|
|
|
|
//服务达标天数
|
|
|
|
$rankDataModel = new RankData();
|
|
|
|
$rank_info = $rankDataModel->where(['project_id'=>$project_id,'lang'=>''])->select(['compliance_day'])->first();
|
|
|
|
if(empty($rank_info)){
|
|
|
|
$compliance_day = 0;
|
|
|
|
}else{
|
|
|
|
$compliance_day = $rank_info->compliance_day;
|
|
|
|
}
|
|
|
|
return $compliance_day;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :type类型
|
|
|
|
* @name :searchType
|
|
|
|
* @author :lyh
|
...
|
...
|
|