protected function prose7day($stationid, $edate) { $nt = new Psys_StationModel(); if (!$edate) { $edate = date('Y-m-d', strtotime('-1 day')); } //根据当前日期获取最近7天的时间 for ($i = 0; $i < 7; $i++) { $day['day' . $i] = date('Y-m-d', strtotime($edate) - 3600 * 24 * $i); } foreach ($day as $k => $v) { $data[$v] = $nt->DailyProcess($stationid, '', $v); } return $data; }