|
|
@ -252,6 +252,7 @@ public class SwapMonitorController : ControllerBase
|
|
|
|
return Result<bool>.Success();
|
|
|
|
return Result<bool>.Success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 切换成 营业状态
|
|
|
|
/// 切换成 营业状态
|
|
|
|
/// 换电站状态: 1:营运中 2:歇业中 3:设备维护状态 4:暂停营业
|
|
|
|
/// 换电站状态: 1:营运中 2:歇业中 3:设备维护状态 4:暂停营业
|
|
|
@ -320,4 +321,46 @@ public class SwapMonitorController : ControllerBase
|
|
|
|
|
|
|
|
|
|
|
|
return Result<bool>.Success();
|
|
|
|
return Result<bool>.Success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 切换成 自动启动
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
[HttpPost("AutoInitiate")]
|
|
|
|
|
|
|
|
public Result<bool> AutoInitiate()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
StaticStationInfo.SwapInitiateMode = (byte)StationConstant.SwapInitiateMode.Auto;
|
|
|
|
|
|
|
|
return Result<bool>.Success();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 切换成 手动启动
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
[HttpPost("ManualInitiate")]
|
|
|
|
|
|
|
|
public Result<bool> ManualInitiate()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
StaticStationInfo.SwapInitiateMode = (byte)StationConstant.SwapInitiateMode.Manual;
|
|
|
|
|
|
|
|
return Result<bool>.Success();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 卷帘门控制:1000:请求开启 1010:请求关闭
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
[HttpPost("RollerShutter")]
|
|
|
|
|
|
|
|
public async Task<Result<bool>> RollerShutter(ushort value)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return PlcMgr.WriteRollerShutter(value) ? Result<bool>.Success(true) : Result<bool>.Fail();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 卷帘门是否开启
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <returns>true:开启状态;false:关闭状态 </returns>
|
|
|
|
|
|
|
|
[HttpPost("GetRollerShutter")]
|
|
|
|
|
|
|
|
public async Task<Result<bool>> GetRollerShutter()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return PlcMgr.RollerShutterRadar() ? Result<bool>.Success(true) : Result<bool>.Fail();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|