Added Siemens/Demo M155 SignalR
WIP fix alarm filters
This commit is contained in:
@@ -50,7 +50,8 @@ namespace Step.Database.Controllers
|
||||
x.TimeStamp >= startDate && x.TimeStamp <= endDate
|
||||
&& types.Contains(x.Type)
|
||||
&& x.Users.Any(y => userIds.Any(z => z == y.UserId))
|
||||
&& ((x.Source == ALARM_SOURCE.NC && ncAlarmDescIds.Contains(x.AlarmDescriptionId.Value))
|
||||
&&
|
||||
((x.Source == ALARM_SOURCE.NC && ncAlarmDescIds.Contains(x.AlarmDescriptionId.Value))
|
||||
|| (x.Source == ALARM_SOURCE.PLC && plcAlarmDescIds.Contains(x.PlcMessageId.Value)))
|
||||
);
|
||||
|
||||
@@ -69,7 +70,7 @@ namespace Step.Database.Controllers
|
||||
{
|
||||
dbCtx.AlarmOccurrences.AddRange(alarms);
|
||||
|
||||
dbCtx.SaveChangesAsync();
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public void InsertNewNcAlarmDescriptions(List<AlarmDescriptionsModel> descriptions)
|
||||
@@ -84,14 +85,14 @@ namespace Step.Database.Controllers
|
||||
dbCtx.AlarmDescriptions.Add(desc);
|
||||
}
|
||||
|
||||
dbCtx.SaveChangesAsync();
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public void InsertNewAlarmUser(List<AlarmUserModel> loggedUser)
|
||||
{
|
||||
dbCtx.AlarmUsers.AddRange(loggedUser);
|
||||
|
||||
dbCtx.SaveChangesAsync(); // TODO check if it is the best solutions
|
||||
dbCtx.SaveChanges(); // TODO check if it is the best solutions
|
||||
}
|
||||
|
||||
public DTOAlarmsData GetAlarmsData(int pageSize)
|
||||
|
||||
Reference in New Issue
Block a user