added validation to consider only ipks mirror account numbers
This commit is contained in:
@@ -93,8 +93,8 @@ class FileProcessor:
|
||||
mapped_records = DataMapper.map_transactions(transactions, bankcode)
|
||||
logger.info(f"Mapped {len(mapped_records)} transactions")
|
||||
|
||||
# Step 5: Insert to database
|
||||
inserted_count = self.repository.bulk_insert_transactions(mapped_records)
|
||||
# Step 5: Insert to database (with account validation)
|
||||
inserted_count, skipped_count = self.repository.bulk_insert_transactions(mapped_records)
|
||||
|
||||
# Step 6: Mark file as processed
|
||||
processed_file = ProcessedFile(
|
||||
@@ -106,7 +106,7 @@ class FileProcessor:
|
||||
)
|
||||
self.repository.mark_file_processed(processed_file)
|
||||
|
||||
logger.info(f"Successfully processed {filename}: {inserted_count} transactions inserted")
|
||||
logger.info(f"Successfully processed {filename}: {inserted_count} inserted, {skipped_count} skipped (invalid accounts)")
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user