diff --git a/Libs/CMS_CORE_Library.dll b/Libs/CMS_CORE_Library.dll index bacfa06a..c0b42385 100644 Binary files a/Libs/CMS_CORE_Library.dll and b/Libs/CMS_CORE_Library.dll differ diff --git a/Step.Database/Controllers/SessionsController.cs b/Step.Database/Controllers/SessionsController.cs index 098d32f6..1cee1f81 100644 --- a/Step.Database/Controllers/SessionsController.cs +++ b/Step.Database/Controllers/SessionsController.cs @@ -35,6 +35,8 @@ namespace Step.Database.Controllers .Sessions .Include("MachineUser") .Select(x => x.MachineUser) + .GroupBy(x => x.MachineUserId) + .Select(x => x.FirstOrDefault()) .ToList(); } diff --git a/Step.Model/DTOModels/AlarmModels/DTOAlarmHistoricModel.cs b/Step.Model/DTOModels/AlarmModels/DTOAlarmHistoricModel.cs index ffbb536a..fa5d77f4 100644 --- a/Step.Model/DTOModels/AlarmModels/DTOAlarmHistoricModel.cs +++ b/Step.Model/DTOModels/AlarmModels/DTOAlarmHistoricModel.cs @@ -62,7 +62,6 @@ namespace Step.Model.DTOModels.AlarmModels [Required] public int PageSize { get; set; } - [Required] public string Title { get; set; } [Required] diff --git a/Step.NC/NcHandler.cs b/Step.NC/NcHandler.cs index 32251874..604cdeab 100644 --- a/Step.NC/NcHandler.cs +++ b/Step.NC/NcHandler.cs @@ -1557,6 +1557,11 @@ namespace Step.NC return numericalControl.NC_SetScreenVisible((Nc.SCREEN_PAGE)screen); } + public CmsError WriteM155Data(int process, double responseValue) + { + return numericalControl.PLC_WOperatorInputResponse(process, responseValue); + } + #endregion Write data #region Siemens Tools diff --git a/Step/Controllers/SignalR/NcHub.cs b/Step/Controllers/SignalR/NcHub.cs index 9b38245b..7a922d10 100644 --- a/Step/Controllers/SignalR/NcHub.cs +++ b/Step/Controllers/SignalR/NcHub.cs @@ -210,5 +210,17 @@ namespace Step.Controllers.SignalR throw new HubException(libraryError.localizationKey); } } + + [SignalRAuthorize(FunctionAccess = GENERAL, Action = ACTIONS.WRITE)] + public void WriteM155Response(int process, double responseVal) + { + using (NcHandler ncHandler = new NcHandler()) + { + ncHandler.Connect(); + CmsError cmsError = ncHandler.WriteM155Data(process, responseVal); + if (cmsError.IsError()) + throw new HubException(cmsError.localizationKey); + } + } } } \ No newline at end of file