lixiaojun
2024-12-12 fe59cb0e4d060664927dca75d453162deae3e17d
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
namespace HStation.Application
{
    /// <summary>
    /// AssetsCoolingFactor
    /// </summary>
    [Route("Assets/Cooling/Factor/Std")]
    [ApiDescriptionSettings("Assets", Name = "冷却塔系数(Std)", Order = 7900)]
    public class AssetsCoolingFactor_StdController : IDynamicApiController
    {
 
        /// <summary>
        /// 获取所有
        /// </summary>
        [Route("GetAll@V1.0")]
        [HttpGet]
        public List<AssetsCoolingFactorStdDto> GetAll()
        {
            var keyContent = $"Assets_Cooling_Factor_Std_GetAll";
            var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent);
 
            var vm_list = MemoryCacheHelper.GetSet(cacheKey, () =>
            {
                var allList = new HStation.Service.AssetsCoolingFactor().GetAll();
                HStation.Service.AssetsCoolingFactor.PublishCache(cacheKey);
                var vmList = allList?.Select(x => new AssetsCoolingFactorStdDto(x)).ToList();
                return vmList;
            }, Yw.Service.ConfigHelper.CacheLevel3);
            return vm_list;
        }
 
 
 
 
 
    }
}