Laservall_manager_system/VOL.WebApi/Controllers/HR/Partial/HR_EmployeeSyncController.cs

72 lines
2.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
*接口编写处...
*如果接口需要做Action的权限验证请在Action上使用属性
*如: [ApiActionPermission("HR_EmployeeSync",Enums.ActionPermissionOptions.Search)]
*/
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using VOL.Core.Filters;
using VOL.Entity.DomainModels;
using VOL.HR.IServices;
namespace VOL.HR.Controllers
{
public partial class HR_EmployeeSyncController
{
private readonly IHR_EmployeeSyncService _service;//访问业务代码
private readonly IHttpContextAccessor _httpContextAccessor;
[ActivatorUtilitiesConstructor]
public HR_EmployeeSyncController(
IHR_EmployeeSyncService service,
IHttpContextAccessor httpContextAccessor
)
: base(service)
{
_service = service;
_httpContextAccessor = httpContextAccessor;
}
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
[HttpPost, Route("/api/HR_YSEmployees/getPageData")]
public async Task<IActionResult> GetYSAllEmployees()
{
var emps = await Service.GetAllYSEmployees();
return Json(emps);
}
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
[HttpPost, Route("/api/HR_DingTalkEmployees/getPageData")]
public async Task<IActionResult> GetAllDingTalkEmployees()
{
var emps = await Service.GetAllDingTalkEmployees();
return Json(emps);
}
/// <summary>
///
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
[HttpPost, Route("GenEmpSystemShip")]
public async Task<IActionResult> GenEmpSystemShip()
{
await Service.GenEmpSystemShip();
return Json(new { });
}
}
}