Bladeren bron

10/17 commit

ShuanghongS 1 jaar geleden
bovenliggende
commit
55cd47e221
4 gewijzigde bestanden met toevoegingen van 18 en 12 verwijderingen
  1. 1 1
      main_new_version.php
  2. 1 2
      service/ocean_booking.class.php
  3. 15 8
      utils/common.class.php
  4. 1 1
      utils/utils.class.php

+ 1 - 1
main_new_version.php

@@ -401,7 +401,7 @@ switch ($action) {
         // $json = '[{"lng":"100.78594000","lat":"13.68521000","label":"Origin","infor":"LAT KRABANG, THAILAND","sort":"0","stime":null,"ptype":"por"},
         //           {"lng":"100.88333333","lat":"13.08333333","label":"Destination","infor":"LAEM CHABANG PORT,THAILAND","sort":"1","stime":null,"ptype":"pol"},
         //           {"lng":"-122.28640000","lat":"37.79784000","label":"Transfer","infor":"OAKLAND, CA, USA","sort":"2","stime":null,"ptype":"pod"}]';
-        $rss = json_decode($json,true);
+        //$rss = json_decode($json,true);
         common::echo_json_encode(200, $rss);
         exit();
         break;

+ 1 - 2
service/ocean_booking.class.php

@@ -231,7 +231,7 @@ class ocean_booking {
                 $sql = "SELECT order_from as _schemas, serial_no as __serial_no, created_time as __created_time, color,
                         m_voyage as __m_voyage,m_vessel as __m_vessel," .
                         column::getInstance()->getSearchSqlForDisplay('Booking_Search') . " from public.online_booking $ocean_dest_sql " . $sqlWhere . " "
-                        . "order by $order_by limit " . $ps . " offset " . ($cp - 1) * $ps;
+                        . "order by $order_by limit " . $ps . " offset " . ($cp - 1) * $ps;       
             } else {
                 $sql = "SELECT order_from as _schemas, serial_no as __serial_no, created_time as __created_time, color, 
                         f_voyage as __f_voyage, m_voyage as __m_voyage,f_vessel as __f_vessel, m_vessel as __m_vessel," .
@@ -395,7 +395,6 @@ class ocean_booking {
         $email['cc_email'] = $cc_email;
         $email['emailRecords'] = $emailRecords;
 
-
         global $_COPYRIGHT;
         $data = array('transportInfo' => $transportInfo, 
                         'basicInfo' => $basicInfo,

+ 15 - 8
utils/common.class.php

@@ -1182,7 +1182,6 @@ class common {
         $shipment_mode_arr = array("air","sea","road");
 
         $sqlWhere = ' and ' . common::searchExtendHandNew("ocean", $_SESSION["ONLINE_USER"]);
-        //$sqlWhere = common::check_input($sqlWhere);
         $sqlWhere = " " . $sqlWhere;
 
         $ContainerCount_Title = array();
@@ -1257,15 +1256,23 @@ class common {
 
     public static function getTopBar(){
         $sqlWhere = ' and ' . common::searchExtendHandNew("ocean", $_SESSION["ONLINE_USER"]);
-        //$sqlWhere = common::check_input($sqlWhere);
         $sqlWhere = " " . $sqlWhere;
 
         $shippr_uncode_10_sql = "select count(shippr_uncode) as num,shippr_uncode from online_ocean  where 1=1 $sqlWhere group by shippr_uncode order by num desc limit 10";
         $shippr_uncode_10 = common::excuteListSql($shippr_uncode_10_sql);
+        //如果值没有:客户地址-->站点地址-->Port地址(POL/POD) 
+        if(count($shippr_uncode_10) == 1 && empty($shippr_uncode_10[0]["shippr_uncode"])){
+            $shippr_uncode_10_sql = "select count(fport_of_loading_un) as num,fport_of_loading_un as shippr_uncode from online_ocean where 1=1 $sqlWhere group by fport_of_loading_un order by num desc limit 10";
+            $shippr_uncode_10 = common::excuteListSql($shippr_uncode_10_sql);
+        }
 
         $consignee_uncode_10_sql = "select count(consignee_uncode) as num,consignee_uncode from online_ocean  where 1=1 $sqlWhere group by consignee_uncode order by num desc limit 10";
         $consignee_uncode_10 = common::excuteListSql($consignee_uncode_10_sql);
-
+        //如果值没有:客户地址-->站点地址-->Port地址(POL/POD) 
+        if(count($consignee_uncode_10) == 1 && empty($consignee_uncode_10[0]["consignee_uncode"])){
+            $consignee_uncode_10_sql = "select count(mport_of_discharge_un) as num,mport_of_discharge_un as consignee_uncode from online_ocean where 1=1 $sqlWhere group by mport_of_discharge_un order by num desc limit 10";
+            $consignee_uncode_10 = common::excuteListSql($consignee_uncode_10_sql);
+        }
 
         $toporigin = array();
         $toporiginMap = array();
@@ -1281,7 +1288,7 @@ class common {
             // $json = '{"lng":"100.78594000","lat":"13.68521000","label":"'.$orgin['origin'].'","infor":"LAT KRABANG, THAILAND","sort":"0","stime":null,"ptype":"por"}';
             // $map = json_decode($json,true); 
 
-            $toporiginMap[] = array("qandl"=>array($map['lng']-$i*10,$map['lat']-$i*10),
+            $toporiginMap[] = array("qandl"=>array($map['lng'],$map['lat']),
                 "divIcon" => array("iconSize"=>0),
                 "name" =>$orgin['origin'],
                 "color" =>common::getItemStyle("top",$i),
@@ -1477,10 +1484,10 @@ class common {
     public static function getMilestonesInfo($ocean){
         //Milestones info  列名固定
         $Milestones_column = array();
-        $Milestones_column[] = array("title" =>"Milestones","field" =>"milestones","formatter" =>"","type" =>"normal");
-        $Milestones_column[] = array("title" =>"Date Time","field" =>"date_time","formatter" =>"","type" =>"dateTime");
-        $Milestones_column[] = array("title" =>"Locations","field" =>"locations","formatter" =>"","type" =>"normal");
-        $Milestones_column[] = array("title" =>"Remarks","field" =>"remarks","formatter" =>"","type" =>"normal");
+        $Milestones_column[] = array("title" =>"Milestones","field" =>"milestones","formatter" =>"normal","type" =>"normal");
+        $Milestones_column[] = array("title" =>"Date Time","field" =>"date_time","formatter" =>"dateTime","type" =>"normal");
+        $Milestones_column[] = array("title" =>"Locations","field" =>"locations","formatter" =>"normal","type" =>"normal");
+        $Milestones_column[] = array("title" =>"Remarks","field" =>"remarks","formatter" =>"normal","type" =>"normal");
 
         //Milestones 数据信息待定
         $Milestones_data = array();

+ 1 - 1
utils/utils.class.php

@@ -427,7 +427,7 @@ class utils {
         }
     }
 
-    public  static function _getSql($ids, $type,$shipment_mode) {
+    public static function _getSql($ids, $type,$shipment_mode) {
         $ids_arr = explode(',', $ids);
         $sql = "";
         if($type == "co2e_orgin"){