feat(webstatement): tambah pemrosesan data ATM Transaction
- Menambahkan job `ProcessAtmTransactionJob` untuk memproses data transaksi ATM dari file CSV. - Implementasi pemrosesan file CSV termasuk pembacaan, pemetaan header, dan simpan data ke model. - Menyediakan logging untuk pemantauan jumlah data yang diproses dan jumlah error. - Menambahkan mekanisme penanganan error pada setiap proses baris dan file. - Menambahkan model `AtmTransaction`: - Mendeklarasikan atribut yang bisa diisi (`fillable`) seperti `transaction_id`, `txn_amount`, dan lainnya. - Mendefinisikan tipe data casting untuk beberapa atribut seperti `txn_amount` dalam tipe decimal dan `booking_date` dalam tipe datetime. - Menambahkan migration `2025_05_21_150736_create_atm_transactions_table` untuk tabel `atm_transactions`: - Tabel memiliki kolom seperti `transaction_id`, `txn_amount`, `booking_date`, dan indeks untuk kolom tertentu. - Meng-handle struktur kolom untuk mendukung atribut yang diperlukan di model. - Memperbarui `MigrasiController`: - Menambahkan fungsi `ProcessAtmTransaction` untuk menjadwalkan `ProcessAtmTransactionJob`. - Memperbaiki pesan response pada beberapa fungsi agar lebih deskriptif dan konsisten. - Memperbarui pemanggilan fungsi dari `__invoke` di bagian pemrosesan data (`ProcessAtmTransaction`) untuk period tertentu. Signed-off-by: Daeng Deni Mardaeni <ddeni05@gmail.com>
This commit is contained in:
@@ -8,6 +8,7 @@ use Illuminate\Support\Facades\Storage;
|
||||
use Log;
|
||||
use Modules\Webstatement\Jobs\ProcessAccountDataJob;
|
||||
use Modules\Webstatement\Jobs\ProcessArrangementDataJob;
|
||||
use Modules\Webstatement\Jobs\ProcessAtmTransactionJob;
|
||||
use Modules\Webstatement\Jobs\ProcessBillDetailDataJob;
|
||||
use Modules\Webstatement\Jobs\ProcessCategoryDataJob;
|
||||
use Modules\Webstatement\Jobs\ProcessCompanyDataJob;
|
||||
@@ -110,7 +111,7 @@ class MigrasiController extends Controller
|
||||
public function ProcessFtTxnTypeConditioData($periods){
|
||||
try {
|
||||
ProcessFtTxnTypeConditionJob::dispatch($periods);
|
||||
return response()->json(['message' => 'Data FtTxnTypeCondition processing job has been successfully']);
|
||||
return response()->json(['message' => 'FtTxnTypeCondition processing job has been successfully']);
|
||||
} catch (Exception $e) {
|
||||
return response()->json(['error' => $e->getMessage()], 500);
|
||||
}
|
||||
@@ -119,7 +120,7 @@ class MigrasiController extends Controller
|
||||
public function processStmtEntryData($periods){
|
||||
try {
|
||||
ProcessStmtEntryDataJob::dispatch($periods);
|
||||
return response()->json(['message' => 'Data TempStmtEntry processing job has been successfully']);
|
||||
return response()->json(['message' => 'Stmt Entry processing job has been successfully']);
|
||||
} catch (Exception $e) {
|
||||
return response()->json(['error' => $e->getMessage()], 500);
|
||||
}
|
||||
@@ -129,7 +130,7 @@ class MigrasiController extends Controller
|
||||
public function ProcessCompanyData($periods){
|
||||
try {
|
||||
ProcessCompanyDataJob::dispatch($periods);
|
||||
return response()->json(['message' => 'Data TempStmtEntry processing job has been successfully']);
|
||||
return response()->json(['message' => 'Company processing job has been successfully']);
|
||||
} catch (Exception $e) {
|
||||
return response()->json(['error' => $e->getMessage()], 500);
|
||||
}
|
||||
@@ -138,7 +139,7 @@ class MigrasiController extends Controller
|
||||
public function ProcessDataCaptureData($periods){
|
||||
try {
|
||||
ProcessDataCaptureDataJob::dispatch($periods);
|
||||
return response()->json(['message' => 'Data TempStmtEntry processing job has been successfully']);
|
||||
return response()->json(['message' => 'Data Capture processing job has been successfully']);
|
||||
} catch (Exception $e) {
|
||||
return response()->json(['error' => $e->getMessage()], 500);
|
||||
}
|
||||
@@ -147,7 +148,7 @@ class MigrasiController extends Controller
|
||||
public function ProcessCategoryData($periods){
|
||||
try {
|
||||
ProcessCategoryDataJob::dispatch($periods);
|
||||
return response()->json(['message' => 'Data TempStmtEntry processing job has been successfully']);
|
||||
return response()->json(['message' => 'Category processing job has been successfully']);
|
||||
} catch (Exception $e) {
|
||||
return response()->json(['error' => $e->getMessage()], 500);
|
||||
}
|
||||
@@ -156,7 +157,16 @@ class MigrasiController extends Controller
|
||||
public function ProcessTellerData($periods){
|
||||
try {
|
||||
ProcessTellerDataJob::dispatch($periods);
|
||||
return response()->json(['message' => 'Data TempStmtEntry processing job has been successfully']);
|
||||
return response()->json(['message' => 'Teller processing job has been successfully']);
|
||||
} catch (Exception $e) {
|
||||
return response()->json(['error' => $e->getMessage()], 500);
|
||||
}
|
||||
}
|
||||
|
||||
public function ProcessAtmTransaction($periods){
|
||||
try {
|
||||
ProcessAtmTransactionJob::dispatch($periods);
|
||||
return response()->json(['message' => 'AtmTransaction processing job has been successfully']);
|
||||
} catch (Exception $e) {
|
||||
return response()->json(['error' => $e->getMessage()], 500);
|
||||
}
|
||||
@@ -198,6 +208,7 @@ class MigrasiController extends Controller
|
||||
//$this->ProcessDataCaptureData($periods);
|
||||
//$this->processFundsTransferData($periods);
|
||||
$this->ProcessTellerData($periods);
|
||||
$this->ProcessAtmTransaction($periods);
|
||||
|
||||
//$this->processArrangementData($periods);
|
||||
//$this->processBillDetailData($periods);
|
||||
|
||||
Reference in New Issue
Block a user