From 2a825354ebe215659f1bc1772dc1a12d8e2d63a5 Mon Sep 17 00:00:00 2001 From: lyt Date: Thu, 13 Jun 2019 09:47:34 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vendorPlanSync/libraries/Tulanduo.php | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index 52bc8a4c..d6279cea 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -16,29 +16,29 @@ class Tulanduo $this->userId = "18"; $this->key = "d05c25e6e6c5d4898161e0aaf700d9c7"; */ - private $send_host = array( - "30" => array( - "userId" => 1134 - ,"key" => "73d180d05d425fd192e1c5b3097e75ff" - ) - ,"1" => array( - "userId" => 18 - ,"key" => "d05c25e6e6c5d4898161e0aaf700d9c7" - ) - ); - /*! - * test: - */ // private $send_host = array( // "30" => array( - // "userId" => 6035 - // ,"key" => "3bd16efd5f4165378f144da1f4829996" + // "userId" => 1134 + // ,"key" => "73d180d05d425fd192e1c5b3097e75ff" // ) // ,"1" => array( - // "userId" => 6035 - // ,"key" => "3bd16efd5f4165378f144da1f4829996" + // "userId" => 18 + // ,"key" => "d05c25e6e6c5d4898161e0aaf700d9c7" // ) // ); + /*! + * test: + */ + private $send_host = array( + "30" => array( + "userId" => 6035 + ,"key" => "3bd16efd5f4165378f144da1f4829996" + ) + ,"1" => array( + "userId" => 6035 + ,"key" => "3bd16efd5f4165378f144da1f4829996" + ) + ); // userId key // 1343 2e47c3721e3ff6e816fe6b928d7acc7d @@ -49,11 +49,11 @@ class Tulanduo // public $list_url = "http://ltdj.ltsoftware.net:19919/action/api/searchRouteOrder/"; // public $detail_url = "http://ltdj.ltsoftware.net:19919/action/api/detailRouteOrder/"; // public $neworder_url = "http://ltdj.ltsoftware.net:19919/action/api/addOrUpdateRouteOrder/"; - // public $neworder_url = "http://ltdj.ltsoftware.net:18888/action/api/addOrUpdateRouteOrder/"; + public $neworder_url = "http://ltdj.ltsoftware.net:18888/action/api/addOrUpdateRouteOrder/"; // Live - public $list_url = "http://djb3c.ltsoftware.net:9921/action/api/searchRouteOrder/"; - public $detail_url = "http://djb3c.ltsoftware.net:9921/action/api/detailRouteOrder/"; - public $neworder_url = "http://djb3c.ltsoftware.net:9921/action/api/addOrUpdateRouteOrder/"; + // public $list_url = "http://djb3c.ltsoftware.net:9921/action/api/searchRouteOrder/"; + // public $detail_url = "http://djb3c.ltsoftware.net:9921/action/api/detailRouteOrder/"; + // public $neworder_url = "http://djb3c.ltsoftware.net:9921/action/api/addOrUpdateRouteOrder/"; private $tulanduo_trippest_pag = array(); private $tulanduo_trippest_code = array(); From a54d4370bfb29c9be8314629c396b98dc424612d Mon Sep 17 00:00:00 2001 From: lyt Date: Mon, 24 Jun 2019 13:52:20 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E8=AE=A1=E5=88=92:fixe?= =?UTF-8?q?d=20=E9=A6=96=E7=AB=99=E5=9F=8E=E5=B8=82=E5=9C=A8=E9=80=9A?= =?UTF-8?q?=E5=AE=B5=E7=81=AB=E8=BD=A6=E6=88=96=E6=8E=A5=E6=9C=BA=E6=97=B6?= =?UTF-8?q?=E4=B8=BA=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 */ From 4baf1b8808426f3ddc4588be043df58444b5c63a Mon Sep 17 00:00:00 2001 From: lyt Date: Tue, 25 Jun 2019 10:52:36 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=BA=90?= =?UTF-8?q?=E5=9C=B0;=E5=A2=9E=E5=8A=A0=E5=AE=A2=E4=BA=BA=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vendorPlanSync/libraries/Tulanduo.php | 43 ++++++++++++++----- .../models/BIZ_orders_model.php | 26 +++++++++++ ...uo_addOrUpdateRouteOrderContentBuilder.php | 10 +++++ 3 files changed, 69 insertions(+), 10 deletions(-) diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index 43d75ab8..2945d33c 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -213,17 +213,28 @@ class Tulanduo // ->setRoomStandard($request_info->GCI_HotelRequest) // 住房标准 ->setRouteStandard($request_info->GCI_Request) // 行程服务标准 ; + $from_country = ""; // 客源地 if ($guestlist===null) { $g_cold_str = array_map(function ($ele){return $ele->GRD_COLD_SN;}, $vo['details']); $guestlist = $this->ci->BIZ_order->get_guestlist(implode(',',$g_cold_str)); + $from_country = current(array_filter(array_map(function ($ele){return $ele->Country;},$guestlist))); + if (strval($from_country)==='') { + $biz_contact = $this->ci->BIZ_order->get_customer_contact(implode(',',$g_cold_str)); + $from_country = $biz_contact->Country; + } } foreach ($guestlist as $key => $vg) { $this->ci->tldOrderBuilder->setCustomersName($key, $vg->MemberName ) ->setCustomersPeopleType($key, (calc_age_type($vg->BirthDay)==1 ? "成人" : "儿童")) ->setCustomersDocumentType($key, "护照") // Passport No. ->setCustomersDocumentNo($key, $vg->PassportNo) - ->setCustomersOtherInfo($key, $vg->Country . "; " . $vg->phone); + ->setCustomersPhoneNo($key, $vg->phone); + if (strval($vg->Country) !== '' && strval($from_country) === '') { + $from_country = $vg->Country; + } } + // 客源地 + $this->ci->tldOrderBuilder->setCustomerFromCity($from_country); // 补全空的日期,行程为空 $date1 = new DateTime($first_date); $date_end = new DateTime($end_date); @@ -433,14 +444,18 @@ class Tulanduo ; $train_guest_list = $this->ci->BIZ_order->get_guestlist(implode(',', $train_coldsn_arr)); // 客人列表 + $from_country = ""; // 客源地 foreach ($train_guest_list as $key => $vg) { - $this_otherinfo = ""; - $this->ci->tldOrderBuilder->setCustomersName($key, $vg->BPE_FirstName . " " . $vg->BPE_LastName ) + // $this_otherinfo = ""; + $this->ci->tldOrderBuilder->setCustomersName($key, $vg->MemberName ) ->setCustomersPeopleType($key, ($vg->BPE_GuestType==1 ? "成人" : "儿童")) ->setCustomersDocumentType($key, "护照") // Passport No. - ->setCustomersDocumentNo($key, $vg->BPE_Passport) + ->setCustomersDocumentNo($key, $vg->PassportNo) ; - $this_otherinfo .= $this->ci->BIZ_order->GetNationalityName($vg->BPE_Nationality); + if (strval($vg->Country) !== '' && strval($from_country) === '') { + $from_country = $vg->Country; + } + // $this_otherinfo .= $this->ci->BIZ_order->GetNationalityName($vg->BPE_Nationality); // todo:电话 // if (trim($vf['cold'][0]->GUT_TEL) != "" && $key===0) { // $this_otherinfo .= "; 电话:"; @@ -449,6 +464,7 @@ class Tulanduo // $this->ci->tldOrderBuilder->setCustomersOtherInfo($key, $this_otherinfo); // } } + $this->ci->tldOrderBuilder->setCustomerFromCity($from_country); $s_index = 0; foreach ($train_order as $train) { $this_content = ''; @@ -711,21 +727,28 @@ class Tulanduo // ->setBackTraffic($backTraffic) ; // 客人列表 + $from_country = ''; foreach ($guestlist as $key => $vg) { $this_otherinfo = ""; - $this->ci->tldOrderBuilder->setCustomersName($key, $vg->BPE_FirstName . " " . $vg->BPE_LastName ) + $this->ci->tldOrderBuilder->setCustomersName($key, $vg->MemberName ) ->setCustomersPeopleType($key, ($vg->BPE_GuestType==1 ? "成人" : "儿童")) ->setCustomersDocumentType($key, "护照") // Passport No. - ->setCustomersDocumentNo($key, $vg->BPE_Passport) + ->setCustomersDocumentNo($key, $vg->PassportNo) ; - $this_otherinfo .= $this->ci->BIZ_order->GetNationalityName($vg->BPE_Nationality); if (trim($vf['cold'][0]->GUT_TEL) != "" && $key===0) { - $this_otherinfo .= "; 电话:"; $this_otherinfo .= trim($vf["cold"][0]->GUT_POST)!=="" ? "+".trim($vf["cold"][0]->GUT_POST) : "" ; $this_otherinfo .= " " . trim($vf["cold"][0]->GUT_TEL); - $this->ci->tldOrderBuilder->setCustomersOtherInfo($key, $this_otherinfo); + $this->ci->tldOrderBuilder->setCustomersPhoneNo($key, $this_otherinfo); } + if (strval($from_country) === '' && strval($vg->Country) !== '') { + $from_country = $vg->Country; + } + } + if (strval($from_country)==='') { + $biz_contact = $this->ci->BIZ_order->get_customer_contact($COLD_SN_str); + $from_country = $biz_contact->Country; } + $this->ci->tldOrderBuilder->setCustomerFromCity($from_country); $scheduleDetails = $this->ci->BIZ_order->get_scheduleDetails($COLD_SN_str); $schedule_obj = array(); foreach ($scheduleDetails as $ks => $vs) { diff --git a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php index 0b9312da..5132d35f 100644 --- a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php +++ b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php @@ -385,4 +385,30 @@ return ; where p.PAGS_SN=$PAGS_SN "; return $this->HT->query($sql)->row(); } + + /*! + * @Author: LYT + * @Date: 2019-06-25 10:12:52 + * @Desc: 商务订单联系人信息 + */ + public function get_customer_contact($COLD_SN_str) + { + $sql = "SELECT + GUT_FirstName + ' '+GUT_LastName as MemberName, + '' as BirthDay, + '' as Gender, + GUT_MoveTel as phone, + (select COI2_Country from V_Country_Info + where LGC_LGC = 2 + and COI_SN = GUT_NationalityID + ) as Country, + GUT_Passport as PassportNo, + '' as PassportValidDate + --,BIZ_GUEST.* + from BIZ_GUEST + inner join BIZ_ConfirmLineInfo on COLI_GUT_SN=GUT_SN + inner join BIZ_ConfirmLineDetail on COLI_SN=COLD_COLI_SN + where COLD_SN IN ($COLD_SN_str) "; + return $this->HT->query($sql)->row(); + } } diff --git a/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php b/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php index bf27da86..04d57bb4 100644 --- a/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php +++ b/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php @@ -146,6 +146,16 @@ class TuLanDuo_addOrUpdateRouteOrderContentBuilder extends CI_Model $this->orderData['leavedDate'] = $leavedDate; return $this; } + public function setOperationUserName($operationUserName) + { + $this->orderData['operationUserName'] = $operationUserName; + return $this; + } + public function setCustomerFromCity($customerFromCity) + { + $this->orderData['customerFromCity'] = $customerFromCity; + return $this; + } /** 团款数组 */ public function setTravelFeesType($index, $type) From 524f2d375371e52441abd8e4489db997d6627372 Mon Sep 17 00:00:00 2001 From: lyt Date: Tue, 25 Jun 2019 15:08:29 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E8=AE=A1=E5=88=92:?= =?UTF-8?q?=E8=AE=A2=E7=A5=A8=E4=B8=9A=E5=8A=A1=E5=90=8D=E7=A7=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9;=E4=BC=A0=E7=BB=9F=E5=9B=A2=E5=AF=BC=E6=B8=B8?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vendorPlanSync/libraries/Tulanduo.php | 4 +- .../vendorPlanSync/models/Group_model.php | 48 +++++++++++++++++++ ...uo_addOrUpdateRouteOrderContentBuilder.php | 2 +- 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index 2945d33c..e52605f1 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -423,7 +423,7 @@ class Tulanduo } if ( ! empty($train_coldsn_arr)) { $route_name .= $route_name==="" ? "" : "+"; - $route_name .= "火车票预订"; + $route_name .= "单订国际列车票服务"; $order_type = 1; $train_order = $this->ci->BIZ_order->get_train_flight_order(implode(',', $train_coldsn_arr)); $agcOrderNo = $vas->GRI_Name; @@ -434,7 +434,7 @@ class Tulanduo ->setKey($userKey) ->setOrderType($order_type) ->setRouteName($route_name) - ->setRouteType("火车票预订") + ->setRouteType("单订国际列车票服务") ->setAgcOrderNo($agcOrderNo) ->setAdultNum($train_order[0]->adult_num) ->setChildNum($train_order[0]->child_num) diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php index 80a98169..a61841df 100644 --- a/webht/third_party/vendorPlanSync/models/Group_model.php +++ b/webht/third_party/vendorPlanSync/models/Group_model.php @@ -375,6 +375,54 @@ class Group_model extends CI_Model { return $this->HT->query($sql, array($vei_sn))->row(); } + /*! + * @Author: LYT + * @Date: 2019-06-25 14:56:01 + * @Desc: 生成计划最后的导游备注 + * @return PHP ArrayObject + */ + public function get_plan_remark($gri_sn, $vei_sn) + { + $sql = "DECLARE @StrResult varchar(1000);SET NOCOUNT ON; + EXEC SP_VendorPlan_GetAddFeeProduct $gri_sn, $vei_sn, @StrResult out + SELECT @StrResult as remark + "; + $result_obj = $this->call_sp_fun($sql); + return empty($result_obj) ? '' : $result_obj[0]->remark; + } + + public function call_sp_fun($sql) + { + // SET NOCOUNT ON 才能这样调用, 否则需要遍历结果集 + // $sql = " Tourmanager.dbo.SP_VendorPlan_GetPlanInfo ?, ?, 0 "; + // $grd_info = $this->HT->query($sql, array($gri_sn, $vendor_id))->result(); + include('c:/database_conn.php'); + $connection = array( + 'UID' => $db['HT']['username'], + 'PWD' => $db['HT']['password'], + 'Database' => 'tourmanager', + 'ConnectionPooling' => 1, + 'CharacterSet' => 'utf-8', + 'ReturnDatesAsStrings' => 1 + ); + $conn = sqlsrv_connect($db['HT']['hostname'], $connection); + $stmt = sqlsrv_query($conn, $sql); + $result_object = array(); + if (false !== $stmt ) { // 无权限或执行错误返回false + // 存储过程中每个select都产生结果集 + // 设置了SET NOCOUNT ON;就只有输出的结果集 + $a = true; + while ($a !== false) { + $row = sqlsrv_fetch_object($stmt); // Retrieves the next row of data as a PHP object. + $a = !empty($row); + $a===true ? $result_object[] = $row : null; + } + sqlsrv_free_stmt($stmt); + } + sqlsrv_close($conn); + return $result_object; + } + } /* End of file Group_model.php */ diff --git a/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php b/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php index 04d57bb4..a232cbe4 100644 --- a/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php +++ b/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php @@ -128,7 +128,7 @@ class TuLanDuo_addOrUpdateRouteOrderContentBuilder extends CI_Model } public function setRouteStandard($routeStandard) { - $this->orderData['routeStandard'] = $routeStandard; + $this->orderData['routeStandard'] = "该团按非购物团标准结算 要求/接团小技巧:\r\n" . $routeStandard; return $this; } public function setDestination($destination) From 88ab354418f6f31ec970826f10cdab793a06da45 Mon Sep 17 00:00:00 2001 From: lyt Date: Tue, 25 Jun 2019 15:53:50 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E8=AE=A1=E5=88=92:=20?= =?UTF-8?q?=E4=BC=A0=E7=BB=9F=E5=9B=A2:=E5=8F=91=E9=80=81=E5=AF=BC?= =?UTF-8?q?=E6=B8=B8=E5=A4=87=E6=B3=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vendorPlanSync/libraries/Tulanduo.php | 19 +++++++----- .../vendorPlanSync/models/Group_model.php | 30 ++----------------- 2 files changed, 14 insertions(+), 35 deletions(-) diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index 84155701..bfa3631b 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -48,8 +48,8 @@ class Tulanduo // test: // public $list_url = "http://ltdj.ltsoftware.net:19919/action/api/searchRouteOrder/"; // public $detail_url = "http://ltdj.ltsoftware.net:19919/action/api/detailRouteOrder/"; - // public $neworder_url = "http://ltdj.ltsoftware.net:19919/action/api/addOrUpdateRouteOrder/"; - public $neworder_url = "http://ltdj.ltsoftware.net:18888/action/api/addOrUpdateRouteOrder/"; + public $neworder_url = "http://ltdj.ltsoftware.net:19919/action/api/addOrUpdateRouteOrder/"; + // public $neworder_url = "http://ltdj.ltsoftware.net:18888/action/api/addOrUpdateRouteOrder/"; // Live // public $list_url = "http://djb3c.ltsoftware.net:9921/action/api/searchRouteOrder/"; // public $detail_url = "http://djb3c.ltsoftware.net:9921/action/api/detailRouteOrder/"; @@ -111,7 +111,9 @@ class Tulanduo return false; } $guestlist = $this->ci->orders_model->get_customer_list($gri_sn); - $request_info = $this->ci->Group_model->get_plan_request($vas->GRI_SN); + $request_info = $this->ci->Group_model->get_plan_request($gri_sn); + $plan_remark = $this->ci->Group_model->get_plan_remark($gri_sn, $vei_sn); + $plan_remark = strval($plan_remark)==='' ? '' : "请导游准备: " . $plan_remark; /** * TODO:团队类型? 先写2 * ??是否同一天含多个包价项目 @@ -129,7 +131,7 @@ class Tulanduo $big_order_index = 0; $expect_order_cnt = count($grd_apart_info['com'])+intval(!empty($grd_apart_info['big_pvt']))+intval(!empty($grd_apart_info['pvt'])); foreach ($grd_apart_info as $group_key => $grd_a) { - $big_order_index = $this->tour_apart_order_exec($group_key, $vas, $request_info, $guestlist, $grd_a, $big_order_index); + $big_order_index = $this->tour_apart_order_exec($group_key, $vas, $request_info, $guestlist, $grd_a, $big_order_index, $plan_remark); } if ($big_order_index === $expect_order_cnt) { /** VendorArrangeState VAS_IsReceive */ @@ -143,7 +145,7 @@ class Tulanduo * @Date: 2019-05-30 16:11:34 * @Desc: 执行发送订单计划信息. 参数已拆分归类好的行程 */ - public function tour_apart_order_exec($group_type, $vas, $request_info, $guestlist=null, $grd, $total_order_index) + public function tour_apart_order_exec($group_type, $vas, $request_info, $guestlist=null, $grd, $total_order_index, $plan_remark=null) { if (empty($grd)) { return $total_order_index; @@ -209,10 +211,13 @@ class Tulanduo ->setDestination($destination) ->setTravelDate($first_date) ->setLeavedDate($end_date) - // ->setOrderRemark($order_remark) // 订单备注 TODO: // ->setRoomStandard($request_info->GCI_HotelRequest) // 住房标准 ->setRouteStandard($request_info->GCI_Request) // 行程服务标准 ; + // 订单备注 + if (strval($plan_remark) !== '') { + $this->ci->tldOrderBuilder->setOrderRemark($plan_remark); + } $from_country = ""; // 客源地 if ($guestlist===null) { $g_cold_str = array_map(function ($ele){return $ele->GRD_COLD_SN;}, $vo['details']); @@ -902,7 +907,7 @@ class Tulanduo ->setTravelFeesRemark($fee_index, "代收; " . $replace_collections->ALL_Memo); } } - // 查询是否变更 TODO: deprecated + // 查询是否变更 deprecated $sync_orderstate = 10; $vps_sn = 0; $vendor_orderid = 0; diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php index a61841df..6819eea4 100644 --- a/webht/third_party/vendorPlanSync/models/Group_model.php +++ b/webht/third_party/vendorPlanSync/models/Group_model.php @@ -53,34 +53,8 @@ class Group_model extends CI_Model { public function get_vendor_plan_info($gri_sn, $vendor_id, $from_cold=false) { - // SET NOCOUNT ON 才能这样调用, 否则需要遍历结果集 - // $sql = " Tourmanager.dbo.SP_VendorPlan_GetPlanInfo ?, ?, 0 "; - // $grd_info = $this->HT->query($sql, array($gri_sn, $vendor_id))->result(); - include('c:/database_conn.php'); - $connection = array( - 'UID' => $db['HT']['username'], - 'PWD' => $db['HT']['password'], - 'Database' => 'tourmanager', - 'ConnectionPooling' => 1, - 'CharacterSet' => 'utf-8', - 'ReturnDatesAsStrings' => 1 - ); - $conn = sqlsrv_connect($db['HT']['hostname'], $connection); - $stmt = sqlsrv_query($conn, "SET NOCOUNT ON;EXEC Tourmanager.dbo.SP_VendorPlan_GetPlanInfo $gri_sn, $vendor_id, 0 "); - $result_object = array(); - if (false !== $stmt ) { // 无权限或执行错误返回false - // 存储过程中每个select都产生结果集 - // 设置了SET NOCOUNT ON;就只有输出的结果集 - $a = true; - while ($a !== false) { - $row = sqlsrv_fetch_object($stmt); // Retrieves the next row of data as a PHP object. - $a = !empty($row); - $a===true ? $result_object[] = $row : null; - } - sqlsrv_free_stmt($stmt); - } - sqlsrv_close($conn); - $grd_info = $result_object; + $sql = "SET NOCOUNT ON;EXEC Tourmanager.dbo.SP_VendorPlan_GetPlanInfo $gri_sn, $vendor_id, 0 "; + $grd_info = $this->call_sp_fun($sql); $all_day_no = array_map(function($ele){return $ele->GRD_DayNo;}, $grd_info); $day_no_str = implode(",", $all_day_no); $cold_sn_str = implode(",", array_map(function ($ele){return $ele->GRD_COLD_SN;}, $grd_info)); From 6a79badf2fee5c0eeb5634a48dcadf4acc2b9152 Mon Sep 17 00:00:00 2001 From: lyt Date: Tue, 25 Jun 2019 17:57:16 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E8=AE=A1=E5=88=92:?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=9F=E6=97=A5,=E5=9B=BD=E7=B1=8D,=20?= =?UTF-8?q?=E6=8A=A4=E7=85=A7=E6=9C=89=E6=95=88=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vendorPlanSync/libraries/Tulanduo.php | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index bfa3631b..50bd80c8 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -155,7 +155,7 @@ class Tulanduo $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); + $vendor_city = $this->ci->Group_model->get_vendor_city($vas->VAS_VEI_SN); $destination = $vendor_city->cityname; $destination_code = $vendor_city->citycode; } @@ -229,6 +229,7 @@ class Tulanduo } } foreach ($guestlist as $key => $vg) { + $this_otherinfo = ""; $this->ci->tldOrderBuilder->setCustomersName($key, $vg->MemberName ) ->setCustomersPeopleType($key, (calc_age_type($vg->BirthDay)==1 ? "成人" : "儿童")) ->setCustomersDocumentType($key, "护照") // Passport No. @@ -236,7 +237,15 @@ class Tulanduo ->setCustomersPhoneNo($key, $vg->phone); if (strval($vg->Country) !== '' && strval($from_country) === '') { $from_country = $vg->Country; + $this_otherinfo .= $vg->Country; + } + if (strval($vg->BirthDay) !== '') { + $this_otherinfo .= "; 生日:". $vg->BirthDay; } + if (strval($vg->PassportValidDate) !== '') { + $this_otherinfo .= "; 护照有效期:" . $vg->PassportValidDate; + } + $this->ci->tldOrderBuilder->setCustomersOtherInfo($key, $this_otherinfo); } // 客源地 $this->ci->tldOrderBuilder->setCustomerFromCity($from_country); @@ -451,7 +460,7 @@ class Tulanduo // 客人列表 $from_country = ""; // 客源地 foreach ($train_guest_list as $key => $vg) { - // $this_otherinfo = ""; + $this_otherinfo = ""; $this->ci->tldOrderBuilder->setCustomersName($key, $vg->MemberName ) ->setCustomersPeopleType($key, ($vg->BPE_GuestType==1 ? "成人" : "儿童")) ->setCustomersDocumentType($key, "护照") // Passport No. @@ -459,8 +468,15 @@ class Tulanduo ; if (strval($vg->Country) !== '' && strval($from_country) === '') { $from_country = $vg->Country; + $this_otherinfo .= $vg->Country; } - // $this_otherinfo .= $this->ci->BIZ_order->GetNationalityName($vg->BPE_Nationality); + if (strval($vg->BirthDay) !== '') { + $this_otherinfo .= "; 生日:". $vg->BirthDay; + } + if (strval($vg->PassportValidDate) !== '') { + $this_otherinfo .= "; 护照有效期:" . $vg->PassportValidDate; + } + $this->ci->tldOrderBuilder->setCustomersOtherInfo($key, $this_otherinfo); // todo:电话 // if (trim($vf['cold'][0]->GUT_TEL) != "" && $key===0) { // $this_otherinfo .= "; 电话:"; @@ -747,7 +763,15 @@ class Tulanduo } if (strval($from_country) === '' && strval($vg->Country) !== '') { $from_country = $vg->Country; + $this_otherinfo .= "; " . $vg->Country; + } + if (strval($vg->BirthDay) !== '') { + $this_otherinfo .= "; 生日:". $vg->BirthDay; + } + if (strval($vg->PassportValidDate) !== '') { + $this_otherinfo .= "; 护照有效期:" . $vg->PassportValidDate; } + $this->ci->tldOrderBuilder->setCustomersOtherInfo($key, $this_otherinfo); } if (strval($from_country)==='') { $biz_contact = $this->ci->BIZ_order->get_customer_contact($COLD_SN_str); From c458e0e5b50a12d70fa193de7ff32c4b6efad2e6 Mon Sep 17 00:00:00 2001 From: lyt Date: Tue, 25 Jun 2019 18:01:05 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vendorPlanSync/libraries/Tulanduo.php | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index 50bd80c8..c52b3567 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -16,29 +16,29 @@ class Tulanduo $this->userId = "18"; $this->key = "d05c25e6e6c5d4898161e0aaf700d9c7"; */ - // private $send_host = array( - // "30" => array( - // "userId" => 1134 - // ,"key" => "73d180d05d425fd192e1c5b3097e75ff" - // ) - // ,"1" => array( - // "userId" => 18 - // ,"key" => "d05c25e6e6c5d4898161e0aaf700d9c7" - // ) - // ); - /*! - * test: - */ private $send_host = array( "30" => array( - "userId" => 6035 - ,"key" => "3bd16efd5f4165378f144da1f4829996" + "userId" => 1134 + ,"key" => "73d180d05d425fd192e1c5b3097e75ff" ) ,"1" => array( - "userId" => 6035 - ,"key" => "3bd16efd5f4165378f144da1f4829996" + "userId" => 18 + ,"key" => "d05c25e6e6c5d4898161e0aaf700d9c7" ) ); + /*! + * test: + */ + // private $send_host = array( + // "30" => array( + // "userId" => 6035 + // ,"key" => "3bd16efd5f4165378f144da1f4829996" + // ) + // ,"1" => array( + // "userId" => 6035 + // ,"key" => "3bd16efd5f4165378f144da1f4829996" + // ) + // ); // userId key // 1343 2e47c3721e3ff6e816fe6b928d7acc7d @@ -48,12 +48,12 @@ class Tulanduo // test: // public $list_url = "http://ltdj.ltsoftware.net:19919/action/api/searchRouteOrder/"; // public $detail_url = "http://ltdj.ltsoftware.net:19919/action/api/detailRouteOrder/"; - public $neworder_url = "http://ltdj.ltsoftware.net:19919/action/api/addOrUpdateRouteOrder/"; + // public $neworder_url = "http://ltdj.ltsoftware.net:19919/action/api/addOrUpdateRouteOrder/"; // public $neworder_url = "http://ltdj.ltsoftware.net:18888/action/api/addOrUpdateRouteOrder/"; // Live - // public $list_url = "http://djb3c.ltsoftware.net:9921/action/api/searchRouteOrder/"; - // public $detail_url = "http://djb3c.ltsoftware.net:9921/action/api/detailRouteOrder/"; - // public $neworder_url = "http://djb3c.ltsoftware.net:9921/action/api/addOrUpdateRouteOrder/"; + public $list_url = "http://djb3c.ltsoftware.net:9921/action/api/searchRouteOrder/"; + public $detail_url = "http://djb3c.ltsoftware.net:9921/action/api/detailRouteOrder/"; + public $neworder_url = "http://djb3c.ltsoftware.net:9921/action/api/addOrUpdateRouteOrder/"; private $tulanduo_trippest_pag = array(); private $tulanduo_trippest_code = array(); From 638946cb8577632c0d2104d9dae918ffd0e2f83c Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 26 Jun 2019 09:10:02 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E8=AE=A1=E5=88=92:fixe?= =?UTF-8?q?d=E5=AE=A2=E4=BA=BA=E4=BF=A1=E6=81=AF=E5=A7=93=E5=90=8D?= =?UTF-8?q?=E5=AD=97=E6=AE=B5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/vendorPlanSync/models/BIZ_orders_model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php index 5132d35f..a718d921 100644 --- a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php +++ b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php @@ -37,7 +37,7 @@ class BIZ_Orders_model extends CI_Model { public function get_guestlist($COLD_SN_str) { $sql = "SELECT - BPE.BPE_FirstName+' '+BPE.BPE_MiddleName+' '+BPE.BPE_LastName as MemberName, + isnull(BPE.BPE_FirstName,'') +' '+isnull(BPE.BPE_MiddleName,'') +' '+isnull(BPE.BPE_LastName ,'') as MemberName, BPE.BPE_BirthDate BirthDay, ISNULL((select SYC2_CodeDiscribe from V_System_Code @@ -335,7 +335,7 @@ return ; ,f.adultcost ,f.TicketAddress ,cold.COLD_PersonNum as adult_num - ,cold.COLD_ChildNum+cold.COLD_BabyNum as child_num + ,isnull(cold.COLD_ChildNum,0)+isnull(cold.COLD_BabyNum,0) as child_num ,cold.COLD_StartDate,cold.COLD_EndDate ,(select CII2_Name from CItyInfo2 inner join VEndorInfo on VEI_CII_Name=CII2_CII_SN @@ -394,7 +394,7 @@ return ; public function get_customer_contact($COLD_SN_str) { $sql = "SELECT - GUT_FirstName + ' '+GUT_LastName as MemberName, + isnull(GUT_FirstName,'') + ' '+isnull(GUT_LastName,'') as MemberName, '' as BirthDay, '' as Gender, GUT_MoveTel as phone, From 18f02b9ce8a3916f7556e41214ea3cb7bc2de351 Mon Sep 17 00:00:00 2001 From: cyc Date: Wed, 26 Jun 2019 11:06:50 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=BA=E7=A5=A8?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=A6=96=E9=A1=B5JS=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/third_party/trainsystem/views/homepage.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/third_party/trainsystem/views/homepage.php b/application/third_party/trainsystem/views/homepage.php index c19cd801..88321104 100644 --- a/application/third_party/trainsystem/views/homepage.php +++ b/application/third_party/trainsystem/views/homepage.php @@ -123,7 +123,7 @@ function selseat(seat){ train[0]->ArrivalTime;?> train[0]->adultcost;?> status)?"否":"";?> - + @@ -401,7 +401,8 @@ function selseat(seat){ }); people_sn=people_sn.substring(1); - var istanding = $('input[name="istanding"]').is(':checked'); + var cold_sn = $(this).attr('data-order'); + var istanding = $('input[name="istanding_'+cold_sn+'"]').is(':checked'); url2+=$(this).attr("data-order")+"&people="+people_sn+"&selectseat="+selectseat+"&type=juhe&istanding="+istanding; From 3072931a4656b6dcae4be78da602868966d84c47 Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 26 Jun 2019 11:09:40 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E8=AE=A1=E5=88=92:?= =?UTF-8?q?=E5=AE=A2=E4=BA=BA=E4=BF=A1=E6=81=AF=E5=8F=AA=E7=95=99=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=9A=84=E7=94=B5=E8=AF=9D;=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=80=A7=E5=88=AB=E8=A1=A5=E5=85=85=E5=9C=A8=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E4=BF=A1=E6=81=AF=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vendorPlanSync/libraries/Tulanduo.php | 14 +++++++++++++- .../vendorPlanSync/models/BIZ_orders_model.php | 2 +- .../vendorPlanSync/models/orders_model.php | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index c52b3567..2c026d5f 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -220,11 +220,14 @@ class Tulanduo } $from_country = ""; // 客源地 if ($guestlist===null) { + // 商务订单的客人列表 $g_cold_str = array_map(function ($ele){return $ele->GRD_COLD_SN;}, $vo['details']); $guestlist = $this->ci->BIZ_order->get_guestlist(implode(',',$g_cold_str)); $from_country = current(array_filter(array_map(function ($ele){return $ele->Country;},$guestlist))); + // 联系人 + $biz_contact = $this->ci->BIZ_order->get_customer_contact(implode(',',$g_cold_str)); + $guestlist[0]->phone = $biz_contact->phone; if (strval($from_country)==='') { - $biz_contact = $this->ci->BIZ_order->get_customer_contact(implode(',',$g_cold_str)); $from_country = $biz_contact->Country; } } @@ -239,6 +242,9 @@ class Tulanduo $from_country = $vg->Country; $this_otherinfo .= $vg->Country; } + if (strval($vg->Gender) !== '') { + $this_otherinfo .= "; " . $vg->Gender; + } if (strval($vg->BirthDay) !== '') { $this_otherinfo .= "; 生日:". $vg->BirthDay; } @@ -470,6 +476,9 @@ class Tulanduo $from_country = $vg->Country; $this_otherinfo .= $vg->Country; } + if (strval($vg->Gender) !== '') { + $this_otherinfo .= "; " . $vg->Gender; + } if (strval($vg->BirthDay) !== '') { $this_otherinfo .= "; 生日:". $vg->BirthDay; } @@ -765,6 +774,9 @@ class Tulanduo $from_country = $vg->Country; $this_otherinfo .= "; " . $vg->Country; } + if (strval($vg->Gender) !== '') { + $this_otherinfo .= "; " . $vg->Gender; + } if (strval($vg->BirthDay) !== '') { $this_otherinfo .= "; 生日:". $vg->BirthDay; } diff --git a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php index a718d921..c7f56fc3 100644 --- a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php +++ b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php @@ -397,7 +397,7 @@ return ; isnull(GUT_FirstName,'') + ' '+isnull(GUT_LastName,'') as MemberName, '' as BirthDay, '' as Gender, - GUT_MoveTel as phone, + isnull(GUT_POST ,'') + ' ' + isnull(GUT_tel,'') + isnull(GUT_MoveTel,'') as phone, (select COI2_Country from V_Country_Info where LGC_LGC = 2 and COI_SN = GUT_NationalityID diff --git a/webht/third_party/vendorPlanSync/models/orders_model.php b/webht/third_party/vendorPlanSync/models/orders_model.php index 02412028..3814771c 100644 --- a/webht/third_party/vendorPlanSync/models/orders_model.php +++ b/webht/third_party/vendorPlanSync/models/orders_model.php @@ -27,7 +27,7 @@ class Orders_model extends CI_Model { where LGC_LGC = 2 and COI_SN in (select MEI_Country from MemberInfo where MEI_SN=CUL_CUI_SN) ) as Country, - MEI_Phone phone, + CASE isnull(CUL_IsLinkMan,0) WHEN 1 THEN MEI_Phone ELSE '' END AS phone, MEI_PassportNo PassportNo, MEI_PassportValidDate PassportValidDate -- (select MEI_PassportNo from MemberInfo where MEI_SN=CUL_CUI_SN) PassportNo, From 6c9e9af87c4dcc6e7c923023ef1d4df2b7a70e29 Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 26 Jun 2019 13:19:12 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E8=AE=A1=E5=88=92:?= =?UTF-8?q?=E6=AF=8F=E4=B8=AA=E5=AE=A2=E4=BA=BA=E7=9A=84=E5=9B=BD=E7=B1=8D?= =?UTF-8?q?;=E9=85=92=E5=BA=97=E9=A2=84=E8=AE=A2=E5=92=8C=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E5=A1=AB=E5=85=A5=E7=94=A8=E6=88=BF=E6=A0=87=E5=87=86?= =?UTF-8?q?;=E7=BA=BF=E8=B7=AF=E4=BF=A1=E6=81=AF=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E9=85=92=E5=BA=97=E5=8F=AA=E5=8F=96=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vendorPlanSync/libraries/Tulanduo.php | 24 ++++++++++----- .../vendorPlanSync/models/Group_model.php | 29 +++++++++++++++++++ .../vendorPlanSync/models/orders_model.php | 2 +- 3 files changed, 47 insertions(+), 8 deletions(-) diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index 2c026d5f..33e91b1b 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -238,9 +238,9 @@ class Tulanduo ->setCustomersDocumentType($key, "护照") // Passport No. ->setCustomersDocumentNo($key, $vg->PassportNo) ->setCustomersPhoneNo($key, $vg->phone); - if (strval($vg->Country) !== '' && strval($from_country) === '') { - $from_country = $vg->Country; + if (strval($vg->Country) !== '') { $this_otherinfo .= $vg->Country; + $from_country = strval($from_country) === '' ? $vg->Country : $from_country; } if (strval($vg->Gender) !== '') { $this_otherinfo .= "; " . $vg->Gender; @@ -283,12 +283,21 @@ class Tulanduo ->setScheduleDetailsContent($kd, $vgrd->GRD_LeaveCity . "-" . $vgrd->GRD_ServiceCity . "\r\n" . $vgrd->GRD_Landscape . "\r\n" . $vgrd->GRD_Traffic) - ->setScheduleDetailsAccommodation($kd, $vgrd->GRD_Hotel) ->setScheduleDetailsTraffic($kd, ($vgrd->GRD_Traffic)) ->setScheduleDetailsBreakFirst($kd, 0 ) ->setScheduleDetailsDinner($kd, (trim($vgrd->GRD_Meal_S)==="" ? 0 : 1 )) ->setScheduleDetailsLunch($kd, (trim($vgrd->GRD_Meal_L)==="" ? 0 : 1 )) ; + // 酒店只写名字在线路信息中 + if (isset($vgrd->hotel_name) && strval($vgrd->hotel_name)!=='') { + $this->ci->tldOrderBuilder->setScheduleDetailsAccommodation($kd, $vgrd->hotel_name); + } else { + $this->ci->tldOrderBuilder->setScheduleDetailsAccommodation($kd, $vgrd->GRD_Hotel); + } + if (strval($vgrd->GRD_Hotel) !=='' ) { + $this->ci->tldOrderBuilder->setRoomStandard($vgrd->GRD_OrderDate . " " . trim($vgrd->GRD_Hotel)); + } + // 商务订单信息 if (isset($vgrd->hotel_checkin)) { $this->ci->tldOrderBuilder->setRoomStandard(trim($vgrd->hotel_checkin)); } @@ -472,8 +481,8 @@ class Tulanduo ->setCustomersDocumentType($key, "护照") // Passport No. ->setCustomersDocumentNo($key, $vg->PassportNo) ; - if (strval($vg->Country) !== '' && strval($from_country) === '') { - $from_country = $vg->Country; + if (strval($vg->Country) !== '' ) { + $from_country = strval($from_country) === '' ? $vg->Country : $from_country; $this_otherinfo .= $vg->Country; } if (strval($vg->Gender) !== '') { @@ -770,8 +779,8 @@ class Tulanduo $this_otherinfo .= " " . trim($vf["cold"][0]->GUT_TEL); $this->ci->tldOrderBuilder->setCustomersPhoneNo($key, $this_otherinfo); } - if (strval($from_country) === '' && strval($vg->Country) !== '') { - $from_country = $vg->Country; + if ( strval($vg->Country) !== '') { + $from_country = strval($from_country) === '' ? $vg->Country : $from_country; $this_otherinfo .= "; " . $vg->Country; } if (strval($vg->Gender) !== '') { @@ -785,6 +794,7 @@ class Tulanduo } $this->ci->tldOrderBuilder->setCustomersOtherInfo($key, $this_otherinfo); } + // 客源地 if (strval($from_country)==='') { $biz_contact = $this->ci->BIZ_order->get_customer_contact($COLD_SN_str); $from_country = $biz_contact->Country; diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php index 6819eea4..40ed0810 100644 --- a/webht/third_party/vendorPlanSync/models/Group_model.php +++ b/webht/third_party/vendorPlanSync/models/Group_model.php @@ -60,6 +60,7 @@ class Group_model extends CI_Model { $cold_sn_str = implode(",", array_map(function ($ele){return $ele->GRD_COLD_SN;}, $grd_info)); if ($from_cold===false) { $all_aci = $this->get_arrange_info($gri_sn, $vendor_id, $day_no_str); + $all_hotel = $this->get_arrange_hotel($gri_sn, $day_no_str); foreach ($grd_info as $kgrd => &$vgrd) { $vgrd->pag_code_arr = array(); $vgrd->PAG_Title = $vgrd->GRD_Landscape; @@ -80,6 +81,13 @@ class Group_model extends CI_Model { } } } + $vgrd->hotel_name = ''; + foreach ($all_hotel as $kh => $vh) { + if ($vgrd->GRD_DayNo == $vh->ACI_DayNo) { + $vgrd->hotel_name = $vh->hotel; + break; + } + } } } else { $all_cold = $this->get_arrange_info_from_biz_cold($cold_sn_str); @@ -170,6 +178,27 @@ class Group_model extends CI_Model { return $this->HT->query($sql)->result(); } + public function get_arrange_hotel($gri_sn, $day_no="") + { + $day_no_sql = ($day_no !== "") ? " AND aci.ACI_DayNo IN ($day_no) " : ""; + $sql = "SELECT + aci.ACI_VEI_SN, + aci.ACI_SN, + aci.ACI_DayNo, + (select VEI2_CompanyN from vendorinfo2 where vei2_vei_sn=ACI_serviceSN and VEI2_LGC=2) as hotel, + ACI_ServiceType,ACI_ServiceSN,ACI_ServiceSN2, + ACI_OrderDate, + ACI_Amount + -- ,* + from ArrangeConfirmInfo aci + where 1=1 + and aci.ACI_GRI_SN=? + and aci.ACI_ServiceType = 'A' + $day_no_sql + order by ACI_DayNo,ACI_SNInOneDay"; + return $this->HT->query($sql, array($gri_sn))->result(); + } + public function get_sync_info($vas, $tour_code="") { $sql = "SELECT * diff --git a/webht/third_party/vendorPlanSync/models/orders_model.php b/webht/third_party/vendorPlanSync/models/orders_model.php index 3814771c..34e8d9de 100644 --- a/webht/third_party/vendorPlanSync/models/orders_model.php +++ b/webht/third_party/vendorPlanSync/models/orders_model.php @@ -29,7 +29,7 @@ class Orders_model extends CI_Model { ) as Country, CASE isnull(CUL_IsLinkMan,0) WHEN 1 THEN MEI_Phone ELSE '' END AS phone, MEI_PassportNo PassportNo, - MEI_PassportValidDate PassportValidDate + CONVERT(DATE,MEI_PassportValidDate,120) PassportValidDate -- (select MEI_PassportNo from MemberInfo where MEI_SN=CUL_CUI_SN) PassportNo, -- (select MEI_PassportValidDate from MemberInfo where MEI_SN=CUL_CUI_SN) PassportValidDate -- ,(select dbo.GetSysCodeName(MEI_Occupation,2) from MemberInfo where MEI_SN=CUL_CUI_SN) as Occupation From c991d022a609390bcf19d0cca89c3c7b47fbf95f Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 26 Jun 2019 14:51:34 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E8=AE=A1=E5=88=92:?= =?UTF-8?q?=E5=AE=A2=E4=BA=BA=E7=94=9F=E6=97=A5=E4=BF=A1=E6=81=AF=E4=BB=85?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/vendorPlanSync/models/orders_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webht/third_party/vendorPlanSync/models/orders_model.php b/webht/third_party/vendorPlanSync/models/orders_model.php index 34e8d9de..acfdc36f 100644 --- a/webht/third_party/vendorPlanSync/models/orders_model.php +++ b/webht/third_party/vendorPlanSync/models/orders_model.php @@ -15,7 +15,7 @@ class Orders_model extends CI_Model { from MemberInfo where MEI_SN=CUL_CUI_SN ) as MemberName, - (select MEI_BirthDay from MemberInfo where MEI_SN=CUL_CUI_SN) as BirthDay, + (select CONVERT(DATE,MEI_BirthDay) from MemberInfo where MEI_SN=CUL_CUI_SN) as BirthDay, ISNULL((select SYC2_CodeDiscribe from V_System_Code where LGC_LGC=2