fix 增加手动获取人员,逻辑复用

This commit is contained in:
2024-04-02 11:29:16 +08:00
parent bd1db198b2
commit ae8fdf8fdc
6 changed files with 550 additions and 423 deletions

View File

@@ -0,0 +1,29 @@
using Dlhis.ScheduledTask.SyncSapInfo.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.ScheduledTask.TaskAssignment.Controllers;
[Authorize(Roles = "admin")]
[Route("api/[controller]")]
[ApiController]
public class GainfoTasksController : ControllerBase
{
private readonly IGainfoUpdateService _gainfoUpdateService;
public GainfoTasksController(IGainfoUpdateService gainfoUpdateService)
{
_gainfoUpdateService = gainfoUpdateService;
}
/// <summary>
/// 手动获取人员
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
[HttpGet("ManuallySync")]
public async Task ManuallySync(string code)
{
await _gainfoUpdateService.TodoAsync(code);
}
}