using HStation.CAL;
|
using HStation.DAL;
|
using HStation.Dto;
|
using System.Collections.Generic;
|
using Yw.CAL;
|
using Yw.DAL.Basic;
|
using Yw.Dto;
|
|
namespace HStation.BLL
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public class EmployeeMain : CAL.IEmployeeMain
|
{
|
private readonly HStation.CAL.IEmployeeMain _cal = CALCreateHelper.CreateCAL<HStation.CAL.IEmployeeMain>();
|
|
#region Query
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<List<EmployeeMainDto>> GetAll()
|
{
|
return await _cal.GetAll();
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<EmployeeMainDto> GetByID(long ID)
|
{
|
return await _cal.GetByID(ID);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<List<EmployeeMainDto>> GetByIds(List<long> Ids)
|
{
|
return await _cal.GetByIds(Ids);
|
}
|
|
#endregion Query
|
|
#region Insert
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<long> Insert(AddEmployeeMainDto model)
|
{
|
return await _cal.Insert(model);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> Inserts(List<AddEmployeeMainDto> list)
|
{
|
return await _cal.Inserts(list);
|
}
|
|
/// <summary>
|
/// 插入员工拓展(包含登录用户)
|
/// </summary>
|
public async Task<long> InsertLoginUserEx(AddEmployeeMainDto employeeMainDto, AddUserLoginMapDto loginmapdto, AddLoginUserMainDto loginuserdto)
|
{
|
return await _cal.InsertLoginUserEx(employeeMainDto, loginmapdto, loginuserdto);
|
}
|
|
/// <summary>
|
/// 插入员工拓展(不包含登录用户)
|
/// </summary>
|
public async Task<long> InsertEx(AddEmployeeMainDto employeeMainDto, AddUserLoginMapDto loginmapdto)
|
{
|
return await _cal.InsertEx(employeeMainDto, loginmapdto);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> BulkInserts(List<AddEmployeeMainDto> list)
|
{
|
return await _cal.BulkInserts(list);
|
}
|
|
#endregion Insert
|
|
#region Update
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> Update(UpdateEmployeeMainDto model)
|
{
|
return await _cal.Update(model);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> Updates(List<UpdateEmployeeMainDto> list)
|
{
|
return await _cal.Updates(list);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> BulkUpdates(List<UpdateEmployeeMainDto> list)
|
{
|
return await _cal.BulkUpdates(list);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> UpdateSortCode(long ID, int SortCode)
|
{
|
return await _cal.UpdateSortCode(ID, SortCode);
|
}
|
|
public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters)
|
{
|
return await _cal.UpdateSorter(Sorters);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras)
|
{
|
return _cal.UpdateParas(ID, Paras);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public Task<bool> UpdateFlags(long ID, List<string> Flags)
|
{
|
return _cal.UpdateFlags(ID, Flags);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public Task<bool> UpdateTagName(long ID, string TagName)
|
{
|
return _cal.UpdateTagName(ID, TagName);
|
}
|
|
#endregion Update
|
|
#region Delete
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> DeleteByID(long ID)
|
{
|
return await _cal.DeleteByID(ID);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> DeleteByIds(List<long> Ids)
|
{
|
return await _cal.DeleteByIds(Ids);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
public async Task<bool> DeleteAll()
|
{
|
return await _cal.DeleteAll();
|
}
|
|
#endregion Delete
|
}
|
}
|