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

            return(JsonConvert.SerializeObject(jr));
        }