|
...
|
...
|
@@ -35,12 +35,10 @@ class countProject extends Command |
|
|
|
public function handle(){
|
|
|
|
$start = '2024-01';
|
|
|
|
$end = '2024-09';
|
|
|
|
$data = $this->countAll();
|
|
|
|
// $data = $this->exportDataProject($start,$end);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
// $result = $this->exportData($data);
|
|
|
|
// echo date('Y-m-d H:i:s') . ' ' . json_encode($result) . PHP_EOL;
|
|
|
|
// return $result;
|
|
|
|
$data = $this->exportDataProject($start,$end);
|
|
|
|
$result = $this->exportData($data);
|
|
|
|
echo date('Y-m-d H:i:s') . ' ' . json_encode($result) . PHP_EOL;
|
|
|
|
return $result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -200,7 +198,6 @@ class countProject extends Command |
|
|
|
->whereNotNull('uptime') // 确保 uptime 字段不为空
|
|
|
|
->orderByRaw('diff ASC')
|
|
|
|
->first();
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($min_info, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$data['min_project_count'] = $min_info['diff'];
|
|
|
|
$max_info = $projectModel->select('*')
|
|
|
|
->selectRaw('DATEDIFF(STR_TO_DATE(uptime, "%Y-%m-%d"), STR_TO_DATE(created_at, "%Y-%m-%d")) AS diff')
|
...
|
...
|
|