|
@@ -431,10 +431,10 @@ class utils {
|
|
|
$ids_arr = explode(',', $ids);
|
|
$ids_arr = explode(',', $ids);
|
|
|
$sql = "";
|
|
$sql = "";
|
|
|
if($type == "co2e_orgin"){
|
|
if($type == "co2e_orgin"){
|
|
|
- $str = "SUM(COALESCE(carbon_emission,0)::numeric(12,10)) as catnum , shippr_uncode as station ";
|
|
|
|
|
|
|
+ $str = "SUM(COALESCE(carbon_emission,0)::numeric(12,10)) as catnum ";
|
|
|
$filed = "shippr_uncode";
|
|
$filed = "shippr_uncode";
|
|
|
} else {
|
|
} else {
|
|
|
- $str = "SUM(COALESCE(carbon_emission,0)::numeric(12,10)) as catnum,consignee_uncode as station ";
|
|
|
|
|
|
|
+ $str = "SUM(COALESCE(carbon_emission,0)::numeric(12,10)) as catnum ";
|
|
|
$filed = "consignee_uncode";
|
|
$filed = "consignee_uncode";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -446,7 +446,7 @@ class utils {
|
|
|
foreach ($ids_arr as $value) {
|
|
foreach ($ids_arr as $value) {
|
|
|
if (!empty($value)) {
|
|
if (!empty($value)) {
|
|
|
if (empty($sql)) {
|
|
if (empty($sql)) {
|
|
|
- $sql .= "SELECT $str FROM from online_ocean where $shipment_mode_where and $filed = '$value'";
|
|
|
|
|
|
|
+ $sql .= "SELECT $str FROM online_ocean where $shipment_mode_where and $filed = '$value'";
|
|
|
} else {
|
|
} else {
|
|
|
$sql .= " union all SELECT $str from online_ocean where $shipment_mode_where and $filed = '$value'";
|
|
$sql .= " union all SELECT $str from online_ocean where $shipment_mode_where and $filed = '$value'";
|
|
|
}
|
|
}
|