|
|
|
@ -1,14 +1,8 @@
|
|
|
|
|
using Entity.Api.Resp;
|
|
|
|
|
using Entity.Constant;
|
|
|
|
|
using Entity.DbModel.Station;
|
|
|
|
|
using HybirdFrameworkCore.Entity;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Repository.Station;
|
|
|
|
|
using Service.Execute;
|
|
|
|
|
using Service.Execute.Api;
|
|
|
|
|
using Service.Init;
|
|
|
|
|
using Service.Plc.Client;
|
|
|
|
|
using Service.Station;
|
|
|
|
|
|
|
|
|
|
namespace WebStarter.Controllers;
|
|
|
|
|
|
|
|
|
@ -104,8 +98,16 @@ public class BinInfoController : ControllerBase
|
|
|
|
|
[HttpGet("ChargePower/{code}")]
|
|
|
|
|
public Result<float> ChargePower(string code)
|
|
|
|
|
{
|
|
|
|
|
string _code = _BinInfoRepository.QueryByClause(i => i.Code == code).ChargerNo;
|
|
|
|
|
EquipInfo equipInfo = _equipInfoRepository.QueryByClause(i => i.Code == _code);
|
|
|
|
|
BinInfo binInfo = _BinInfoRepository.QueryByClause(it => it.No == code);
|
|
|
|
|
if (binInfo == null)
|
|
|
|
|
{
|
|
|
|
|
return Result<float>.Fail("仓位不存在");
|
|
|
|
|
}
|
|
|
|
|
EquipInfo equipInfo = _equipInfoRepository.QueryByClause(i => i.Code == binInfo.ChargerNo);
|
|
|
|
|
if (equipInfo == null)
|
|
|
|
|
{
|
|
|
|
|
return Result<float>.Fail("充电机不存在");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
float? chargePower = equipInfo.ChargePower;
|
|
|
|
|
if (chargePower == null)
|
|
|
|
@ -117,3 +119,4 @@ public class BinInfoController : ControllerBase
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|