|
@@ -78,13 +78,30 @@ class ProjectLogic extends BaseLogic |
|
@@ -78,13 +78,30 @@ class ProjectLogic extends BaseLogic |
|
78
|
'task_pending_num' => Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]),
|
78
|
'task_pending_num' => Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]),
|
|
79
|
'optimist_status'=>$item['online_check']['optimist_status'] ?? 0,
|
79
|
'optimist_status'=>$item['online_check']['optimist_status'] ?? 0,
|
|
80
|
'qa_status'=>$item['online_check']['qa_status'] ?? 0,
|
80
|
'qa_status'=>$item['online_check']['qa_status'] ?? 0,
|
|
81
|
- 'service_day'=>$item['deploy_build']['service_duration'],
|
81
|
+ 'service_day'=>$item['deploy_build']['service_duration'] - $this->compliance_day(),
|
|
82
|
];
|
82
|
];
|
|
83
|
}
|
83
|
}
|
|
84
|
return $list;
|
84
|
return $list;
|
|
85
|
}
|
85
|
}
|
|
86
|
|
86
|
|
|
87
|
/**
|
87
|
/**
|
|
|
|
88
|
+ * @param $yesterday
|
|
|
|
89
|
+ * @name :(服务达标天数)compliance_day
|
|
|
|
90
|
+ * @author :lyh
|
|
|
|
91
|
+ * @method :post
|
|
|
|
92
|
+ * @time :2023/6/14 15:48
|
|
|
|
93
|
+ */
|
|
|
|
94
|
+ public function compliance_day($project_id){
|
|
|
|
95
|
+ //服务达标天数
|
|
|
|
96
|
+ $rank_info = DB::table('gl_rank_data')->where(['project_id'=>$project_id,'lang'=>''])->select(['compliance_day'])->first();
|
|
|
|
97
|
+ if(empty($rank_info)){
|
|
|
|
98
|
+ $compliance_day = 0;
|
|
|
|
99
|
+ }else{
|
|
|
|
100
|
+ $compliance_day = $rank_info->compliance_day;
|
|
|
|
101
|
+ }
|
|
|
|
102
|
+ return $compliance_day;
|
|
|
|
103
|
+ }
|
|
|
|
104
|
+ /**
|
|
88
|
* @remark :自动登录加密
|
105
|
* @remark :自动登录加密
|
|
89
|
* @name :getAutoLoginCode
|
106
|
* @name :getAutoLoginCode
|
|
90
|
* @author :lyh
|
107
|
* @author :lyh
|