From 6a7a3418b78a99ca56410f223de4b44ed1117071 Mon Sep 17 00:00:00 2001 From: Daeng Deni Mardaeni Date: Mon, 26 May 2025 09:12:17 +0700 Subject: [PATCH] fix(webstatement): perbaiki logika kondisi periode kosong di job processing - Memperbaiki kondisi pengecekan `$this->period` yang salah (ekstra tanda kurung) pada beberapa job processing, seperti: 1. `ProcessAtmTransactionJob` 2. `ProcessBillDetailDataJob` 3. `ProcessCategoryDataJob` 4. `ProcessCompanyDataJob` 5. `ProcessCustomerDataJob` 6. `ProcessDataCaptureDataJob` 7. `ProcessFundsTransferDataJob` 8. `ProcessStmtEntryDataJob` 9. `ProcessTellerDataJob` - Menambahkan kejelasan logging untuk kasus ketika periode tidak disediakan (`period === ''`). - Menghapus kode komentar tidak terpakai di `ProcessFtTxnTypeConditionJob`. Perubahan ini memastikan bahwa logika untuk kondisi periode kosong berjalan dengan benar dan menghindari potensi error di runtime. Signed-off-by: Daeng Deni Mardaeni --- app/Jobs/ProcessAtmTransactionJob.php | 2 +- app/Jobs/ProcessBillDetailDataJob.php | 2 +- app/Jobs/ProcessCategoryDataJob.php | 2 +- app/Jobs/ProcessCompanyDataJob.php | 2 +- app/Jobs/ProcessCustomerDataJob.php | 2 +- app/Jobs/ProcessDataCaptureDataJob.php | 2 +- app/Jobs/ProcessFtTxnTypeConditionJob.php | 5 ----- app/Jobs/ProcessFundsTransferDataJob.php | 2 +- app/Jobs/ProcessStmtEntryDataJob.php | 2 +- app/Jobs/ProcessTellerDataJob.php | 2 +- 10 files changed, 9 insertions(+), 14 deletions(-) diff --git a/app/Jobs/ProcessAtmTransactionJob.php b/app/Jobs/ProcessAtmTransactionJob.php index 4bfd86c..be6e2b8 100644 --- a/app/Jobs/ProcessAtmTransactionJob.php +++ b/app/Jobs/ProcessAtmTransactionJob.php @@ -60,7 +60,7 @@ try { set_time_limit(24 * 60 * 60); - if ($this->period === '')) { + if ($this->period === '') { Log::warning('No period provided for ATM transaction data processing'); return; } diff --git a/app/Jobs/ProcessBillDetailDataJob.php b/app/Jobs/ProcessBillDetailDataJob.php index d3e8c46..5c373ad 100644 --- a/app/Jobs/ProcessBillDetailDataJob.php +++ b/app/Jobs/ProcessBillDetailDataJob.php @@ -37,7 +37,7 @@ $processedCount = 0; $errorCount = 0; - if ($this->period === '')) { + if ($this->period === '') { Log::warning('No period provided for bill detail data processing'); return; } diff --git a/app/Jobs/ProcessCategoryDataJob.php b/app/Jobs/ProcessCategoryDataJob.php index 986e9f2..3380984 100644 --- a/app/Jobs/ProcessCategoryDataJob.php +++ b/app/Jobs/ProcessCategoryDataJob.php @@ -38,7 +38,7 @@ $processedCount = 0; $errorCount = 0; - if ($this->period === '')) { + if ($this->period === '') { Log::warning('No period provided for category data processing'); return; } diff --git a/app/Jobs/ProcessCompanyDataJob.php b/app/Jobs/ProcessCompanyDataJob.php index bbee8a2..6933976 100644 --- a/app/Jobs/ProcessCompanyDataJob.php +++ b/app/Jobs/ProcessCompanyDataJob.php @@ -40,7 +40,7 @@ $processedCount = 0; $errorCount = 0; - if ($this->period === '')) { + if ($this->period === '') { Log::warning('No period provided for company data processing'); return; } diff --git a/app/Jobs/ProcessCustomerDataJob.php b/app/Jobs/ProcessCustomerDataJob.php index 0b8016a..173c8db 100644 --- a/app/Jobs/ProcessCustomerDataJob.php +++ b/app/Jobs/ProcessCustomerDataJob.php @@ -31,7 +31,7 @@ $processedCount = 0; $errorCount = 0; - if ($this->period === '')) { + if ($this->period === '') { Log::warning('No period provided for customer data processing'); return; } diff --git a/app/Jobs/ProcessDataCaptureDataJob.php b/app/Jobs/ProcessDataCaptureDataJob.php index 892dd13..3e715c8 100644 --- a/app/Jobs/ProcessDataCaptureDataJob.php +++ b/app/Jobs/ProcessDataCaptureDataJob.php @@ -40,7 +40,7 @@ $processedCount = 0; $errorCount = 0; - if ($this->period === '')) { + if ($this->period === '') { Log::warning('No period provided for data capture processing'); return; } diff --git a/app/Jobs/ProcessFtTxnTypeConditionJob.php b/app/Jobs/ProcessFtTxnTypeConditionJob.php index 0c693fb..95faf49 100644 --- a/app/Jobs/ProcessFtTxnTypeConditionJob.php +++ b/app/Jobs/ProcessFtTxnTypeConditionJob.php @@ -45,11 +45,6 @@ class ProcessFtTxnTypeConditionJob implements ShouldQueue } foreach ($this->periods as $period) { - // Skip the _parameter folder - /*if ($period === '_parameter') { - Log::info("Skipping _parameter folder"); - continue; - }*/ // Construct the filepath based on the period folder name $filePath = "$period/{$this->filename}"; diff --git a/app/Jobs/ProcessFundsTransferDataJob.php b/app/Jobs/ProcessFundsTransferDataJob.php index 53e155b..1b63f14 100644 --- a/app/Jobs/ProcessFundsTransferDataJob.php +++ b/app/Jobs/ProcessFundsTransferDataJob.php @@ -38,7 +38,7 @@ $processedCount = 0; $errorCount = 0; - if ($this->period === '')) { + if ($this->period === '') { Log::warning('No period provided for funds transfer data processing'); return; } diff --git a/app/Jobs/ProcessStmtEntryDataJob.php b/app/Jobs/ProcessStmtEntryDataJob.php index 0a0aa7e..6621f7c 100644 --- a/app/Jobs/ProcessStmtEntryDataJob.php +++ b/app/Jobs/ProcessStmtEntryDataJob.php @@ -38,7 +38,7 @@ $processedCount = 0; $errorCount = 0; - if ($this->period === '')) { + if ($this->period === '') { Log::warning('No period provided for statement entry data processing'); return; } diff --git a/app/Jobs/ProcessTellerDataJob.php b/app/Jobs/ProcessTellerDataJob.php index fffbf95..3aaddad 100644 --- a/app/Jobs/ProcessTellerDataJob.php +++ b/app/Jobs/ProcessTellerDataJob.php @@ -146,7 +146,7 @@ try { set_time_limit(24 * 60 * 60); - if ($this->period === '')) { + if ($this->period === '') { Log::warning('No period provided for teller data processing'); return; }