AdoS8ConfigMonitorDictionaryController.cs 823 B

123456789101112131415161718192021222324
  1. using Admin.NET.Plugin.AiDOP.Dto.S8;
  2. using Admin.NET.Plugin.AiDOP.Service.S8;
  3. namespace Admin.NET.Plugin.AiDOP.Controllers.S8;
  4. [ApiController]
  5. [Route("api/aidop/s8/config/monitor-options")]
  6. [NonUnify]
  7. public class AdoS8ConfigMonitorDictionaryController : ControllerBase
  8. {
  9. private readonly S8MonitorDictionaryService _svc;
  10. public AdoS8ConfigMonitorDictionaryController(S8MonitorDictionaryService svc) => _svc = svc;
  11. /// <summary>
  12. /// 监控对象/指标只读字典。返回结构与前端 BUSINESS_MONITOR_OPTIONS 同形。
  13. /// CONFIG-MONITOR-DICT-READONLY-SEED-1。
  14. /// </summary>
  15. [HttpGet]
  16. public async Task<IActionResult> GetOptionsAsync(
  17. [FromQuery] long tenantId = 1,
  18. [FromQuery] long factoryId = 1)
  19. => Ok(await _svc.GetOptionsAsync(tenantId, factoryId));
  20. }