json(['message' => 'Data Arrangement processing job has been successfully']); } catch (Exception $e) { return response()->json(['error' => $e->getMessage()], 500); } } public function processCustomerData() { $filePath = storage_path('app/20240901.ST.CUSTOMER.csv'); // Adjust this path as needed try { ProcessCustomerDataJob::dispatch(); return response()->json(['message' => 'Data Customer processing job has been successfully']); } catch (Exception $e) { return response()->json(['error' => $e->getMessage()], 500); } } public function processBillDetailData() { try { ProcessBillDetailDataJob::dispatch(); return response()->json(['message' => 'Data Bill Details processing job has been successfully']); } catch (Exception $e) { return response()->json(['error' => $e->getMessage()], 500); } } public function processAccountData(){ try{ ProcessAccountDataJob::dispatch(); return response()->json(['message' => 'Data Account processing job has been successfully']); } catch (Exception $e) { return response()->json(['error' => $e->getMessage()], 500); } } public function processTransactionData(){ try{ ProcessTransactionDataJob::dispatch(); Log::info('Data Transaction processing job has been successfully'); return response()->json(['message' => 'Data Transaction processing job has been successfully']); } catch (Exception $e) { return response()->json(['error' => $e->getMessage()], 500); } } public function processFundsTransferData(){ try{ ProcessFundsTransferDataJob::dispatch(); return response()->json(['message' => 'Data Funds Transfer processing job has been successfully']); } catch (Exception $e) { return response()->json(['error' => $e->getMessage()], 500); } } public function processStmtNarrParamData() { try { ProcessStmtNarrParamDataJob::dispatch(); return response()->json(['message' => 'Data TempStmtNarrParam processing job has been successfully']); } catch (Exception $e) { return response()->json(['error' => $e->getMessage()], 500); } } public function processStmtNarrFormatData(){ try { ProcessStmtNarrFormatDataJob::dispatch(); return response()->json(['message' => 'Data TempStmtNarrFormat processing job has been successfully']); } catch (Exception $e) { return response()->json(['error' => $e->getMessage()], 500); } } public function processStmtEntryData(){ try { ProcessStmtEntryDataJob::dispatch(); return response()->json(['message' => 'Data TempStmtEntry processing job has been successfully']); } catch (Exception $e) { return response()->json(['error' => $e->getMessage()], 500); } } public function index() { $this->processCustomerData(); $this->processAccountData(); $this->processArrangementData(); $this->processBillDetailData(); $this->processTransactionData(); $this->processFundsTransferData(); $this->processStmtNarrParamData(); $this->processStmtNarrFormatData(); $this->processStmtEntryData(); return response()->json(['message' => 'Data processing job has been successfully']); } }