61 lines
2.0 KiB
C#
61 lines
2.0 KiB
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using System.Collections.Generic;
|
|
using ZhonTai.Admin.Core.Dto;
|
|
using NPP.SmartSchedue.Api.Contracts.Services.Time.Input;
|
|
using NPP.SmartSchedue.Api.Contracts.Services.Time.Output;
|
|
|
|
namespace NPP.SmartSchedue.Api.Contracts.Services.Time;
|
|
|
|
/// <summary>
|
|
/// 员工休假服务接口
|
|
/// </summary>
|
|
public interface IEmployeeLeaveService
|
|
{
|
|
Task<EmployeeLeaveGetOutput> GetAsync(long id);
|
|
|
|
Task<PageOutput<EmployeeLeaveGetPageOutput>> GetPageAsync(PageInput<EmployeeLeaveGetPageInput> input);
|
|
|
|
Task<long> AddAsync(EmployeeLeaveAddInput input);
|
|
|
|
Task UpdateAsync(EmployeeLeaveUpdateInput input);
|
|
|
|
Task DeleteAsync(long id);
|
|
|
|
Task SoftDeleteAsync(long id);
|
|
|
|
Task BatchSoftDeleteAsync(long[] ids);
|
|
|
|
/// <summary>
|
|
/// 获取员工在指定时间段内的已批准请假记录
|
|
/// </summary>
|
|
/// <param name="employeeId">员工ID</param>
|
|
/// <param name="startTime">开始时间</param>
|
|
/// <param name="endTime">结束时间</param>
|
|
/// <returns></returns>
|
|
Task<List<EmployeeLeaveGetPageOutput>> GetApprovedLeavesByEmployeeAndTimeRangeAsync(
|
|
long employeeId,
|
|
DateTime startTime,
|
|
DateTime endTime);
|
|
|
|
/// <summary>
|
|
/// 检查员工在指定时间段内是否有请假
|
|
/// </summary>
|
|
/// <param name="employeeId">员工ID</param>
|
|
/// <param name="startTime">开始时间</param>
|
|
/// <param name="endTime">结束时间</param>
|
|
/// <returns></returns>
|
|
Task<bool> HasApprovedLeaveInTimeRangeAsync(
|
|
long employeeId,
|
|
DateTime startTime,
|
|
DateTime endTime);
|
|
|
|
/// <summary>
|
|
/// 检查员工在指定日期是否在请假
|
|
/// 智能分配系统专用方法,返回详细的请假信息
|
|
/// </summary>
|
|
/// <param name="employeeId">员工ID</param>
|
|
/// <param name="checkDate">检查日期</param>
|
|
/// <returns>请假状态信息</returns>
|
|
Task<EmployeeLeaveStatusResult> IsOnLeaveAsync(long employeeId, DateTime checkDate);
|
|
} |