| | |
| | | _allocateOrderRepository = allocateOrderRepository; |
| | | } |
| | | |
| | | public async Task<WebResponseContent> GroupPallet(GroupPalletDto palletDto) |
| | | public async Task<WebResponseContent> |
| | | GroupPallet(GroupPalletDto palletDto) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | |
| | | |
| | | if(inboundOrder.BusinessType != "11") |
| | | { |
| | | var warehouseType = _inboundOrderDetailRepository.Db.Queryable<Dt_InboundOrderDetail>().Where(x => x.Barcode == palletDto.Barcode || x.OutBoxbarcodes == palletDto.Barcode).Select(x => x.WarehouseCode).First(); |
| | | var warehouseType = _inboundOrderDetailRepository.Db.Queryable<Dt_InboundOrderDetail>().Where(x => (x.Barcode == palletDto.Barcode || x.OutBoxbarcodes == palletDto.Barcode)&& x.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt()).Select(x => x.WarehouseCode).First(); |
| | | |
| | | if (string.IsNullOrEmpty(warehouseType)) |
| | | { |
| | |
| | | stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None, LocationType = Convert.ToInt32(palletDto.locationType) }; |
| | | stockInfo.Details = new List<Dt_StockInfoDetail>(); |
| | | } |
| | | //else |
| | | //{ |
| | | // var allowStatus = new[] |
| | | // { |
| | | // (int)StockStatusEmun.ç»çæå, |
| | | // (int)StockStatusEmun.æºä»å
¥æºä»ç»çæå, |
| | | // (int)StockStatusEmun.æå¨ç»çæå |
| | | // }; |
| | | |
| | | // if (!allowStatus.Contains(stockInfo.StockStatus)) |
| | | // { |
| | | // return content.Error($"该æç{stockInfo.PalletCode}ç¶æä¸å
许ç»ç"); |
| | | // } |
| | | //} |
| | | |
| | | if (inboundOrder.BusinessType != MESDocumentType.PurchaseInbound.ToString() && stockInfo != null && stockInfo.Details.Count > 0 && stockInfo.Details.FirstOrDefault()?.WarehouseCode != palletDto.WarehouseType) |
| | | { |