| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.Text; |
| | | using WIDESEA_External.Model; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseController; |
| | |
| | | } |
| | | |
| | | [HttpPost, Route("ReceiveTask"), AllowAnonymous] |
| | | public WebResponseContent ReceiveWMSTask([FromBody] WMSTaskDTO taskDTO) |
| | | public WMSReceiveTaskContent ReceiveWMSTask([FromBody] WMSTaskDTO taskDTO) |
| | | { |
| | | return Service.ReceiveWMSTask(taskDTO); |
| | | } |
| | |
| | | byte[] bytesPick = commonConveyorLine.Communicator.Read("2", 5); |
| | | string PickBarCode = Encoding.UTF8.GetString(bytesPick).Replace("\0", "").Replace("\\0", ""); |
| | | if (containerFlowDTO.ContainerCode != PickBarCode) throw new Exception($"ä¼ å
¥æç®±ç {containerFlowDTO.ContainerCode}ï¼è¾éæç®±ç {PickBarCode}æ°æ®é误"); |
| | | if (containerFlowDTO.Direction == "100") |
| | | { |
| | | WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode); |
| | | if (!responseContent.Status) throw new Exception(responseContent.Message); |
| | | } |
| | | //if (containerFlowDTO.Direction == "100") |
| | | //{ |
| | | // WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode); |
| | | // if (!responseContent.Status) throw new Exception(responseContent.Message); |
| | | //} |
| | | commonConveyorLine.Communicator.Write("22", (containerFlowDTO.Direction == "100" ? new byte[] { 1, 0 } : new byte[] { 2, 0 })); |
| | | } |
| | | else |
| | |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("InitLight"), AllowAnonymous] |
| | | public WebResponseContent InitLight() |
| | | { |
| | | { |
| | | return Service.InitLight(); |
| | | } |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// WMSä»»å¡åæ¶åæ¥ |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <param name="taskCancels"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("CancelTask"), AllowAnonymous] |
| | | public WebResponseContent CancelTask(List<TaskCancel> taskCancels) |
| | | public WebResponseContent CancelTask([FromBody] List<TaskCancel> taskCancels) |
| | | { |
| | | return WebResponseContent.Instance.Error(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æä»»å¡å¼å¸¸900ä¿®æ¹ä¸ºAGVæ§è¡ä¸300 |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("ResetAllExceptionTask"), AllowAnonymous] |
| | | public WebResponseContent ResetAllExceptionTask(int taskNum) |
| | | { |
| | | return Service.ResetAllExceptionTask(taskNum); |
| | | } |
| | | } |
| | | } |