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