diff --git a/webht/third_party/vendorPlanSync/controllers/Tulanduo.php b/webht/third_party/vendorPlanSync/controllers/Tulanduo.php index 179e391d..fb83e350 100644 --- a/webht/third_party/vendorPlanSync/controllers/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/controllers/Tulanduo.php @@ -204,8 +204,8 @@ class Tulanduo extends CI_Controller // $this->tldOrderBuilder->setModifyLogInfo($modifyLogInfo) ; } - // $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder); - $resp = '{"status":1,"errMsg":"","responseData":{"orderId":' . rand(1000,9999) . '}}'; // test + $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder); + // $resp = '{"status":1,"errMsg":"","responseData":{"orderId":' . rand(1000,9999) . '}}'; // test $response = json_decode($resp); if ($response->status == 1) { /** VendorPlanSync */ @@ -229,7 +229,8 @@ class Tulanduo extends CI_Controller /** VendorArrangeState VAS_IsReceive */ $this->Group_model->set_plan_received($vas_sn); } - return $this->tldOrderBuilder->getBizContent() . "Order Push done. "; + // return $this->tldOrderBuilder->getBizContent() . "[Tulanduo>push_tour] Done. "; + return "[Tulanduo>push_tour] Done. "; } /*! @@ -483,11 +484,8 @@ class Tulanduo extends CI_Controller // $this->tldOrderBuilder->setModifyLogInfo($modifyLogInfo) ; } - // echo(($this->tldOrderBuilder->getBizContent())); - // $this->output->set_content_type('application/json')->set_output($this->tldOrderBuilder->getBizContent()); - // $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder); - // var_dump($resp); - $resp = '{"status":1,"errMsg":"","responseData":{"orderId":' . rand(1000,9999) . '}}'; // test + $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder); + // $resp = '{"status":1,"errMsg":"","responseData":{"orderId":' . rand(1000,9999) . '}}'; // test $response = json_decode($resp); if ($response->status == 1) { /** VendorPlanSync */ @@ -513,7 +511,7 @@ class Tulanduo extends CI_Controller $this->Group_model->set_plan_received($vas_sn); } } - return "Order Push done. "; + return "[Tulanduo>push_trippest] Done. "; } public function tourguide_update($input, $vps, $eva) @@ -532,8 +530,8 @@ class Tulanduo extends CI_Controller $this->tld_order->setOrderId($vps->VPS_externalId) ->setUserId($userId) ->setKey($userKey); - // $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_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); // 判断 if ($detail_jsonResp->status !== 1) { @@ -564,7 +562,7 @@ class Tulanduo extends CI_Controller $ret['errMsg'] = "导游信息未录入"; return $ret; } - $vendor_contactor = $this->Group_model->get_vendor_contactor($eva[0]->EOI_ObjSN); + $vendor_contactor = $this->Group_model->get_vendorContact($eva[0]->EOI_ObjSN); $eva_tgi_column = array( "EOI_Type" => 3 ,"EOI_GRI_SN" => $eva[0]->EOI_GRI_SN diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php index 2261bab3..45d3d5a3 100644 --- a/webht/third_party/vendorPlanSync/models/Group_model.php +++ b/webht/third_party/vendorPlanSync/models/Group_model.php @@ -155,22 +155,21 @@ class Group_model extends CI_Model { /*! * 获取地接社接受计划的人员信息 - * @param $vendorID 地接社ID + * @param $vendor_id 地接社ID */ - public function get_vendorContact($vendorID) + public function get_vendorContact($vendor_id) { - $sql = "SELECT top 1 lmi2.LMI2_Name, - lmi.LMI_SN, - lmi.LMI_AutoFax, - lmi.LMI_Telephone, - lmi.LMI_Mobile, - lmi.LMI_ListMail - ,vei2.VEI2_CompanyBN - FROM LinkmanInfo lmi - INNER JOIN LinkManInfo2 lmi2 ON lmi2.LMI2_LMI_SN=lmi.LMI_SN AND lmi2.LMI2_LGC=2 - INNER JOIN VEndorInfo2 vei2 ON vei2.VEI2_VEI_SN=LMI_VEI_SN AND VEI2_LGC=2 - WHERE LMI_Receiver='Yes' AND LMI_VEI_SN=$vendorID"; - $query = $this->HT->query($sql); + $sql = "SELECT + lmi.LMI2_Name,lmi.LMI_SN,lmi.LMI_AutoFax + ,lmi.LMI_Telephone,lmi.LMI_Mobile,lmi.LMI_ListMail + ,vei2.VEI2_CompanyBN + from V_Link_Man_Info lmi + left join VEndorInfo2 vei2 on VEI2_VEI_SN=lmi.LMI_VEI_SN + and VEI2_LGC=2 + where lmi.LMI_VEI_SN=? + and lmi.LMI_DefaultContactor='Yes' + and lmi.LGC_LGC=2"; + $query = $this->HT->query($sql, array($vendor_id)); return $query->row(); } @@ -205,16 +204,6 @@ class Group_model extends CI_Model { return $this->HT->query($sql, $param_arr)->row(); } - public function get_vendor_contactor($vendor_id) - { - $sql = "SELECT * - from V_Link_Man_Info vlmi - where vlmi.LMI_VEI_SN=? - and vlmi.LMI_DefaultContactor='Yes' - and vlmi.LGC_LGC=2"; - return $this->HT->query($sql, array($vendor_id))->row(); - } - public function set_plan_tourguide($eva_g_sn=0, $column=array()) { if ($eva_g_sn===0) {