ShuanghongS 7 tháng trước cách đây
mục cha
commit
22fbcc226c
2 tập tin đã thay đổi với 9 bổ sung16 xóa
  1. 8 14
      main_new_version.php
  2. 1 2
      utils/common.class.php

+ 8 - 14
main_new_version.php

@@ -564,6 +564,9 @@ switch ($action) {
         exit();
         break;
     case 'main_welcome':
+        //分担查询
+        include ONLINE_ROOT . 'libs' . DS . 'map_config.ini.php';
+
         $cp = common::check_input($_POST ['cp']); //current_page
         $ps = common::check_input($_POST ['ps']); //ps
         if (empty($ps))
@@ -594,7 +597,8 @@ switch ($action) {
         $rc = $_POST ['rc'];
         if ($rc == - 1) {
             $sql = "SELECT count(1) from public.kln_ocean" . $sqlWhere;
-            $rc = common::excuteOneSql($sql);
+            //$rc = common::excuteOneSql($sql);
+            $rc =  $mapdb->GetOne($sql) or ( (!$mapdb->ErrorMsg()) or error_log(common::dbLog($mapdb, $sql), 0));
         }
         $tp = ceil($rc / $ps);
         if ($rc > 0) {
@@ -615,7 +619,8 @@ switch ($action) {
             //$sqlWhere  and last_status_315_update_time is not null";
             $sql .= " ORDER BY eta desc,id DESC limit " . $ps . " offset " . ($cp - 1) * $ps;
             //$sql .= " ORDER BY last_status_315_update_time DESC limit " . $ps . " offset " . ($cp - 1) * $ps;
-            $rss = common::excuteListSql($sql);
+            //$rss = common::excuteListSql($sql);
+            $rss =  $mapdb->GetAll($sql) or ( (!$mapdb->ErrorMsg()) or error_log(common::dbLog($mapdb, $sql), 0));
             //RecentStatusList
             $RecentStatusList = array();
             foreach ($rss as $key => $value) {
@@ -639,9 +644,7 @@ switch ($action) {
                 } elseif ($value['transport_mode'] == "air"){
                     //air milestone 的Departed实际描述要替换: IFFDEP =》 IFFONB 
                     $milestone_sql = "select a.act_date,a.act_time,sn.description,a.timezone,
-                            case when a.code = 'IFFONB' then 'IFFDEP'
-                                 else  a.code 
-                            end as dd_code
+                            a.code as dd_code
                         from  $_schemas_bk.air_milestone a 
                             inner join public.customer_service_milestone_sno sn on sn.code=a.code and sn.type = 'air'
                     where a.serial_no='$serial_no' 
@@ -695,15 +698,6 @@ switch ($action) {
                             $timezone = common::excuteOneSql($sql);
                         }
                     }
-    
-                    // 根据IFFDEL这个milestone来判断是否转变为completed
-                    // if($value['dd_code'] == "IFFAFD"){
-                    //     $timezone = $EDI315Time[$value['dd_code']]['timezone'];
-                    //     if(empty($timezone)){
-                    //         $sql = "select time_zone from public.city_timezone where uncode = '".$value['place_of_delivery_un']."'";
-                    //         $timezone = common::excuteOneSql($sql);
-                    //     }
-                    // }
                 }
                 
                 $Arrived = $value['description'];

+ 1 - 2
utils/common.class.php

@@ -1337,8 +1337,7 @@ class common {
                 '' as label, '' as infor, 3 as sort,
                 null::timestamp without time zone as stime,''::text as ptype 
             from vessel.vt_unlocode where (lat<=90 and lat>=-90) and (lon<=180 and 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);
         //如果值没有:客户地址-->站点地址-->Port地址(POL/POD) 
         if(utils::count($shippr_uncode_10) == 1 && empty($shippr_uncode_10[0]["shippr_uncode"])){