31 lines
839 B
C#
31 lines
839 B
C#
using Dlhis.ScheduledTask.Common.Dto;
|
|
using Dlhis.ScheduledTask.Common.Services;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Dlhis.ScheduledTask.TaskAssignment.Controllers;
|
|
|
|
[Authorize(Roles = "admin")]
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class HangfireController : ControllerBase
|
|
{
|
|
private readonly IHangfireService _hangfireService;
|
|
|
|
public HangfireController(IHangfireService hangfireService)
|
|
{
|
|
_hangfireService = hangfireService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 手动获取人员
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("sap/person/no")]
|
|
public async Task ManuallySync(SapPersonNoRequest request)
|
|
{
|
|
await _hangfireService.CreateSapPersonSyncBackgroundJobAsync(request);
|
|
}
|
|
}
|