EN · DE · RU · FR · ES

#62: TransactionsImporter.kt

plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt Clase Kotlin, plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt 62 líneas · 34 código · 23 comentarios · 5 en blanco
Propósito: Archivo fuente: projectforge/plugins/banking/TransactionsImporter.kt. TransactionsImporter.kt es parte de la aplicación de gestión de proyectos de código abierto ProjectForge.

Fuente (primeras 100 líneas)

/////////////////////////////////////////////////////////////////////////////
//
// Project ProjectForge Community Edition
//         www.projectforge.org
//
// Copyright (C) 2001-2026 Micromata GmbH, Germany (www.micromata.com)
//
// ProjectForge tiene doble licencia.
//
// Esta edición comunitaria es software libre; puedes redistribuirla y/o
// modificarla bajo los términos de la Licencia Pública General GNU publicada
// por la Free Software Foundation; versión 3 de la Licencia.
//
// Esta edición comunitaria se distribuye con la esperanza de que sea útil,
// pero SIN NINGUNA GARANTÍA; sin siquiera la garantía implícita de
// COMERCIABILIDAD o IDONEIDAD PARA UN PROPÓSITO PARTICULAR. Consulte la Licencia
// Pública General GNU para más detalles.
//
// Deberías haber recibido una copia de la Licencia Pública General GNU junto
// con este programa; si no, visita http://www.gnu.org/licenses/.
//
/////////////////////////////////////////////////////////////////////////////

package org.projectforge.plugins.banking

import mu.KotlinLogging
import org.projectforge.rest.core.ExpiringSessionAttributes
import org.projectforge.rest.importer.AbstractImportPageRest
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import jakarta.servlet.http.HttpServletRequest

private val log = KotlinLogging.logger {}

@Service
class TransactionsImporter {
  @Autowired
  private lateinit var bankAccountRecordDao: BankAccountRecordDao

  fun import(
    request: HttpServletRequest,
    bankAccountDO: BankAccountDO,
    importStorage: BankingImportStorage,
  ) {
    importStorage.analyzeReadTransactions()
    val fromDate = importStorage.fromDate
    val untilDate = importStorage.untilDate
    log.info { "Intentando importar registros de cuenta desde $fromDate-$untilDate para la cuenta '${bankAccountDO.name}': ${bankAccountDO.iban}" }
    ExpiringSessionAttributes.setAttribute(
      request,
      AbstractImportPageRest.getSessionAttributeName(BankAccountRecordImportPageRest::class.java),
      importStorage,
      20,
    )
    if (fromDate == null || untilDate == null) {
      return
    }
    // Ordenado por fecha:
    importStorage.reconcileImportStorage()
    importStorage.databaseTransactions = null // Ahorrar memoria, ya no es necesario.
  }
}

Historial Git

868d6abb7 2025 -> 2026
63081666f Encabezados de archivos fuente: 2024-> 2025.
77bade6df javax.* -> jakarta.*
b6092df09 Copyright 2023 -> 2024
ab45d51fa Copyright 2001-2022 -> 2001-2023.

868d6abb7

2025 -> 2026
868d6abb75cd191a892911ac8e45058932cf9074
diff --git a/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt b/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
index c6d6de4da..0bdd6f4c8 100644
--- a/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
+++ b/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
@@ -3,7 +3,7 @@
 // Project ProjectForge Community Edition
 //         www.projectforge.org
 //
-// Copyright (C) 2001-2025 Micromata GmbH, Germany (www.micromata.com)
+// Copyright (C) 2001-2026 Micromata GmbH, Germany (www.micromata.com)
 //
 // ProjectForge tiene doble licencia.
 //

63081666f

Encabezados de archivos fuente: 2024-> 2025.
63081666f620fb87315f01b817e560e0b2f6a33a
diff --git a/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt b/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
index 000b7d560..c6d6de4da 100644
--- a/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
+++ b/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
@@ -3,7 +3,7 @@
 // Project ProjectForge Community Edition
 //         www.projectforge.org
 //
-// Copyright (C) 2001-2024 Micromata GmbH, Germany (www.micromata.com)
+// Copyright (C) 2001-2025 Micromata GmbH, Germany (www.micromata.com)
 //
 // ProjectForge tiene doble licencia.
 //

77bade6df

javax.* -> jakarta.*
77bade6dfb148c87638c71951accb03942157fcf
diff --git a/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt b/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
index 450cbb944..000b7d560 100644
--- a/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
+++ b/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
@@ -28,7 +28,7 @@ import org.projectforge.rest.core.ExpiringSessionAttributes
 import org.projectforge.rest.importer.AbstractImportPageRest
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.stereotype.Service
-import javax.servlet.http.HttpServletRequest
+import jakarta.servlet.http.HttpServletRequest
 
 private val log = KotlinLogging.logger {}
 

b6092df09

Copyright 2023 -> 2024
b6092df0927c4a3b161e888445f31dcab57493f2
diff --git a/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt b/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
index bdee12cb6..450cbb944 100644
--- a/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
+++ b/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
@@ -3,7 +3,7 @@
 // Project ProjectForge Community Edition
 //         www.projectforge.org
 //
-// Copyright (C) 2001-2023 Micromata GmbH, Germany (www.micromata.com)
+// Copyright (C) 2001-2024 Micromata GmbH, Germany (www.micromata.com)
 //
 // ProjectForge tiene doble licencia.
 //

ab45d51fa

Copyright 2001-2022 -> 2001-2023.
ab45d51fa419ede6174b31d69987f96d4b841ff9
diff --git a/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt b/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
index 9a486eb1a..bdee12cb6 100644
--- a/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
+++ b/plugins/org.projectforge.plugins.banking/src/main/kotlin/org/projectforge/plugins/banking/TransactionsImporter.kt
@@ -3,7 +3,7 @@
 // Project ProjectForge Community Edition
 //         www.projectforge.org
 //
-// Copyright (C) 2001-2022 Micromata GmbH, Germany (www.micromata.com)
+// Copyright (C) 2001-2023 Micromata GmbH, Germany (www.micromata.com)
 //
 // ProjectForge tiene doble licencia.
 //