/// <summary> /// 视频 /// </summary> /// <returns></returns> private bool CacheVideo() { try { List <MODEL.ElevatorInfoModel> list = Clone <List <MODEL.ElevatorInfoModel> >(elevatorList); foreach (MODEL.ElevatorInfoModel model in list) { JTYResultModel video = JTYApiHelp.GetLiftVideo(model.registrationCode); if (ShowMsg != null) { ShowMsg(string.Format("电梯视频缓存,{0},{1}", model.registrationCode, video.head)); } Thread.Sleep(15000); } return(true); } catch (Exception e) { if (ShowMsg != null) { ShowMsg("缓存电梯error:原因如下:" + e.Message); } LogHelper.Dbbug("缓存电梯error:原因如下:" + e.Message); return(false); } }
/// <summary> /// 电梯视频 /// </summary> /// <param name="registercode"></param> /// <returns></returns> public string GetLiftVideo(string registercode) { JTYResultModel model = JTYApiHelp.GetLiftVideo(registercode); var jr = new MODEL.JsonResultModel <string>() { IsSucceed = model.issuccess, Data = model.para, Msg = model.head, RedirectUrl = string.Empty }; return(JsonConvert.SerializeObject(jr)); }