tangxu
2024-01-27 29a6de30e328c46cbbcae15066f449b0660c2db1
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
namespace Yw.Application
{
    /// <summary>
    /// PumpCurve
    /// </summary>
    [Route("Curve/PumpChart")]
    [ApiDescriptionSettings("Chart", Name = "±ÃÇúÏß", Order = 10000)]
    public class PumpChart_Controller : IDynamicApiController
    {
 
        private readonly Service.PumpCurve _service = new();
 
        #region Query
 
 
 
        /// <summary>
        /// Í¨¹ý ID »ñÈ¡
        /// </summary>
        [Route("GetByID@V1.0")]
        [HttpGet]
        public PumpChartDto GetByID([FromQuery][Required] IDInput input)
        {
            var model = _service.GetByID(input.ID);
            return model == null ? null : new PumpChartDto(model);
        }
 
       
 
        #endregion
 
   
 
        #region Update
 
 
 
        /// <summary>
        /// ¸üÐÂ×ø±êÐÅÏ¢
        /// </summary>
        [Route("UpdateCoordParas@V1.0")]
        [HttpPut]
        public bool UpdateCoordParas(UpdatePumpCoordParasInput input)
        {
            var bol = _service.UpdateCoordParas(input.ID, input.CoordParas, UserManager.UserID, DateTime.Now);
            return bol;
        }
 
       
 
        #endregion
 
        #region Delete
 
        /// <summary>
        /// É¾³ýÇúÏß
        /// </summary>
        [Route("DeleteByID@V1.0")]
        [HttpDelete]
        public bool DeleteByID([FromQuery][Required] IDInput input)
        {
            var bol = _service.DeleteByID(input.ID, out string Msg);
            if (!bol)
            {
                throw YOops.Oh(eResultCode.Alert, ErrorCodes.D999, Msg);
            }
            return bol;
        }
 
        #endregion
 
 
 
 
 
    }
}