49 lines
1.6 KiB
C#
49 lines
1.6 KiB
C#
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);
|
||
} |