| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_DTO.CalcOut; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¤éæ£éæ¡ç æ¥å£ï¼åååæ»æ£éæä½ï¼ |
| | | /// </summary> |
| | | /// <param name="request">æ¤éæ£é请æ±åæ°</param> |
| | | /// <returns>æ¥å£ååºç»æ</returns> |
| | | [HttpPost, Route("ReversePickingWithBarcode"), AllowAnonymous] |
| | | public WebResponseContent ReversePickingWithBarcode([FromBody] ReversePickingRequestDTO request) |
| | | { |
| | | try |
| | | { |
| | | lock (lockObj) |
| | | { |
| | | if (!ModelState.IsValid) |
| | | { |
| | | string errorMsg = string.Join("; ", ModelState.Values |
| | | .SelectMany(v => v.Errors) |
| | | .Select(e => e.ErrorMessage)); |
| | | return WebResponseContent.Instance.Error(errorMsg); |
| | | } |
| | | |
| | | return _outboundService.ReversePicking(request); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æ¤éæ£éæä½å¤±è´¥: {ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | |
| | | [HttpPost, Route("CompleteOutboundWithPallet"), AllowAnonymous] |
| | | public WebResponseContent CompleteOutboundWithPallet([FromBody] OutboundCompletePalletRequestDTO request) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | [HttpPost,HttpGet, Route("GetOrderInfo"), AllowAnonymous] |
| | | public WebResponseContent GetOrderInfo(string orderNo) |
| | | { |
| | | return _outboundService.GetOrderInfo(orderNo); |
| | | } |
| | | |
| | | [HttpPost, Route("QueryPickingTasks"), AllowAnonymous] |
| | | public WebResponseContent QueryPickingTasks(string palletCode, string orderNo) |
| | | { |
| | |
| | | { |
| | | return _outboundService.QueryPickedList(orderNo, palletCode); |
| | | } |
| | | |
| | | [HttpPost, Route("EmptyBox"), AllowAnonymous] |
| | | public async Task<WebResponseContent> EmptyBox([FromBody] ReturnToWarehouseDTO returnToWarehouse) |
| | | { |
| | | return await _outboundService.EmptyBox(returnToWarehouse.palletCode); |
| | | } |
| | | |
| | | [HttpPost, Route("ReturnToWarehouse"), AllowAnonymous] |
| | | public async Task<WebResponseContent> ReturnToWarehouse([FromBody]ReturnToWarehouseDTO returnToWarehouse) |
| | | { |
| | | return await _outboundService.ReturnToWarehouse(returnToWarehouse.palletCode, returnToWarehouse.orderNo, returnToWarehouse.station); |
| | | } |
| | | |
| | | [HttpPost, Route("RecheckPicking"), AllowAnonymous] |
| | | public WebResponseContent RecheckPicking([FromBody] RecheckPickingDTO pickingDTO) |
| | | { |
| | | return _outboundService.RecheckPicking(pickingDTO); |
| | | } |
| | | |
| | | [HttpPost, Route("PrintFromData"), AllowAnonymous] |
| | | public WebResponseContent PrintFromData(string barcode) |
| | | { |
| | | return _outboundService.PrintFromData(barcode); |
| | | } |
| | | } |
| | | } |