EmployeeSalaryImportService.ktOrchestration service for the employee salary import pipeline. Follows the same three-phase import lifecycle (import → reconcile → commit) established by DatevImportService. Coordinates between the EmployeeSalaryExcelImporter (parsing), EmployeeSalaryDao (persistence), and EmployeeSalaryService (lookup).
| Dependency | Role |
|---|---|
EmployeeSalaryExcelImporter | Parses the Excel workbook into ImportStorage<EmployeeSalaryDO> |
EmployeeSalaryService | Lookup existing salaries by month for reconciliation |
EmployeeSalaryDao | Bulk commit and access control |
importData(inputStream, filename, year, month) — opens an ExcelWorkbook, creates an ImportStorage, delegates to EmployeeSalaryExcelImporter.doImport(). Returns the populated storage.
reconcile(storage, sheetName, year, month) — looks up existing salaries for the given year/month via employeeSalaryService.selectByMonth(), then matches each imported element to an existing DB record by employee id. Sets oldValue, id, and created timestamp on the element for the commit phase. Sets status to RECONCILED.
commit(storage, sheetName) — requires RECONCILED status. Collects selected elements, copies the existing id from oldValue for updates, and bulk-commits via employeeSalaryDao.insertOrUpdate() in blocks of 50. Sets status to IMPORTED.
checkLoggedinUserRight() delegates to employeeSalaryDao.checkLoggedInUserInsertAccess(), which verifies the user has the insert right for employee salaries.
SALARY_INSERT_BLOCK_SIZE = 50 — controls batch size for persistence operations.
868d6abb7 2025 -> 2026 63081666f Source file headers: 2024-> 2025. 1012e347a Migration stuff in progress... (all tests of all packages: OK).