Sort SAT amd mode stats by count DESC
这个提交包含在:
		
							父节点
							
								
									9efb643a5a
								
							
						
					
					
						当前提交
						0f84f71b7e
					
				
					共有  2 个文件被更改,包括 2 次插入 和 0 次删除
				
			
		|  | @ -104,6 +104,7 @@ class Statistics extends CI_Controller { | ||||||
| 		$modestats[$i++]['total'] = $this->logbook_model->total_fm(); | 		$modestats[$i++]['total'] = $this->logbook_model->total_fm(); | ||||||
| 		$modestats[$i]['mode'] = 'digi'; | 		$modestats[$i]['mode'] = 'digi'; | ||||||
| 		$modestats[$i]['total'] = $this->logbook_model->total_digi(); | 		$modestats[$i]['total'] = $this->logbook_model->total_digi(); | ||||||
|  | 		usort($modestats, fn($a, $b) => $b['total'] <=> $a['total']); | ||||||
| 		 | 		 | ||||||
| 		header('Content-Type: application/json'); | 		header('Content-Type: application/json'); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1624,6 +1624,7 @@ class Logbook_model extends CI_Model { | ||||||
|       $this->db->where_in('station_id', $logbooks_locations_array); |       $this->db->where_in('station_id', $logbooks_locations_array); | ||||||
|       $this->db->where('COL_SAT_NAME is not null'); |       $this->db->where('COL_SAT_NAME is not null'); | ||||||
|       $this->db->where('COL_SAT_NAME !=', ''); |       $this->db->where('COL_SAT_NAME !=', ''); | ||||||
|  |       $this->db->order_by('count DESC'); | ||||||
|       $this->db->group_by('COL_SAT_NAME'); |       $this->db->group_by('COL_SAT_NAME'); | ||||||
|       $query = $this->db->get($this->config->item('table_name')); |       $query = $this->db->get($this->config->item('table_name')); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用