#987: EmployeeSalaryExcelImporter.kt

projectforge-business/src/main/kotlin/org/projectforge/business/fibu/datev/EmployeeSalaryExcelImporter.kt Type: Spring Service (import logic)
Package: org.projectforge.business.fibu.datev
Actual Path: projectforge-business/src/main/kotlin/org/projectforge/business/fibu/datev/EmployeeSalaryExcelImporter.kt
Note: The file does not exist at the requested path (.../excelimport/...). It resides in the datev sub-package. The documentation below reflects the actual source. 123 lines · 81 code · 31 comments · 11 blank

Imports employee salaries from an Excel workbook sheet named "employeeSalaries". Maps employee records by staff number (Personalnummer), validation includes checking that the employee exists in the database.

Architecture

Dependencies

DependencyRole
EmployeeCacheFast cached lookup by staff number
EmployeeServiceDirect database lookup if cache miss

Column Mapping (Enum: Cols)

EnumHeaderValidatorTarget Property
PERSONALNUMMERPersonalnummerNumberValidator (>=1, required, unique)Used for employee lookup
GESAMT_BRUTTOGesamtbruttoValidator (required)bruttoMitAgAnteil

The GESAMT_BRUTTO column accepts the aliases "bruttoMitAgAnteil" and "Gesamt-".

Import Flow

  1. Opens the sheet named "employeeSalaries" — throws UserException if not found.
  2. Registers two columns with validators.
  3. Analyzes the sheet with sheet.analyze(true).
  4. Creates an ImportedSheet with warning-level logging.
  5. Iterates data rows:

Diff Properties

SALARY_DIFF_PROPERTIES = ["bruttoMitAgAnteil"]

Companion Object

Contains the sheet name constant NAME_OF_EXCEL_SHEET = "employeeSalaries" and SALARY_DIFF_PROPERTIES.

Git History

868d6abb7 2025 -> 2026
312d5e61c Clean-up
63081666f Source file headers: 2024-> 2025.
1012e347a Migration stuff in progress... (all tests of all packages: OK).