| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.Data.Common; |
| | | using System.Diagnostics.Eventing.Reader; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseController; |
| | |
| | | } |
| | | |
| | | [HttpPost, Route("ReceiveAllocateOrder"), MethodParamsValidate, AllowAnonymous] |
| | | public WebResponseContent ReceiveAllocateOrder([FromBody] AllocateDto model) |
| | | public async Task<WebResponseContent> ReceiveAllocateOrder([FromBody] AllocateDto model) |
| | | { |
| | | Dt_AllocateOrder allocateOrder = new Dt_AllocateOrder |
| | | { |
| | |
| | | MaterielCode = detailDto.MaterialCode, |
| | | LineNo = detailDto.LineNo, |
| | | OrderQuantity = detailDto.Qty, |
| | | SupplyCode= barcodeDto.SupplyCode, |
| | | Unit = detailDto.Unit, |
| | | Barcode = barcodeDto.Barcode, |
| | | BatchNo = barcodeDto.BatchNo, |
| | |
| | | } |
| | | allocateOrder.Details.AddRange(allocateOrder.Details); |
| | | } |
| | | var content = Service.ReceiveAllocateOrder(allocateOrder, model.OperationType); |
| | | var content =await Service.ReceiveAllocateOrder(allocateOrder, model.OperationType); |
| | | |
| | | if (content.Status) return WebResponseContent.Instance.OK(200); |
| | | else return WebResponseContent.Instance.Error(content.Message); |