diff --git a/webht/third_party/vendorPlanSync/.htaccess b/webht/third_party/vendorPlanSync/.htaccess new file mode 100644 index 00000000..14249c50 --- /dev/null +++ b/webht/third_party/vendorPlanSync/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/webht/third_party/vendorPlanSync/controllers/TulanduoApi.php b/webht/third_party/vendorPlanSync/controllers/TulanduoApi.php new file mode 100644 index 00000000..baddabc4 --- /dev/null +++ b/webht/third_party/vendorPlanSync/controllers/TulanduoApi.php @@ -0,0 +1,320 @@ + "'BJSIC-41','BJSIC-42'" + ,"BJSIC-43" => "'BJSIC-41','BJSIC-42','BJSIC-43'" + ,"XASIC-42" => "'XASIC-41','XASIC-42'" + ); + public $special_route_name = array( + "BJSIC-42" => "北京精品两日游(目的地BJSIC-42)" + ,"BJSIC-43" => "北京精品三日游(目的地BJSIC-43)" + ,"XASIC-42" => "西安精品两日游(目的地XASIC-42)" + ); + public $city_info = array( + "北京分公司" => array( + "PlanVEI_SN" => 1343 + ,"COLI_sourcetype" => 32090 + ,"routeType" => "北京目的地线路" + ), + "总部" => array( + "PlanVEI_SN" => 1343 + ,"COLI_sourcetype" => 32090 + ,"routeType" => "北京目的地线路" + ), + "西安分公司" => array( + "PlanVEI_SN" => 30548 + ,"COLI_sourcetype" => 32116 + ,"routeType" => "西安目的地线路" + ), + "上海分公司" => array( + "PlanVEI_SN" => 29188 + ,"COLI_sourcetype" => 32112 + ,"routeType" => "上海目的地线路" + ) + ); + public $vendor_ids = array(1343,30548,29188); + + // userId key + // 1343 2e47c3721e3ff6e816fe6b928d7acc7d + // 29188 95c3b0d958a79a1216e651df182b3cb4 + // 30548 9db75a2dc17156eb122364295804b7a2 + + // test + // public $list_url = "http://dj.ltsoftware.net:9901/action/api/searchRouteOrder/"; + // public $detail_url = "http://dj.ltsoftware.net:9901/action/api/detailRouteOrder/"; + public $neworder_url = "http://dj.ltsoftware.net:9901/action/api/addOrUpdateRouteOrder/"; + // Live + public $list_url = "http://djb3c.ltsoftware.net:9921/action/api/searchRouteOrder/"; + public $detail_url = "http://djb3c.ltsoftware.net:9921/action/api/detailRouteOrder/"; + // public $neworder_url = "http://djb3c.ltsoftware.net:9921/action/api/addOrUpdateRouteOrder/"; + + // 发送到图兰朵系统接口的参数jsonParams + + public function __construct(){ + parent::__construct(); + mb_regex_encoding("UTF-8"); + bcscale(4); + $this->load->helper('array'); + $this->load->model('Orders_model'); + $this->load->model('TuLanDuo_queryContentBuilder', 'tld_order'); + // $this->output->enable_profiler(TRUE); + /** test */ + // $this->userId = "358"; + // $this->key = "a08f26ddc5b1bd4c8e5eafcac28fc1ec"; + /** Live */ + // 目的地 + $this->userId = "1134"; + $this->key = "73d180d05d425fd192e1c5b3097e75ff"; + // 桂林海纳国旅 + // $this->userId = "18"; + // $this->key = "d05c25e6e6c5d4898161e0aaf700d9c7"; + } + + /*! + * 发送预订计划到地接系统 + * TODO read word into remark + * @date 2018-05-02 + * @param string $COLI_ID HT系统订单号 + */ + public function order_push($COLI_ID="") // test + { + // exit(); + /** 目的地 test */ + $this->userId = "358"; + $this->key = "a08f26ddc5b1bd4c8e5eafcac28fc1ec"; + $this->load->model('TuLanDuo_addOrUpdateRouteOrderContentBuilder', 'tldOrderBuilder'); + $orderinfo = $this->Orders_model->get_orderinfo_detail($COLI_ID); + if(empty($orderinfo)) {return;} + $COLD_SN_str = implode(',', array_map( function($element){return $element->COLD_SN;}, $orderinfo )) ; + $guestlist = $this->Orders_model->get_guestlist($COLD_SN_str); + $scheduleDetails = $this->Orders_model->get_scheduleDetails($COLD_SN_str); + $routeName = isset($this->special_route_name[$scheduleDetails[0]->PAG_Code]) ? $this->special_route_name[$scheduleDetails[0]->PAG_Code] : $scheduleDetails[0]->PAG2_Name; + // 子线路 + if ($scheduleDetails[0]->PAGS_CN_Title) { + $routeName .= "[" . $scheduleDetails[0]->PAGS_CN_Title . "]"; + } + $routeName .= " " . $scheduleDetails[0]->PAG_Code; + if (isset($this->special_route[$scheduleDetails[0]->PAG_Code])) { + $scheduleDetails = $this->Orders_model->get_packageDetails($this->special_route[$scheduleDetails[0]->PAG_Code]); + } + $travelFees = $this->Orders_model->get_paymentDetails($COLI_ID); + bcscale(4); + $this->tldOrderBuilder->setUserId($this->userId) + ->setKey($this->key) + ->setOrderType(2) // todo + ->setRouteName($routeName) + ->setRouteType($scheduleDetails[0]->CII2_Name . "目的地线路") + ->setAgcOrderNo($orderinfo[0]->COLI_GroupCode . "-" . $scheduleDetails[0]->CII2_Name) + ->setAdultNum($orderinfo[0]->COLD_PersonNum) + ->setChildNum($orderinfo[0]->COLD_ChildNum) + ->setDestination($scheduleDetails[0]->CII2_Name) + ->setTravelDate(strstr($orderinfo[0]->COLD_StartDate, " ", true)) + ->setLeavedDate(strstr($orderinfo[0]->COLD_EndDate, " ", true)) + ->setOrderRemark(trim($orderinfo[0]->COLI_Memo . "\r\n" . $orderinfo[0]->COLD_Memo . "\r\n" . $orderinfo[0]->COLD_MemoText)); // todo 抵离交通 + foreach ($guestlist as $key => $vg) { + $this->tldOrderBuilder->setCustomersName($key, $vg->BPE_FirstName) + ->setCustomersPeopleType($key, ($vg->BPE_GuestType==1 ? "成人" : "儿童")) + ->setCustomersDocumentType($key, "护照") // Passport No. + ->setCustomersDocumentNo($key, $vg->BPE_Passport) + ->setCustomersOtherInfo($key, $this->Orders_model->GetNationalityName($orderinfo[0]->GUT_NationalityID)); + } + foreach ($scheduleDetails as $ks => $vs) { + $this->tldOrderBuilder->setScheduleDetailsContent($ks, $vs->PAG2_Title) + ->setScheduleDetailsTitle($ks, $vs->PAG2_Name) + // ->set_scheduleDetails($ks, "traffic", ($vs->PAG_Vehicle>60001 ? 1 : 0)) + ->setScheduleDetailsBreakFirst($ks, 0 ) + ->setScheduleDetailsDinner($ks, (in_array($vs->PAG_Meal, array('61003', '61004')) ? 1 : 0) ) + ->setScheduleDetailsLunch($ks, (in_array($vs->PAG_Meal, array('61002', '61004')) ? 1 : 0)); + } + foreach ($travelFees as $kf => $vf) { // todo 发生退款或多笔收款 + $this->tldOrderBuilder->setTravelFeesType($kf, "Per Group") + ->setTravelFeesMoney($kf, $vf->GAI_SQJE) + ->setTravelFeesNum($kf, 1) + ->setTravelFeesUnit($kf, bcdiv($vf->GAI_SSJE, $vf->GAI_SQJE)) + ->setTravelFeesSumMoney($kf, $vf->GAI_SSJE) + ->setTravelFeesRemark($kf, $vf->GAI_Memo); + } + var_dump(($this->tldOrderBuilder->getBizContent())); + // $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder); + /** BIZ_GroupCombineInfo */ +// if (json_decode($resp)->status == 1) { +// log_message('error','in GCI ' . json_decode($resp)->responseData->orderId); +// $this->Orders_model->GCI_COLI_SN = $orderinfo[0]->COLI_SN; +// $this->Orders_model->GCI_GRI_SN = $orderinfo[0]->COLI_GRI_SN; +// $this->Orders_model->GCI_VendorOrderId = json_decode($resp)->responseData->orderId; +// $this->Orders_model->GCI_FromAgc = "D目的地桂林组"; +// $this->Orders_model->biz_groupcombineinfo_save(); +// } + // email 供应商 todo + echo "Order Push done."; + return; + } + + /*! + * 订单状态变更,调度变更 + * (地接社调用, 并邮件通知外联) + */ + public function order_change() + { + $this->load->model('Order_update'); + $ret['status'] = -1; + $ret['errMsg'] = "未知错误"; + $input = $this->input->post(); + $vendorID = $input['userId']; + $validate = $this->calc_key($vendorID, $input['key']); + if ($validate !== TRUE) { + $ret['errMsg'] = "身份验证失败."; + return $this->output->set_content_type('application/json')->set_output(json_encode($ret)); + } + // $vendorID = 29188;//29188 1343; // test + $vas_info = array(); + if (in_array($input['agcName'], array("D目的地桂林组", "Trippest"))) { + $vas_info = $this->Orders_model->get_vendorarrangestate_byVendor($input['orderId'], $vendorID); + if (empty($vas_info) && ! empty($input['agcOrderNo'])) { + $real_groupCode = analysis_groupCode($input['agcOrderNo']); + $vas_info = $this->Orders_model->get_vendorarrangestate_byGroup($real_groupCode, $vendorID); + } + } elseif ($input['agcName'] == '桂林海纳国旅') { + $real_groupCode = analysis_groupCode($input['agcOrderNo']); + $vas_info = $this->Orders_model->get_vendorarrangestate_byGroup_T($real_groupCode, $vendorID); + } + + if (empty($vas_info)) { + $ret['errMsg'] = "未找到订单."; + } else { + $vendor_manager = $this->Orders_model->get_vendorContact($vendorID); + /** VendorArrangeState */ + $VAS_ConfirmInfo = $input['orderRemark'] . "\r\n======确认人: " . $input['orderDuty'] . ", 确认时间: " . $input['orderTime']; + $VAS_ConfirmInfo .= "\r\n" . $vas_info[0]->VAS_ConfirmInfo; + $update_vas = $this->Order_update->vendorStatus_update($vas_info[0]->VAS_SN, $vendor_manager->LMI_SN, $VAS_ConfirmInfo); + if (in_array($input['agcName'], array("D目的地桂林组", "Trippest"))) { // 传统团的不需要更新订单主表 + /** BIZ_confirmlineinfo */ + $this->Order_update->coli_where_update = " COLI_SN=" . $vas_info[0]->COLI_SN; + $coli_update_column = array( + "COLI_State" => 7 + ); + $update_coli = $this->Order_update->biz_confirmlineinfo_update($coli_update_column); + } + if ($update_vas === TRUE) { + $ret['status'] = 1; + $ret['errMsg'] = ""; + } + } + if ($ret['status'] !== 1) { + log_message('error','图兰朵确认上报失败. POST RAW: ' . raw_json_encode($input) . "; Result: " . raw_json_encode($ret)); + } + $sender_name = "中华游供应商合作平台"; + $sender_mail = "info@chinahighlights.net"; + $from_name = $vendor_manager->LMI2_Name; + $from_mail = $vendor_manager->LMI_ListMail; + $to_name = $vas_info[0]->OPI_Name; + $to_mail = $vas_info[0]->OPI_Email; + $subject = $input['agcOrderNo'] . "团已确认: " . $vendor_manager->VEI2_CompanyBN; + $mail_body = $vendor_manager->VEI2_CompanyBN . "对团" . $input['agcOrderNo'] . "的计划在" . $input['orderTime'] . "已确认。\r\n"; + $mail_body .= "确认说明:" . $input['orderRemark'] . "\r\n"; + $mail_body .= "确认人:$vendor_manager->LMI2_Name $vendor_manager->LMI_ListMail 固定电话: $vendor_manager->LMI_Telephone 移动电话:$vendor_manager->LMI_Mobile\r\n"; + $mail_body .= "变更内容: " . $vas_info[0]->VAS_ChangeText . "\r\n"; + $this->Orders_model->save_automail($sender_name, $sender_mail, $from_name, $from_mail, $to_name, $to_mail, $subject, $mail_body, $sender_name); + + return $this->output->set_content_type('application/json')->set_output(json_encode($ret)); + } + + + protected function excute_curl($url, $content_builder) { + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_FAILONERROR, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_HTTPHEADER, array( + "Accept: application/json" + )); + + $params_str = $content_builder->getBizContent(); + $postBody = array('jsonParams' => $params_str, "notHander" => 1); + + if (is_string($params_str) && 0 < mb_strlen($params_str)) { + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $postBody); + } + + $reponse = curl_exec($ch); + $eval_resp = json_decode($reponse); + + if (curl_errno($ch) || $eval_resp->status == 0) { + log_message('error', "curl error code: ".curl_error($ch) . $eval_resp->errMsg . "; curl postBodyString: ".json_encode($postBody)); + } else { + $httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + if (200 !== $httpStatusCode) { + log_message('error', "Request html Status Code: ".$httpStatusCode."; curl postBodyString: ".json_encode($postBody)); + } + } + curl_close($ch); + return $reponse; + } + + public function pag_no_tmp($routeName='') + { + return array( + "故宫深度一日游(目的地)" => "BJSIC-44" + ,"故宫深度游拼团(目的地)" => "BJSIC-44" + ,"北京精品一日游(目的地)" => "BJSIC-41" + ,"北京精品一日游(PVT)(目的地)" => "BJSIC-41" + ,"北京精品两日游(目的地)" => "BJSIC-42" + ,"北京精品两日游(PVT)(目的地)" => "BJSIC-42" + ,"北京精品三日游(目的地)" => "BJSIC-43" + ,"北京精品游D2(目的地)" => "BJSIC-42" + ,"北京精品游D3(目的地)" => "BJSIC-43" + ,"北京单租车服务(目的地)" => "BJALC-209" + ,"北京单租车接送(常规)" => "BJALC-209" + ,"北京单租车接送服务(目的地)" => "BJALC-209" + ,"北京市内-天津新港大车接送(目的地)" => "BJSIC-16" + ,"天津新港-北京市内大车接送(目的地)" => "BJSIC-16" + ,"箭扣-慕田峪徒步一日游(目的地)" => "BJSIC-45" + ,"箭扣-慕田峪徒步一日游(PVT)(目的地)" => "BJSIC-45" + ,"箭扣-慕田峪长城徒步拼团(目的地)" => "BJSIC-45" + ,"司马台西-金山岭徒步一日游(目的地)" => "BJSIC-46" + ,"司马台西-金山岭徒步一日游(PVT)(目的地)" => "BJSIC-46" + ,"司马台西-金山岭长城徒步拼团(目的地)" => "BJSIC-46" + ,"慕田峪半日游拼团(目的地)" => "BJSIC-47" + ,"慕田峪半日游PVT(目的地)" => "BJSIC-47" + ,"古北口长城徒步一日游(目的地)" => "BJSIC-48" + ,"古北口(目的地)" => "BJSIC-48" + ,"半日游广场故宫拼团(目的地)" => "BJSIC-41" + // ,=> + ,"西安精品一日游(目的地)" => "XASIC-41" + ,"西安精品一日游PVT(目的地)" => "XASIC-41" + ,"西安市内精品一日游(目的地)" => "XASIC-41" + ,"西安精品两日游(目的地)" => "XASIC-42" + ,"西安单租车服务(目的地)" => "XASIC-17" + ,"西安单租车接送服务(目的地)" => "XASIC-17" + ,"西安单租车接送服务" => "XASIC-17" + ,"西安兵马俑精品一日游(目的地)" => "XASIC-41" + ,"西安兵马俑精华一日游(目的地)" => "XASIC-41" + ,"西安兵马俑精品半日游(目的地)" => "XASIC-15" + ,"西安兵马俑精品半日游PVT(目的地)" => "XASIC-15" + ,"西安汉阳陵市内精品一日游(目的地)" => "XASIC-42" + // ,=> + ,"上海精品一日游(目的地)" => "SHSIC-41" + ,"上海精品游PVT线路(目的地)" => "SHSIC-41" + ,"上海市内精品一日游(目的地)" => "SHSIC-42" + ,"周庄锦溪精品一日游(目的地)" => "SHSIC-43" + ,"苏州精品一日游(目的地)" => "SHSIC-44" + ,"上海单租车(目的地)" => "SHSIC-45" //"SHALC-6,7,8,9" + ,"上海单租车接送服务(目的地)" => "SHSIC-45" //"SHALC-6,7,8,9" + ); + } + + public function calc_key($userId, $key) + { + $default = "b825e39422a54875a95752fc7ed6f5d2"; + $ret = md5(hash("sha256", $userId.$default)); + return $ret===$key; + } + +} diff --git a/webht/third_party/vendorPlanSync/controllers/index.php b/webht/third_party/vendorPlanSync/controllers/index.php new file mode 100644 index 00000000..e189575c --- /dev/null +++ b/webht/third_party/vendorPlanSync/controllers/index.php @@ -0,0 +1,14 @@ + $v) + { + $temp[$k] = explode(",",$v); //再将拆开的数组重新组装 + } + return $temp; +} + +function my_array_unique($array, $keep_key_assoc = false) +{ + $duplicate_keys = array(); + $tmp = array(); + + foreach ($array as $key=>$val) + { + // convert objects to arrays, in_array() does not support objects + if (is_object($val)) + $val = (array)$val; + + if (!in_array($val, $tmp)) + $tmp[] = $val; + else + $duplicate_keys[] = $key; + } + + foreach ($duplicate_keys as $key) + unset($array[$key]); + + return $keep_key_assoc ? $array : array_values($array); +} + +//根据URL获取月份 +function getaqiMonth($url){ + $monArr = array('January','February','March','April','May','June','July','August','September','October','November','December'); + $monObj = array( + 'January' => '01', + 'February' => '02', + 'March' => '03', + 'April' => '04', + 'May' => '05' , + 'June' => '06', + 'July' => '07', + 'August' => '08', + 'September' => '09', + 'October' => '10', + 'November' => '11', + 'December' => '12'); + $urlarr = explode("/",$url); + $tmp = $urlarr[(count($urlarr)-1)]; + $tmp = ucfirst(str_ireplace('.htm','',$tmp)); + //$d=strtotime("00:01am ".$tmp." 15 2015"); + if(in_array($tmp,$monArr)){ + return $monObj[$tmp]; + }else{ + return false; + } +} +/* + * 把数组元素组合为字符串 + * $container:用来包含元素的符号 + * $se:分隔符 + * $arr:需要重新组合的数组 + * 例如:$arr=['aaaa','bbbb']; + * my_implode("'",",",$arr);得到 + * 'aaaa','bbbb' + */ +function my_implode($container,$se,$arr) +{ + $str = ""; + if ($arr != '') { + $str = ""; + $tcount = count($arr); + $tcountInt = 0; + foreach ($arr as $i) { + $tcountInt++; + if ($tcount == $tcountInt) { + $str .= $container . $i . $container; + } else { + $str .= $container . $i . $container . $se; + } + } + } + return $str; +} +/*! + * json_encode($a, JSON_UNESCAPED_UNICODE ) + * for PHP Version < 5.4 + */ +function raw_json_encode($input, $flags = 0) { + $fails = implode('|', array_filter(array( + '\\\\', + $flags & JSON_HEX_TAG ? 'u003[CE]' : '', + $flags & JSON_HEX_AMP ? 'u0026' : '', + $flags & JSON_HEX_APOS ? 'u0027' : '', + $flags & JSON_HEX_QUOT ? 'u0022' : '', + ))); + $pattern = "/\\\\(?:(?:$fails)(*SKIP)(*FAIL)|u([0-9a-fA-F]{4}))/"; + $callback = function ($m) { + return html_entity_decode("&#x$m[1];", ENT_QUOTES, 'UTF-8'); + }; + return preg_replace_callback($pattern, $callback, json_encode($input, $flags)); +} +/*! + * 目的地项目组的订单计划的团号分析 + * 去除添加的后缀, 只保留前两部分: XXXXXX-YYYYYYYYYYYY + * @date 2018-05-02 + * @param [type] $groupCode 从地接系统获取到的团号 + */ +function analysis_groupCode($groupCode) +{ + mb_regex_encoding("UTF-8"); + $groupCode = trim_str(trim($groupCode)); + preg_match('/[\w\s\-]+/', characet($groupCode, "UTF-8"), $temp_array); + // $temp_array[0] = strrchr($temp_array[0], " ") ? mb_strstr($temp_array[0], " ",true) : $temp_array[0]; + if (empty($temp_array)) { + return trim_str(trim($groupCode)); + } + $tmp_groupCode = explode("-", trim($temp_array[0])); + $real_groupCode = $tmp_groupCode[0]; + if (isset($tmp_groupCode[1])) { + $real_groupCode .= "-"; + $real_groupCode .= mb_strstr($tmp_groupCode[1], "(", true)!==false ? mb_strstr($tmp_groupCode[1], "(", true) : $tmp_groupCode[1]; + } + for ($i=2; $i < count($tmp_groupCode); $i++) { + if (strlen($tmp_groupCode[$i]) > 4) { + $real_groupCode .= "-"; + $real_groupCode .= mb_strstr($tmp_groupCode[$i], "(", true)!==false ? mb_strstr($tmp_groupCode[$i], "(", true) : $tmp_groupCode[$i]; + } + } + $real_groupCode = trim_str(trim($real_groupCode)); + return $real_groupCode; +} +function trim_str($groupCode) +{ + return mb_ereg_replace('( | | )', '', $groupCode); +} +/*! + * 转换字符集编码 + * @param $data + * @param $targetCharset + * @return string + */ +function characet($data, $targetCharset) { + if (!empty($data)) { + $fileType = "UTF-8"; + if (strcasecmp($fileType, $targetCharset) != 0) { + $data = mb_convert_encoding($data, $targetCharset, $fileType); + // $data = iconv($fileType, $targetCharset.'//IGNORE', $data); + } + } + return $data; +} + +function real_phone_number($phone, $nation_code) +{ + $nation_str = "+" . $nation_code; + $cut_nation = str_replace($nation_str, "", $phone); + return mb_ereg_replace('[\D]', '', $cut_nation); +} diff --git a/webht/third_party/vendorPlanSync/helpers/index.html b/webht/third_party/vendorPlanSync/helpers/index.html new file mode 100644 index 00000000..c942a79c --- /dev/null +++ b/webht/third_party/vendorPlanSync/helpers/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/webht/third_party/vendorPlanSync/index.html b/webht/third_party/vendorPlanSync/index.html new file mode 100644 index 00000000..c942a79c --- /dev/null +++ b/webht/third_party/vendorPlanSync/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/webht/third_party/vendorPlanSync/libraries/index.html b/webht/third_party/vendorPlanSync/libraries/index.html new file mode 100644 index 00000000..c942a79c --- /dev/null +++ b/webht/third_party/vendorPlanSync/libraries/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php b/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php new file mode 100644 index 00000000..66f28198 --- /dev/null +++ b/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php @@ -0,0 +1,334 @@ +orderData['travelFees'] = array(); //团款明细 + $this->orderData['replaceCollections'] = array(); //代收明细 + $this->orderData['replacePays'] = array(); //代付明细 + $this->orderData['scheduleDetails'] = array(); //行程详细,数组类型,按照第一天往后有序排列 + $this->orderData['customers'] = array(); //游客信息 + } + + public function getBizContent() + { + if(!empty($this->orderData)){ + $this->bizContentarr['orderData'] = $this->orderData; + $this->bizContent = json_encode($this->bizContentarr); + } + return $this->bizContent; + } + + public function setUserId($userId) + { + $this->userId = $userId; + $this->bizContentarr['userId'] = $userId; + return $this; + } + public function setKey($Key) + { + $this->key = $Key; + $this->bizContentarr['key'] = $Key; + return $this; + } + /** 订单基本信息 */ + public function setOrderId($orderId) + { + $this->orderData['orderId'] = $orderId; + return $this; + } + public function setModifyLogInfo($modifyLogInfo) + { + $this->orderData['modifyLogInfo'] = $modifyLogInfo; + return $this; + } + public function setOrderType($orderType) + { + $this->orderData['orderType'] = $orderType; + return $this; + } + public function setRouteName($routeName) + { + $this->orderData['routeName'] = $routeName; + return $this; + } + public function setRouteType($routeType) + { + $this->orderData['routeType'] = $routeType; + return $this; + } + public function setAgcOrderNo($agcOrderNo) + { + $this->orderData['agcOrderNo'] = $agcOrderNo; + return $this; + } + public function setAdultNum($adultNum) + { + $this->orderData['adultNum'] = $adultNum; + return $this; + } + public function setChildNum($childNum) + { + $this->orderData['childNum'] = $childNum; + return $this; + } + public function setGuiderNum($guiderNum) + { + $this->orderData['guiderNum'] = $guiderNum; + return $this; + } + public function setGuiderInfo($guiderInfo) + { + $this->orderData['guiderInfo'] = $guiderInfo; + return $this; + } + public function setToTraffic($toTraffic) + { + $this->orderData['toTraffic'] = $toTraffic; + return $this; + } + public function setBackTraffic($backTraffic) + { + $this->orderData['backTraffic'] = $backTraffic; + return $this; + } + public function setRoomStandard($roomStandard) + { + $this->orderData['roomStandard'] = $roomStandard; + return $this; + } + public function setOrderRemark($orderRemark) + { + $this->orderData['orderRemark'] = $orderRemark; + return $this; + } + public function setRouteStandard($routeStandard) + { + $this->orderData['routeStandard'] = $routeStandard; + return $this; + } + public function setDestination($destination) + { + $this->orderData['destination'] = $destination; + return $this; + } + public function setTravelDate($travelDate) + { + $this->orderData['travelDate'] = $travelDate; + return $this; + } + public function setLeavedDate($leavedDate) + { + $this->orderData['leavedDate'] = $leavedDate; + return $this; + } + + /** 团款数组 */ + public function setTravelFeesType($index, $type) + { + $this->orderData['travelFees'][$index]['type'] = $type; + return $this; + } + public function setTravelFeesMoney($index, $money) + { + $this->orderData['travelFees'][$index]['money'] = $money; + return $this; + } + public function setTravelFeesNum($index, $num) + { + $this->orderData['travelFees'][$index]['num'] = $num; + return $this; + } + public function setTravelFeesUnit($index, $unit) + { + $this->orderData['travelFees'][$index]['unit'] = $unit; + return $this; + } + public function setTravelFeesSumMoney($index, $sumMoney) + { + $this->orderData['travelFees'][$index]['sumMoney'] = $sumMoney; + return $this; + } + public function setTravelFeesRemark($index, $remark) + { + $this->orderData['travelFees'][$index]['remark'] = $remark; + return $this; + } + + /** 代付数组 */ + public function setReplacePaysType($index, $type) + { + $this->orderData['replacePays'][$index]['type'] = $type; + return $this; + } + public function setReplacePaysMoney($index, $money) + { + $this->orderData['replacePays'][$index]['money'] = $money; + return $this; + } + public function setReplacePaysRemark($index, $remark) + { + $this->orderData['replacePays'][$index]['remark'] = $remark; + return $this; + } + + /** 代收数组 */ + public function setReplaceCollectionsType($index, $type) + { + $this->orderData['replaceCollections'][$index]['type'] = $type; + return $this; + } + public function setReplaceCollectionsMoney($index, $money) + { + $this->orderData['replaceCollections'][$index]['money'] = $money; + return $this; + } + public function setReplaceCollectionsRemark($index, $remark) + { + $this->orderData['replaceCollections'][$index]['remark'] = $remark; + return $this; + } + + /** 行程详细数组 */ + public function setScheduleDetailsTitle($index, $title) + { + $this->orderData['scheduleDetails'][$index]['title'] = $title; + return $this; + } + public function setScheduleDetailsContent($index, $content) + { + $this->orderData['scheduleDetails'][$index]['content'] = $content; + return $this; + } + public function setScheduleDetailsTraffic($index, $traffic) + { + $this->orderData['scheduleDetails'][$index]['traffic'] = $traffic; + return $this; + } + public function setScheduleDetailsAccommodation($index, $accommodation) + { + $this->orderData['scheduleDetails'][$index]['accommodation'] = $accommodation; + return $this; + } + public function setScheduleDetailsBreakFirst($index, $breakFirst) + { + $this->orderData['scheduleDetails'][$index]['breakFirst'] = $breakFirst; + return $this; + } + public function setScheduleDetailsDinner($index, $dinner) + { + $this->orderData['scheduleDetails'][$index]['dinner'] = $dinner; + return $this; + } + public function setScheduleDetailsLunch($index, $lunch) + { + $this->orderData['scheduleDetails'][$index]['lunch'] = $lunch; + return $this; + } + + /** 游客信息数组 */ + public function setCustomersName($index, $name) + { + $this->orderData['customers'][$index]['name'] = $name; + return $this; + } + public function setCustomersPeopleType($index, $peopleType) + { + $this->orderData['customers'][$index]['peopleType'] = $peopleType; + return $this; + } + public function setCustomersDocumentType($index, $documentType) + { + $this->orderData['customers'][$index]['documentType'] = $documentType; + return $this; + } + public function setCustomersDocumentNo($index, $documentNo) + { + $this->orderData['customers'][$index]['documentNo'] = $documentNo; + return $this; + } + public function setCustomersPhoneNo($index, $phoneNo) + { + $this->orderData['customers'][$index]['phoneNo'] = $phoneNo; + return $this; + } + public function setCustomersOtherInfo($index, $otherInfo) + { + $this->orderData['customers'][$index]['otherInfo'] = $otherInfo; + return $this; + } + + +} + +?> diff --git a/webht/third_party/vendorPlanSync/models/TuLanDuo_queryContentBuilder.php b/webht/third_party/vendorPlanSync/models/TuLanDuo_queryContentBuilder.php new file mode 100644 index 00000000..22ea575e --- /dev/null +++ b/webht/third_party/vendorPlanSync/models/TuLanDuo_queryContentBuilder.php @@ -0,0 +1,142 @@ + + * @date 2018-03-31 + */ +class TuLanDuo_queryContentBuilder extends CI_Model +{ + private $userId; + private $Key; + + private $pageSize=20; //”Integer”//每页数量 每页最多返回50行 + private $pageIndex=1; //”Integer”//页码。第几页数据 + private $orderType; //”Integer”//订单类型,1=独立成团,2=散客团 【精准查询】 + private $orderStatus; //”Integer”//订单状态 1=已确认,0=待确认 + private $startTravelDate; //”String”//当前出游时间之后 【精准查询】 + private $endTravelDate; //”String”//当前出游时间之前 【精准查询】 + private $startOrderDate; //”String”//当前预定时间之后 【精准查询】 + private $endOrderDate; //”String”//当前预定时间之前 【精准查询】 + private $agcOrderNo; //”String”//组团社团号 【模糊查询】 + private $adultNum; //”Integer”//大人数量 【精准查询】 + private $childNum; //”Integer”//小孩数量 【精准查询】 + private $customerName; //”String”//订单游客名单 【模糊查询】 + private $routeName; //”String”//行程名称 。 【模糊查询】 + private $operationDep; //”String”//操作部门 , 【精准查询】 + + private $orderId; //”Integer”//订单ID + + private $bizContentarr = array(); + + private $bizContent = NULL; + + public function getBizContent() + { + if(!empty($this->bizContentarr)){ + $this->bizContent = json_encode($this->bizContentarr); + } + return $this->bizContent; + } + + public function setUserId($userId) + { + $this->userId = $userId; + $this->bizContentarr['userId'] = $userId; + return $this; + } + public function setKey($Key) + { + $this->key = $Key; + $this->bizContentarr['key'] = $Key; + return $this; + } + + public function getPageSize() + { + return $this->pageSize; + } + public function setPageSize($pageSize) + { + $this->pageSize = $pageSize; + $this->bizContentarr['pageSize'] = $pageSize; + return $this; + } + public function getPageIndex() + { + return $this->pageIndex; + } + public function setPageIndex($pageIndex) + { + $this->pageIndex = $pageIndex; + $this->bizContentarr['pageIndex'] = $pageIndex; + return $this; + } + + public function getStartTravelDate() + { + return $this->startTravelDate; + } + public function setStartTravelDate($startTravelDate) + { + $this->startTravelDate = $startTravelDate; + $this->bizContentarr['startTravelDate'] = $startTravelDate; + return $this; + } + public function getEndTravelDate() + { + return $this->endTravelDate; + } + public function setEndTravelDate($endTravelDate) + { + $this->endTravelDate = $endTravelDate; + $this->bizContentarr['endTravelDate'] = $endTravelDate; + return $this; + } + + public function getStartOrderDate() + { + return $this->startOrderDate; + } + public function setStartOrderDate($startOrderDate) + { + $this->startOrderDate = $startOrderDate; + $this->bizContentarr['startOrderDate'] = $startOrderDate; + return $this; + } + public function getEndOrderDate() + { + return $this->endOrderDate; + } + public function setEndOrderDate($endOrderDate) + { + $this->endOrderDate = $endOrderDate; + $this->bizContentarr['endOrderDate'] = $endOrderDate; + return $this; + } + + public function getOrderId() + { + return $this->orderId; + } + public function setOrderId($orderId) + { + $this->orderId = $orderId; + $this->bizContentarr['orderId'] = $orderId; + return $this; + } + + public function getAgcOrderNo() + { + return $this->agcOrderNo; + } + public function setAgcOrderNo($agcOrderNo) + { + $this->agcOrderNo = $agcOrderNo; + $this->bizContentarr['agcOrderNo'] = $agcOrderNo; + return $this; + } + // 其他还没用到先不写了... +} + +?> diff --git a/webht/third_party/vendorPlanSync/models/index.html b/webht/third_party/vendorPlanSync/models/index.html new file mode 100644 index 00000000..c942a79c --- /dev/null +++ b/webht/third_party/vendorPlanSync/models/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/webht/third_party/vendorPlanSync/views/index.html b/webht/third_party/vendorPlanSync/views/index.html new file mode 100644 index 00000000..c942a79c --- /dev/null +++ b/webht/third_party/vendorPlanSync/views/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/webht/third_party/vendorPlanSync/views/welcome_message.php b/webht/third_party/vendorPlanSync/views/welcome_message.php new file mode 100644 index 00000000..0bf5a8d2 --- /dev/null +++ b/webht/third_party/vendorPlanSync/views/welcome_message.php @@ -0,0 +1,88 @@ + + + + + Welcome to CodeIgniter + + + + + +
+

Welcome to CodeIgniter!

+ +
+

The page you are looking at is being generated dynamically by CodeIgniter.

+ +

If you would like to edit this page you'll find it located at:

+ application/views/welcome_message.php + +

The corresponding controller for this page is found at:

+ application/controllers/welcome.php + +

If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.

+
+ + +
+ + + \ No newline at end of file