ShuanghongS 1 месяц назад
Родитель
Сommit
6154638f9a
3 измененных файлов с 16 добавлено и 5 удалено
  1. 1 1
      service/destination_delivery.class.php
  2. 13 2
      service/login.class.php
  3. 2 2
      service/ocean_order.class.php

+ 1 - 1
service/destination_delivery.class.php

@@ -91,7 +91,7 @@ class destination_delivery {
                         and e.active = true
                         ".$sqlwhere."
                         and coalesce(e.email,'') <>''
-                        and e.email ilike '" . common::check_input($term) . "%' limit 50";
+                        and e.email ilike '" . common::check_input($term) . "%' order by e.email  limit 50";
 
             $rs = common::excuteListSql($sql);
             $retData = array();

+ 13 - 2
service/login.class.php

@@ -1230,7 +1230,7 @@ class login {
             $reference_number_lower = strtolower($reference_number);
             $checked = common::checkInputInval($reference_number_lower);
             if ($checked){
-                $online_ocean_sql = "select serial_no,order_from from public.kln_ocean 
+                $online_ocean_sql = "select serial_no,order_from,agent,from_station from public.kln_ocean 
                     where ((ARRAY['$reference_number_lower'] && array_append(ARRAY[lower(booking_no::text), lower(h_bol::text), lower(m_bol), lower(carrier_booking), lower(quote_no), lower(tracking_no)]||string_to_array(lower(ctnrs),','), ''::text))
                         or lower(po_no) like '%$reference_number_lower%'
                         or lower(invoice_no) like '%$reference_number_lower%') and coalesce(schem_not_display, false)=false";
@@ -1238,7 +1238,18 @@ class login {
                 if(empty($online_ocean_arr)){
                     $data = array("msg" =>"No matches");
                 }elseif(!empty($online_ocean_arr) && utils::count($online_ocean_arr) > 1){
-                    $data = array("msg" =>"Multiple results");
+                    //當同一個hawb有超過一條數據時,選擇destination office和from station(job的創建站點)一致的shipment進行展示
+                    $is_job_flag = true;
+                    foreach($online_ocean_arr as $arr){
+                        if ($arr['agent'] == $arr['from_station']){
+                            $data =  $this->getTrackingInfo($arr["serial_no"],$arr["order_from"]);
+                            $is_job_flag = false;
+                            break;  
+                        }
+                    }
+                    if ($is_job_flag) {
+                        $data = array("msg" =>"Multiple results");
+                    }
                 }else{
                     $data =  $this->getTrackingInfo($online_ocean_arr[0]["serial_no"],$online_ocean_arr[0]["order_from"]);  
                 }

Разница между файлами не показана из-за своего большого размера
+ 2 - 2
service/ocean_order.class.php


Некоторые файлы не были показаны из-за большого количества измененных файлов