| | |
| | | /// </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(); |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | { |
| | | 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; |
| | | } |
| | | |