diff --git a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php index 0a4feca3..8e812c1d 100644 --- a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php +++ b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php @@ -176,8 +176,9 @@ log_message('error','new coli ' . $this->Orders_model->BIZ_COLI_ID); /**BIZ_ConfirmLineDetail*/ $this->Orders_model->COLD_COLI_SN = $this->Orders_model->BIZ_COLI_SN; $this->Orders_model->COLD_ServiceType = "D"; - $this->Orders_model->COLD_ServiceSN = $serviceSN; + $this->Orders_model->COLD_ServiceSN = $serviceSN->PAG2_SN; $this->Orders_model->COLD_ServiceSN2 = $pag_sub; + $this->Orders_model->COLD_ServiceCity = $serviceSN->PAG_CII_SN; $this->Orders_model->COLD_StartDate = $vo['travelDate']; $this->Orders_model->COLD_EndDate = $vo['leaveDate']; $this->Orders_model->COLD_PersonNum = $vo['adultNum']; @@ -223,7 +224,7 @@ log_message('error','new coli ' . $this->Orders_model->BIZ_COLI_ID); public function update_HT_order_operation($coli_sn=null) { - $this->load->model('Orders_update'); + $this->load->model('Order_update'); if ($coli_sn !== null) { $to_update_list = $this->Orders_model->get_groupCombineInfo($coli_sn); } else { @@ -249,21 +250,21 @@ log_message('error','new coli ' . $this->Orders_model->BIZ_COLI_ID); /** HT 开始 */ /** UPDATE */ /** BIZ_ConfirmLineInfo */ - $this->Orders_update->coli_where_update = " COLI_SN=" . $order->GCI_COLI_SN; + $this->Order_update->coli_where_update = " COLI_SN=" . $order->GCI_COLI_SN; $coli_update_column = array( "COLI_Memo" => $order->COLI_Memo . "\r\n" . $detail_jsonResp->orderDetail->orderRemark ,"COLI_OrderDetailText" => $order->COLI_OrderDetailText . "\r\n" // 调度信息加上以便在HT界面上显示 todo ); - $this->Orders_update->biz_confirmlineinfo_update($coli_update_column); + $this->Order_update->biz_confirmlineinfo_update($coli_update_column); /** BIZ_ConfirmLineDetail */ // nothing to update /** biz_groupcombineinfo */ - $this->Orders_update->gci_where_update = " GCI_SN=" . $order->GCI_SN; + $this->Order_update->gci_where_update = " GCI_SN=" . $order->GCI_SN; $gci_update_column = array( - "GCI_combineNo" => $detail_jsonResp->orderDetail->groupOrderNo + "GCI_combineNo" => $detail_jsonResp->orderDetail->groupOrderNo ,"GCI_travelDate" => $detail_jsonResp->orderDetail->travelDate ,"GCI_leaveDate" => $detail_jsonResp->orderDetail->leaveDate ); - $this->Orders_update->biz_groupcombineinfo_update($gci_update_column); + $this->Order_update->biz_groupcombineinfo_update($gci_update_column); /** INSERT */ /*BIZ_BookPeople*/ foreach ($detail_jsonResp->orderDetail->customers as $kd => $vd) { diff --git a/webht/third_party/trippestOrderSync/models/order_update.php b/webht/third_party/trippestOrderSync/models/order_update.php index 4eaef337..bfb53783 100644 --- a/webht/third_party/trippestOrderSync/models/order_update.php +++ b/webht/third_party/trippestOrderSync/models/order_update.php @@ -1,6 +1,6 @@ HT->query($sql); if ($query->row()) { - return $query->row()->PAG2_SN; + return $query->row(); } return NULL; } + /*! + * 需要更新调度信息的订单 + * @param integer $coli_sn [description] + * @param [type] $startDate [description] + * @param [type] $endDate [description] + */ public function get_groupCombineInfo($coli_sn=0, $startDate=null, $endDate=NULL) { $sql = "SELECT top 1000 coli.COLI_GRI_SN, cold.COLD_SN, coli.COLI_OrderDetailText, coli.COLI_Memo, gci.* @@ -123,7 +129,7 @@ class Orders_model extends CI_Model { $sql .= " and gci.GCI_COLI_SN='$coli_sn' "; } if ($startDate !== NULL) { - // $sql .= " and gci.GCI_travelDate between '$startDate' and '$endDate' "; + // $sql .= " and gci.GCI_travelDate between '$startDate' and '$endDate' "; // test } $query = $this->HT->query($sql); return $query->result(); @@ -563,6 +569,8 @@ class Orders_model extends CI_Model { var $COLD_PlanVEI_SN = NULL; // 默认供应商 628-火车桂林国旅 var $COLD_SPFS = NULL; // 快递方式:1自取 2酒店 3指定地址 var $COLD_ServiceSN = NULL; // 产品ID 除机票外 其它自基础产品库各产品ID + var $COLD_ServiceSN2 = NULL; + var $COLD_ServiceCity = NULL; var $COLD_Memo = NULL; var $COLD_MemoText = NULL; @@ -595,7 +603,9 @@ class Orders_model extends CI_Model { . " COLD_SPFS, \n" . " COLD_Memo, \n" . " COLD_MemoText, \n" - . " COLD_ServiceSN \n" + . " COLD_ServiceSN, \n" + . " COLD_ServiceSN2, \n" + . " COLD_ServiceCity \n" . ") \n" . "VALUES \n" . "( \n" @@ -616,6 +626,8 @@ class Orders_model extends CI_Model { . " ?, \n" . " ?, \n" . " ?, \n" + . " ?, \n" + . " ?, \n" . " ?, \n" . " ? \n" . ")"; @@ -639,7 +651,9 @@ class Orders_model extends CI_Model { $this->COLD_SPFS, $this->COLD_Memo, $this->COLD_MemoText, - $this->COLD_ServiceSN) + $this->COLD_ServiceSN, + $this->COLD_ServiceSN2, + $this->COLD_ServiceCity) ); //查出最近插入的id $HT2 = $this->load->database('HT', true);