ShuanghongS 1 рік тому
батько
коміт
8c44ef42be

+ 1 - 1
main_new_version.php

@@ -460,7 +460,7 @@ switch ($action) {
                     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,
                     f_vessel,f_voyage,
                     CASE
-	    	            WHEN (m_iffbcf is not null and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Created'::text
+	    	            WHEN ((m_iffbcf is not null or m_iffbcf is null) and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Created'::text
                         WHEN ((m_iffcpu is not null or m_iffrec is not null) and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Cargo Received'::text
                         WHEN (m_iffdep is not null and m_iffarr is null and m_iffafd is null) THEN 'Departed'::text
                         WHEN (m_iffarr is not null and m_iffafd is null) THEN 'Arrived'::text

+ 2 - 2
service/login.class.php

@@ -1167,7 +1167,7 @@ class login {
                     consignee_uncode,consignee_city,
                     fport_of_loading_un,mport_of_discharge_un,
                     CASE
-                        WHEN (m_iffbcf is not null and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Created'::text
+                        WHEN ((m_iffbcf is not null or m_iffbcf is null) and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Created'::text
                         WHEN ((m_iffcpu is not null or m_iffrec is not null) and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Cargo Received'::text
                         WHEN (m_iffdep is not null and m_iffarr is null and m_iffafd is null) THEN 'Departed'::text
                         WHEN (m_iffarr is not null and m_iffafd is null) THEN 'Arrived'::text
@@ -1322,7 +1322,7 @@ class login {
                     consignee_uncode,consignee_city,
                     fport_of_loading_un,mport_of_discharge_un,
                     CASE
-                        WHEN (m_iffbcf is not null and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Created'::text
+                        WHEN ((m_iffbcf is not null or m_iffbcf is null) and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Created'::text
                         WHEN ((m_iffcpu is not null or m_iffrec is not null) and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Cargo Received'::text
                         WHEN (m_iffdep is not null and m_iffarr is null and m_iffafd is null) THEN 'Departed'::text
                         WHEN (m_iffarr is not null and m_iffafd is null) THEN 'Arrived'::text

+ 6 - 6
service/ocean_order.class.php

@@ -449,7 +449,7 @@ class ocean_order {
         if ($rc == - 1 || true) {
             $sql = "select count(1) as rc,
                 sum(case when $filterTag_param then 1 else 0 end) as seach_rc, 
-                sum(case when (m_iffbcf is not null and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null)
+                sum(case when ((m_iffbcf is not null or m_iffbcf is null) and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null)
                      then 1 else 0 end) 
                 as created, 
                 sum(case when ((m_iffcpu is not null or m_iffrec is not null) and m_iffdep is null and m_iffarr is null and m_iffafd is null)
@@ -533,7 +533,7 @@ class ocean_order {
             $sql = "SELECT order_from as _schemas,serial_no as __serial_no, serial_no,
                     h_bol as _hbol, isf_bol as _isfbol, consignee_city as _consignee_city,
                     CASE
-	    	            WHEN (m_iffbcf is not null and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Created'::text
+	    	            WHEN ((m_iffbcf is not null or m_iffbcf is null) and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Created'::text
                         WHEN ((m_iffcpu is not null or m_iffrec is not null) and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Cargo Received'::text
                         WHEN (m_iffdep is not null and m_iffarr is null and m_iffafd is null) THEN 'Departed'::text
                         WHEN (m_iffarr is not null and m_iffafd is null) THEN 'Arrived'::text
@@ -1148,15 +1148,15 @@ class ocean_order {
             $_schemas = "ocean";
         }
         $sql = "SELECT m_eta as _m_eta,  h_bol as _h_bol, m_bol as _m_bol,job_no as _job_bol,
-                o.* ,sh.*, cn.* ,aa.*,dd.*,oo.*
+                o.* ,sh.*, cn.* ,aa.*,dd.*,oo.*,
+                (select uncode from ports where  code = o.port_of_transshipment) as port_of_transshipment_un
             from ocean o 
             LEFT JOIN LATERAL ( SELECT tracking_no as _tracking_no,shippr_uncode,shipper_city,
                     consignee_uncode,consignee_city,incoterms,
                     fport_of_loading_un,mport_of_discharge_un,
-                    place_of_receipt_un,place_of_delivery_un,
-                    port_of_transshipment_un,
+                    place_of_receipt_un,place_of_delivery_un
                     CASE
-                        WHEN (m_iffbcf is not null and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Created'::text
+                        WHEN ((m_iffbcf is not null or m_iffbcf is null) and m_iffcpu is null and m_iffrec is null and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Created'::text
                         WHEN ((m_iffcpu is not null or m_iffrec is not null) and m_iffdep is null and m_iffarr is null and m_iffafd is null) THEN 'Cargo Received'::text
                         WHEN (m_iffdep is not null and m_iffarr is null and m_iffafd is null) THEN 'Departed'::text
                         WHEN (m_iffarr is not null and m_iffafd is null) THEN 'Arrived'::text

+ 2 - 1
utils/common.class.php

@@ -947,7 +947,8 @@ class common {
         $resData = array();
         $resData["code"] = $code;
         $resData["data"] =$data;
-        echo utils::jsonFiltration("null", "\"\"", json_encode($resData));
+        //echo utils::jsonFiltration("null", "\"\"", json_encode($resData));
+        echo json_encode($resData);
     }
 
     /*