From a705c0d0705ce75948090fafdb6f17859e5675e6 Mon Sep 17 00:00:00 2001 From: LEE Wei Cheng Date: Sat, 7 Oct 2023 17:23:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0Ticket=5FType=20=E5=8F=AA?= =?UTF-8?q?=E8=A6=81=E4=B8=8D=E6=98=AF3=E9=83=BD=E5=8F=AF=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E6=9F=A5=E8=A9=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/Carpayment_model.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/models/Carpayment_model.php b/models/Carpayment_model.php index 0069fab..347fdbc 100644 --- a/models/Carpayment_model.php +++ b/models/Carpayment_model.php @@ -528,17 +528,14 @@ class Carpayment_model extends CI_Model $data['end_time'] = '00:00'; } - $result = $this->db->select("in_time, date_format(pay_time, '%Y/%m/%d %T') as pay_time, in_pic_name, member_no, in_lane, in_out, station_no") + $result = $this->db->select("in_time, date_format(pay_time, '%Y/%m/%d %T') as pay_time, in_pic_name, member_no, station_no") ->from('cario') - ->where('obj_type', 1) - ->where('obj_id', $lpr) - ->where('finished', 0) - ->where('err', 0) - ->whereIn('ticket_type', [0, 1])// 20180130 刷卡進的跳過 + ->where(array('obj_type' => 1, 'obj_id' => $lpr, 'finished' => 0, 'err' => 0)) + ->or_where('ticket_type !=', 3) ->order_by('cario_no', 'desc') ->limit(1) ->get() - ->row_array(); + ->row_array(); if (!empty($result['in_time'])) {