diff --git a/webht/third_party/trippestOrderSync/controllers/api.php b/webht/third_party/trippestOrderSync/controllers/api.php index f12e0184..d284dcda 100644 --- a/webht/third_party/trippestOrderSync/controllers/api.php +++ b/webht/third_party/trippestOrderSync/controllers/api.php @@ -27,6 +27,8 @@ class Api extends CI_Controller { { ($find===null) ? $find = $this->input->get_post('q') : null; $find = (mb_strlen($find)<9) ? null : $this->input->get_post('q'); + preg_match('/[\d]+\-?[\w]*/', characet($find, "UTF-8"), $temp_array); + $find = $temp_array[0]; $order_plan = $this->Orders_model->get_order_vendorplan($find); if ($find===null || $order_plan == null) { $ret['status'] = 0; @@ -37,7 +39,7 @@ class Api extends CI_Controller { $ret['msg'] = ""; $gri_sn = $order_plan[0]->VAS_GRI_SN; $group_number_info = analysis_groupCode($order_plan[0]->COLI_GroupCode); - $ret['group_number'] = $group_number_info["cut"]; + $ret['group_number'] = $group_number_info["all"]; $operation_info = $ht_tourguide = $this->tourguide_common($gri_sn); if (empty($operation_info)) { return $this->operation_detail_tulanduo($find); @@ -153,8 +155,8 @@ class Api extends CI_Controller { public function operation_detail_tulanduo($find=null) { - ($find===null) ? $find = $this->input->get_post('q') : null; - $find = (mb_strlen($find)<9) ? null : $this->input->get_post('q'); + // ($find===null) ? $find = $this->input->get_post('q') : null; + // $find = (mb_strlen($find)<9) ? null : $this->input->get_post('q'); $order_project = $this->Orders_model->get_package_order($find); if ($find===null || $order_project == null) { $ret['status'] = 0; @@ -164,7 +166,7 @@ class Api extends CI_Controller { $ret['status'] = 1; $ret['msg'] = ""; $group_number_info = analysis_groupCode($order_project[0]->COLI_GroupCode); - $ret['group_number'] = $group_number_info["cut"]; + $ret['group_number'] = $group_number_info["all"]; $all_combine_no = array_unique(array_map(function($ele) { return $ele->GCI_combineNo; diff --git a/webht/third_party/trippestOrderSync/models/orders_query.php b/webht/third_party/trippestOrderSync/models/orders_query.php index 6d68b65f..ccd7140a 100644 --- a/webht/third_party/trippestOrderSync/models/orders_query.php +++ b/webht/third_party/trippestOrderSync/models/orders_query.php @@ -57,8 +57,9 @@ class Orders_query extends CI_Model { return $this->HT->query($sql)->result(); } - public function get_plan_tourguide($GRI_SN) + public function get_plan_tourguide($GRI_SN=0) { + $GRI_SN = $GRI_SN==NULL ? 0 : $GRI_SN; $sql = "SELECT tgi_info.TGI_SN,tgi_info.TGI2_Name,tgi_info.TGI_Mobile ,eoi.EOI_GetDate,eoi.EOI_Date,eoi.EOI_VEI_SN from Eva_ObjectInfo eoi