lixiaojun
2024-10-25 a27817f01817b22fff839a2d0b98cbb6e45a22f7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
using HStation.Dto.TransferFile;
 
namespace HStation.BLL
{
    /// <summary>
    ///
    /// </summary>
    public partial class TransferRevitFile
    {
        private readonly HStation.CAL.ITransferRevitFile _cal = CALCreateHelper.CreateCAL<HStation.CAL.ITransferRevitFile>();
 
        #region Query
 
        /// <summary>
        /// 获取所有
        /// </summary>
        public async Task<List<TransferRevitFileVmo>> GetAll()
        {
            var dtoList = await _cal.GetAll();
            return Dto2Vmos(dtoList);
        }
 
        /// <summary>
        /// 通过 ID 获取
        /// </summary>
        public async Task<TransferRevitFileVmo> GetByID(long ID)
        {
            var dto = await _cal.GetByID(ID);
            return Dto2Vmo(dto);
        }
 
        /// <summary>
        /// 通过 Ids 获取
        /// </summary>
        public async Task<List<TransferRevitFileVmo>> GetByIds(List<long> ids)
        {
            var dtoList = await _cal.GetByIds(ids);
            return Dto2Vmos(dtoList);
        }
 
        /// <summary>
        /// 获取模糊列表
        /// </summary>
        public async Task<List<TransferRevitFileVmo>> 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);
        }
 
        /// <summary>
        /// 获取模糊分页列表
        /// </summary>
        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 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
 
 
        #region Exist
 
        /// <summary>
        /// 判断 FileCode 是否存在
        /// </summary>
        public async Task<bool> IsExistFileCode(string FileCode)
        {
            return await _cal.IsExistFileCode(FileCode);
        }
 
        /// <summary>
        ///  判断 FileCode 是否存在 ExceptID
        /// </summary>
        public async Task<bool> IsExistFileCodeExceptID(string FileCode, long ExceptID)
        {
            var input = new FileCodeExceptIDInput() { FileCode = FileCode, ExceptID = ExceptID };
            return await _cal.IsExistFileCodeExceptID(input);
        }
 
        #endregion
 
        #region 删除
 
        /// <summary>
        /// 通过 ID 删除
        /// </summary>
        public async Task<bool> DeleteByID(long ID)
        {
            return await _cal.DeleteByID(ID);
        }
 
        #endregion
    }
}