Interface AmmService
- All Known Implementing Classes:
AmmServiceImpl
@Component
public interface AmmService
-
Method Summary
Modifier and TypeMethodDescriptiongetAmmMonth(Entity caseEntity, int year, int month) Creates an AmmMonth Bean containing information about presences for each "half-day" of the month (e.g.
-
Method Details
-
getAmmMonth
Creates an AmmMonth Bean containing information about presences for each "half-day" of the month (e.g. am + pm for days 1-31). Missing days (days without presences or days of shorter months) are filled with empty AmmDay beans. It works as follows 1. Try to resolve Working_day of case for the current half day 2. Try to resolve Reservation_registration for the current half day 3. Resolve the Registration_accomplishment_status of the resolved entity 4. Write its amm_code into the AmmDay bean Additionally, it calculates expense totals for the current month by type as follows: 1. Select all expenses of current month (date >= first day of month invalid input: '&' date invalid input: '<'= last day of month) 2. Group expenses by Expense_type 3. Create a AmmExpenses record per type containing type, number of expeneses, avg amount, and total amount The queries that are used to resolve Working_days or Reservation_registration can be configured using the interface AmmServiceConditions- Parameters:
caseEntity- the case foryear- the year for which the presences are generated (yyyy, e.g. 2025)month- month for which the presences are generated (1-12)- Returns:
- the generated AmmMonth
-