ShuanghongS 1 år sedan
förälder
incheckning
1a8b0f2b35
5 ändrade filer med 32 tillägg och 24 borttagningar
  1. 2 1
      .gitignore
  2. 8 4
      main_new_version.php
  3. 14 14
      service/login.class.php
  4. 2 2
      service/ocean_booking.class.php
  5. 6 3
      utils/common.class.php

+ 2 - 1
.gitignore

@@ -5,4 +5,5 @@
 nbproject/
 cache/
 .vscode/
-.svn/
+.svn/
+demo.txt

+ 8 - 4
main_new_version.php

@@ -202,7 +202,7 @@ switch ($action) {
             //如果页面查询的是ALL 这个20  40  45都查询出来。否则值查询都对应的size,其他的不查询
             if(strtolower($container_type_param) == "all"){
                 $list = common::excuteListSql("select * from public.online_order_status_date('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text) "
-                                . "r (c bigint, e integer, b integer, d text)");
+                                . "r (c bigint, e integer, b integer, d text)");   
             }else{
                 if($container_type_param == $_container_type){
                     $list = common::excuteListSql("select * from public.online_order_status_date('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text) "
@@ -276,6 +276,9 @@ switch ($action) {
         }
         $returnData = array("ContainerCount_Title"=>"Total: $total","ContainerCountList" =>$ContainerCount_Title,"ContainerCounSeries" =>$ContainerCounSeries_return,
             "min" => 0,"Max" =>$interval*5,"interval" =>$interval);
+        //demo    
+        // $json = '{"code":200,"data":{"ContainerCount_Title":"Total: 463518","ContainerCountList":["OCT,23","NOV,23","DEC,23","JAN,24","FEB,24","MAR,24","APR,24","MAY,24","JUN,24","JUL,24","AUG,24","SEP,24","OCT,24"],"ContainerCounSeries":[{"name":20,"type":"bar","emphasis":{"focus":"none"},"stack":"\u603b\u8ba1","data":[4400,8600,8804,9271,8961,8793,8534,9476,9530,10277,10081,8997,5784],"itemStyle":{"color":"#FF7500"}},{"name":40,"type":"bar","emphasis":{"focus":"none"},"stack":"\u603b\u8ba1","data":[13652,28021,30422,30136,26320,27035,23979,26494,28406,33318,32318,30962,16369],"itemStyle":{"color":"#FFAC66"}},{"name":45,"type":"bar","emphasis":{"focus":"none"},"stack":"\u603b\u8ba1","data":[189,337,415,437,439,321,250,320,324,603,328,415,200],"itemStyle":{"color":"#FFE3CC"}}],"min":0,"Max":45000,"interval":9000}}';    
+        // $returnData = json_decode($json,true);
         common::echo_json_encode(200, $returnData);
         exit();
         break;
@@ -421,6 +424,8 @@ switch ($action) {
             $ps = 10;
 
         $sqlWhere = ' where ' . common::searchExtendHandNew("ocean", $_SESSION["ONLINE_USER"]);
+        // test dome 
+        // $_POST['is_default'] = "no";
         //默认初始条件:ALL& ETD& Current Month 当前月的1号到最后一天
         if (isset($_POST['is_default']) && strtolower($_POST['is_default']) == "yes"){
             $sqlWhere .= "and etd>='" . date("Y-m") . "-01' and etd<='" . date("Y-m") . "-01'::date + interval '1 month'";
@@ -445,7 +450,7 @@ switch ($action) {
         }
         $tp = ceil($rc / $ps);
         if ($rc > 0) {
-            $sql = "SELECT serial_no,last_status_city, consignee, shipper, h_bol, 
+            $sql = "SELECT order_from as _schemas,serial_no,last_status_city, consignee, shipper, h_bol, 
                     to_char(etd, 'MM/DD/YYYY'::text) as etd, to_char(eta, 'MM/DD/YYYY'::text) AS eta, 
                     fport_of_loading_un, mport_of_discharge_un, place_of_receipt_un, place_of_delivery_un, ctnrs, count_cntr, last_status_ctnr,booking_no,
                     to_char(last_status_315_date, 'MM/DD/YYYY'::text) as last_status_315_date,last_status_315_code, last_status_loc, last_status_city, order_from,
@@ -472,8 +477,6 @@ switch ($action) {
             //RecentStatusList
             $RecentStatusList = array();
             foreach ($rss as $key => $value) {
-                //这个换成ocean_milestone,但是保留以前逻辑
-                //$Arrived = utils::outDisplayForMerge(common::getStatusDesc($value["last_status_315_code"]),common::_toString($value["last_status_loc"]),";");
                 $Arrived = $value['description'];
                 $RecentStatusList[] = array("Title"=>$value['h_bol'],
                     "name"=>$value['f_vessel']." / ".$value['f_voyage'],
@@ -488,6 +491,7 @@ switch ($action) {
                     "type"=>$value['status'],
                     "Arrived"=>$Arrived,
                     "Time"=>$value["act_date"],
+                    "_schemas"=>$value["_schemas"],
                     "a" =>common::deCode($value['serial_no'], 'E'));
             }
             $arrTmp = array('searchData' => $RecentStatusList, 

+ 14 - 14
service/login.class.php

@@ -527,7 +527,7 @@ class login {
                 'msg' => 'verifcation_error',
                 'data' => ''
             );
-            common::echo_json_encode(500, $data);
+            common::echo_json_encode(400, $data);
             exit();
         }
         $msg = "";
@@ -980,17 +980,17 @@ class login {
         $old_password = common::check_input($_POST['old_password']);
         $password = common::check_input($_POST['password']);
     
-        //首先校验验证码 展示注销掉
-        $verifcation_code = 
-        $verifcation_code = common::check_input($_POST['verifcation_code']);
-        if (strtolower($_SESSION['captcha']) != strtolower($verifcation_code)) {    
-            $data = array(
-                'msg' => 'verifcation_error',
-                'data' => ''
-            );
-            common::echo_json_encode(400, $data);
-            exit();
-        }
+        //首先校验验证码 暂时注销掉
+        // $verifcation_code = "";
+        // $verifcation_code = common::check_input($_POST['verifcation_code']);
+        // if (strtolower($_SESSION['captcha']) != strtolower($verifcation_code)) {    
+        //     $data = array(
+        //         'msg' => 'verifcation_error',
+        //         'data' => ''
+        //     );
+        //     common::echo_json_encode(400, $data);
+        //     exit();
+        // }
         
         $sql = "select ra_password as password from ra_online_user where lower(user_login) = '" . strtolower($loginName) . "'";
         $rs = common::excuteObjectSql($sql);
@@ -1007,7 +1007,7 @@ class login {
                 'msg' => $str,
                 'data' => ''
             );
-            common::echo_json_encode(400, $data);
+            common::echo_json_encode(500, $data);
             exit();
         }
 
@@ -1025,7 +1025,7 @@ class login {
                 'msg' => $msg,
                 'data' => ''
             );
-            common::echo_json_encode(400, $data);
+            common::echo_json_encode(500, $data);
             exit();
         }
     }

+ 2 - 2
service/ocean_booking.class.php

@@ -297,7 +297,7 @@ class ocean_booking {
 
     private function _booking_detail() {
         $serial_no = common::deCode($_GET['a'], 'D');
-        $status = common::deCode($_GET['status'], 'D');
+        $status = $_GET['status'];
         $_schemas = $_GET['_schemas'];
         if($_schemas == 'public'){
             $_schemas = "ocean";
@@ -483,7 +483,7 @@ class ocean_booking {
         $voyage = utils::outDisplayForMerge($ocean['f_voyage'],$ocean['m_voyage']);
         $basicInfo = array("bookingNo." =>$ocean['booking_no'],"HAWB/HBOL" => $ocean['h_bol'],"Carrier_Booking_No" =>$ocean['carrier_booking'],
             "PO_NO" =>$ocean['po_no'],"Vessel/Airline" =>$vessel,"Voyage/Filght" =>$voyage,
-            "Incoterm" =>$ocean['terms'],"Service_Type" =>$ocean['service']);
+            "Incoterm" =>$ocean['incoterms'],"Service_Type" =>$ocean['service']);
         $data["basicInfo"] = $basicInfo;    
 
         //处理 拼接地址 ocean表单exp 字段无法精准分割电话和地址信息,只能从contacts表里查询

+ 6 - 3
utils/common.class.php

@@ -121,8 +121,9 @@ class common {
             $httpAccept = $_SERVER['HTTP_ACCEPT']; // ajax request,is json or html
             $ajax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER
                             ['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'; // is ajax request?
-            //暂时这么写,放开action = main的查询               
-            if((stripos($action, "main") === 0)){
+            //暂时这么写,放开action = main的查询是为了在没有登录时获取信息。
+            //tools是为了避免查询的用户,没有配置tools权限,但是新版mark_save需要进入
+            if($action == "main" || $action == "tools"){
                 return;
             }
             if (!isset($_SESSION['ONLINE_USER'])) {
@@ -142,8 +143,9 @@ class common {
                             && !(stripos($action, "main") === 0) 
                             && !(stripos($action, "ajax") === 0)
                             && !(stripos($action, "opreation_log") === 0)) {
+                                
                             $data = array("msg"=>"Permission Denied");
-                            common::echo_json_encode(403, $data);
+                            common::echo_json_encode(500, $data);
                             exit();
                         }
                     }
@@ -1131,6 +1133,7 @@ class common {
                 $color = common::getItemStyle($type,$arr['name']);
                 $ETDList[] = array("value" =>intval($arr['value']),"name" =>$arr['name'],"itemStyle" =>array("color" =>$color));
             }
+            $ETDList = array_reverse($ETDList);
             $ETD_Title = "Total: $totalValue";
             $data = array("ETDList" =>$ETDList,"ETD_Radius"=>array('50%','80%'),"ETD_Title" =>$ETD_Title);
         }