|
@@ -36,7 +36,6 @@ class ocean_order {
|
|
|
*/
|
|
*/
|
|
|
if (empty($operate)) {
|
|
if (empty($operate)) {
|
|
|
//search
|
|
//search
|
|
|
- //$search = search::getInstance()->getDisplaySearch("Ocean_Search
|
|
|
|
|
//栏位信息
|
|
//栏位信息
|
|
|
$column = column::getInstance()->getDisplayColumn('Ocean_Search');
|
|
$column = column::getInstance()->getDisplayColumn('Ocean_Search');
|
|
|
$BookingTableColumns = column::getInstance()->tableColumns('Ocean_Search',$column);
|
|
$BookingTableColumns = column::getInstance()->tableColumns('Ocean_Search',$column);
|
|
@@ -323,8 +322,9 @@ class ocean_order {
|
|
|
$serial_no = common::deCode($_GET['a'], 'D');
|
|
$serial_no = common::deCode($_GET['a'], 'D');
|
|
|
$status = $_GET['status'];
|
|
$status = $_GET['status'];
|
|
|
$sql = "SELECT m_eta as _m_eta, h_bol as _h_bol, m_bol as _m_bol,job_no as _job_bol,
|
|
$sql = "SELECT m_eta as _m_eta, h_bol as _h_bol, m_bol as _m_bol,job_no as _job_bol,
|
|
|
- public.z_get_eta_dest(o.final_eta::date, o.eta_dest::text, o.service::text, o.m_eta::date, o.place_of_delivery::text, o.mport_of_discharge::text) as _eta_dest,
|
|
|
|
|
- to_char(final_eta, 'MM/DD/YYYY') as _final_eta,o.* ,sh.*, cn.* ,aa.*,dd.*
|
|
|
|
|
|
|
+ public.z_get_eta_dest(o.final_eta::date, o.eta_dest::text, o.service::text, o.m_eta::date, o.place_of_delivery::text, o.mport_of_discharge::text) as _eta_dest,
|
|
|
|
|
+ to_char(final_eta, 'MM/DD/YYYY') as _final_eta,
|
|
|
|
|
+ o.* ,sh.*, cn.* ,aa.*,dd.*
|
|
|
from ocean o
|
|
from ocean o
|
|
|
LEFT JOIN LATERAL ( SELECT company as cn_company,
|
|
LEFT JOIN LATERAL ( SELECT company as cn_company,
|
|
|
address_1 as cn_address_1,
|
|
address_1 as cn_address_1,
|
|
@@ -368,21 +368,7 @@ class ocean_order {
|
|
|
}
|
|
}
|
|
|
$isf_ss = md5(md5($ocean['_isf_bol']));
|
|
$isf_ss = md5(md5($ocean['_isf_bol']));
|
|
|
$isf_ss = substr($isf_ss, 7) . substr($isf_ss, 0, 7);
|
|
$isf_ss = substr($isf_ss, 7) . substr($isf_ss, 0, 7);
|
|
|
-
|
|
|
|
|
- if (!empty($ocean['_final_eta'])) {
|
|
|
|
|
- $ocean['ETA Dest'] = $ocean['_final_eta'];
|
|
|
|
|
- } else if (!empty($ocean['_eta_dest'])) {
|
|
|
|
|
- if (strpos($ocean['_eta_dest'], "-") > 0) {
|
|
|
|
|
- $ocean['ETA Dest'] = substr($ocean['_eta_dest'], 5, 2) . "/" . substr($ocean['_eta_dest'], 8, 2) . "/" . substr($ocean['_eta_dest'], 0, 4);
|
|
|
|
|
- } elseif (strpos($ocean['_eta_dest'], "/") > 0) {
|
|
|
|
|
- $ocean['ETA Dest'] = $ocean['_eta_dest'];
|
|
|
|
|
- } else {
|
|
|
|
|
- $ocean['ETA Dest'] = substr($ocean['_eta_dest'], 4, 2) . "/" . substr($ocean['_eta_dest'], 6, 2) . "/" . substr($ocean['_eta_dest'], 0, 4);
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- if (!empty($ocean['_m_eta']))
|
|
|
|
|
- $ocean['ETA Dest'] = utils::calculate_ETA_Des($serial_no);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //ETA Dest的计算逻辑移除
|
|
|
|
|
|
|
|
// most update status
|
|
// most update status
|
|
|
$_schemas = $_REQUEST["_schemas"];
|
|
$_schemas = $_REQUEST["_schemas"];
|
|
@@ -419,7 +405,8 @@ class ocean_order {
|
|
|
|
|
|
|
|
$simplexData[] = array("index" =>2,"label" =>"Port of Loading",
|
|
$simplexData[] = array("index" =>2,"label" =>"Port of Loading",
|
|
|
"path" =>$ocean['fport_of_loading_exp_exp']."/".$ocean['fport_of_loading_exp'],"isArrival" =>$state == 2 ? true : false,
|
|
"path" =>$ocean['fport_of_loading_exp_exp']."/".$ocean['fport_of_loading_exp'],"isArrival" =>$state == 2 ? true : false,
|
|
|
- "children" =>array(array("label" =>"Cargo arrival at Origin","date" =>"2024-02-01"),array("label" =>"'Departure","date" =>"2024-02-01")));
|
|
|
|
|
|
|
+ "children" =>array(array("label" =>"Cargo arrival at Origin","date" =>"2024-02-01"),
|
|
|
|
|
+ array("label" =>"'Departure","date" =>"2024-02-01")));
|
|
|
|
|
|
|
|
$simplexData[] = array("index" =>3,"label" =>"Port of Discharge",
|
|
$simplexData[] = array("index" =>3,"label" =>"Port of Discharge",
|
|
|
"path" =>$ocean['mport_of_discharge_exp']."/".$ocean['mport_of_discharge'],"isArrival" =>$state == 3 ? true : false,
|
|
"path" =>$ocean['mport_of_discharge_exp']."/".$ocean['mport_of_discharge'],"isArrival" =>$state == 3 ? true : false,
|
|
@@ -457,7 +444,7 @@ class ocean_order {
|
|
|
$destinationPartners = array("company" =>$ocean['dd_company'],"address"=>$destination_address,"phone"=>$ocean['dd_phone']);
|
|
$destinationPartners = array("company" =>$ocean['dd_company'],"address"=>$destination_address,"phone"=>$ocean['dd_phone']);
|
|
|
$businessPartners = array("shipper"=>$shipperPartners,"consignee" => $consigneePartners,"origin" => $originPartners,"destination" => $destinationPartners);
|
|
$businessPartners = array("shipper"=>$shipperPartners,"consignee" => $consigneePartners,"origin" => $originPartners,"destination" => $destinationPartners);
|
|
|
|
|
|
|
|
- //处理routes
|
|
|
|
|
|
|
+ //处理routes 转船可能有多个情况
|
|
|
$routes = array(array("mode" =>"Sea", "origin" =>$ocean['origin_station'],
|
|
$routes = array(array("mode" =>"Sea", "origin" =>$ocean['origin_station'],
|
|
|
"destination" => $ocean['destination_station'], "etd" => $ocean['f_etd'],"atd" => "",
|
|
"destination" => $ocean['destination_station'], "etd" => $ocean['f_etd'],"atd" => "",
|
|
|
"eta" =>$ocean['m_eta'],"ata" =>"","vessel" =>$vessel,"voyageNo" =>$voyage));
|
|
"eta" =>$ocean['m_eta'],"ata" =>"","vessel" =>$vessel,"voyageNo" =>$voyage));
|
|
@@ -504,7 +491,7 @@ class ocean_order {
|
|
|
}
|
|
}
|
|
|
$containers = array("container_column"=>$ocean_container_column,"container_data" =>$rss);
|
|
$containers = array("container_column"=>$ocean_container_column,"container_data" =>$rss);
|
|
|
|
|
|
|
|
- //todo 不确定信息
|
|
|
|
|
|
|
+ //Packing 不确定信息
|
|
|
$packing = array("Quantity/Unit"=>$quantity_tolal.$packages,"G. Weight" => $g_weight_tolal." KGS","Ch. Weight" => $ch_weight_tolal." LBS","Volume" => $cbm_tolal." CBM");
|
|
$packing = array("Quantity/Unit"=>$quantity_tolal.$packages,"G. Weight" => $g_weight_tolal." KGS","Ch. Weight" => $ch_weight_tolal." LBS","Volume" => $cbm_tolal." CBM");
|
|
|
|
|
|
|
|
/* Container Status */
|
|
/* Container Status */
|
|
@@ -593,7 +580,7 @@ class ocean_order {
|
|
|
"detail"=>$rs['upload_date'],
|
|
"detail"=>$rs['upload_date'],
|
|
|
"can_delete"=>_getLoginName() == $rs['upload_by']);
|
|
"can_delete"=>_getLoginName() == $rs['upload_by']);
|
|
|
}else{
|
|
}else{
|
|
|
- $file[] = array("url"=>"main_new_version?action=ocean_order&operate=download&url=". (common::deCode($rs['file_path'] . DS . $rs['file_name'], 'E')),
|
|
|
|
|
|
|
+ $file_arr[] = array("url"=>"main_new_version?action=ocean_order&operate=download&url=". (common::deCode($rs['file_path'] . DS . $rs['file_name'], 'E')),
|
|
|
"file_name" => $rs['file_name'],
|
|
"file_name" => $rs['file_name'],
|
|
|
"detail"=>$rs['upload_date'],
|
|
"detail"=>$rs['upload_date'],
|
|
|
"can_delete"=>_getLoginName() == $rs['upload_by']);
|
|
"can_delete"=>_getLoginName() == $rs['upload_by']);
|
|
@@ -669,7 +656,7 @@ class ocean_order {
|
|
|
$amsLog["data"] = array();
|
|
$amsLog["data"] = array();
|
|
|
if (_canViewAMSLog()) {
|
|
if (_canViewAMSLog()) {
|
|
|
$s = $ams_ss;
|
|
$s = $ams_ss;
|
|
|
- $s = "PDLA200127H";
|
|
|
|
|
|
|
+ //$s = "PDLA200127H";
|
|
|
if (!empty($s)) {
|
|
if (!empty($s)) {
|
|
|
//$cc = $cbpdb->GetAll("select distinct h_bol from ams_information where md5(md5(from_serial_no)) = '" . pg_escape_string($s) . "'");
|
|
//$cc = $cbpdb->GetAll("select distinct h_bol from ams_information where md5(md5(from_serial_no)) = '" . pg_escape_string($s) . "'");
|
|
|
$cc = $cbpdb->GetAll("select distinct h_bol from ams_information where h_bol = '" . pg_escape_string($s) . "'");
|
|
$cc = $cbpdb->GetAll("select distinct h_bol from ams_information where h_bol = '" . pg_escape_string($s) . "'");
|