关于换电任务的更新

zw
rszn 5 months ago
parent 4fb7cbfbf4
commit dd5ec66a50

@ -62,6 +62,7 @@ public class BatteryMoveTask : ITask
{
return;
}
var binInfo = queryListByClause[0];
Result<bool> success =

@ -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>

Loading…
Cancel
Save