| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Newtonsoft.Json; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseController; |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReceiveOutBoundOrder"), AllowAnonymous, MethodParamsValidate] |
| | | public WebResponseContent ReceiveOutBoundOrder([FromBody] OutboundRequestModel model) |
| | | public async Task<WebResponseContent> ReceiveOutBoundOrder([FromBody] OutboundRequestModel model) |
| | | { |
| | | _logger.LogInformation("OutboundOrderController ReceiveOutBoundOrder: " + JsonConvert.SerializeObject(model)); |
| | | Dt_OutboundOrder dt_OutboundOrder = new Dt_OutboundOrder() { Details = new List<Dt_OutboundOrderDetail>() }; |
| | |
| | | Unit = detailitem.unit, |
| | | WarehouseCode = detailitem.warehouseCode, |
| | | MoveQty = detailitem.moveQty, |
| | | BarcodeMoveQty=detailitem.moveQty, |
| | | BarcodeQty=detailitem.qty, |
| | | BarcodeUnit=detailitem.unit, |
| | | OrderQuantity = detailitem.qty |
| | | }; |
| | | dt_OutboundOrder.Details.Add(inboundOrderDetail); |
| | |
| | | dt_OutboundOrder.IsBatch = model.isBatch; |
| | | dt_OutboundOrder.FactoryArea = model.factoryArea; |
| | | |
| | | var content = Service.ReceiveOutboundOrder(dt_OutboundOrder, model.operationType); |
| | | var content =await Service.ReceiveOutboundOrder(dt_OutboundOrder, model.operationType); |
| | | |
| | | if (content.Status) return WebResponseContent.Instance.OK(200); |
| | | else return WebResponseContent.Instance.Error(content.Message); |