diff --git a/application/config/config.php b/application/config/config.php index fa2b0f4e..f336ab7b 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -382,7 +382,7 @@ $config['proxy_ips'] = ''; //各站信息组和人员权限分配 $config['site'] = array( - 'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,'), + 'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,SYH'), 'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'https://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => array('DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'), 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'), 'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'https://www.voyageschine.com', 'site_image_url' => '//images.voyageschine.com', 'site_authors' => array('JE', 'kq', 'lya', 'lyz', 'zyh'), 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'), 'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'https://www.arachina.com', 'site_image_url' => '//images.arachina.com', 'site_authors' => array('hql', 'LLM', 'SHX', 'lmr', 'zyh', 'zb'), 'site_user' => ',ycc,lmr, zyh,hql,LLM,SHX,htc,zpl,Tony,zyh,J,B,zb,LYY,'), diff --git a/application/models/area_model.php b/application/models/area_model.php index 79d52e69..96ea723f 100644 --- a/application/models/area_model.php +++ b/application/models/area_model.php @@ -142,7 +142,7 @@ class Area_model extends CI_Model . "FROM COuntryInfo ci \n" . " INNER JOIN COuntryInfo2 ci2 ON ci2.COI2_COI_SN = ci.COI_SN \n" . "WHERE ci2.COI2_LGC = ? \n" - . " AND ci.COI_SN in(1, 19, 22, 24, 27, 28, 29, 30, 31, 35, 591)"; + . " AND ci.COI_SN in(1, 2, 19, 22, 24, 27, 28, 29, 30, 31, 35, 562, 591)"; $query = $this->HT->query($sql, array($this->config->item('site_lgc'))); return $query->result(); } diff --git a/application/third_party/train/controllers/search.php b/application/third_party/train/controllers/search.php index 5530e411..105e6728 100644 --- a/application/third_party/train/controllers/search.php +++ b/application/third_party/train/controllers/search.php @@ -392,11 +392,10 @@ class search extends CI_Controller{ $all_stations = $this->BIZ_intel_train_model->ch_allstations(); $i = 0; foreach($all_stations as $item){ - if($item->s_country == 'Vietnam'){ - $rule_arr = $this->BIZ_intel_train_model->ch_train_rules($item->station_id,true); - }else{ - $rule_arr = $this->BIZ_intel_train_model->ch_train_rules($item->station_id,false); + if($item->s_country == 'China'){ + $rule_arr = $this->BIZ_intel_train_model->ch_train_rules($item->station_id); } + if(!empty($rule_arr)){ $return_json['TrainList'][$i]['FromStation'] = $item->s_ename; $return_json['TrainList'][$i]['FromCountry'] = $item->s_country; diff --git a/application/third_party/train/models/BIZ_intel_train_model.php b/application/third_party/train/models/BIZ_intel_train_model.php index a659a6d9..31eeeab2 100644 --- a/application/third_party/train/models/BIZ_intel_train_model.php +++ b/application/third_party/train/models/BIZ_intel_train_model.php @@ -146,14 +146,9 @@ class BIZ_intel_train_model extends CI_Model { return $query->result(); } - public function ch_train_rules($station_id,$flag){ - if($flag){ - $and = "and s_country != 'Vietnam'"; - }else{ - $and = ""; - } + public function ch_train_rules($station_id){ if($station_id == 11){ - $station = "or tsi_FromStation = 10"; + $station = "or tsi_FromStation = 10 or tsi_ToStation = 10"; }else{ $station = ""; } @@ -166,11 +161,10 @@ class BIZ_intel_train_model extends CI_Model { ON tsi_ToStation = station_id where - tsi_FromStation = '{$station_id}' + (tsi_FromStation = ? or tsi_ToStation = ?) "; - $sql .= $and; $sql .= $station; - $query = $this->HT->query($sql); + $query = $this->HT->query($sql,array($station_id,$station_id)); return $query->result(); } } diff --git a/application/third_party/trainsystem/controllers/addorders.php b/application/third_party/trainsystem/controllers/addorders.php index 0353c5dd..8a0602f6 100644 --- a/application/third_party/trainsystem/controllers/addorders.php +++ b/application/third_party/trainsystem/controllers/addorders.php @@ -17,7 +17,7 @@ class addorders extends CI_Controller{ } public function index(){ - echo 'api manager'; + exit('hello world'); } //自动出票 @@ -47,32 +47,32 @@ class addorders extends CI_Controller{ $back_message = ''; $cold_sn = $item->COLD_SN; $coli_id = $item->coli_id; - $back_data = 1; + $auto_flag = 1; $people_arr = $this->BIZ_train_model->biz_people($cold_sn); $train_info = $this->BIZ_train_model->get_biz_foi($cold_sn); if($item->COLD_SPFS > 1){ //寄送票 - $back_data = 0; + $auto_flag = 0; $back_message .= '-邮寄不自动出票'; } //乘客人数大于5人不出票 if(count($people_arr) > 5){ - $back_data = 0; + $auto_flag = 0; $back_message .= '-乘客人数大于5不自动出票'; } //护照号如果在黑名单的就不自动出票 foreach($people_arr as $people_info){ if(in_array($people_info->BPE_Passport,$black_list)){ - $back_data = 0; + $auto_flag = 0; $back_message .= '-此用户为黑名单用户,不自动出票'; } if(strlen($people_info->BPE_Passport) >= 18){ - $back_data = 0; + $auto_flag = 0; $back_message .= '-护照位数大于18不自动出票'; } @@ -80,27 +80,29 @@ class addorders extends CI_Controller{ } $bpe_sn = substr($bpe_sn,0,strlen($bpe_sn)-1); - //单张票价不能大于1000人民币 - if($train_info[0]->adultcost > 1000){ - $back_data = 0; - $back_message .= '-单价大于1000不自动出票'; + //不是国内支付宝的付款方式的订单需要受到1000元单价限制 + if($item->GAI_Type != '15015' && $item->COLI_State != '8'){ + if($train_info[0]->adultcost > 1000){ + $auto_flag = 0; + $back_message .= '-单价大于1000不自动出票'; + } } //如果为国际火车票就不出票 if(in_array($train_info[0]->FlightsNo, $nation_train)){ - $back_data = 0; + $auto_flag = 0; $back_message .= '-国际火车票不自动出票'; } //无座的订单不做出票 if($train_info[0]->Aircraft == 'WZ'){ - $back_data = 0; + $auto_flag = 0; $back_message .= '-无座不自动出票'; } //香港火车不自动出票 if($train_info[0]->DepartAirport == 'XJA'){ - $back_data = 0; + $auto_flag = 0; $back_message .= '-香港火车不自动出票'; } @@ -109,13 +111,12 @@ class addorders extends CI_Controller{ $depart_diff = ($DepartureDate - $time) / 86400; if($train_info[0]->ArrivalAirport == 'XJA' && $train_info[0]->adultcost > 500 && $depart_diff > 5){ - $back_data = 0; + $auto_flag = 0; $back_message .= '-内地香港火车金额大于500超过五天不自动出票'; } //print_r($train_info); //如果刚好是第三十天的订单 - echo $item->COLI_State; if(($item->COLI_State == '8' || $item->COLI_State == '63')){ $this->isauto = 3; $time_obj = $this->BIZ_train_model->get_saletime($train_info['0']->DepartAirport_cn); @@ -125,16 +126,16 @@ class addorders extends CI_Controller{ //echo $saletime; $sale_diff = (time() - $saletime) / 3600; if($sale_diff > 1){ - $back_data = 0; + $auto_flag = 0; $back_message .= '-超过抢票时间'; }else if($sale_diff <0){ - $back_data = 0; + $auto_flag = 0; $back_message .= '-未到抢票时间'; } } } - if($back_data == 0){ + if($auto_flag == 0){ $string .= '汉特订单号:'.$coli_id.'('.$cold_sn.')'.$back_message.''; }else{ //单个订单提交 @@ -531,7 +532,7 @@ class addorders extends CI_Controller{ $add_data->endtime = date('H:i',strtotime($data['train']->ArrivalTime)); $add_data->runtime = (strtotime($data['train']->ArrivalTime) - strtotime($data['train']->DepartureTime)) / 60; $add_data->channel = 'tuniu'; - $add_data->isauto = 0; + $add_data->isauto = $this->isauto; $this->train_system_model->add_orders($add_data); echo json_encode($reback); @@ -541,7 +542,8 @@ class addorders extends CI_Controller{ function ctripModel($data,$selectseat,$cold_sn){ $zwcode = $this->db_train_zw[$data['train']->Aircraft]; //座位简码 $zwname = $this->train_zw[$this->db_train_zw[$data['train']->Aircraft]]; //座位名称 - $OrderNumber = ORDERUSER.time(); + $microtime = get_microtime(); + $OrderNumber = ORDERUSER.$microtime; //拼接发送的报文 $PostData = array(); $time = date('Y-m-d H:i:s',time()); @@ -666,8 +668,7 @@ class addorders extends CI_Controller{ $add_data->endtime = date('H:i',strtotime($data['train']->ArrivalTime)); $add_data->runtime = (strtotime($data['train']->ArrivalTime) - strtotime($data['train']->DepartureTime)) / 60; $add_data->channel = 'ctrip'; - $add_data->isauto = 0; - + $add_data->isauto = $this->isauto; //存储到数据库 $this->train_system_model->add_orders($add_data); diff --git a/application/third_party/trainsystem/controllers/api.php b/application/third_party/trainsystem/controllers/api.php index 9d33819d..6527a8d4 100644 --- a/application/third_party/trainsystem/controllers/api.php +++ b/application/third_party/trainsystem/controllers/api.php @@ -57,7 +57,6 @@ class api extends CI_Controller{ function send_mail_to_guest($coli_id,$jh_order){ $info = $this->BIZ_train_model->get_user_info($jh_order); $guest = $this->BIZ_train_model->get_guest_info($coli_id); - //print_r($guest); $operator_info = $this->BIZ_train_model->get_operatorInfo($coli_id); $fromName = $operator_info[0]->Name; $fromEmail = $operator_info[0]->OPI_Email; @@ -73,7 +72,7 @@ class api extends CI_Controller{ $data['train_info'] = $this->BIZ_train_model->get_biz_foi($info->COLD_SN); $differtime = (strtotime($data['train_info'][0]->DepartureTime) - time()) / 3600; $obj = $this->BIZ_train_model->get_biz_jol_info($info->COLD_SN,$jh_order); - $data['ordernumber'] = $obj->ts_elecnumber; + $data['elecnumber'] = $obj->ts_elecnumber; $status = $obj->ts_status; $data['operator'] = $operator_info; $data['emailarr'] = explode(';',$operator_info[0]->Email); @@ -88,14 +87,14 @@ class api extends CI_Controller{ $flag = $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); $this->BIZ_train_model->update_biz_jol(array("ts_ordernumber"=>$jh_order),array("ts_sendmail"=>1,"ts_m_sn"=>$flag)); }else if($status == '1'){ - $subject = "The train ticket(s) will be issued manually, Order No $coli_id"; + /*$subject = "The train ticket(s) will be issued manually, Order No $coli_id"; $body = $this->load->view('email_fault',$data,true); $this->send_mail_to_wl("订单:{$coli_id} 出票失败","翰特订单号:{$coli_id};聚合订单号:{$jh_order}",$coli_id); //测试阶段,将失败邮件发送一份给操作外联。 $flag = $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$fromName,$fromEmail,$subject,$body); //测试阶段,将失败邮件发送一份给操作外联。 $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); - $this->BIZ_train_model->update_biz_jol(array("ts_ordernumber"=>$jh_order),array("ts_sendmail"=>1,"ts_m_sn"=>$flag)); + $this->BIZ_train_model->update_biz_jol(array("ts_ordernumber"=>$jh_order),array("ts_sendmail"=>1,"ts_m_sn"=>$flag));*/ } } diff --git a/application/third_party/trainsystem/controllers/callback.php b/application/third_party/trainsystem/controllers/callback.php index fe9659db..e3128fcc 100644 --- a/application/third_party/trainsystem/controllers/callback.php +++ b/application/third_party/trainsystem/controllers/callback.php @@ -97,6 +97,7 @@ class callback extends CI_Controller{ $back_json = GetPost_http(JUHE_TRAIN_PAY_API,$post_data); $update_data->bookcallback = $data_post["data"]; }elseif($data->status == "4"){ + $add_train_order_data = new stdClass(); $add_train_order_data->TOC_Memo = $data->orderid." 聚合出票"; $add_train_order_data->TOC_COLD_SN = $data->user_orderid; $add_train_order_data->TOC_TrainNumber = $data->checi; @@ -153,7 +154,7 @@ class callback extends CI_Controller{ public function ctripcallback(){ $back_json = file_get_contents('php://input'); log_message('error','携程回调信息:'.$back_json); - //$back_json = '{"@attributes":{"xsi":"http:\/\/www.w3.org\/2001\/XMLSchema-instance"},"Authentication":{"TimeStamp":"2019-06-27 11:01:15","ServiceName":"web.order.notifyTicket","MessageIdentity":"08F97DF046FC32BB3F0CCBAF2DAAFB60","PartnerName":"tieyou"},"TrainOrderService":{"OrderInfo":{"OrderNumber":"guilintravel1561604425","ElectronicOrderNumber":"ED35331748","OrderType":"\u7535\u5b50","OrderTotleFee":"490.50","TicketInfo":{"OrderTicketFromStation":"\u54c8\u5c14\u6ee8\u897f","OrderTicketToStation":"\u5317\u4eac","OrderTicketYMD":"20190726","OrderTicketTime":"10:43","OrderTicketCheci":"D102","OrderTicketPrice":"490.50","OrderAcceptSeat":{"0":"\n "},"OrderTicketSeat":"\u4e00\u7b49\u5ea7","SeatNumber":"08\u8f66\u53a214F\u53f7","railwayTip":{"0":"\n "},"AuditTicketCount":"1","ChildTicketCount":"0","Passengers":{"Passenger":{"RealName":"SHCHERBAKOVOLEG","IdentityType":"\u62a4\u7167","NumberID":"655103175","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"}}},"TicketInfoFinal":{"OrderTicketFromStation":"\u54c8\u5c14\u6ee8\u897f","OrderTicketToStation":"\u5317\u4eac","ChildBillid":{"0":"\n "},"ElectronicOrderNumber":"ED35331748","Result":"2","NoTicketReasons":{"0":"\n "},"OrderTicketYMD":"20190726","OrderTicketTime":"10:43","OrderTicketCheci":"D102","OrderTicketPrice":"490.50","SeatNumber":"08\u8f66\u53a214F\u53f7","railwayTip":{"0":"\n "},"TicketCheck":"\u68c0\u7968\u53e3B3\u53f7\u53e3","IsUserAcount":"0","ReturnFlag":"0","RescheduleFlag":"0","Tickets":{"Ticket":{"OrderTicketSeat":"\u4e00\u7b49\u5ea7","TicketType":"\u6210\u4eba\u7968","OrderTicketPrice":"490.50","TicketCount":"1","DetailInfos":{"DetailInfo":{"PassengerName":"SHCHERBAKOVOLEG","IdentityType":"\u62a4\u7167","NumberID":"655103175","SeatNo":"08\u8f66\u53a214F\u53f7"}}}}}}}}'; + //$back_json = '{"@attributes":{"xsi":"http:\/\/www.w3.org\/2001\/XMLSchema-instance"},"Authentication":{"TimeStamp":"2019-07-03 10:21:52","ServiceName":"web.order.notifyTicket","MessageIdentity":"3EB2E92F2105B787DFA590038B402A45","PartnerName":"tieyou"},"TrainOrderService":{"OrderInfo":{"OrderNumber":"guilintravel1562120461","ElectronicOrderNumber":"EE78512679","OrderType":"\u7535\u5b50","OrderTotleFee":"1595.00","TicketInfo":{"OrderTicketFromStation":"\u5317\u4eac\u897f","OrderTicketToStation":"\u897f\u5b89","OrderTicketYMD":"20190719","OrderTicketTime":"20:12","OrderTicketCheci":"Z43","OrderTicketPrice":"797.50","OrderAcceptSeat":{"0":"\n "},"OrderTicketSeat":"\u9ad8\u7ea7\u8f6f\u5367","SeatNumber":"14\u8f66\u53a203\u53f7\u4e0b\u94fa,14\u8f66\u53a204\u53f7\u4e0a\u94fa","railwayTip":{"0":"\n "},"AuditTicketCount":"2","ChildTicketCount":"0","Passengers":{"Passenger":[{"RealName":"HUEIRENPAN","IdentityType":"\u62a4\u7167","NumberID":"505548383","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"},{"RealName":"HUEIYUANPAN","IdentityType":"\u62a4\u7167","NumberID":"523490332","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"}]}},"TicketInfoFinal":{"OrderTicketFromStation":"\u5317\u4eac\u897f","OrderTicketToStation":"\u897f\u5b89","ChildBillid":{"0":"\n "},"ElectronicOrderNumber":"EE78512679","Result":"2","NoTicketReasons":{"0":"\n "},"OrderTicketYMD":"20190719","OrderTicketTime":"20:12","OrderTicketCheci":"Z43","OrderTicketPrice":"797.50","SeatNumber":"14\u8f66\u53a203\u53f7\u4e0b\u94fa","railwayTip":{"0":"\n "},"TicketCheck":{"0":"\n "},"IsUserAcount":"0","ReturnFlag":"0","RescheduleFlag":"0","Tickets":{"Ticket":[{"OrderTicketSeat":"\u9ad8\u7ea7\u8f6f\u5367","TicketType":"\u6210\u4eba\u7968","OrderTicketPrice":"814.50","TicketCount":"1","DetailInfos":{"DetailInfo":{"PassengerName":"HUEIRENPAN","IdentityType":"\u62a4\u7167","NumberID":"505548383","SeatNo":"14\u8f66\u53a203\u53f7\u4e0b\u94fa"}}},{"OrderTicketSeat":"\u9ad8\u7ea7\u8f6f\u5367","TicketType":"\u6210\u4eba\u7968","OrderTicketPrice":"780.50","TicketCount":"1","DetailInfos":{"DetailInfo":{"PassengerName":"HUEIYUANPAN","IdentityType":"\u62a4\u7167","NumberID":"523490332","SeatNo":"14\u8f66\u53a204\u53f7\u4e0a\u94fa"}}}]}}}}}'; $ctrip_backdata = json_decode($back_json); //print_r($ctrip_backdata);die(); if(!empty($ctrip_backdata)){ @@ -293,7 +294,7 @@ class callback extends CI_Controller{ //退票时还需要单独对对每个乘客存储回调信息 $passpager_info = new stdClass(); $passpager_info->returncallback = $back_json; - $passpager_info->OrderStatus = '7'; + $passpager_info->status = '7'; $passpager_info->ordernumber = $ctrip_backdata->TrainOrderService->OrderNumber; $passpager_info->realname = $ctrip_backdata->TrainOrderService->refundTicket->realName; $passpager_info->numberid = $ctrip_backdata->TrainOrderService->refundTicket->passport; diff --git a/application/third_party/trainsystem/controllers/returnorders.php b/application/third_party/trainsystem/controllers/returnorders.php index a4a9b263..86478387 100644 --- a/application/third_party/trainsystem/controllers/returnorders.php +++ b/application/third_party/trainsystem/controllers/returnorders.php @@ -132,12 +132,15 @@ class returnorders extends CI_Controller{ $PostData = array(); $TimeStamp = time(); $time = date('Y-m-d H:i:s',$TimeStamp); + + $PostData['Authentication'] = new stdClass(); $PostData['Authentication']->TimeStamp = $time; $PostData['Authentication']->ServiceName = 'order.ticketReturn'; $PostData['Authentication']->PartnerName = ORDERUSER; $MessageIdentity = md5($time.'order.ticketReturn'.ORDERKEY); $PostData['Authentication']->MessageIdentity = $MessageIdentity; - + + $PostData['TrainOrderService'] = new stdClass(); $PostData['TrainOrderService']->contactName = '陈宇超'; $PostData['TrainOrderService']->contactMobile = '18877381547'; $PostData['TrainOrderService']->OrderNumber = $ticket_data->ts_ordernumber; @@ -159,7 +162,7 @@ class returnorders extends CI_Controller{ //发起退票请求 $Url = 'http://m.ctrip.com/restapi/soa2/11009/json/PartnerReturnTicket'; - $ResponseJson = GetPost_http($Url,json_encode($PostData),'POST'); + $ResponseJson = GetPost_http($Url,json_encode($PostData),'json'); $ResponseData = json_decode($ResponseJson); if($ResponseData->Status == 'SUCCESS'){ diff --git a/application/third_party/trainsystem/helpers/train_helper.php b/application/third_party/trainsystem/helpers/train_helper.php index 99e2914a..bbd5fcd6 100644 --- a/application/third_party/trainsystem/helpers/train_helper.php +++ b/application/third_party/trainsystem/helpers/train_helper.php @@ -74,4 +74,9 @@ function GetPost_http($url, $data = '',$format='') { return $tmpInfo; // } +function get_microtime (){ + list($s1, $s2) = explode(' ', microtime()); + return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000); +} + ?> \ No newline at end of file diff --git a/application/third_party/trainsystem/models/BIZ_train_model.php b/application/third_party/trainsystem/models/BIZ_train_model.php index 01c2ef1b..31fe7331 100644 --- a/application/third_party/trainsystem/models/BIZ_train_model.php +++ b/application/third_party/trainsystem/models/BIZ_train_model.php @@ -253,7 +253,7 @@ class BIZ_train_model extends CI_Model { //自动获取符合自动出票要求的订单的coli_sn function auto_check_ticket(){ - $sql = "SELECT distinct top 50 COLD_SN ,coli_id,COLD_SPFS,COLI_State + $sql = "SELECT distinct top 50 COLD_SN ,coli_id,COLD_SPFS,COLI_State,GAI_Type FROM BIZ_ConfirmLineInfo bcli inner join BIZ_ConfirmLineDetail bcld on COLD_COLI_SN=COLI_SN LEFT JOIN BIZ_GroupAccountInfo bgai @@ -262,7 +262,7 @@ class BIZ_train_model extends CI_Model { AND bcli.COLI_State in ('11','13','8','63') AND bcli.COLI_WebCode in ('cht', 'JP', 'train_it', 'VC', 'train_ru','GM-Train','SHT','CT','WebMob-biz','WeChat-biz') AND (bcli.COLI_Price - bgai.GAI_SQJE) <= 20 - AND (bcli.COLI_Price - bgai.GAI_SQJE) >= 0 + AND (bgai.GAI_SQJE - bcli.COLI_Price) >= 0 AND bcli.DeleteFlag = 0 AND bgai.DeleteFlag = 0 AND bcld.DeleteFlag = 0 diff --git a/application/third_party/trainsystem/models/train_system_model.php b/application/third_party/trainsystem/models/train_system_model.php index 589ea4c1..3dcc4061 100644 --- a/application/third_party/trainsystem/models/train_system_model.php +++ b/application/third_party/trainsystem/models/train_system_model.php @@ -266,7 +266,7 @@ class train_system_model extends CI_Model { } public function test(){ - $sql = "delete from trainsystem where ts_cold_sn = '488121613_1552637689'"; + $sql = "delete from trainsystem where ts_id in ('13111','13081')"; $query = $this->INFO->query($sql); } } \ No newline at end of file diff --git a/application/third_party/trainsystem/views/email.php b/application/third_party/trainsystem/views/email.php index 1fe9c49e..ef2032f9 100644 --- a/application/third_party/trainsystem/views/email.php +++ b/application/third_party/trainsystem/views/email.php @@ -1,7 +1,6 @@ -China train ticket(s) confirmed, Booking Number <?php echo $coli_id;?>

China Highlights Booking Confirmation

Dear ,

Thank you for your payment of US$GAI_SQJE?> . The train tickets have already been issued.

You can collect the paper ticket(s) from now on at any train station in mainland China.

Please note:

1.Please present the original passport(s) of all the passenger(s) and the ticket pick-up number(s) at ticket collection counters. The counter will then issue your paper train ticket(s).

-

See the video about how to collect the ticket(s) in China. -

2.Please double check the train(s) information and passport information. Let us know AT ONCE if you see any mistakes below. We can try to cancel tickets to minimize your loss. A 20% cancellation fee is charged by China Railway.

Ticket collection sentences

The bilingual note below might help you pick up tickets at the ticket collection counter more easily.

1.Please show me which window for picking up the train ticket. 你好,请问哪个是取票窗?

2.Please issue the paper tickets for me. The following is the pick up number(s).请帮我出票,电子取票号如下.

+China train ticket(s) confirmed, Booking Number <?php echo $coli_id;?>

China Highlights Booking Confirmation

Dear ,

Thank you for your payment of US$GAI_SQJE?> . Your train ticket(s) have already been issued.

This email is important so please read it carefully. To ensure you have a smooth trip, it is highly recommended that you read the confirmation letter carefully. A mistake with your name or passport number will mean that you may not be able to collect your ticket(s). Let us know immediately if you see any mistakes below.

You can collect your paper ticket(s) from now on at any train station in mainland China. If you booked multiple trains, you can collect all of your paper tickets at the same time. You can just send one person to collect all tickets with all passengers’ original passports.

Please note:

1.Present the original passport(s) of all the passenger(s) and the ticket pick-up number(s) at ticket collection counters. The counter will then issue your paper train ticket(s).

+

2.Watch the video about how to collect your ticket(s) in China.

Ticket collection sentences

The bilingual note below might help you collect your ticket(s) from the ticket collection counter more easily.

You can show this to ask for directions:

1.Excuse me, where is ** train station? 你好,请问**火车站怎么走?

2.Please show me which window is the one to collect my train ticket(s) from.你好,请问哪个是取票窗?

2.Please issue the paper ticket(s) for me. The following is/are the pick-up number(s).请帮我出票,电子取票号如下.

Train No.'; echo ''.$item->FlightsNo.''; echo 'Departure'; - echo ''.$item->DepartureTime.' '.$item->DepartureCity.' Station(in Chinese '.$item->DepartAirport_cn.'火车站)'; + echo ''.date('H:s M d',strtotime($item->DepartureTime)).', '.$item->DepartureCity.' Station(in Chinese '.$item->DepartAirport_cn.'火车站)'; echo 'Arrival'; - echo ''.$item->ArrivalTime.' '.$item->ArrivalCity.' Station(in Chinese '.$item->ArrivalAirport_cn.'火车站)'; - echo 'Class'; + echo ''.date('H:s M d',strtotime($item->ArrivalTime)).', '.$item->ArrivalCity.' Station(in Chinese '.$item->ArrivalAirport_cn.'火车站)'; + echo 'Class and Seat'; echo ''.$item->Cabin.' ('.$seatinfo.')'; } ?> @@ -29,5 +28,7 @@ echo ++$i.'.'.$item->BPE_FirstName.$item->BPE_MiddleName.$item->BPE_LastName.' , passport number '.$item->BPE_Passport.'
'; } ?>

-

3.On your departure day, please time your arrival at the station wisely. If you are going to collect your train ticket(s) on the departure day, allow enough time waiting in the queue of the ticket collection counter, for the security x-ray check of your luggage, and for the ticket check before entering the passenger lounge. Tickets will stop being issued 30 minutes prior to departure. We suggest you be at the station at least 1.5 hours ahead of the stated departure time. Please leave at least 2.5 hours during public holidays.

4.If you’ve already collected your ticket before the departure day, we recommend that you be at the station at least 40 minutes ahead of time. Please be at the station at least 1.5 hours during a public holiday.

5.Please don't throw your ticket(s) away because you'll need it to exit the station.

6.If you cancel the ticket(s) at a train station yourself, the money will be refunded to our account. Please cancel the tickets before the train departure. And email us then we will refund you accordingly.

7.China Highlights train ticket booking policy

Should you have any questions about your train ticket bookings, please do not hesitate to contact me.

-

Best Regards!

Name?>, Travel Advisor

Tel: tel;?> Mobile: Mobile;?>

Fax: 86-773-2827424, 86-773-2885308

E-mail: ;;

WeChat: CH_train

www.chinahighlights.com

Address: Building 6, Chuangyi Business Park, 70 Qilidian Road, Guilin, Guangxi, 541004, China

If you wish to share anything with my supervisor (Ms. ethel), please feel free to send your email to ethel@chinahighlights.net.

+

3.Kindly note there is more than one station in most cities. On your departure day, please time your arrival at the station wisely. +If you are going to collect your train ticket(s) on the departure day, allow enough time to queue at the ticket collection counter, to pass through the security X-ray check for your luggage, and for the ticket check before entering the passenger lounge. +Tickets will stop being issued 30 minutes prior to departure. We suggest you arrive at the station at least 1.5 hours ahead of the stated departure time. Please leave at least 2.5 hours during public holidays.

4.If you’ve already collected your ticket(s) before the departure day, we recommend that you arrive at the station at least 40 minutes ahead of time. Please be at the station at least 1.5 hours prior to departure during a public holiday.

5.Please don't throw your ticket(s) away because you'll need it/them to exit the station.

6.If you cancel your ticket(s) at a train station yourself, the money will be refunded to our account. Please cancel the ticket(s) before the train departure and e-mail us. We will then refund you accordingly.

Read our China train travel FAQS.

Should you have any questions about your train ticket booking(s), please do not hesitate to contact me.

+

Best Regards!

Name?>, Travel Advisor

Tel: tel;?> Mobile: Mobile;?>

E-mail: ;;

www.chinahighlights.com

Address: Building 6, Chuangyi Business Park, 70 Qilidian Road, Guilin, Guangxi, 541004, China

If you wish to share anything with my supervisor (Ms. Ethel), please feel free to send an e-mail to ethel@chinahighlights.net.

diff --git a/application/third_party/tuniu/controllers/tuniu_flight.php b/application/third_party/tuniu/controllers/tuniu_flight.php new file mode 100644 index 00000000..ec494c73 --- /dev/null +++ b/application/third_party/tuniu/controllers/tuniu_flight.php @@ -0,0 +1,45 @@ +load->helper('tuniu'); + } + + public function index(){ + echo 'tuniu flight'; + } + + public function data_show(){ + $timestamp = time(); + $function = 'queryNew'; + $data = '{"channelId":7,"departureDate":"2019-07-10","dstCityCode":"PVG","orgCityCode":"PEK","vendorId":[4333]}'; + $sign = md5(TUNIU_FLIGHT_KEY.$data.$timestamp); + + $postJson = '{ + "purchaseId": '.TUNIU_FLIGHT_ID.', + "sign": "'.$sign .'", + "timestamp": '.$timestamp.', + "function": "'.$function.'", + "data":'.$data.' + }'; + + $returnJson = post_tuniu(TUNIU_FLIGHT_API,$postJson,'POST'); + + $returnData = json_decode($returnJson); + //print_r($returnData); + echo $returnJson; + } +} \ No newline at end of file diff --git a/application/third_party/tuniu/helpers/tuniu_helper.php b/application/third_party/tuniu/helpers/tuniu_helper.php index 55a44a9c..9ba358dd 100644 --- a/application/third_party/tuniu/helpers/tuniu_helper.php +++ b/application/third_party/tuniu/helpers/tuniu_helper.php @@ -30,6 +30,11 @@ } } + function get_microtime (){ + list($s1, $s2) = explode(' ', microtime()); + return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000); + } + //发送请求函数 function post_tuniu($url, $data = '', $method = 'GET') { $curl = curl_init(); // 启动一个CURL会话 diff --git a/webht/third_party/dingmail/controllers/index.php b/webht/third_party/dingmail/controllers/index.php index b35ccc31..b598b148 100644 --- a/webht/third_party/dingmail/controllers/index.php +++ b/webht/third_party/dingmail/controllers/index.php @@ -257,7 +257,7 @@ class Index extends CI_Controller { $mail->SMTPAuth = true; $mail->SMTPSecure = false; $mail->Username = 'admin@hainatravel.com'; - $mail->Password = "Hainatravel123";//Hainatravel1234 + $mail->Password = "Guilinhaina2019";//Hainatravel1234 $mail->SMTPSecure = 'ssl'; $mail->CharSet = "utf-8"; $mail->Encoding = "base64"; diff --git a/webht/third_party/partners/views/index/order_search.php b/webht/third_party/partners/views/index/order_search.php index 247ea229..73feff26 100644 --- a/webht/third_party/partners/views/index/order_search.php +++ b/webht/third_party/partners/views/index/order_search.php @@ -1,4 +1,4 @@ - $g) { ?> + $g) { ?>
@@ -16,7 +16,11 @@ 地接导游 来往邮件 SFI_FileName)){ ?> - 确认信 + + + + 确认信
diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php index 5dfecc4d..c63af7b9 100644 --- a/webht/third_party/vendorPlanSync/models/Group_model.php +++ b/webht/third_party/vendorPlanSync/models/Group_model.php @@ -26,7 +26,7 @@ class Group_model extends CI_Model { $sql .= $gri_sn!==0 ? $gri_sql : " AND isnull(VAS_IsReceive,0)=0 -- AND EOI_GetDate between '$start_date' AND '$end_date' - AND EOI_GetDate > CONVERT(date, GETDATE()) + AND EOI_GetDate >= CONVERT(date, GETDATE()) AND isnull(VAS_IsConfirm,0)=0 AND VAS_ConfirmSN IS NULL and not exists ( select 1 from VendorPlanSendout where VPS_VAS_SN=VAS_SN @@ -66,7 +66,7 @@ class Group_model extends CI_Model { $vgrd->pag_code_arr = array(); $vgrd->PAG_Title = $vgrd->GRD_Landscape; foreach ($all_aci as $kaci => $vaci) { - if ($vgrd->GRD_DayNo == $vaci->ACI_DayNo) { + if ($vgrd->GRD_DayNo == $vaci->ACI_DayNo && $vgrd->GRD_SNinOneDay == $vaci->ACI_SNInOneDay) { $vgrd->day_no_raw = strstr($vaci->ACI_OrderDate, " ", true); $vgrd->tocity = $vaci->tocity; $vgrd->citycode = $vaci->citycode;