Asoka.Wang 2b3f9acdce 123
2025-09-22 19:09:47 +08:00

49 lines
1.6 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.

using System.Collections.Generic;
using System.Threading.Tasks;
using NPP.SmartSchedue.Api.Contracts.Core.Enums;
using ZhonTai.Admin.Core.Repositories;
namespace NPP.SmartSchedue.Api.Contracts.Domain.Notification;
/// <summary>
/// 人员组仓储接口
/// </summary>
public interface IPersonnelGroupRepository : IRepositoryBase<PersonnelGroupEntity>
{
/// <summary>
/// 根据启用状态获取人员组列表
/// </summary>
Task<List<PersonnelGroupEntity>> GetByEnabledAsync(bool enabled);
/// <summary>
/// 根据人员组类型获取人员组列表
/// </summary>
Task<List<PersonnelGroupEntity>> GetByGroupTypeAsync(PersonnelGroupTypeEnum groupType);
/// <summary>
/// 检查人员组名称是否存在
/// </summary>
Task<bool> ExistsGroupNameAsync(string groupName, long? excludeId = null);
/// <summary>
/// 获取包含指定人员的人员组列表
/// </summary>
Task<List<PersonnelGroupEntity>> GetGroupsContainingPersonnelAsync(long personnelId);
/// <summary>
/// 获取包含指定部门的人员组列表
/// </summary>
Task<List<PersonnelGroupEntity>> GetGroupsContainingDepartmentAsync(long departmentId);
/// <summary>
/// 获取包含指定职位的人员组列表
/// </summary>
Task<List<PersonnelGroupEntity>> GetGroupsContainingPositionAsync(string position);
/// <summary>
/// 计算人员组的实际人员数量
/// 这个方法返回一个估算值实际计算需要在Service层进行
/// 因为需要查询人员表和考虑动态规则
/// </summary>
Task<int> CalculatePersonnelCountAsync(long personnelGroupId);
}