现场问题修改

zw
rszn 5 months ago
parent b7d002d939
commit 45eb69a8ce

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

@ -56,7 +56,6 @@ public class SwapDoneState : IState
machine.PlcSwapFlag = true; machine.PlcSwapFlag = true;
}); });
if (machine.SwapStatus == (int)InfoEnum.SwapOrderResult.Success) if (machine.SwapStatus == (int)InfoEnum.SwapOrderResult.Success)
{ {
//上传云平台换电状态 //上传云平台换电状态
@ -178,4 +177,4 @@ public class SwapDoneState : IState
: (int)InfoEnum.SwapInfo.ErrInfoCarLeave); : (int)InfoEnum.SwapInfo.ErrInfoCarLeave);
}, false, () => { }, 10, InvokeStatus.None); }, false, () => { }, 10, InvokeStatus.None);
} }
} }

Loading…
Cancel
Save