72 lines
2.1 KiB
C#
72 lines
2.1 KiB
C#
/*
|
||
*接口编写处...
|
||
*如果接口需要做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 { });
|
||
}
|
||
}
|
||
}
|