//测试数据,废弃
        public void GetTestClasses(string serverip)
        {
            if (DeviceClasses.ContainsKey(serverip))
            {
                DeviceClasses.Remove(serverip);
            }
            DeviceClasses.Add(serverip, DeviceClassExamples.DeviceDiagnoseClassLib);//实际从数据库获取
            if (ShaftClasses.ContainsKey(serverip))
            {
                ShaftClasses.Remove(serverip);
            }
            ShaftClasses.Add(serverip, ShaftClassExamples.ShaftClassLib);//实际从数据库获取
            if (BearingClasses.ContainsKey(serverip))
            {
                BearingClasses.Remove(serverip);
            }
            BearingClasses.Add(serverip, BearingClassExamples.BearingClassLib);//实际从数据库获取
            if (BeltClasses.ContainsKey(serverip))
            {
                BeltClasses.Remove(serverip);
            }
            BeltClasses.Add(serverip, BeltClassExamples.BeltClassLib);//实际从数据库获取
            if (GearClasses.ContainsKey(serverip))
            {
                GearClasses.Remove(serverip);
            }
            GearClasses.Add(serverip, GearClassExamples.GearClassLib);//实际从数据库获取
            if (ImpellerClasses.ContainsKey(serverip))
            {
                ImpellerClasses.Remove(serverip);
            }
            ImpellerClasses.Add(serverip, ImpellerClassExamples.ImpellerClassLib);//实际从数据库获取
            if (MotorClasses.ContainsKey(serverip))
            {
                MotorClasses.Remove(serverip);
            }
            MotorClasses.Add(serverip, MotorClassExamples.MotorClassLib);//实际从数据库获取

            DeviceClassList.Clear();
            DeviceClassList.AddRange(DeviceClasses.SelectMany(p => p.Value));
            ShaftClassList.Clear();
            ShaftClassList.AddRange(ShaftClasses.SelectMany(p => p.Value));
            BearingClassList.Clear();
            BearingClassList.AddRange(BearingClasses.SelectMany(p => p.Value));
            BeltClassList.Clear();
            BeltClassList.AddRange(BeltClasses.SelectMany(p => p.Value));
            GearClassList.Clear();
            GearClassList.AddRange(GearClasses.SelectMany(p => p.Value));
            ImpellerClassList.Clear();
            ImpellerClassList.AddRange(ImpellerClasses.SelectMany(p => p.Value));
            MotorClassList.Clear();
            MotorClassList.AddRange(MotorClasses.SelectMany(p => p.Value));
        }
        public async Task GetDeviceClasses(string serverip)
        {
            //设备
            if (DeviceClasses.ContainsKey(serverip))
            {
                DeviceClasses.Remove(serverip);
            }
            var t_models = await _databaseComponent.Query <T_DeviceDiagnose>(serverip, null, null, null);

            if (t_models != null)
            {
                List <DeviceDiagnoseClass> models = new List <DeviceDiagnoseClass>();
                foreach (var t_model in t_models)
                {
                    var model = DeviceDiagnoseClass.ConvertFromDB(t_model);
                    models.Add(model);
                }
                DeviceClasses.Add(serverip, models);
            }

            DeviceClassList.Clear();
            DeviceClassList.AddRange(DeviceClasses.SelectMany(p => p.Value));
        }