ShuanghongS пре 1 година
родитељ
комит
bd0e9f7970
3 измењених фајлова са 36 додато и 45 уклоњено
  1. 23 23
      main_new_version.php
  2. 7 16
      service/ocean_booking.class.php
  3. 6 6
      utils/common.class.php

+ 23 - 23
main_new_version.php

@@ -587,7 +587,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";
@@ -620,28 +620,28 @@ 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;
-        //查询线(包含所有的线)
-        $Line = $mapdb->GetAll("select * from get_track_data('$serial_no',true)");
-        $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);
+        // global $mapdb;
+        // //查询线(包含所有的线)
+        // $Line = $mapdb->GetAll("select * from get_track_data('$serial_no',true)");
+        // $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':

+ 7 - 16
service/ocean_booking.class.php

@@ -128,8 +128,6 @@ class ocean_booking {
         }
         $sqlWhere = ' where ' . common::searchExtendHandNew("booking", $_SESSION["ONLINE_USER"]);
         $sqlWhere .= search::getInstance()->getSearchSQL("Booking_Search");
-        //新版要排除type2情况,总数才会对的上
-        $sqlWhere .= " and (not(bol_type != 'BOOKING' and booking_no is not null and booking_no <> ''))";
 
         //移除掉全文检索 但保留代码
         // if (!empty($_POST["_textSearch"])) {
@@ -173,20 +171,16 @@ class ocean_booking {
                 $filterTag_param = "1=1";
             }
             if (stripos($filterTag, "Confirmed") !== FALSE) {
-                $_sqlwhere .= " or (bol_type = 'BOOKING' and status!='Cancelled')";
-                $filterTag_param .= " or (bol_type = 'BOOKING' and status!='Cancelled')";
-            }
-            if (stripos($filterTag, "type2") !== FALSE) {
-                $_sqlwhere .= " or (bol_type != 'BOOKING' and booking_no is not null and booking_no <> '')";
-                $filterTag_param .= " or (bol_type != 'BOOKING' and booking_no is not null and booking_no <> '')";
+                $_sqlwhere .= " or (bol_type != 'BOOKING')";
+                $filterTag_param .= " or (bol_type != 'BOOKING')";
             }
             if (stripos($filterTag, "Cancelled") !== FALSE) {
                 $_sqlwhere .= " or (status='Cancelled')";
                 $filterTag_param .= " or (status='Cancelled')";
             }
             if (stripos($filterTag, "Created") !== FALSE) {
-                $_sqlwhere .= " or (bol_type != 'BOOKING' and (booking_no is null or booking_no = ''))";
-                $filterTag_param .= " or (bol_type != 'BOOKING' and (booking_no is null or booking_no = ''))";
+                $_sqlwhere .= " or (bol_type = 'BOOKING' and status!='Cancelled')";
+                $filterTag_param .= " or (bol_type = 'BOOKING' and status!='Cancelled')";
             }
             if(strtolower($filterTag) <> "all" && !empty($filterTag)){
                 $sqlWhere .= " and ($_sqlwhere)";
@@ -202,8 +196,8 @@ class ocean_booking {
         if ($rc == - 1 || true) {
             $sql_all_status = "SELECT count(1) as rc,
                 sum(case when $filterTag_param then 1 else 0 end) as seach_rc,
-                sum(case when (1<>1 or (bol_type != 'BOOKING' and (booking_no is null or booking_no = ''))) then 1 else 0 end) as creatd,
-                sum(case when (1<>1 or (bol_type = 'BOOKING' and status!='Cancelled')) then 1 else 0 end) as confirmed,
+                sum(case when (1<>1 or (bol_type = 'BOOKING' and status!='Cancelled')) then 1 else 0 end) as creatd,
+                sum(case when (1<>1 or (bol_type != 'BOOKING')) then 1 else 0 end) as confirmed,
                 sum(case when (1<>1 or (status='Cancelled')) then 1 else 0 end) as concelled
             from public.online_booking" . $sqlWhere_befrom_filterTag;
 
@@ -274,12 +268,9 @@ class ocean_booking {
 
                 //按新逻辑处理status,现在是管理员权限,客户权限少了一种状态,先设置默认值防止出错
                 $status = "Created";
-                if(!($val['color'] == "FFFF0000" || $val['color'] == "FF00FF00" || $val['color'] == "FF0000FF")){
+                if ($val['color'] == "FF00FF00" || $val['color'] == "FF0000FF"){
                     $status = "Confirmed";
                 }
-                if ($val['color'] == "FF0000FF"){
-                    $status = "Created";
-                }
                 if ($val['color'] == "FFFF0000"){
                     $status = "Cancelled";
                 }

+ 6 - 6
utils/common.class.php

@@ -1652,12 +1652,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,