using HStation.Dto.TransferFile;
namespace HStation.BLL
{
///
///
///
public partial class TransferRevitFile
{
private readonly HStation.CAL.ITransferRevitFile _cal = CALCreateHelper.CreateCAL();
#region Query
///
/// 获取所有
///
public async Task> GetAll()
{
var dtoList = await _cal.GetAll();
return Dto2Vmos(dtoList);
}
///
/// 通过 ID 获取
///
public async Task GetByID(long ID)
{
var dto = await _cal.GetByID(ID);
return Dto2Vmo(dto);
}
///
/// 通过 Ids 获取
///
public async Task> GetByIds(List ids)
{
var dtoList = await _cal.GetByIds(ids);
return Dto2Vmos(dtoList);
}
///
/// 获取模糊列表
///
public async Task> GetFluzzyList
(
string FileName,
string FileCode,
string FileSuffix,
string UploadUserName,
DateTime? StartTime,
DateTime? EndTime
)
{
var dtoList = await _cal.GetFluzzyList(FileName, FileCode, FileSuffix, UploadUserName, StartTime, EndTime);
return Dto2Vmos(dtoList);
}
///
/// 获取模糊分页列表
///
public async Task> GetFluzzyPageList
(
string FileName,
string FileCode,
string FileSuffix,
string UpoadUserName,
DateTime? StartTime,
DateTime? EndTime,
int PageIndex,
int PageSize
)
{
var input = new QueryTransferRevitFileFluzzyPageListInput()
{
FileName = FileName,
FileCode = FileCode,
FileSuffix = FileSuffix,
UploadUserName = UpoadUserName,
StartTime = StartTime,
EndTime = EndTime,
PageIndex = PageIndex,
PageSize = PageSize,
};
var dto = await _cal.GetFluzzyPageList(input);
return new Yw.Vmo.PageListVmo() { Total = dto.Total, List = Dto2Vmos(dto.List) };
}
#endregion
#region Exist
///
/// 判断 FileCode 是否存在
///
public async Task IsExistFileCode(string FileCode)
{
return await _cal.IsExistFileCode(FileCode);
}
///
/// 判断 FileCode 是否存在 ExceptID
///
public async Task IsExistFileCodeExceptID(string FileCode, long ExceptID)
{
var input = new FileCodeExceptIDInput() { FileCode = FileCode, ExceptID = ExceptID };
return await _cal.IsExistFileCodeExceptID(input);
}
#endregion
#region 删除
///
/// 通过 ID 删除
///
public async Task DeleteByID(long ID)
{
return await _cal.DeleteByID(ID);
}
#endregion
}
}