Browse Source

recentstatus 顺序

ShuanghongS 1 year ago
parent
commit
ac78f910fc
2 changed files with 17 additions and 12 deletions
  1. 9 8
      main_new_version.php
  2. 8 4
      utils/common.class.php

+ 9 - 8
main_new_version.php

@@ -582,8 +582,10 @@ switch ($action) {
         exit();
         break;
     case 'main_map_new':
+        //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";
         $sql = "with ss as (select '$serial_no' as sn)
                 , aa as (
                     select place_of_receipt_un, place_of_delivery_un, fport_of_loading_un, mport_of_discharge_un, port_of_loading, port_of_discharge, place_of_delivery_exp, place_of_receipt_exp,dd.*
@@ -595,14 +597,6 @@ switch ($action) {
                         ) dd on true
                         where serial_no=(select sn from ss) limit 1
                 )
-                , v1 as (select public.get_vessel_position(sn::text) bbb from ss)
-                , t1 as (
-                    select tl.upload_time, tl.by_pickup, split_part(g.consignee_exp,'\n',1) as consignee_exp, split_part(g.pickup_from_exp,'\n',1) as pickup_from_exp,
-                            c.ctnr, split_part(g.deliveryto_exp,'\n',1) as deliveryto_exp,g.serial_no, tl.location, tl.type, tl.id, 
-                            to_char(tl.upload_time, 'MM/DD/YYYY HH24:MI:SS') as utime 
-                        from public.tk_general g, public.tk_commodity c 
-                            left join public.tk_location tl on c.serial_no=tl.serial_no 
-                        where g.serial_no=c.serial_no and g.bol=(select m_bol from public.ocean where serial_no=(select sn from ss)) order by tl.order_id)
                 , 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
@@ -615,11 +609,18 @@ switch ($action) {
                     )
             select * from rr order by sort, stime";
         $rss = common::excuteListSql($sql);
+        //$rss = $mapdb->GetAll($sql);
         //先固定死
         // $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);
+        //global $mapdb;
+        //查询实线
+        //$solidLine = $mapdb->GetAll("select * from get_track_data('$serial_no',true)");
+        //查询虚线
+        //$dottedLine = $mapdb->GetAll("select * from get_track_data('$serial_no',false)");
+        //$data = array("point"=>$rss,"solidLine"=>$solidLine,"dottedLine"=>$dottedLine);
         common::echo_json_encode(200, $rss);
         exit();
         break;

+ 8 - 4
utils/common.class.php

@@ -1551,10 +1551,6 @@ class common {
             "title"=>"Pending",
             "switchValue"=>true,
             "text"=>"Pie chart showing figures of shipments which are soon to depart/arrive (Calculated from ETD/ETA).");
-        $Management[] = array("id"=>3 ,
-            "title"=>"Recent Status",
-            "switchValue"=>true,
-            "text"=>"A shipment list with latest status update on top.");
         $Management[] = array("id"=>4 ,
             "title"=>"ETD to ETA (Days)",
             "switchValue"=>true,
@@ -1577,6 +1573,14 @@ class common {
             "title"=>"CO2e Emission by Destination (Top 10)",
             "switchValue"=>true,
             "text"=>"Figure of the CO2e Emission by destination."); 
+        $Management[] = array("id"=>9 ,
+            "title"=>"Recent Status",
+            "switchValue"=>true,
+            "text"=>"A shipment list with latest status update on top.");
+        // $Management[] = array("id"=>9 ,
+        //     "title"=>"Revenue Spent",
+        //     "switchValue"=>true,
+        //     "text"=>"Revenue Spent."); 
         return  $Management;   
     }