public AllSafetyPreWarningStateDataModel GetSafetyPreWarningRealTimePushModel() { AllSafetyPreWarningStateDataModel models = new AllSafetyPreWarningStateDataModel(); var source = _sfwrp.GetAllSafetyDatas(); models.SafetyPreWarningState = source.TotalSafetyPreWarningState; models.SafetyPreWarningColor = source.TotalSafetyPreWarningColor; List <SafetyPreWarningStateAndTotalTimesModel> result = new List <SafetyPreWarningStateAndTotalTimesModel>() { new SafetyPreWarningStateAndTotalTimesModel { TestTypeId = 1, SafetyPreWarningState = source.CableForceSafetyPreWarningState, SafetyPreWarningColor = source.CableForceSafetyPreWarningColor, WarningGrade2Times = source.CableForceWarningGrade2Times, WarningGrade3Times = source.CableForceWarningGrade3Times }, new SafetyPreWarningStateAndTotalTimesModel { TestTypeId = 2, SafetyPreWarningState = source.DisplacementSafetyPreWarningState, SafetyPreWarningColor = source.DisplacementSafetyPreWarningColor, WarningGrade2Times = source.DisplacementWarningGrade2Times, WarningGrade3Times = source.DisplacementWarningGrade3Times }, new SafetyPreWarningStateAndTotalTimesModel { TestTypeId = 3, SafetyPreWarningState = source.WindLoadSafetyPreWarningState, SafetyPreWarningColor = source.WindLoadSafetyPreWarningColor, WarningGrade2Times = source.WindLoadWarningGrade2Times, WarningGrade3Times = source.WindLoadWarningGrade3Times }, new SafetyPreWarningStateAndTotalTimesModel { TestTypeId = 4, SafetyPreWarningState = source.TemperatureSafetyPreWarningState, SafetyPreWarningColor = source.TemperatureSafetyPreWarningColor, WarningGrade2Times = source.TemperatureWarningGrade2Times, WarningGrade3Times = source.TemperatureWarningGrade3Times }, }; models.SafetyPreWarningStateData = result; return(models); }
void BroadcastStockPrice(AllSafetyPreWarningStateDataModel models) { Clients.All.SafetyWarningStateRealTimePushDatas(models); }