This commit is contained in:
weiz 2023-10-31 17:16:43 +08:00
parent 945ed8db02
commit 77c5c35bbc
1 changed files with 5 additions and 5 deletions

View File

@ -252,11 +252,11 @@
return $item;
})->toArray();
$result = [
['soil_temp' => array_column($data,'soil_temp'),'create_time' => array_column($data,'create_time')],
['soil_mois' => array_column($data,'soil_mois'),'create_time' => array_column($data,'create_time')],
['p_content' => array_column($data,'p_content'),'create_time' => array_column($data,'create_time')],
['n_content' => array_column($data,'n_content'),'create_time' => array_column($data,'create_time')],
['k_content' => array_column($data,'k_content'),'create_time' => array_column($data,'create_time')],
['soil_temp' => array_column($data,'soil_temp'),'create_time' => array_column($data,'create_time'),'max'=>max(array_column($data,'soil_temp'))],
['soil_mois' => array_column($data,'soil_mois'),'create_time' => array_column($data,'create_time'),'max'=>max(array_column($data,'soil_mois'))],
['p_content' => array_column($data,'p_content'),'create_time' => array_column($data,'create_time'),'max'=>max(array_column($data,'p_content'))],
['n_content' => array_column($data,'n_content'),'create_time' => array_column($data,'create_time'),'max'=>max(array_column($data,'n_content'))],
['k_content' => array_column($data,'k_content'),'create_time' => array_column($data,'create_time'),'max'=>max(array_column($data,'k_content'))],
];
return $this->success('请求成功',$result);
}