mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-12-22 15:31:08 +00:00
Module Server, clss SimpleMessageHandler : correction réponse queryStat + update instantiation des services
This commit is contained in:
parent
ee6aa6e70b
commit
f768082450
@ -40,8 +40,8 @@ public class SimpleMessageHandler implements IMessageHandler {
|
||||
serverStateService = new ServerStateService();
|
||||
accountService = new AccountService();
|
||||
clientService = new ClientService();
|
||||
saleService = new SaleService();
|
||||
stockService = new StockService();
|
||||
saleService = new SaleService(stockService);
|
||||
statisticsService = new StatisticsService(stockService, saleService);
|
||||
messageToolFactory = new GSonMessageToolFactory();
|
||||
|
||||
@ -81,8 +81,8 @@ public class SimpleMessageHandler implements IMessageHandler {
|
||||
fields.put("top_popular_products", messageToolFactory.getListFormatter(LightweightProduct.class).format(statisticsService.getTopPopularProducts(5)));
|
||||
fields.put("staff_sale_worth",Double.toString(statisticsService.getStaffSaleWorth()));
|
||||
fields.put("staff_sale_amount",Integer.toString(statisticsService.getStaffSaleAmount()));
|
||||
fields.put("guest_sale_worth",Double.toString(statisticsService.getGuestSaleAmount()));
|
||||
fields.put("guest_sale_amount",Integer.toString(statisticsService.getStaffSaleAmount()));
|
||||
fields.put("guest_sale_worth",Double.toString(statisticsService.getGuestSaleWorth()));
|
||||
fields.put("guest_sale_amount",Integer.toString(statisticsService.getGuestSaleAmount()));
|
||||
|
||||
return new Message(MessageType.MSG_STAT, serverStateService.getServer(), message.getEmitter(), message.getUser(), message, fields);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user