ShuanghongS 1 rok pred
rodič
commit
4b3a78c6e2
1 zmenil súbory, kde vykonal 10 pridanie a 10 odobranie
  1. 10 10
      utils/common.class.php

+ 10 - 10
utils/common.class.php

@@ -1312,13 +1312,13 @@ class common {
                     "textcolor" =>"#FFF");
             }
             //查询uncode,对应的city
+            $city = array();
+            $city['city'] = "";
             if($toporiginType == "shippr_uncode"){
-                $public_ports_sql = "select uncity as city from public.ports where uncode = '".$orgin['shippr_uncode']."' order by id limit 1";
+                $public_ports_sql = "select shipper_city as city from online_ocean 
+                    where 1=1 $sqlWhere and  shippr_uncode = '".$orgin['shippr_uncode']."'
+                    order by id limit 1";
                 $city = common::excuteObjectSql($public_ports_sql);
-                if(empty($city)){
-                    $sfs_ports_sql = "select uncity as city from sfs.ports where uncode = '".$orgin['shippr_uncode']."' order by id limit 1";
-                    $city = common::excuteObjectSql($sfs_ports_sql);
-                }
             }
             //$city 做假数据
             //$city['city'] = "CATARINA, TX".$i;
@@ -1349,13 +1349,13 @@ class common {
             }
 
             //查询uncode,对应的city
+            $city = array();
+            $city['city'] = "";
             if($topdestinationinType == "consignee_uncode"){
-                $public_ports_sql = "select uncity as city from public.ports where uncode = '".$agent['consignee_uncode']."' order by id limit 1";
+                $public_ports_sql = "select consignee_city as city from online_ocean  
+                    where 1=1 $sqlWhere and consignee_uncode = '".$agent['consignee_uncode']."' 
+                    order by id limit 1";
                 $city = common::excuteObjectSql($public_ports_sql);
-                if(empty($city)){
-                    $sfs_ports_sql = "select uncity as city from sfs.ports where uncode = '".$agent['consignee_uncode']."' order by id limit 1";
-                    $city = common::excuteObjectSql($sfs_ports_sql);
-                }
             }
             //$city 做假数据
             //$city['city'] = "CATARINA, TX".$i;