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);
|
}
|
}
|
}
|