| | |
| | | { |
| | | private readonly IHttpContextAccessor _httpContextAccessor; |
| | | private readonly IDt_TaskService _taskService; |
| | | private readonly ILocationInfoService _locationService; |
| | | |
| | | public TaskController(IDt_TaskService taskService, |
| | | IHttpContextAccessor httpContextAccessor, |
| | | ILocationInfoService locationService) : base(taskService) |
| | | public TaskController(IDt_TaskService service, |
| | | IHttpContextAccessor httpContextAccessor) : base(service) |
| | | { |
| | | _httpContextAccessor = httpContextAccessor; |
| | | _taskService = taskService; |
| | | _locationService = locationService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="saveModel">ä»»å¡å·</param> |
| | | /// <returns>æåæå¤±è´¥</returns> |
| | | [HttpGet, Route("CompleteTaskAsync"), AllowAnonymous] |
| | | //[TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5ç§èæµ |
| | | public async Task<WebResponseContent> CompleteTaskAsync(int taskNum) |
| | | { |
| | | return await _taskService.CompleteAsync(taskNum); |
| | | } |
| | | /// <summary> |
| | | /// 请æ±ä»»å¡å··é |
| | | /// </summary> |
| | | /// <param name="input">è¯·æ±æ°æ®</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5ç§èæµ |
| | | public async Task<WebResponseContent> RequestTaskAsync([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.RequestTaskAsync(input); |
| | | return await Service.CompleteAsync(taskNum); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 请æ±ä»»å¡è´§ä½ |
| | | /// ä»»å¡åæ¶ |
| | | /// </summary> |
| | | /// <param name="input">è¯·æ±æ°æ®</param> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestLocationTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5ç§èæµ |
| | | public async Task<WebResponseContent> UpdateExistingTask([FromBody] RequestTaskDto input) |
| | | [HttpPost, Route("TaskCancel"), AllowAnonymous] |
| | | public WebResponseContent TaskCancel(int taskNum) |
| | | { |
| | | return await Service.UpdateExistingTask(input); |
| | | return Service.TaskCancel(taskNum); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 空æçå
¥åºè¯·æ± |
| | | /// è·åä»»å¡ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("GetTaskInfo")] |
| | | public WebResponseContent GetTaskInfo() |
| | | { |
| | | return Service.GetTaskInfo(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 请æ±å
¥åºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="input">è¯·æ±æ°æ®</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestTrayInTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5ç§èæµ |
| | | public async Task<WebResponseContent> RequestTrayInTaskAsync([FromBody] RequestTaskDto input) |
| | | [HttpPost, AllowAnonymous, Route("RequestInboundTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] |
| | | public async Task<WebResponseContent> RequestInboundTaskAsync([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.RequestTrayInTaskAsync(input); |
| | | return await Service.RequestInboundTaskAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°è´§ä½ä»»å¡ç¶æå°ä¸ä¸ä¸ªèç¹ |
| | | /// </summary> |
| | | /// <param name="input">è¯·æ±æ°æ®</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestLocationAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] |
| | | public async Task<WebResponseContent> RequestLocationAsync([FromBody] RequestTaskDto input) |
| | | { |
| | | return await Service.RequestLocationAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="request">è¯·æ±æ°æ®</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("RequestTrayOutTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5ç§èæµ |
| | | public async Task<WebResponseContent> RequestTrayOutTaskAsync([FromBody] RequestOutTaskDto request) |
| | | [HttpPost, AllowAnonymous, Route("RequestOutboundTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] |
| | | public async Task<Dt_Task> RequestOutboundTaskAsync([FromBody] RequestTaskDto taskDto) |
| | | { |
| | | return await Service.RequestTrayOutTaskAsync(request.Position, request.Tag, request.AreaCdoe, request.AreaCdoes, request.ProductionLine); |
| | | return await Service.RequestOutboundTaskAsync(taskDto); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 空æç满çåºåºè¯·æ± |
| | | /// </summary> |
| | | /// <param name="request">è¯·æ±æ°æ®</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("OtherOutBoundTaskAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 2 })] |
| | | public Task<WebResponseContent> OtherOutBoundTaskAsync(string palletCode) |
| | | { |
| | | return Service.OtherOutBoundTaskAsync(palletCode); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="input">è¯·æ±æ°æ®</param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("UpdateTaskStatus")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5ç§èæµ |
| | | [HttpPost,HttpGet,Route("UpdateTaskStatus") ,AllowAnonymous] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] |
| | | public async Task<WebResponseContent> UpdateTaskStatus([FromBody] UpdateStatusDto input) |
| | | { |
| | | return await Service.UpdateTaskStatus(input.TaskNum, input.TaskState); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 请æ±è·¨æ¥¼å±ä»»å¡2 |
| | | /// </summary> |
| | | /// <param name="taskDto"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, AllowAnonymous, Route("AcrossFloorTaskAsync")] |
| | | public async Task<WebResponseContent> AcrossFloorTaskAsync([FromBody] RequestAcrossFloorTaskDto taskDto) |
| | | { |
| | | return await Service.AcrossFloorTaskAsync(taskDto); |
| | | } |
| | | |
| | | |
| | | [HttpPost, AllowAnonymous, Route("GetEmptyLocation")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] |
| | | public async Task<DtLocationInfo> GetEmptyLocation(string roadWay) |
| | | { |
| | | return await Service.GetEmptyLocation(roadWay); |
| | | } |
| | | |
| | | [HttpPost, AllowAnonymous, Route("GetAGVEmptyCacheLocation")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] |
| | | public async Task<DtLocationInfo> GetAGVEmptyCacheLocation(int AreaId,DtLocationInfo location) |
| | | { |
| | | return await Service.GetAGVEmptyCacheLocation(AreaId,location); |
| | | } |
| | | |
| | | [HttpPost, AllowAnonymous, Route("StackerIsNeedRelocationAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] |
| | | public async Task<WebResponseContent> StackerIsNeedRelocationAsync([FromBody] RequestTaskDto taskDto) |
| | | { |
| | | return await Service.StackerIsNeedRelocationAsync(taskDto); |
| | | } |
| | | |
| | | [HttpPost, AllowAnonymous, Route("AGVIsNeedRelocationAsync")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] |
| | | public async Task<WebResponseContent> AGVIsNeedRelocationAsync([FromBody] RequestTaskDto taskDto) |
| | | { |
| | | return await Service.AGVIsNeedRelocationAsync(taskDto); |
| | | } |
| | | |
| | | [HttpPost, AllowAnonymous, Route("SendERPTaskCompletion")] |
| | | [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] |
| | | public Task<WebResponseContent> SendERPTaskCompletion(string palletCode) |
| | | { |
| | | return Service.SendERPTaskCompletion(palletCode); |
| | | } |
| | | } |