lixiaojun
2023-11-08 a2c679848af6cf46a98a6e2d0fc2b29d0081f71c
Yw.Application.Curve.Core/3-pump-curve-extension/1-mgr/PumpCurveExMapping_Controller.cs
@@ -5,7 +5,7 @@
    /// </summary>
    [Route("Curve/Pump/Mapping/Extension")]
    [ApiDescriptionSettings("Curve", Name = "泵曲线映射拓展", Order = 8000)]
    public partial class PumpCurveExMapping_Controller : IDynamicApiController
    public partial class PumpCurveExMapping_Controller : IDynamicApiController
    {
        private readonly Service.PumpCurveExMapping _service = new();
@@ -19,7 +19,20 @@
        public List<PumpCurveExMappingDto> GetByPumpID([FromQuery][Required] PumpIDInput input)
        {
            var list = _service.GetByPumpID(input.PumpID);
            var vmList = list.Select(x => new PumpCurveExMappingDto(x.Item1, x.Item2)).ToList();
            var vmList = list?.Select(x => new PumpCurveExMappingDto(x.Item1, x.Item2)).ToList();
            return vmList;
        }
        /// <summary>
        /// 通过 PumpIds 获取
        /// </summary>
        [Route("GetByPumpIds@V1.0")]
        [HttpGet]
        public List<PumpCurveExMappingDto> GetByPumpIds([FromQuery][Required] PumpIdsInput input)
        {
            var ids = LongListHelper.ToList(input.PumpIds);
            var list = _service.GetByPumpIds(ids);
            var vmList = list?.Select(x => new PumpCurveExMappingDto(x.Item1, x.Item2)).ToList();
            return vmList;
        }
@@ -43,7 +56,7 @@
        {
            var ids = LongListHelper.ToList(input.Ids);
            var list = _service.GetByIds(ids);
            var vmList = list.Select(x => new PumpCurveExMappingDto(x.Item1, x.Item2)).ToList();
            var vmList = list?.Select(x => new PumpCurveExMappingDto(x.Item1, x.Item2)).ToList();
            return vmList;
        }