- Timestamp:
- 01/06/23 21:08:03 (23 months ago)
- Branches:
- main
- Children:
- 89865ae
- Parents:
- 9dcbf44
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/autopartz/controller/HomeController.java
r9dcbf44 rcab5859 37 37 private final DeliveryService deliveryService; 38 38 private final PartIsInStockInWarehouseRepository partIsInStockInWarehouseRepository; 39 private final CarCategoryReportRepository carCategoryReportRepository; 40 private final PartManufacturersReportRepository partManufacturersReportRepository; 41 private final MostPurchasedPartRepository mostPurchasedPartRepository; 39 42 public HomeController(LoginService loginService, PartService partService, PartsForCarTypeAndCategoryRepository partsForCarTypeAndCategoryRepository, CarService carService, CategoryService categoryService, RepairShopReviewSummaryRepository repairShopReviewSummaryRepository, WarehouseRepository warehouseRepository, 40 OrderContainsPartRepository orderContainsPartRepository, OrderService orderService, UserService userService, DeliveriesInProgressRepository deliveriesInProgressRepository, DeliveryService deliveryService, PartIsInStockInWarehouseRepository partIsInStockInWarehouseRepository ) {43 OrderContainsPartRepository orderContainsPartRepository, OrderService orderService, UserService userService, DeliveriesInProgressRepository deliveriesInProgressRepository, DeliveryService deliveryService, PartIsInStockInWarehouseRepository partIsInStockInWarehouseRepository, CarCategoryReportRepository carCategoryReportRepository, PartManufacturersReportRepository partManufacturersReportRepository, MostPurchasedPartRepository mostPurchasedPartRepository) { 41 44 this.loginService = loginService; 42 45 this.partService = partService; … … 52 55 this.deliveryService = deliveryService; 53 56 this.partIsInStockInWarehouseRepository = partIsInStockInWarehouseRepository; 57 this.carCategoryReportRepository = carCategoryReportRepository; 58 this.partManufacturersReportRepository = partManufacturersReportRepository; 59 this.mostPurchasedPartRepository = mostPurchasedPartRepository; 54 60 } 55 61 … … 231 237 return "master-template"; 232 238 } 239 @GetMapping("/carCategoryReport") 240 public String getCarCategoryInfo(Model model){ 241 model.addAttribute("data",carCategoryReportRepository.findAll()); 242 model.addAttribute("bodyContent","carCategoryReport"); 243 return "master-template"; 244 } 245 @GetMapping("/partManufacturersReport") 246 public String getPartManufacturersReport(Model model){ 247 model.addAttribute("data",partManufacturersReportRepository.findAll()); 248 model.addAttribute("bodyContent","partManufacturersReport"); 249 return "master-template"; 250 251 } 252 @GetMapping("/mostPurchasedPart") 253 public String getMostPurchasedPart(Model model){ 254 model.addAttribute("data",mostPurchasedPartRepository.findAll()); 255 model.addAttribute("bodyContent","mostPurchasedPart"); 256 return "master-template"; 257 } 233 258 }
Note:
See TracChangeset
for help on using the changeset viewer.