/// <summary> /// 根据设备性质来获取设备性质对应的状态类型 /// </summary> /// <param name="alarmRequest"></param> /// <returns></returns> public BasicResponse <DataTable> GetAlarmTypeDataByProperty(GetAlarmTypeDataByPropertyRequest alarmRequest) { var response = new BasicResponse <DataTable>(); if (string.IsNullOrWhiteSpace(alarmRequest.Code) || string.IsNullOrWhiteSpace(alarmRequest.Name)) { response.Code = -100; response.Message = "参数错误!"; return(response); } try { response.Data = _Repository.GetAlarmTypeDataByProperty(alarmRequest.Code, alarmRequest.Name); } catch (Exception ex) { response.Code = -100; response.Message = ex.Message; this.ThrowException("根据设备性质来获取设备性质对应的状态类型", ex); } return(response); }