|
|
@@ -1080,7 +1080,7 @@ class ocean_order {
|
|
|
// FROM public.ocean_reference temp WHERE temp.serial_no = oo.serial_no) aa ON true ";
|
|
|
|
|
|
$sql = "with oo as (SELECT oe.*, order_from as _schemas,serial_no as __serial_no, serial_no,transport_mode,transport_mode_extend,
|
|
|
- h_bol as _hbol, isf_bol as _isfbol, consignee_city as _consignee_city,
|
|
|
+ h_bol as _hbol, isf_bol as _isfbol, consignee_city as _consignee_city,piece_count as _piece_count,
|
|
|
(select user_login from public.kln_user_subscribed us
|
|
|
where lower(us.user_login) = '".strtolower(_getLoginName())."' and us.subscribed_serial_no = kln_ocean.serial_no) as is_subscribe,
|
|
|
CASE
|
|
|
@@ -1095,7 +1095,8 @@ class ocean_order {
|
|
|
from public.kln_ocean
|
|
|
LEFT JOIN LATERAL ( SELECT loadterm,
|
|
|
manifest_type,
|
|
|
- volume
|
|
|
+ volume,
|
|
|
+ last_mile_delivery_date
|
|
|
FROM public.kln_ocean_extend oe WHERE oe.serial_no::text = kln_ocean.serial_no::text and oe.order_from::text = kln_ocean.order_from::text) oe ON true "
|
|
|
. $sqlWhere . " order by $order_by limit " . $ps . " offset " . ($cp - 1) * $ps.")
|
|
|
select oo.* ,
|
|
|
@@ -1120,7 +1121,7 @@ class ocean_order {
|
|
|
from oo";
|
|
|
|
|
|
$tmp_search_without_limit = "with oo as (SELECT oe.*, order_from as _schemas,serial_no as __serial_no, serial_no,transport_mode,transport_mode_extend,
|
|
|
- h_bol as _hbol, isf_bol as _isfbol, consignee_city as _consignee_city,
|
|
|
+ h_bol as _hbol, isf_bol as _isfbol, consignee_city as _consignee_city,piece_count as _piece_count,
|
|
|
(select user_login from public.kln_user_subscribed us
|
|
|
where lower(us.user_login) = '".strtolower(_getLoginName())."' and us.subscribed_serial_no = kln_ocean.serial_no) as is_subscribe,
|
|
|
CASE
|
|
|
@@ -1135,7 +1136,8 @@ class ocean_order {
|
|
|
from public.kln_ocean
|
|
|
LEFT JOIN LATERAL ( SELECT loadterm,
|
|
|
manifest_type,
|
|
|
- volume
|
|
|
+ volume,
|
|
|
+ last_mile_delivery_date
|
|
|
FROM public.kln_ocean_extend oe WHERE oe.serial_no::text = kln_ocean.serial_no::text and oe.order_from::text = kln_ocean.order_from::text) oe ON true "
|
|
|
. $sqlWhere . " order by $order_by)
|
|
|
select oo.* ,
|
|
|
@@ -1173,6 +1175,9 @@ class ocean_order {
|
|
|
($val['transport_mode_extend'] == 'road' ? "Road Freight": "")));
|
|
|
//status 改为ocean_milestone里的信息
|
|
|
$rs[$index]["Status"] = $rs[$index]["new_status"];
|
|
|
+ if($val['transport_mode'] == 'sea'){
|
|
|
+ $rs[$index]["Chargeable Weight"] = $rs[$index]["_piece_count"];
|
|
|
+ }
|
|
|
$rs[$index]["Shipment Type"] = $rs[$index]["Shipment Type"] == 'GPE' ? 'LCL' : $rs[$index]["Shipment Type"];
|
|
|
//订阅的参数
|
|
|
if(empty($rs[$index]["is_subscribe"])){
|
|
|
@@ -1373,8 +1378,8 @@ class ocean_order {
|
|
|
$cbm_tolal = sprintf("%.4f", $cbm_tolal);
|
|
|
//Containers信息
|
|
|
$containers = array("container_column"=>$ocean_container_column,"container_data" =>$rss);
|
|
|
- //Packing信息
|
|
|
- $packing = array("Quantity/Unit"=>$quantity_tolal,"G. Weight" => $g_weight_tolal." KGS","Ch. Weight" => $ch_weight_tolal." LBS","Volume" => $cbm_tolal." CBM");
|
|
|
+ //Packing信息 ocean G和 Ch Weight 改成一样
|
|
|
+ $packing = array("Quantity/Unit"=>$quantity_tolal,"G. Weight" => $g_weight_tolal." KGS","Ch. Weight" => $g_weight_tolal." LBS","Volume" => $cbm_tolal." CBM");
|
|
|
|
|
|
//Milestones info 列名固定
|
|
|
$Milestones = common::getMilestonesInfo($ocean,"sea",$_schemas,$vueData['EDI315TimeAndLocation']);
|