49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
using Dlhis.Basic.Summary.Response;
|
|
using Dlhis.Basic.Summary.Services;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Dlhis.Basic.Summary.Controllers;
|
|
|
|
[Authorize]
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class SummariesController : ControllerBase
|
|
{
|
|
private readonly ISummaryService _summaryService;
|
|
|
|
public SummariesController(ISummaryService summaryService)
|
|
{
|
|
_summaryService = summaryService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 考勤首页
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("attendance-summary")]
|
|
public async Task<AttendanceSummaryResponse> GetKaoQingSummary()
|
|
{
|
|
return await _summaryService.GetAttendanceSummaryAsync();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 门禁首页设备数据
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("door-summary")]
|
|
public async Task<DoorHomeDataResponse> GetDoorHomeDataAsync()
|
|
{
|
|
return await _summaryService.GetDoorHomeDataAsync();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 门禁首页数据
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("door-data")]
|
|
public async Task<DoorDataResponse> GetDoorDataAsync()
|
|
{
|
|
return await _summaryService.GetDoorDataAsync();
|
|
}
|
|
} |