From a54d4370bfb29c9be8314629c396b98dc424612d Mon Sep 17 00:00:00 2001 From: lyt Date: Mon, 24 Jun 2019 13:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E8=AE=A1=E5=88=92:fixed=20?= =?UTF-8?q?=E9=A6=96=E7=AB=99=E5=9F=8E=E5=B8=82=E5=9C=A8=E9=80=9A=E5=AE=B5?= =?UTF-8?q?=E7=81=AB=E8=BD=A6=E6=88=96=E6=8E=A5=E6=9C=BA=E6=97=B6=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vendorPlanSync/libraries/Tulanduo.php | 15 +++++++++++---- .../vendorPlanSync/models/Group_model.php | 11 +++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index c7338520..43d75ab8 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -150,11 +150,18 @@ class Tulanduo } $userId = $this->send_host["1"]["userId"]; $userKey = $this->send_host["1"]["key"]; + $destination = $grd['details'][0]->tocity; + $destination_code = $grd['details'][0]->citycode; + if (empty($destination)) { + $vendor_city = $this->Group_model->get_vendor_city($vas->VAS_VEI_SN); + $destination = $vendor_city->cityname; + $destination_code = $vendor_city->citycode; + } switch ($group_type) { case 'big_pvt': $total_order_index ++; $all_grd = array($grd); - $routeName = "中华游" . $grd['details'][0]->tocity . "常规线路"; + $routeName = "中华游" . $destination . "常规线路"; $routeType = $routeName; $agcOrderNo = $vas->GRI_Name; // $agcOrderNo .= "(" . $vas->operator . ")"; @@ -165,7 +172,7 @@ class Tulanduo $all_grd = array($grd); $routeName = empty($grd['details'][0]->GRD_Landscape) ? $grd['details'][0]->PAG_Title : $grd['details'][0]->GRD_Landscape; $routeName .= "(" . $grd['details'][0]->PAG_Code . ")"; - $routeType = $grd['details'][0]->tocity . "目的地线路"; + $routeType = $destination . "目的地线路"; $agcOrderNo = $vas->GRI_Name; // $agcOrderNo .= "(" . $vas->operator . ")"; $order_type = 1; @@ -183,7 +190,7 @@ class Tulanduo if (empty($routeName)) { $routeName = $vo['details'][0]->GRD_Landscape . "(" . $vo['details'][0]->PAG_Code . ")"; } - $routeType = $vo['details'][0]->tocity . "目的地线路"; + $routeType = $destination . "目的地线路"; $agcOrderNo = $vas->GRI_Name; // $agcOrderNo .= "(" . $vas->operator . ")"; } @@ -199,7 +206,7 @@ class Tulanduo ->setAgcOrderNo($agcOrderNo) ->setAdultNum(intval($vo['details'][0]->ACI_PersonNum)) ->setChildNum(intval(bcadd($vo['details'][0]->ACI_ChildNum, $vo['details'][0]->ACI_BabyNum))) - ->setDestination($vo['details'][0]->tocity) + ->setDestination($destination) ->setTravelDate($first_date) ->setLeavedDate($end_date) // ->setOrderRemark($order_remark) // 订单备注 TODO: diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php index 531663e5..80a98169 100644 --- a/webht/third_party/vendorPlanSync/models/Group_model.php +++ b/webht/third_party/vendorPlanSync/models/Group_model.php @@ -364,6 +364,17 @@ class Group_model extends CI_Model { return $query; } + public function get_vendor_city($vei_sn) + { + $sql = "SELECT + CII_PKCode citycode,CII2_Name cityname + from VEndorInfo + inner join CItyInfo on CII_SN=VEI_CII_Name + inner join CItyInfo2 on CII2_CII_SN=VEI_CII_Name and CII2_LGC=2 + where VEI_SN=? "; + return $this->HT->query($sql, array($vei_sn))->row(); + } + } /* End of file Group_model.php */