yanjinhui
2025-06-12 95ac5296182b763d12125c1d47f53c00632ffc41
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
78
79
80
81
82
83
84
85
86
87
88
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_DTO.Telescopic;
using WIDESEAWCS_ITelescopicService;
using WIDESEAWCS_IWMSPart;
using WIDESEAWCS_Model.Models;
 
namespace WIDESEAWCS_Server.Controllers.Telescopic
{
    [Route("api/[controller]")]
    [ApiController]
    public class ParametersController : ApiBaseController<IParametersService, Dt_Parameters>
    {
        public ParametersController(IParametersService service) : base(service)
        {
 
        }
        /// <summary>
        /// 手动控制,伸缩杆的缩回和伸出速度
        /// </summary>
        /// <param name="position">伸缩杆的位置(左右)</param>
        /// <param name="ExtendedState">伸/缩状态</param>
        /// <returns></returns>
        /// 
        [HttpPost, Route("ManualOperation")]
        public  WebResponseContent ManualOperation(string position, string ExtendedState)
        {
            return Service.ManualOperation(position, ExtendedState);
        }
 
        /// <summary>
        /// 自动控制伸缩杆的伸出和缩回速度
        /// </summary>
        /// <param name="ExtendedState">伸/出状态</param>
        /// <returns></returns>
 
        [HttpPost,Route("automation")]
        public WebResponseContent automation(string ExtendedState)
        {
            return Service.automation(ExtendedState);
        }
 
        /// <summary>
        /// 根据账号添加伸缩杆速度
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [HttpPost, Route("AddSpeed"), AllowAnonymous]
        public WebResponseContent AddSpeed([FromBody]SpeedDTO entity)
        {
            return Service.AddSpeed(entity);
        }
 
        /// <summary>
        /// 获取当前程序最新的伸缩杆速度回填给前端
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("BackfillSpeed")]
        public WebResponseContent BackfillSpeed()
        {
            return Service.BackfillSpeed();
        }
 
 
        /// <summary>
        ///当自动伸出需要暂停时,暂停按钮
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("PauseButton")]
        public WebResponseContent PauseButton()
        {
            return Service.PauseButton();
        }
 
        /// <summary>
        /// 获取当前伸缩杆的位置
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("CurrentLocation")]
        public WebResponseContent CurrentLocation()
        {
            return Service.CurrentLocation();
        }
    }
}