| | |
| | | _materialUnitService = materialUnitService; |
| | | } |
| | | |
| | | private int[] OrderTypes = new int[] { InOrderTypeEnum.AllocatOutbound.ObjToInt(), InOrderTypeEnum.InternalAllocat.ObjToInt(), InOrderTypeEnum.ReCheck.ObjToInt() }; |
| | | public async Task<WebResponseContent> ReceiveOutboundOrder(Dt_OutboundOrder model, int operateType) |
| | | { |
| | | try |
| | |
| | | var moveissueoStockResult = await _materialUnitService.ConvertFromToStockAsync(item.MaterielCode, item.BarcodeUnit, item.BarcodeMoveQty); |
| | | item.MoveQty = moveissueoStockResult.Quantity; |
| | | } |
| | | |
| | | if (model.OrderType != InOrderTypeEnum.AllocatOutbound.ObjToInt() || model.OrderType != InOrderTypeEnum.InternalAllocat.ObjToInt()) |
| | | if (!OrderTypes.Contains(model.OrderType)) |
| | | { |
| | | model.OrderNo = CreateCodeByRule(nameof(RuleCodeEnum.OutboundOrderRule)); |
| | | } |
| | | |
| | | Db.InsertNav(model).Include(x => x.Details).ExecuteCommand(); |
| | | |
| | | return WebResponseContent.Instance.OK(); |