tangxu
2024-10-08 54d6c9937e34066e357c3212477914ecef1370b6
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using IStation.Common;
using IStation.Dto;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Permissions;
using System.Text;
using System.Web;
using System.Web.Http;
 
namespace IStation.WebApi.Controllers
{
    /// <summary>
    /// 前池水位落差
    /// </summary>
    [RoutePrefix("RiverWaterLevelDrop")]
    public class RiverWaterLevelDropController : ApiController
    {
        /// <summary>
        /// 获取
        /// </summary>
        /// <returns></returns>
        [Route("GetList")]
        [HttpGet]
        public IStation.Dto.ApiResult GetList()
        {
            try
            {
                var list = AnaGlobalParas.RiverWaterLevelDropList;
 
                return new IStation.Dto.ApiResult<List<Model.RiverWaterLevelDrop>>(list);
            }
            catch (Exception ex)
            {
                IStation.LogHelper.Error("RiverWaterLevelDrop GetList,ex:" + ex.Message);
                return new IStation.Dto.ApiResult<List<Model.RiverWaterLevelDrop>>(null);
            }
        }
 
        /// <summary>
        /// 保存
        /// </summary>
        /// <returns></returns>
        [Route("SaveList")]
        [HttpPost]
        public IStation.Dto.ApiResult GetList([FromBody] List<Model.RiverWaterLevelDrop> list)
        {
            IStation.Common.RiverWaterLevelDropHelper.SaveList(list);
 
            return new IStation.Dto.ApiResult<bool>(true);
        }
    }
}