You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

112 lines
3.0 KiB

using ce.autofac.extension;
using learun.util;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace learun.iapplication
{
/// <summary>
/// 版 本 EasyCode EC管理后台
/// Copyright (c) 2019-present EC管理有限公司
/// 创建人:tobin
/// 日 期:2019.09.24
/// 描 述:岗位管理
/// </summary>
public interface PostIBLL : IBLL
{
#region 获取数据
/// <summary>
/// 获取岗位数据列表(根据公司列表)
/// </summary>
/// <param name="companyId">公司主键</param>
/// <returns></returns>
Task<IEnumerable<PostEntity>> GetList(string companyId);
/// <summary>
/// 获取岗位数据列表(根据公司列表)
/// </summary>
/// <param name="companyId">公司主键</param>
/// <param name="departmentId">部门Id</param>
/// <param name="keyword">关键词</param>
/// <returns></returns>
Task<IEnumerable<PostEntity>> GetList(string companyId, string departmentId, string keyword);
/// <summary>
/// 获取岗位数据列表(根据主键串)
/// </summary>
/// <param name="postIds">根据主键串</param>
/// <returns></returns>
Task<IEnumerable<PostEntity>> GetListByPostIds(string postIds);
/// <summary>
/// 获取树形结构数据
/// </summary>
/// <param name="companyId">公司主键</param>
/// <returns></returns>
Task<IEnumerable<TreeModel>> GetTree(string companyId);
/// <summary>
/// 获取岗位实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Task<PostEntity> GetEntity(string keyValue);
#endregion 获取数据
#region 提交数据
/// <summary>
/// 删除
/// </summary>
/// <param name="keyValue">主键</param>
Task Delete(string keyValue);
/// <summary>
/// 保存岗位(新增、修改)
/// </summary>
/// <param name="keyValue">主键值</param>
/// <param name="postEntity">岗位实体</param>
/// <returns></returns>
Task SaveEntity(string keyValue, PostEntity postEntity);
#endregion 提交数据
#region 扩展方法
/// <summary>
/// 判断是否是上级
/// </summary>
/// <param name="myId">自己的岗位</param>
/// <param name="otherId">对方的岗位</param>
/// <returns></returns>
Task<bool> IsUp(string myId, string otherId);
/// <summary>
/// 判断是否是下级
/// </summary>
/// <param name="myId">自己的岗位</param>
/// <param name="otherId">对方的岗位</param>
/// <returns></returns>
Task<bool> IsDown(string myId, string otherId);
/// <summary>
/// 获取上级岗位人员ID
/// </summary>
/// <param name="strPostIds">岗位id</param>
/// <param name="level">级数</param>
/// <returns></returns>
Task<IEnumerable<string>> GetUpIdList(string strPostIds, int level);
/// <summary>
/// 获取下级岗位人员ID
/// </summary>
/// <param name="strPostIds">岗位id</param>
/// <param name="level">级数</param>
/// <returns></returns>
Task<IEnumerable<string>> GetDownIdList(string strPostIds, int level);
#endregion 扩展方法
}
}