充电机功率设置

master
CZ 5 months ago
parent 3106b0cddc
commit 8b80353616

@ -16,6 +16,7 @@ public class BinInfoService : BaseServices<BinInfo>
public BinInfoService(BinInfoRepository binInfoRepository)
{
_binInfoRepository = binInfoRepository;
this.BaseDal = binInfoRepository;
}
/// <summary>
/// 获取仓位数据

@ -77,13 +77,14 @@ public class ChargeController : ControllerBase
return Result<bool>.Fail("功率值范围1到360");
}
ChargerClient? chargerClient = ClientMgr.GetBySn(code);
string _code = _binInfoService.QueryByClause(i => i.Code == code).ChargerNo;
ChargerClient? chargerClient = ClientMgr.GetBySn(_code);
if (chargerClient != null)
{
chargerClient.SendPowerRegulation(power);
_equipInfoRepository.Update(i => i.ChargePower == power, it => it.Code == code);
_equipInfoRepository.Update(i => i.ChargePower == power, it => it.Code == _code);
return Result<bool>.Success(true);
}

Loading…
Cancel
Save