lixiaojun
2024-12-18 046e8574ce28d1b8858f8d3619df5a28a2f51e38
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
using Yw.CAL.HttpClient;
 
namespace HStation.CAL.HttpClient
{
    /// <summary>
    ///
    /// </summary>
    public class AssetsPumpMain : BaseCAL_Paras_Flags_TagName_Sorter<AddAssetsPumpMainInput, UpdateAssetsPumpMainInput, AssetsPumpMainDto>, IAssetsPumpMain
    {
        protected override string Prefix
        {
            get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/Assets/AssetsPumpMain"; }
        }
 
        /// <summary>
        /// 
        /// </summary>
        public async Task<int> GetCount()
        {
            return await GetUrl("GetCount@V1.0").Get<int>();
        }
 
        public async Task<bool> DeleteMapByMainID(long ID)
        {
            var paras = new List<(string Name, object Value)>()
            {
                (nameof(ID),ID)
            };
            return await GetUrl("DeleteMapByMainID@V1.0").Delete<bool>(paras);
        }
 
        public async Task<List<AssetsPumpMainDto>> GetByPumpSeriesID(long ID)
        {
            var paras = new List<(string Name, object Value)>()
            {
                (nameof(ID),ID)
            };
            return await GetUrl("GetByPumpSeriesID@V1.0").Get<List<AssetsPumpMainDto>>(paras);
        }
 
        public Task<List<AssetsPumpPartMainDto>> GetPartByID(long ID)
        {
            throw new NotImplementedException();
        }
 
        public async Task<long> InsertEx(AddAssetsPumpMainInput input, AddAssetsPumpGroupAndMainMapInput mainmap)
        {
            var paras = new List<(string Name, object Value)>()
            {
                (nameof(input),input),
                (nameof (mainmap),mainmap)
             };
            return await GetUrl("InsertEx@V1.0").Post<long>(paras);
        }
    }
}