作者 lyh

gx

@@ -58,7 +58,7 @@ class Count extends Command @@ -58,7 +58,7 @@ class Count extends Command
58 $arr['compliance_day'] = $this->compliance_day($yesterday); 58 $arr['compliance_day'] = $this->compliance_day($yesterday);
59 //剩余服务时常 59 //剩余服务时常
60 if($v['service_duration'] != 0){ 60 if($v['service_duration'] != 0){
61 - $arr['service_day'] = (int)$v['service_duration'] - (int)$arr['compliance_day']; 61 + $arr['service_day'] = (int)$v['service_duration'];
62 $arr['service_day'] = $arr['service_day'] > 0 ? $arr['service_day'] : 0; 62 $arr['service_day'] = $arr['service_day'] > 0 ? $arr['service_day'] : 0;
63 }else{ 63 }else{
64 $arr['service_day'] = 0; 64 $arr['service_day'] = 0;
@@ -75,30 +75,13 @@ class ProjectLogic extends BaseLogic @@ -75,30 +75,13 @@ class ProjectLogic extends BaseLogic
75 'task_pending_num' => Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]), 75 'task_pending_num' => Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]),
76 'optimist_status'=>$item['online_check']['optimist_status'] ?? 0, 76 'optimist_status'=>$item['online_check']['optimist_status'] ?? 0,
77 'qa_status'=>$item['online_check']['qa_status'] ?? 0, 77 'qa_status'=>$item['online_check']['qa_status'] ?? 0,
78 - 'service_day'=>$item['deploy_build']['service_duration'] - $this->compliance_day(date('Y-m-d',time())), 78 + 'service_day'=>$item['deploy_build']['service_duration'],
79 ]; 79 ];
80 } 80 }
81 return $list; 81 return $list;
82 } 82 }
83 83
84 /** 84 /**
85 - * @param $yesterday  
86 - * @name :(服务达标天数)compliance_day  
87 - * @author :lyh  
88 - * @method :post  
89 - * @time :2023/6/14 15:48  
90 - */  
91 - public function compliance_day($yesterday){  
92 - //服务达标天数  
93 - $rank_info = DB::table('gl_rank_data')->where(['updated_date'=>$yesterday,'lang'=>''])->select(['compliance_day'])->first();  
94 - if(empty($rank_info)){  
95 - $compliance_day = 0;  
96 - }else{  
97 - $compliance_day = $rank_info->compliance_day;  
98 - }  
99 - return $compliance_day;  
100 - }  
101 - /**  
102 * @remark :自动登录加密 85 * @remark :自动登录加密
103 * @name :getAutoLoginCode 86 * @name :getAutoLoginCode
104 * @author :lyh 87 * @author :lyh