Class ProductUsageReport
java.lang.Object
csce331.group13.project2.backend.ProductUsageReport
Generates product usage reports by aggregating inventory item consumption
from orders within a specified date range.
- Author:
- Austin Glander
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<ProductUsageData> getProductUsageData(LocalDate start, LocalDate end) Retrieves product usage data for a specified date range.
-
Constructor Details
-
ProductUsageReport
public ProductUsageReport()
-
-
Method Details
-
getProductUsageData
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.
-