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..509b0fd8 100644
--- a/application/third_party/train/models/BIZ_intel_train_model.php
+++ b/application/third_party/train/models/BIZ_intel_train_model.php
@@ -126,7 +126,7 @@ class BIZ_intel_train_model extends CI_Model {
}
public function ch_allstations(){
- $sql = "SELECT * FROM TrainStation_intel where station_id != 10";
+ $sql = "SELECT * FROM [syn123] .tourmanager. dbo.TrainStation_intel where station_id != 10";
$query = $this->HT->query($sql);
return $query->result();
}
@@ -146,31 +146,25 @@ 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 = "";
}
$sql = "SELECT
S_ename,s_country,tsi_Message
FROM
- TrainSearch_intel
+ [syn123] .tourmanager. dbo.TrainSearch_intel
LEFT JOIN
- TrainStation_intel
+ [syn123] .tourmanager. dbo.TrainStation_intel
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 8a0602f6..814309da 100644
--- a/application/third_party/trainsystem/controllers/addorders.php
+++ b/application/third_party/trainsystem/controllers/addorders.php
@@ -140,7 +140,7 @@ class addorders extends CI_Controller{
}else{
//单个订单提交
echo $cold_sn.'
';
- $this->booktickets($cold_sn,$bpe_sn,'','juhe');
+ $this->booktickets($cold_sn,$bpe_sn,'','ctrip');
//$string .= '