|
|
|
@ -109,18 +109,19 @@ class TulanduoApi extends CI_Controller
|
|
|
|
|
$all_list = array_merge($all_list, $f_resp_arr["responseData"]["orders"]);
|
|
|
|
|
}
|
|
|
|
|
$cnt = 0;
|
|
|
|
|
$pag_no_tmp = $this->pag_no_tmp();
|
|
|
|
|
foreach ($all_list as $k => $vo) {
|
|
|
|
|
$vo['agcOrderNo'] = mb_ereg_replace('(\s| )', '', $vo['agcOrderNo']); // 去掉中文的全角空格
|
|
|
|
|
$PAG_Code = $pag_sub = null;
|
|
|
|
|
preg_match('^[a-zA-Z]+\-[0-9\-]+^', $this->characet($vo['routeName'], "UTF-8"), $temp_array);
|
|
|
|
|
if (empty($temp_array) && isset($this->pag_no_tmp()[$vo['routeName']])) {
|
|
|
|
|
if (empty($temp_array) && isset($pag_no_tmp[$vo['routeName']])) {
|
|
|
|
|
// 旧的数据没有线路代号
|
|
|
|
|
$PAG_Code = $this->pag_no_tmp()[$vo['routeName']];
|
|
|
|
|
log_message('error','未识别的线路名称 ' . $vo['orderId'] . " " . $vo['routeName'] . var_export($temp_array, 1));
|
|
|
|
|
$PAG_Code = $pag_no_tmp[$vo['routeName']];
|
|
|
|
|
$split_code = explode("-", $PAG_Code);
|
|
|
|
|
$PAG_Code = $split_code[0] . "-" . $split_code[1];
|
|
|
|
|
isset($split_code[2]) ? $pag_sub=$split_code[2] : null;
|
|
|
|
|
} else {
|
|
|
|
|
log_message('error','未识别的线路名称 ' . $vo['orderId'] . " " . $vo['routeName'] . var_export($temp_array, 1));
|
|
|
|
|
$PAG_Code = $pag_sub = null;
|
|
|
|
|
$split_code = explode("-", $temp_array[0]);
|
|
|
|
|
$PAG_Code = $split_code[0] . "-" . $split_code[1];
|
|
|
|
@ -290,7 +291,7 @@ log_message('error','new coli ' . $this->Orders_model->BIZ_COLI_ID);
|
|
|
|
|
/*BIZ_GroupCombineOperationDetail*/
|
|
|
|
|
// 门票
|
|
|
|
|
if (isset($detail_jsonResp->orderDetail->operationDetails->sceneryOperations) &&
|
|
|
|
|
empty($this->Orders_model->combineoperation_exist($detail_jsonResp->orderDetail->groupOrderNo, "sceneryOperations")) ) {
|
|
|
|
|
($this->Orders_model->combineoperation_exist($detail_jsonResp->orderDetail->groupOrderNo, "sceneryOperations")) === array() ) {
|
|
|
|
|
foreach ($detail_jsonResp->orderDetail->operationDetails->sceneryOperations as $ks => $vso) {
|
|
|
|
|
$this->Orders_model->GCOD_GCI_combineNo = isset($detail_jsonResp->orderDetail->groupOrderNo) ? $detail_jsonResp->orderDetail->groupOrderNo : "";
|
|
|
|
|
$this->Orders_model->GCOD_operationType = "sceneryOperations";
|
|
|
|
@ -312,7 +313,7 @@ log_message('error','new coli ' . $this->Orders_model->BIZ_COLI_ID);
|
|
|
|
|
// 用房 ...
|
|
|
|
|
// 用餐
|
|
|
|
|
if (isset($detail_jsonResp->orderDetail->operationDetails->restraurantOperations) &&
|
|
|
|
|
empty($this->Orders_model->combineoperation_exist($detail_jsonResp->orderDetail->groupOrderNo, "restraurantOperations"))) {
|
|
|
|
|
($this->Orders_model->combineoperation_exist($detail_jsonResp->orderDetail->groupOrderNo, "restraurantOperations")) === array() ) {
|
|
|
|
|
foreach ($detail_jsonResp->orderDetail->operationDetails->restraurantOperations as $vro) {
|
|
|
|
|
$this->Orders_model->GCOD_GCI_combineNo = isset($detail_jsonResp->orderDetail->groupOrderNo) ? $detail_jsonResp->orderDetail->groupOrderNo : "";
|
|
|
|
|
$this->Orders_model->GCOD_operationType = "restraurantOperations";
|
|
|
|
@ -333,7 +334,7 @@ log_message('error','new coli ' . $this->Orders_model->BIZ_COLI_ID);
|
|
|
|
|
}
|
|
|
|
|
// 用车
|
|
|
|
|
if (isset($detail_jsonResp->orderDetail->operationDetails->touristCarOperations) &&
|
|
|
|
|
empty($this->Orders_model->combineoperation_exist($detail_jsonResp->orderDetail->groupOrderNo, "touristCarOperations"))) {
|
|
|
|
|
($this->Orders_model->combineoperation_exist($detail_jsonResp->orderDetail->groupOrderNo, "touristCarOperations")) === array() ) {
|
|
|
|
|
foreach ($detail_jsonResp->orderDetail->operationDetails->touristCarOperations as $vco) {
|
|
|
|
|
$this->Orders_model->GCOD_GCI_combineNo = isset($detail_jsonResp->orderDetail->groupOrderNo) ? $detail_jsonResp->orderDetail->groupOrderNo : "";
|
|
|
|
|
$this->Orders_model->GCOD_operationType = "touristCarOperations";
|
|
|
|
@ -354,7 +355,7 @@ log_message('error','new coli ' . $this->Orders_model->BIZ_COLI_ID);
|
|
|
|
|
}
|
|
|
|
|
// 导游服务
|
|
|
|
|
if (isset($detail_jsonResp->orderDetail->operationDetails->guiderOperations) &&
|
|
|
|
|
empty($this->Orders_model->combineoperation_exist($detail_jsonResp->orderDetail->groupOrderNo, "guiderOperations"))) {
|
|
|
|
|
($this->Orders_model->combineoperation_exist($detail_jsonResp->orderDetail->groupOrderNo, "guiderOperations")) === array() ) {
|
|
|
|
|
foreach ($detail_jsonResp->orderDetail->operationDetails->guiderOperations as $vgo) {
|
|
|
|
|
$this->Orders_model->GCOD_GCI_combineNo = isset($detail_jsonResp->orderDetail->groupOrderNo) ? $detail_jsonResp->orderDetail->groupOrderNo : "";
|
|
|
|
|
$this->Orders_model->GCOD_operationType = "guiderOperations";
|
|
|
|
|