ShuanghongS 3 週間 前
コミット
eb903a1f6d
3 ファイル変更8 行追加5 行削除
  1. 4 3
      service/column.class.php
  2. 2 2
      service/report.class.php
  3. 2 0
      utils/common.class.php

+ 4 - 3
service/column.class.php

@@ -23,11 +23,12 @@ class column {
         $serial_no = common::check_input($_REQUEST['serial_no']);
         $defualt = common::check_input($_REQUEST['defualt']);
 
-        if($level == "Shipment level"){
+        if(strtolower($level) == strtolower("Shipment Level")){
+            //这个是kln_report_field level :"Shipment level" 不变
             $levelSQlWhere = "level = 'Shipment level'";
             $rightSqlwhere = " and shipment_level_default = true order by shipment_level_default_order";
             $leftSqlwhere = " and coalesce(shipment_level_default,false) = false";
-        }elseif($level == "Container Level"){
+        }elseif(strtolower($level) == strtolower("Container Level")){
             $levelSQlWhere = "level in ('Shipment level','Container Level')";
             $rightSqlwhere = " and ctnr_level_default = true order by ctnr_level_default_order";
             $leftSqlwhere = " and coalesce(ctnr_level_default,false) = false";
@@ -65,7 +66,7 @@ class column {
                 $groupSetting = common::excuteListSql("select ".$kln_report_field_config." from public.kln_report_field_config 
                     where template_serial_no = '$serial_no' and field_type = 'System' order by id");
                 $dataLeft = common::excuteListSql("select ".$kln_report_field_str."from public.kln_report_field 
-                    where level = '$level' and id != ALL(select field_ids from public.kln_report_template where serial_no = '$serial_no' and field_type = 'System') 
+                    where lower(level) = '".strtolower($level)."' and id != ALL(select field_ids from public.kln_report_template where serial_no = '$serial_no' and field_type = 'System') 
                         order by id");
         }
 

+ 2 - 2
service/report.class.php

@@ -244,7 +244,7 @@ class report {
                 }
             }
 
-            $report_sql_data = common::excuteObjectSql("select sql,count_sql from public.kln_report_sql_manage where level = '$level'");
+            $report_sql_data = common::excuteObjectSql("select sql,count_sql from public.kln_report_sql_manage where lower(level) = '".strtolower($level)."'");
             $sql = "";
             if (!empty($serial_no)){
                 $updateSqlSet = " report_sql = '".common::check_input($report_sql_data['sql'])."', 
@@ -527,7 +527,7 @@ class report {
             }
             
             $reportFiled = common::excuteObjectSql("select name,report_sql,count_sql,level from public.kln_report_template where serial_no = '".$serial_no."'");
-            $sqlManage = common::excuteObjectSql("select sql,count_sql,level from public.kln_report_sql_manage where level = '".$reportFiled['level']."'");
+            $sqlManage = common::excuteObjectSql("select sql,count_sql,level from public.kln_report_sql_manage where lower(level) = '".strtolower($reportFiled['level'])."'");
             $report_sql = $sqlManage["sql"];
             //$count_sql = $sqlManage["count_sql"];
 

+ 2 - 0
utils/common.class.php

@@ -4484,6 +4484,8 @@ class common {
             "oo.place_of_receipt_exp" => "place_of_receipt",
             "oo.port_of_loading" => "port_of_loading",
             "oo.port_of_discharge" => "port_of_discharge",
+            "oo.fport_of_loading_un" => "pol_locode",
+            "oo.mport_of_discharge_un" => "pod_locode",
             "oo.place_of_delivery_exp" => "place_of_delivery",
             "oo.port_of_transshipment_name" => "port_of_transhipment",
             "oo.carrier" => "carrier",