ShuanghongS 2 недель назад
Родитель
Сommit
4ef0d93ff0
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      service/destination_delivery.class.php

+ 2 - 2
service/destination_delivery.class.php

@@ -703,7 +703,7 @@ class destination_delivery {
                         sum(case when kd.status ='Cancel' then 1 else 0 end) as cancelled_rc
                     from public.kln_destination_delivery kd
                         where ".$sqlDeliveryWhere." 
-                            and exists(select 1 from public.kln_ocean oo ". $sqlWhere."  and oo.serial_no = any(kd.h_serial_no) limit 1)";
+                            and exists(select 1 from public.kln_ocean ". $sqlWhere."  and kln_ocean.serial_no = any(kd.h_serial_no) limit 1)";
                 error_log("kln_destination_delivery_count:".$sql);        
                 $statusRc = common::excuteObjectSql($sql);
                 $rc = $statusRc['rc'];
@@ -721,7 +721,7 @@ class destination_delivery {
                          from public.kln_destination_delivery kd
                     where ".$tag_and_mode_param." 
                         and ".$sqlDeliveryWhere."
-                        and exists(select 1 from public.kln_ocean oo ". $sqlWhere."  and oo.serial_no = any(h_serial_no) limit 1)";
+                        and exists(select 1 from public.kln_ocean  ". $sqlWhere."  and kln_ocean.serial_no = any(h_serial_no) limit 1)";
                 $sql .= " order by id desc limit " . $ps . " offset " . ($cp - 1) * $ps;
 
                 error_log("kln_destination_delivery_search:".$sql);