|
|
@ -182,6 +182,28 @@ class Tulanduo extends CI_Controller
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询是否变更
|
|
|
|
|
|
|
|
$sync_orderstate = 1;
|
|
|
|
|
|
|
|
$vps_sn = 0;
|
|
|
|
|
|
|
|
$vendor_orderid = 0;
|
|
|
|
|
|
|
|
$modifyLogInfo = "<br>$change_info<br>";
|
|
|
|
|
|
|
|
if (intval($is_send_vary)===1) {
|
|
|
|
|
|
|
|
$vps = $this->Group_model->get_sync_info($vas_sn);
|
|
|
|
|
|
|
|
if ( ! empty($vps)) {
|
|
|
|
|
|
|
|
$vps_sn = $vps->VPS_SN;
|
|
|
|
|
|
|
|
$vendor_orderid = $vps->VPS_externalId;
|
|
|
|
|
|
|
|
$sync_orderstate = 11;
|
|
|
|
|
|
|
|
// $modifyLogInfo = "<br><a href='https://www.trippest.com'>https://www.trippest.com</a><br>";
|
|
|
|
|
|
|
|
$this->tldOrderBuilder->setOrderId($vendor_orderid)
|
|
|
|
|
|
|
|
->setModifyLogInfo($modifyLogInfo)
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$this->tldOrderBuilder->clearModifyLogInfo();
|
|
|
|
|
|
|
|
// $this->tldOrderBuilder->setModifyLogInfo($modifyLogInfo)
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $this->tldOrderBuilder->getBizContent();
|
|
|
|
return $this->tldOrderBuilder->getBizContent();
|
|
|
|
// $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder);
|
|
|
|
// $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder);
|
|
|
|
// $response = json_decode($resp);
|
|
|
|
// $response = json_decode($resp);
|
|
|
@ -195,7 +217,7 @@ class Tulanduo extends CI_Controller
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function push_trippest($vas=null)
|
|
|
|
public function push_trippest($vas=null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return "[Tulanduo>push_trippest] Done. "; // test
|
|
|
|
// return "[Tulanduo>push_trippest] Done. "; // test
|
|
|
|
/** 目的地 */
|
|
|
|
/** 目的地 */
|
|
|
|
$userId = $this->send_host["30"]["userId"];
|
|
|
|
$userId = $this->send_host["30"]["userId"];
|
|
|
|
$userKey = $this->send_host["30"]["key"];
|
|
|
|
$userKey = $this->send_host["30"]["key"];
|
|
|
@ -419,7 +441,7 @@ class Tulanduo extends CI_Controller
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 查询是否变更
|
|
|
|
// 查询是否变更
|
|
|
|
$sync_orderstate = 1;
|
|
|
|
$sync_orderstate = 10;
|
|
|
|
$vps_sn = 0;
|
|
|
|
$vps_sn = 0;
|
|
|
|
$vendor_orderid = 0;
|
|
|
|
$vendor_orderid = 0;
|
|
|
|
if (intval($is_send_vary)===1) {
|
|
|
|
if (intval($is_send_vary)===1) {
|
|
|
@ -441,8 +463,9 @@ class Tulanduo extends CI_Controller
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// echo(($this->tldOrderBuilder->getBizContent()));
|
|
|
|
// 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());
|
|
|
|
$resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder);
|
|
|
|
// $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder);
|
|
|
|
// var_dump($resp);
|
|
|
|
// var_dump($resp);
|
|
|
|
|
|
|
|
$resp = '{"status":1,"errMsg":"","responseData":{"orderId":' . rand(1000,9999) . '}}'; // test
|
|
|
|
$response = json_decode($resp);
|
|
|
|
$response = json_decode($resp);
|
|
|
|
if ($response->status == 1) {
|
|
|
|
if ($response->status == 1) {
|
|
|
|
/** VendorPlanSync */
|
|
|
|
/** VendorPlanSync */
|
|
|
@ -474,6 +497,7 @@ class Tulanduo extends CI_Controller
|
|
|
|
public function tourguide_update($input, $vps, $eva)
|
|
|
|
public function tourguide_update($input, $vps, $eva)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$ret['status'] = -1;
|
|
|
|
$ret['status'] = -1;
|
|
|
|
|
|
|
|
$ret['err'] = 100;
|
|
|
|
$ret['errMsg'] = "未知错误";
|
|
|
|
$ret['errMsg'] = "未知错误";
|
|
|
|
$eva_g_sn = $eva[0]->has_tourguide;
|
|
|
|
$eva_g_sn = $eva[0]->has_tourguide;
|
|
|
|
if (strval($vps->department)==="30") {
|
|
|
|
if (strval($vps->department)==="30") {
|
|
|
@ -486,12 +510,14 @@ class Tulanduo extends CI_Controller
|
|
|
|
$this->tld_order->setOrderId($vps->VPS_externalId)
|
|
|
|
$this->tld_order->setOrderId($vps->VPS_externalId)
|
|
|
|
->setUserId($userId)
|
|
|
|
->setUserId($userId)
|
|
|
|
->setKey($userKey);
|
|
|
|
->setKey($userKey);
|
|
|
|
$detail_resp = $this->excute_curl($this->detail_url, $this->tld_order);
|
|
|
|
// $detail_resp = $this->excute_curl($this->detail_url, $this->tld_order);
|
|
|
|
|
|
|
|
$detail_resp = '{"status":1,"errMsg":"","orderDetail":{"orderId":' . rand(1000,9999) . ',"operationDetails": {"guiderOperations":[{"name":"北京翟梦琪Susie","mobelPhone":"18801326155","startDate":"2017-04-25","endDate":"2017-04-25","sumMoney":400,"remark":"","guiderPhoto":"http://djb3c.ltsoftware.net:9921/projects/djb3c//uploadImages/guider/1526898234415.png"}]}}}'; // test
|
|
|
|
$detail_jsonResp = json_decode($detail_resp);
|
|
|
|
$detail_jsonResp = json_decode($detail_resp);
|
|
|
|
// 判断
|
|
|
|
// 判断
|
|
|
|
if ($detail_jsonResp->status !== 1) {
|
|
|
|
if ($detail_jsonResp->status !== 1) {
|
|
|
|
log_message('error','TulanduoApi get_orderdetail failed. Msg:' . $detail_jsonResp->errMsg . "; Request: " . $this->tld_order->getBizContent());
|
|
|
|
log_message('error','TulanduoApi get_orderdetail failed. Msg:' . $detail_jsonResp->errMsg . "; Request: " . $this->tld_order->getBizContent());
|
|
|
|
$ret['errMsg'] = "查询失败";
|
|
|
|
$ret['err'] = 100; // 获取详情失败
|
|
|
|
|
|
|
|
$ret['errMsg'] = "获取详情失败";
|
|
|
|
return $ret;
|
|
|
|
return $ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 导游信息
|
|
|
|
// 导游信息
|
|
|
@ -502,6 +528,7 @@ class Tulanduo extends CI_Controller
|
|
|
|
$tourguide_mobile = real_phone_number($detail_jsonResp->orderDetail->operationDetails->guiderOperations[0]->mobelPhone, 86);
|
|
|
|
$tourguide_mobile = real_phone_number($detail_jsonResp->orderDetail->operationDetails->guiderOperations[0]->mobelPhone, 86);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($tourguige_name === "") {
|
|
|
|
if ($tourguige_name === "") {
|
|
|
|
|
|
|
|
$ret['err'] = 102; // 未查询到导游
|
|
|
|
$ret['errMsg'] = "未查询到导游";
|
|
|
|
$ret['errMsg'] = "未查询到导游";
|
|
|
|
return $ret;
|
|
|
|
return $ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -511,24 +538,26 @@ class Tulanduo extends CI_Controller
|
|
|
|
$tourguige_name_en = characet($en_name_arr[0][0],'UTF-8');
|
|
|
|
$tourguige_name_en = characet($en_name_arr[0][0],'UTF-8');
|
|
|
|
$ht_tourguide = $this->Group_model->search_tourguide($input['openId'], $tourguige_name_cn, $tourguige_name_en, $tourguide_mobile);
|
|
|
|
$ht_tourguide = $this->Group_model->search_tourguide($input['openId'], $tourguige_name_cn, $tourguige_name_en, $tourguide_mobile);
|
|
|
|
if (empty($ht_tourguide)) {
|
|
|
|
if (empty($ht_tourguide)) {
|
|
|
|
|
|
|
|
$ret['err'] = 200; // 导游信息未录入
|
|
|
|
$ret['errMsg'] = "导游信息未录入";
|
|
|
|
$ret['errMsg'] = "导游信息未录入";
|
|
|
|
return $ret;
|
|
|
|
return $ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$eva_tgi_column = array(
|
|
|
|
$eva_tgi_column = array(
|
|
|
|
"EOI_Type" => 3
|
|
|
|
"EOI_Type" => 3
|
|
|
|
,"EOI_GRI_SN" => $eva->EOI_GRI_SN
|
|
|
|
,"EOI_GRI_SN" => $eva[0]->EOI_GRI_SN
|
|
|
|
,"EOI_VEI_SN" => $eva->EOI_ObjSN
|
|
|
|
,"EOI_VEI_SN" => $eva[0]->EOI_ObjSN
|
|
|
|
,"EOI_ObjSN" => $ht_tourguide->TGI_SN
|
|
|
|
,"EOI_ObjSN" => $ht_tourguide->TGI_SN
|
|
|
|
,"EOI_CII_SN" => $eva->EOI_CII_SN
|
|
|
|
,"EOI_CII_SN" => $eva[0]->EOI_CII_SN
|
|
|
|
,"EOI_GetDate" => $eva->EOI_GetDate
|
|
|
|
,"EOI_GetDate" => $eva[0]->EOI_GetDate
|
|
|
|
,"EOI_Date" => $eva->EOI_Date
|
|
|
|
,"EOI_Date" => $eva[0]->EOI_Date
|
|
|
|
,"EOI_Cancel" => $eva->EOI_Cancel
|
|
|
|
,"EOI_Cancel" => $eva[0]->EOI_Cancel
|
|
|
|
,"EOI_GroupType" => $eva->EOI_GroupType
|
|
|
|
,"EOI_GroupType" => $eva[0]->EOI_GroupType
|
|
|
|
,"EOI_FillWorkers_SN" => 0 // todo
|
|
|
|
,"EOI_FillWorkers_SN" => 0 // todo
|
|
|
|
,"EOI_FWks_LastEditTime" => date('Y-m-d H:i:s')
|
|
|
|
,"EOI_FWks_LastEditTime" => date('Y-m-d H:i:s')
|
|
|
|
);
|
|
|
|
);
|
|
|
|
$this->Group_model->set_plan_tourguide($eva_g_sn, $eva_tgi_column);
|
|
|
|
$this->Group_model->set_plan_tourguide($eva_g_sn, $eva_tgi_column);
|
|
|
|
$ret['status'] = 1;
|
|
|
|
$ret['status'] = 1;
|
|
|
|
|
|
|
|
$ret['err'] = 0;
|
|
|
|
$ret['errMsg'] = "";
|
|
|
|
$ret['errMsg'] = "";
|
|
|
|
return $ret;
|
|
|
|
return $ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|