|
|
|
@ -74,7 +74,7 @@ class Tulanduo
|
|
|
|
|
$this->vendor_ids = array(1343,30548,29188);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function order_push($order=null)
|
|
|
|
|
public function order_push($order=null, $set_pvt=0)
|
|
|
|
|
{
|
|
|
|
|
// 初始化所有Trippest合作项目的包价产品
|
|
|
|
|
$this->tulanduo_trippest_pag = $this->ci->BIZ_order->get_packageDetails('', implode(',', $this->vendor_ids));
|
|
|
|
@ -87,11 +87,11 @@ class Tulanduo
|
|
|
|
|
}
|
|
|
|
|
// 商务
|
|
|
|
|
if (strval($order->GRI_OrderType) === "227002") {
|
|
|
|
|
return $this->push_biz($order);
|
|
|
|
|
return $this->push_biz($order, $set_pvt);
|
|
|
|
|
}
|
|
|
|
|
// 传统订单
|
|
|
|
|
if (strval($order->GRI_OrderType) === "227001") {
|
|
|
|
|
return $this->push_tour($order);
|
|
|
|
|
return $this->push_tour($order, $set_pvt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return "[Tulanduo>order_push] No function match. ";
|
|
|
|
@ -100,7 +100,7 @@ class Tulanduo
|
|
|
|
|
/*!
|
|
|
|
|
* 发送线路订单计划
|
|
|
|
|
*/
|
|
|
|
|
public function push_tour($vas=null)
|
|
|
|
|
public function push_tour($vas=null, $set_pvt=0)
|
|
|
|
|
{
|
|
|
|
|
$gri_sn = $vas->GRI_SN;
|
|
|
|
|
$vas_sn = $vas->VAS_SN;
|
|
|
|
@ -127,7 +127,7 @@ class Tulanduo
|
|
|
|
|
}
|
|
|
|
|
$reduce_package_code = array_filter($reduce_package_code);
|
|
|
|
|
*/
|
|
|
|
|
$grd_apart_info = $this->tour_apart($grd_info);
|
|
|
|
|
$grd_apart_info = $this->tour_apart($grd_info, $set_pvt);
|
|
|
|
|
$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']));
|
|
|
|
|
foreach ($grd_apart_info as $group_key => $grd_a) {
|
|
|
|
@ -246,7 +246,7 @@ class Tulanduo
|
|
|
|
|
$this_otherinfo .= "; " . $vg->Gender;
|
|
|
|
|
}
|
|
|
|
|
if (strval($vg->BirthDay) !== '') {
|
|
|
|
|
$this_otherinfo .= "; 生日:". $vg->BirthDay . "; " . calc_age($vg->BirthDay) . "岁";
|
|
|
|
|
$this_otherinfo .= "; 生日:". substr($vg->BirthDay,0,10) . "; " . calc_age($vg->BirthDay) . "岁";
|
|
|
|
|
}
|
|
|
|
|
if (strval($vg->PassportValidDate) !== '') {
|
|
|
|
|
$this_otherinfo .= "; 护照有效期:" . $vg->PassportValidDate;
|
|
|
|
@ -317,6 +317,7 @@ class Tulanduo
|
|
|
|
|
$sync_orderstate = 10;
|
|
|
|
|
$set_update = false;
|
|
|
|
|
$this->ci->tldOrderBuilder->clearModifyLogInfo();
|
|
|
|
|
// echo $this->ci->tldOrderBuilder->getBizContent();exit;
|
|
|
|
|
$resp = $this->excute_curl($this->neworder_url, $this->ci->tldOrderBuilder);
|
|
|
|
|
$response = json_decode($resp);
|
|
|
|
|
if ($response->status == 1) {
|
|
|
|
@ -353,7 +354,7 @@ class Tulanduo
|
|
|
|
|
* )
|
|
|
|
|
* )
|
|
|
|
|
*/
|
|
|
|
|
public function tour_apart($all_pag_info)
|
|
|
|
|
public function tour_apart($all_pag_info, $set_pvt=0)
|
|
|
|
|
{
|
|
|
|
|
$apart = array(); $ret = array();
|
|
|
|
|
foreach ($all_pag_info as $key => $pag) {
|
|
|
|
@ -379,7 +380,7 @@ class Tulanduo
|
|
|
|
|
}
|
|
|
|
|
// 合作的产品
|
|
|
|
|
// 商务订单全部按PVT || isset($pag->is_biz)
|
|
|
|
|
if ($this->ci->trippest->if_tour_pvt(array($pag))===1) {
|
|
|
|
|
if ($this->ci->trippest->if_tour_pvt(array($pag))===1 || $set_pvt!==0) {
|
|
|
|
|
$apart["pvt"]['details'][] = $pag;
|
|
|
|
|
} else {
|
|
|
|
|
$apart["com"]['details'][$pag->PAG_Code][] = $pag;
|
|
|
|
@ -429,7 +430,7 @@ class Tulanduo
|
|
|
|
|
* @Date: 2019-06-04 11:47:38
|
|
|
|
|
* @Desc: 发送商务订单计划
|
|
|
|
|
*/
|
|
|
|
|
public function push_biz($vas=null)
|
|
|
|
|
public function push_biz($vas=null, $set_pvt=0)
|
|
|
|
|
{
|
|
|
|
|
$userId = $this->send_host["1"]["userId"];
|
|
|
|
|
$userKey = $this->send_host["1"]["key"];
|
|
|
|
@ -556,12 +557,12 @@ class Tulanduo
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( ! empty($pag_coldsn_arr)) {
|
|
|
|
|
$this->biz_pag_order_exec($vas,$grd_info);
|
|
|
|
|
$this->biz_pag_order_exec($vas,$grd_info, $set_pvt);
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function biz_pag_order_exec($vas, $grd)
|
|
|
|
|
private function biz_pag_order_exec($vas, $grd, $set_pvt=0)
|
|
|
|
|
{
|
|
|
|
|
if (empty($grd)) {
|
|
|
|
|
return false;
|
|
|
|
@ -629,7 +630,7 @@ class Tulanduo
|
|
|
|
|
}
|
|
|
|
|
$complete_grd = array_merge($special_grd, $normal_grd);
|
|
|
|
|
$complete_grd = json_decode(json_encode($complete_grd));
|
|
|
|
|
$grd_apart_info = $this->tour_apart($complete_grd);
|
|
|
|
|
$grd_apart_info = $this->tour_apart($complete_grd, $set_pvt);
|
|
|
|
|
// echo json_encode($grd_apart_info);exit;
|
|
|
|
|
$request_info = $this->ci->Group_model->get_plan_request($vas->GRI_SN);
|
|
|
|
|
$big_order_index = 0;
|
|
|
|
|