|
|
@ -213,17 +213,28 @@ class Tulanduo
|
|
|
|
// ->setRoomStandard($request_info->GCI_HotelRequest) // 住房标准
|
|
|
|
// ->setRoomStandard($request_info->GCI_HotelRequest) // 住房标准
|
|
|
|
->setRouteStandard($request_info->GCI_Request) // 行程服务标准
|
|
|
|
->setRouteStandard($request_info->GCI_Request) // 行程服务标准
|
|
|
|
;
|
|
|
|
;
|
|
|
|
|
|
|
|
$from_country = ""; // 客源地
|
|
|
|
if ($guestlist===null) {
|
|
|
|
if ($guestlist===null) {
|
|
|
|
$g_cold_str = array_map(function ($ele){return $ele->GRD_COLD_SN;}, $vo['details']);
|
|
|
|
$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));
|
|
|
|
$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) {
|
|
|
|
foreach ($guestlist as $key => $vg) {
|
|
|
|
$this->ci->tldOrderBuilder->setCustomersName($key, $vg->MemberName )
|
|
|
|
$this->ci->tldOrderBuilder->setCustomersName($key, $vg->MemberName )
|
|
|
|
->setCustomersPeopleType($key, (calc_age_type($vg->BirthDay)==1 ? "成人" : "儿童"))
|
|
|
|
->setCustomersPeopleType($key, (calc_age_type($vg->BirthDay)==1 ? "成人" : "儿童"))
|
|
|
|
->setCustomersDocumentType($key, "护照") // Passport No.
|
|
|
|
->setCustomersDocumentType($key, "护照") // Passport No.
|
|
|
|
->setCustomersDocumentNo($key, $vg->PassportNo)
|
|
|
|
->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);
|
|
|
|
$date1 = new DateTime($first_date);
|
|
|
|
$date_end = new DateTime($end_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));
|
|
|
|
$train_guest_list = $this->ci->BIZ_order->get_guestlist(implode(',', $train_coldsn_arr));
|
|
|
|
// 客人列表
|
|
|
|
// 客人列表
|
|
|
|
|
|
|
|
$from_country = ""; // 客源地
|
|
|
|
foreach ($train_guest_list as $key => $vg) {
|
|
|
|
foreach ($train_guest_list as $key => $vg) {
|
|
|
|
$this_otherinfo = "";
|
|
|
|
// $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 ? "成人" : "儿童"))
|
|
|
|
->setCustomersPeopleType($key, ($vg->BPE_GuestType==1 ? "成人" : "儿童"))
|
|
|
|
->setCustomersDocumentType($key, "护照") // Passport No.
|
|
|
|
->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:电话
|
|
|
|
// todo:电话
|
|
|
|
// if (trim($vf['cold'][0]->GUT_TEL) != "" && $key===0) {
|
|
|
|
// if (trim($vf['cold'][0]->GUT_TEL) != "" && $key===0) {
|
|
|
|
// $this_otherinfo .= "; 电话:";
|
|
|
|
// $this_otherinfo .= "; 电话:";
|
|
|
@ -449,6 +464,7 @@ class Tulanduo
|
|
|
|
// $this->ci->tldOrderBuilder->setCustomersOtherInfo($key, $this_otherinfo);
|
|
|
|
// $this->ci->tldOrderBuilder->setCustomersOtherInfo($key, $this_otherinfo);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->ci->tldOrderBuilder->setCustomerFromCity($from_country);
|
|
|
|
$s_index = 0;
|
|
|
|
$s_index = 0;
|
|
|
|
foreach ($train_order as $train) {
|
|
|
|
foreach ($train_order as $train) {
|
|
|
|
$this_content = '';
|
|
|
|
$this_content = '';
|
|
|
@ -711,21 +727,28 @@ class Tulanduo
|
|
|
|
// ->setBackTraffic($backTraffic)
|
|
|
|
// ->setBackTraffic($backTraffic)
|
|
|
|
;
|
|
|
|
;
|
|
|
|
// 客人列表
|
|
|
|
// 客人列表
|
|
|
|
|
|
|
|
$from_country = '';
|
|
|
|
foreach ($guestlist as $key => $vg) {
|
|
|
|
foreach ($guestlist as $key => $vg) {
|
|
|
|
$this_otherinfo = "";
|
|
|
|
$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 ? "成人" : "儿童"))
|
|
|
|
->setCustomersPeopleType($key, ($vg->BPE_GuestType==1 ? "成人" : "儿童"))
|
|
|
|
->setCustomersDocumentType($key, "护照") // Passport No.
|
|
|
|
->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) {
|
|
|
|
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_POST)!=="" ? "+".trim($vf["cold"][0]->GUT_POST) : "" ;
|
|
|
|
$this_otherinfo .= " " . trim($vf["cold"][0]->GUT_TEL);
|
|
|
|
$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);
|
|
|
|
$scheduleDetails = $this->ci->BIZ_order->get_scheduleDetails($COLD_SN_str);
|
|
|
|
$schedule_obj = array();
|
|
|
|
$schedule_obj = array();
|
|
|
|
foreach ($scheduleDetails as $ks => $vs) {
|
|
|
|
foreach ($scheduleDetails as $ks => $vs) {
|
|
|
|