|
|
@ -70,6 +70,11 @@ public class ChargeController : ControllerBase
|
|
|
|
[Route("SendPowerRegulation/{code}/{power}")]
|
|
|
|
[Route("SendPowerRegulation/{code}/{power}")]
|
|
|
|
public Result<bool> SendPowerRegulation(string code, float power)
|
|
|
|
public Result<bool> SendPowerRegulation(string code, float power)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (power < 1 || power > 360)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return Result<bool>.Fail("功率值范围1到360");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ChargerClient? chargerClient = ClientMgr.GetBySn(code);
|
|
|
|
ChargerClient? chargerClient = ClientMgr.GetBySn(code);
|
|
|
|
|
|
|
|
|
|
|
|
if (chargerClient != null)
|
|
|
|
if (chargerClient != null)
|
|
|
@ -79,7 +84,6 @@ public class ChargeController : ControllerBase
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return Result<bool>.Fail("充电机未连接");
|
|
|
|
return Result<bool>.Fail("充电机未连接");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|