/// <summary> /// 车道闸口锁定 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool SetGateKeep(GateKeepListModel model) { _gateKeepRedisOperate.model = model; //因修改的时候始终是false,所以暂不参考redis返回值 _gateKeepRedisOperate.SaveToRedis(); return(true); }
/// <summary> /// 读取车道闸口锁定集合 /// </summary> /// <param name="parkingCode">停车场编码</param> /// <returns></returns> public GateKeepListModel GetGateKeep(string parkingCode) { GateKeepListModel model = null; _gateKeepRedisOperate.model = new GateKeepListModel() { ParkingCode = parkingCode }; model = _gateKeepRedisOperate.GetFromRedis(); return(model); }
/// <summary> /// 车道闸口锁定 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool SetGateKeep(GateKeepListModel model) { if (model == null || model.List == null || model.List.Count <= 0) { return(false); } bool flag = _iCarInOutContext.SetGateKeep(model); if (flag) { foreach (var item in model.List) { SendGateKeepToMq(new CameraKeepModel() { DeviceIdentify = item.DeviceMacAddress, GateState = item.GateState }, model.ParkingCode); } } return(true); }