这个提交包含在:
root 2023-07-04 04:58:52 +00:00
当前提交 c274c4a961
共有 2 个文件被更改,包括 8 次插入2 次删除

查看文件

@ -550,7 +550,12 @@ class Lotw extends CI_Controller {
$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);
$station_id = $this->logbook_model->find_correct_station_id($record['station_callsign'], $record['my_gridsquare']);
if ($station_id != NULL) {
$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, $station_id);
} else {
$lotw_status = "No matching Grid/OP-Call (check Locations)";
}
}

查看文件

@ -2488,7 +2488,7 @@ class Logbook_model extends CI_Model {
}
}
function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $iota, $cnty, $cqz, $ituz) {
function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $iota, $cnty, $cqz, $ituz, $station_id) {
$data = array(
'COL_LOTW_QSLRDATE' => $qsl_date,
@ -2517,6 +2517,7 @@ class Logbook_model extends CI_Model {
$this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"');
$this->db->where('COL_CALL', $callsign);
$this->db->where('COL_BAND', $band);
$this->db->where('station_id', $station_id);
$this->db->update($this->config->item('table_name'), $data);
unset($data);