From 6c9e9af87c4dcc6e7c923023ef1d4df2b7a70e29 Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 26 Jun 2019 13:19:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E8=AE=A1=E5=88=92:=E6=AF=8F?= =?UTF-8?q?=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=E6=9C=9F?= =?UTF-8?q?=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=E9=85=92?= =?UTF-8?q?=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