Class ZReport

java.lang.Object
csce331.group13.project2.backend.ZReport

public class ZReport extends Object
Generates Z-Reports (end-of-day sales reports) showing hourly sales and transaction counts. Tracks whether a Z-Report has been run for the current day.
Author:
Varish Kongara, Austin Glander
  • Constructor Details

    • ZReport

      public ZReport()
  • Method Details

    • hasBeenRun

      public static boolean hasBeenRun()
      Checks if a Z-Report has been run for the current day (UTC).
      Returns:
      true if a Z-Report has been run today; false otherwise.
    • updateZReport

      public static boolean updateZReport()
      Records that a Z-Report has been run for the current day (UTC). Inserts an entry into the zreports table.
      Returns:
      true if the record was successfully inserted; false otherwise.
    • getHourlySales

      public static Map<Integer,Double> getHourlySales()
      Retrieves hourly sales totals for the current day.
      Returns:
      A map where keys are hours (0-23) and values are total sales for that hour.
    • getHourlyTransactions

      public static Map<Integer,Integer> getHourlyTransactions()
      Retrieves hourly transaction counts for the current day.
      Returns:
      A map where keys are hours (0-23) and values are transaction counts for that hour.