namespace HStation.Application
|
{
|
/// <summary>
|
/// AssetsHydrantFactor
|
/// </summary>
|
[Route("Assets/Hydrant/Factor/Std")]
|
[ApiDescriptionSettings("Assets", Name = "消火栓系数(Std)", Order = 17900)]
|
public class AssetsHydrantFactor_StdController : IDynamicApiController
|
{
|
/// <summary>
|
/// 获取所有
|
/// </summary>
|
[Route("GetAll@V1.0")]
|
[HttpGet]
|
public List<AssetsHydrantFactorStdDto> GetAll()
|
{
|
var keyContent = $"Assets_Hydrant_Factor_Std_GetAll";
|
var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent);
|
|
var vm_list = MemoryCacheHelper.GetSet(cacheKey, () =>
|
{
|
var allList = new HStation.Service.AssetsHydrantFactor().GetAll();
|
HStation.Service.AssetsHydrantFactor.PublishCache(cacheKey);
|
var vmList = allList?.Select(x => new AssetsHydrantFactorStdDto(x)).ToList();
|
return vmList;
|
}, Yw.Service.ConfigHelper.CacheLevel3);
|
return vm_list;
|
}
|
}
|
}
|