| | |
| | | } |
| | | |
| | | } |
| | | |
| | | public const int pageSize=20; |
| | | |
| | | #region ------时序器------- |
| | | /// <summary> |
| | |
| | | /// <param name="deviceId">设备id</param> |
| | | /// <param name="tipType">是否需要提示,默认提示</param> |
| | | /// <returns>返回结果不会为null</returns> |
| | | public List<RemoteControlEntity> GetRemoteControlLits(string deviceId,TipType tipType = TipType.flicker) |
| | | public List<RemoteControlEntity> GetRemoteControlLits(string deviceId, TipType tipType = TipType.flicker) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | |
| | | { |
| | | return new List<RemoteControlEntity>(); |
| | | } |
| | | var RemoteControlEntityList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RemoteControlEntity>>(responsePackNew.Data.ToString()); |
| | | if (RemoteControlEntityList == null) |
| | | { |
| | | var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RemoteControlEntity>>(responsePackNew.Data.ToString()); |
| | | if (list == null) |
| | | { |
| | | return new List<RemoteControlEntity>(); |
| | | } |
| | | return RemoteControlEntityList; |
| | | if (list.Count > 0) |
| | | { |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | var remoteControl = list[i]; |
| | | remoteControl.deviceId = deviceId; |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (list == null) |
| | | { |
| | | return new List<FilterCategoryEntity>(); |
| | | } |
| | | } |
| | | if (list.Count > 0) |
| | | { |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | var filterCategory = list[i]; |
| | | foreach (var o in filterCategory.filters) |
| | | { |
| | | o.category = filterCategory.category; |
| | | } |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | |
| | | /// <param name="pageNo">当前页</param> |
| | | /// <param name="pageSize">页数</param> |
| | | /// <param name="tipType">是否需要提示,默认提示</param> |
| | | public List<MovieLibrary> GetMovieLibraryPage(string deviceId, string rcId, List<FilterCategorys> filterCategorys, int pageNo, int pageSize, TipType tipType = TipType.flicker) |
| | | /// <returns>返回结果不会为null</returns> |
| | | public List<MovieLibrary> GetMovieLibraryPage(string deviceId, string rcId, List<Filters> filterCategorys, int pageNo, int pageSize, TipType tipType = TipType.flicker) |
| | | { |
| | | |
| | | JObject jObject = new JObject(); |
| | | JArray jArray = new JArray(); |
| | | |
| | | jObject.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | jObject.Add("deviceId", deviceId);//设备id |
| | | jObject.Add("rcId", rcId);//遥控器id |
| | | |
| | | foreach (var filter in filterCategorys) |
| | | if (filterCategorys != null && filterCategorys.Count != 0) |
| | | { |
| | | JObject obj = new JObject(); |
| | | obj.Add("category", filter.category); |
| | | obj.Add("filterValue", filter.filterValue); |
| | | jArray.Add(obj); |
| | | //过滤分类数据 |
| | | JArray jArray = new JArray(); |
| | | foreach (var filter in filterCategorys) |
| | | { |
| | | JObject obj = new JObject(); |
| | | obj.Add("category", filter.category); |
| | | obj.Add("filterValue", filter.filterValue); |
| | | jArray.Add(obj); |
| | | } |
| | | jObject.Add("filterCategorys", jArray);//按键标识 |
| | | } |
| | | jObject.Add("filterCategorys", jArray);//按键标识 |
| | | jObject.Add("pageNo", pageNo);//当前页 |
| | | jObject.Add("pageSize", pageSize);//页数 |
| | | //d.Add("zoneType", deviceId);//区域 |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(jObject.ToString(), NewAPI.Api_Post_Aks_MovieLibraryPage, "影片分页获取"); |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(jObject, NewAPI.Api_Post_Aks_MovieLibraryPage, "影片分页获取"); |
| | | if (!this.DataChecking(responsePackNew, tipType)) |
| | | { |
| | | return new List<MovieLibrary>(); |