|
@@ -55,7 +55,7 @@ class ProjectController extends BaseController |
|
@@ -55,7 +55,7 @@ class ProjectController extends BaseController |
|
55
|
$map['type'] = $this->searchType($this->map['type']);
|
55
|
$map['type'] = $this->searchType($this->map['type']);
|
|
56
|
$map['extend_type'] = 0;//排除未续费项目
|
56
|
$map['extend_type'] = 0;//排除未续费项目
|
|
57
|
}
|
57
|
}
|
|
58
|
- $filed = ['id', 'title', 'mysql_id' ,'channel','cooperate_date' ,'type', 'created_at'];
|
58
|
+ $filed = ['id', 'title', 'mysql_id' ,'channel','cooperate_date' ,'type', 'remain_day' ,'created_at'];
|
|
59
|
$lists = $project->formatQuery($map)->orderBy('id','desc')->select($filed)->with('payment')->with('deploy_build')
|
59
|
$lists = $project->formatQuery($map)->orderBy('id','desc')->select($filed)->with('payment')->with('deploy_build')
|
|
60
|
->with('deploy_optimize')->with('online_check')->paginate($this->row, ['*'], 'page', $this->page);
|
60
|
->with('deploy_optimize')->with('online_check')->paginate($this->row, ['*'], 'page', $this->page);
|
|
61
|
if(!empty($lists)){
|
61
|
if(!empty($lists)){
|
|
@@ -108,31 +108,12 @@ class ProjectController extends BaseController |
|
@@ -108,31 +108,12 @@ class ProjectController extends BaseController |
|
108
|
'task_pending_num' => Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]),
|
108
|
'task_pending_num' => Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]),
|
|
109
|
'optimist_status'=>$item['online_check']['optimist_status'] ?? 0,
|
109
|
'optimist_status'=>$item['online_check']['optimist_status'] ?? 0,
|
|
110
|
'qa_status'=>$item['online_check']['qa_status'] ?? 0,
|
110
|
'qa_status'=>$item['online_check']['qa_status'] ?? 0,
|
|
111
|
- 'service_day'=>$item['deploy_build']['service_duration'] - $this->compliance_day($item['id']),
|
111
|
+ 'service_day'=>$item['remain_day'] ?? 0,
|
|
112
|
];
|
112
|
];
|
|
113
|
return $item;
|
113
|
return $item;
|
|
114
|
}
|
114
|
}
|
|
115
|
|
115
|
|
|
116
|
/**
|
116
|
/**
|
|
117
|
- * @param $yesterday
|
|
|
|
118
|
- * @name :(服务达标天数)compliance_day
|
|
|
|
119
|
- * @author :lyh
|
|
|
|
120
|
- * @method :post
|
|
|
|
121
|
- * @time :2023/6/14 15:48
|
|
|
|
122
|
- */
|
|
|
|
123
|
- public function compliance_day($project_id){
|
|
|
|
124
|
- //服务达标天数
|
|
|
|
125
|
- $rankDataModel = new RankData();
|
|
|
|
126
|
- $rank_info = $rankDataModel->where(['project_id'=>$project_id,'lang'=>''])->select(['compliance_day'])->first();
|
|
|
|
127
|
- if(empty($rank_info)){
|
|
|
|
128
|
- $compliance_day = 0;
|
|
|
|
129
|
- }else{
|
|
|
|
130
|
- $compliance_day = $rank_info->compliance_day;
|
|
|
|
131
|
- }
|
|
|
|
132
|
- return $compliance_day;
|
|
|
|
133
|
- }
|
|
|
|
134
|
-
|
|
|
|
135
|
- /**
|
|
|
|
136
|
* @remark :type类型
|
117
|
* @remark :type类型
|
|
137
|
* @name :searchType
|
118
|
* @name :searchType
|
|
138
|
* @author :lyh
|
119
|
* @author :lyh
|