fix
This commit is contained in:
parent
eadf7da836
commit
85dd33db61
@ -13,7 +13,6 @@ namespace PrecastConcretePlantContracts.StoragesContract
|
|||||||
ShopViewModel? Insert(ShopBindingModel model);
|
ShopViewModel? Insert(ShopBindingModel model);
|
||||||
ShopViewModel? Update(ShopBindingModel model);
|
ShopViewModel? Update(ShopBindingModel model);
|
||||||
ShopViewModel? Delete(ShopBindingModel model);
|
ShopViewModel? Delete(ShopBindingModel model);
|
||||||
bool HasNeedReinforceds(IReinforcedModel reinforced, int needCount);
|
|
||||||
public bool SellReinforceds(IReinforcedModel reinforced, int needCount);
|
public bool SellReinforceds(IReinforcedModel reinforced, int needCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,18 +79,13 @@ namespace PrecastConcretePlantFileImplement
|
|||||||
return shop.GetViewModel;
|
return shop.GetViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasNeedReinforceds(IReinforcedModel reinforced, int needCount)
|
public bool SellReinforceds(IReinforcedModel reinforced, int needCount)
|
||||||
{
|
{
|
||||||
var resultCount = _source.Shops
|
var resultCount = _source.Shops
|
||||||
.Select(shop => shop.Reinforceds
|
.Select(shop => shop.Reinforceds
|
||||||
.FirstOrDefault(x => x.Key == reinforced.Id).Value.Item2)
|
.FirstOrDefault(x => x.Key == reinforced.Id).Value.Item2)
|
||||||
.Sum();
|
.Sum();
|
||||||
return resultCount >= needCount;
|
if (resultCount >= needCount)
|
||||||
}
|
|
||||||
|
|
||||||
public bool SellReinforceds(IReinforcedModel reinforced, int needCount)
|
|
||||||
{
|
|
||||||
if (!HasNeedReinforceds(reinforced, needCount))
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -106,7 +101,6 @@ namespace PrecastConcretePlantFileImplement
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,11 +105,6 @@ namespace PrecastConcretePlantListImplement
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasNeedReinforceds(IReinforcedModel reinforced, int needCount)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool SellReinforceds(IReinforcedModel reinforced, int needCount)
|
public bool SellReinforceds(IReinforcedModel reinforced, int needCount)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
Loading…
Reference in New Issue
Block a user