|
|
|
@ -302,6 +302,72 @@ class Api extends CI_Controller {
|
|
|
|
|
$num_index++;
|
|
|
|
|
}
|
|
|
|
|
unset($vro);
|
|
|
|
|
} else {
|
|
|
|
|
foreach ($order_project as $kd => $poi) {
|
|
|
|
|
$vro = array();
|
|
|
|
|
$vro['start_date_raw'] = $vro['start_date'] = substr($poi->COLD_StartDate, 0, 10);
|
|
|
|
|
$out_datetime = strtotime($poi->COLD_StartDate);
|
|
|
|
|
$out_datetime2 = strtotime($poi->COLD_EndDate);
|
|
|
|
|
$vro['dateWeek_text'] = date('D', $out_datetime);
|
|
|
|
|
$vro['dateDay_text'] = date('d', $out_datetime);
|
|
|
|
|
$vro['dateMonth_text'] = date('M', $out_datetime);
|
|
|
|
|
$vro['dateYear_text'] = date('Y', $out_datetime);
|
|
|
|
|
if ($out_datetime !== $out_datetime2) {
|
|
|
|
|
$vro['start_date'] = $poi->COLD_StartDate . " to " . $poi->COLD_EndDate;
|
|
|
|
|
}
|
|
|
|
|
$vro['cold_date'] = $poi->COLD_StartDate;
|
|
|
|
|
$vro['cold_enddate'] = $poi->COLD_EndDate;
|
|
|
|
|
$vro['tour_name'] = $poi->PAG2_Name;
|
|
|
|
|
$code_name = $this->trippest->tour_name(strtoupper($poi->pag_code));
|
|
|
|
|
if ($code_name !== "") {
|
|
|
|
|
$vro['tour_name'] = $code_name;
|
|
|
|
|
}
|
|
|
|
|
// 领队名字
|
|
|
|
|
$vro['leader_name'] = trim($poi->GUT_FirstName . " " . $poi->GUT_LastName);
|
|
|
|
|
// 行程人数
|
|
|
|
|
$vro['personNum_text'] = $poi->COLD_PersonNum + $poi->COLD_ChildNum;
|
|
|
|
|
$vro['personNum_text'] .= " (" . $poi->COLD_PersonNum . " Adult(s)";
|
|
|
|
|
if ($poi->COLD_ChildNum > 0) {
|
|
|
|
|
$vro['personNum_text'] .= " " . $poi->COLD_ChildNum . " Child(ren)";
|
|
|
|
|
}
|
|
|
|
|
$vro['personNum_text'] .= ")" ;
|
|
|
|
|
// 人数
|
|
|
|
|
$vro['adult_number'] = $order_project[0]->COLD_PersonNum;
|
|
|
|
|
$vro['kid_number'] = $order_project[0]->COLD_ChildNum;
|
|
|
|
|
// 酒店
|
|
|
|
|
$vro['hotel_name'] = $poi->POI_Hotel;
|
|
|
|
|
$vro['hotel_address'] = $poi->POI_HotelAddress;
|
|
|
|
|
$vro['hotel_tel'] = $poi->POI_HotelPhone;
|
|
|
|
|
// 航班/车次
|
|
|
|
|
$vro['flights_no'] = $poi->POI_FlightsNo;
|
|
|
|
|
$vro['flights_airport'] = $poi->POI_AirPort;
|
|
|
|
|
// 接送信息
|
|
|
|
|
$vro['pick_up'] = "";
|
|
|
|
|
$vro['drop_off'] = "";
|
|
|
|
|
$decode_MemoText = $memo_text_tmp = "";
|
|
|
|
|
if ($vro['pick_up'] === "" && $poi->COLD_MemoText != null && json_decode($poi->COLD_MemoText) != null) {
|
|
|
|
|
$decode_MemoText = json_decode($poi->COLD_MemoText, true);
|
|
|
|
|
$vro['pick_up'] = $decode_MemoText['Pick up'];
|
|
|
|
|
$vro['drop_off'] = $decode_MemoText['Drop off'];
|
|
|
|
|
}
|
|
|
|
|
if ($vro['pick_up'] === "" && $kd == 0) {
|
|
|
|
|
$vro['pick_up'] = trim(substr(strstr(strstr($poi->COLI_OrderDetailText, "Pick Up From:"), "\n", true), 13));
|
|
|
|
|
$vro['drop_off'] = trim(substr(strstr(strstr($poi->COLI_OrderDetailText, "Drop Off:"), "\n" , true), 9));
|
|
|
|
|
}
|
|
|
|
|
if ($vro['pick_up'] === "") {
|
|
|
|
|
if (strval($poi->PAGS_Direction) === '0') {
|
|
|
|
|
$vro['pick_up'] .= $poi->POI_FlightsNo . " " . $poi->POI_AirPort;
|
|
|
|
|
$vro['drop_off'] .= $poi->POI_Hotel;
|
|
|
|
|
} else if (strval($poi->PAGS_Direction) === '1') {
|
|
|
|
|
$vro['pick_up'] .= $poi->POI_Hotel;
|
|
|
|
|
$vro['drop_off'] .= $poi->POI_FlightsNo . " " . $poi->POI_AirPort;
|
|
|
|
|
} else { // if ($poi->POI_FlightsNo != "")
|
|
|
|
|
$vro['pick_up'] .= $poi->POI_Hotel;
|
|
|
|
|
// $vro['drop_off'] .= $poi->POI_FlightsNo . " " . $poi->POI_AirPort; // 结束后送机
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$ret['operation'][] = $vro;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$ret['operation'] = array_values($ret['operation']);
|
|
|
|
|
$ret_operation = array();
|
|
|
|
|