Browse Source

ADD search log

ShuanghongS 1 năm trước cách đây
mục cha
commit
806e327457
3 tập tin đã thay đổi với 15 bổ sung11 xóa
  1. 3 3
      main_new_version.php
  2. 5 4
      service/ocean_booking.class.php
  3. 7 4
      service/ocean_order.class.php

+ 3 - 3
main_new_version.php

@@ -20,9 +20,9 @@ include 'service/login.class.php';
 include 'service/tools.class.php';
 
 //为了调用,临时做一个登录动作
-$_POST['uname'] = "ra.admin";
-$_POST['psw'] = "abc123456789";
-//login::getInstance()->do_login_auto();
+// $_POST['uname'] = "ra.admin";
+// $_POST['psw'] = "abc123456789";
+// login::getInstance()->do_login_auto();
 //验证路由权限
 common::securityCheckHandNew($action);
 if (_is_only_vgm()) {

+ 5 - 4
service/ocean_booking.class.php

@@ -157,7 +157,6 @@ class ocean_booking {
         // if (!empty($_POST["_textSearch"])) {
         //     $sqlWhere .= " and text_search @@ (str_to_tsquery('" . common::check_input($_POST["_textSearch"]) . "'))";
         // }
-
         //处理reference类型的组合查询  Search booking No./HBL No./PO No./Carrier Booking No.
         if (!empty($_POST["_textSearch"])) {
             $textSearch_arr = $_POST['_textSearch'];
@@ -182,22 +181,25 @@ class ocean_booking {
             //查询ALL
             $sql = "SELECT count(1) from public.online_booking" . $sqlWhere;
             $rc = common::excuteOneSql($sql);
-            error_log("online_booking_count:".$sql);
+            error_log("online_booking_count_ALL_SQL: ".$sql);
             
             //查询Creatd
             $Creatd_sqlWhere = " and (1<>1 or (bol_type != 'BOOKING' and (booking_no is null or booking_no = '')))";
             $Creatd_sql = "SELECT count(1) from public.online_booking" . $sqlWhere.$Creatd_sqlWhere;
             $Creatd = common::excuteOneSql($Creatd_sql);
+            error_log("online_booking_count_Creatd_SQL: ".$sql);
 
             //查询Confirmed
             $Confirmed_sqlWhere = " and (1<>1 or (bol_type = 'BOOKING' and status!='Cancelled'))";
             $Confirmed_sql = "SELECT count(1) from public.online_booking" . $sqlWhere.$Confirmed_sqlWhere;
             $Confirmed = common::excuteOneSql($Confirmed_sql);
+            error_log("online_booking_count_Confirmed_SQL: ".$sql);
 
             //查询Concelled
             $Concelled_sqlWhere = " and (1<>1 or (status='Cancelled'))";
             $Concelled_sql = "SELECT count(1) from public.online_booking" . $sqlWhere.$Concelled_sqlWhere;
             $Concelled = common::excuteOneSql($Concelled_sql);
+            error_log("online_booking_count_Concelled_SQL: ".$sql);
 
             //前端数据返回,不管有无数据
             if (!empty($_POST["filterTag"])) {
@@ -219,7 +221,6 @@ class ocean_booking {
             //现在下载交给前端,后台预先只返回全部字段的列,
             $allColumn = column::getInstance()->getDisplayColumnAllReomveDefault('Booking_Search');
             $allBookingColumns = column::getInstance()->tableColumns('Booking_Search',$allColumn);
-            
         }
         $tp = ceil($rc / $ps);
         if ($rc > 0 ) {
@@ -238,7 +239,7 @@ class ocean_booking {
                         column::getInstance()->getSearchSqlForDisplay('Booking_Search') . " from public.online_booking $ocean_dest_sql " . $sqlWhere . " order by $order_by limit " . $ps . " offset " . ($cp - 1) * $ps;
             }
             $rs = common::excuteListSql($sql);
-            error_log("online_booking_search:".$sql);
+            error_log("online_booking_search_SQL: ".$sql);
 
             //对查询的结果做特殊处理,比如要拼接某个值,合并值等
             foreach($rs as $index => $val) {

+ 7 - 4
service/ocean_order.class.php

@@ -404,7 +404,6 @@ class ocean_order {
         // if (!empty($_POST["_textSearch"])) {
         //     $sqlWhere .= " and text_search @@ (str_to_tsquery('" . common::check_input($_POST["_textSearch"]) . "'))";
         // }
-
         //处理reference类型的组合查询  Search booking No./HBL No./PO No./Carrier Booking No.
         if (!empty($_POST["_textSearch"])) {
             $textSearch_arr = $_POST['_textSearch'];
@@ -440,29 +439,33 @@ class ocean_order {
 						select regexp_split_to_table('Booking Confirmation,Cargo Pickup,Cargo Arrived at Origin,Departure,Arrived at Final Destination Port,Arrived at Final Destination', ','))
 				 order by id desc limit 1) dd on true" . $sqlWhere;
             $rc = common::excuteOneSql($sql);
-            error_log("online_ocean_count:".$sql);
+            error_log("online_ocean_count_ALL_SQL:".$sql);
 
             //Booked
             $sql = $this->getOcanOrderSearchSql("Booked",$sqlWhere);
             $Booked = common::excuteOneSql($sql);
+            error_log("online_ocean_count_Booked_SQL: ".$sql);
 
             //Cargo Received
             $sql = $this->getOcanOrderSearchSql("Cargo Received",$sqlWhere);
             $Cargo_Received = common::excuteOneSql($sql);
+            error_log("online_ocean_count_Cargo_Received_SQL: ".$sql);
 
             //Departed
             $sql = $this->getOcanOrderSearchSql("Departed",$sqlWhere);
             $Departed = common::excuteOneSql($sql);
+            error_log("online_ocean_count_Departed_SQL: ".$sql);
 
             //Arrived
             $sql = $this->getOcanOrderSearchSql("Arrived",$sqlWhere);
             $Arrived = common::excuteOneSql($sql);
+            error_log("online_ocean_count_Arrived_SQL: ".$sql);
 
             //Completed
             $sql = $this->getOcanOrderSearchSql("Completed",$sqlWhere);
             $Completed = common::excuteOneSql($sql);
+            error_log("online_ocean_count_Completed_SQL: ".$sql);
             
-
             if (!empty($_POST["filterTag"])) {
                 $tagsList = array(array("name"=>"All","number"=>$rc,"type"=>"all","checked"=>utils::in_array('All', $_POST["filterTag"])? true : false),
                 array("name"=>"Booked","number"=>$Booked,"type"=>"booked","checked"=>utils::in_array('Booked', $_POST["filterTag"])? true : false),
@@ -518,7 +521,7 @@ class ocean_order {
                     column::getInstance()->getSearchSqlForDisplay('Ocean_Search') . " from public.online_ocean $ocean_ref_sql $ocean_status_sql" . $sqlWhere . 
                 " order by $order_by limit " . $ps . " offset " . ($cp - 1) * $ps;
             $rs = common::excuteListSql($sql);
-            error_log("online_ocean_search:".$sql);
+            error_log("online_ocean_search_SQL: ".$sql);
             
             //对查询的结果做特殊处理,比如要拼接某个值,合并值等
             foreach($rs as $index => $val) {