| | |
| | | namespace WCS.Application; |
| | | using Microsoft.AspNetCore.SignalR; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 报警信息表服务 |
| | |
| | | public class WcsAlarmInfoService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<WcsAlarmInfo> _wcsAlarmInfoRep; |
| | | public WcsAlarmInfoService(SqlSugarRepository<WcsAlarmInfo> wcsAlarmInfoRep) |
| | | private readonly IHubContext<PlcHub, IPlcHub> _plcHubContext; |
| | | |
| | | public WcsAlarmInfoService(SqlSugarRepository<WcsAlarmInfo> wcsAlarmInfoRep, IHubContext<PlcHub, IPlcHub> plcHubContext) |
| | | { |
| | | _wcsAlarmInfoRep = wcsAlarmInfoRep; |
| | | _plcHubContext = plcHubContext; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | [DisplayName("复位报警")] |
| | | public async Task Reset() |
| | | { |
| | | throw Oops.Bah("开发中"); |
| | | //测试推数据用的 |
| | | await _plcHubContext.Clients.All.PublicAlarm(new WcsAlarmInfoOutput() { Id = new Random().Next(), StationNum = "205", AlarmCode = "MB102", AlarmName = "有物品遮挡", AlarmTime = DateTime.Now }); |
| | | //throw Oops.Bah("开发中"); |
| | | |
| | | } |
| | | |
| | | |