| | |
| | | _taskService = taskService; |
| | | _taskRepository = taskRepository; |
| | | } |
| | | [HttpPost, HttpGet, Route("AGVFinish"), AllowAnonymous] |
| | | public WebResponseContent AGVFinish(string barcode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var task = _taskRepository.QueryFirst(x => x.PalletCode == barcode); |
| | | if (task == null) throw new Exception($"æªæ¾å°ä»»å¡,æçå·ã{barcode}ã"); |
| | | AgvUpdateDTO updateDTO = new AgvUpdateDTO() |
| | | { |
| | | TaskCode = task.AgvTaskNum, |
| | | Method = "end" |
| | | }; |
| | | var agvResponseContent = CtuCallback(updateDTO); |
| | | if (agvResponseContent.Code == "1") throw new Exception(agvResponseContent.Message); |
| | | content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | #region å®å
¨ä¿¡å·ç³è¯· |
| | | /// <summary> |