37 lines
931 B
C#
Raw Normal View History

2024-11-13 17:50:52 +08:00
using JiShe.CollectBus.Application.Contracts;
using Volo.Abp.AspNetCore.Mvc;
2024-11-08 10:30:54 +08:00
2024-11-08 17:21:49 +08:00
namespace JiShe.CollectBus.Host.Controllers
2024-11-08 10:30:54 +08:00
{
2024-11-13 17:50:52 +08:00
public class CommandController : AbpController
2024-11-08 10:30:54 +08:00
{
2024-11-11 09:55:31 +08:00
private readonly ILogger<CommandController> _logger;
2024-11-13 17:50:52 +08:00
private readonly ICommandService _commandService;
2024-11-08 10:30:54 +08:00
2024-11-13 17:50:52 +08:00
public CommandController(ILogger<CommandController> logger, ICommandService commandService)
2024-11-08 10:30:54 +08:00
{
_logger = logger;
2024-11-13 17:50:52 +08:00
_commandService = commandService;
2024-11-08 10:30:54 +08:00
}
2024-11-08 17:21:49 +08:00
public async Task<bool> AmmeterParameterSendAsync()
{
2024-11-13 17:50:52 +08:00
return await _commandService.AmmeterParameterSendAsync();
2024-11-08 14:53:36 +08:00
}
public bool AmmeterParameterReading()
{
2024-11-13 17:50:52 +08:00
return _commandService.AmmeterParameterReading();
2024-11-08 14:53:36 +08:00
}
public bool ActivePowerIndicationReading()
{
2024-11-13 17:50:52 +08:00
return _commandService.ActivePowerIndicationReading();
2024-11-08 14:53:36 +08:00
}
2024-11-08 10:30:54 +08:00
}
}