From 213744009d9ec9f855bbd80d4bb9dd92a5a430d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=B9=8F?= Date: Sun, 28 Apr 2024 14:20:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=87=BA=E7=A5=A8=E7=9A=84?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=A0=B9=E6=8D=AE=E5=87=BA=E5=8F=91=E5=9F=8E?= =?UTF-8?q?=E5=B8=82=E7=9A=84=E9=A2=84=E5=94=AE=E6=97=B6=E9=97=B4=E6=9D=A5?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/trainsystem/controllers/addorders.php | 2 +- .../third_party/trainsystem/models/BIZ_train_model.php | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/application/third_party/trainsystem/controllers/addorders.php b/application/third_party/trainsystem/controllers/addorders.php index 3008feca..3318aaf1 100644 --- a/application/third_party/trainsystem/controllers/addorders.php +++ b/application/third_party/trainsystem/controllers/addorders.php @@ -252,7 +252,7 @@ class addorders extends CI_Controller{ if(!empty($time_obj)){ $saletime = strtotime($time_obj->TST_saletime); }else{ - $saletime = strtotime("12:00"); //如果没有设置预售时间,默认8点 + $saletime = strtotime("18:00"); //如果没有设置预售时间,默认18点 } //echo $saletime; $sale_diff = (time() - $saletime) / 3600; diff --git a/application/third_party/trainsystem/models/BIZ_train_model.php b/application/third_party/trainsystem/models/BIZ_train_model.php index 00970446..f6c61959 100644 --- a/application/third_party/trainsystem/models/BIZ_train_model.php +++ b/application/third_party/trainsystem/models/BIZ_train_model.php @@ -330,7 +330,7 @@ class BIZ_train_model extends CI_Model { //获取能够自动出票的订单列表2.0版本 20240130 zp (coli_state 11 我的订单 8 已收款 63 出票中 13 新订单(已支付)) function auto_check_ticket_2(){ - $sql = "SELECT distinct top 10 COLD_SN ,coli_id,COLD_SPFS,COLI_State,(SELECT TOP 1 GAI_Type FROM BIZ_GroupAccountInfo WHERE GAI_COLI_SN=bcli.COLI_SN AND ISNULL(DeleteFlag,0)=0) as GAI_Type + $sql = "SELECT top 10 COLD_SN ,coli_id,COLD_SPFS,COLI_State,(SELECT TOP 1 GAI_Type FROM BIZ_GroupAccountInfo WHERE GAI_COLI_SN=bcli.COLI_SN AND ISNULL(DeleteFlag,0)=0) as GAI_Type ,cold_startdate ,isnull((select top 1 ts_autotimes from InfoManager.dbo.trainsystem where ts_cold_sn= bcld.cold_sn order by ts_id desc),0) as ts_autotimes ,(select top 1 ts_autolasttime from InfoManager.dbo.trainsystem where ts_cold_sn= bcld.cold_sn order by ts_id desc) as ts_autolasttime @@ -354,7 +354,12 @@ class BIZ_train_model extends CI_Model { AND COLD_SN NOT IN ( select FOI_COLD_SN from BIZ_FlightsOrderInfo where FOI_COLD_SN=COLD_SN and FOI_TrainNetOrderNo>'') and (COLD_StartDate between GETDATE() and CONVERT(varchar(100),GETDATE()+14,23)+' 23:59') and isnull((select top 1 ts_autotimes from InfoManager.dbo.trainsystem where ts_cold_sn= bcld.cold_sn order by ts_id desc),0)<4 - order by COLD_StartDate + order by ISNULL(CAST((select TST_saletime from TrainSaleTime where TST_station_cn = ( + SELECT TOP 1 TRS_StationCN + FROM TrainStation + WHERE TRS_Code = (select top 1 DepartAirport from BIZ_FlightsOrderInfo where FOI_COLD_SN = cold_sn) + and ISNULL(TRS_StationCN,'')<>'' + )) as Time),'18:00') "; $query = $this->HT->query($sql); return $query->result();