补空的行程, 换了测试账号

feature/pay
lyt 7 years ago
parent aaad101d01
commit 8fb8a607ec

@ -635,6 +635,26 @@ class TulanduoApi extends CI_Controller
$this->Orders_model->biz_groupcombineoperationdetail_save(); $this->Orders_model->biz_groupcombineoperationdetail_save();
} }
} }
if (isset($detail_jsonResp->orderDetail->operationDetails->trafficOperations)) {
foreach ($detail_jsonResp->orderDetail->operationDetails->trafficOperations as $vto) {
$this->Orders_model->GCOD_GCI_combineNo = $detail_jsonResp->orderDetail->groupOrderNo ;
$this->Orders_model->GCOD_VEI_SN = $vei_SN;
$this->Orders_model->GCOD_operationType = "trafficOperations";
$this->Orders_model->GCOD_subType = $vto->birthland . " " . $vto->destination;
$this->Orders_model->GCOD_title = $vto->trafficNo;
$this->Orders_model->GCOD_dutyName = "";
$this->Orders_model->GCOD_dutyTel = "";
$this->Orders_model->GCOD_dutyPhoto = '';
$this->Orders_model->GCOD_startDate = $vto->useDate;
$this->Orders_model->GCOD_endDate = "";
$this->Orders_model->GCOD_sumMoney = $vto->sumMoney;
$this->Orders_model->GCOD_carLicense = "";
$this->Orders_model->GCOD_standard = "";
$this->Orders_model->GCOD_remark = $vto->remark;
$this->Orders_model->GCOD_useNum = $vto->useNum;
$this->Orders_model->biz_groupcombineoperationdetail_save();
}
}
} }
$output_text = "Got order operations from TuLanDuo:" . $detail_jsonResp->orderDetail->orderId . ". " . $coli_id; $output_text = "Got order operations from TuLanDuo:" . $detail_jsonResp->orderDetail->orderId . ". " . $coli_id;
log_message('error', $output_text); log_message('error', $output_text);

@ -116,6 +116,9 @@ class OrderFinance_model extends CI_Model {
} elseif ($value->GCOD_operationType=='otherCosts' && $value->GCOD_subType=='餐补(司陪)') { } elseif ($value->GCOD_operationType=='otherCosts' && $value->GCOD_subType=='餐补(司陪)') {
$ret->cost_category['guide_meal'] += $value->cost; $ret->cost_category['guide_meal'] += $value->cost;
continue; continue;
} elseif ($value->GCOD_operationType=='trafficOperations') {
$ret->cost_category['otherCosts'] += $value->cost;
continue;
} }
$ret->cost_category[$value->GCOD_operationType] += $value->cost; $ret->cost_category[$value->GCOD_operationType] += $value->cost;
} }

@ -47,10 +47,10 @@ class Tulanduo extends CI_Controller
// test // test
// public $list_url = "http://dj.ltsoftware.net:9901/action/api/searchRouteOrder/"; // public $list_url = "http://dj.ltsoftware.net:9901/action/api/searchRouteOrder/";
// public $detail_url = "http://dj.ltsoftware.net:9901/action/api/detailRouteOrder/"; // public $detail_url = "http://dj.ltsoftware.net:9901/action/api/detailRouteOrder/";
public $neworder_url = "http://dj.ltsoftware.net:9901/action/api/addOrUpdateRouteOrder/"; public $neworder_url = "http://ltdj.ltsoftware.net:19919/action/api/addOrUpdateRouteOrder/";
// Live // Live
public $list_url = "http://djb3c.ltsoftware.net:9921/action/api/searchRouteOrder/"; // public $list_url = "http://djb3c.ltsoftware.net:9921/action/api/searchRouteOrder/";
public $detail_url = "http://djb3c.ltsoftware.net:9921/action/api/detailRouteOrder/"; // public $detail_url = "http://djb3c.ltsoftware.net:9921/action/api/detailRouteOrder/";
// public $neworder_url = "http://djb3c.ltsoftware.net:9921/action/api/addOrUpdateRouteOrder/"; // public $neworder_url = "http://djb3c.ltsoftware.net:9921/action/api/addOrUpdateRouteOrder/";
public function __construct(){ public function __construct(){
@ -63,9 +63,11 @@ class Tulanduo extends CI_Controller
$this->load->model('BIZ_orders_model', 'BIZ_order'); $this->load->model('BIZ_orders_model', 'BIZ_order');
// $this->load->model('TuLanDuo_queryContentBuilder', 'tld_order'); // $this->load->model('TuLanDuo_queryContentBuilder', 'tld_order');
// $this->output->enable_profiler(TRUE); // $this->output->enable_profiler(TRUE);
/** test */ /** test
$this->userId = "358"; 902 key:f56541ff40e1afba444d831c5a666195
$this->key = "a08f26ddc5b1bd4c8e5eafcac28fc1ec"; */
$this->userId = "902";
$this->key = "f56541ff40e1afba444d831c5a666195";
/** Live */ /** Live */
// 目的地 // 目的地
// $this->userId = "1134"; // $this->userId = "1134";
@ -111,8 +113,8 @@ class Tulanduo extends CI_Controller
{ {
// exit(); // exit();
/** 目的地 test */ /** 目的地 test */
$this->userId = "358"; $this->userId = "902";
$this->key = "a08f26ddc5b1bd4c8e5eafcac28fc1ec"; $this->key = "f56541ff40e1afba444d831c5a666195";
$this->load->model('TuLanDuo_addOrUpdateRouteOrderContentBuilder', 'tldOrderBuilder'); $this->load->model('TuLanDuo_addOrUpdateRouteOrderContentBuilder', 'tldOrderBuilder');
$orderinfo = $this->BIZ_order->get_orderinfo_detail($gri_sn); $orderinfo = $this->BIZ_order->get_orderinfo_detail($gri_sn);
if(empty($orderinfo)) {return;} if(empty($orderinfo)) {return;}
@ -252,16 +254,42 @@ class Tulanduo extends CI_Controller
$schedule_obj[substr($vs->COLD_StartDate, 0, 10)]['content'] .= $this_title . $this_content; $schedule_obj[substr($vs->COLD_StartDate, 0, 10)]['content'] .= $this_title . $this_content;
} }
} }
// 补全空的日期
$first_date = strstr($vf["cold"][0]->COLD_StartDate, " ", true);
$date1 = new DateTime($first_date);
$date_end = new DateTime($end_date);
$date_diff = $date_end->diff($date1);
$d = ($date_diff->format("%d"));
$all_date = array();
for ($j=0; $j < ($d+1); $j++) {
$all_date[] = date('Y-m-d', strtotime("+$j day", strtotime($first_date)));
}
$real_date = array_column(array_values($schedule_obj), 'date');
foreach ($all_date as $kd => $vd) {
if ( ! in_array($vd, $real_date)) {
$this->tldOrderBuilder->setScheduleDetailsTitle($kd, $vd)
->setScheduleDetailsContent($kd, "无")
->setScheduleDetailsAccommodation($kd, "")
// ->setScheduleDetailsTraffic($kd, ($vso->PAG_Vehicle>60001 ? 1 : 0))
->setScheduleDetailsBreakFirst($kd, 0 )
->setScheduleDetailsDinner($kd, 0)
->setScheduleDetailsLunch($kd, 0)
;
continue;
}
foreach (array_values($schedule_obj) as $kso => $vso) { foreach (array_values($schedule_obj) as $kso => $vso) {
$this->tldOrderBuilder->setScheduleDetailsTitle($kso, $vso['date']) if ($vd==$vso['date']) {
->setScheduleDetailsContent($kso, $vso['content']) $this->tldOrderBuilder->setScheduleDetailsTitle($kd, $vso['date'])
->setScheduleDetailsAccommodation($kso, $vso['accommodation']) ->setScheduleDetailsContent($kd, $vso['content'])
// ->setScheduleDetailsTraffic($kso, ($vso->PAG_Vehicle>60001 ? 1 : 0)) ->setScheduleDetailsAccommodation($kd, $vso['accommodation'])
->setScheduleDetailsBreakFirst($kso, 0 ) // ->setScheduleDetailsTraffic($kd, ($vso->PAG_Vehicle>60001 ? 1 : 0))
->setScheduleDetailsDinner($kso, $vso['dinner'] ) ->setScheduleDetailsBreakFirst($kd, 0 )
->setScheduleDetailsLunch($kso, $vso['lunch']) ->setScheduleDetailsDinner($kd, $vso['dinner'] )
->setScheduleDetailsLunch($kd, $vso['lunch'])
; ;
} }
}
}
// 拆分的订单团款录第一个 // 拆分的订单团款录第一个
if ($i===1) { if ($i===1) {
foreach ($travelFees as $kf => $vf) { foreach ($travelFees as $kf => $vf) {
@ -273,10 +301,10 @@ class Tulanduo extends CI_Controller
->setTravelFeesRemark($kf, $vf->GAI_Memo); ->setTravelFeesRemark($kf, $vf->GAI_Memo);
} }
} }
echo(($this->tldOrderBuilder->getBizContent()));return; // echo(($this->tldOrderBuilder->getBizContent()));
// $this->output->set_content_type('application/json')->set_output($this->tldOrderBuilder->getBizContent()); $this->output->set_content_type('application/json')->set_output($this->tldOrderBuilder->getBizContent());
// var_dump(($this->tldOrderBuilder->getBizContent())); $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder);
// $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder); var_dump($resp);
/** BIZ_GroupCombineInfo */ /** BIZ_GroupCombineInfo */
// if (json_decode($resp)->status == 1) { // if (json_decode($resp)->status == 1) {
// log_message('error','in GCI ' . json_decode($resp)->responseData->orderId); // log_message('error','in GCI ' . json_decode($resp)->responseData->orderId);
@ -288,7 +316,7 @@ class Tulanduo extends CI_Controller
// } // }
} }
// email 供应商 todo // email 供应商 todo
// echo "Order Push done."; echo "Order Push done.";
return; return;
} }

Loading…
Cancel
Save