From 5a7dbc9d732b57c541a4b1374ce6f570c0cdaec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB=20=D0=9F=D1=83=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=D0=B8=D0=BD?= Date: Wed, 26 Apr 2023 11:20:34 +0400 Subject: [PATCH] fix --- .../PrecastConcretePlantBusinessLogic/ShopLogic.cs | 1 + PrecastConcretePlant/PrecastConcretePlantFileImplement/Shop.cs | 1 + .../PrecastConcretePlantFileImplement/ShopStorage.cs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/PrecastConcretePlant/PrecastConcretePlantBusinessLogic/ShopLogic.cs b/PrecastConcretePlant/PrecastConcretePlantBusinessLogic/ShopLogic.cs index 86cba03..ed8fabd 100644 --- a/PrecastConcretePlant/PrecastConcretePlantBusinessLogic/ShopLogic.cs +++ b/PrecastConcretePlant/PrecastConcretePlantBusinessLogic/ShopLogic.cs @@ -155,6 +155,7 @@ namespace PrecastConcretePlantBusinessLogic Id = element.Id, Address = element.Address, Name = element.Name, + MaxCountReinforceds = element.MaxCountReinforceds, DateOpening = element.DateOpening, Reinforceds = element.Reinforceds }); diff --git a/PrecastConcretePlant/PrecastConcretePlantFileImplement/Shop.cs b/PrecastConcretePlant/PrecastConcretePlantFileImplement/Shop.cs index ce969c9..1c105ed 100644 --- a/PrecastConcretePlant/PrecastConcretePlantFileImplement/Shop.cs +++ b/PrecastConcretePlant/PrecastConcretePlantFileImplement/Shop.cs @@ -81,6 +81,7 @@ namespace PrecastConcretePlantFileImplement Name = model.Name; Address = model.Address; DateOpening = model.DateOpening; + MaxCountReinforceds = model.MaxCountReinforceds; CountReinforceds = model.Reinforceds.ToDictionary(x => x.Key, x => x.Value.Item2); _cachedReinforceds = null; } diff --git a/PrecastConcretePlant/PrecastConcretePlantFileImplement/ShopStorage.cs b/PrecastConcretePlant/PrecastConcretePlantFileImplement/ShopStorage.cs index 45d6baf..92d2ffc 100644 --- a/PrecastConcretePlant/PrecastConcretePlantFileImplement/ShopStorage.cs +++ b/PrecastConcretePlant/PrecastConcretePlantFileImplement/ShopStorage.cs @@ -83,7 +83,7 @@ namespace PrecastConcretePlantFileImplement { var resultCount = _source.Shops .Select(shop => shop.Reinforceds - .FirstOrDefault(x => x.Key == reinforced.Id).Value.Item2) + .FirstOrDefault(x => x.Key == reinforced.Id).Value.Item2) .Sum(); if (resultCount < needCount) {