|
|
|
@ -74,19 +74,32 @@ class Api extends CI_Controller {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 加上行程
|
|
|
|
|
$num_index = 0;
|
|
|
|
|
foreach ($ret['operation'] as $kro => &$vro) {
|
|
|
|
|
$out_datetime = strtotime($vro['start_date']);
|
|
|
|
|
$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);
|
|
|
|
|
$poi = $order_project[0];
|
|
|
|
|
$poi = new stdclass();
|
|
|
|
|
foreach ($order_project as $kd => $poi_info) {
|
|
|
|
|
if (strcmp($vro['start_date'], substr($poi_info->COLD_StartDate, 0, 10) ) === 0) {
|
|
|
|
|
$poi = $poi_info;
|
|
|
|
|
break;
|
|
|
|
|
if (count((array)$poi)===0) {
|
|
|
|
|
$poi = $poi_info;
|
|
|
|
|
} else if ($poi->POI_Hotel == "") {
|
|
|
|
|
$poi->POI_Hotel = $poi_info->POI_Hotel;
|
|
|
|
|
$poi->POI_HotelAddress = $poi_info->POI_HotelAddress;
|
|
|
|
|
$poi->POI_HotelPhone = $poi_info->POI_HotelPhone;
|
|
|
|
|
// } else if ($poi->POI_FlightsNo == "") {
|
|
|
|
|
} else if ($poi_info->POI_FlightsNo != "" && $poi_info->COLD_SN != $poi->COLD_SN) {
|
|
|
|
|
$poi->POI_FlightsNo .= "; " . $poi_info->POI_FlightsNo;
|
|
|
|
|
// $poi->POI_AirPort .= "; " . $poi_info->POI_AirPort;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (count((array)$poi)===0) {
|
|
|
|
|
$poi = $order_project[0];
|
|
|
|
|
}
|
|
|
|
|
$vro['cold_date'] = $poi->COLD_StartDate;
|
|
|
|
|
$vro['cold_enddate'] = $poi->COLD_EndDate;
|
|
|
|
|
$vro['tour_name'] = $poi->PAG2_Name;
|
|
|
|
@ -113,14 +126,26 @@ class Api extends CI_Controller {
|
|
|
|
|
$vro['pick_up'] = "";
|
|
|
|
|
$vro['drop_off'] = "";
|
|
|
|
|
$decode_MemoText = $memo_text_tmp = "";
|
|
|
|
|
if ($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'];
|
|
|
|
|
} else {
|
|
|
|
|
if ($num_index == 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; // 结束后送机
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
// if ($vro['pick_up'] === "" && $poi->POI_FlightsNo == '') {
|
|
|
|
|
// $vro['pick_up'] = $vro['drop_off'] = $poi->POI_Hotel;
|
|
|
|
|
// }
|
|
|
|
|
$num_index++;
|
|
|
|
|
}
|
|
|
|
|
unset($vro);
|
|
|
|
|
}
|
|
|
|
|