获取充电机功率设置

zw
rszn 5 months ago
parent 083bfca885
commit a919e0ad35

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

Loading…
Cancel
Save