| | |
| | | if (stockInfo.Id == 0) |
| | | { |
| | | BaseDal.Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand(); |
| | | //stockQuantityChangeRecords = _mapper.Map<List<Dt_StockQuantityChangeRecord>>(stockInfo.Details); |
| | | //stockQuantityChangeRecords.ForEach(x => |
| | | //{ |
| | | // x.PalleCode = stockInfo.PalletCode; |
| | | // x.BeforeQuantity = 0; |
| | | // x.ChangeQuantity = x.AfterQuantity - x.BeforeQuantity; |
| | | // x.ChangeType = StockChangeType.MaterielGroup.ObjToInt(); |
| | | //}); |
| | | details = stockInfo.Details; |
| | | } |
| | | else |
| | |
| | | |
| | | } |
| | | |
| | | //stockQuantityChangeRecords = _mapper.Map<List<Dt_StockQuantityChangeRecord>>(stockInfo.Details); |
| | | //int index = 0; |
| | | //stockQuantityChangeRecords.ForEach(x => |
| | | //{ |
| | | // x.PalleCode = stockInfo.PalletCode; |
| | | // x.BeforeQuantity = 0; |
| | | // x.ChangeQuantity = x.AfterQuantity - x.BeforeQuantity; |
| | | // x.ChangeType = StockChangeType.MaterielGroup.ObjToInt(); |
| | | // x.StockDetailId = |
| | | // index++; |
| | | //}); |
| | | } |
| | | //_stockQuantityChangeRecordRepository.AddData(stockQuantityChangeRecords); |
| | | stockInfo.Details = details; |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) + beforeQuantity, StockChangeType.MaterielGroup); |
| | | } |