作者 lyh

gx

@@ -75,13 +75,30 @@ class ProjectLogic extends BaseLogic @@ -75,13 +75,30 @@ 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'] - Common::getDaysToTargetDate($item['cooperate_date']) 78 + 'service_day'=>$item['deploy_build']['service_duration'] - $this->compliance_day(date('Y-m-d',time())),
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 + /**
85 * @remark :自动登录加密 102 * @remark :自动登录加密
86 * @name :getAutoLoginCode 103 * @name :getAutoLoginCode
87 * @author :lyh 104 * @author :lyh