xiazhengtongxue
3 天以前 0f710285d9f02e3d4cea19557e17945e9ef9532b
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
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
 
namespace WIDESEAWCS_Server.Controllers.Task
{
    [Route("api/RobotTask")]
    [ApiController]
    public class RobotTaskController : ApiBaseController<IRobotTaskService, Dt_RobotTask>
    {
        public RobotTaskController(IRobotTaskService service) : base(service)
        {
        }
 
        [HttpGet, HttpPost, Route("DeleteRobotTask"), AllowAnonymous]
        public WebResponseContent DeleteRobotTask(int id)
        {
            if (Service.DeleteRobotTask(id))
            {
                return WebResponseContent.Instance.OK();
            }
            return WebResponseContent.Instance.Error();
        }
 
        [HttpGet, HttpPost, Route("GetRobotTaskTotalNum"), AllowAnonymous]
        public int GetRobotTaskTotalNum(int taskType, string? palletCode)
        {
            return Service.GetRobotTaskTotalNum(taskType, palletCode);
        }
 
        // 手动机械手任务
        [HttpGet, HttpPost, Route("CreateRobotTaskManually"), AllowAnonymous]
        public WebResponseContent CreateRobotTaskManually([FromBody] ManualRobotTaskDto request)
        {
            return Service.CreateRobotTaskManually(request);
        }
    }
}