From 51902fae3719f01f9b76ed77ff7e463e697f934f Mon Sep 17 00:00:00 2001 From: cyc Date: Mon, 12 Aug 2019 16:24:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=97=AE=E9=A2=98=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E8=87=AA=E5=8A=A8=E8=BF=90=E8=A1=8C=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trainsystem/controllers/addorders.php | 18 ++++++++++++++++++ .../trainsystem/models/BIZ_train_model.php | 15 +++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/application/third_party/trainsystem/controllers/addorders.php b/application/third_party/trainsystem/controllers/addorders.php index d2d54808..f35d6a6a 100644 --- a/application/third_party/trainsystem/controllers/addorders.php +++ b/application/third_party/trainsystem/controllers/addorders.php @@ -20,6 +20,24 @@ class addorders extends CI_Controller{ exit('hello world'); } + //问题订单处理 + public function error_orders_submit(){ + //获取所有问题订单 + $errorOrdersList = $this->BIZ_train_model->getErrorOrdersList(); + $bpe_sn = ''; + foreach ($errorOrdersList as $items){ + $coldSn = $items->cold_sn; + $people_arr = $this->BIZ_train_model->biz_people($coldSn); + foreach($people_arr as $people_info){ + $bpe_sn .= $people_info->BPE_SN.','; + } + $bpe_sn = substr($bpe_sn,0,strlen($bpe_sn)-1); + //发送请求 + $this->booktickets($coldSn,$bpe_sn,'','juhe'); + } + + } + //自动出票 public function auto_pay_ticket(){ //log_message('error','auto ticket'); diff --git a/application/third_party/trainsystem/models/BIZ_train_model.php b/application/third_party/trainsystem/models/BIZ_train_model.php index 7fd52aee..b35c339d 100644 --- a/application/third_party/trainsystem/models/BIZ_train_model.php +++ b/application/third_party/trainsystem/models/BIZ_train_model.php @@ -436,6 +436,21 @@ class BIZ_train_model extends CI_Model { return $query->result(); } + function getErrorOrdersList(){ + $sql = "select + cold_sn + from + BIZ_ConfirmLineDetail left join BIZ_ConfirmLineInfo on COLD_COLI_SN = COLI_SN + where + COLD_State = '41' + and + COLI_State = '8' + and + COLI_WebCode in ('cht','WebMob-biz','WeChat-biz')"; + $query = $this->HT->query($sql); + return $query->result(); + } + //跟踪号与订单关联 public function linkTrackingCode($coli_sn,$TrackCode){ include('c:/database_conn.php');