ShuanghongS před 3 měsíci
rodič
revize
502fa59126
2 změnil soubory, kde provedl 16 přidání a 16 odebrání
  1. 10 10
      main_new_version.php
  2. 6 6
      service/destination_delivery.class.php

+ 10 - 10
main_new_version.php

@@ -99,17 +99,17 @@ switch ($action) {
                         }
                         //特殊处理book,需要加二级菜
                         if($v['s_column'] =="Ocean Booking"){
-                            $urlData = $menuSetting[$v['s_column']];
-                            $menuList[] = array("index"=>"$index","label"=>$urlData['label'],"icon"=>$urlData['icon'],"path"=>$urlData['path']);
-                            // $bookingManagement = array("index"=>"$index","label"=>"Booking","icon"=>"icon_booking__fill_b","type"=>"list");
-                            // $children  = array(); 
+                            //$urlData = $menuSetting[$v['s_column']];
+                            //$menuList[] = array("index"=>"$index","label"=>$urlData['label'],"icon"=>$urlData['icon'],"path"=>$urlData['path']);
+                            $bookingManagement = array("index"=>"$index","label"=>"Booking","icon"=>"icon_booking__fill_b","type"=>"list");
+                            $children  = array(); 
 
-                            // $urlData = $menuSetting[$v['s_column']];
-                            // $children[] = array("index"=>$index.'-1',"label"=>$urlData['label'],"path"=>$urlData['path']);
-                            // $children[] = array("index"=>$index.'-2',"label"=>"Destination Delivery","path"=>"/destination-delivery");
-                            // $bookingManagement["children"] = $children;
-                            // $menuList[] = $bookingManagement;
-                            // $index = $index + 1;
+                            $urlData = $menuSetting[$v['s_column']];
+                            $children[] = array("index"=>$index.'-1',"label"=>$urlData['label'],"path"=>$urlData['path']);
+                            $children[] = array("index"=>$index.'-2',"label"=>"Destination Delivery","path"=>"/destination-delivery");
+                            $bookingManagement["children"] = $children;
+                            $menuList[] = $bookingManagement;
+                            $index = $index + 1;
                         }
                     }
                 }

+ 6 - 6
service/destination_delivery.class.php

@@ -833,9 +833,10 @@ class destination_delivery {
             $special_requirements = common::check_input($_POST['special_requirements']);
 
             //检查不能重复添加booking  这里空运没问题,但是会遇到相同hbol 不同的柜子情况,本质上来说就是一条
-            $sqlWhere = ' where ' . common::searchExtendHand_KLN("ocean", $_SESSION["ONLINE_USER"]);
+            //$sqlWhere = ' where ' . common::searchExtendHand_KLN("ocean", $_SESSION["ONLINE_USER"]);
             //兜底规则
-            $sqlWhere .= " and  eta >= now() - INTERVAL '6 months' and eta <= now() + INTERVAL '6 months'";
+            //$sqlWhere .= " and  eta >= now() - INTERVAL '6 months' and eta <= now() + INTERVAL '6 months'";
+            //and exists(select 1 from public.kln_ocean oo ". $sqlWhere."  and oo.serial_no = any(kde.h_serial_no) limit 1)
 
             $ckeckedSql = "with save_table as (
                     select regexp_split_to_table('".utils::implode(',',$h_serial_no)."', ',') as serial_no
@@ -847,8 +848,7 @@ class destination_delivery {
                     where status not in ('Cancel','Reject')
                         and exists(select 1 from save_table where save_table.serial_no = any(kde.h_serial_no))
                         and (exists(select 1 from save_table_ctnr where save_table_ctnr.ctnr = ANY(regexp_split_to_array(kde.ctnr, ',')) 
-                            or COALESCE(kde.ctnr,'') = ''))
-                        and exists(select 1 from public.kln_ocean oo ". $sqlWhere."  and oo.serial_no = any(kde.h_serial_no) limit 1)";
+                            or COALESCE(kde.ctnr,'') = ''))";
             //代表编辑
             if(!empty($serial_no)){
                 $ckeckedSql .=" and kde.serial_no <> '$serial_no'";
@@ -856,7 +856,7 @@ class destination_delivery {
             
             $checkeData = common::excuteObjectSql($ckeckedSql);
             if(!empty($checkeData['h_bol'])){
-                $data = array("msg" =>"The ".$checkeData['h_bol'] .",".$checkeData['ctnr'] ." already exists");
+                $data = array("msg" =>"The HBOL NO: ".$checkeData['h_bol'] .", Destination Delivery cannot be created repeatedly.");
                 common::echo_json_encode(200,$data); 
                 exit();
             }
@@ -1459,7 +1459,7 @@ class destination_delivery {
                     LIMIT 1
                 ) r ON true
             order by md.eta desc";
-         
+
         $rs = common::excuteListSql($sql);
         error_log($sql);
         if(empty($rs)){