public void GetInfoTestAsync() { GroundLockTerminalBLL terminalBLL = new GroundLockTerminalBLL(); GroundLockTerminalInfo terminalInfo = terminalBLL.GetTerminalStatus("ZZCWS0000002"); Assert.Equal(1, terminalInfo.OnLine); }
public IActionResult GetLockStatus(string id) { string sn = prefix + id; GroundLockTerminalBLL terminalBLL = new GroundLockTerminalBLL(); GroundLockTerminalInfo terminalInfo = terminalBLL.GetTerminalStatus(sn); return(Json(terminalInfo)); }
public IActionResult LockControl(string id, string cmdType) { GroundLockTerminalBLL terminalBLL = new GroundLockTerminalBLL(); string sn = prefix + id; if (cmdType == "uplock") { terminalBLL.UpLock(sn); } if (cmdType == "downlock") { terminalBLL.DownLock(sn); } return(Json("{\"success\":\"1\",\"msg\":\"操作成功\"}")); }