|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|