Class ProductUsageReport

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

public class ProductUsageReport extends Object
Generates product usage reports by aggregating inventory item consumption from orders within a specified date range.
Author:
Austin Glander
  • Constructor Details

    • ProductUsageReport

      public ProductUsageReport()
  • Method Details

    • getProductUsageData

      public static List<ProductUsageData> getProductUsageData(LocalDate start, LocalDate end)
      Retrieves product usage data for a specified date range. Calculates the total quantity of each inventory item used based on orders and the menu-inventory relationships.
      Parameters:
      start - The start date of the report period (inclusive).
      end - The end date of the report period (inclusive).
      Returns:
      A list of ProductUsageData objects sorted by total usage (descending), or an empty list if an error occurs.