| @@ -89,7 +89,11 @@ class Cars_model extends CI_Model | |||||
| } | } | ||||
| // 更新入場記錄 | // 更新入場記錄 | ||||
| $data = array('ticket_type' => 3); | |||||
| if(strtotime($rows_cario['out_before_time']) - strtotime($rows_cario['in_time']) > 600) | |||||
| $data = array('ticket_type' => 3, 'out_before_time' => $rows_cario['in_time']); // 刷進刷出需過卡 | |||||
| else | |||||
| $data = array('ticket_type' => 3); | |||||
| $this->db->update('cario', $data, array('cario_no' => $rows_cario['cario_no'])); | $this->db->update('cario', $data, array('cario_no' => $rows_cario['cario_no'])); | ||||
| trigger_error(__FUNCTION__ . '|悠遊卡,更新入場記錄|'); | trigger_error(__FUNCTION__ . '|悠遊卡,更新入場記錄|'); | ||||
| $affect_rows = $this->db->affected_rows(); | $affect_rows = $this->db->affected_rows(); | ||||
| @@ -371,8 +375,8 @@ class Cars_model extends CI_Model | |||||
| 'in_time' => $this->now_str, | 'in_time' => $this->now_str, | ||||
| 'in_lane' => $parms['ivsno'], | 'in_lane' => $parms['ivsno'], | ||||
| 'in_pic_name' => empty($parms['pic_name']) ? '' : $parms['pic_name'], | 'in_pic_name' => empty($parms['pic_name']) ? '' : $parms['pic_name'], | ||||
| 'out_before_time' => date("Y-m-d H:i:s"), | |||||
| //'out_before_time' => date('Y-m-d H:i:s', strtotime(" + 15 minutes")), // 15分鐘內, 可直接離場 | |||||
| //'out_before_time' => date("Y-m-d H:i:s"), | |||||
| 'out_before_time' => date('Y-m-d H:i:s', strtotime(" + 15 minutes")), // 15分鐘內, 可直接離場 (刷進刷出需過卡修正) | |||||
| 'ticket_no' => $this->gen_pass_code() | 'ticket_no' => $this->gen_pass_code() | ||||
| ); | ); | ||||
| $this->db->insert('cario', $data); | $this->db->insert('cario', $data); | ||||