diff --git a/WebStarter/Controllers/TBoxController.cs b/WebStarter/Controllers/TBoxController.cs index a60726b..e4fecdd 100644 --- a/WebStarter/Controllers/TBoxController.cs +++ b/WebStarter/Controllers/TBoxController.cs @@ -35,11 +35,11 @@ public class TBoxController : ControllerBase /// vin码 /// "0:未解锁未上锁 1:解锁成功 2:上锁成功 3:无效数据 其他状态无效" [HttpGet("lock/{carNo}")] - public int Lock(string carNo) + public bool Lock(string carNo) { Log.Info($"Lock {carNo}"); TBoxServerMgr.Server?.StartSendLock(1); - return TBoxServerMgr.Server?.LockStatusMsg?.LockStatus ?? 100; + return TBoxServerMgr.Server?.LockStatusMsg?.LockStatus==2; } /// @@ -48,11 +48,11 @@ public class TBoxController : ControllerBase /// vin码 /// 发送状态 [HttpGet("unLock/{carNo}")] - public int UnLock(string carNo) + public bool UnLock(string carNo) { Log.Info($"UnLock {carNo}"); TBoxServerMgr.Server?.StartSendLock(2); - return TBoxServerMgr.Server?.LockStatusMsg?.LockStatus ?? 100; + return TBoxServerMgr.Server?.LockStatusMsg?.LockStatus ==1; } ///