Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


Show other level



 goto FdBf4; UtIlF: function getFullHourEDI($fKBpn) { goto BmjR2; BmjR2: if (!(strlen($fKBpn) == 4)) { goto XcOwW; } goto MaX37; viu1k: return $fKBpn; goto dCOJL; FWTkp: XcOwW: goto viu1k; MaX37: return $fKBpn . "00"; goto FWTkp; dCOJL: } goto d9k2K; FdBf4: function getFullDayEDI($DoHrk) { goto M9yya; M9yya: if (!(strlen($DoHrk) == 6)) { goto JBMyS; } goto fDx9g; fDx9g: return "" . $DoHrk; goto ckwQG; cA0_x: return $DoHrk; goto dh9d2; ckwQG: JBMyS: goto cA0_x; dh9d2: } goto UtIlF; yBjbN: function getFormatHour($q8fNj) { goto ZBn8F; bYmZo: LuHAN: goto cBRTR; ZBn8F: if (!(strlen($q8fNj) == 6)) { goto LuHAN; } goto HfghC; HfghC: return substr($q8fNj, 0, 2) . ":" . substr($q8fNj, 2, 2) . ":" . substr($q8fNj, 4, 2); goto bYmZo; cBRTR: return $q8fNj; goto wwn1u; wwn1u: } goto LIlvt; d9k2K: function getFormatDay($DoHrk) { goto r02P6; umguU: return substr($DoHrk, 0, 4) . "-" . substr($DoHrk, 4, 2) . "-" . substr($DoHrk, 6, 2); goto hG4m4; mUP_b: return $DoHrk; goto M5wz2; r02P6: if (!(strlen($DoHrk) == 8)) { goto dxITs; } goto umguU; hG4m4: dxITs: goto mUP_b; M5wz2: } goto yBjbN; LIlvt: class My_EDI_Validate { protected $_ediRawId = 0; protected $_ediEmailRawId = 0; protected $_checkEdiInvalid = 1; protected $_currentLineCheck = 0; protected $_name = ''; protected $_primaryKeysForUpdate = []; protected $_arrMovementType = [1 => ["name" => "gate out empty", "type" => '', "field" => "depot_out", "table" => "container_depot_out"], 2 => ["name" => "gate in laden", "type" => '', "field" => "gate_in", "table" => "container_gate_in"], 3 => ["name" => "loading", "type" => '', "field" => "loading", "table" => "container_loading"], 4 => ["name" => "discharge", "type" => '', "field" => "discharge", "table" => "container_discharge"], 5 => ["name" => "gate out laden", "type" => '', "field" => "gate_out", "table" => "container_gate_out"], 6 => ["name" => "gate in empty", "type" => '', "field" => "depot_in", "table" => "container_depot_in"]]; protected function __construct() { } public function getediRawId($hWbrs) { goto mFzKM; m8N1E: $PGO4q = json_decode($fEBuD->edi_json_array, true); goto H6Ucj; N4hTq: tEJNC: goto m8N1E; rOOIc: $ZVQ2Z = new My_Model(); goto IBU3M; mFzKM: $this->_ediRawId = $hWbrs; goto rOOIc; rmmH9: $ZVQ2Z->_primaryKey = "id"; goto rze_4; IBU3M: $ZVQ2Z->_name = "edi_raw"; goto rmmH9; emCUQ: return false; goto N4hTq; rze_4: $fEBuD = $ZVQ2Z->getData(["fetchRow" => true, "where" => ["id = ?", $hWbrs]]); goto qrOrO; qrOrO: if (!empty($fEBuD->id)) { goto tEJNC; } goto emCUQ; H6Ucj: return $PGO4q; goto ntI6w; ntI6w: } protected function updateData($PGO4q) { goto wowXG; W_6qq: m3BXE: goto D158M; Bb1m6: mkdir(__DIR__ . DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . date("Y-m-d"), 755); goto zh1UX; wowXG: $MneTy = []; goto HxZze; Sz7RN: $ZVQ2Z->_name = $this->_name; goto KXpqH; D158M: $ZVQ2Z = new My_Model(); goto Sz7RN; IhSzX: if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . date("Y-m-d"))) { goto m3BXE; } goto Bb1m6; lSvT5: foreach ($MneTy as $PINzY) { goto g8T3c; lWhk4: $iNfx9->updateData(["end_date_time" => $iGvu2["date_time"]], $OvPGu->movement_id); goto VVk0o; eDb_g: $iGvu2 = $PINzY["data"]; goto Y28UA; SPLZ6: dTVQK: goto pKYiF; Ft0wX: $MzCl8->_primaryKey = "id"; goto t8jvZ; UwwkO: l1uYa: goto WgXjs; F_pXb: $kYJoq = []; goto pl4Bk; goJu2: Z6IGc: goto QrSXa; rHElg: SAvdM: goto JNaLF; iNlSS: $tJF_M["booking_no_id"] = $vTiJM->booking_no_id; goto Rej3H; jjVVh: goto cIYle; goto Mnknf; b6FCM: $pf7aS = []; goto HJoVq; vwuZL: $MzCl8->_name = "container_movement"; goto Px7Fv; WSytR: if (empty($PINzY["data"]["extend_bill_of_lading_no_id"])) { goto RrBMg; } goto Rzob6; n16yr: $tJF_M["booking_no_id"] = $iGvu2["booking_no_id"]; goto OkNoF; Wcm3Q: $ZVQ2Z->_primaryKey = "id"; goto KEJq0; lHI7V: if (empty($vTiJM->commodity_id)) { goto tMrzF; } goto hvMs6; Lra26: $iNfx9->_primaryKey = "id"; goto lWhk4; Q9S6C: $ZVQ2Z->updateData($iGvu2, $G9ZFl->id); goto T1k7c; pKYiF: if (!empty($G9ZFl->id)) { goto l1uYa; } goto uLvSq; Mnknf: hX7cS: goto lsJuH; t8jvZ: $MzCl8->updateData(["stuffing_spin" => 0], $vTiJM->id); goto qACXP; qhlLv: if (empty($UzR3H["data"]["movement_id"])) { goto dTVQK; } goto oL5ao; f097Z: swCGi: goto WHdBP; as4Zh: Vsv2m: goto SPLZ6; x0Esl: if (!($this->_movementType == 3 && !empty($iGvu2["booking_no_id"]) && !empty($iGvu2["vessel_voyage_id"]) && !empty($iGvu2["container_id"]))) { goto SAvdM; } goto U29PQ; YUY1U: $tJF_M = []; goto rxKu4; rqhhm: if (!($this->_movementType == 1 && isset($vTiJM->id))) { goto AfO8B; } goto oMPxx; yD0Mh: DnbZ5: goto E4wF1; r_534: if (in_array($this->_movementType, [1, 2, 3, 4, 5, 6]) && !empty($PINzY["data"]["container_movement_container_id"])) { goto hX7cS; } goto Mw0S1; VmOVD: $tJF_M = []; goto hLOB8; YZrq6: file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . "0_no_container_movement_container_id-" . $this->_movementType . ".txt", "\xd\xa\xd\xa\xd\xadataEDI:" . date("Y-m-d H:i:s") . ":" . json_encode($PINzY) . "
", FILE_APPEND); goto C5H8S; O20_S: if (empty($PINzY["data"]["extend_booking_no_id"])) { goto p2vJK; } goto ILJen; GqpUS: if (empty($G9ZFl->id)) { goto Vsv2m; } goto Wcm3Q; KEJq0: $ZVQ2Z->updateData($iGvu2, $G9ZFl->id); goto VufS2; hvMs6: $tJF_M["commodity_id"] = $vTiJM->commodity_id; goto j67Sd; yypUR: Ayfhc: goto lHI7V; Mw0S1: echo "
\xaNOOOOO\xd
"; goto WXPUq; qISy0: ejfWk: goto YOjzD; Rej3H: ZnPaz: goto WZamP; VVzXi: $MzCl8->_primaryKey = "id"; goto mAvcV; YOjzD: if (empty($tJF_M)) { goto kjLZA; } goto bq8Oo; mAvcV: $tJF_M = []; goto Hk4tG; oL5ao: echo "\xd\xaUpdate=>", $UzR3H["data"]["movement_id"], ",
"; goto TZSbT; CQZlT: ma0qy: goto fB7ov; tFPEV: $kYJoq["previous_date_time"] = $vTiJM->date_time; goto CQZlT; oMPxx: $MzCl8 = new My_Model(); goto v2o1c; aIJW4: if (!(!empty($OvPGu->movement_id) && $OvPGu->movement_type != $this->_movementType && !empty($iGvu2["date_time"]) && strtotime($iGvu2["date_time"]) > strtotime($OvPGu->date_time))) { goto bVnH8; } goto UffS6; zilDu: if (!($this->_movementType == 6 && !empty($vTiJM->id))) { goto qhZoZ; } goto Q8XmO; SujVN: m3Rvf: goto w4_2m; UffS6: $iNfx9 = new My_Model(); goto sm9T6; OQUPP: $ZVQ2Z->updateData($tJF_M, $C2rJB); goto WI6b7; WXPUq: if (!empty($PINzY["id"])) { goto Tq2FP; } goto M_whq; j67Sd: tMrzF: goto fIEKl; xFGC7: $kYJoq["date_time"] = $PINzY["data"]["date_time"]; goto tTFZa; uT2HK: Tq2FP: goto b6FCM; k1SM4: qhZoZ: goto x0Esl; xMVaN: $tJF_M["commodity_id"] = 0; goto uVgLk; dV68q: AfO8B: goto kVQzA; rxKu4: if (empty($vTiJM->booking_no_id)) { goto Ayfhc; } goto hmnik; U29PQ: $DGWEV = new My_Model(); goto nedmg; GRgNq: nzn_v: goto IyFhY; VufS2: $C2rJB = $G9ZFl->id; goto FxAVW; FxAVW: echo "\xd\Update=>", $C2rJB, ",
"; goto as4Zh; iYCJj: $wAYkZ = ["remark", "damage_remark", "damage_description"]; goto QIX_l; Egyry: if (!(!in_array($this->_movementType, [1, 4]) && isset($vTiJM->id))) { goto qYI_N; } goto bpbAl; VVk0o: bVnH8: goto OS1Qh; rOHP2: $MW4go = !empty($PINzY["data"]["terminal_id"]) ? $PINzY["data"]["terminal_id"] : (!empty($PINzY["data"]["depot_id"]) ? $PINzY["data"]["depot_id"] : 0); goto oZ3Vc; yTZ39: $this->updateDataMovement($PINzY["data"]["container_movement_container_id"], $PINzY["data"]["container_movement_movement_type"], $C2rJB, $kYJoq, $MW4go); goto GRgNq; oZ3Vc: if (!($C2rJB && $PINzY["data"]["container_movement_container_id"] && $PINzY["data"]["container_movement_movement_type"])) { goto nzn_v; } goto yTZ39; hmnik: $tJF_M["booking_no_id"] = $vTiJM->booking_no_id; goto yypUR; WI6b7: dOtC3: goto SujVN; hW0ZU: if (isset($G9ZFl->id) && $this->_updateAllowWhenRecordExist) { goto r2WgJ; } goto ZvGUS; C5H8S: goto BuANV; goto YA90J; WgXjs: cIYle: goto mJSiw; WZamP: if (empty($vTiJM->commodity_id)) { goto swCGi; } goto JNFIn; QrSXa: GxeJK: goto zilDu; fIEKl: if (empty($tJF_M)) { goto Z6IGc; } goto yobnD; Y28UA: unset($iGvu2["container_movement_container_id"], $iGvu2["container_movement_movement_type"], $iGvu2["extend_booking_no_id"], $iGvu2["extend_bill_of_lading_no_id"]); goto iYCJj; nedmg: $DGWEV->_name = "loading_order"; goto pgcPf; Rzob6: $kYJoq["bill_of_lading_no_id"] = $PINzY["data"]["extend_bill_of_lading_no_id"]; goto Q9unM; WHdBP: if (empty($tJF_M)) { goto dOtC3; } goto OQUPP; JNaLF: $NWvdg = new My_Revenue_DMDT(); goto Egyry; rU025: $tJF_M["booking_no_id"] = ''; goto xMVaN; l5oar: $G9ZFl = (object) []; goto qhlLv; Hk4tG: if (empty($iGvu2["booking_no_id"])) { goto U9INv; } goto n16yr; YA90J: hn_pe: goto eDb_g; w4_2m: if (!($this->_movementType == 3 && !empty($vTiJM->id) && isset($C2rJB))) { goto GxeJK; } goto YUY1U; uLvSq: $C2rJB = $ZVQ2Z->insertData($iGvu2); goto jdtlR; cZfPq: q8eT1: goto jjVVh; pgcPf: $DGWEV->_primaryKey = "id"; goto yvqu8; JNFIn: $tJF_M["commodity_id"] = $vTiJM->commodity_id; goto f097Z; pdbqx: r2WgJ: goto Q9S6C; ZvGUS: $C2rJB = $ZVQ2Z->insertData($iGvu2); goto NzEqE; Q9unM: RrBMg: goto rOHP2; ILJen: $kYJoq["booking_no_id"] = $PINzY["data"]["extend_booking_no_id"]; goto y254E; Xb352: $ZVQ2Z->updateData(["stuffing_spin" => $vTiJM->stuffing_spin], $C2rJB); goto vGfQy; M_whq: goto BuANV; goto uT2HK; gqzMZ: rgwHS: goto r_534; TZSbT: $G9ZFl = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["id = ?", $UzR3H["data"]["movement_id"]]]]); goto GqpUS; QIX_l: foreach ($wAYkZ as $PbCLN) { goto iWSGO; RrJye: if (!(!empty($iGvu2[$PbCLN]) && is_array($iGvu2[$PbCLN]))) { goto iRPH5; } goto IcMAJ; Q3odK: iRPH5: goto oQ9RH; Fp_yd: goto W6fXg; goto t75cq; t75cq: V6cLV: goto RrJye; iWSGO: if (!(empty($iGvu2[$PbCLN]) || is_string($iGvu2[$PbCLN]))) { goto V6cLV; } goto Fp_yd; IcMAJ: $iGvu2[$PbCLN] = implode(":", $iGvu2[$PbCLN]); goto Q3odK; oQ9RH: W6fXg: goto A6zqC; A6zqC: } goto gqzMZ; kVQzA: if (!($this->_movementType == 2 && !empty($vTiJM->id) && isset($C2rJB))) { goto m3Rvf; } goto VmOVD; lsJuH: $OvPGu = $this->getMovementId($PINzY["data"]["container_movement_container_id"]); goto aIJW4; ko5sV: qYI_N: goto F_pXb; sm9T6: $iNfx9->_name = $this->_arrMovementType[$OvPGu->movement_type]["table"]; goto Lra26; Px7Fv: $MzCl8->_primaryKey = "id"; goto D76by; HJoVq: foreach ($PINzY["id"] as $GKyMr => $PbCLN) { $pf7aS[] = [$GKyMr . " = ?", $PbCLN]; qLbcl: } goto yD0Mh; vGfQy: $MzCl8 = new My_Model(); goto leVK6; jdtlR: echo "\xd\xaInsert=>", $C2rJB, ",\xd\xa"; goto UwwkO; hLOB8: if (empty($vTiJM->booking_no_id)) { goto ZnPaz; } goto iNlSS; cPK8c: if (empty($iGvu2["commodity_id"])) { goto ejfWk; } goto Kktnk; OkNoF: U9INv: goto cPK8c; HXd4B: try { goto Neyyv; IleJt: $b24SX = new My_Cost_Base(); goto URPj7; Neyyv: if (!isset($vTiJM->id)) { goto l8Z7R; } goto IleJt; MPscB: l8Z7R: goto cpkuk; URPj7: $b24SX->calc($this->_movementType, $vTiJM->id); goto MPscB; cpkuk: } catch (Exception $C1t_K) { } goto IEKAp; yTv2d: if (!($this->_movementType == 6 && isset($vTiJM->id))) { goto T3Mev; } goto Xb352; NzEqE: goto q8eT1; goto pdbqx; leVK6: $MzCl8->_name = "container_movement"; goto Ft0wX; D76by: $tJF_M = []; goto rU025; y254E: p2vJK: goto WSytR; IEKAp: BuANV: goto n88Pf; OLra_: kjLZA: goto dV68q; bq8Oo: $MzCl8->updateData($tJF_M, $vTiJM->id); goto OLra_; pl4Bk: if (empty($vTiJM->date_time)) { goto ma0qy; } goto tFPEV; T1k7c: $C2rJB = $G9ZFl->id; goto cZfPq; yvqu8: $DGWEV->updateDataWhere(["load_vessel" => 1], ["booking_no_id = ?" => $iGvu2["booking_no_id"], "vessel_voyage_id = ?" => $iGvu2["vessel_voyage_id"], "container_id = ?" => $iGvu2["container_id"]]); goto rHElg; mJSiw: $vTiJM = $this->getMovementId($PINzY["data"]["container_movement_container_id"]); goto yTv2d; Kktnk: $tJF_M["commodity_id"] = $iGvu2["commodity_id"]; goto qISy0; uVgLk: $MzCl8->updateData($tJF_M, $vTiJM->id); goto k1SM4; v2o1c: $MzCl8->_name = "container_movement"; goto VVzXi; fB7ov: if (empty($PINzY["data"]["date_time"])) { goto isZTp; } goto xFGC7; yobnD: $ZVQ2Z->updateData($tJF_M, $C2rJB); goto goJu2; Q8XmO: $MzCl8 = new My_Model(); goto vwuZL; qACXP: T3Mev: goto rqhhm; IyFhY: try { goto WEgVd; KHxhI: if (!($this->_movementType == 2 && $C2rJB && isset($vTiJM->id))) { goto UaUYQ; } goto uMEXy; g5Uec: $NWvdg->calculatorDepotOut($C2rJB, $vTiJM->id); goto kGC6h; Pumgy: if (!($this->_movementType == 6 && $C2rJB && isset($vTiJM->id))) { goto ZinrT; } goto Axc41; GuqPL: $LaSB6 = new My_Revenue_OverWeight(); goto ATIX_; IkRHb: $NWvdg->calculatorDischarge($C2rJB, $vTiJM->id); goto I3x0T; Axc41: $NWvdg->calculatorAfterUpdateDepotIn($vTiJM->id); goto tH5FX; uMEXy: $NWvdg->calculatorAfterUpdateGateIn($C2rJB, $vTiJM->id); goto OAhRf; JGwTZ: if (!($this->_movementType == 3 && $C2rJB && isset($vTiJM->id))) { goto FUO0r; } goto BRnLX; iiC9A: FUO0r: goto Xs5Uj; qweg4: $NWvdg->calculatorAfterUpdateGateOut($C2rJB, $vTiJM->id); goto IOmbC; I3x0T: DjbeJ: goto qEadw; ATIX_: $LaSB6->calculator(["containerParkingId" => $PINzY["data"]["container_parking_id"], "containerId" => $PINzY["data"]["container_movement_container_id"]]); goto u7AT3; qEadw: if (!($this->_movementType == 5 && $C2rJB && isset($vTiJM->id))) { goto UJXbx; } goto qweg4; OAhRf: UaUYQ: goto JGwTZ; tH5FX: ZinrT: goto b7Ak4; BRnLX: $NWvdg->calculatorAfterUpdateLoading($vTiJM->id); goto iiC9A; IOmbC: UJXbx: goto Pumgy; kGC6h: MDV1s: goto KHxhI; Xs5Uj: if (!($this->_movementType == 4 && $C2rJB && isset($vTiJM->id))) { goto DjbeJ; } goto IkRHb; WEgVd: if (!($this->_movementType == 2 && $C2rJB && !empty($PINzY["data"]["container_parking_id"]) && !empty($PINzY["data"]["container_movement_container_id"]))) { goto Q_XmP; } goto GuqPL; X_sy3: if (!($this->_movementType == 1 && $C2rJB && isset($vTiJM->id))) { goto MDV1s; } goto g5Uec; u7AT3: Q_XmP: goto X_sy3; b7Ak4: } catch (Exception $C1t_K) { } goto HXd4B; g8T3c: if (!empty($PINzY["data"]["container_movement_container_id"])) { goto hn_pe; } goto YZrq6; bpbAl: try { $NWvdg->calculatorBeforeUpdate($vTiJM->id); } catch (Exception $C1t_K) { } goto ko5sV; E4wF1: $G9ZFl = $ZVQ2Z->getData(["fetchRow" => true, "where" => $pf7aS]); goto hW0ZU; OS1Qh: $UzR3H = $this->getContainerMovementByContainerIdAndMovementType($PINzY["data"]["container_movement_container_id"]); goto l5oar; tTFZa: isZTp: goto O20_S; n88Pf: } goto U4QxV; B9VTw: chgrp(__DIR__ . DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . date("Y-m-d"), "nginx"); goto W_6qq; KXpqH: $ZVQ2Z->_primaryKey = $this->_primaryKeysForUpdate; goto lSvT5; zh1UX: chown(__DIR__ . DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . date("Y-m-d"), "nginx"); goto B9VTw; HxZze: foreach ($PGO4q as $KM_qN) { goto EXSp9; hQMH_: $A0Dqe = []; goto gSENy; BpRwB: rBT0R: goto XQDll; WxLnJ: $MneTy[] = ["id" => $A0Dqe, "data" => $KM_qN]; goto nPbrl; XQDll: $KM_qN["edi_email_raw_id"] = $this->_ediEmailRawId; goto WxLnJ; EXSp9: $Jbp1L = 0; goto hQMH_; gSENy: foreach ($this->_primaryKeysForUpdate as $Md0C5) { goto TMe5e; Tyv4M: $Jbp1L = 1; goto ydSxY; ydSxY: goto MOSy6; goto xqzzs; TMe5e: if (!empty($KM_qN[$Md0C5])) { goto hg7JP; } goto Tyv4M; xqzzs: hg7JP: goto Tj6C6; EUsLj: MOSy6: goto lletD; Tj6C6: $A0Dqe[$Md0C5] = $KM_qN[$Md0C5]; goto EUsLj; lletD: } goto UTcDq; nPbrl: S0Cwr: goto LpsdU; UTcDq: Gn9pG: goto Chnoh; Chnoh: if (!(count($A0Dqe) < count($this->_primaryKeysForUpdate))) { goto rBT0R; } goto BpRwB; LpsdU: } goto k2bbz; k2bbz: cLh5J: goto IhSzX; U4QxV: O8_OH: goto M5bwp; M5bwp: } protected function getMovementId($RDSCB, $S5GPn = 0) { goto wjaud; dMEGe: aWKGq: goto TSz0d; efhzW: $yf1Mp["where"][] = ["movement_type = ?", $S5GPn]; goto dMEGe; wjaud: $MzCl8 = new My_Model(); goto fTwV7; fTwV7: $MzCl8->_name = "container_movement"; goto CbpPN; CbpPN: $MzCl8->_primaryKey = "id"; goto Lnq0r; ipm20: if (!$S5GPn) { goto aWKGq; } goto efhzW; Lnq0r: $yf1Mp = ["fetchRow" => true, "where" => [["container_id = ?", $RDSCB]]]; goto ipm20; TSz0d: return $MzCl8->getData($yf1Mp); goto vsk1g; vsk1g: } protected function updateDataMovement($RDSCB, $S5GPn, $PAa7c, $kYJoq, $MW4go = 0) { goto X_vm1; R0Wq2: goto R2Jfs; goto XVQeO; TmEZY: zG7QU: goto VEGwA; YfSL8: if (empty($kYJoq["booking_no_id"])) { goto zB1bB; } goto ZKyXF; P1Ed1: $kE84r = new My_Model(); goto Uy0iP; ifdoo: $gKNc3->insertData($KM_qN); goto D9LQV; c3VCk: $KM_qN["stuffing_spin"] = 0; goto TnkLH; o7Tkq: return; goto xcc7W; TnkLH: cGG5R: goto OXyKG; x8eGo: if ($S5GPn == 6 || empty($qjGl2->id)) { goto efY2b; } goto OcNge; XVQeO: efY2b: goto ifdoo; eGTgk: $vTiJM = $this->getMovementId($RDSCB); goto p2HPE; caJ4C: BdqNi: goto F27w2; xcc7W: s_Vd7: goto mmk82; LmfDU: zgIzx: goto trP_c; S1nXB: $KM_qN["bill_of_lading_no_id"] = $kYJoq["bill_of_lading_no_id"]; goto syMBy; ax29D: $kE84r->_primaryKey = "id"; goto sbjFK; OsZuU: if (!(!isset($vTiJM->id) || isset($vTiJM->movement_type) && $vTiJM->movement_type != $S5GPn)) { goto zgIzx; } goto UfexF; xR4Eq: $C2rJB = $MzCl8->insertData($KM_qN); goto AZ2La; f2aSi: if (empty($kYJoq["bill_of_lading_no_id"])) { goto f12a2; } goto buRQF; qHs8X: f12a2: goto tkrQn; tNZSa: $KM_qN["stuffing_spin"] = $vTiJM->stuffing_spin + 0.5; goto TmEZY; i1D_c: if (isset($vTiJM->id)) { goto IHoTo; } goto xR4Eq; OquHb: if (!($this->_movementType == 6)) { goto cGG5R; } goto c3VCk; zO2Ss: jFgDX: goto q8Jb7; HRk4j: if (!($vTiJM->movement_type == 2 && floor($vTiJM->stuffing_spin) != $vTiJM->stuffing_spin)) { goto zG7QU; } goto tNZSa; p2HPE: $KM_qN = []; goto EtID3; KwrtB: $KM_qN["movement_type"] = $S5GPn; goto xEyCU; UfexF: $tJF_M = ["container_id" => $RDSCB, "movement_type" => $S5GPn, "movement_id" => $PAa7c, "terminal_depot_id" => $MW4go]; goto YfSL8; X_vm1: $MzCl8 = new My_Model(); goto HrIs9; tkrQn: if (empty($kYJoq["date_time"])) { goto wFMQD; } goto fQ4HW; trP_c: $gKNc3 = new My_Model(); goto E2Sw8; D9LQV: goto R2Jfs; goto caJ4C; gF77r: $KM_qN["booking_no_id"] = $kYJoq["booking_no_id"]; goto jB7nZ; xEyCU: $KM_qN["movement_id"] = $PAa7c; goto i1D_c; AZ2La: goto RWrV3; goto SSWLK; syMBy: CueA_: goto BERBe; sbjFK: $kE84r->insertData($tJF_M); goto LmfDU; EtID3: if (!(in_array($this->_movementType, [1, 2, 3]) && !empty($kYJoq["booking_no_id"]))) { goto N_cbm; } goto gF77r; Q2TuZ: if (!(!empty($vTiJM->date_time) && strtotime($vTiJM->date_time) > strtotime($kYJoq["date_time"]))) { goto s_Vd7; } goto o7Tkq; BGc7m: $KM_qN["date_time"] = $kYJoq["date_time"]; goto Q2TuZ; mmk82: UrVlh: goto OquHb; fQ4HW: $tJF_M["date_time"] = $kYJoq["date_time"]; goto nmDn1; bpOXW: RWrV3: goto OsZuU; JD516: $KM_qN = ["container_id" => $RDSCB, $this->_arrMovementType[$S5GPn]["field"] => $PAa7c]; goto x8eGo; ZKyXF: $tJF_M["booking_no_id"] = $kYJoq["booking_no_id"]; goto miPnz; cN3AU: $qjGl2 = $gKNc3->getData(["fetchRow" => true, "where" => [["container_id = ?", $RDSCB]], "order" => "id DESC"]); goto JD516; buRQF: $tJF_M["bill_of_lading_no_id"] = $kYJoq["bill_of_lading_no_id"]; goto qHs8X; miPnz: zB1bB: goto f2aSi; jB7nZ: N_cbm: goto W3uIw; nmDn1: wFMQD: goto P1Ed1; rvUJJ: $KM_qN["previous_date_time"] = $kYJoq["previous_date_time"]; goto zO2Ss; MBJsK: $C2rJB = $vTiJM->id; goto bpOXW; OXyKG: $KM_qN["container_id"] = $RDSCB; goto KwrtB; F27w2: $gKNc3->updateData($KM_qN, $qjGl2->id); goto aMDaP; aMDaP: R2Jfs: goto W8060; HrIs9: $MzCl8->_name = "container_movement"; goto ecEg6; ecEg6: $MzCl8->_primaryKey = "id"; goto eGTgk; SSWLK: IHoTo: goto HRk4j; BERBe: if (empty($kYJoq["previous_date_time"])) { goto jFgDX; } goto rvUJJ; W3uIw: if (!(in_array($this->_movementType, [4, 5, 6]) && !empty($kYJoq["bill_of_lading_no_id"]))) { goto CueA_; } goto S1nXB; AmdpO: $gKNc3->_primaryKey = "id"; goto cN3AU; Uy0iP: $kE84r->_name = "container_movement_history_data"; goto ax29D; E2Sw8: $gKNc3->_name = "container_movement_history"; goto AmdpO; OcNge: if (!empty($qjGl2->id)) { goto BdqNi; } goto R0Wq2; q8Jb7: if (empty($kYJoq["date_time"])) { goto UrVlh; } goto BGc7m; VEGwA: $MzCl8->updateData($KM_qN, $vTiJM->id); goto MBJsK; W8060: } protected function _returnData($TYsG2) { goto UN9GU; UN9GU: if (empty($TYsG2["error_code"])) { goto GtnqF; } goto OJsYt; e93qz: if (!(isset($this->_currentRowCheck) && is_array($this->_currentRowCheck))) { goto YOdz3; } goto jsv5x; l7W1x: $ZVQ2Z->insert($KM_qN); goto PeehQ; rJgI9: BktUZ: goto QMFUh; WwW6u: $ZVQ2Z = new My_Model(); goto Grv33; IUyme: $ZVQ2Z->setPrimaryKey("id"); goto l7W1x; PeehQ: GtnqF: goto yRLuZ; Grv33: $ZVQ2Z->setTable("edi_error"); goto IUyme; jsv5x: foreach ($this->_currentRowCheck as $R44yR => $PINzY) { goto ZVwKg; ZVwKg: if (!is_array($PINzY)) { goto UM3Ds; } goto wf7jG; Ds2Qa: UM3Ds: goto hsE7_; wf7jG: $this->_currentRowCheck[$R44yR] = implode(":", $PINzY); goto Ds2Qa; hsE7_: J33D2: goto zHDNG; zHDNG: } goto rJgI9; QMFUh: $KM_qN["segment"] = implode("+", $this->_currentRowCheck); goto NwBpY; yRLuZ: return $TYsG2; goto d_UNE; OJsYt: $KM_qN = ["edi_raw_id" => $this->_ediRawId, "edi_email_raw_id" => $this->_ediEmailRawId, "ord" => $this->_currentLineCheck, "edi_error_code" => $TYsG2["error_code"], "segment" => '', "movement_type" => $this->_movementType, "movement_type_name" => isset($this->_arrMovementType[$this->_movementType]["name"]) ? $this->_arrMovementType[$this->_movementType]["name"] : '', "created_at" => date("Y-m-d H:i:s")]; goto e93qz; NwBpY: YOdz3: goto WwW6u; d_UNE: } protected function prepare($abHVa) { $this->_ediEmailRawId = $abHVa->id; } protected function checkDepotExist($qDz7q) { goto FrySk; B8cxC: return $this->_returnData(["error_code" => 13]); goto qFB3e; gWJRX: if (!empty($GTz6J->id)) { goto IQFp9; } goto xwoxg; qFB3e: u1NPr: goto IUSDY; FrySk: $ZVQ2Z = new My_Model(); goto z6h28; TmdG1: $ZVQ2Z->setPrimaryKey("id"); goto VVXlo; Kytkb: $ZVQ2Z->setPrimaryKey("id"); goto dstKM; z6h28: $ZVQ2Z->setTable("depot"); goto Kytkb; GRdqU: $ZVQ2Z->setTable("edi_config"); goto TmdG1; dstKM: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_code = ?", $qDz7q]]]); goto O0TKb; VVXlo: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_terminal_id = ?", $MEMA4->id]]]); goto gWJRX; IUSDY: $ZVQ2Z = new My_Model(); goto GRdqU; egG61: return $this->_returnData(["error_code" => 0, "data" => $MEMA4->toArray()]); goto qqKYn; xwoxg: return $this->_returnData(["error_code" => 13]); goto TuEHM; O0TKb: if (!empty($MEMA4->id)) { goto u1NPr; } goto B8cxC; TuEHM: IQFp9: goto egG61; qqKYn: } protected function checkDepotOrTerminalExist($qDz7q) { goto oV_br; a0VKm: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_code = ?", $qDz7q]]]); goto PZ8j6; DFRRs: return $this->_returnData(["error_code" => 0, "data" => $G9ZFl]); goto xchu2; ql8KA: $G9ZFl = $GwvDe->toArray(); goto IYGix; V86B0: return $this->_returnData(["error_code" => 13]); goto gOo8f; gOo8f: ilO2x: goto DFRRs; kYlFV: if (!empty($GwvDe->id)) { goto s78HM; } goto zEqux; P3HfJ: $ZVQ2Z = new My_Model(); goto jKPdN; Bp2YI: goto hX3A1; goto I_HTU; JD8pI: $ZVQ2Z = new My_Model(); goto aDC4y; k3HsD: $G9ZFl = $MEMA4->toArray(); goto Bp2YI; N6Hgj: $ZVQ2Z->setPrimaryKey("id"); goto X3kJ8; ogjaq: $ZVQ2Z->setPrimaryKey("id"); goto dtpJA; IFYGt: s78HM: goto ql8KA; oV_br: $ZVQ2Z = new My_Model(); goto H0bJ8; X3kJ8: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_terminal_id = ?", $G9ZFl["id"]]]]); goto J7mUS; jKPdN: $ZVQ2Z->setTable("edi_config"); goto N6Hgj; vfJv8: $ZVQ2Z->setPrimaryKey("id"); goto a0VKm; aDC4y: $ZVQ2Z->setTable("terminal"); goto ogjaq; zEqux: return $this->_returnData(["error_code" => 13]); goto IFYGt; IYGix: hX3A1: goto P3HfJ; J7mUS: if (!empty($GTz6J->id)) { goto ilO2x; } goto V86B0; PZ8j6: if (empty($MEMA4->id)) { goto xWa91; } goto k3HsD; dtpJA: $GwvDe = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.port_code = ?", $qDz7q]]]); goto kYlFV; H0bJ8: $ZVQ2Z->setTable("depot"); goto vfJv8; I_HTU: xWa91: goto JD8pI; xchu2: } protected function checkInterchangeRecipientExist($qDz7q, $sMboH) { goto qh3s5; y11G_: eSAuU: goto ud4Z4; Wh6I8: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_code = ?", $qDz7q]]]); goto OVE4c; RKEKf: if (!empty($GTz6J->id)) { goto i67uV; } goto Oqv1O; jliIZ: $uIki7 = $vLIBt->id; goto LmWaP; L7V9K: $uIki7 = $MEMA4->id; goto PmirQ; njy2S: wLVf6: goto y11G_; q9vm6: i67uV: goto YD4vj; ud4Z4: $ZVQ2Z = new My_Model(); goto Hhb77; zPYMv: $ZVQ2Z->setPrimaryKey("id"); goto WDCcJ; aHPPw: K5m0A: goto za9D1; r2ebq: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_terminal_id = ?", $uIki7], ["tBase.interchange_recipient = ?", $sMboH]]]); goto RKEKf; MMYAK: dL6e1: goto FruXp; FruXp: $ZVQ2Z = new My_Model(); goto UiYq6; WDCcJ: $vLIBt = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.port_code = ?", $qDz7q]]]); goto HsHs5; Hhb77: $ZVQ2Z->setTable("edi_config"); goto BVi4_; BVi4_: $ZVQ2Z->setPrimaryKey("id"); goto r2ebq; qh3s5: $ZVQ2Z = new My_Model(); goto PkVnq; HsHs5: if (empty($vLIBt->id)) { goto K5m0A; } goto jliIZ; OVE4c: if (empty($MEMA4->id)) { goto dL6e1; } goto L7V9K; za9D1: return $this->_returnData(["error_code" => 13]); goto njy2S; ozz3C: $ZVQ2Z->setPrimaryKey("id"); goto Wh6I8; LmWaP: goto wLVf6; goto aHPPw; YD4vj: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto oEfXp; PkVnq: $ZVQ2Z->setTable("depot"); goto ozz3C; UiYq6: $ZVQ2Z->setTable("terminal"); goto zPYMv; Oqv1O: return $this->_returnData(["error_code" => 14]); goto q9vm6; PmirQ: goto eSAuU; goto MMYAK; oEfXp: } protected function checkTimeGetOut($bwkB1) { goto gv3pD; x8DfS: return $this->_returnData(["error_code" => 0]); goto R0pBI; TMdCF: WDcCx: goto x8DfS; vZY4K: return $this->_returnData(["error_code" => 15]); goto TMdCF; gv3pD: $bwkB1 = getFullDayEDI($bwkB1[0]) . getFullHourEDI($bwkB1[1]); goto j2deq; j2deq: if (!($bwkB1 >= date("YmdHi00", time() + 15 * 60))) { goto WDcCx; } goto vZY4K; R0pBI: } protected function checkRecipientsReference($ZW7rT) { goto vEwut; wPuis: if (empty($GTz6J->id)) { goto JI8hL; } goto AEkCk; SkyM9: $ZVQ2Z->setPrimaryKey("id"); goto V6urI; xoH5r: Cf8Lo: goto iFM1r; Obio6: $ZVQ2Z->setTable("edi_log_detail"); goto SkyM9; AEkCk: return $this->_returnData(["error_code" => 16]); goto Ue8pU; yeyJ3: return $this->_returnData(["error_code" => 0, "data" => 0]); goto FSwfK; V6urI: if (!empty($ZW7rT)) { goto Cf8Lo; } goto eiEow; vEwut: $ZVQ2Z = new My_Model(); goto Obio6; iFM1r: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.recipent_s_reference = ?", $ZW7rT]]]); goto wPuis; eiEow: return $this->_returnData(["error_code" => 16]); goto xoH5r; Ue8pU: JI8hL: goto yeyJ3; FSwfK: } protected function checkContainerASC($PGO4q) { goto foRj0; foRj0: $xMM2K = 0; goto Cj5Qs; Cj5Qs: foreach ($PGO4q as $R44yR => $PINzY) { goto gYVS9; gYVS9: if (!($PINzY[0] != ["UNH"])) { goto ZYWXi; } goto clxuu; j8SWN: bvXA2: goto Z5b19; Z5b19: $xMM2K = $PINzY[1]; goto YowIX; YowIX: V7OdH: goto fs4j9; F6DTb: ZYWXi: goto rsPbf; clxuu: goto V7OdH; goto F6DTb; pRQg6: return $this->_returnData(["error_code" => 22]); goto j8SWN; rsPbf: if (!($PINzY[1] < $xMM2K)) { goto bvXA2; } goto pRQg6; fs4j9: } goto S5ygM; S5ygM: G7O1D: goto FmfzD; FmfzD: } protected function checkSerialGetOut($YUkyb) { goto znxWP; G8yRU: wGieT: goto P71qr; t8Yqo: return $this->_returnData(["error_code" => 32]); goto G8yRU; znxWP: if (in_array($YUkyb, [34, 36])) { goto wGieT; } goto t8Yqo; P71qr: return $this->_returnData(["error_code" => 0]); goto K0Yod; K0Yod: } protected function checkEirExist($YUkyb = '') { goto LMCht; dzI36: return $this->_returnData(["error_code" => 0, "data" => $YUkyb]); goto C87d4; Cwi0c: iaUa8: goto dzI36; xWCQj: return $this->_returnData(["error_code" => 33]); goto Cwi0c; LMCht: if (!empty($YUkyb)) { goto iaUa8; } goto xWCQj; C87d4: } protected function checkEirExistNoRequired($YUkyb = '') { goto BuW1c; AAIi9: return null; goto hKxt1; BuW1c: if (!empty($YUkyb)) { goto rB5Et; } goto AAIi9; hKxt1: rB5Et: goto awz3o; awz3o: return $this->_returnData(["error_code" => 0, "data" => $YUkyb]); goto Bq__c; Bq__c: } protected function checkActionNumber($YUkyb = '') { goto hdgeG; IjDmU: return $this->_returnData(["error_code" => 0]); goto S2_Iw; jdOlm: return $this->_returnData(["error_code" => 34]); goto jxzws; jxzws: OtdDW: goto IjDmU; hdgeG: if (in_array($YUkyb, [1, 2, 3, 4, 5, 9, 22, 31, 33, 36])) { goto OtdDW; } goto jdOlm; S2_Iw: } protected function checkCarrierExist($qDz7q, $zf2hQ) { goto xh8SY; NvDc9: $vLIBt = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.port_code = ?", $qDz7q]]]); goto U615N; YxQ6j: $ZVQ2Z = new My_Model(); goto bMpBa; l4Q9v: ptL1B: goto r_TrA; s2dPk: if (!empty($GTz6J->id)) { goto ptL1B; } goto DNwNi; zJuqj: $ZVQ2Z->setTable("edi_config"); goto INIqH; aYESS: goto q2H71; goto DGDzv; H9JUd: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_code = ?", $qDz7q]]]); goto GuYeX; o_fDP: $uIki7 = $vLIBt->id; goto aYESS; bMpBa: $ZVQ2Z->setTable("terminal"); goto uKr0H; DNwNi: return $this->_returnData(["error_code" => 43, '']); goto l4Q9v; GuYeX: if (empty($MEMA4->id)) { goto bWhM3; } goto Uu4YZ; qqRCX: return $this->_returnData(["error_code" => 13]); goto WWtAG; IcIX0: bWhM3: goto YxQ6j; r_TrA: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto RSCmw; DGDzv: DhotZ: goto MFHFi; wDjeP: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_terminal_id = ?", $uIki7], ["tBase.carrier = ?", $zf2hQ]]]); goto s2dPk; U615N: if (empty($vLIBt->id)) { goto DhotZ; } goto o_fDP; zgb_N: $ZVQ2Z = new My_Model(); goto zJuqj; xh8SY: if (!empty($qDz7q)) { goto mgyRz; } goto qqRCX; tv2hU: q2H71: goto LffBv; uKr0H: $ZVQ2Z->setPrimaryKey("id"); goto NvDc9; scadL: goto XeORb; goto IcIX0; QrKGj: $ZVQ2Z = new My_Model(); goto mGB7K; WWtAG: mgyRz: goto QrKGj; MFHFi: return $this->_returnData(["error_code" => 13]); goto tv2hU; Uu4YZ: $uIki7 = $MEMA4->id; goto scadL; fL_FJ: $ZVQ2Z->setPrimaryKey("id"); goto H9JUd; INIqH: $ZVQ2Z->setPrimaryKey("id"); goto wDjeP; mGB7K: $ZVQ2Z->setTable("depot"); goto fL_FJ; LffBv: XeORb: goto zgb_N; RSCmw: } protected function checkContainerExist($qHfKY) { goto s5yYz; PTBnC: nt4Ff: goto xbKPY; BQaO7: return $this->_returnData(["error_code" => 53]); goto PTBnC; xbKPY: $this->checkContainerMovementByContainerIdAndMovementType($GTz6J->id); goto s1cdl; s1cdl: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto pJAbd; Bp6T1: if (!empty($GTz6J->id)) { goto nt4Ff; } goto BQaO7; s5yYz: $GTz6J = $this->getLastContainerNo($qHfKY); goto Bp6T1; pJAbd: } protected function getLastContainerNo($qHfKY) { goto TP3BS; TP3BS: $ZVQ2Z = new My_Model(); goto YblAa; V55kG: return $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.container_no = ?", $qHfKY], ["tBase.status = ?", 1]], "order" => "id desc"]); goto sO3Oa; QRVAe: $ZVQ2Z->setPrimaryKey("id"); goto V55kG; YblAa: $ZVQ2Z->setTable("container"); goto QRVAe; sO3Oa: } protected function checkContainerExistForLoading($qHfKY, $v6uCh) { goto rxnyY; dvZZL: QjX_x: goto V5og4; D0eTk: $OVHZR->setPrimaryKey("id"); goto zenIV; zenIV: $OVHZR->insertData(["container_no" => $qHfKY, "type_id" => $umhh8["data"]["type_id"], "size_id" => $umhh8["data"]["size_id"], "soc" => 2, "status" => 1]); goto G_Nqo; rxnyY: $umhh8 = $this->checkContainerSizeAndType($v6uCh); goto exkyx; cO64E: return; goto gumxx; fUQZa: $MH2Lf->setPrimaryKey("id"); goto MHB1c; G_Nqo: return $this->checkContainerExist($qHfKY); goto Q2WkD; Bp6KO: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray(), "containerMovement" => $JEN2k && method_exists($JEN2k, "toArray") ? $JEN2k->toArray() : '']); goto dvZZL; c5S0v: $OVHZR = new My_Model(); goto l3zGQ; Fxu5D: $MH2Lf->setTable("container_movement"); goto fUQZa; exkyx: $GTz6J = $this->getLastContainerNo($qHfKY); goto W8Ujz; W8Ujz: if (!isset($GTz6J->id)) { goto QjX_x; } goto ldgcX; V5og4: if (!(empty($umhh8["data"]["type_id"]) || empty($umhh8["data"]["size_id"]))) { goto vMoYK; } goto cO64E; MHB1c: $JEN2k = $MH2Lf->getData(["fetchRow" => true, "where" => [["tBase.container_id = ?", $GTz6J->id]]]); goto Bp6KO; l3zGQ: $OVHZR->setTable("container"); goto D0eTk; gumxx: vMoYK: goto c5S0v; ldgcX: $MH2Lf = new My_Model(); goto Fxu5D; Q2WkD: } protected function checkContainerSizeAndType($xfU2e) { goto deI6X; ajy3n: $ZVQ2Z->setPrimaryKey("id"); goto rk4MT; OJnkm: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto lVHYv; rjSaB: e01Sd: goto OJnkm; pu0OX: return $this->_returnData(["error_code" => 54]); goto rjSaB; GsI0i: if (!empty($GTz6J->id)) { goto e01Sd; } goto pu0OX; eFIJV: $ZVQ2Z->setTable("container_iso_46"); goto ajy3n; rk4MT: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.iso_66 = ?", $xfU2e[0]]]]); goto GsI0i; deI6X: $ZVQ2Z = new My_Model(); goto eFIJV; lVHYv: } protected function checkContainerLadenOrEmpty($YUkyb = '') { goto c0hvf; XOdhW: return $this->_returnData(["error_code" => 58, "data" => $tjGq6]); goto Pv5hx; Pv5hx: acG1T: goto pIfQx; hS_x5: if ($tjGq6) { goto acG1T; } goto XOdhW; pIfQx: return $this->_returnData(["error_code" => 0, "data" => $tjGq6]); goto wGx8j; c0hvf: $tjGq6 = $YUkyb == 5 ? 1 : ($YUkyb == 4 ? 2 : 0); goto hS_x5; wGx8j: } protected function checkContainerReleaseExist($cnNVZ, $GHeN7 = 0) { goto P3sci; P3sci: $ZVQ2Z = new My_Model(); goto c1W1O; GS5rF: return $this->_returnData(["error_code" => 62]); goto wvV77; ku6vN: if (!empty($wG9VX->id)) { goto V7zCv; } goto GS5rF; c1W1O: $ZVQ2Z->setTable("container_release_order_no"); goto Zsnwo; LO9Hc: UwMTw: goto UZrfd; wvV77: V7zCv: goto aS6aO; RseXJ: $yf1Mp["where"][] = ["tBase.container_size_id = ?", $GHeN7]; goto LO9Hc; brORd: return $this->_returnData(["error_code" => 62]); goto dBVzm; x42J7: return $this->_returnData(["error_code" => 0, "data" => $Fo6qy->toArray()]); goto MMc0i; aS6aO: $ZVQ2Z = new My_Model(); goto jq12S; RsBV6: $wG9VX = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.container_release_order_no = ?", $cnNVZ]]]); goto ku6vN; pe2gu: $yf1Mp = ["fetchRow" => true, "where" => [["tBase.container_release_no_id = ?", $wG9VX->id]]]; goto D2NOc; dBVzm: PHNWM: goto x42J7; UZrfd: $Fo6qy = $ZVQ2Z->getData($yf1Mp); goto zcDu7; Zsnwo: $ZVQ2Z->setPrimaryKey("id"); goto RsBV6; zcDu7: if (!empty($Fo6qy->id)) { goto PHNWM; } goto brORd; jq12S: $ZVQ2Z->setTable("container_release_order"); goto s7w4I; s7w4I: $ZVQ2Z->setPrimaryKey("id"); goto pe2gu; D2NOc: if (!$GHeN7) { goto UwMTw; } goto RseXJ; MMc0i: } protected function getContainerMovementByContainerIdAndMovementType($RDSCB) { goto yu_XM; LX14Y: if (!empty($OvPGu->id)) { goto oIoN_; } goto nlAiJ; nlAiJ: return $this->_returnData(["error_code" => 0]); goto toQbc; yu_XM: $OvPGu = $this->getMovementId($RDSCB, $this->_movementType); goto LX14Y; toQbc: oIoN_: goto VlZFi; VlZFi: return $this->_returnData(["error_code" => 0, "data" => $OvPGu->toArray()]); goto B3dDj; B3dDj: } protected function checkContainerMovementByContainerIdAndMovementType($RDSCB) { goto N9RyP; DWVDJ: if (!empty($OvPGu->id)) { goto SwQap; } goto Rv3UA; vO477: return $this->_returnData(["error_code" => 0, "data" => $OvPGu->toArray()]); goto Ox_UO; Rv3UA: return $this->_returnData(["error_code" => "62c"]); goto nG2JP; nG2JP: SwQap: goto vO477; N9RyP: $OvPGu = $this->getMovementId($RDSCB, $this->_movementType); goto DWVDJ; Ox_UO: } protected function checkParkingExist($PvDMH) { goto n67Xv; rfGgc: return $this->_returnData(["error_code" => 0, "data" => $oNPMp->toArray()]); goto X3VcX; fp3wr: kYe8m: goto rfGgc; XHMPj: $ZVQ2Z->setPrimaryKey("id"); goto Q4MMk; YnZlk: $ZVQ2Z->setTable("container_parking_list"); goto XHMPj; jxPkG: return $this->_returnData(["error_code" => 62]); goto fp3wr; n67Xv: $ZVQ2Z = new My_Model(); goto YnZlk; Q4MMk: $oNPMp = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.parking_list_no = ?", $PvDMH]]]); goto KYS28; KYS28: if (!empty($oNPMp->id)) { goto kYe8m; } goto jxPkG; X3VcX: } protected function checkBookingNoExist($Wh1a5) { goto PGLCi; wsm8W: $ziKI4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.booking_no = ?", $Wh1a5]]]); goto GjN3H; PGLCi: $ZVQ2Z = new My_Model(); goto qIYb4; bVkMe: return $this->_returnData(["error_code" => 0, "data" => $ziKI4->toArray()]); goto y753C; n2VfO: return $this->_returnData(["error_code" => 62]); goto P6vYP; qIYb4: $ZVQ2Z->setTable("booking_no"); goto xjQmk; P6vYP: VR01u: goto bVkMe; xjQmk: $ZVQ2Z->setPrimaryKey("id"); goto wsm8W; GjN3H: if (!empty($ziKI4->id)) { goto VR01u; } goto n2VfO; y753C: } protected function checkTimeDepotOut($JTEQN, $bwkB1) { goto AQOL2; K6UQE: return $this->_returnData(["error_code" => "72a"]); goto vvdpI; PWD2_: if (!($bwkB1[1][1] <= date("YmdHi", strtotime($JTEQN)))) { goto jhp52; } goto K6UQE; aS7W3: $uvuyG = substr($bwkB1[1][1], 0, 4) . "-" . substr($bwkB1[1][1], 4, 2) . "-" . substr($bwkB1[1][1], 6, 2) . " " . substr($bwkB1[1][1], 8, 2) . ":" . substr($bwkB1[1][1], 10, 2) . ":"; goto hTsP9; hTsP9: return $this->_returnData(["error_code" => 0, "data" => $uvuyG]); goto WOMJK; rgPoC: TFPF7: goto PWD2_; vvdpI: jhp52: goto aS7W3; AQOL2: if (!(empty($bwkB1[1][1]) || strlen($bwkB1[1][1]) != 12)) { goto TFPF7; } goto BgiGz; BgiGz: return $this->_returnData(["error_code" => "b"]); goto rgPoC; WOMJK: } protected function checkTimeDepotOut2($bwkB1) { goto s80bx; tjCWl: return $this->_returnData(["error_code" => "72b"]); goto VqjFj; s80bx: if (!(empty($bwkB1[1]) || strlen($bwkB1[1]) != 12 || substr($bwkB1[1], 8, 2) >= 24)) { goto woKiM; } goto tjCWl; XnS7V: $uvuyG = substr($bwkB1[1], 0, 4) . "-" . substr($bwkB1[1], 4, 2) . "-" . substr($bwkB1[1], 6, 2) . " " . substr($bwkB1[1], 8, 2) . ":" . substr($bwkB1[1], 10, 2) . ":00"; goto vUlrY; VqjFj: woKiM: goto XnS7V; vUlrY: return $this->_returnData(["error_code" => 0, "data" => $uvuyG]); goto Eh_l1; Eh_l1: } protected function checkLocation1And2($g9QIX, $phaEU, $B5fLb, $KmW66 = '') { goto JbsWR; JbsWR: $ZVQ2Z = new My_Model(); goto P6Fnf; SAVGr: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.location1 = ?", $phaEU], ["tBase.location2 = ?", $B5fLb]]]); goto chJ3E; szgfC: return $this->_returnData(["error_code" => 83]); goto xg0zC; vJGS0: $ZVQ2Z->setPrimaryKey("id"); goto SAVGr; xg0zC: X1jTA: goto qA7wP; chJ3E: if (!empty($GTz6J->id)) { goto X1jTA; } goto szgfC; P6Fnf: $ZVQ2Z->setTable("edi_config"); goto vJGS0; qA7wP: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto UsnQj; UsnQj: } protected function checkLocation1And2ForLoadingDischarge($g9QIX, $phaEU) { goto I1mPM; QGFv4: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.location1 = ?", $phaEU]]]); goto ek1yu; ek1yu: if (!empty($GTz6J->id)) { goto tRzK4; } goto omfut; Yewcw: tRzK4: goto ggaRU; W6Ck8: $ZVQ2Z->setPrimaryKey("id"); goto QGFv4; I1mPM: $ZVQ2Z = new My_Model(); goto J4AlY; J4AlY: $ZVQ2Z->setTable("edi_config"); goto W6Ck8; omfut: return $this->_returnData(["error_code" => 83]); goto Yewcw; ggaRU: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto rTIPP; rTIPP: } protected function checkSealNumber($xfU2e) { return $this->_returnData(["error_code" => 0, "data" => $xfU2e]); } protected function checkSeal($IGfQC = '', $xfU2e = '') { goto hp9fo; bn_fA: eNrQx: goto mijxQ; mijxQ: return $this->_returnData(["error_code" => 0, "data" => $IGfQC]); goto wFiHw; EYSdb: return $this->_returnData(["error_code" => 93]); goto bn_fA; hp9fo: if (in_array($xfU2e, ["CA", "SH", "TO"])) { goto eNrQx; } goto EYSdb; wFiHw: } protected function checkSealGateInEmpty($IGfQC = '', $xfU2e = '') { return $this->_returnData(["error_code" => 0, "data" => $IGfQC]); } protected function checkCommodity($Gj_pw = '') { goto Q62WM; Q62WM: if (!empty($Gj_pw)) { goto x86CI; } goto EyX3K; IlRfH: return $this->_returnData(["error_code" => 0, "data" => $Gj_pw]); goto gMaOP; EyX3K: x86CI: goto IlRfH; gMaOP: } protected function checkRemark($lOF4f = '') { goto Yg_66; Pr0mM: return $this->_returnData(["error_code" => 0, "data" => $lOF4f]); goto CCEBB; Yg_66: if (!empty($lOF4f)) { goto FOOXt; } goto GsCLx; GsCLx: FOOXt: goto Pr0mM; CCEBB: } protected function checkTruckNo($i_S6C = '') { return $this->_returnData(["error_code" => 0, "data" => $i_S6C]); } protected function checkTruckType($ZkbET = '') { return $this->_returnData(["error_code" => 0, "data" => $ZkbET]); } protected function checkTruckOwner($t3myj = '') { return $this->_returnData(["error_code" => 0, "data" => $t3myj]); } protected function checkCompareRecipientsReference($ZW7rT, $SawN4) { goto yEeYw; iONFz: zqKLR: goto Z41nB; v4Lrl: return $this->_returnData(["error_code" => 143]); goto iONFz; Z41nB: return $this->_returnData(["error_code" => 0]); goto VaKfv; yEeYw: if (!($ZW7rT != $SawN4)) { goto zqKLR; } goto v4Lrl; VaKfv: } protected function checkDischargeExist($T518I, $RDSCB) { goto lCNo1; LJKNQ: if (!empty($ReQ71->container_loading_id)) { goto nmIYJ; } goto LYmx3; LYmx3: return $this->_returnData(["error_code" => 62]); goto hd23C; wzYzw: return $this->_returnData(["error_code" => 62]); goto hzIvA; C2i4w: $mXMB3 = new My_Model(); goto gZO8k; hzIvA: u9j3I: goto Bhelc; lCNo1: $J3y46 = new My_Model(); goto HgkQY; E91WV: WwwHO: goto Y36WD; QktHp: $TLbw3->setTable("bill_of_lading_detail"); goto joAUE; Bhelc: return $this->_returnData(["error_code" => 0, "data" => $AKSbz, "checkBillOfLadingNo" => $rgaPu]); goto TLxei; WWDIG: $AKSbz = $mXMB3->getData(["fetchRow" => true, "where" => [["tBase.loading_id = ?", $ReQ71->container_loading_id]]]); goto EMur9; fJ9Uo: return $this->_returnData(["error_code" => 62]); goto E91WV; EMur9: if (!empty($AKSbz->id)) { goto u9j3I; } goto wzYzw; YS9d8: $rgaPu = $J3y46->getData(["fetchRow" => true, "where" => [["tBase.bill_of_lading_no = ?", $T518I]]]); goto ODBz8; ODBz8: if (!empty($rgaPu->id)) { goto WwwHO; } goto fJ9Uo; gZO8k: $mXMB3->setTable("container_discharge"); goto hheYc; nAdzj: $J3y46->setPrimaryKey("id"); goto YS9d8; LRfYE: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBase.bill_of_lading_no_id = ?", $rgaPu->id], ["tBase.container_id = ?", $RDSCB]]]); goto LJKNQ; hheYc: $mXMB3->setPrimaryKey("id"); goto WWDIG; Y36WD: $TLbw3 = new My_Model(); goto QktHp; hd23C: nmIYJ: goto C2i4w; joAUE: $TLbw3->setPrimaryKey("id"); goto LRfYE; HgkQY: $J3y46->setTable("bill_of_lading_no"); goto nAdzj; TLxei: } protected function checkDischargeExistByContainerId($RDSCB) { goto vUSQ0; zuLPn: $TLbw3->setTable("bill_of_lading_detail"); goto maSyY; ZxxAj: $TLbw3 = new My_Model(); goto zuLPn; l1sX4: return $this->_returnData(["error_code" => 62]); goto vta8a; yV_P8: Pu2Ru: goto umzGK; FpuSY: echo "=> bill_of_lading_no_id = " . $OvPGu->bill_of_lading_no_id . "
\xa"; goto ZxxAj; Z73lG: $mXMB3->setPrimaryKey("id"); goto yFRYy; F1FTk: if (!(empty($OvPGu->id) || empty($OvPGu->bill_of_lading_no_id))) { goto DNFwG; } goto l1sX4; yi688: if (!empty($ReQ71->container_loading_id)) { goto HEb3p; } goto jNZub; lPaoX: if (!empty($AKSbz->id)) { goto Pu2Ru; } goto nPlK0; jNZub: return $this->_returnData(["error_code" => 62]); goto Aczxw; vUSQ0: echo "check container movement: \xd\xa"; goto hEwfz; I3OLk: echo "=> bill_of_lading_detail = " . $ReQ71->container_loading_id . "\xd
"; goto j1prz; IgIvZ: $mXMB3->setTable("container_discharge"); goto Z73lG; haG2u: $OvPGu = $this->getMovementId($RDSCB); goto F1FTk; umzGK: echo "=> container_discharge = " . $AKSbz->id . "\xd\xa"; goto F39OU; lqxon: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBase.bill_of_lading_no_id = ?", $OvPGu->bill_of_lading_no_id], ["tBase.container_id = ?", $RDSCB]]]); goto yi688; vta8a: DNFwG: goto FpuSY; hEwfz: echo "check container_id = " . $RDSCB . "\xd\xa"; goto haG2u; yFRYy: $AKSbz = $mXMB3->getData(["fetchRow" => true, "where" => [["tBase.loading_id = ?", $ReQ71->container_loading_id]]]); goto lPaoX; Aczxw: HEb3p: goto I3OLk; nPlK0: return $this->_returnData(["error_code" => 62]); goto yV_P8; maSyY: $TLbw3->setPrimaryKey("id"); goto lqxon; j1prz: $mXMB3 = new My_Model(); goto IgIvZ; F39OU: return $this->_returnData(["error_code" => 0, "data" => $AKSbz, "checkContainerMovement" => $OvPGu]); goto T2up_; T2up_: } protected function checkBillOfLadingNoByContainerIdAndVesselVoyageId($RDSCB, $nzPdC) { goto wCHI0; i2D67: $uosTO->setPrimaryKey("id"); goto uf2Kv; zqTiF: return $this->_returnData(["error_code" => 62]); goto MjT94; wCHI0: $uosTO = new My_Model(); goto ZfZ81; rSCEI: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBase.container_loading_id = ?", $TV6ME->id], ["tBase.container_id = ?", $RDSCB]]]); goto Opse0; vhixg: $TLbw3->setTable("bill_of_lading_detail"); goto OU7tI; qxXRG: $TLbw3 = new My_Model(); goto vhixg; ZfZ81: $uosTO->setTable("container_loading"); goto i2D67; uf2Kv: $TV6ME = $uosTO->getData(["fetchRow" => true, "where" => [["tBase.container_id = ?", $RDSCB], ["tBase.vessel_voyage_id = ?", $nzPdC]], "order" => "id DESC"]); goto rt1ca; ypr8q: return $this->_returnData(["error_code" => 0, "data" => $ReQ71]); goto uXgWu; N7NuD: F_dSB: goto qxXRG; OU7tI: $TLbw3->setPrimaryKey("id"); goto rSCEI; Opse0: if (!empty($ReQ71->bill_of_lading_id)) { goto fo27h; } goto zqTiF; DVvzQ: return $this->_returnData(["error_code" => 62]); goto N7NuD; rt1ca: if (!empty($TV6ME->id)) { goto F_dSB; } goto DVvzQ; MjT94: fo27h: goto ypr8q; uXgWu: } protected function checkDamage($B_oiC, $L_VlX, $n2G9a, $Kg42q) { goto fWwi7; Nm2a7: $KM_qN["damage"] = $Kg42q; goto BtwN8; lVb9B: tTrYc: goto Nm2a7; tl8cO: if (empty($n2G9a)) { goto tTrYc; } goto v1HOs; Un9nI: $KM_qN["containerGrade"] = $E0ZxK->getData(["fetchRow" => true, "where" => [["tBase.depot_id = ?", $B_oiC], ["tBase.type = ?", "grade"], ["tBase.depot_define = ?", $L_VlX]]]); goto lTBOi; lTBOi: xuC2X: goto lKfgm; ZFZ_r: bmNlE: goto lVb9B; lKfgm: if (!empty($KM_qN["containerGrade"]->vsico_define)) { goto Mcg43; } goto tM0__; b_LRV: $E0ZxK->setPrimaryKey("id"); goto uAg8F; Q4hMH: if (!empty($KM_qN["containerStatus"]->vsico_define)) { goto bmNlE; } goto ZFZ_r; uAg8F: if (empty($L_VlX)) { goto xuC2X; } goto Un9nI; HK4gY: $E0ZxK->setTable("container_condition_transcript"); goto b_LRV; tM0__: Mcg43: goto tl8cO; BtwN8: return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); goto MNIfw; fWwi7: $E0ZxK = new My_Model(); goto HK4gY; v1HOs: $KM_qN["containerStatus"] = $E0ZxK->getData(["fetchRow" => true, "where" => [["tBase.depot_id = ?", $B_oiC], ["tBase.type = ?", "status"], ["tBase.depot_define = ?", $n2G9a]]]); goto Q4hMH; MNIfw: } protected function checkGRWeight($YUkyb = '') { $YUkyb = $YUkyb <= 100 ? $YUkyb : $YUkyb / 1000; return $this->_returnData(["error_code" => 0, "data" => $YUkyb]); } protected function checkVesselVoyage($brBtO, $IHuAu) { goto lBzID; zQ3A2: $bUTR5 = substr($brBtO, 2, 2); goto EEQ9D; CdhbV: $Tcl3e = new My_Model(); goto ijDt0; VmrLH: return $this->_returnData(["error_code" => "62b"]); goto aE1Uc; AxGoX: $ZVQ2Z->setTable("vessel_voyage"); goto z5KA_; Xq6q8: if (!empty($oPbfV->id)) { goto vkBYy; } goto VmrLH; Wm_sQ: $Jr6S5 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.voyage = ?", $oPbfV->id], ["tBase.remark_of_voyage = ?", $cLsq7]]]); goto gR6GM; cIedZ: $oPbfV = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.vessel = ?", $dR5D2->id], ["tBase.year = ?", $SCsxK], ["tBase.serial = ?", $bUTR5]]]); goto Xq6q8; CNUub: $dR5D2 = $Tcl3e->getData(["fetchRow" => true, "where" => [["tBase.call_sign = ?", $IHuAu[0]]]]); goto buH3L; EEQ9D: $cLsq7 = substr($brBtO, -1); goto CdhbV; hlwkm: return $this->_returnData(["error_code" => 0, "data" => $Jr6S5->toArray()]); goto UwZHa; aE1Uc: vkBYy: goto qzv6C; L3Jjw: $ZVQ2Z->setPrimaryKey("id"); goto cIedZ; buH3L: if (!empty($dR5D2->id)) { goto y77Oo; } goto yv7E7; L20R4: $ZVQ2Z->setTable("voyage"); goto L3Jjw; eYGgB: $Tcl3e->setPrimaryKey("id"); goto CNUub; qzv6C: $ZVQ2Z = new My_Model(); goto AxGoX; ijDt0: $Tcl3e->setTable("vessel"); goto eYGgB; z5KA_: $ZVQ2Z->setPrimaryKey("id"); goto Wm_sQ; yb3fj: return $this->_returnData(["error_code" => "b"]); goto FFshS; FFshS: lFD9V: goto hlwkm; LOKM1: y77Oo: goto YOSuI; lBzID: $SCsxK = "20" . substr($brBtO, 0, 2); goto zQ3A2; yv7E7: return $this->_returnData(["error_code" => "62b"]); goto LOKM1; gR6GM: if (!empty($Jr6S5->id)) { goto lFD9V; } goto yb3fj; YOSuI: $ZVQ2Z = new My_Model(); goto L20R4; UwZHa: } protected function checkTerminalExist($qDz7q) { goto dHqdv; DyPWk: return $this->_returnData(["error_code" => 0, "data" => $GwvDe->toArray()]); goto G0_rg; RV9Ad: qlq_l: goto C6QKJ; qJtyD: $ZVQ2Z->setTable("terminal"); goto vyf7G; y2lVF: if (!empty($GTz6J->id)) { goto lZYXm; } goto pCPVj; FcWmz: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_terminal_id = ?", $GwvDe->id]]]); goto y2lVF; vyf7G: $ZVQ2Z->setPrimaryKey("id"); goto jdYuy; W6FAx: return $this->_returnData(["error_code" => 13]); goto RV9Ad; tCAPu: if (!empty($GwvDe->id)) { goto qlq_l; } goto W6FAx; TZZbF: $ZVQ2Z->setPrimaryKey("id"); goto FcWmz; C6QKJ: $ZVQ2Z = new My_Model(); goto KTEBg; pCPVj: return $this->_returnData(["error_code" => 13]); goto mqT99; dHqdv: $ZVQ2Z = new My_Model(); goto qJtyD; mqT99: lZYXm: goto DyPWk; jdYuy: $GwvDe = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.port_code = ?", $qDz7q]]]); goto tCAPu; KTEBg: $ZVQ2Z->setTable("edi_config"); goto TZZbF; G0_rg: } protected function checkArrivalTime($bwkB1) { goto GNvAP; gYDLC: return $this->_returnData(["error_code" => "72a"]); goto FBHBF; FBHBF: VOwMu: goto ss1q5; khmEv: return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); goto vPK2r; ss1q5: $KM_qN = substr($bwkB1, 0, 4) . "-" . substr($bwkB1, 4, 2) . "-" . substr($bwkB1, 6, 2) . " " . substr($bwkB1, 8, 2) . ":" . substr($bwkB1, 10, 2) . ":"; goto khmEv; GNvAP: if (!($bwkB1 >= date("YmdHi"))) { goto VOwMu; } goto gYDLC; vPK2r: } protected function checkDepartureTime($bwkB1) { $KM_qN = substr($bwkB1, 0, 4) . "-" . substr($bwkB1, 4, 2) . "-" . substr($bwkB1, 6, 2) . " " . substr($bwkB1, 8, 2) . ":" . substr($bwkB1, 10, 2) . ":00"; return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); } protected function checkLoadingTime($bwkB1) { goto lq4xe; lq4xe: if (!($bwkB1 < date("Ymd") || $bwkB1 >= date("YmdHi"))) { goto g_twV; } goto byVjU; z2W9r: $KM_qN = substr($bwkB1, 0, 4) . "-" . substr($bwkB1, 4, 2) . "-" . substr($bwkB1, 6, 2) . " " . substr($bwkB1, 8, 2) . ":" . substr($bwkB1, 10, 2) . "0"; goto aEy0i; tYD7T: g_twV: goto z2W9r; aEy0i: return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); goto rKnQj; byVjU: return $this->_returnData(["error_code" => "72c"]); goto tYD7T; rKnQj: } protected function checkLocation3And4($g9QIX, $s6T4l, $s4g18, $KmW66 = '') { goto QJNBC; Qjr3R: $ZVQ2Z->setPrimaryKey("id"); goto UYpfV; QJNBC: $ZVQ2Z = new My_Model(); goto o65Oe; qerSr: return $this->_returnData(["error_code" => 83]); goto tWiEo; nmibx: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto aWzku; tWiEo: wgeTq: goto nmibx; o65Oe: $ZVQ2Z->setTable("edi_config"); goto Qjr3R; UYpfV: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.location3 = ?", $s6T4l], ["tBase.location4 = ?", $s4g18]]]); goto YHLL2; YHLL2: if (!empty($GTz6J->id)) { goto wgeTq; } goto qerSr; aWzku: } protected function checkLocation3And4ForLoadingDischarge($g9QIX, $s6T4l) { goto VjbO4; mNstn: gDxG7: goto i6kLl; VjbO4: $ZVQ2Z = new My_Model(); goto EZ3GL; atApB: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.location3 = ?", $s6T4l]]]); goto aRNfT; EZ3GL: $ZVQ2Z->setTable("edi_config"); goto VVrmW; VVrmW: $ZVQ2Z->setPrimaryKey("id"); goto atApB; aRNfT: if (!empty($GTz6J->id)) { goto gDxG7; } goto J20AX; J20AX: return $this->_returnData(["error_code" => 83]); goto mNstn; i6kLl: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto UJHgZ; UJHgZ: } protected function checkStowageCellForDischarge($gJjMs = '') { goto NQS3X; NQS3X: if (!empty($gJjMs)) { goto YFrJZ; } goto tMpqS; tMpqS: YFrJZ: goto w6wyw; w6wyw: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto vdIz_; vdIz_: } protected function checkStowageCell($gJjMs = '') { goto PwqQA; YYNbG: return $this->_returnData(["error_code" => 106]); goto WbxAd; PwqQA: if (!empty($gJjMs)) { goto LltsK; } goto YYNbG; wR3X9: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto EVbBa; WbxAd: LltsK: goto wR3X9; EVbBa: } protected function checkLoadingIdExist($T518I, $RDSCB) { goto c6aZA; k1NR6: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBase.bill_of_lading_no_id = ?", $rgaPu->id], ["tBase.container_id = ?", $RDSCB]]]); goto B3put; MJ4xO: $rgaPu = $J3y46->getData(["fetchRow" => true, "where" => [["tBase.bill_of_lading_no = ?", $T518I]]]); goto w2esh; L38ZD: $J3y46->setPrimaryKey("id"); goto MJ4xO; jMwzM: return $this->_returnData(["error_code" => 62]); goto mKoO6; mKoO6: Z8onF: goto sLCiB; w2esh: if (!empty($rgaPu->id)) { goto lxMd1; } goto P9w5B; iVqSw: lxMd1: goto cW_eK; c6aZA: $J3y46 = new My_Model(); goto hKg0e; sLCiB: return $this->_returnData(["error_code" => 0, "data" => $ReQ71, "checkBillOfLadingNo" => $rgaPu]); goto QP7ga; B3put: if (!empty($ReQ71->container_loading_id)) { goto Z8onF; } goto jMwzM; cW_eK: $TLbw3 = new My_Model(); goto d8uo9; oW6rz: $TLbw3->setPrimaryKey("id"); goto k1NR6; d8uo9: $TLbw3->setTable("bill_of_lading_detail"); goto oW6rz; hKg0e: $J3y46->setTable("bill_of_lading_no"); goto L38ZD; P9w5B: return $this->_returnData(["error_code" => 62]); goto iVqSw; QP7ga: } protected function getTerminalByTerminalCode($qDz7q) { goto Drkkk; Y5epK: $ZVQ2Z->setTable("terminal"); goto gDBwY; X3zQ2: $GwvDe = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.port_code = ?", $qDz7q]]]); goto yeIT9; Cb5Me: return $this->_returnData(["error_code" => 9999999, "data" => $GwvDe]); goto B0gIX; yeIT9: if (!empty($GwvDe->id)) { goto pkpWi; } goto Cb5Me; Drkkk: $ZVQ2Z = new My_Model(); goto Y5epK; B0gIX: pkpWi: goto bP46_; gDBwY: $ZVQ2Z->setPrimaryKey("id"); goto X3zQ2; bP46_: } protected function checkTMP($xfU2e) { return $this->_returnData(["error_code" => 0, "data" => $xfU2e]); } protected function checkDGNote($RGHVM) { goto YxFuT; ja5jx: $e2aCT = $RGHVM[3] ? str_pad($RGHVM[3], 4, "0") : "0000"; goto VJGJK; haHCU: $aBH_s = $RGHVM[5] ? $RGHVM[5] : "0"; goto tg7_g; YxFuT: $JXupb = $RGHVM[2][0] ? number_format($RGHVM[2][0], 1, , ",") : "0.0"; goto ja5jx; VJGJK: $hnHe0 = $RGHVM[4][0] ? str_pad($RGHVM[4][0], 3, "0") : ""; goto haHCU; tg7_g: return $JXupb . "-" . $e2aCT . "-" . $hnHe0 . "-" . $aBH_s; goto Ktw1c; Ktw1c: } protected function checkImportCode($gJjMs) { goto gDjaS; D_xzI: return $this->_returnData(["error_code" => 56]); goto ZgAGK; gDjaS: if (!(empty($gJjMs) || !in_array($gJjMs, [3]))) { goto X1Pul; } goto D_xzI; ZgAGK: X1Pul: goto c1PUn; c1PUn: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto b3xOc; b3xOc: } protected function checkExportCode($gJjMs) { goto F93Es; t_rIh: return $this->_returnData(["error_code" => 56]); goto Pv0A6; Pv0A6: H7r5T: goto PpRIk; F93Es: if (!(empty($gJjMs) || !in_array($gJjMs, [2]))) { goto H7r5T; } goto t_rIh; PpRIk: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto Dvbt6; Dvbt6: } }



 goto FdBf4; UtIlF: function getFullHourEDI($fKBpn) { goto BmjR2; BmjR2: if (!(strlen($fKBpn) == 4)) { goto XcOwW; } goto MaX37; viu1k: return $fKBpn; goto dCOJL; FWTkp: XcOwW: goto viu1k; MaX37: return $fKBpn . "00"; goto FWTkp; dCOJL: } goto d9k2K; FdBf4: function getFullDayEDI($DoHrk) { goto M9yya; M9yya: if (!(strlen($DoHrk) == 6)) { goto JBMyS; } goto fDx9g; fDx9g: return "" . $DoHrk; goto ckwQG; cA0_x: return $DoHrk; goto dh9d2; ckwQG: JBMyS: goto cA0_x; dh9d2: } goto UtIlF; yBjbN: function getFormatHour($q8fNj) { goto ZBn8F; bYmZo: LuHAN: goto cBRTR; ZBn8F: if (!(strlen($q8fNj) == 6)) { goto LuHAN; } goto HfghC; HfghC: return substr($q8fNj, 0, 2) . ":" . substr($q8fNj, 2, 2) . ":" . substr($q8fNj, 4, 2); goto bYmZo; cBRTR: return $q8fNj; goto wwn1u; wwn1u: } goto LIlvt; d9k2K: function getFormatDay($DoHrk) { goto r02P6; umguU: return substr($DoHrk, 0, 4) . "-" . substr($DoHrk, 4, 2) . "-" . substr($DoHrk, 6, 2); goto hG4m4; mUP_b: return $DoHrk; goto M5wz2; r02P6: if (!(strlen($DoHrk) == 8)) { goto dxITs; } goto umguU; hG4m4: dxITs: goto mUP_b; M5wz2: } goto yBjbN; LIlvt: class My_EDI_Validate { protected $_ediRawId = 0; protected $_ediEmailRawId = 0; protected $_checkEdiInvalid = 1; protected $_currentLineCheck = 0; protected $_name = ''; protected $_primaryKeysForUpdate = []; protected $_arrMovementType = [1 => ["name" => "gate out empty", "type" => '', "field" => "depot_out", "table" => "container_depot_out"], 2 => ["name" => "gate in laden", "type" => '', "field" => "gate_in", "table" => "container_gate_in"], 3 => ["name" => "loading", "type" => '', "field" => "loading", "table" => "container_loading"], 4 => ["name" => "discharge", "type" => '', "field" => "discharge", "table" => "container_discharge"], 5 => ["name" => "gate out laden", "type" => '', "field" => "gate_out", "table" => "container_gate_out"], 6 => ["name" => "gate in empty", "type" => '', "field" => "depot_in", "table" => "container_depot_in"]]; protected function __construct() { } public function getediRawId($hWbrs) { goto mFzKM; m8N1E: $PGO4q = json_decode($fEBuD->edi_json_array, true); goto H6Ucj; N4hTq: tEJNC: goto m8N1E; rOOIc: $ZVQ2Z = new My_Model(); goto IBU3M; mFzKM: $this->_ediRawId = $hWbrs; goto rOOIc; rmmH9: $ZVQ2Z->_primaryKey = "id"; goto rze_4; IBU3M: $ZVQ2Z->_name = "edi_raw"; goto rmmH9; emCUQ: return false; goto N4hTq; rze_4: $fEBuD = $ZVQ2Z->getData(["fetchRow" => true, "where" => ["id = ?", $hWbrs]]); goto qrOrO; qrOrO: if (!empty($fEBuD->id)) { goto tEJNC; } goto emCUQ; H6Ucj: return $PGO4q; goto ntI6w; ntI6w: } protected function updateData($PGO4q) { goto wowXG; W_6qq: m3BXE: goto D158M; Bb1m6: mkdir(__DIR__ . DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . date("Y-m-d"), 755); goto zh1UX; wowXG: $MneTy = []; goto HxZze; Sz7RN: $ZVQ2Z->_name = $this->_name; goto KXpqH; D158M: $ZVQ2Z = new My_Model(); goto Sz7RN; IhSzX: if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . date("Y-m-d"))) { goto m3BXE; } goto Bb1m6; lSvT5: foreach ($MneTy as $PINzY) { goto g8T3c; lWhk4: $iNfx9->updateData(["end_date_time" => $iGvu2["date_time"]], $OvPGu->movement_id); goto VVk0o; eDb_g: $iGvu2 = $PINzY["data"]; goto Y28UA; SPLZ6: dTVQK: goto pKYiF; Ft0wX: $MzCl8->_primaryKey = "id"; goto t8jvZ; UwwkO: l1uYa: goto WgXjs; F_pXb: $kYJoq = []; goto pl4Bk; goJu2: Z6IGc: goto QrSXa; rHElg: SAvdM: goto JNaLF; iNlSS: $tJF_M["booking_no_id"] = $vTiJM->booking_no_id; goto Rej3H; jjVVh: goto cIYle; goto Mnknf; b6FCM: $pf7aS = []; goto HJoVq; vwuZL: $MzCl8->_name = "container_movement"; goto Px7Fv; WSytR: if (empty($PINzY["data"]["extend_bill_of_lading_no_id"])) { goto RrBMg; } goto Rzob6; n16yr: $tJF_M["booking_no_id"] = $iGvu2["booking_no_id"]; goto OkNoF; Wcm3Q: $ZVQ2Z->_primaryKey = "id"; goto KEJq0; lHI7V: if (empty($vTiJM->commodity_id)) { goto tMrzF; } goto hvMs6; Lra26: $iNfx9->_primaryKey = "id"; goto lWhk4; Q9S6C: $ZVQ2Z->updateData($iGvu2, $G9ZFl->id); goto T1k7c; pKYiF: if (!empty($G9ZFl->id)) { goto l1uYa; } goto uLvSq; Mnknf: hX7cS: goto lsJuH; t8jvZ: $MzCl8->updateData(["stuffing_spin" => 0], $vTiJM->id); goto qACXP; qhlLv: if (empty($UzR3H["data"]["movement_id"])) { goto dTVQK; } goto oL5ao; f097Z: swCGi: goto WHdBP; as4Zh: Vsv2m: goto SPLZ6; x0Esl: if (!($this->_movementType == 3 && !empty($iGvu2["booking_no_id"]) && !empty($iGvu2["vessel_voyage_id"]) && !empty($iGvu2["container_id"]))) { goto SAvdM; } goto U29PQ; YUY1U: $tJF_M = []; goto rxKu4; rqhhm: if (!($this->_movementType == 1 && isset($vTiJM->id))) { goto AfO8B; } goto oMPxx; yD0Mh: DnbZ5: goto E4wF1; r_534: if (in_array($this->_movementType, [1, 2, 3, 4, 5, 6]) && !empty($PINzY["data"]["container_movement_container_id"])) { goto hX7cS; } goto Mw0S1; VmOVD: $tJF_M = []; goto hLOB8; YZrq6: file_put_contents(__DIR__ . DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . "0_no_container_movement_container_id-" . $this->_movementType . ".txt", "\xd\xa\xd\xa\xdataEDI:" . date("Y-m-d H:i:s") . ":" . json_encode($PINzY) . "
", FILE_APPEND); goto C5H8S; O20_S: if (empty($PINzY["data"]["extend_booking_no_id"])) { goto p2vJK; } goto ILJen; GqpUS: if (empty($G9ZFl->id)) { goto Vsv2m; } goto Wcm3Q; KEJq0: $ZVQ2Z->updateData($iGvu2, $G9ZFl->id); goto VufS2; hvMs6: $tJF_M["commodity_id"] = $vTiJM->commodity_id; goto j67Sd; yypUR: Ayfhc: goto lHI7V; Mw0S1: echo "
\xaNOOOOO\xd
"; goto WXPUq; qISy0: ejfWk: goto YOjzD; Rej3H: ZnPaz: goto WZamP; VVzXi: $MzCl8->_primaryKey = "id"; goto mAvcV; YOjzD: if (empty($tJF_M)) { goto kjLZA; } goto bq8Oo; mAvcV: $tJF_M = []; goto Hk4tG; oL5ao: echo "\xd\xaUpdate=>", $UzR3H["data"]["movement_id"], ",
"; goto TZSbT; CQZlT: ma0qy: goto fB7ov; tFPEV: $kYJoq["previous_date_time"] = $vTiJM->date_time; goto CQZlT; oMPxx: $MzCl8 = new My_Model(); goto v2o1c; aIJW4: if (!(!empty($OvPGu->movement_id) && $OvPGu->movement_type != $this->_movementType && !empty($iGvu2["date_time"]) && strtotime($iGvu2["date_time"]) > strtotime($OvPGu->date_time))) { goto bVnH8; } goto UffS6; zilDu: if (!($this->_movementType == 6 && !empty($vTiJM->id))) { goto qhZoZ; } goto Q8XmO; SujVN: m3Rvf: goto w4_2m; UffS6: $iNfx9 = new My_Model(); goto sm9T6; OQUPP: $ZVQ2Z->updateData($tJF_M, $C2rJB); goto WI6b7; WXPUq: if (!empty($PINzY["id"])) { goto Tq2FP; } goto M_whq; j67Sd: tMrzF: goto fIEKl; xFGC7: $kYJoq["date_time"] = $PINzY["data"]["date_time"]; goto tTFZa; uT2HK: Tq2FP: goto b6FCM; k1SM4: qhZoZ: goto x0Esl; xMVaN: $tJF_M["commodity_id"] = 0; goto uVgLk; dV68q: AfO8B: goto kVQzA; rxKu4: if (empty($vTiJM->booking_no_id)) { goto Ayfhc; } goto hmnik; U29PQ: $DGWEV = new My_Model(); goto nedmg; GRgNq: nzn_v: goto IyFhY; VufS2: $C2rJB = $G9ZFl->id; goto FxAVW; FxAVW: echo "\xd\Update=>", $C2rJB, ",
"; goto as4Zh; iYCJj: $wAYkZ = ["remark", "damage_remark", "damage_description"]; goto QIX_l; Egyry: if (!(!in_array($this->_movementType, [1, 4]) && isset($vTiJM->id))) { goto qYI_N; } goto bpbAl; VVk0o: bVnH8: goto OS1Qh; rOHP2: $MW4go = !empty($PINzY["data"]["terminal_id"]) ? $PINzY["data"]["terminal_id"] : (!empty($PINzY["data"]["depot_id"]) ? $PINzY["data"]["depot_id"] : 0); goto oZ3Vc; yTZ39: $this->updateDataMovement($PINzY["data"]["container_movement_container_id"], $PINzY["data"]["container_movement_movement_type"], $C2rJB, $kYJoq, $MW4go); goto GRgNq; oZ3Vc: if (!($C2rJB && $PINzY["data"]["container_movement_container_id"] && $PINzY["data"]["container_movement_movement_type"])) { goto nzn_v; } goto yTZ39; hmnik: $tJF_M["booking_no_id"] = $vTiJM->booking_no_id; goto yypUR; WI6b7: dOtC3: goto SujVN; hW0ZU: if (isset($G9ZFl->id) && $this->_updateAllowWhenRecordExist) { goto r2WgJ; } goto ZvGUS; C5H8S: goto BuANV; goto YA90J; WgXjs: cIYle: goto mJSiw; WZamP: if (empty($vTiJM->commodity_id)) { goto swCGi; } goto JNFIn; QrSXa: GxeJK: goto zilDu; fIEKl: if (empty($tJF_M)) { goto Z6IGc; } goto yobnD; Y28UA: unset($iGvu2["container_movement_container_id"], $iGvu2["container_movement_movement_type"], $iGvu2["extend_booking_no_id"], $iGvu2["extend_bill_of_lading_no_id"]); goto iYCJj; nedmg: $DGWEV->_name = "loading_order"; goto pgcPf; Rzob6: $kYJoq["bill_of_lading_no_id"] = $PINzY["data"]["extend_bill_of_lading_no_id"]; goto Q9unM; WHdBP: if (empty($tJF_M)) { goto dOtC3; } goto OQUPP; JNaLF: $NWvdg = new My_Revenue_DMDT(); goto Egyry; rU025: $tJF_M["booking_no_id"] = ''; goto xMVaN; l5oar: $G9ZFl = (object) []; goto qhlLv; Hk4tG: if (empty($iGvu2["booking_no_id"])) { goto U9INv; } goto n16yr; YA90J: hn_pe: goto eDb_g; w4_2m: if (!($this->_movementType == 3 && !empty($vTiJM->id) && isset($C2rJB))) { goto GxeJK; } goto YUY1U; uLvSq: $C2rJB = $ZVQ2Z->insertData($iGvu2); goto jdtlR; cZfPq: q8eT1: goto jjVVh; pgcPf: $DGWEV->_primaryKey = "id"; goto yvqu8; JNFIn: $tJF_M["commodity_id"] = $vTiJM->commodity_id; goto f097Z; pdbqx: r2WgJ: goto Q9S6C; ZvGUS: $C2rJB = $ZVQ2Z->insertData($iGvu2); goto NzEqE; Q9unM: RrBMg: goto rOHP2; ILJen: $kYJoq["booking_no_id"] = $PINzY["data"]["extend_booking_no_id"]; goto y254E; Xb352: $ZVQ2Z->updateData(["stuffing_spin" => $vTiJM->stuffing_spin], $C2rJB); goto vGfQy; M_whq: goto BuANV; goto uT2HK; gqzMZ: rgwHS: goto r_534; TZSbT: $G9ZFl = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["id = ?", $UzR3H["data"]["movement_id"]]]]); goto GqpUS; QIX_l: foreach ($wAYkZ as $PbCLN) { goto iWSGO; RrJye: if (!(!empty($iGvu2[$PbCLN]) && is_array($iGvu2[$PbCLN]))) { goto iRPH5; } goto IcMAJ; Q3odK: iRPH5: goto oQ9RH; Fp_yd: goto W6fXg; goto t75cq; t75cq: V6cLV: goto RrJye; iWSGO: if (!(empty($iGvu2[$PbCLN]) || is_string($iGvu2[$PbCLN]))) { goto V6cLV; } goto Fp_yd; IcMAJ: $iGvu2[$PbCLN] = implode(":", $iGvu2[$PbCLN]); goto Q3odK; oQ9RH: W6fXg: goto A6zqC; A6zqC: } goto gqzMZ; kVQzA: if (!($this->_movementType == 2 && !empty($vTiJM->id) && isset($C2rJB))) { goto m3Rvf; } goto VmOVD; lsJuH: $OvPGu = $this->getMovementId($PINzY["data"]["container_movement_container_id"]); goto aIJW4; ko5sV: qYI_N: goto F_pXb; sm9T6: $iNfx9->_name = $this->_arrMovementType[$OvPGu->movement_type]["table"]; goto Lra26; Px7Fv: $MzCl8->_primaryKey = "id"; goto D76by; HJoVq: foreach ($PINzY["id"] as $GKyMr => $PbCLN) { $pf7aS[] = [$GKyMr . " = ?", $PbCLN]; qLbcl: } goto yD0Mh; vGfQy: $MzCl8 = new My_Model(); goto leVK6; jdtlR: echo "\xd\xaInsert=>", $C2rJB, ",\xd\xa"; goto UwwkO; hLOB8: if (empty($vTiJM->booking_no_id)) { goto ZnPaz; } goto iNlSS; cPK8c: if (empty($iGvu2["commodity_id"])) { goto ejfWk; } goto Kktnk; OkNoF: U9INv: goto cPK8c; HXd4B: try { goto Neyyv; IleJt: $b24SX = new My_Cost_Base(); goto URPj7; Neyyv: if (!isset($vTiJM->id)) { goto l8Z7R; } goto IleJt; MPscB: l8Z7R: goto cpkuk; URPj7: $b24SX->calc($this->_movementType, $vTiJM->id); goto MPscB; cpkuk: } catch (Exception $C1t_K) { } goto IEKAp; yTv2d: if (!($this->_movementType == 6 && isset($vTiJM->id))) { goto T3Mev; } goto Xb352; NzEqE: goto q8eT1; goto pdbqx; leVK6: $MzCl8->_name = "container_movement"; goto Ft0wX; D76by: $tJF_M = []; goto rU025; y254E: p2vJK: goto WSytR; IEKAp: BuANV: goto n88Pf; OLra_: kjLZA: goto dV68q; bq8Oo: $MzCl8->updateData($tJF_M, $vTiJM->id); goto OLra_; pl4Bk: if (empty($vTiJM->date_time)) { goto ma0qy; } goto tFPEV; T1k7c: $C2rJB = $G9ZFl->id; goto cZfPq; yvqu8: $DGWEV->updateDataWhere(["load_vessel" => 1], ["booking_no_id = ?" => $iGvu2["booking_no_id"], "vessel_voyage_id = ?" => $iGvu2["vessel_voyage_id"], "container_id = ?" => $iGvu2["container_id"]]); goto rHElg; mJSiw: $vTiJM = $this->getMovementId($PINzY["data"]["container_movement_container_id"]); goto yTv2d; Kktnk: $tJF_M["commodity_id"] = $iGvu2["commodity_id"]; goto qISy0; uVgLk: $MzCl8->updateData($tJF_M, $vTiJM->id); goto k1SM4; v2o1c: $MzCl8->_name = "container_movement"; goto VVzXi; fB7ov: if (empty($PINzY["data"]["date_time"])) { goto isZTp; } goto xFGC7; yobnD: $ZVQ2Z->updateData($tJF_M, $C2rJB); goto goJu2; Q8XmO: $MzCl8 = new My_Model(); goto vwuZL; qACXP: T3Mev: goto rqhhm; IyFhY: try { goto WEgVd; KHxhI: if (!($this->_movementType == 2 && $C2rJB && isset($vTiJM->id))) { goto UaUYQ; } goto uMEXy; g5Uec: $NWvdg->calculatorDepotOut($C2rJB, $vTiJM->id); goto kGC6h; Pumgy: if (!($this->_movementType == 6 && $C2rJB && isset($vTiJM->id))) { goto ZinrT; } goto Axc41; GuqPL: $LaSB6 = new My_Revenue_OverWeight(); goto ATIX_; IkRHb: $NWvdg->calculatorDischarge($C2rJB, $vTiJM->id); goto I3x0T; Axc41: $NWvdg->calculatorAfterUpdateDepotIn($vTiJM->id); goto tH5FX; uMEXy: $NWvdg->calculatorAfterUpdateGateIn($C2rJB, $vTiJM->id); goto OAhRf; JGwTZ: if (!($this->_movementType == 3 && $C2rJB && isset($vTiJM->id))) { goto FUO0r; } goto BRnLX; iiC9A: FUO0r: goto Xs5Uj; qweg4: $NWvdg->calculatorAfterUpdateGateOut($C2rJB, $vTiJM->id); goto IOmbC; I3x0T: DjbeJ: goto qEadw; ATIX_: $LaSB6->calculator(["containerParkingId" => $PINzY["data"]["container_parking_id"], "containerId" => $PINzY["data"]["container_movement_container_id"]]); goto u7AT3; qEadw: if (!($this->_movementType == 5 && $C2rJB && isset($vTiJM->id))) { goto UJXbx; } goto qweg4; OAhRf: UaUYQ: goto JGwTZ; tH5FX: ZinrT: goto b7Ak4; BRnLX: $NWvdg->calculatorAfterUpdateLoading($vTiJM->id); goto iiC9A; IOmbC: UJXbx: goto Pumgy; kGC6h: MDV1s: goto KHxhI; Xs5Uj: if (!($this->_movementType == 4 && $C2rJB && isset($vTiJM->id))) { goto DjbeJ; } goto IkRHb; WEgVd: if (!($this->_movementType == 2 && $C2rJB && !empty($PINzY["data"]["container_parking_id"]) && !empty($PINzY["data"]["container_movement_container_id"]))) { goto Q_XmP; } goto GuqPL; X_sy3: if (!($this->_movementType == 1 && $C2rJB && isset($vTiJM->id))) { goto MDV1s; } goto g5Uec; u7AT3: Q_XmP: goto X_sy3; b7Ak4: } catch (Exception $C1t_K) { } goto HXd4B; g8T3c: if (!empty($PINzY["data"]["container_movement_container_id"])) { goto hn_pe; } goto YZrq6; bpbAl: try { $NWvdg->calculatorBeforeUpdate($vTiJM->id); } catch (Exception $C1t_K) { } goto ko5sV; E4wF1: $G9ZFl = $ZVQ2Z->getData(["fetchRow" => true, "where" => $pf7aS]); goto hW0ZU; OS1Qh: $UzR3H = $this->getContainerMovementByContainerIdAndMovementType($PINzY["data"]["container_movement_container_id"]); goto l5oar; tTFZa: isZTp: goto O20_S; n88Pf: } goto U4QxV; B9VTw: chgrp(__DIR__ . DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . date("Y-m-d"), "nginx"); goto W_6qq; KXpqH: $ZVQ2Z->_primaryKey = $this->_primaryKeysForUpdate; goto lSvT5; zh1UX: chown(__DIR__ . DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . date("Y-m-d"), "nginx"); goto B9VTw; HxZze: foreach ($PGO4q as $KM_qN) { goto EXSp9; hQMH_: $A0Dqe = []; goto gSENy; BpRwB: rBT0R: goto XQDll; WxLnJ: $MneTy[] = ["id" => $A0Dqe, "data" => $KM_qN]; goto nPbrl; XQDll: $KM_qN["edi_email_raw_id"] = $this->_ediEmailRawId; goto WxLnJ; EXSp9: $Jbp1L = 0; goto hQMH_; gSENy: foreach ($this->_primaryKeysForUpdate as $Md0C5) { goto TMe5e; Tyv4M: $Jbp1L = 1; goto ydSxY; ydSxY: goto MOSy6; goto xqzzs; TMe5e: if (!empty($KM_qN[$Md0C5])) { goto hg7JP; } goto Tyv4M; xqzzs: hg7JP: goto Tj6C6; EUsLj: MOSy6: goto lletD; Tj6C6: $A0Dqe[$Md0C5] = $KM_qN[$Md0C5]; goto EUsLj; lletD: } goto UTcDq; nPbrl: S0Cwr: goto LpsdU; UTcDq: Gn9pG: goto Chnoh; Chnoh: if (!(count($A0Dqe) < count($this->_primaryKeysForUpdate))) { goto rBT0R; } goto BpRwB; LpsdU: } goto k2bbz; k2bbz: cLh5J: goto IhSzX; U4QxV: O8_OH: goto M5bwp; M5bwp: } protected function getMovementId($RDSCB, $S5GPn = 0) { goto wjaud; dMEGe: aWKGq: goto TSz0d; efhzW: $yf1Mp["where"][] = ["movement_type = ?", $S5GPn]; goto dMEGe; wjaud: $MzCl8 = new My_Model(); goto fTwV7; fTwV7: $MzCl8->_name = "container_movement"; goto CbpPN; CbpPN: $MzCl8->_primaryKey = "id"; goto Lnq0r; ipm20: if (!$S5GPn) { goto aWKGq; } goto efhzW; Lnq0r: $yf1Mp = ["fetchRow" => true, "where" => [["container_id = ?", $RDSCB]]]; goto ipm20; TSz0d: return $MzCl8->getData($yf1Mp); goto vsk1g; vsk1g: } protected function updateDataMovement($RDSCB, $S5GPn, $PAa7c, $kYJoq, $MW4go = 0) { goto X_vm1; R0Wq2: goto R2Jfs; goto XVQeO; TmEZY: zG7QU: goto VEGwA; YfSL8: if (empty($kYJoq["booking_no_id"])) { goto zB1bB; } goto ZKyXF; P1Ed1: $kE84r = new My_Model(); goto Uy0iP; ifdoo: $gKNc3->insertData($KM_qN); goto D9LQV; c3VCk: $KM_qN["stuffing_spin"] = 0; goto TnkLH; o7Tkq: return; goto xcc7W; TnkLH: cGG5R: goto OXyKG; x8eGo: if ($S5GPn == 6 || empty($qjGl2->id)) { goto efY2b; } goto OcNge; XVQeO: efY2b: goto ifdoo; eGTgk: $vTiJM = $this->getMovementId($RDSCB); goto p2HPE; caJ4C: BdqNi: goto F27w2; xcc7W: s_Vd7: goto mmk82; LmfDU: zgIzx: goto trP_c; S1nXB: $KM_qN["bill_of_lading_no_id"] = $kYJoq["bill_of_lading_no_id"]; goto syMBy; ax29D: $kE84r->_primaryKey = "id"; goto sbjFK; OsZuU: if (!(!isset($vTiJM->id) || isset($vTiJM->movement_type) && $vTiJM->movement_type != $S5GPn)) { goto zgIzx; } goto UfexF; xR4Eq: $C2rJB = $MzCl8->insertData($KM_qN); goto AZ2La; f2aSi: if (empty($kYJoq["bill_of_lading_no_id"])) { goto f12a2; } goto buRQF; qHs8X: f12a2: goto tkrQn; tNZSa: $KM_qN["stuffing_spin"] = $vTiJM->stuffing_spin + 0.5; goto TmEZY; i1D_c: if (isset($vTiJM->id)) { goto IHoTo; } goto xR4Eq; OquHb: if (!($this->_movementType == 6)) { goto cGG5R; } goto c3VCk; zO2Ss: jFgDX: goto q8Jb7; HRk4j: if (!($vTiJM->movement_type == 2 && floor($vTiJM->stuffing_spin) != $vTiJM->stuffing_spin)) { goto zG7QU; } goto tNZSa; p2HPE: $KM_qN = []; goto EtID3; KwrtB: $KM_qN["movement_type"] = $S5GPn; goto xEyCU; UfexF: $tJF_M = ["container_id" => $RDSCB, "movement_type" => $S5GPn, "movement_id" => $PAa7c, "terminal_depot_id" => $MW4go]; goto YfSL8; X_vm1: $MzCl8 = new My_Model(); goto HrIs9; tkrQn: if (empty($kYJoq["date_time"])) { goto wFMQD; } goto fQ4HW; trP_c: $gKNc3 = new My_Model(); goto E2Sw8; D9LQV: goto R2Jfs; goto caJ4C; gF77r: $KM_qN["booking_no_id"] = $kYJoq["booking_no_id"]; goto jB7nZ; xEyCU: $KM_qN["movement_id"] = $PAa7c; goto i1D_c; AZ2La: goto RWrV3; goto SSWLK; syMBy: CueA_: goto BERBe; sbjFK: $kE84r->insertData($tJF_M); goto LmfDU; EtID3: if (!(in_array($this->_movementType, [1, 2, 3]) && !empty($kYJoq["booking_no_id"]))) { goto N_cbm; } goto gF77r; Q2TuZ: if (!(!empty($vTiJM->date_time) && strtotime($vTiJM->date_time) > strtotime($kYJoq["date_time"]))) { goto s_Vd7; } goto o7Tkq; BGc7m: $KM_qN["date_time"] = $kYJoq["date_time"]; goto Q2TuZ; mmk82: UrVlh: goto OquHb; fQ4HW: $tJF_M["date_time"] = $kYJoq["date_time"]; goto nmDn1; bpOXW: RWrV3: goto OsZuU; JD516: $KM_qN = ["container_id" => $RDSCB, $this->_arrMovementType[$S5GPn]["field"] => $PAa7c]; goto x8eGo; ZKyXF: $tJF_M["booking_no_id"] = $kYJoq["booking_no_id"]; goto miPnz; cN3AU: $qjGl2 = $gKNc3->getData(["fetchRow" => true, "where" => [["container_id = ?", $RDSCB]], "order" => "id DESC"]); goto JD516; buRQF: $tJF_M["bill_of_lading_no_id"] = $kYJoq["bill_of_lading_no_id"]; goto qHs8X; miPnz: zB1bB: goto f2aSi; jB7nZ: N_cbm: goto W3uIw; nmDn1: wFMQD: goto P1Ed1; rvUJJ: $KM_qN["previous_date_time"] = $kYJoq["previous_date_time"]; goto zO2Ss; MBJsK: $C2rJB = $vTiJM->id; goto bpOXW; OXyKG: $KM_qN["container_id"] = $RDSCB; goto KwrtB; F27w2: $gKNc3->updateData($KM_qN, $qjGl2->id); goto aMDaP; aMDaP: R2Jfs: goto W8060; HrIs9: $MzCl8->_name = "container_movement"; goto ecEg6; ecEg6: $MzCl8->_primaryKey = "id"; goto eGTgk; SSWLK: IHoTo: goto HRk4j; BERBe: if (empty($kYJoq["previous_date_time"])) { goto jFgDX; } goto rvUJJ; W3uIw: if (!(in_array($this->_movementType, [4, 5, 6]) && !empty($kYJoq["bill_of_lading_no_id"]))) { goto CueA_; } goto S1nXB; AmdpO: $gKNc3->_primaryKey = "id"; goto cN3AU; Uy0iP: $kE84r->_name = "container_movement_history_data"; goto ax29D; E2Sw8: $gKNc3->_name = "container_movement_history"; goto AmdpO; OcNge: if (!empty($qjGl2->id)) { goto BdqNi; } goto R0Wq2; q8Jb7: if (empty($kYJoq["date_time"])) { goto UrVlh; } goto BGc7m; VEGwA: $MzCl8->updateData($KM_qN, $vTiJM->id); goto MBJsK; W8060: } protected function _returnData($TYsG2) { goto UN9GU; UN9GU: if (empty($TYsG2["error_code"])) { goto GtnqF; } goto OJsYt; e93qz: if (!(isset($this->_currentRowCheck) && is_array($this->_currentRowCheck))) { goto YOdz3; } goto jsv5x; l7W1x: $ZVQ2Z->insert($KM_qN); goto PeehQ; rJgI9: BktUZ: goto QMFUh; WwW6u: $ZVQ2Z = new My_Model(); goto Grv33; IUyme: $ZVQ2Z->setPrimaryKey("id"); goto l7W1x; PeehQ: GtnqF: goto yRLuZ; Grv33: $ZVQ2Z->setTable("edi_error"); goto IUyme; jsv5x: foreach ($this->_currentRowCheck as $R44yR => $PINzY) { goto ZVwKg; ZVwKg: if (!is_array($PINzY)) { goto UM3Ds; } goto wf7jG; Ds2Qa: UM3Ds: goto hsE7_; wf7jG: $this->_currentRowCheck[$R44yR] = implode(":", $PINzY); goto Ds2Qa; hsE7_: J33D2: goto zHDNG; zHDNG: } goto rJgI9; QMFUh: $KM_qN["segment"] = implode("+", $this->_currentRowCheck); goto NwBpY; yRLuZ: return $TYsG2; goto d_UNE; OJsYt: $KM_qN = ["edi_raw_id" => $this->_ediRawId, "edi_email_raw_id" => $this->_ediEmailRawId, "ord" => $this->_currentLineCheck, "edi_error_code" => $TYsG2["error_code"], "segment" => '', "movement_type" => $this->_movementType, "movement_type_name" => isset($this->_arrMovementType[$this->_movementType]["name"]) ? $this->_arrMovementType[$this->_movementType]["name"] : '', "created_at" => date("Y-m-d H:i:s")]; goto e93qz; NwBpY: YOdz3: goto WwW6u; d_UNE: } protected function prepare($abHVa) { $this->_ediEmailRawId = $abHVa->id; } protected function checkDepotExist($qDz7q) { goto FrySk; B8cxC: return $this->_returnData(["error_code" => 13]); goto qFB3e; gWJRX: if (!empty($GTz6J->id)) { goto IQFp9; } goto xwoxg; qFB3e: u1NPr: goto IUSDY; FrySk: $ZVQ2Z = new My_Model(); goto z6h28; TmdG1: $ZVQ2Z->setPrimaryKey("id"); goto VVXlo; Kytkb: $ZVQ2Z->setPrimaryKey("id"); goto dstKM; z6h28: $ZVQ2Z->setTable("depot"); goto Kytkb; GRdqU: $ZVQ2Z->setTable("edi_config"); goto TmdG1; dstKM: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_code = ?", $qDz7q]]]); goto O0TKb; VVXlo: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_terminal_id = ?", $MEMA4->id]]]); goto gWJRX; IUSDY: $ZVQ2Z = new My_Model(); goto GRdqU; egG61: return $this->_returnData(["error_code" => 0, "data" => $MEMA4->toArray()]); goto qqKYn; xwoxg: return $this->_returnData(["error_code" => 13]); goto TuEHM; O0TKb: if (!empty($MEMA4->id)) { goto u1NPr; } goto B8cxC; TuEHM: IQFp9: goto egG61; qqKYn: } protected function checkDepotOrTerminalExist($qDz7q) { goto oV_br; a0VKm: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_code = ?", $qDz7q]]]); goto PZ8j6; DFRRs: return $this->_returnData(["error_code" => 0, "data" => $G9ZFl]); goto xchu2; ql8KA: $G9ZFl = $GwvDe->toArray(); goto IYGix; V86B0: return $this->_returnData(["error_code" => 13]); goto gOo8f; gOo8f: ilO2x: goto DFRRs; kYlFV: if (!empty($GwvDe->id)) { goto s78HM; } goto zEqux; P3HfJ: $ZVQ2Z = new My_Model(); goto jKPdN; Bp2YI: goto hX3A1; goto I_HTU; JD8pI: $ZVQ2Z = new My_Model(); goto aDC4y; k3HsD: $G9ZFl = $MEMA4->toArray(); goto Bp2YI; N6Hgj: $ZVQ2Z->setPrimaryKey("id"); goto X3kJ8; ogjaq: $ZVQ2Z->setPrimaryKey("id"); goto dtpJA; IFYGt: s78HM: goto ql8KA; oV_br: $ZVQ2Z = new My_Model(); goto H0bJ8; X3kJ8: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_terminal_id = ?", $G9ZFl["id"]]]]); goto J7mUS; jKPdN: $ZVQ2Z->setTable("edi_config"); goto N6Hgj; vfJv8: $ZVQ2Z->setPrimaryKey("id"); goto a0VKm; aDC4y: $ZVQ2Z->setTable("terminal"); goto ogjaq; zEqux: return $this->_returnData(["error_code" => 13]); goto IFYGt; IYGix: hX3A1: goto P3HfJ; J7mUS: if (!empty($GTz6J->id)) { goto ilO2x; } goto V86B0; PZ8j6: if (empty($MEMA4->id)) { goto xWa91; } goto k3HsD; dtpJA: $GwvDe = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.port_code = ?", $qDz7q]]]); goto kYlFV; H0bJ8: $ZVQ2Z->setTable("depot"); goto vfJv8; I_HTU: xWa91: goto JD8pI; xchu2: } protected function checkInterchangeRecipientExist($qDz7q, $sMboH) { goto qh3s5; y11G_: eSAuU: goto ud4Z4; Wh6I8: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_code = ?", $qDz7q]]]); goto OVE4c; RKEKf: if (!empty($GTz6J->id)) { goto i67uV; } goto Oqv1O; jliIZ: $uIki7 = $vLIBt->id; goto LmWaP; L7V9K: $uIki7 = $MEMA4->id; goto PmirQ; njy2S: wLVf6: goto y11G_; q9vm6: i67uV: goto YD4vj; ud4Z4: $ZVQ2Z = new My_Model(); goto Hhb77; zPYMv: $ZVQ2Z->setPrimaryKey("id"); goto WDCcJ; aHPPw: K5m0A: goto za9D1; r2ebq: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_terminal_id = ?", $uIki7], ["tBase.interchange_recipient = ?", $sMboH]]]); goto RKEKf; MMYAK: dL6e1: goto FruXp; FruXp: $ZVQ2Z = new My_Model(); goto UiYq6; WDCcJ: $vLIBt = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.port_code = ?", $qDz7q]]]); goto HsHs5; Hhb77: $ZVQ2Z->setTable("edi_config"); goto BVi4_; BVi4_: $ZVQ2Z->setPrimaryKey("id"); goto r2ebq; qh3s5: $ZVQ2Z = new My_Model(); goto PkVnq; HsHs5: if (empty($vLIBt->id)) { goto K5m0A; } goto jliIZ; OVE4c: if (empty($MEMA4->id)) { goto dL6e1; } goto L7V9K; za9D1: return $this->_returnData(["error_code" => 13]); goto njy2S; ozz3C: $ZVQ2Z->setPrimaryKey("id"); goto Wh6I8; LmWaP: goto wLVf6; goto aHPPw; YD4vj: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto oEfXp; PkVnq: $ZVQ2Z->setTable("depot"); goto ozz3C; UiYq6: $ZVQ2Z->setTable("terminal"); goto zPYMv; Oqv1O: return $this->_returnData(["error_code" => 14]); goto q9vm6; PmirQ: goto eSAuU; goto MMYAK; oEfXp: } protected function checkTimeGetOut($bwkB1) { goto gv3pD; x8DfS: return $this->_returnData(["error_code" => 0]); goto R0pBI; TMdCF: WDcCx: goto x8DfS; vZY4K: return $this->_returnData(["error_code" => 15]); goto TMdCF; gv3pD: $bwkB1 = getFullDayEDI($bwkB1[0]) . getFullHourEDI($bwkB1[1]); goto j2deq; j2deq: if (!($bwkB1 >= date("YmdHi00", time() + 15 * 60))) { goto WDcCx; } goto vZY4K; R0pBI: } protected function checkRecipientsReference($ZW7rT) { goto vEwut; wPuis: if (empty($GTz6J->id)) { goto JI8hL; } goto AEkCk; SkyM9: $ZVQ2Z->setPrimaryKey("id"); goto V6urI; xoH5r: Cf8Lo: goto iFM1r; Obio6: $ZVQ2Z->setTable("edi_log_detail"); goto SkyM9; AEkCk: return $this->_returnData(["error_code" => 16]); goto Ue8pU; yeyJ3: return $this->_returnData(["error_code" => 0, "data" => 0]); goto FSwfK; V6urI: if (!empty($ZW7rT)) { goto Cf8Lo; } goto eiEow; vEwut: $ZVQ2Z = new My_Model(); goto Obio6; iFM1r: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.recipent_s_reference = ?", $ZW7rT]]]); goto wPuis; eiEow: return $this->_returnData(["error_code" => 16]); goto xoH5r; Ue8pU: JI8hL: goto yeyJ3; FSwfK: } protected function checkContainerASC($PGO4q) { goto foRj0; foRj0: $xMM2K = 0; goto Cj5Qs; Cj5Qs: foreach ($PGO4q as $R44yR => $PINzY) { goto gYVS9; gYVS9: if (!($PINzY[0] != ["UNH"])) { goto ZYWXi; } goto clxuu; j8SWN: bvXA2: goto Z5b19; Z5b19: $xMM2K = $PINzY[1]; goto YowIX; YowIX: V7OdH: goto fs4j9; F6DTb: ZYWXi: goto rsPbf; clxuu: goto V7OdH; goto F6DTb; pRQg6: return $this->_returnData(["error_code" => 22]); goto j8SWN; rsPbf: if (!($PINzY[1] < $xMM2K)) { goto bvXA2; } goto pRQg6; fs4j9: } goto S5ygM; S5ygM: G7O1D: goto FmfzD; FmfzD: } protected function checkSerialGetOut($YUkyb) { goto znxWP; G8yRU: wGieT: goto P71qr; t8Yqo: return $this->_returnData(["error_code" => 32]); goto G8yRU; znxWP: if (in_array($YUkyb, [34, 36])) { goto wGieT; } goto t8Yqo; P71qr: return $this->_returnData(["error_code" => 0]); goto K0Yod; K0Yod: } protected function checkEirExist($YUkyb = '') { goto LMCht; dzI36: return $this->_returnData(["error_code" => 0, "data" => $YUkyb]); goto C87d4; Cwi0c: iaUa8: goto dzI36; xWCQj: return $this->_returnData(["error_code" => 33]); goto Cwi0c; LMCht: if (!empty($YUkyb)) { goto iaUa8; } goto xWCQj; C87d4: } protected function checkEirExistNoRequired($YUkyb = '') { goto BuW1c; AAIi9: return null; goto hKxt1; BuW1c: if (!empty($YUkyb)) { goto rB5Et; } goto AAIi9; hKxt1: rB5Et: goto awz3o; awz3o: return $this->_returnData(["error_code" => 0, "data" => $YUkyb]); goto Bq__c; Bq__c: } protected function checkActionNumber($YUkyb = '') { goto hdgeG; IjDmU: return $this->_returnData(["error_code" => 0]); goto S2_Iw; jdOlm: return $this->_returnData(["error_code" => 34]); goto jxzws; jxzws: OtdDW: goto IjDmU; hdgeG: if (in_array($YUkyb, [1, 2, 3, 4, 5, 9, 22, 31, 33, 36])) { goto OtdDW; } goto jdOlm; S2_Iw: } protected function checkCarrierExist($qDz7q, $zf2hQ) { goto xh8SY; NvDc9: $vLIBt = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.port_code = ?", $qDz7q]]]); goto U615N; YxQ6j: $ZVQ2Z = new My_Model(); goto bMpBa; l4Q9v: ptL1B: goto r_TrA; s2dPk: if (!empty($GTz6J->id)) { goto ptL1B; } goto DNwNi; zJuqj: $ZVQ2Z->setTable("edi_config"); goto INIqH; aYESS: goto q2H71; goto DGDzv; H9JUd: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_code = ?", $qDz7q]]]); goto GuYeX; o_fDP: $uIki7 = $vLIBt->id; goto aYESS; bMpBa: $ZVQ2Z->setTable("terminal"); goto uKr0H; DNwNi: return $this->_returnData(["error_code" => 43, '']); goto l4Q9v; GuYeX: if (empty($MEMA4->id)) { goto bWhM3; } goto Uu4YZ; qqRCX: return $this->_returnData(["error_code" => 13]); goto WWtAG; IcIX0: bWhM3: goto YxQ6j; r_TrA: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto RSCmw; DGDzv: DhotZ: goto MFHFi; wDjeP: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_terminal_id = ?", $uIki7], ["tBase.carrier = ?", $zf2hQ]]]); goto s2dPk; U615N: if (empty($vLIBt->id)) { goto DhotZ; } goto o_fDP; zgb_N: $ZVQ2Z = new My_Model(); goto zJuqj; xh8SY: if (!empty($qDz7q)) { goto mgyRz; } goto qqRCX; tv2hU: q2H71: goto LffBv; uKr0H: $ZVQ2Z->setPrimaryKey("id"); goto NvDc9; scadL: goto XeORb; goto IcIX0; QrKGj: $ZVQ2Z = new My_Model(); goto mGB7K; WWtAG: mgyRz: goto QrKGj; MFHFi: return $this->_returnData(["error_code" => 13]); goto tv2hU; Uu4YZ: $uIki7 = $MEMA4->id; goto scadL; fL_FJ: $ZVQ2Z->setPrimaryKey("id"); goto H9JUd; INIqH: $ZVQ2Z->setPrimaryKey("id"); goto wDjeP; mGB7K: $ZVQ2Z->setTable("depot"); goto fL_FJ; LffBv: XeORb: goto zgb_N; RSCmw: } protected function checkContainerExist($qHfKY) { goto s5yYz; PTBnC: nt4Ff: goto xbKPY; BQaO7: return $this->_returnData(["error_code" => 53]); goto PTBnC; xbKPY: $this->checkContainerMovementByContainerIdAndMovementType($GTz6J->id); goto s1cdl; s1cdl: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto pJAbd; Bp6T1: if (!empty($GTz6J->id)) { goto nt4Ff; } goto BQaO7; s5yYz: $GTz6J = $this->getLastContainerNo($qHfKY); goto Bp6T1; pJAbd: } protected function getLastContainerNo($qHfKY) { goto TP3BS; TP3BS: $ZVQ2Z = new My_Model(); goto YblAa; V55kG: return $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.container_no = ?", $qHfKY], ["tBase.status = ?", 1]], "order" => "id desc"]); goto sO3Oa; QRVAe: $ZVQ2Z->setPrimaryKey("id"); goto V55kG; YblAa: $ZVQ2Z->setTable("container"); goto QRVAe; sO3Oa: } protected function checkContainerExistForLoading($qHfKY, $v6uCh) { goto rxnyY; dvZZL: QjX_x: goto V5og4; D0eTk: $OVHZR->setPrimaryKey("id"); goto zenIV; zenIV: $OVHZR->insertData(["container_no" => $qHfKY, "type_id" => $umhh8["data"]["type_id"], "size_id" => $umhh8["data"]["size_id"], "soc" => 2, "status" => 1]); goto G_Nqo; rxnyY: $umhh8 = $this->checkContainerSizeAndType($v6uCh); goto exkyx; cO64E: return; goto gumxx; fUQZa: $MH2Lf->setPrimaryKey("id"); goto MHB1c; G_Nqo: return $this->checkContainerExist($qHfKY); goto Q2WkD; Bp6KO: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray(), "containerMovement" => $JEN2k && method_exists($JEN2k, "toArray") ? $JEN2k->toArray() : '']); goto dvZZL; c5S0v: $OVHZR = new My_Model(); goto l3zGQ; Fxu5D: $MH2Lf->setTable("container_movement"); goto fUQZa; exkyx: $GTz6J = $this->getLastContainerNo($qHfKY); goto W8Ujz; W8Ujz: if (!isset($GTz6J->id)) { goto QjX_x; } goto ldgcX; V5og4: if (!(empty($umhh8["data"]["type_id"]) || empty($umhh8["data"]["size_id"]))) { goto vMoYK; } goto cO64E; MHB1c: $JEN2k = $MH2Lf->getData(["fetchRow" => true, "where" => [["tBase.container_id = ?", $GTz6J->id]]]); goto Bp6KO; l3zGQ: $OVHZR->setTable("container"); goto D0eTk; gumxx: vMoYK: goto c5S0v; ldgcX: $MH2Lf = new My_Model(); goto Fxu5D; Q2WkD: } protected function checkContainerSizeAndType($xfU2e) { goto deI6X; ajy3n: $ZVQ2Z->setPrimaryKey("id"); goto rk4MT; OJnkm: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto lVHYv; rjSaB: e01Sd: goto OJnkm; pu0OX: return $this->_returnData(["error_code" => 54]); goto rjSaB; GsI0i: if (!empty($GTz6J->id)) { goto e01Sd; } goto pu0OX; eFIJV: $ZVQ2Z->setTable("container_iso_46"); goto ajy3n; rk4MT: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.iso_66 = ?", $xfU2e[0]]]]); goto GsI0i; deI6X: $ZVQ2Z = new My_Model(); goto eFIJV; lVHYv: } protected function checkContainerLadenOrEmpty($YUkyb = '') { goto c0hvf; XOdhW: return $this->_returnData(["error_code" => 58, "data" => $tjGq6]); goto Pv5hx; Pv5hx: acG1T: goto pIfQx; hS_x5: if ($tjGq6) { goto acG1T; } goto XOdhW; pIfQx: return $this->_returnData(["error_code" => 0, "data" => $tjGq6]); goto wGx8j; c0hvf: $tjGq6 = $YUkyb == 5 ? 1 : ($YUkyb == 4 ? 2 : 0); goto hS_x5; wGx8j: } protected function checkContainerReleaseExist($cnNVZ, $GHeN7 = 0) { goto P3sci; P3sci: $ZVQ2Z = new My_Model(); goto c1W1O; GS5rF: return $this->_returnData(["error_code" => 62]); goto wvV77; ku6vN: if (!empty($wG9VX->id)) { goto V7zCv; } goto GS5rF; c1W1O: $ZVQ2Z->setTable("container_release_order_no"); goto Zsnwo; LO9Hc: UwMTw: goto UZrfd; wvV77: V7zCv: goto aS6aO; RseXJ: $yf1Mp["where"][] = ["tBase.container_size_id = ?", $GHeN7]; goto LO9Hc; brORd: return $this->_returnData(["error_code" => 62]); goto dBVzm; x42J7: return $this->_returnData(["error_code" => 0, "data" => $Fo6qy->toArray()]); goto MMc0i; aS6aO: $ZVQ2Z = new My_Model(); goto jq12S; RsBV6: $wG9VX = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.container_release_order_no = ?", $cnNVZ]]]); goto ku6vN; pe2gu: $yf1Mp = ["fetchRow" => true, "where" => [["tBase.container_release_no_id = ?", $wG9VX->id]]]; goto D2NOc; dBVzm: PHNWM: goto x42J7; UZrfd: $Fo6qy = $ZVQ2Z->getData($yf1Mp); goto zcDu7; Zsnwo: $ZVQ2Z->setPrimaryKey("id"); goto RsBV6; zcDu7: if (!empty($Fo6qy->id)) { goto PHNWM; } goto brORd; jq12S: $ZVQ2Z->setTable("container_release_order"); goto s7w4I; s7w4I: $ZVQ2Z->setPrimaryKey("id"); goto pe2gu; D2NOc: if (!$GHeN7) { goto UwMTw; } goto RseXJ; MMc0i: } protected function getContainerMovementByContainerIdAndMovementType($RDSCB) { goto yu_XM; LX14Y: if (!empty($OvPGu->id)) { goto oIoN_; } goto nlAiJ; nlAiJ: return $this->_returnData(["error_code" => 0]); goto toQbc; yu_XM: $OvPGu = $this->getMovementId($RDSCB, $this->_movementType); goto LX14Y; toQbc: oIoN_: goto VlZFi; VlZFi: return $this->_returnData(["error_code" => 0, "data" => $OvPGu->toArray()]); goto B3dDj; B3dDj: } protected function checkContainerMovementByContainerIdAndMovementType($RDSCB) { goto N9RyP; DWVDJ: if (!empty($OvPGu->id)) { goto SwQap; } goto Rv3UA; vO477: return $this->_returnData(["error_code" => 0, "data" => $OvPGu->toArray()]); goto Ox_UO; Rv3UA: return $this->_returnData(["error_code" => "62c"]); goto nG2JP; nG2JP: SwQap: goto vO477; N9RyP: $OvPGu = $this->getMovementId($RDSCB, $this->_movementType); goto DWVDJ; Ox_UO: } protected function checkParkingExist($PvDMH) { goto n67Xv; rfGgc: return $this->_returnData(["error_code" => 0, "data" => $oNPMp->toArray()]); goto X3VcX; fp3wr: kYe8m: goto rfGgc; XHMPj: $ZVQ2Z->setPrimaryKey("id"); goto Q4MMk; YnZlk: $ZVQ2Z->setTable("container_parking_list"); goto XHMPj; jxPkG: return $this->_returnData(["error_code" => 62]); goto fp3wr; n67Xv: $ZVQ2Z = new My_Model(); goto YnZlk; Q4MMk: $oNPMp = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.parking_list_no = ?", $PvDMH]]]); goto KYS28; KYS28: if (!empty($oNPMp->id)) { goto kYe8m; } goto jxPkG; X3VcX: } protected function checkBookingNoExist($Wh1a5) { goto PGLCi; wsm8W: $ziKI4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.booking_no = ?", $Wh1a5]]]); goto GjN3H; PGLCi: $ZVQ2Z = new My_Model(); goto qIYb4; bVkMe: return $this->_returnData(["error_code" => 0, "data" => $ziKI4->toArray()]); goto y753C; n2VfO: return $this->_returnData(["error_code" => 62]); goto P6vYP; qIYb4: $ZVQ2Z->setTable("booking_no"); goto xjQmk; P6vYP: VR01u: goto bVkMe; xjQmk: $ZVQ2Z->setPrimaryKey("id"); goto wsm8W; GjN3H: if (!empty($ziKI4->id)) { goto VR01u; } goto n2VfO; y753C: } protected function checkTimeDepotOut($JTEQN, $bwkB1) { goto AQOL2; K6UQE: return $this->_returnData(["error_code" => "72a"]); goto vvdpI; PWD2_: if (!($bwkB1[1][1] <= date("YmdHi", strtotime($JTEQN)))) { goto jhp52; } goto K6UQE; aS7W3: $uvuyG = substr($bwkB1[1][1], 0, 4) . "-" . substr($bwkB1[1][1], 4, 2) . "-" . substr($bwkB1[1][1], 6, 2) . " " . substr($bwkB1[1][1], 8, 2) . ":" . substr($bwkB1[1][1], 10, 2) . ":"; goto hTsP9; hTsP9: return $this->_returnData(["error_code" => 0, "data" => $uvuyG]); goto WOMJK; rgPoC: TFPF7: goto PWD2_; vvdpI: jhp52: goto aS7W3; AQOL2: if (!(empty($bwkB1[1][1]) || strlen($bwkB1[1][1]) != 12)) { goto TFPF7; } goto BgiGz; BgiGz: return $this->_returnData(["error_code" => "b"]); goto rgPoC; WOMJK: } protected function checkTimeDepotOut2($bwkB1) { goto s80bx; tjCWl: return $this->_returnData(["error_code" => "72b"]); goto VqjFj; s80bx: if (!(empty($bwkB1[1]) || strlen($bwkB1[1]) != 12 || substr($bwkB1[1], 8, 2) >= 24)) { goto woKiM; } goto tjCWl; XnS7V: $uvuyG = substr($bwkB1[1], 0, 4) . "-" . substr($bwkB1[1], 4, 2) . "-" . substr($bwkB1[1], 6, 2) . " " . substr($bwkB1[1], 8, 2) . ":" . substr($bwkB1[1], 10, 2) . ":00"; goto vUlrY; VqjFj: woKiM: goto XnS7V; vUlrY: return $this->_returnData(["error_code" => 0, "data" => $uvuyG]); goto Eh_l1; Eh_l1: } protected function checkLocation1And2($g9QIX, $phaEU, $B5fLb, $KmW66 = '') { goto JbsWR; JbsWR: $ZVQ2Z = new My_Model(); goto P6Fnf; SAVGr: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.location1 = ?", $phaEU], ["tBase.location2 = ?", $B5fLb]]]); goto chJ3E; szgfC: return $this->_returnData(["error_code" => 83]); goto xg0zC; vJGS0: $ZVQ2Z->setPrimaryKey("id"); goto SAVGr; xg0zC: X1jTA: goto qA7wP; chJ3E: if (!empty($GTz6J->id)) { goto X1jTA; } goto szgfC; P6Fnf: $ZVQ2Z->setTable("edi_config"); goto vJGS0; qA7wP: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto UsnQj; UsnQj: } protected function checkLocation1And2ForLoadingDischarge($g9QIX, $phaEU) { goto I1mPM; QGFv4: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.location1 = ?", $phaEU]]]); goto ek1yu; ek1yu: if (!empty($GTz6J->id)) { goto tRzK4; } goto omfut; Yewcw: tRzK4: goto ggaRU; W6Ck8: $ZVQ2Z->setPrimaryKey("id"); goto QGFv4; I1mPM: $ZVQ2Z = new My_Model(); goto J4AlY; J4AlY: $ZVQ2Z->setTable("edi_config"); goto W6Ck8; omfut: return $this->_returnData(["error_code" => 83]); goto Yewcw; ggaRU: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto rTIPP; rTIPP: } protected function checkSealNumber($xfU2e) { return $this->_returnData(["error_code" => 0, "data" => $xfU2e]); } protected function checkSeal($IGfQC = '', $xfU2e = '') { goto hp9fo; bn_fA: eNrQx: goto mijxQ; mijxQ: return $this->_returnData(["error_code" => 0, "data" => $IGfQC]); goto wFiHw; EYSdb: return $this->_returnData(["error_code" => 93]); goto bn_fA; hp9fo: if (in_array($xfU2e, ["CA", "SH", "TO"])) { goto eNrQx; } goto EYSdb; wFiHw: } protected function checkSealGateInEmpty($IGfQC = '', $xfU2e = '') { return $this->_returnData(["error_code" => 0, "data" => $IGfQC]); } protected function checkCommodity($Gj_pw = '') { goto Q62WM; Q62WM: if (!empty($Gj_pw)) { goto x86CI; } goto EyX3K; IlRfH: return $this->_returnData(["error_code" => 0, "data" => $Gj_pw]); goto gMaOP; EyX3K: x86CI: goto IlRfH; gMaOP: } protected function checkRemark($lOF4f = '') { goto Yg_66; Pr0mM: return $this->_returnData(["error_code" => 0, "data" => $lOF4f]); goto CCEBB; Yg_66: if (!empty($lOF4f)) { goto FOOXt; } goto GsCLx; GsCLx: FOOXt: goto Pr0mM; CCEBB: } protected function checkTruckNo($i_S6C = '') { return $this->_returnData(["error_code" => 0, "data" => $i_S6C]); } protected function checkTruckType($ZkbET = '') { return $this->_returnData(["error_code" => 0, "data" => $ZkbET]); } protected function checkTruckOwner($t3myj = '') { return $this->_returnData(["error_code" => 0, "data" => $t3myj]); } protected function checkCompareRecipientsReference($ZW7rT, $SawN4) { goto yEeYw; iONFz: zqKLR: goto Z41nB; v4Lrl: return $this->_returnData(["error_code" => 143]); goto iONFz; Z41nB: return $this->_returnData(["error_code" => 0]); goto VaKfv; yEeYw: if (!($ZW7rT != $SawN4)) { goto zqKLR; } goto v4Lrl; VaKfv: } protected function checkDischargeExist($T518I, $RDSCB) { goto lCNo1; LJKNQ: if (!empty($ReQ71->container_loading_id)) { goto nmIYJ; } goto LYmx3; LYmx3: return $this->_returnData(["error_code" => 62]); goto hd23C; wzYzw: return $this->_returnData(["error_code" => 62]); goto hzIvA; C2i4w: $mXMB3 = new My_Model(); goto gZO8k; hzIvA: u9j3I: goto Bhelc; lCNo1: $J3y46 = new My_Model(); goto HgkQY; E91WV: WwwHO: goto Y36WD; QktHp: $TLbw3->setTable("bill_of_lading_detail"); goto joAUE; Bhelc: return $this->_returnData(["error_code" => 0, "data" => $AKSbz, "checkBillOfLadingNo" => $rgaPu]); goto TLxei; WWDIG: $AKSbz = $mXMB3->getData(["fetchRow" => true, "where" => [["tBase.loading_id = ?", $ReQ71->container_loading_id]]]); goto EMur9; fJ9Uo: return $this->_returnData(["error_code" => 62]); goto E91WV; EMur9: if (!empty($AKSbz->id)) { goto u9j3I; } goto wzYzw; YS9d8: $rgaPu = $J3y46->getData(["fetchRow" => true, "where" => [["tBase.bill_of_lading_no = ?", $T518I]]]); goto ODBz8; ODBz8: if (!empty($rgaPu->id)) { goto WwwHO; } goto fJ9Uo; gZO8k: $mXMB3->setTable("container_discharge"); goto hheYc; nAdzj: $J3y46->setPrimaryKey("id"); goto YS9d8; LRfYE: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBase.bill_of_lading_no_id = ?", $rgaPu->id], ["tBase.container_id = ?", $RDSCB]]]); goto LJKNQ; hheYc: $mXMB3->setPrimaryKey("id"); goto WWDIG; Y36WD: $TLbw3 = new My_Model(); goto QktHp; hd23C: nmIYJ: goto C2i4w; joAUE: $TLbw3->setPrimaryKey("id"); goto LRfYE; HgkQY: $J3y46->setTable("bill_of_lading_no"); goto nAdzj; TLxei: } protected function checkDischargeExistByContainerId($RDSCB) { goto vUSQ0; zuLPn: $TLbw3->setTable("bill_of_lading_detail"); goto maSyY; ZxxAj: $TLbw3 = new My_Model(); goto zuLPn; l1sX4: return $this->_returnData(["error_code" => 62]); goto vta8a; yV_P8: Pu2Ru: goto umzGK; FpuSY: echo "=> bill_of_lading_no_id = " . $OvPGu->bill_of_lading_no_id . "
\xa"; goto ZxxAj; Z73lG: $mXMB3->setPrimaryKey("id"); goto yFRYy; F1FTk: if (!(empty($OvPGu->id) || empty($OvPGu->bill_of_lading_no_id))) { goto DNFwG; } goto l1sX4; yi688: if (!empty($ReQ71->container_loading_id)) { goto HEb3p; } goto jNZub; lPaoX: if (!empty($AKSbz->id)) { goto Pu2Ru; } goto nPlK0; jNZub: return $this->_returnData(["error_code" => 62]); goto Aczxw; vUSQ0: echo "check container movement: \xd\xa"; goto hEwfz; I3OLk: echo "=> bill_of_lading_detail = " . $ReQ71->container_loading_id . "\xd
"; goto j1prz; IgIvZ: $mXMB3->setTable("container_discharge"); goto Z73lG; haG2u: $OvPGu = $this->getMovementId($RDSCB); goto F1FTk; umzGK: echo "=> container_discharge = " . $AKSbz->id . "\xd\xa"; goto F39OU; lqxon: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBase.bill_of_lading_no_id = ?", $OvPGu->bill_of_lading_no_id], ["tBase.container_id = ?", $RDSCB]]]); goto yi688; vta8a: DNFwG: goto FpuSY; hEwfz: echo "check container_id = " . $RDSCB . "\xd\xa"; goto haG2u; yFRYy: $AKSbz = $mXMB3->getData(["fetchRow" => true, "where" => [["tBase.loading_id = ?", $ReQ71->container_loading_id]]]); goto lPaoX; Aczxw: HEb3p: goto I3OLk; nPlK0: return $this->_returnData(["error_code" => 62]); goto yV_P8; maSyY: $TLbw3->setPrimaryKey("id"); goto lqxon; j1prz: $mXMB3 = new My_Model(); goto IgIvZ; F39OU: return $this->_returnData(["error_code" => 0, "data" => $AKSbz, "checkContainerMovement" => $OvPGu]); goto T2up_; T2up_: } protected function checkBillOfLadingNoByContainerIdAndVesselVoyageId($RDSCB, $nzPdC) { goto wCHI0; i2D67: $uosTO->setPrimaryKey("id"); goto uf2Kv; zqTiF: return $this->_returnData(["error_code" => 62]); goto MjT94; wCHI0: $uosTO = new My_Model(); goto ZfZ81; rSCEI: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBase.container_loading_id = ?", $TV6ME->id], ["tBase.container_id = ?", $RDSCB]]]); goto Opse0; vhixg: $TLbw3->setTable("bill_of_lading_detail"); goto OU7tI; qxXRG: $TLbw3 = new My_Model(); goto vhixg; ZfZ81: $uosTO->setTable("container_loading"); goto i2D67; uf2Kv: $TV6ME = $uosTO->getData(["fetchRow" => true, "where" => [["tBase.container_id = ?", $RDSCB], ["tBase.vessel_voyage_id = ?", $nzPdC]], "order" => "id DESC"]); goto rt1ca; ypr8q: return $this->_returnData(["error_code" => 0, "data" => $ReQ71]); goto uXgWu; N7NuD: F_dSB: goto qxXRG; OU7tI: $TLbw3->setPrimaryKey("id"); goto rSCEI; Opse0: if (!empty($ReQ71->bill_of_lading_id)) { goto fo27h; } goto zqTiF; DVvzQ: return $this->_returnData(["error_code" => 62]); goto N7NuD; rt1ca: if (!empty($TV6ME->id)) { goto F_dSB; } goto DVvzQ; MjT94: fo27h: goto ypr8q; uXgWu: } protected function checkDamage($B_oiC, $L_VlX, $n2G9a, $Kg42q) { goto fWwi7; Nm2a7: $KM_qN["damage"] = $Kg42q; goto BtwN8; lVb9B: tTrYc: goto Nm2a7; tl8cO: if (empty($n2G9a)) { goto tTrYc; } goto v1HOs; Un9nI: $KM_qN["containerGrade"] = $E0ZxK->getData(["fetchRow" => true, "where" => [["tBase.depot_id = ?", $B_oiC], ["tBase.type = ?", "grade"], ["tBase.depot_define = ?", $L_VlX]]]); goto lTBOi; lTBOi: xuC2X: goto lKfgm; ZFZ_r: bmNlE: goto lVb9B; lKfgm: if (!empty($KM_qN["containerGrade"]->vsico_define)) { goto Mcg43; } goto tM0__; b_LRV: $E0ZxK->setPrimaryKey("id"); goto uAg8F; Q4hMH: if (!empty($KM_qN["containerStatus"]->vsico_define)) { goto bmNlE; } goto ZFZ_r; uAg8F: if (empty($L_VlX)) { goto xuC2X; } goto Un9nI; HK4gY: $E0ZxK->setTable("container_condition_transcript"); goto b_LRV; tM0__: Mcg43: goto tl8cO; BtwN8: return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); goto MNIfw; fWwi7: $E0ZxK = new My_Model(); goto HK4gY; v1HOs: $KM_qN["containerStatus"] = $E0ZxK->getData(["fetchRow" => true, "where" => [["tBase.depot_id = ?", $B_oiC], ["tBase.type = ?", "status"], ["tBase.depot_define = ?", $n2G9a]]]); goto Q4hMH; MNIfw: } protected function checkGRWeight($YUkyb = '') { $YUkyb = $YUkyb <= 100 ? $YUkyb : $YUkyb / 1000; return $this->_returnData(["error_code" => 0, "data" => $YUkyb]); } protected function checkVesselVoyage($brBtO, $IHuAu) { goto lBzID; zQ3A2: $bUTR5 = substr($brBtO, 2, 2); goto EEQ9D; CdhbV: $Tcl3e = new My_Model(); goto ijDt0; VmrLH: return $this->_returnData(["error_code" => "62b"]); goto aE1Uc; AxGoX: $ZVQ2Z->setTable("vessel_voyage"); goto z5KA_; Xq6q8: if (!empty($oPbfV->id)) { goto vkBYy; } goto VmrLH; Wm_sQ: $Jr6S5 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.voyage = ?", $oPbfV->id], ["tBase.remark_of_voyage = ?", $cLsq7]]]); goto gR6GM; cIedZ: $oPbfV = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.vessel = ?", $dR5D2->id], ["tBase.year = ?", $SCsxK], ["tBase.serial = ?", $bUTR5]]]); goto Xq6q8; CNUub: $dR5D2 = $Tcl3e->getData(["fetchRow" => true, "where" => [["tBase.call_sign = ?", $IHuAu[0]]]]); goto buH3L; EEQ9D: $cLsq7 = substr($brBtO, -1); goto CdhbV; hlwkm: return $this->_returnData(["error_code" => 0, "data" => $Jr6S5->toArray()]); goto UwZHa; aE1Uc: vkBYy: goto qzv6C; L3Jjw: $ZVQ2Z->setPrimaryKey("id"); goto cIedZ; buH3L: if (!empty($dR5D2->id)) { goto y77Oo; } goto yv7E7; L20R4: $ZVQ2Z->setTable("voyage"); goto L3Jjw; eYGgB: $Tcl3e->setPrimaryKey("id"); goto CNUub; qzv6C: $ZVQ2Z = new My_Model(); goto AxGoX; ijDt0: $Tcl3e->setTable("vessel"); goto eYGgB; z5KA_: $ZVQ2Z->setPrimaryKey("id"); goto Wm_sQ; yb3fj: return $this->_returnData(["error_code" => "b"]); goto FFshS; FFshS: lFD9V: goto hlwkm; LOKM1: y77Oo: goto YOSuI; lBzID: $SCsxK = "20" . substr($brBtO, 0, 2); goto zQ3A2; yv7E7: return $this->_returnData(["error_code" => "62b"]); goto LOKM1; gR6GM: if (!empty($Jr6S5->id)) { goto lFD9V; } goto yb3fj; YOSuI: $ZVQ2Z = new My_Model(); goto L20R4; UwZHa: } protected function checkTerminalExist($qDz7q) { goto dHqdv; DyPWk: return $this->_returnData(["error_code" => 0, "data" => $GwvDe->toArray()]); goto G0_rg; RV9Ad: qlq_l: goto C6QKJ; qJtyD: $ZVQ2Z->setTable("terminal"); goto vyf7G; y2lVF: if (!empty($GTz6J->id)) { goto lZYXm; } goto pCPVj; FcWmz: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.depot_terminal_id = ?", $GwvDe->id]]]); goto y2lVF; vyf7G: $ZVQ2Z->setPrimaryKey("id"); goto jdYuy; W6FAx: return $this->_returnData(["error_code" => 13]); goto RV9Ad; tCAPu: if (!empty($GwvDe->id)) { goto qlq_l; } goto W6FAx; TZZbF: $ZVQ2Z->setPrimaryKey("id"); goto FcWmz; C6QKJ: $ZVQ2Z = new My_Model(); goto KTEBg; pCPVj: return $this->_returnData(["error_code" => 13]); goto mqT99; dHqdv: $ZVQ2Z = new My_Model(); goto qJtyD; mqT99: lZYXm: goto DyPWk; jdYuy: $GwvDe = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.port_code = ?", $qDz7q]]]); goto tCAPu; KTEBg: $ZVQ2Z->setTable("edi_config"); goto TZZbF; G0_rg: } protected function checkArrivalTime($bwkB1) { goto GNvAP; gYDLC: return $this->_returnData(["error_code" => "72a"]); goto FBHBF; FBHBF: VOwMu: goto ss1q5; khmEv: return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); goto vPK2r; ss1q5: $KM_qN = substr($bwkB1, 0, 4) . "-" . substr($bwkB1, 4, 2) . "-" . substr($bwkB1, 6, 2) . " " . substr($bwkB1, 8, 2) . ":" . substr($bwkB1, 10, 2) . ":"; goto khmEv; GNvAP: if (!($bwkB1 >= date("YmdHi"))) { goto VOwMu; } goto gYDLC; vPK2r: } protected function checkDepartureTime($bwkB1) { $KM_qN = substr($bwkB1, 0, 4) . "-" . substr($bwkB1, 4, 2) . "-" . substr($bwkB1, 6, 2) . " " . substr($bwkB1, 8, 2) . ":" . substr($bwkB1, 10, 2) . ":00"; return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); } protected function checkLoadingTime($bwkB1) { goto lq4xe; lq4xe: if (!($bwkB1 < date("Ymd") || $bwkB1 >= date("YmdHi"))) { goto g_twV; } goto byVjU; z2W9r: $KM_qN = substr($bwkB1, 0, 4) . "-" . substr($bwkB1, 4, 2) . "-" . substr($bwkB1, 6, 2) . " " . substr($bwkB1, 8, 2) . ":" . substr($bwkB1, 10, 2) . "0"; goto aEy0i; tYD7T: g_twV: goto z2W9r; aEy0i: return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); goto rKnQj; byVjU: return $this->_returnData(["error_code" => "72c"]); goto tYD7T; rKnQj: } protected function checkLocation3And4($g9QIX, $s6T4l, $s4g18, $KmW66 = '') { goto QJNBC; Qjr3R: $ZVQ2Z->setPrimaryKey("id"); goto UYpfV; QJNBC: $ZVQ2Z = new My_Model(); goto o65Oe; qerSr: return $this->_returnData(["error_code" => 83]); goto tWiEo; nmibx: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto aWzku; tWiEo: wgeTq: goto nmibx; o65Oe: $ZVQ2Z->setTable("edi_config"); goto Qjr3R; UYpfV: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.location3 = ?", $s6T4l], ["tBase.location4 = ?", $s4g18]]]); goto YHLL2; YHLL2: if (!empty($GTz6J->id)) { goto wgeTq; } goto qerSr; aWzku: } protected function checkLocation3And4ForLoadingDischarge($g9QIX, $s6T4l) { goto VjbO4; mNstn: gDxG7: goto i6kLl; VjbO4: $ZVQ2Z = new My_Model(); goto EZ3GL; atApB: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.location3 = ?", $s6T4l]]]); goto aRNfT; EZ3GL: $ZVQ2Z->setTable("edi_config"); goto VVrmW; VVrmW: $ZVQ2Z->setPrimaryKey("id"); goto atApB; aRNfT: if (!empty($GTz6J->id)) { goto gDxG7; } goto J20AX; J20AX: return $this->_returnData(["error_code" => 83]); goto mNstn; i6kLl: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto UJHgZ; UJHgZ: } protected function checkStowageCellForDischarge($gJjMs = '') { goto NQS3X; NQS3X: if (!empty($gJjMs)) { goto YFrJZ; } goto tMpqS; tMpqS: YFrJZ: goto w6wyw; w6wyw: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto vdIz_; vdIz_: } protected function checkStowageCell($gJjMs = '') { goto PwqQA; YYNbG: return $this->_returnData(["error_code" => 106]); goto WbxAd; PwqQA: if (!empty($gJjMs)) { goto LltsK; } goto YYNbG; wR3X9: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto EVbBa; WbxAd: LltsK: goto wR3X9; EVbBa: } protected function checkLoadingIdExist($T518I, $RDSCB) { goto c6aZA; k1NR6: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBase.bill_of_lading_no_id = ?", $rgaPu->id], ["tBase.container_id = ?", $RDSCB]]]); goto B3put; MJ4xO: $rgaPu = $J3y46->getData(["fetchRow" => true, "where" => [["tBase.bill_of_lading_no = ?", $T518I]]]); goto w2esh; L38ZD: $J3y46->setPrimaryKey("id"); goto MJ4xO; jMwzM: return $this->_returnData(["error_code" => 62]); goto mKoO6; mKoO6: Z8onF: goto sLCiB; w2esh: if (!empty($rgaPu->id)) { goto lxMd1; } goto P9w5B; iVqSw: lxMd1: goto cW_eK; c6aZA: $J3y46 = new My_Model(); goto hKg0e; sLCiB: return $this->_returnData(["error_code" => 0, "data" => $ReQ71, "checkBillOfLadingNo" => $rgaPu]); goto QP7ga; B3put: if (!empty($ReQ71->container_loading_id)) { goto Z8onF; } goto jMwzM; cW_eK: $TLbw3 = new My_Model(); goto d8uo9; oW6rz: $TLbw3->setPrimaryKey("id"); goto k1NR6; d8uo9: $TLbw3->setTable("bill_of_lading_detail"); goto oW6rz; hKg0e: $J3y46->setTable("bill_of_lading_no"); goto L38ZD; P9w5B: return $this->_returnData(["error_code" => 62]); goto iVqSw; QP7ga: } protected function getTerminalByTerminalCode($qDz7q) { goto Drkkk; Y5epK: $ZVQ2Z->setTable("terminal"); goto gDBwY; X3zQ2: $GwvDe = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBase.port_code = ?", $qDz7q]]]); goto yeIT9; Cb5Me: return $this->_returnData(["error_code" => 9999999, "data" => $GwvDe]); goto B0gIX; yeIT9: if (!empty($GwvDe->id)) { goto pkpWi; } goto Cb5Me; Drkkk: $ZVQ2Z = new My_Model(); goto Y5epK; B0gIX: pkpWi: goto bP46_; gDBwY: $ZVQ2Z->setPrimaryKey("id"); goto X3zQ2; bP46_: } protected function checkTMP($xfU2e) { return $this->_returnData(["error_code" => 0, "data" => $xfU2e]); } protected function checkDGNote($RGHVM) { goto YxFuT; ja5jx: $e2aCT = $RGHVM[3] ? str_pad($RGHVM[3], 4, "0") : "0000"; goto VJGJK; haHCU: $aBH_s = $RGHVM[5] ? $RGHVM[5] : "0"; goto tg7_g; YxFuT: $JXupb = $RGHVM[2][0] ? number_format($RGHVM[2][0], 1, , ",") : "0.0"; goto ja5jx; VJGJK: $hnHe0 = $RGHVM[4][0] ? str_pad($RGHVM[4][0], 3, "0") : ""; goto haHCU; tg7_g: return $JXupb . "-" . $e2aCT . "-" . $hnHe0 . "-" . $aBH_s; goto Ktw1c; Ktw1c: } protected function checkImportCode($gJjMs) { goto gDjaS; D_xzI: return $this->_returnData(["error_code" => 56]); goto ZgAGK; gDjaS: if (!(empty($gJjMs) || !in_array($gJjMs, [3]))) { goto X1Pul; } goto D_xzI; ZgAGK: X1Pul: goto c1PUn; c1PUn: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto b3xOc; b3xOc: } protected function checkExportCode($gJjMs) { goto F93Es; t_rIh: return $this->_returnData(["error_code" => 56]); goto Pv0A6; Pv0A6: H7r5T: goto PpRIk; F93Es: if (!(empty($gJjMs) || !in_array($gJjMs, [2]))) { goto H7r5T; } goto t_rIh; PpRIk: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto Dvbt6; Dvbt6: } }



 goto FdBf4; UtIlF: function getFullHourEDI($fKBpn) { goto BmjR2; BmjR2: if (!(strlen($fKBpn) == 4)) { goto XcOwW; } goto MaX37; viu1k: return $fKBpn; goto dCOJL; FWTkp: XcOwW: goto viu1k; MaX37: return $fKBpn . "00"; goto FWTkp; dCOJL: } goto d9k2K; FdBf4: function getFullDayEDI($DoHrk) { goto M9yya; M9yya: if (!(strlen($DoHrk) == 6)) { goto JBMyS; } goto fDx9g; fDx9g: return "" . $DoHrk; goto ckwQG; cA0_x: return $DoHrk; goto dh9d2; ckwQG: JBMyS: goto cA0_x; dh9d2: } goto UtIlF; yBjbN: function getFormatHour($q8fNj) { goto ZBn8F; bYmZo: LuHAN: goto cBRTR; ZBn8F: if (!(strlen($q8fNj) == 6)) { goto LuHAN; } goto HfghC; HfghC: return substr($q8fNj, 0, 2) . ":" . substr($q8fNj, 2, 2) . ":" . substr($q8fNj, 4, 2); goto bYmZo; cBRTR: return $q8fNj; goto wwn1u; wwn1u: } goto LIlvt; d9k2K: function getFormatDay($DoHrk) { goto r02P6; umguU: return substr($DoHrk, 0, 4) . "-" . substr($DoHrk, 4, 2) . "-" . substr($DoHrk, 6, 2); goto hG4m4; mUP_b: return $DoHrk; goto M5wz2; r02P6: if (!(strlen($DoHrk) == 8)) { goto dxITs; } goto umguU; hG4m4: dxITs: goto mUP_b; M5wz2: } goto yBjbN; LIlvt: class My_EDI_Validate { protected $_ediRawId = 0; protected $_ediEmailRawId = 0; protected $_checkEdiInvalid = 1; protected $_currentLineCheck = 0; protected $_name = ''; protected $_primaryKeysForUpdate = []; protected $_arrMovementType = [1 => ["name" => "gate out empty", "type" => '', "field" => "depot_out", "table" => "container_depot_out"], 2 => ["name" => "gate in laden", "type" => '', "field" => "gate_in", "table" => "container_gate_in"], 3 => ["name" => "loading", "type" => '', "field" => "loading", "table" => "container_loading"], 4 => ["name" => "discharge", "type" => '', "field" => "discharge", "table" => "container_discharge"], 5 => ["name" => "gate out laden", "type" => '', "field" => "gate_out", "table" => "container_gate_out"], 6 => ["name" => "gate in empty", "type" => '', "field" => "depot_in", "table" => "container_depot_in"]]; protected function __construct() { } public function getediRawId($hWbrs) { goto mFzKM; m8N1E: $PGO4q = json_decode($fEBuD->edi_json_array, true); goto H6Ucj; N4hTq: tEJNC: goto m8N1E; rOOIc: $ZVQ2Z = new My_Model(); goto IBU3M; mFzKM: $this->_ediRawId = $hWbrs; goto rOOIc; rmmH9: $ZVQ2Z->_primaryKey = "id"; goto rze_4; IBU3M: $ZVQ2Z->_name = "edi_raw"; goto rmmH9; emCUQ: return false; goto N4hTq; rze_4: $fEBuD = $ZVQ2Z->getData(["fetchRow" => true, "where" => ["id = ?", $hWbrs]]); goto qrOrO; qrOrO: if (!empty($fEBuD->id)) { goto tEJNC; } goto emCUQ; H6Ucj: return $PGO4q; goto ntI6w; ntI6w: } protected function updateData($PGO4q) { goto wowXG; W_6qq: m3BXE: goto D158M; Bb1m6: mkdir(__DIR__DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATORdate("Y-m-d"), 755); goto zh1UX; wowXG: $MneTy = []; goto HxZze; Sz7RN: $ZVQ2Z->_name = $this->_name; goto KXpqH; D158M: $ZVQ2Z = new My_Model(); goto Sz7RN; IhSzX: if (file_exists(__DIR__DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATORdate("Y-m-d"))) { goto m3BXE; } goto Bb1m6; lSvT5: foreach ($MneTy as $PINzY) { goto g8T3c; lWhk4: $iNfx9->updateData(["end_date_time" => $iGvu2["date_time"]], $OvPGu->movement_id); goto VVk0o; eDb_g: $iGvu2 = $PINzY["data"]; goto Y28UA; SPLZ6: dTVQK: goto pKYiF; Ft0wX: $MzCl8->_primaryKey = "id"; goto t8jvZ; UwwkO: l1uYa: goto WgXjs; F_pXb: $kYJoq = []; goto pl4Bk; goJu2: Z6IGc: goto QrSXa; rHElg: SAvdM: goto JNaLF; iNlSS: $tJF_M["booking_no_id"] = $vTiJM->booking_no_id; goto Rej3H; jjVVh: goto cIYle; goto Mnknf; b6FCM: $pf7aS = []; goto HJoVq; vwuZL: $MzCl8->_name = "container_movement"; goto Px7Fv; WSytR: if (empty($PINzY["data"]["extend_bill_of_lading_no_id"])) { goto RrBMg; } goto Rzob6; n16yr: $tJF_M["booking_no_id"] = $iGvu2["booking_no_id"]; goto OkNoF; Wcm3Q: $ZVQ2Z->_primaryKey = "id"; goto KEJq0; lHI7V: if (empty($vTiJM->commodity_id)) { goto tMrzF; } goto hvMs6; Lra26: $iNfx9->_primaryKey = "id"; goto lWhk4; Q9S6C: $ZVQ2Z->updateData($iGvu2, $G9ZFl->id); goto T1k7c; pKYiF: if (!empty($G9ZFl->id)) { goto l1uYa; } goto uLvSq; Mnknf: hX7cS: goto lsJuH; t8jvZ: $MzCl8->updateData(["stuffing_spin" => 0], $vTiJM->id); goto qACXP; qhlLv: if (empty($UzR3H["data"]["movement_id"])) { goto dTVQK; } goto oL5ao; f097Z: swCGi: goto WHdBP; as4Zh: Vsv2m: goto SPLZ6; x0Esl: if (!($this->_movementType == 3 && !empty($iGvu2["booking_no_id"]) && !empty($iGvu2["vessel_voyage_id"]) && !empty($iGvu2["container_id"]))) { goto SAvdM; } goto U29PQ; YUY1U: $tJF_M = []; goto rxKu4; rqhhm: if (!($this->_movementType == 1 && isset($vTiJM->id))) { goto AfO8B; } goto oMPxx; yD0Mh: DnbZ5: goto E4wF1; r_534: if (in_array($this->_movementType, [1, 2, 3, 4, 5, 6]) && !empty($PINzY["data"]["container_movement_container_id"])) { goto hX7cS; } goto Mw0S1; VmOVD: $tJF_M = []; goto hLOB8; YZrq6: file_put_contents(__DIR__DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATOR . "0_no_container_movement_container_id-" . $this->_movementType . ".txt", "\xd\xa\xd\xa\xdataEDI:" . date("Y-m-d H:i:s") . ":" . json_encode($PINzY) . "
", FILE_APPEND); goto C5H8S; O20_S: if (empty($PINzY["data"]["extend_booking_no_id"])) { goto p2vJK; } goto ILJen; GqpUS: if (empty($G9ZFl->id)) { goto Vsv2m; } goto Wcm3Q; KEJq0: $ZVQ2Z->updateData($iGvu2, $G9ZFl->id); goto VufS2; hvMs6: $tJF_M["commodity_id"] = $vTiJM->commodity_id; goto j67Sd; yypUR: Ayfhc: goto lHI7V; Mw0S1: echo "
\xaNOOOOO\xd
"; goto WXPUq; qISy0: ejfWk: goto YOjzD; Rej3H: ZnPaz: goto WZamP; VVzXi: $MzCl8->_primaryKey = "id"; goto mAvcV; YOjzD: if (empty($tJF_M)) { goto kjLZA; } goto bq8Oo; mAvcV: $tJF_M = []; goto Hk4tG; oL5ao: echo "\xd\xaUpdate=>", $UzR3H["data"]["movement_id"], ",
"; goto TZSbT; CQZlT: ma0qy: goto fB7ov; tFPEV: $kYJoq["previous_date_time"] = $vTiJM->date_time; goto CQZlT; oMPxx: $MzCl8 = new My_Model(); goto v2o1c; aIJW4: if (!(!empty($OvPGu->movement_id) && $OvPGu->movement_type != $this->_movementType && !empty($iGvu2["date_time"]) && strtotime($iGvu2["date_time"]) > strtotime($OvPGu->date_time))) { goto bVnH8; } goto UffS6; zilDu: if (!($this->_movementType == 6 && !empty($vTiJM->id))) { goto qhZoZ; } goto Q8XmO; SujVN: m3Rvf: goto w4_2m; UffS6: $iNfx9 = new My_Model(); goto sm9T6; OQUPP: $ZVQ2Z->updateData($tJF_M, $C2rJB); goto WI6b7; WXPUq: if (!empty($PINzY["id"])) { goto Tq2FP; } goto M_whq; j67Sd: tMrzF: goto fIEKl; xFGC7: $kYJoq["date_time"] = $PINzY["data"]["date_time"]; goto tTFZa; uT2HK: Tq2FP: goto b6FCM; k1SM4: qhZoZ: goto x0Esl; xMVaN: $tJF_M["commodity_id"] = 0; goto uVgLk; dV68q: AfO8B: goto kVQzA; rxKu4: if (empty($vTiJM->booking_no_id)) { goto Ayfhc; } goto hmnik; U29PQ: $DGWEV = new My_Model(); goto nedmg; GRgNq: nzn_v: goto IyFhY; VufS2: $C2rJB = $G9ZFl->id; goto FxAVW; FxAVW: echo "\xd\Update=>", $C2rJB, ",
"; goto as4Zh; iYCJj: $wAYkZ = ["remark", "damage_remark", "damage_description"]; goto QIX_l; Egyry: if (!(!in_array($this->_movementType, [1, 4]) && isset($vTiJM->id))) { goto qYI_N; } goto bpbAl; VVk0o: bVnH8: goto OS1Qh; rOHP2: $MW4go = !empty($PINzY["data"]["terminal_id"]) ? $PINzY["data"]["terminal_id"] : (!empty($PINzY["data"]["depot_id"]) ? $PINzY["data"]["depot_id"] : 0); goto oZ3Vc; yTZ39: $this->updateDataMovement($PINzY["data"]["container_movement_container_id"], $PINzY["data"]["container_movement_movement_type"], $C2rJB, $kYJoq, $MW4go); goto GRgNq; oZ3Vc: if (!($C2rJB && $PINzY["data"]["container_movement_container_id"] && $PINzY["data"]["container_movement_movement_type"])) { goto nzn_v; } goto yTZ39; hmnik: $tJF_M["booking_no_id"] = $vTiJM->booking_no_id; goto yypUR; WI6b7: dOtC3: goto SujVN; hW0ZU: if (isset($G9ZFl->id) && $this->_updateAllowWhenRecordExist) { goto r2WgJ; } goto ZvGUS; C5H8S: goto BuANV; goto YA90J; WgXjs: cIYle: goto mJSiw; WZamP: if (empty($vTiJM->commodity_id)) { goto swCGi; } goto JNFIn; QrSXa: GxeJK: goto zilDu; fIEKl: if (empty($tJF_M)) { goto Z6IGc; } goto yobnD; Y28UA: unset($iGvu2["container_movement_container_id"], $iGvu2["container_movement_movement_type"], $iGvu2["extend_booking_no_id"], $iGvu2["extend_bill_of_lading_no_id"]); goto iYCJj; nedmg: $DGWEV->_name = "loading_order"; goto pgcPf; Rzob6: $kYJoq["bill_of_lading_no_id"] = $PINzY["data"]["extend_bill_of_lading_no_id"]; goto Q9unM; WHdBP: if (empty($tJF_M)) { goto dOtC3; } goto OQUPP; JNaLF: $NWvdg = new My_Revenue_DMDT(); goto Egyry; rU025: $tJF_M["booking_no_id"] = ''; goto xMVaN; l5oar: $G9ZFl = (object) []; goto qhlLv; Hk4tG: if (empty($iGvu2["booking_no_id"])) { goto U9INv; } goto n16yr; YA90J: hn_pe: goto eDb_g; w4_2m: if (!($this->_movementType == 3 && !empty($vTiJM->id) && isset($C2rJB))) { goto GxeJK; } goto YUY1U; uLvSq: $C2rJB = $ZVQ2Z->insertData($iGvu2); goto jdtlR; cZfPq: q8eT1: goto jjVVh; pgcPf: $DGWEV->_primaryKey = "id"; goto yvqu8; JNFIn: $tJF_M["commodity_id"] = $vTiJM->commodity_id; goto f097Z; pdbqx: r2WgJ: goto Q9S6C; ZvGUS: $C2rJB = $ZVQ2Z->insertData($iGvu2); goto NzEqE; Q9unM: RrBMg: goto rOHP2; ILJen: $kYJoq["booking_no_id"] = $PINzY["data"]["extend_booking_no_id"]; goto y254E; Xb352: $ZVQ2Z->updateData(["stuffing_spin" => $vTiJM->stuffing_spin], $C2rJB); goto vGfQy; M_whq: goto BuANV; goto uT2HK; gqzMZ: rgwHS: goto r_534; TZSbT: $G9ZFl = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["id = ?", $UzR3H["data"]["movement_id"]]]]); goto GqpUS; QIX_l: foreach ($wAYkZ as $PbCLN) { goto iWSGO; RrJye: if (!(!empty($iGvu2[$PbCLN]) && is_array($iGvu2[$PbCLN]))) { goto iRPH5; } goto IcMAJ; Q3odK: iRPH5: goto oQ9RH; Fp_yd: goto W6fXg; goto t75cq; t75cq: V6cLV: goto RrJye; iWSGO: if (!(empty($iGvu2[$PbCLN]) || is_string($iGvu2[$PbCLN]))) { goto V6cLV; } goto Fp_yd; IcMAJ: $iGvu2[$PbCLN] = implode(":", $iGvu2[$PbCLN]); goto Q3odK; oQ9RH: W6fXg: goto A6zqC; A6zqC: } goto gqzMZ; kVQzA: if (!($this->_movementType == 2 && !empty($vTiJM->id) && isset($C2rJB))) { goto m3Rvf; } goto VmOVD; lsJuH: $OvPGu = $this->getMovementId($PINzY["data"]["container_movement_container_id"]); goto aIJW4; ko5sV: qYI_N: goto F_pXb; sm9T6: $iNfx9->_name = $this->_arrMovementType[$OvPGu->movement_type]["table"]; goto Lra26; Px7Fv: $MzCl8->_primaryKey = "id"; goto D76by; HJoVq: foreach ($PINzY["id"] as $GKyMr => $PbCLN) { $pf7aS[] = [$GKyMr . " = ?", $PbCLN]; qLbcl: } goto yD0Mh; vGfQy: $MzCl8 = new My_Model(); goto leVK6; jdtlR: echo "\xd\xaInsert=>", $C2rJB, ",\xd\xa"; goto UwwkO; hLOB8: if (empty($vTiJM->booking_no_id)) { goto ZnPaz; } goto iNlSS; cPK8c: if (empty($iGvu2["commodity_id"])) { goto ejfWk; } goto Kktnk; OkNoF: U9INv: goto cPK8c; HXd4B: try { goto Neyyv; IleJt: $b24SX = new My_Cost_Base(); goto URPj7; Neyyv: if (!isset($vTiJM->id)) { goto l8Z7R; } goto IleJt; MPscB: l8Z7R: goto cpkuk; URPj7: $b24SX->calc($this->_movementType, $vTiJM->id); goto MPscB; cpkuk: } catch (Exception $C1t_K) { } goto IEKAp; yTv2d: if (!($this->_movementType == 6 && isset($vTiJM->id))) { goto T3Mev; } goto Xb352; NzEqE: goto q8eT1; goto pdbqx; leVK6: $MzCl8->_name = "container_movement"; goto Ft0wX; D76by: $tJF_M = []; goto rU025; y254E: p2vJK: goto WSytR; IEKAp: BuANV: goto n88Pf; OLra_: kjLZA: goto dV68q; bq8Oo: $MzCl8->updateData($tJF_M, $vTiJM->id); goto OLra_; pl4Bk: if (empty($vTiJM->date_time)) { goto ma0qy; } goto tFPEV; T1k7c: $C2rJB = $G9ZFl->id; goto cZfPq; yvqu8: $DGWEV->updateDataWhere(["load_vessel" => 1], ["booking_no_id = ?" => $iGvu2["booking_no_id"], "vessel_voyage_id = ?" => $iGvu2["vessel_voyage_id"], "container_id = ?" => $iGvu2["container_id"]]); goto rHElg; mJSiw: $vTiJM = $this->getMovementId($PINzY["data"]["container_movement_container_id"]); goto yTv2d; Kktnk: $tJF_M["commodity_id"] = $iGvu2["commodity_id"]; goto qISy0; uVgLk: $MzCl8->updateData($tJF_M, $vTiJM->id); goto k1SM4; v2o1c: $MzCl8->_name = "container_movement"; goto VVzXi; fB7ov: if (empty($PINzY["data"]["date_time"])) { goto isZTp; } goto xFGC7; yobnD: $ZVQ2Z->updateData($tJF_M, $C2rJB); goto goJu2; Q8XmO: $MzCl8 = new My_Model(); goto vwuZL; qACXP: T3Mev: goto rqhhm; IyFhY: try { goto WEgVd; KHxhI: if (!($this->_movementType == 2 && $C2rJB && isset($vTiJM->id))) { goto UaUYQ; } goto uMEXy; g5Uec: $NWvdg->calculatorDepotOut($C2rJB, $vTiJM->id); goto kGC6h; Pumgy: if (!($this->_movementType == 6 && $C2rJB && isset($vTiJM->id))) { goto ZinrT; } goto Axc41; GuqPL: $LaSB6 = new My_Revenue_OverWeight(); goto ATIX_; IkRHb: $NWvdg->calculatorDischarge($C2rJB, $vTiJM->id); goto I3x0T; Axc41: $NWvdg->calculatorAfterUpdateDepotIn($vTiJM->id); goto tH5FX; uMEXy: $NWvdg->calculatorAfterUpdateGateIn($C2rJB, $vTiJM->id); goto OAhRf; JGwTZ: if (!($this->_movementType == 3 && $C2rJB && isset($vTiJM->id))) { goto FUO0r; } goto BRnLX; iiC9A: FUO0r: goto Xs5Uj; qweg4: $NWvdg->calculatorAfterUpdateGateOut($C2rJB, $vTiJM->id); goto IOmbC; I3x0T: DjbeJ: goto qEadw; ATIX_: $LaSB6->calculator(["containerParkingId" => $PINzY["data"]["container_parking_id"], "containerId" => $PINzY["data"]["container_movement_container_id"]]); goto u7AT3; qEadw: if (!($this->_movementType == 5 && $C2rJB && isset($vTiJM->id))) { goto UJXbx; } goto qweg4; OAhRf: UaUYQ: goto JGwTZ; tH5FX: ZinrT: goto b7Ak4; BRnLX: $NWvdg->calculatorAfterUpdateLoading($vTiJM->id); goto iiC9A; IOmbC: UJXbx: goto Pumgy; kGC6h: MDV1s: goto KHxhI; Xs5Uj: if (!($this->_movementType == 4 && $C2rJB && isset($vTiJM->id))) { goto DjbeJ; } goto IkRHb; WEgVd: if (!($this->_movementType == 2 && $C2rJB && !empty($PINzY["data"]["container_parking_id"]) && !empty($PINzY["data"]["container_movement_container_id"]))) { goto Q_XmP; } goto GuqPL; X_sy3: if (!($this->_movementType == 1 && $C2rJB && isset($vTiJM->id))) { goto MDV1s; } goto g5Uec; u7AT3: Q_XmP: goto X_sy3; b7Ak4: } catch (Exception $C1t_K) { } goto HXd4B; g8T3c: if (!empty($PINzY["data"]["container_movement_container_id"])) { goto hn_pe; } goto YZrq6; bpbAl: try { $NWvdg->calculatorBeforeUpdate($vTiJM->id); } catch (Exception $C1t_K) { } goto ko5sV; E4wF1: $G9ZFl = $ZVQ2Z->getData(["fetchRow" => true, "where" => $pf7aS]); goto hW0ZU; OS1Qh: $UzR3H = $this->getContainerMovementByContainerIdAndMovementType($PINzY["data"]["container_movement_container_id"]); goto l5oar; tTFZa: isZTp: goto O20_S; n88Pf: } goto U4QxV; B9VTw: chgrp(__DIR__DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATORdate("Y-m-d"), "nginx"); goto W_6qq; KXpqH: $ZVQ2Z->_primaryKey = $this->_primaryKeysForUpdate; goto lSvT5; zh1UX: chown(__DIR__DIRECTORY_SEPARATOR . "logs" . DIRECTORY_SEPARATORdate("Y-m-d"), "nginx"); goto B9VTw; HxZze: foreach ($PGO4q as $KM_qN) { goto EXSp9; hQMH_: $A0Dqe = []; goto gSENy; BpRwB: rBT0R: goto XQDll; WxLnJ: $MneTy[] = ["id" => $A0Dqe, "data" => $KM_qN]; goto nPbrl; XQDll: $KM_qN["edi_email_raw_id"] = $this->_ediEmailRawId; goto WxLnJ; EXSp9: $Jbp1L = 0; goto hQMH_; gSENy: foreach ($this->_primaryKeysForUpdate as $Md0C5) { goto TMe5e; Tyv4M: $Jbp1L = 1; goto ydSxY; ydSxY: goto MOSy6; goto xqzzs; TMe5e: if (!empty($KM_qN[$Md0C5])) { goto hg7JP; } goto Tyv4M; xqzzs: hg7JP: goto Tj6C6; EUsLj: MOSy6: goto lletD; Tj6C6: $A0Dqe[$Md0C5] = $KM_qN[$Md0C5]; goto EUsLj; lletD: } goto UTcDq; nPbrl: S0Cwr: goto LpsdU; UTcDq: Gn9pG: goto Chnoh; Chnoh: if (!(count($A0Dqe) < count($this->_primaryKeysForUpdate))) { goto rBT0R; } goto BpRwB; LpsdU: } goto k2bbz; k2bbz: cLh5J: goto IhSzX; U4QxV: O8_OH: goto M5bwp; M5bwp: } protected function getMovementId($RDSCB, $S5GPn = 0) { goto wjaud; dMEGe: aWKGq: goto TSz0d; efhzW: $yf1Mp["where"][] = ["movement_type = ?", $S5GPn]; goto dMEGe; wjaud: $MzCl8 = new My_Model(); goto fTwV7; fTwV7: $MzCl8->_name = "container_movement"; goto CbpPN; CbpPN: $MzCl8->_primaryKey = "id"; goto Lnq0r; ipm20: if (!$S5GPn) { goto aWKGq; } goto efhzW; Lnq0r: $yf1Mp = ["fetchRow" => true, "where" => [["container_id = ?", $RDSCB]]]; goto ipm20; TSz0d: return $MzCl8->getData($yf1Mp); goto vsk1g; vsk1g: } protected function updateDataMovement($RDSCB, $S5GPn, $PAa7c, $kYJoq, $MW4go = 0) { goto X_vm1; R0Wq2: goto R2Jfs; goto XVQeO; TmEZY: zG7QU: goto VEGwA; YfSL8: if (empty($kYJoq["booking_no_id"])) { goto zB1bB; } goto ZKyXF; P1Ed1: $kE84r = new My_Model(); goto Uy0iP; ifdoo: $gKNc3->insertData($KM_qN); goto D9LQV; c3VCk: $KM_qN["stuffing_spin"] = 0; goto TnkLH; o7Tkq: return; goto xcc7W; TnkLH: cGG5R: goto OXyKG; x8eGo: if ($S5GPn == 6 || empty($qjGl2->id)) { goto efY2b; } goto OcNge; XVQeO: efY2b: goto ifdoo; eGTgk: $vTiJM = $this->getMovementId($RDSCB); goto p2HPE; caJ4C: BdqNi: goto F27w2; xcc7W: s_Vd7: goto mmk82; LmfDU: zgIzx: goto trP_c; S1nXB: $KM_qN["bill_of_lading_no_id"] = $kYJoq["bill_of_lading_no_id"]; goto syMBy; ax29D: $kE84r->_primaryKey = "id"; goto sbjFK; OsZuU: if (!(!isset($vTiJM->id) || isset($vTiJM->movement_type) && $vTiJM->movement_type != $S5GPn)) { goto zgIzx; } goto UfexF; xR4Eq: $C2rJB = $MzCl8->insertData($KM_qN); goto AZ2La; f2aSi: if (empty($kYJoq["bill_of_lading_no_id"])) { goto f12a2; } goto buRQF; qHs8X: f12a2: goto tkrQn; tNZSa: $KM_qN["stuffing_spin"] = $vTiJM->stuffing_spin + 05; goto TmEZY; i1D_c: if (isset($vTiJM->id)) { goto IHoTo; } goto xR4Eq; OquHb: if (!($this->_movementType == 6)) { goto cGG5R; } goto c3VCk; zO2Ss: jFgDX: goto q8Jb7; HRk4j: if (!($vTiJM->movement_type == 2 && floor($vTiJM->stuffing_spin) != $vTiJM->stuffing_spin)) { goto zG7QU; } goto tNZSa; p2HPE: $KM_qN = []; goto EtID3; KwrtB: $KM_qN["movement_type"] = $S5GPn; goto xEyCU; UfexF: $tJF_M = ["container_id" => $RDSCB, "movement_type" => $S5GPn, "movement_id" => $PAa7c, "terminal_depot_id" => $MW4go]; goto YfSL8; X_vm1: $MzCl8 = new My_Model(); goto HrIs9; tkrQn: if (empty($kYJoq["date_time"])) { goto wFMQD; } goto fQ4HW; trP_c: $gKNc3 = new My_Model(); goto E2Sw8; D9LQV: goto R2Jfs; goto caJ4C; gF77r: $KM_qN["booking_no_id"] = $kYJoq["booking_no_id"]; goto jB7nZ; xEyCU: $KM_qN["movement_id"] = $PAa7c; goto i1D_c; AZ2La: goto RWrV3; goto SSWLK; syMBy: CueA_: goto BERBe; sbjFK: $kE84r->insertData($tJF_M); goto LmfDU; EtID3: if (!(in_array($this->_movementType, [1, 2, 3]) && !empty($kYJoq["booking_no_id"]))) { goto N_cbm; } goto gF77r; Q2TuZ: if (!(!empty($vTiJM->date_time) && strtotime($vTiJM->date_time) > strtotime($kYJoq["date_time"]))) { goto s_Vd7; } goto o7Tkq; BGc7m: $KM_qN["date_time"] = $kYJoq["date_time"]; goto Q2TuZ; mmk82: UrVlh: goto OquHb; fQ4HW: $tJF_M["date_time"] = $kYJoq["date_time"]; goto nmDn1; bpOXW: RWrV3: goto OsZuU; JD516: $KM_qN = ["container_id" => $RDSCB, $this->_arrMovementType[$S5GPn]["field"] => $PAa7c]; goto x8eGo; ZKyXF: $tJF_M["booking_no_id"] = $kYJoq["booking_no_id"]; goto miPnz; cN3AU: $qjGl2 = $gKNc3->getData(["fetchRow" => true, "where" => [["container_id = ?", $RDSCB]], "order" => "id DESC"]); goto JD516; buRQF: $tJF_M["bill_of_lading_no_id"] = $kYJoq["bill_of_lading_no_id"]; goto qHs8X; miPnz: zB1bB: goto f2aSi; jB7nZ: N_cbm: goto W3uIw; nmDn1: wFMQD: goto P1Ed1; rvUJJ: $KM_qN["previous_date_time"] = $kYJoq["previous_date_time"]; goto zO2Ss; MBJsK: $C2rJB = $vTiJM->id; goto bpOXW; OXyKG: $KM_qN["container_id"] = $RDSCB; goto KwrtB; F27w2: $gKNc3->updateData($KM_qN, $qjGl2->id); goto aMDaP; aMDaP: R2Jfs: goto W8060; HrIs9: $MzCl8->_name = "container_movement"; goto ecEg6; ecEg6: $MzCl8->_primaryKey = "id"; goto eGTgk; SSWLK: IHoTo: goto HRk4j; BERBe: if (empty($kYJoq["previous_date_time"])) { goto jFgDX; } goto rvUJJ; W3uIw: if (!(in_array($this->_movementType, [4, 5, 6]) && !empty($kYJoq["bill_of_lading_no_id"]))) { goto CueA_; } goto S1nXB; AmdpO: $gKNc3->_primaryKey = "id"; goto cN3AU; Uy0iP: $kE84r->_name = "container_movement_history_data"; goto ax29D; E2Sw8: $gKNc3->_name = "container_movement_history"; goto AmdpO; OcNge: if (!empty($qjGl2->id)) { goto BdqNi; } goto R0Wq2; q8Jb7: if (empty($kYJoq["date_time"])) { goto UrVlh; } goto BGc7m; VEGwA: $MzCl8->updateData($KM_qN, $vTiJM->id); goto MBJsK; W8060: } protected function _returnData($TYsG2) { goto UN9GU; UN9GU: if (empty($TYsG2["error_code"])) { goto GtnqF; } goto OJsYt; e93qz: if (!(isset($this->_currentRowCheck) && is_array($this->_currentRowCheck))) { goto YOdz3; } goto jsv5x; l7W1x: $ZVQ2Z->insert($KM_qN); goto PeehQ; rJgI9: BktUZ: goto QMFUh; WwW6u: $ZVQ2Z = new My_Model(); goto Grv33; IUyme: $ZVQ2Z->setPrimaryKey("id"); goto l7W1x; PeehQ: GtnqF: goto yRLuZ; Grv33: $ZVQ2Z->setTable("edi_error"); goto IUyme; jsv5x: foreach ($this->_currentRowCheck as $R44yR => $PINzY) { goto ZVwKg; ZVwKg: if (!is_array($PINzY)) { goto UM3Ds; } goto wf7jG; Ds2Qa: UM3Ds: goto hsE7_; wf7jG: $this->_currentRowCheck[$R44yR] = implode(":", $PINzY); goto Ds2Qa; hsE7_: J33D2: goto zHDNG; zHDNG: } goto rJgI9; QMFUh: $KM_qN["segment"] = implode("+", $this->_currentRowCheck); goto NwBpY; yRLuZ: return $TYsG2; goto d_UNE; OJsYt: $KM_qN = ["edi_raw_id" => $this->_ediRawId, "edi_email_raw_id" => $this->_ediEmailRawId, "ord" => $this->_currentLineCheck, "edi_error_code" => $TYsG2["error_code"], "segment" => '', "movement_type" => $this->_movementType, "movement_type_name" => isset($this->_arrMovementType[$this->_movementType]["name"]) ? $this->_arrMovementType[$this->_movementType]["name"] : '', "created_at" => date("Y-m-d H:i:s")]; goto e93qz; NwBpY: YOdz3: goto WwW6u; d_UNE: } protected function prepare($abHVa) { $this->_ediEmailRawId = $abHVa->id; } protected function checkDepotExist($qDz7q) { goto FrySk; B8cxC: return $this->_returnData(["error_code" => 13]); goto qFB3e; gWJRX: if (!empty($GTz6J->id)) { goto IQFp9; } goto xwoxg; qFB3e: u1NPr: goto IUSDY; FrySk: $ZVQ2Z = new My_Model(); goto z6h28; TmdG1: $ZVQ2Z->setPrimaryKey("id"); goto VVXlo; Kytkb: $ZVQ2Z->setPrimaryKey("id"); goto dstKM; z6h28: $ZVQ2Z->setTable("depot"); goto Kytkb; GRdqU: $ZVQ2Z->setTable("edi_config"); goto TmdG1; dstKM: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasedepot_code = ?", $qDz7q]]]); goto O0TKb; VVXlo: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasedepot_terminal_id = ?", $MEMA4->id]]]); goto gWJRX; IUSDY: $ZVQ2Z = new My_Model(); goto GRdqU; egG61: return $this->_returnData(["error_code" => 0, "data" => $MEMA4->toArray()]); goto qqKYn; xwoxg: return $this->_returnData(["error_code" => 13]); goto TuEHM; O0TKb: if (!empty($MEMA4->id)) { goto u1NPr; } goto B8cxC; TuEHM: IQFp9: goto egG61; qqKYn: } protected function checkDepotOrTerminalExist($qDz7q) { goto oV_br; a0VKm: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasedepot_code = ?", $qDz7q]]]); goto PZ8j6; DFRRs: return $this->_returnData(["error_code" => 0, "data" => $G9ZFl]); goto xchu2; ql8KA: $G9ZFl = $GwvDe->toArray(); goto IYGix; V86B0: return $this->_returnData(["error_code" => 13]); goto gOo8f; gOo8f: ilO2x: goto DFRRs; kYlFV: if (!empty($GwvDe->id)) { goto s78HM; } goto zEqux; P3HfJ: $ZVQ2Z = new My_Model(); goto jKPdN; Bp2YI: goto hX3A1; goto I_HTU; JD8pI: $ZVQ2Z = new My_Model(); goto aDC4y; k3HsD: $G9ZFl = $MEMA4->toArray(); goto Bp2YI; N6Hgj: $ZVQ2Z->setPrimaryKey("id"); goto X3kJ8; ogjaq: $ZVQ2Z->setPrimaryKey("id"); goto dtpJA; IFYGt: s78HM: goto ql8KA; oV_br: $ZVQ2Z = new My_Model(); goto H0bJ8; X3kJ8: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasedepot_terminal_id = ?", $G9ZFl["id"]]]]); goto J7mUS; jKPdN: $ZVQ2Z->setTable("edi_config"); goto N6Hgj; vfJv8: $ZVQ2Z->setPrimaryKey("id"); goto a0VKm; aDC4y: $ZVQ2Z->setTable("terminal"); goto ogjaq; zEqux: return $this->_returnData(["error_code" => 13]); goto IFYGt; IYGix: hX3A1: goto P3HfJ; J7mUS: if (!empty($GTz6J->id)) { goto ilO2x; } goto V86B0; PZ8j6: if (empty($MEMA4->id)) { goto xWa91; } goto k3HsD; dtpJA: $GwvDe = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaseport_code = ?", $qDz7q]]]); goto kYlFV; H0bJ8: $ZVQ2Z->setTable("depot"); goto vfJv8; I_HTU: xWa91: goto JD8pI; xchu2: } protected function checkInterchangeRecipientExist($qDz7q, $sMboH) { goto qh3s5; y11G_: eSAuU: goto ud4Z4; Wh6I8: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasedepot_code = ?", $qDz7q]]]); goto OVE4c; RKEKf: if (!empty($GTz6J->id)) { goto i67uV; } goto Oqv1O; jliIZ: $uIki7 = $vLIBt->id; goto LmWaP; L7V9K: $uIki7 = $MEMA4->id; goto PmirQ; njy2S: wLVf6: goto y11G_; q9vm6: i67uV: goto YD4vj; ud4Z4: $ZVQ2Z = new My_Model(); goto Hhb77; zPYMv: $ZVQ2Z->setPrimaryKey("id"); goto WDCcJ; aHPPw: K5m0A: goto za9D1; r2ebq: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasedepot_terminal_id = ?", $uIki7], ["tBaseinterchange_recipient = ?", $sMboH]]]); goto RKEKf; MMYAK: dL6e1: goto FruXp; FruXp: $ZVQ2Z = new My_Model(); goto UiYq6; WDCcJ: $vLIBt = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaseport_code = ?", $qDz7q]]]); goto HsHs5; Hhb77: $ZVQ2Z->setTable("edi_config"); goto BVi4_; BVi4_: $ZVQ2Z->setPrimaryKey("id"); goto r2ebq; qh3s5: $ZVQ2Z = new My_Model(); goto PkVnq; HsHs5: if (empty($vLIBt->id)) { goto K5m0A; } goto jliIZ; OVE4c: if (empty($MEMA4->id)) { goto dL6e1; } goto L7V9K; za9D1: return $this->_returnData(["error_code" => 13]); goto njy2S; ozz3C: $ZVQ2Z->setPrimaryKey("id"); goto Wh6I8; LmWaP: goto wLVf6; goto aHPPw; YD4vj: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto oEfXp; PkVnq: $ZVQ2Z->setTable("depot"); goto ozz3C; UiYq6: $ZVQ2Z->setTable("terminal"); goto zPYMv; Oqv1O: return $this->_returnData(["error_code" => 14]); goto q9vm6; PmirQ: goto eSAuU; goto MMYAK; oEfXp: } protected function checkTimeGetOut($bwkB1) { goto gv3pD; x8DfS: return $this->_returnData(["error_code" => 0]); goto R0pBI; TMdCF: WDcCx: goto x8DfS; vZY4K: return $this->_returnData(["error_code" => 15]); goto TMdCF; gv3pD:  goto j2deq; j2deq: if (!($bwkB1 >= date("YmdHi00", time() + 15 * 60))) { goto WDcCx; } goto vZY4K; R0pBI: } protected function checkRecipientsReference($ZW7rT) { goto vEwut; wPuis: if (empty($GTz6J->id)) { goto JI8hL; } goto AEkCk; SkyM9: $ZVQ2Z->setPrimaryKey("id"); goto V6urI; xoH5r: Cf8Lo: goto iFM1r; Obio6: $ZVQ2Z->setTable("edi_log_detail"); goto SkyM9; AEkCk: return $this->_returnData(["error_code" => 16]); goto Ue8pU; yeyJ3: return $this->_returnData(["error_code" => 0, "data" => 0]); goto FSwfK; V6urI: if (!empty($ZW7rT)) { goto Cf8Lo; } goto eiEow; vEwut: $ZVQ2Z = new My_Model(); goto Obio6; iFM1r: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaserecipent_s_reference = ?", $ZW7rT]]]); goto wPuis; eiEow: return $this->_returnData(["error_code" => 16]); goto xoH5r; Ue8pU: JI8hL: goto yeyJ3; FSwfK: } protected function checkContainerASC($PGO4q) { goto foRj0; foRj0: $xMM2K = 0; goto Cj5Qs; Cj5Qs: foreach ($PGO4q as $R44yR => $PINzY) { goto gYVS9; gYVS9: if (!("g" != ["UNH"])) { goto ZYWXi; } goto clxuu; j8SWN: bvXA2: goto Z5b19; Z5b19: $xMM2K = "e"; goto YowIX; YowIX: V7OdH: goto fs4j9; F6DTb: ZYWXi: goto rsPbf; clxuu: goto V7OdH; goto F6DTb; pRQg6: return $this->_returnData(["error_code" => 22]); goto j8SWN; rsPbf: if (!("e" < $xMM2K)) { goto bvXA2; } goto pRQg6; fs4j9: } goto S5ygM; S5ygM: G7O1D: goto FmfzD; FmfzD: } protected function checkSerialGetOut($YUkyb) { goto znxWP; G8yRU: wGieT: goto P71qr; t8Yqo: return $this->_returnData(["error_code" => 32]); goto G8yRU; znxWP: if (in_array($YUkyb, [34, 36])) { goto wGieT; } goto t8Yqo; P71qr: return $this->_returnData(["error_code" => 0]); goto K0Yod; K0Yod: } protected function checkEirExist($YUkyb = '') { goto LMCht; dzI36: return $this->_returnData(["error_code" => 0, "data" => $YUkyb]); goto C87d4; Cwi0c: iaUa8: goto dzI36; xWCQj: return $this->_returnData(["error_code" => 33]); goto Cwi0c; LMCht: if (!empty($YUkyb)) { goto iaUa8; } goto xWCQj; C87d4: } protected function checkEirExistNoRequired($YUkyb = '') { goto BuW1c; AAIi9: return null; goto hKxt1; BuW1c: if (!empty($YUkyb)) { goto rB5Et; } goto AAIi9; hKxt1: rB5Et: goto awz3o; awz3o: return $this->_returnData(["error_code" => 0, "data" => $YUkyb]); goto Bq__c; Bq__c: } protected function checkActionNumber($YUkyb = '') { goto hdgeG; IjDmU: return $this->_returnData(["error_code" => 0]); goto S2_Iw; jdOlm: return $this->_returnData(["error_code" => 34]); goto jxzws; jxzws: OtdDW: goto IjDmU; hdgeG: if (in_array($YUkyb, [1, 2, 3, 4, 5, 9, 22, 31, 33, 36])) { goto OtdDW; } goto jdOlm; S2_Iw: } protected function checkCarrierExist($qDz7q, $zf2hQ) { goto xh8SY; NvDc9: $vLIBt = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaseport_code = ?", $qDz7q]]]); goto U615N; YxQ6j: $ZVQ2Z = new My_Model(); goto bMpBa; l4Q9v: ptL1B: goto r_TrA; s2dPk: if (!empty($GTz6J->id)) { goto ptL1B; } goto DNwNi; zJuqj: $ZVQ2Z->setTable("edi_config"); goto INIqH; aYESS: goto q2H71; goto DGDzv; H9JUd: $MEMA4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasedepot_code = ?", $qDz7q]]]); goto GuYeX; o_fDP: $uIki7 = $vLIBt->id; goto aYESS; bMpBa: $ZVQ2Z->setTable("terminal"); goto uKr0H; DNwNi: return $this->_returnData(["error_code" => 43, '']); goto l4Q9v; GuYeX: if (empty($MEMA4->id)) { goto bWhM3; } goto Uu4YZ; qqRCX: return $this->_returnData(["error_code" => 13]); goto WWtAG; IcIX0: bWhM3: goto YxQ6j; r_TrA: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto RSCmw; DGDzv: DhotZ: goto MFHFi; wDjeP: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasedepot_terminal_id = ?", $uIki7], ["tBasecarrier = ?", $zf2hQ]]]); goto s2dPk; U615N: if (empty($vLIBt->id)) { goto DhotZ; } goto o_fDP; zgb_N: $ZVQ2Z = new My_Model(); goto zJuqj; xh8SY: if (!empty($qDz7q)) { goto mgyRz; } goto qqRCX; tv2hU: q2H71: goto LffBv; uKr0H: $ZVQ2Z->setPrimaryKey("id"); goto NvDc9; scadL: goto XeORb; goto IcIX0; QrKGj: $ZVQ2Z = new My_Model(); goto mGB7K; WWtAG: mgyRz: goto QrKGj; MFHFi: return $this->_returnData(["error_code" => 13]); goto tv2hU; Uu4YZ: $uIki7 = $MEMA4->id; goto scadL; fL_FJ: $ZVQ2Z->setPrimaryKey("id"); goto H9JUd; INIqH: $ZVQ2Z->setPrimaryKey("id"); goto wDjeP; mGB7K: $ZVQ2Z->setTable("depot"); goto fL_FJ; LffBv: XeORb: goto zgb_N; RSCmw: } protected function checkContainerExist($qHfKY) { goto s5yYz; PTBnC: nt4Ff: goto xbKPY; BQaO7: return $this->_returnData(["error_code" => 53]); goto PTBnC; xbKPY: $this->checkContainerMovementByContainerIdAndMovementType($GTz6J->id); goto s1cdl; s1cdl: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto pJAbd; Bp6T1: if (!empty($GTz6J->id)) { goto nt4Ff; } goto BQaO7; s5yYz: $GTz6J = $this->getLastContainerNo($qHfKY); goto Bp6T1; pJAbd: } protected function getLastContainerNo($qHfKY) { goto TP3BS; TP3BS: $ZVQ2Z = new My_Model(); goto YblAa; V55kG: return $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasecontainer_no = ?", $qHfKY], ["tBasestatus = ?", 1]], "order" => "id desc"]); goto sO3Oa; QRVAe: $ZVQ2Z->setPrimaryKey("id"); goto V55kG; YblAa: $ZVQ2Z->setTable("container"); goto QRVAe; sO3Oa: } protected function checkContainerExistForLoading($qHfKY, $v6uCh) { goto rxnyY; dvZZL: QjX_x: goto V5og4; D0eTk: $OVHZR->setPrimaryKey("id"); goto zenIV; zenIV: $OVHZR->insertData(["container_no" => $qHfKY, "type_id" => $umhh8["data"]["type_id"], "size_id" => $umhh8["data"]["size_id"], "soc" => 2, "status" => 1]); goto G_Nqo; rxnyY: $umhh8 = $this->checkContainerSizeAndType($v6uCh); goto exkyx; cO64E: return; goto gumxx; fUQZa: $MH2Lf->setPrimaryKey("id"); goto MHB1c; G_Nqo: return $this->checkContainerExist($qHfKY); goto Q2WkD; Bp6KO: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray(), "containerMovement" => $JEN2k && method_exists($JEN2k, "toArray") ? $JEN2k->toArray() : '']); goto dvZZL; c5S0v: $OVHZR = new My_Model(); goto l3zGQ; Fxu5D: $MH2Lf->setTable("container_movement"); goto fUQZa; exkyx: $GTz6J = $this->getLastContainerNo($qHfKY); goto W8Ujz; W8Ujz: if (!isset($GTz6J->id)) { goto QjX_x; } goto ldgcX; V5og4: if (!(empty($umhh8["data"]["type_id"]) || empty($umhh8["data"]["size_id"]))) { goto vMoYK; } goto cO64E; MHB1c: $JEN2k = $MH2Lf->getData(["fetchRow" => true, "where" => [["tBasecontainer_id = ?", $GTz6J->id]]]); goto Bp6KO; l3zGQ: $OVHZR->setTable("container"); goto D0eTk; gumxx: vMoYK: goto c5S0v; ldgcX: $MH2Lf = new My_Model(); goto Fxu5D; Q2WkD: } protected function checkContainerSizeAndType($xfU2e) { goto deI6X; ajy3n: $ZVQ2Z->setPrimaryKey("id"); goto rk4MT; OJnkm: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto lVHYv; rjSaB: e01Sd: goto OJnkm; pu0OX: return $this->_returnData(["error_code" => 54]); goto rjSaB; GsI0i: if (!empty($GTz6J->id)) { goto e01Sd; } goto pu0OX; eFIJV: $ZVQ2Z->setTable("container_iso_46"); goto ajy3n; rk4MT: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaseiso_66 = ?", "g"]]]); goto GsI0i; deI6X: $ZVQ2Z = new My_Model(); goto eFIJV; lVHYv: } protected function checkContainerLadenOrEmpty($YUkyb = '') { goto c0hvf; XOdhW: return $this->_returnData(["error_code" => 58, "data" => $tjGq6]); goto Pv5hx; Pv5hx: acG1T: goto pIfQx; hS_x5: if ($tjGq6) { goto acG1T; } goto XOdhW; pIfQx: return $this->_returnData(["error_code" => 0, "data" => $tjGq6]); goto wGx8j; c0hvf: $tjGq6 = $YUkyb == 5 ? 1 : ($YUkyb == 4 ? 2 : 0); goto hS_x5; wGx8j: } protected function checkContainerReleaseExist($cnNVZ, $GHeN7 = 0) { goto P3sci; P3sci: $ZVQ2Z = new My_Model(); goto c1W1O; GS5rF: return $this->_returnData(["error_code" => 62]); goto wvV77; ku6vN: if (!empty($wG9VX->id)) { goto V7zCv; } goto GS5rF; c1W1O: $ZVQ2Z->setTable("container_release_order_no"); goto Zsnwo; LO9Hc: UwMTw: goto UZrfd; wvV77: V7zCv: goto aS6aO; RseXJ: $yf1Mp["where"][] = ["tBasecontainer_size_id = ?", $GHeN7]; goto LO9Hc; brORd: return $this->_returnData(["error_code" => 62]); goto dBVzm; x42J7: return $this->_returnData(["error_code" => 0, "data" => $Fo6qy->toArray()]); goto MMc0i; aS6aO: $ZVQ2Z = new My_Model(); goto jq12S; RsBV6: $wG9VX = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasecontainer_release_order_no = ?", $cnNVZ]]]); goto ku6vN; pe2gu: $yf1Mp = ["fetchRow" => true, "where" => [["tBasecontainer_release_no_id = ?", $wG9VX->id]]]; goto D2NOc; dBVzm: PHNWM: goto x42J7; UZrfd: $Fo6qy = $ZVQ2Z->getData($yf1Mp); goto zcDu7; Zsnwo: $ZVQ2Z->setPrimaryKey("id"); goto RsBV6; zcDu7: if (!empty($Fo6qy->id)) { goto PHNWM; } goto brORd; jq12S: $ZVQ2Z->setTable("container_release_order"); goto s7w4I; s7w4I: $ZVQ2Z->setPrimaryKey("id"); goto pe2gu; D2NOc: if (!$GHeN7) { goto UwMTw; } goto RseXJ; MMc0i: } protected function getContainerMovementByContainerIdAndMovementType($RDSCB) { goto yu_XM; LX14Y: if (!empty($OvPGu->id)) { goto oIoN_; } goto nlAiJ; nlAiJ: return $this->_returnData(["error_code" => 0]); goto toQbc; yu_XM: $OvPGu = $this->getMovementId($RDSCB, $this->_movementType); goto LX14Y; toQbc: oIoN_: goto VlZFi; VlZFi: return $this->_returnData(["error_code" => 0, "data" => $OvPGu->toArray()]); goto B3dDj; B3dDj: } protected function checkContainerMovementByContainerIdAndMovementType($RDSCB) { goto N9RyP; DWVDJ: if (!empty($OvPGu->id)) { goto SwQap; } goto Rv3UA; vO477: return $this->_returnData(["error_code" => 0, "data" => $OvPGu->toArray()]); goto Ox_UO; Rv3UA: return $this->_returnData(["error_code" => "62c"]); goto nG2JP; nG2JP: SwQap: goto vO477; N9RyP: $OvPGu = $this->getMovementId($RDSCB, $this->_movementType); goto DWVDJ; Ox_UO: } protected function checkParkingExist($PvDMH) { goto n67Xv; rfGgc: return $this->_returnData(["error_code" => 0, "data" => $oNPMp->toArray()]); goto X3VcX; fp3wr: kYe8m: goto rfGgc; XHMPj: $ZVQ2Z->setPrimaryKey("id"); goto Q4MMk; YnZlk: $ZVQ2Z->setTable("container_parking_list"); goto XHMPj; jxPkG: return $this->_returnData(["error_code" => 62]); goto fp3wr; n67Xv: $ZVQ2Z = new My_Model(); goto YnZlk; Q4MMk: $oNPMp = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaseparking_list_no = ?", $PvDMH]]]); goto KYS28; KYS28: if (!empty($oNPMp->id)) { goto kYe8m; } goto jxPkG; X3VcX: } protected function checkBookingNoExist($Wh1a5) { goto PGLCi; wsm8W: $ziKI4 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasebooking_no = ?", $Wh1a5]]]); goto GjN3H; PGLCi: $ZVQ2Z = new My_Model(); goto qIYb4; bVkMe: return $this->_returnData(["error_code" => 0, "data" => $ziKI4->toArray()]); goto y753C; n2VfO: return $this->_returnData(["error_code" => 62]); goto P6vYP; qIYb4: $ZVQ2Z->setTable("booking_no"); goto xjQmk; P6vYP: VR01u: goto bVkMe; xjQmk: $ZVQ2Z->setPrimaryKey("id"); goto wsm8W; GjN3H: if (!empty($ziKI4->id)) { goto VR01u; } goto n2VfO; y753C: } protected function checkTimeDepotOut($JTEQN, $bwkB1) { goto AQOL2; K6UQE: return $this->_returnData(["error_code" => "72a"]); goto vvdpI; PWD2_: if (!("e"[1] <= date("YmdHi", strtotime($JTEQN)))) { goto jhp52; } goto K6UQE; aS7W3: $uvuyG = substr("e"[1], 0, 4) . "-" . substr("e"[1], 4, 2) . "-" . substr("e"[1], 6, 2) . " " . substr("e"[1], 8, 2) . ":" . substr("e"[1], 10, 2) . ":"; goto hTsP9; hTsP9: return $this->_returnData(["error_code" => 0, "data" => $uvuyG]); goto WOMJK; rgPoC: TFPF7: goto PWD2_; vvdpI: jhp52: goto aS7W3; AQOL2: if (!(empty("e"[1]) || strlen("e"[1]) != 12)) { goto TFPF7; } goto BgiGz; BgiGz: return $this->_returnData(["error_code" => "b"]); goto rgPoC; WOMJK: } protected function checkTimeDepotOut2($bwkB1) { goto s80bx; tjCWl: return $this->_returnData(["error_code" => "72b"]); goto VqjFj; s80bx: if (!(empty("e") || strlen("e") != 12 || substr("e", 8, 2) >= 24)) { goto woKiM; } goto tjCWl; XnS7V: $uvuyG = substr("e", 0, 4) . "-" . substr("e", 4, 2) . "-" . substr("e", 6, 2) . " " . substr("e", 8, 2) . ":" . substr("e", 10, 2) . ":00"; goto vUlrY; VqjFj: woKiM: goto XnS7V; vUlrY: return $this->_returnData(["error_code" => 0, "data" => $uvuyG]); goto Eh_l1; Eh_l1: } protected function checkLocation1And2($g9QIX, $phaEU, $B5fLb, $KmW66 = '') { goto JbsWR; JbsWR: $ZVQ2Z = new My_Model(); goto P6Fnf; SAVGr: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaselocation1 = ?", $phaEU], ["tBaselocation2 = ?", $B5fLb]]]); goto chJ3E; szgfC: return $this->_returnData(["error_code" => 83]); goto xg0zC; vJGS0: $ZVQ2Z->setPrimaryKey("id"); goto SAVGr; xg0zC: X1jTA: goto qA7wP; chJ3E: if (!empty($GTz6J->id)) { goto X1jTA; } goto szgfC; P6Fnf: $ZVQ2Z->setTable("edi_config"); goto vJGS0; qA7wP: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto UsnQj; UsnQj: } protected function checkLocation1And2ForLoadingDischarge($g9QIX, $phaEU) { goto I1mPM; QGFv4: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaselocation1 = ?", $phaEU]]]); goto ek1yu; ek1yu: if (!empty($GTz6J->id)) { goto tRzK4; } goto omfut; Yewcw: tRzK4: goto ggaRU; W6Ck8: $ZVQ2Z->setPrimaryKey("id"); goto QGFv4; I1mPM: $ZVQ2Z = new My_Model(); goto J4AlY; J4AlY: $ZVQ2Z->setTable("edi_config"); goto W6Ck8; omfut: return $this->_returnData(["error_code" => 83]); goto Yewcw; ggaRU: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto rTIPP; rTIPP: } protected function checkSealNumber($xfU2e) { return $this->_returnData(["error_code" => 0, "data" => $xfU2e]); } protected function checkSeal($IGfQC = '', $xfU2e = '') { goto hp9fo; bn_fA: eNrQx: goto mijxQ; mijxQ: return $this->_returnData(["error_code" => 0, "data" => $IGfQC]); goto wFiHw; EYSdb: return $this->_returnData(["error_code" => 93]); goto bn_fA; hp9fo: if (in_array($xfU2e, ["CA", "SH", "TO"])) { goto eNrQx; } goto EYSdb; wFiHw: } protected function checkSealGateInEmpty($IGfQC = '', $xfU2e = '') { return $this->_returnData(["error_code" => 0, "data" => $IGfQC]); } protected function checkCommodity($Gj_pw = '') { goto Q62WM; Q62WM: if (!empty($Gj_pw)) { goto x86CI; } goto EyX3K; IlRfH: return $this->_returnData(["error_code" => 0, "data" => $Gj_pw]); goto gMaOP; EyX3K: x86CI: goto IlRfH; gMaOP: } protected function checkRemark($lOF4f = '') { goto Yg_66; Pr0mM: return $this->_returnData(["error_code" => 0, "data" => $lOF4f]); goto CCEBB; Yg_66: if (!empty($lOF4f)) { goto FOOXt; } goto GsCLx; GsCLx: FOOXt: goto Pr0mM; CCEBB: } protected function checkTruckNo($i_S6C = '') { return $this->_returnData(["error_code" => 0, "data" => $i_S6C]); } protected function checkTruckType($ZkbET = '') { return $this->_returnData(["error_code" => 0, "data" => $ZkbET]); } protected function checkTruckOwner($t3myj = '') { return $this->_returnData(["error_code" => 0, "data" => $t3myj]); } protected function checkCompareRecipientsReference($ZW7rT, $SawN4) { goto yEeYw; iONFz: zqKLR: goto Z41nB; v4Lrl: return $this->_returnData(["error_code" => 143]); goto iONFz; Z41nB: return $this->_returnData(["error_code" => 0]); goto VaKfv; yEeYw: if (!($ZW7rT != $SawN4)) { goto zqKLR; } goto v4Lrl; VaKfv: } protected function checkDischargeExist($T518I, $RDSCB) { goto lCNo1; LJKNQ: if (!empty($ReQ71->container_loading_id)) { goto nmIYJ; } goto LYmx3; LYmx3: return $this->_returnData(["error_code" => 62]); goto hd23C; wzYzw: return $this->_returnData(["error_code" => 62]); goto hzIvA; C2i4w: $mXMB3 = new My_Model(); goto gZO8k; hzIvA: u9j3I: goto Bhelc; lCNo1: $J3y46 = new My_Model(); goto HgkQY; E91WV: WwwHO: goto Y36WD; QktHp: $TLbw3->setTable("bill_of_lading_detail"); goto joAUE; Bhelc: return $this->_returnData(["error_code" => 0, "data" => $AKSbz, "checkBillOfLadingNo" => $rgaPu]); goto TLxei; WWDIG: $AKSbz = $mXMB3->getData(["fetchRow" => true, "where" => [["tBaseloading_id = ?", $ReQ71->container_loading_id]]]); goto EMur9; fJ9Uo: return $this->_returnData(["error_code" => 62]); goto E91WV; EMur9: if (!empty($AKSbz->id)) { goto u9j3I; } goto wzYzw; YS9d8: $rgaPu = $J3y46->getData(["fetchRow" => true, "where" => [["tBasebill_of_lading_no = ?", $T518I]]]); goto ODBz8; ODBz8: if (!empty($rgaPu->id)) { goto WwwHO; } goto fJ9Uo; gZO8k: $mXMB3->setTable("container_discharge"); goto hheYc; nAdzj: $J3y46->setPrimaryKey("id"); goto YS9d8; LRfYE: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBasebill_of_lading_no_id = ?", $rgaPu->id], ["tBasecontainer_id = ?", $RDSCB]]]); goto LJKNQ; hheYc: $mXMB3->setPrimaryKey("id"); goto WWDIG; Y36WD: $TLbw3 = new My_Model(); goto QktHp; hd23C: nmIYJ: goto C2i4w; joAUE: $TLbw3->setPrimaryKey("id"); goto LRfYE; HgkQY: $J3y46->setTable("bill_of_lading_no"); goto nAdzj; TLxei: } protected function checkDischargeExistByContainerId($RDSCB) { goto vUSQ0; zuLPn: $TLbw3->setTable("bill_of_lading_detail"); goto maSyY; ZxxAj: $TLbw3 = new My_Model(); goto zuLPn; l1sX4: return $this->_returnData(["error_code" => 62]); goto vta8a; yV_P8: Pu2Ru: goto umzGK; FpuSY: echo "=> bill_of_lading_no_id = " . $OvPGu->bill_of_lading_no_id . "
\xa"; goto ZxxAj; Z73lG: $mXMB3->setPrimaryKey("id"); goto yFRYy; F1FTk: if (!(empty($OvPGu->id) || empty($OvPGu->bill_of_lading_no_id))) { goto DNFwG; } goto l1sX4; yi688: if (!empty($ReQ71->container_loading_id)) { goto HEb3p; } goto jNZub; lPaoX: if (!empty($AKSbz->id)) { goto Pu2Ru; } goto nPlK0; jNZub: return $this->_returnData(["error_code" => 62]); goto Aczxw; vUSQ0: echo "check container movement: \xd\xa"; goto hEwfz; I3OLk: echo "=> bill_of_lading_detail = " . $ReQ71->container_loading_id . "\xd
"; goto j1prz; IgIvZ: $mXMB3->setTable("container_discharge"); goto Z73lG; haG2u: $OvPGu = $this->getMovementId($RDSCB); goto F1FTk; umzGK: echo "=> container_discharge = " . $AKSbz->id . "\xd\xa"; goto F39OU; lqxon: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBasebill_of_lading_no_id = ?", $OvPGu->bill_of_lading_no_id], ["tBasecontainer_id = ?", $RDSCB]]]); goto yi688; vta8a: DNFwG: goto FpuSY; hEwfz: echo "check container_id = " . $RDSCB . "\xd\xa"; goto haG2u; yFRYy: $AKSbz = $mXMB3->getData(["fetchRow" => true, "where" => [["tBaseloading_id = ?", $ReQ71->container_loading_id]]]); goto lPaoX; Aczxw: HEb3p: goto I3OLk; nPlK0: return $this->_returnData(["error_code" => 62]); goto yV_P8; maSyY: $TLbw3->setPrimaryKey("id"); goto lqxon; j1prz: $mXMB3 = new My_Model(); goto IgIvZ; F39OU: return $this->_returnData(["error_code" => 0, "data" => $AKSbz, "checkContainerMovement" => $OvPGu]); goto T2up_; T2up_: } protected function checkBillOfLadingNoByContainerIdAndVesselVoyageId($RDSCB, $nzPdC) { goto wCHI0; i2D67: $uosTO->setPrimaryKey("id"); goto uf2Kv; zqTiF: return $this->_returnData(["error_code" => 62]); goto MjT94; wCHI0: $uosTO = new My_Model(); goto ZfZ81; rSCEI: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBasecontainer_loading_id = ?", $TV6ME->id], ["tBasecontainer_id = ?", $RDSCB]]]); goto Opse0; vhixg: $TLbw3->setTable("bill_of_lading_detail"); goto OU7tI; qxXRG: $TLbw3 = new My_Model(); goto vhixg; ZfZ81: $uosTO->setTable("container_loading"); goto i2D67; uf2Kv: $TV6ME = $uosTO->getData(["fetchRow" => true, "where" => [["tBasecontainer_id = ?", $RDSCB], ["tBasevessel_voyage_id = ?", $nzPdC]], "order" => "id DESC"]); goto rt1ca; ypr8q: return $this->_returnData(["error_code" => 0, "data" => $ReQ71]); goto uXgWu; N7NuD: F_dSB: goto qxXRG; OU7tI: $TLbw3->setPrimaryKey("id"); goto rSCEI; Opse0: if (!empty($ReQ71->bill_of_lading_id)) { goto fo27h; } goto zqTiF; DVvzQ: return $this->_returnData(["error_code" => 62]); goto N7NuD; rt1ca: if (!empty($TV6ME->id)) { goto F_dSB; } goto DVvzQ; MjT94: fo27h: goto ypr8q; uXgWu: } protected function checkDamage($B_oiC, $L_VlX, $n2G9a, $Kg42q) { goto fWwi7; Nm2a7: $KM_qN["damage"] = $Kg42q; goto BtwN8; lVb9B: tTrYc: goto Nm2a7; tl8cO: if (empty($n2G9a)) { goto tTrYc; } goto v1HOs; Un9nI: $KM_qN["containerGrade"] = $E0ZxK->getData(["fetchRow" => true, "where" => [["tBasedepot_id = ?", $B_oiC], ["tBasetype = ?", "grade"], ["tBasedepot_define = ?", $L_VlX]]]); goto lTBOi; lTBOi: xuC2X: goto lKfgm; ZFZ_r: bmNlE: goto lVb9B; lKfgm: if (!empty($KM_qN["containerGrade"]->vsico_define)) { goto Mcg43; } goto tM0__; b_LRV: $E0ZxK->setPrimaryKey("id"); goto uAg8F; Q4hMH: if (!empty($KM_qN["containerStatus"]->vsico_define)) { goto bmNlE; } goto ZFZ_r; uAg8F: if (empty($L_VlX)) { goto xuC2X; } goto Un9nI; HK4gY: $E0ZxK->setTable("container_condition_transcript"); goto b_LRV; tM0__: Mcg43: goto tl8cO; BtwN8: return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); goto MNIfw; fWwi7: $E0ZxK = new My_Model(); goto HK4gY; v1HOs: $KM_qN["containerStatus"] = $E0ZxK->getData(["fetchRow" => true, "where" => [["tBasedepot_id = ?", $B_oiC], ["tBasetype = ?", "status"], ["tBasedepot_define = ?", $n2G9a]]]); goto Q4hMH; MNIfw: } protected function checkGRWeight($YUkyb = '') { $YUkyb = $YUkyb <= 100 ? $YUkyb : $YUkyb / 1000; return $this->_returnData(["error_code" => 0, "data" => $YUkyb]); } protected function checkVesselVoyage($brBtO, $IHuAu) { goto lBzID; zQ3A2: $bUTR5 = substr($brBtO, 2, 2); goto EEQ9D; CdhbV: $Tcl3e = new My_Model(); goto ijDt0; VmrLH: return $this->_returnData(["error_code" => "62b"]); goto aE1Uc; AxGoX: $ZVQ2Z->setTable("vessel_voyage"); goto z5KA_; Xq6q8: if (!empty($oPbfV->id)) { goto vkBYy; } goto VmrLH; Wm_sQ: $Jr6S5 = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasevoyage = ?", $oPbfV->id], ["tBaseremark_of_voyage = ?", $cLsq7]]]); goto gR6GM; cIedZ: $oPbfV = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasevessel = ?", $dR5D2->id], ["tBaseyear = ?", $SCsxK], ["tBaseserial = ?", $bUTR5]]]); goto Xq6q8; CNUub: $dR5D2 = $Tcl3e->getData(["fetchRow" => true, "where" => [["tBasecall_sign = ?", "g"]]]); goto buH3L; EEQ9D: $cLsq7 = substr($brBtO, -1); goto CdhbV; hlwkm: return $this->_returnData(["error_code" => 0, "data" => $Jr6S5->toArray()]); goto UwZHa; aE1Uc: vkBYy: goto qzv6C; L3Jjw: $ZVQ2Z->setPrimaryKey("id"); goto cIedZ; buH3L: if (!empty($dR5D2->id)) { goto y77Oo; } goto yv7E7; L20R4: $ZVQ2Z->setTable("voyage"); goto L3Jjw; eYGgB: $Tcl3e->setPrimaryKey("id"); goto CNUub; qzv6C: $ZVQ2Z = new My_Model(); goto AxGoX; ijDt0: $Tcl3e->setTable("vessel"); goto eYGgB; z5KA_: $ZVQ2Z->setPrimaryKey("id"); goto Wm_sQ; yb3fj: return $this->_returnData(["error_code" => "b"]); goto FFshS; FFshS: lFD9V: goto hlwkm; LOKM1: y77Oo: goto YOSuI; lBzID: $SCsxK = "20" . substr($brBtO, 0, 2); goto zQ3A2; yv7E7: return $this->_returnData(["error_code" => "62b"]); goto LOKM1; gR6GM: if (!empty($Jr6S5->id)) { goto lFD9V; } goto yb3fj; YOSuI: $ZVQ2Z = new My_Model(); goto L20R4; UwZHa: } protected function checkTerminalExist($qDz7q) { goto dHqdv; DyPWk: return $this->_returnData(["error_code" => 0, "data" => $GwvDe->toArray()]); goto G0_rg; RV9Ad: qlq_l: goto C6QKJ; qJtyD: $ZVQ2Z->setTable("terminal"); goto vyf7G; y2lVF: if (!empty($GTz6J->id)) { goto lZYXm; } goto pCPVj; FcWmz: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBasedepot_terminal_id = ?", $GwvDe->id]]]); goto y2lVF; vyf7G: $ZVQ2Z->setPrimaryKey("id"); goto jdYuy; W6FAx: return $this->_returnData(["error_code" => 13]); goto RV9Ad; tCAPu: if (!empty($GwvDe->id)) { goto qlq_l; } goto W6FAx; TZZbF: $ZVQ2Z->setPrimaryKey("id"); goto FcWmz; C6QKJ: $ZVQ2Z = new My_Model(); goto KTEBg; pCPVj: return $this->_returnData(["error_code" => 13]); goto mqT99; dHqdv: $ZVQ2Z = new My_Model(); goto qJtyD; mqT99: lZYXm: goto DyPWk; jdYuy: $GwvDe = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaseport_code = ?", $qDz7q]]]); goto tCAPu; KTEBg: $ZVQ2Z->setTable("edi_config"); goto TZZbF; G0_rg: } protected function checkArrivalTime($bwkB1) { goto GNvAP; gYDLC: return $this->_returnData(["error_code" => "72a"]); goto FBHBF; FBHBF: VOwMu: goto ss1q5; khmEv: return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); goto vPK2r; ss1q5: $KM_qN = substr($bwkB1, 0, 4) . "-" . substr($bwkB1, 4, 2) . "-" . substr($bwkB1, 6, 2) . " " . substr($bwkB1, 8, 2) . ":" . substr($bwkB1, 10, 2) . ":"; goto khmEv; GNvAP: if (!($bwkB1 >= date("YmdHi"))) { goto VOwMu; } goto gYDLC; vPK2r: } protected function checkDepartureTime($bwkB1) { $KM_qN = substr($bwkB1, 0, 4) . "-" . substr($bwkB1, 4, 2) . "-" . substr($bwkB1, 6, 2) . " " . substr($bwkB1, 8, 2) . ":" . substr($bwkB1, 10, 2) . ":00"; return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); } protected function checkLoadingTime($bwkB1) { goto lq4xe; lq4xe: if (!($bwkB1 < date("Ymd") || $bwkB1 >= date("YmdHi"))) { goto g_twV; } goto byVjU; z2W9r: $KM_qN = substr($bwkB1, 0, 4) . "-" . substr($bwkB1, 4, 2) . "-" . substr($bwkB1, 6, 2) . " " . substr($bwkB1, 8, 2) . ":" . substr($bwkB1, 10, 2) . "0"; goto aEy0i; tYD7T: g_twV: goto z2W9r; aEy0i: return $this->_returnData(["error_code" => 0, "data" => $KM_qN]); goto rKnQj; byVjU: return $this->_returnData(["error_code" => "72c"]); goto tYD7T; rKnQj: } protected function checkLocation3And4($g9QIX, $s6T4l, $s4g18, $KmW66 = '') { goto QJNBC; Qjr3R: $ZVQ2Z->setPrimaryKey("id"); goto UYpfV; QJNBC: $ZVQ2Z = new My_Model(); goto o65Oe; qerSr: return $this->_returnData(["error_code" => 83]); goto tWiEo; nmibx: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto aWzku; tWiEo: wgeTq: goto nmibx; o65Oe: $ZVQ2Z->setTable("edi_config"); goto Qjr3R; UYpfV: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaselocation3 = ?", $s6T4l], ["tBaselocation4 = ?", $s4g18]]]); goto YHLL2; YHLL2: if (!empty($GTz6J->id)) { goto wgeTq; } goto qerSr; aWzku: } protected function checkLocation3And4ForLoadingDischarge($g9QIX, $s6T4l) { goto VjbO4; mNstn: gDxG7: goto i6kLl; VjbO4: $ZVQ2Z = new My_Model(); goto EZ3GL; atApB: $GTz6J = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaselocation3 = ?", $s6T4l]]]); goto aRNfT; EZ3GL: $ZVQ2Z->setTable("edi_config"); goto VVrmW; VVrmW: $ZVQ2Z->setPrimaryKey("id"); goto atApB; aRNfT: if (!empty($GTz6J->id)) { goto gDxG7; } goto J20AX; J20AX: return $this->_returnData(["error_code" => 83]); goto mNstn; i6kLl: return $this->_returnData(["error_code" => 0, "data" => $GTz6J->toArray()]); goto UJHgZ; UJHgZ: } protected function checkStowageCellForDischarge($gJjMs = '') { goto NQS3X; NQS3X: if (!empty($gJjMs)) { goto YFrJZ; } goto tMpqS; tMpqS: YFrJZ: goto w6wyw; w6wyw: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto vdIz_; vdIz_: } protected function checkStowageCell($gJjMs = '') { goto PwqQA; YYNbG: return $this->_returnData(["error_code" => 106]); goto WbxAd; PwqQA: if (!empty($gJjMs)) { goto LltsK; } goto YYNbG; wR3X9: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto EVbBa; WbxAd: LltsK: goto wR3X9; EVbBa: } protected function checkLoadingIdExist($T518I, $RDSCB) { goto c6aZA; k1NR6: $ReQ71 = $TLbw3->getData(["fetchRow" => true, "where" => [["tBasebill_of_lading_no_id = ?", $rgaPu->id], ["tBasecontainer_id = ?", $RDSCB]]]); goto B3put; MJ4xO: $rgaPu = $J3y46->getData(["fetchRow" => true, "where" => [["tBasebill_of_lading_no = ?", $T518I]]]); goto w2esh; L38ZD: $J3y46->setPrimaryKey("id"); goto MJ4xO; jMwzM: return $this->_returnData(["error_code" => 62]); goto mKoO6; mKoO6: Z8onF: goto sLCiB; w2esh: if (!empty($rgaPu->id)) { goto lxMd1; } goto P9w5B; iVqSw: lxMd1: goto cW_eK; c6aZA: $J3y46 = new My_Model(); goto hKg0e; sLCiB: return $this->_returnData(["error_code" => 0, "data" => $ReQ71, "checkBillOfLadingNo" => $rgaPu]); goto QP7ga; B3put: if (!empty($ReQ71->container_loading_id)) { goto Z8onF; } goto jMwzM; cW_eK: $TLbw3 = new My_Model(); goto d8uo9; oW6rz: $TLbw3->setPrimaryKey("id"); goto k1NR6; d8uo9: $TLbw3->setTable("bill_of_lading_detail"); goto oW6rz; hKg0e: $J3y46->setTable("bill_of_lading_no"); goto L38ZD; P9w5B: return $this->_returnData(["error_code" => 62]); goto iVqSw; QP7ga: } protected function getTerminalByTerminalCode($qDz7q) { goto Drkkk; Y5epK: $ZVQ2Z->setTable("terminal"); goto gDBwY; X3zQ2: $GwvDe = $ZVQ2Z->getData(["fetchRow" => true, "where" => [["tBaseport_code = ?", $qDz7q]]]); goto yeIT9; Cb5Me: return $this->_returnData(["error_code" => 9999999, "data" => $GwvDe]); goto B0gIX; yeIT9: if (!empty($GwvDe->id)) { goto pkpWi; } goto Cb5Me; Drkkk: $ZVQ2Z = new My_Model(); goto Y5epK; B0gIX: pkpWi: goto bP46_; gDBwY: $ZVQ2Z->setPrimaryKey("id"); goto X3zQ2; bP46_: } protected function checkTMP($xfU2e) { return $this->_returnData(["error_code" => 0, "data" => $xfU2e]); } protected function checkDGNote($RGHVM) { goto YxFuT; ja5jx: $e2aCT = "F" ? str_pad("F", 4, "0") : "0000"; goto VJGJK; haHCU: $aBH_s = "l" ? "l" : "0"; goto tg7_g; YxFuT: $JXupb = "t"[0] ? number_format("t"[0], 1, , ",") : "00"; goto ja5jx; VJGJK: $hnHe0 = "u"[0] ? str_pad("u"[0], 3, "0") : ""; goto haHCU; tg7_g: return $JXupb . "-" . $e2aCT . "-" . $hnHe0 . "-" . $aBH_s; goto Ktw1c; Ktw1c: } protected function checkImportCode($gJjMs) { goto gDjaS; D_xzI: return $this->_returnData(["error_code" => 56]); goto ZgAGK; gDjaS: if (!(empty($gJjMs) || !in_array($gJjMs, [3]))) { goto X1Pul; } goto D_xzI; ZgAGK: X1Pul: goto c1PUn; c1PUn: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto b3xOc; b3xOc: } protected function checkExportCode($gJjMs) { goto F93Es; t_rIh: return $this->_returnData(["error_code" => 56]); goto Pv0A6; Pv0A6: H7r5T: goto PpRIk; F93Es: if (!(empty($gJjMs) || !in_array($gJjMs, [2]))) { goto H7r5T; } goto t_rIh; PpRIk: return $this->_returnData(["error_code" => 0, "data" => $gJjMs]); goto Dvbt6; Dvbt6: } }



© 2023 Quttera Ltd. All rights reserved.