Beispiel #1
0
        //统计组织内的所有在线数据
        public DeviceOnlineListViewModel GetGroupOnlineDevice(string token)
        {
            DeviceOnlineListViewModel dolvm = new DeviceOnlineListViewModel();
            List <DeviceOnlineModel>  dom   = new DeviceOnlineRepository().FindAllDeviceOnline(token);

            foreach (var item in dom)
            {
                DeviceOnlineViewModel dovm = new DeviceOnlineViewModel()
                {
                    DeviceSn = item.Device.DeviceSn, dt = item.dt, TypeId = item.Device.TypeId
                };
                dolvm.list.Add(dovm);
            }
            dolvm.Success = true;
            dolvm.Message = "获取在线设备成功";
            return(dolvm);
        }
Beispiel #2
0
 public DeviceOnlineService()
 {
     _dor = new DeviceOnlineRepository();
 }