feat(webstatement): tambah fitur pemrosesan data kategori
- Menambahkan `ProcessCategoryDataJob` untuk memproses data kategori dari file CSV yang diambil melalui SFTP. - Membuat model `Category` dengan atribut-atribut: - `id_category` - `date_time` - `description` - `short_name` - `system_ind` - `record_status` - `co_code` - `curr_no` - `l_db_cr_ind` - `category_code` - Menambahkan endpoint baru `ProcessCategoryData` di `MigrasiController` untuk memanggil job pemrosesan data kategori. - Menambahkan migrasi untuk membuat tabel `categories` dengan kolom-kolom yang relevan. - Memperbaiki bug pada `ProcessStmtEntryDataJob` dengan menambahkan validasi khusus untuk menghindari pemrosesan baris header yang tidak valid. - Menghapus pemanggilan job yang tidak diperlukan di `MigrasiController`. - Mengupdate logika pemrosesan file untuk memastikan integritas data dalam job kategori. Signed-off-by: Daeng Deni Mardaeni <ddeni05@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ use Log;
|
||||
use Modules\Webstatement\Jobs\ProcessAccountDataJob;
|
||||
use Modules\Webstatement\Jobs\ProcessArrangementDataJob;
|
||||
use Modules\Webstatement\Jobs\ProcessBillDetailDataJob;
|
||||
use Modules\Webstatement\Jobs\ProcessCategoryDataJob;
|
||||
use Modules\Webstatement\Jobs\ProcessCompanyDataJob;
|
||||
use Modules\Webstatement\Jobs\ProcessCustomerDataJob;
|
||||
use Modules\Webstatement\Jobs\ProcessDataCaptureDataJob;
|
||||
@@ -133,7 +134,6 @@ class MigrasiController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function ProcessDataCaptureData($periods){
|
||||
try {
|
||||
ProcessDataCaptureDataJob::dispatch($periods);
|
||||
@@ -143,6 +143,15 @@ class MigrasiController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function ProcessCategoryData($periods){
|
||||
try {
|
||||
ProcessCategoryDataJob::dispatch($periods);
|
||||
return response()->json(['message' => 'Data TempStmtEntry processing job has been successfully']);
|
||||
} catch (Exception $e) {
|
||||
return response()->json(['error' => $e->getMessage()], 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
@@ -152,10 +161,9 @@ class MigrasiController extends Controller
|
||||
$allDirectories = $disk->directories();
|
||||
|
||||
//$this->processTransactionData(['_parameter']);
|
||||
$this->processStmtNarrParamData(['_parameter']);
|
||||
//$this->processStmtNarrParamData(['_parameter']);
|
||||
//$this->processStmtNarrFormatData(['_parameter']);
|
||||
|
||||
$this->ProcessFtTxnTypeConditioData(['_parameter']);
|
||||
//$this->ProcessFtTxnTypeConditioData(['_parameter']);
|
||||
|
||||
// Filter out the _parameter folder
|
||||
$periods = array_filter($allDirectories, function($dir) {
|
||||
@@ -171,15 +179,19 @@ class MigrasiController extends Controller
|
||||
return response()->json(['message' => 'No valid period folders found in SFTP storage'], 404);
|
||||
}
|
||||
|
||||
$this->processCustomerData(['20250519']);
|
||||
//$this->processAccountData(['20250519']);
|
||||
$this->processArrangementData(['20250512']);
|
||||
$this->processBillDetailData(['20250512']);
|
||||
$this->processFundsTransferData(['20250512']);
|
||||
$this->processStmtEntryData(['20250512']);
|
||||
$this->ProcessCategoryData($periods);
|
||||
|
||||
//$this->processCustomerData($periods);
|
||||
//$this->processAccountData($periods);
|
||||
|
||||
//$this->processStmtEntryData($periods);
|
||||
//$this->ProcessDataCaptureData($periods);
|
||||
//$this->processFundsTransferData($periods);
|
||||
|
||||
//$this->processArrangementData($periods);
|
||||
//$this->processBillDetailData($periods);
|
||||
|
||||
|
||||
//$this->ProcessCompanyData($periods);
|
||||
$this->ProcessDataCaptureData($periods);
|
||||
|
||||
return response()->json(['message' => 'Data processing job has been successfully']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user