Interface AmmService

All Known Implementing Classes:
AmmServiceImpl

@Component public interface AmmService
  • Method Summary

    Modifier and Type
    Method
    Description
    getAmmMonth(Entity caseEntity, int year, int month)
    Deprecated.
    getAmmMonth(Entity caseEntity, int year, int month, Entity subventionCanton)
    This method can be used to generate an AmmMonth with a fixed Subvention_canton entity.
  • Method Details

    • getAmmMonth

      @Deprecated AmmMonth getAmmMonth(Entity caseEntity, int year, int month)
      Deprecated.
      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. Resolve the Subvention_canton of the case 5. Get the code of the Registration_accomplishment_status_subvention_canton corresponding to the canton + status and write it 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 for
      year - 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
    • getAmmMonth

      AmmMonth getAmmMonth(Entity caseEntity, int year, int month, Entity subventionCanton)
      This method can be used to generate an AmmMonth with a fixed Subvention_canton entity. The Subvention_canton of the caseEntity is no longer resolved / considered.
      Parameters:
      caseEntity - the case for
      year - the year for which the presences are generated (yyyy, e.g. 2025)
      month - month for which the presences are generated (1-12)
      subventionCanton - the subvention canton entity to be used
      Returns:
      the generated AmmMonth