|
|
|
@ -37,7 +37,7 @@ public class ChargeMonitorController
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
/// <exception cref="Exception"></exception>
|
|
|
|
|
[HttpPost("BinInfoMakeAnAppointment/{binNo}/{amtLock}")]
|
|
|
|
|
public async Task<Result<bool>> BinInfoMakeAnAppointment(string binNo,int amtLock)
|
|
|
|
|
public async Task<Result<bool>> BinInfoMakeAnAppointment(string binNo, int amtLock)
|
|
|
|
|
{
|
|
|
|
|
BinInfo binInfo = await _binInfoService.QueryByClauseAsync(u => u.No == binNo);
|
|
|
|
|
if (binInfo == null)
|
|
|
|
@ -85,7 +85,7 @@ public class ChargeMonitorController
|
|
|
|
|
public async Task<Result<PageResult<BinInfo>>> ChargePositionQuery(
|
|
|
|
|
[FromBody] ChargePositionQueryReq chargePositionQueryReq)
|
|
|
|
|
{
|
|
|
|
|
return Result<PageResult<BinInfo>>.Success( await _binInfoService.ChargePositionQuery(chargePositionQueryReq));
|
|
|
|
|
return Result<PageResult<BinInfo>>.Success(await _binInfoService.ChargePositionQuery(chargePositionQueryReq));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -119,9 +119,24 @@ public class ChargeMonitorController
|
|
|
|
|
[HttpGet("BatteryRelocation")]
|
|
|
|
|
public async Task<Result<bool>> BatteryRelocation(ushort removeBinNo, ushort putBinNo)
|
|
|
|
|
{
|
|
|
|
|
return _monitorService.BatteryRelocation(removeBinNo, putBinNo,1);
|
|
|
|
|
Result<bool> res = Result<bool>.Fail();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
res = _monitorService.BatteryRelocation(removeBinNo, putBinNo, 1);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
if (PlcMgr.PlcClient?.ReadTaskNo() == 2)
|
|
|
|
|
{
|
|
|
|
|
PlcMgr.PlcClient?.ResetTaskNo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Result<bool>.Fail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return res; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 移仓时下拉项 仓位电池状态
|
|
|
|
|
/// </summary>
|
|
|
|
|