ShuanghongS hai 1 ano
pai
achega
79205da8e1
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      utils/common.class.php

+ 4 - 4
utils/common.class.php

@@ -1309,13 +1309,13 @@ class common {
         $ContainerCount_Title = array();
         //先查询总的排放量sea air road,确定排名后,在分别查询对应的sea air road
         if ($type == "co2e_orgin"){
-            $co2e_shippr_sql = "select SUM(COALESCE(carbon_emission,0)::numeric(12,10)) as catnum ,
-                shippr_uncode as station from online_ocean  where 1=1 and COALESCE(shippr_uncode,'')<>'' $sqlWhere group by shippr_uncode order by catnum desc limit 10";
+            $co2e_shippr_sql = "select SUM(COALESCE(carbon_emission,0)) as catnum ,
+                shippr_uncode as station from online_ocean  where 1=1 and COALESCE(shippr_uncode,'')<>'' and carbon_emission is not null  $sqlWhere group by shippr_uncode order by catnum desc limit 10";
             $co2e_aLL = common::excuteListSql($co2e_shippr_sql);
         }
         if ($type == "co2e_destination"){
-            $co2e_consignee_sql = "select SUM(COALESCE(carbon_emission,0)::numeric(12,10)) as catnum,
-                consignee_uncode as station from online_ocean  where 1=1 and COALESCE(consignee_uncode,'')<>'' $sqlWhere group by consignee_uncode order by catnum desc limit 10";
+            $co2e_consignee_sql = "select SUM(COALESCE(carbon_emission,0)) as catnum ,
+                consignee_uncode as station from online_ocean  where 1=1 and COALESCE(consignee_uncode,'')<>'' and carbon_emission is not null $sqlWhere group by consignee_uncode order by catnum desc limit 10";
             $co2e_aLL = common::excuteListSql($co2e_consignee_sql);
         }
         //最大Y值