Also use VUCC_GRIDS from LoTW cnfm to update QSO record
这个提交包含在:
		
							父节点
							
								
									10bb0beb10
								
							
						
					
					
						当前提交
						fb7c448b58
					
				
					共有  2 个文件被更改,包括 28 次插入 和 18 次删除
				
			
		|  | @ -512,6 +512,12 @@ class Lotw extends CI_Controller { | ||||||
| 						$qsl_gridsquare = ""; | 						$qsl_gridsquare = ""; | ||||||
| 					} | 					} | ||||||
| 
 | 
 | ||||||
|  | 					if (isset($record['vucc_grids'])) { | ||||||
|  | 						$qsl_vucc_grids = $record['vucc_grids']; | ||||||
|  | 					} else { | ||||||
|  | 						$qsl_vucc_grids = ""; | ||||||
|  | 					} | ||||||
|  | 
 | ||||||
| 					if (isset($record['iota'])) { | 					if (isset($record['iota'])) { | ||||||
| 						$iota = $record['iota']; | 						$iota = $record['iota']; | ||||||
| 					} else { | 					} else { | ||||||
|  | @ -536,7 +542,7 @@ class Lotw extends CI_Controller { | ||||||
| 						$ituz = ""; | 						$ituz = ""; | ||||||
| 					} | 					} | ||||||
| 
 | 
 | ||||||
| 					$lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'], $state, $qsl_gridsquare, $iota, $cnty, $cqz, $ituz, $record['station_callsign']); | 					$lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'], $state, $qsl_gridsquare, $qsl_vucc_grids, $iota, $cnty, $cqz, $ituz, $record['station_callsign']); | ||||||
| 
 | 
 | ||||||
| 					$table .= "<tr>"; | 					$table .= "<tr>"; | ||||||
| 						$table .= "<td>".$record['station_callsign']."</td>"; | 						$table .= "<td>".$record['station_callsign']."</td>"; | ||||||
|  | @ -546,7 +552,7 @@ class Lotw extends CI_Controller { | ||||||
| 						$table .= "<td>".$record['qsl_rcvd']."</td>"; | 						$table .= "<td>".$record['qsl_rcvd']."</td>"; | ||||||
| 						$table .= "<td>".$qsl_date."</td>"; | 						$table .= "<td>".$qsl_date."</td>"; | ||||||
| 						$table .= "<td>".$state."</td>"; | 						$table .= "<td>".$state."</td>"; | ||||||
| 						$table .= "<td>".$qsl_gridsquare."</td>"; | 						$table .= "<td>".($qsl_gridsquare != '' ? $qsl_gridsquare : $qsl_vucc_grids)."</td>"; | ||||||
| 						$table .= "<td>".$iota."</td>"; | 						$table .= "<td>".$iota."</td>"; | ||||||
| 						$table .= "<td>QSO Record: ".$status[0]."</td>"; | 						$table .= "<td>QSO Record: ".$status[0]."</td>"; | ||||||
| 						$table .= "<td>LoTW Record: ".$lotw_status."</td>"; | 						$table .= "<td>LoTW Record: ".$lotw_status."</td>"; | ||||||
|  |  | ||||||
|  | @ -2636,7 +2636,7 @@ class Logbook_model extends CI_Model { | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $iota, $cnty, $cqz, $ituz, $station_callsign) { |   function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $qsl_vucc_grids, $iota, $cnty, $cqz, $ituz, $station_callsign) { | ||||||
| 
 | 
 | ||||||
| 	$data = array( | 	$data = array( | ||||||
|       'COL_LOTW_QSLRDATE' => $qsl_date, |       'COL_LOTW_QSLRDATE' => $qsl_date, | ||||||
|  | @ -2670,11 +2670,12 @@ class Logbook_model extends CI_Model { | ||||||
|     $this->db->update($this->config->item('table_name'), $data); |     $this->db->update($this->config->item('table_name'), $data); | ||||||
| 	unset($data); | 	unset($data); | ||||||
| 
 | 
 | ||||||
| 	if($qsl_gridsquare != "") { | 	if($qsl_gridsquare != "" || $qsl_vucc_grids != "") { | ||||||
|       $data = array( |       $data = array( | ||||||
|         'COL_GRIDSQUARE' => $qsl_gridsquare, |  | ||||||
|         'COL_DISTANCE' => 0 |         'COL_DISTANCE' => 0 | ||||||
|       ); |       ); | ||||||
|  |       if ($qsl_gridsquare != "") { | ||||||
|  |          $data['COL_GRIDSQUARE'] = $qsl_gridsquare; | ||||||
|          $this->db->select('station_profile.station_gridsquare as station_gridsquare'); |          $this->db->select('station_profile.station_gridsquare as station_gridsquare'); | ||||||
|          $this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"'); |          $this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"'); | ||||||
|          $this->db->where('COL_CALL', $callsign); |          $this->db->where('COL_CALL', $callsign); | ||||||
|  | @ -2689,6 +2690,9 @@ class Logbook_model extends CI_Model { | ||||||
|     |     | ||||||
|             $data['COL_DISTANCE'] = $this->qra->distance($station_gridsquare, $qsl_gridsquare, 'K'); |             $data['COL_DISTANCE'] = $this->qra->distance($station_gridsquare, $qsl_gridsquare, 'K'); | ||||||
|          } |          } | ||||||
|  |       } elseif ($qsl_vucc_grids != "") { | ||||||
|  |          $data['COL_VUCC_GRIDS'] = $qsl_vucc_grids; | ||||||
|  |       } | ||||||
| 
 | 
 | ||||||
|       $this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"'); |       $this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"'); | ||||||
|       $this->db->where('COL_CALL', $callsign); |       $this->db->where('COL_CALL', $callsign); | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用