|
|
|
@ -29,7 +29,7 @@ public class BinInfoRepository : BaseRepository<BinInfo>
|
|
|
|
|
QueryListByClause(i => i.CacheBinFlag == 0 && i.CanSwapFlag==1 &&
|
|
|
|
|
i.Exists == 1 && i.Status == 1 && i.AmtLock == (int)InfoEnum.AmtBatLockStatus.UnLock,
|
|
|
|
|
"in_time asc");
|
|
|
|
|
BinInfo? cacheBinBattery = ChooseCacheBinBattery();
|
|
|
|
|
BinInfo? cacheBinBattery = ChooseCacheBinBattery(swapSoc);
|
|
|
|
|
if (list.Count <= 0 && cacheBinBattery == null)
|
|
|
|
|
{
|
|
|
|
|
selectPackDto.Info = InfoEnum.SelectBinStatusInfo.NoBattery;
|
|
|
|
@ -81,10 +81,10 @@ public class BinInfoRepository : BaseRepository<BinInfo>
|
|
|
|
|
/// 选择缓存仓的电池
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public BinInfo? ChooseCacheBinBattery()
|
|
|
|
|
public BinInfo? ChooseCacheBinBattery(int swapSoc)
|
|
|
|
|
{
|
|
|
|
|
return
|
|
|
|
|
QueryByClause(i => i.CacheBinFlag == 1 && i.CanSwapFlag==1 &&
|
|
|
|
|
QueryByClause(i => i.CacheBinFlag == 1 && i.CanSwapFlag==1 && i.Soc >= swapSoc &&
|
|
|
|
|
i.Exists == 1 && i.Status == 1 && i.AmtLock == (int)InfoEnum.AmtBatLockStatus.UnLock);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|