|
|
@ -111,7 +111,9 @@ class Tulanduo
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$guestlist = $this->ci->orders_model->get_customer_list($gri_sn);
|
|
|
|
$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
|
|
|
|
* TODO:团队类型? 先写2
|
|
|
|
* ??是否同一天含多个包价项目
|
|
|
|
* ??是否同一天含多个包价项目
|
|
|
@ -129,7 +131,7 @@ class Tulanduo
|
|
|
|
$big_order_index = 0;
|
|
|
|
$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']));
|
|
|
|
$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) {
|
|
|
|
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) {
|
|
|
|
if ($big_order_index === $expect_order_cnt) {
|
|
|
|
/** VendorArrangeState VAS_IsReceive */
|
|
|
|
/** VendorArrangeState VAS_IsReceive */
|
|
|
@ -143,7 +145,7 @@ class Tulanduo
|
|
|
|
* @Date: 2019-05-30 16:11:34
|
|
|
|
* @Date: 2019-05-30 16:11:34
|
|
|
|
* @Desc: 执行发送订单计划信息. 参数已拆分归类好的行程
|
|
|
|
* @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)) {
|
|
|
|
if (empty($grd)) {
|
|
|
|
return $total_order_index;
|
|
|
|
return $total_order_index;
|
|
|
@ -153,7 +155,7 @@ class Tulanduo
|
|
|
|
$destination = $grd['details'][0]->tocity;
|
|
|
|
$destination = $grd['details'][0]->tocity;
|
|
|
|
$destination_code = $grd['details'][0]->citycode;
|
|
|
|
$destination_code = $grd['details'][0]->citycode;
|
|
|
|
if (empty($destination)) {
|
|
|
|
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 = $vendor_city->cityname;
|
|
|
|
$destination_code = $vendor_city->citycode;
|
|
|
|
$destination_code = $vendor_city->citycode;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -209,10 +211,13 @@ class Tulanduo
|
|
|
|
->setDestination($destination)
|
|
|
|
->setDestination($destination)
|
|
|
|
->setTravelDate($first_date)
|
|
|
|
->setTravelDate($first_date)
|
|
|
|
->setLeavedDate($end_date)
|
|
|
|
->setLeavedDate($end_date)
|
|
|
|
// ->setOrderRemark($order_remark) // 订单备注 TODO:
|
|
|
|
|
|
|
|
// ->setRoomStandard($request_info->GCI_HotelRequest) // 住房标准
|
|
|
|
// ->setRoomStandard($request_info->GCI_HotelRequest) // 住房标准
|
|
|
|
->setRouteStandard($request_info->GCI_Request) // 行程服务标准
|
|
|
|
->setRouteStandard($request_info->GCI_Request) // 行程服务标准
|
|
|
|
;
|
|
|
|
;
|
|
|
|
|
|
|
|
// 订单备注
|
|
|
|
|
|
|
|
if (strval($plan_remark) !== '') {
|
|
|
|
|
|
|
|
$this->ci->tldOrderBuilder->setOrderRemark($plan_remark);
|
|
|
|
|
|
|
|
}
|
|
|
|
$from_country = ""; // 客源地
|
|
|
|
$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']);
|
|
|
@ -224,6 +229,7 @@ class Tulanduo
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
foreach ($guestlist as $key => $vg) {
|
|
|
|
foreach ($guestlist as $key => $vg) {
|
|
|
|
|
|
|
|
$this_otherinfo = "";
|
|
|
|
$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.
|
|
|
@ -231,7 +237,15 @@ class Tulanduo
|
|
|
|
->setCustomersPhoneNo($key, $vg->phone);
|
|
|
|
->setCustomersPhoneNo($key, $vg->phone);
|
|
|
|
if (strval($vg->Country) !== '' && strval($from_country) === '') {
|
|
|
|
if (strval($vg->Country) !== '' && strval($from_country) === '') {
|
|
|
|
$from_country = $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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 客源地
|
|
|
|
// 客源地
|
|
|
|
$this->ci->tldOrderBuilder->setCustomerFromCity($from_country);
|
|
|
|
$this->ci->tldOrderBuilder->setCustomerFromCity($from_country);
|
|
|
@ -423,7 +437,7 @@ class Tulanduo
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( ! empty($train_coldsn_arr)) {
|
|
|
|
if ( ! empty($train_coldsn_arr)) {
|
|
|
|
$route_name .= $route_name==="" ? "" : "+";
|
|
|
|
$route_name .= $route_name==="" ? "" : "+";
|
|
|
|
$route_name .= "火车票预订";
|
|
|
|
$route_name .= "单订国际列车票服务";
|
|
|
|
$order_type = 1;
|
|
|
|
$order_type = 1;
|
|
|
|
$train_order = $this->ci->BIZ_order->get_train_flight_order(implode(',', $train_coldsn_arr));
|
|
|
|
$train_order = $this->ci->BIZ_order->get_train_flight_order(implode(',', $train_coldsn_arr));
|
|
|
|
$agcOrderNo = $vas->GRI_Name;
|
|
|
|
$agcOrderNo = $vas->GRI_Name;
|
|
|
@ -434,7 +448,7 @@ class Tulanduo
|
|
|
|
->setKey($userKey)
|
|
|
|
->setKey($userKey)
|
|
|
|
->setOrderType($order_type)
|
|
|
|
->setOrderType($order_type)
|
|
|
|
->setRouteName($route_name)
|
|
|
|
->setRouteName($route_name)
|
|
|
|
->setRouteType("火车票预订")
|
|
|
|
->setRouteType("单订国际列车票服务")
|
|
|
|
->setAgcOrderNo($agcOrderNo)
|
|
|
|
->setAgcOrderNo($agcOrderNo)
|
|
|
|
->setAdultNum($train_order[0]->adult_num)
|
|
|
|
->setAdultNum($train_order[0]->adult_num)
|
|
|
|
->setChildNum($train_order[0]->child_num)
|
|
|
|
->setChildNum($train_order[0]->child_num)
|
|
|
@ -446,7 +460,7 @@ class Tulanduo
|
|
|
|
// 客人列表
|
|
|
|
// 客人列表
|
|
|
|
$from_country = ""; // 客源地
|
|
|
|
$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->MemberName )
|
|
|
|
$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.
|
|
|
@ -454,8 +468,15 @@ class Tulanduo
|
|
|
|
;
|
|
|
|
;
|
|
|
|
if (strval($vg->Country) !== '' && strval($from_country) === '') {
|
|
|
|
if (strval($vg->Country) !== '' && strval($from_country) === '') {
|
|
|
|
$from_country = $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_otherinfo .= $this->ci->BIZ_order->GetNationalityName($vg->BPE_Nationality);
|
|
|
|
$this->ci->tldOrderBuilder->setCustomersOtherInfo($key, $this_otherinfo);
|
|
|
|
// todo:电话
|
|
|
|
// todo:电话
|
|
|
|
// if (trim($vf['cold'][0]->GUT_TEL) != "" && $key===0) {
|
|
|
|
// if (trim($vf['cold'][0]->GUT_TEL) != "" && $key===0) {
|
|
|
|
// $this_otherinfo .= "; 电话:";
|
|
|
|
// $this_otherinfo .= "; 电话:";
|
|
|
@ -742,7 +763,15 @@ class Tulanduo
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (strval($from_country) === '' && strval($vg->Country) !== '') {
|
|
|
|
if (strval($from_country) === '' && strval($vg->Country) !== '') {
|
|
|
|
$from_country = $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)==='') {
|
|
|
|
if (strval($from_country)==='') {
|
|
|
|
$biz_contact = $this->ci->BIZ_order->get_customer_contact($COLD_SN_str);
|
|
|
|
$biz_contact = $this->ci->BIZ_order->get_customer_contact($COLD_SN_str);
|
|
|
@ -902,7 +931,7 @@ class Tulanduo
|
|
|
|
->setTravelFeesRemark($fee_index, "代收; " . $replace_collections->ALL_Memo);
|
|
|
|
->setTravelFeesRemark($fee_index, "代收; " . $replace_collections->ALL_Memo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 查询是否变更 TODO: deprecated
|
|
|
|
// 查询是否变更 deprecated
|
|
|
|
$sync_orderstate = 10;
|
|
|
|
$sync_orderstate = 10;
|
|
|
|
$vps_sn = 0;
|
|
|
|
$vps_sn = 0;
|
|
|
|
$vendor_orderid = 0;
|
|
|
|
$vendor_orderid = 0;
|
|
|
|