| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_DTO.TaskInfo; |
| | | using WIDESEAWCS_DTO.BasicInfo; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | |
| | | public class TaskController : ApiBaseController<ITaskService, Dt_Task> |
| | | { |
| | | private readonly IHttpContextAccessor _httpContextAccessor; |
| | | public TaskController(ITaskService service, IHttpContextAccessor httpContextAccessor) : base(service) |
| | | private readonly IOrderDetailsService _orderDetailsService; |
| | | public TaskController(ITaskService service, IHttpContextAccessor httpContextAccessor,IOrderDetailsService orderDetailsService) : base(service) |
| | | { |
| | | _httpContextAccessor = httpContextAccessor; |
| | | _orderDetailsService = orderDetailsService; |
| | | } |
| | | |
| | | |
| | | [HttpPost, HttpGet, Route("CreateTask"), AllowAnonymous] |
| | | public WebResponseContent CreateTask(string takePosition, string putPosition, string deviceCode, int length, int width, int height) |
| | | { |
| | | return Service.CreateTask(takePosition, putPosition, deviceCode, length, width, height); |
| | | } |
| | | |
| | | [HttpPost, HttpGet, Route("PlaceBlockTest"), AllowAnonymous] |
| | | public WebResponseContent PlaceBlockTest(int orderRowId) |
| | | { |
| | | return Service.PlaceBlockTest(orderRowId); |
| | | } |
| | | |
| | | [HttpPost, HttpGet, Route("GenerateTask"), AllowAnonymous] |
| | | public Dt_Task GenerateTask(string barcode) |
| | | { |
| | | OrderInfo orderInfo = _orderDetailsService.GetOrderInfoByBarcode(barcode); |
| | | return Service.GenerateTask(orderInfo); |
| | | } |
| | | } |
| | | } |