| | |
| | | using HStation.Dto.TransferFile; |
| | | using Yw.BLL; |
| | | |
| | | namespace HStation.BLL |
| | | { |
| | |
| | | { |
| | | private readonly HStation.CAL.ITransferRevitFile _cal = CALCreateHelper.CreateCAL<HStation.CAL.ITransferRevitFile>(); |
| | | |
| | | #region Query |
| | | |
| | | /// <summary> |
| | | /// 获取所有 |
| | | /// </summary> |
| | | public async Task<List<Vmo.TransferRevitFileVmo>> GetAll() |
| | | public async Task<List<TransferRevitFileVmo>> GetAll() |
| | | { |
| | | var dtoList = await _cal.GetAll(); |
| | | return Dto2Vmos(dtoList); |
| | |
| | | /// <summary> |
| | | /// 通过 ID 获取 |
| | | /// </summary> |
| | | public async Task<Vmo.TransferRevitFileVmo> GetByID(long ID) |
| | | public async Task<TransferRevitFileVmo> GetByID(long ID) |
| | | { |
| | | var dto = await _cal.GetByID(ID); |
| | | return Dto2Vmo(dto); |
| | |
| | | /// <summary> |
| | | /// 通过 Ids 获取 |
| | | /// </summary> |
| | | public async Task<List<Vmo.TransferRevitFileVmo>> GetByIds(List<long> ids) |
| | | public async Task<List<TransferRevitFileVmo>> GetByIds(List<long> ids) |
| | | { |
| | | var dtoList = await _cal.GetByIds(ids); |
| | | return Dto2Vmos(dtoList); |
| | |
| | | /// <summary> |
| | | /// 获取模糊列表 |
| | | /// </summary> |
| | | public async Task<List<Vmo.TransferRevitFileVmo>> GetFluzzyList(QueryTransferRevitFileFluzzyListInput input) |
| | | public async Task<List<TransferRevitFileVmo>> GetFluzzyList |
| | | ( |
| | | string FileName, |
| | | string FileCode, |
| | | string FileSuffix, |
| | | string UploadUserName, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime |
| | | ) |
| | | { |
| | | var dtoList = await _cal.GetFluzzyList(input); |
| | | var dtoList = await _cal.GetFluzzyList(FileName, FileCode, FileSuffix, UploadUserName, StartTime, EndTime); |
| | | return Dto2Vmos(dtoList); |
| | | } |
| | | |
| | | /* /// <summary> |
| | | /// 获取模糊分页列表 |
| | | /// </summary> |
| | | public async Task<PageListOutput<Vmo.TransferRevitFileVmo>> GetFluzzyPageList(QueryTransferRevitFileFluzzyPageListInput input) |
| | | { |
| | | var dtoList = await _cal.GetFluzzyPageList(input); |
| | | return Dto2Vmos(dtoList); |
| | | }*/ |
| | | |
| | | #region Insert |
| | | |
| | | /// <summary> |
| | | /// 插入一条 (同时上传文件) |
| | | /// 获取模糊分页列表 |
| | | /// </summary> |
| | | public async Task<long> Insert(Vmo.TransferRevitFileVmo input) |
| | | public async Task<Yw.Vmo.PageListVmo<TransferRevitFileVmo>> GetFluzzyPageList |
| | | ( |
| | | string FileName, |
| | | string FileCode, |
| | | string FileSuffix, |
| | | string UpoadUserName, |
| | | DateTime? StartTime, |
| | | DateTime? EndTime, |
| | | int PageIndex, |
| | | int PageSize |
| | | ) |
| | | { |
| | | var dto = Vmo2AddDto(input); |
| | | var id = await _cal.Insert(dto); |
| | | return id; |
| | | 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<TransferRevitFileVmo>() { Total = dto.Total, List = Dto2Vmos(dto.List) }; |
| | | } |
| | | |
| | | #endregion Insert |
| | | #endregion |
| | | |
| | | |
| | | #region Exist |
| | | |
| | | /// <summary> |
| | | /// 判断 FileCode 是否存在 |
| | | /// </summary> |
| | | public async Task<bool> IsExistFileCode(string input) |
| | | public async Task<bool> IsExistFileCode(string FileCode) |
| | | { |
| | | return await _cal.IsExistFileCode(input); |
| | | return await _cal.IsExistFileCode(FileCode); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 判断 FileCode 是否存在 ExceptID |
| | | /// </summary> |
| | | public async Task<bool> IsExistFileCodeExceptID(FileCodeExceptIDInput input) |
| | | public async Task<bool> IsExistFileCodeExceptID(string FileCode, long ExceptID) |
| | | { |
| | | var input = new FileCodeExceptIDInput() { FileCode = FileCode, ExceptID = ExceptID }; |
| | | return await _cal.IsExistFileCodeExceptID(input); |
| | | } |
| | | |
| | | #endregion Exist |
| | | #endregion |
| | | |
| | | #region 删除 |
| | | |
| | | /// <summary> |
| | | /// 通过 ID 删除 |
| | | /// </summary> |
| | | public async Task<bool> DeleteByID(long input) |
| | | public async Task<bool> DeleteByID(long ID) |
| | | { |
| | | return await _cal.DeleteByID(input); |
| | | return await _cal.DeleteByID(ID); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |