ShuanghongS 11 månader sedan
förälder
incheckning
a0f10fe811
4 ändrade filer med 43 tillägg och 45 borttagningar
  1. 31 35
      main_new_version.php
  2. 1 0
      service/ocean_booking.class.php
  3. 1 0
      service/ocean_order.class.php
  4. 10 10
      utils/common.class.php

+ 31 - 35
main_new_version.php

@@ -68,8 +68,8 @@ switch ($action) {
                 $sql = "select f_column, min(menu_id) as menu_id, max(menu_icon_font) as menu_icon_font from public.ra_online_permission where has_new_version=true and default_check = true group by f_column ORDER BY min(order_by)";
                 $rs = common::excuteListSql($sql);
             }
-            $menuSetting = array("Ocean Booking" => array("label"=>"Booking","path"=>"/booking"),
-                                "Ocean B/L Info." => array("label"=>"Tracking","path"=>"/tracking"));
+            $menuSetting = array("Ocean Booking" => array("label"=>"Booking","path"=>"/booking","icon"=>"icon_booking__fill_b"),
+                                "Ocean B/L Info." => array("label"=>"Tracking","path"=>"/tracking","icon"=>"icon_tracking__fill_b"));
             $menuList = array();
             $menuList[] = array("index"=>'1',"label"=>"Dashboard","icon"=>"icon_data_fill_b","path"=>"/dashboard");
             $index = 2;
@@ -88,7 +88,7 @@ switch ($action) {
                     foreach ($ll as $v) {
                         if($v['s_column'] =="Ocean Booking" || $v['s_column'] =="Ocean B/L Info."){
                             $urlData = $menuSetting[$v['s_column']];
-                            $menuList[] = array("index"=>$index,"label"=>$urlData['label'],"icon"=>"icon_booking__fill_b","path"=>$urlData['path']);
+                            $menuList[] = array("index"=>$index,"label"=>$urlData['label'],"icon"=>$urlData['icon'],"path"=>$urlData['path']);
                             $index = $index + 1;
                         }
                     }
@@ -640,7 +640,7 @@ switch ($action) {
         exit();
         break;
     case 'main_map_new':
-        //include ONLINE_ROOT . 'libs' . DS . 'map_config.ini.php';
+        include ONLINE_ROOT . 'libs' . DS . 'map_config.ini.php';
         //修改添加port_of_transshipment 和port_of_transshipment_name的坐标获取(有为空的可能)
         $serial_no = $_REQUEST["serial_no"];
         //$serial_no = "F41E6016-1A97-4C93-8198-53D8B3B26220";
@@ -657,13 +657,13 @@ switch ($action) {
                 )
                 , rr as (
                         select lon as lng, lat as lat, 'Origin' as label, port_of_loading as infor, 1 as sort, null::timestamp without time zone as stime, 'pol'::text as ptype 
-                            from vessel.vt_unlocode, aa where lon<>0 and lat<>0 and lon is not null and lat is not null and uncode=fport_of_loading_un
+                            from vessel.vt_unlocode, aa where (lat<=90 or lat>=-90) and (lon<=180 or lon>=-180) and lon is not null and lat is not null and uncode=fport_of_loading_un
                         union all
                         select lon as lng, lat as lat, 'Destination' as label, port_of_discharge as infor, 2 as sort, null::timestamp without time zone as stime, 'pod'::text as ptype 
-                            from vessel.vt_unlocode, aa where lon<>0 and lat<>0 and lon is not null and lat is not null and uncode=mport_of_discharge_un
+                            from vessel.vt_unlocode, aa where (lat<=90 or lat>=-90) and (lon<=180 or lon>=-180) and lon is not null and lat is not null and uncode=mport_of_discharge_un
                         union all
                         select lon as lng, lat as lat,  'Transfer' as label, port_of_transshipment_name as infor, 3 as sort, null::timestamp without time zone as stime, 'poe'::text as ptype 
-                            from vessel.vt_unlocode, aa where lon<>0 and lat<>0 and lon is not null and lat is not null and uncode=port_of_transshipment_un
+                            from vessel.vt_unlocode, aa where (lat<=90 or lat>=-90) and (lon<=180 or lon>=-180) and lon is not null and lat is not null and uncode=port_of_transshipment_un
                     )
             select * from rr order by sort, stime";
         $rss = common::excuteListSql($sql);
@@ -673,35 +673,31 @@ switch ($action) {
         //           {"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);
-        // global $mapdb;
-        // //查询线(包含所有的线)
-        // error_log("select * from get_track_data('$serial_no',true)");
-        // $map_sql = "select * from get_track_data('$serial_no',true)";
-        // $Line = $mapdb->GetAll($map_sql) or ( (!$mapdb->ErrorMsg()) or error_log(common::dbLog($mapdb, $map_sql), 0));
+        global $mapdb;
+        //查询线(包含所有的线)
+        error_log("select * from get_track_data('$serial_no',true)");
+        $map_sql = "select * from get_track_data('$serial_no',true)";
+        $Line = $mapdb->GetAll($map_sql) or ( (!$mapdb->ErrorMsg()) or error_log(common::dbLog($mapdb, $map_sql), 0));
 
-        // error_log("total:".count($Line));
-        // $solidLine = array();
-        // $dottedLine = array();
-        // $rangePoint = array();
-        // foreach($Line as $line){
-        //     if($line['tp'] == "1"){
-        //         $solidLine[] = $line;
-        //     }elseif($line['tp'] == "0"){
-        //         $dottedLine[] = $line;
-        //     }else{
-        //         $rangePoint[] = $line;
-        //     }
-        // }
-        // error_log("total_1:".count($solidLine));
-        // error_log("total_2:".count($dottedLine));
-        // error_log("total_3:".count($rangePoint));
-        // //如果没有虚线,这这个范围点也是异常的,不需要显示
-        // if(empty($dottedLine)){
-        //     $rangePoint = array();
-        // }
-        // $data = array("point"=>$rss,"solidLine"=>$solidLine,"dottedLine"=>$dottedLine,"rangePoint"=>$rangePoint);
-        // common::echo_json_encode(200, $data);
-        common::echo_json_encode(200, $rss);
+        $solidLine = array();
+        $dottedLine = array();
+        $rangePoint = array();
+        foreach($Line as $line){
+            if($line['tp'] == "1"){
+                $solidLine[] = $line;
+            }elseif($line['tp'] == "0"){
+                $dottedLine[] = $line;
+            }else{
+                $rangePoint[] = $line;
+            }
+        }
+        //如果没有虚线,这这个范围点也是异常的,不需要显示
+        if(empty($dottedLine)){
+            $rangePoint = array();
+        }
+        $data = array("point"=>$rss,"solidLine"=>$solidLine,"dottedLine"=>$dottedLine,"rangePoint"=>$rangePoint);
+        common::echo_json_encode(200, $data);
+        //common::echo_json_encode(200, $rss);
         exit();
         break;
     case 'main_welcome':

+ 1 - 0
service/ocean_booking.class.php

@@ -137,6 +137,7 @@ class ocean_booking {
         if (!empty($_POST["_textSearch"])) {
             $textSearch_arr = $_POST['_textSearch'];
             if(!is_array($textSearch_arr)){
+                $textSearch_arr = str_replace(",", ";", $textSearch_arr);
                 $textSearch_arr = array($textSearch_arr);
             }
             // $more_sql = "1<>1";

+ 1 - 0
service/ocean_order.class.php

@@ -395,6 +395,7 @@ class ocean_order {
         if (!empty($_POST["_textSearch"])) {
             $textSearch_arr = $_POST['_textSearch'];
             if(!is_array($textSearch_arr)){
+                $textSearch_arr = str_replace(",", ";", $textSearch_arr);
                 $textSearch_arr = array($textSearch_arr);
             }
             // $more_sql = "1<>1";

+ 10 - 10
utils/common.class.php

@@ -1411,7 +1411,7 @@ class common {
             left join LATERAL ( select lon as lng, lat as lat,
                 '' as label, '' as infor, 3 as sort,
                 null::timestamp without time zone as stime,''::text as ptype 
-            from vessel.vt_unlocode where lon<>0 and lat<>0 and lon is not null and lat is not null and uncode=aa.shippr_uncode ) dd on true";
+            from vessel.vt_unlocode where (lat<=90 or lat>=-90) and (lon<=180 or lon>=-180) and lon is not null and lat is not null and uncode=aa.shippr_uncode ) dd on true";
         //todo 这里预写个大概
         //common::getTopBarSQL($toporiginType,$_REQUEST["transportation"]);    
         $shippr_uncode_10 = common::excuteListSql($shippr_uncode_10_sql);
@@ -1424,7 +1424,7 @@ class common {
                         left join LATERAL ( select lon as lng, lat as lat,
                             '' as label, '' as infor, 3 as sort,
                             null::timestamp without time zone as stime,''::text as ptype 
-                        from vessel.vt_unlocode where lon<>0 and lat<>0 and lon is not null and lat is not null and uncode=aa.fport_of_loading_un ) dd on true";
+                        from vessel.vt_unlocode where (lat<=90 or lat>=-90) and (lon<=180 or lon>=-180) and lon is not null and lat is not null and uncode=aa.fport_of_loading_un ) dd on true";
             $shippr_uncode_10 = common::excuteListSql($shippr_uncode_10_sql);
         }
         //$toporiginType = "fport_of_loading_un";
@@ -1437,7 +1437,7 @@ class common {
         left join LATERAL ( select lon as lng, lat as lat,
             '' as label, '' as infor, 3 as sort,
             null::timestamp without time zone as stime,''::text as ptype 
-        from vessel.vt_unlocode where lon<>0 and lat<>0 and lon is not null and lat is not null and uncode=aa.consignee_uncode ) dd on true";
+        from vessel.vt_unlocode where (lat<=90 or lat>=-90) and (lon<=180 or lon>=-180) and lon is not null and lat is not null and uncode=aa.consignee_uncode ) dd on true";
 
         $consignee_uncode_10 = common::excuteListSql($consignee_uncode_10_sql);
         //如果值没有:客户地址-->站点地址-->Port地址(POL/POD) 
@@ -1448,7 +1448,7 @@ class common {
                 left join LATERAL ( select lon as lng, lat as lat,
                     '' as label, '' as infor, 3 as sort,
                     null::timestamp without time zone as stime,''::text as ptype 
-                from vessel.vt_unlocode where lon<>0 and lat<>0 and lon is not null and lat is not null and uncode=aa.mport_of_discharge_un ) dd on true";
+                from vessel.vt_unlocode where (lat<=90 or lat>=-90) and (lon<=180 or lon>=-180) and lon is not null and lat is not null and uncode=aa.mport_of_discharge_un ) dd on true";
             $consignee_uncode_10 = common::excuteListSql($consignee_uncode_10_sql);
         }
 
@@ -1666,12 +1666,12 @@ class common {
             "title"=>"Container Count",
             "switchValue"=>true,
             "text"=>"Pie chart showing figures of shipments which are soon to depart/arrive (Calculated from ETD/ETA).");
-        // if(_isRevenueDisplay()){    
-        //     $Management[] = array("id"=>5 ,
-        //         "title"=>"Revenue Spent",
-        //         "switchValue"=>true,
-        //         "text"=>"Revenue data for the past 12 months."); 
-        // }   
+        if(_isRevenueDisplay()){    
+            $Management[] = array("id"=>5 ,
+                "title"=>"Revenue Spent",
+                "switchValue"=>true,
+                "text"=>"Revenue data for the past 12 months."); 
+        }   
         $Management[] = array("id"=>6 ,
             "title"=>"Top 10 Origin/Destination",
             "switchValue"=>true,