ShuanghongS 4 weken geleden
bovenliggende
commit
5b72005a72
2 gewijzigde bestanden met toevoegingen van 10 en 9 verwijderingen
  1. 9 9
      service/ocean_order.class.php
  2. 1 0
      utils/common.class.php

+ 9 - 9
service/ocean_order.class.php

@@ -2360,15 +2360,8 @@ class ocean_order {
 
         //delivery
         $order_from = $_REQUEST['_schemas'];
-        $deliverySql = "with aa as (SELECT o.serial_no, o.master_base_number from  $order_from.ocean o WHERE o.serial_no='".$ocean["serial_no"]."'),
-                            bb as (select o.serial_no from $order_from.ocean o
-                                    where exists(select 1 from aa where aa.master_base_number= o.master_base_number) 
-                                        and o.bol_type = 'CONSOL' and o.status::text <> 'Cancelled'::text),
-                            cc as (select serial_no from aa 
-                                    union all 
-                                    select serial_no from bb 
-                                ),              
-                            h as (select * from station_data.do_header h where h.serial_no in (select serial_no from cc))
+        $deliverySql = "with aa as (SELECT o.serial_no, o.master_base_number from  $order_from.ocean o WHERE o.serial_no='".$ocean["serial_no"]."'),             
+                            h as (select * from station_data.do_header h where h.serial_no in (select serial_no from aa))
                     
                     select h.est_delivery_date,h.est_delivery_time,
                         h.consignee_country_code,h.consignee_city_code,
@@ -2377,6 +2370,9 @@ class ocean_order {
                     from h left join station_data.do_detail d on h.id = d.do_header_id and h.from_station = d.from_station 
                         where h.from_station = '".$ocean["destination_station"]."'
                             order by h.est_delivery_date";
+        // bb as (select o.serial_no from $order_from.ocean o
+        //                             where exists(select 1 from aa where aa.master_base_number= o.master_base_number) 
+        //                                 and o.bol_type = 'CONSOL' and o.status::text <> 'Cancelled'::text),                    
         // $deliverySql = "with aa as (SELECT o.serial_no, o.master_base_number from  $order_from.ocean o WHERE o.serial_no='".$ocean["serial_no"]."'),
         //                     bb as (select o.serial_no from $order_from.ocean o
         //                             where exists(select 1 from aa where aa.master_base_number= o.master_base_number) 
@@ -2413,9 +2409,12 @@ class ocean_order {
 
                 foreach($EDIDate['containerStatusData'] as $cskey => $csval){
                     if($csval['ctnr_label'] == $_delivery['ctnr']){
+                        $_uncity = common::excuteObjectSql("select uncity from $order_from.ports where active = true and uncode = '".strtoupper($location_code)."' limit 1");
                         $contentTemp = array("title" =>"Last Mile Delivery",
+                                "code"=>"UN-".$location_code,
                                 "date"=>$est_delivery_date,
                                 "country"=>$location_code,
+                                "uncity"=>$_uncity['uncity'],
                                 "timezone"=>$_delivery['timezone']);
                         $originalArray = $EDIDate['containerStatusData'][$cskey]['content'];
                         //$this->insertInDescendingOrder($originalArray, $contentTemp);
@@ -2804,6 +2803,7 @@ class ocean_order {
                 'url_param'  => $file['url_param'],
                 'detail'     => $file['detail'],
                 "file_name"  => $file['file_name'],
+                "standard"  => $file['standard'],
                 'h_bol'      => $h_bol,
                 'label'      => $formatName,
                 'is_topocean'=> $file['is_topocean']

+ 1 - 0
utils/common.class.php

@@ -973,6 +973,7 @@ class common {
         header("Pragma: can-cache");
         header("Accept-ranges:bytes");
         header("Accept-length:" . filesize($filename));
+        header('Access-Control-Expose-Headers: Content-Disposition');
         header("Content-Disposition:attachment;filename=\"" . $display_name . "\"");
         //echo fread($file, filesize($filename));
         //fclose($file);