| | |
| | | _taskService = taskService; |
| | | _stationMangerService = stationMangerService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WMSä¸åä»»å¡ |
| | | /// </summary> |
| | | /// <param name="taskDTOs"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReceiveTask"), AllowAnonymous] |
| | | public object ReceiveWMSTask([FromBody] List<WMSTasksDTO> taskDTOs) |
| | | public WMSReturn ReceiveWMSTask([FromBody] List<WMSTasksDTO> taskDTOs) |
| | | { |
| | | WebResponseContent content = _taskService.ReceiveWMSTask(taskDTOs); |
| | | if (!content.Status) |
| | | { |
| | | return new |
| | | { |
| | | code = "404", |
| | | msg = content.Message |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | return new |
| | | { |
| | | code = "0", |
| | | msg = content.Message, |
| | | data = content.Data |
| | | }; |
| | | } |
| | | return WMSReturnMethod.ReturnWMS(content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 容卿µå¨è¯·æ± |
| | | /// </summary> |
| | | /// <param name="taskDTOs"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ContainerRequest"), AllowAnonymous] |
| | | public WMSReturn ContainerRequest([FromBody] WMSContainerFlow wMSContainerFlow) |
| | | { |
| | | WebResponseContent content = _taskService.ContainerRequest(wMSContainerFlow); |
| | | return WMSReturnMethod.ReturnWMS(content); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="wMSCancelTask"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("CancelWMSTask"), AllowAnonymous] |
| | | public object CancelWMSTask([FromBody] WMSCancelTask wMSCancelTask) |
| | | public WMSReturn CancelWMSTask([FromBody] WMSCancelTask wMSCancelTask) |
| | | { |
| | | WebResponseContent content = _taskService.CancelWMSTask(wMSCancelTask); |
| | | if (!content.Status) |
| | | { |
| | | return new |
| | | { |
| | | code = "404", |
| | | msg = content.Message |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | return new |
| | | { |
| | | code = "0", |
| | | msg = content.Message, |
| | | data = content.Data |
| | | }; |
| | | } |
| | | return WMSReturnMethod.ReturnWMS(content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹ä»»å¡ä¼å
级 |
| | | /// è´¨æ£ç»æåé¦ |
| | | /// </summary> |
| | | /// <param name="updateTaskPriority"></param> |
| | | /// <param name="iQC"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("UpdateWMSTaskPriority"), AllowAnonymous] |
| | | public object UpdateWMSTaskPriority([FromBody] WMSUpdateTaskPriority updateTaskPriority) |
| | | [HttpPost, Route("IQCResult"), AllowAnonymous] |
| | | public WMSReturn IQCResult([FromBody] IQCResultDTO iQC) |
| | | { |
| | | WebResponseContent content = _taskService.UpdateWMSTaskPriority(updateTaskPriority); |
| | | if (!content.Status) |
| | | { |
| | | return new |
| | | { |
| | | code = "404", |
| | | msg = content.Message |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | return new |
| | | { |
| | | code = "0", |
| | | msg = content.Message, |
| | | data = content.Data |
| | | }; |
| | | } |
| | | WebResponseContent content = _taskService.IQCResult(iQC); |
| | | return WMSReturnMethod.ReturnWMS(content); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="WMSUpdateLocationArea"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ModifyWMSLayoutZone"), AllowAnonymous] |
| | | public object ModifyWMSLayoutZone([FromBody] WMSUpdateLocationArea wMSUpdateLocationArea) |
| | | [HttpPost, Route("UpdateArea"), AllowAnonymous] |
| | | public WMSReturn UpdateArea([FromBody] WMSUpdateLocationArea wMSUpdateLocationArea) |
| | | { |
| | | WebResponseContent content = _taskService.ModifyWMSLayoutZone(wMSUpdateLocationArea); |
| | | if (!content.Status) |
| | | { |
| | | return new |
| | | { |
| | | code = "404", |
| | | msg = content.Message |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | return new |
| | | { |
| | | code = "0", |
| | | msg = content.Message, |
| | | data = content.Data |
| | | }; |
| | | } |
| | | return WMSReturnMethod.ReturnWMS(content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹ä»»å¡ä¼å
级 |
| | | /// </summary> |
| | | /// <param name="updateTaskPriority"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("UpdateTaskGrade"), AllowAnonymous] |
| | | public WMSReturn UpdateTaskGrade([FromBody] WMSUpdateTaskPriority updateTaskPriority) |
| | | { |
| | | WebResponseContent content = _taskService.UpdateWMSTaskPriority(updateTaskPriority); |
| | | return WMSReturnMethod.ReturnWMS(content); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="AreaCode">åºåå·</param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("LocationInquiry"), AllowAnonymous] |
| | | public object LocationInquiry(string AreaCode) |
| | | [HttpGet, HttpPost, Route("QueryStation"), AllowAnonymous] |
| | | public WMSReturn QueryStation(string AreaCode) |
| | | { |
| | | WebResponseContent content = _taskService.LocationInquiry(AreaCode); |
| | | if (!content.Status) |
| | | { |
| | | return new |
| | | { |
| | | code = "404", |
| | | msg = content.Message |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | return new |
| | | { |
| | | code = "0", |
| | | msg = content.Message, |
| | | data = content.Data |
| | | }; |
| | | } |
| | | return WMSReturnMethod.ReturnWMS(content); |
| | | } |
| | | } |
| | | } |