| | |
| | | //}); |
| | | } |
| | | //_stockQuantityChangeRecordRepository.AddData(stockQuantityChangeRecords); |
| | | stockInfo.Details = details; |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) + beforeQuantity, StockChangeType.MaterielGroup); |
| | | if (details.Count > 0) |
| | | { |
| | | stockInfo.Details = details; |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) + beforeQuantity, StockChangeType.MaterielGroup); |
| | | } |
| | | else |
| | | { |
| | | details = stockInfo.Details; |
| | | _stockRepository.StockInfoDetailRepository.UpdateData(details); |
| | | } |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetUseableStocks(string materielCode) |
| | |
| | | return BaseDal.GetStockInfos(materielCode, locationCodes); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 鑾峰彇鎸囧畾鐗╂枡搴撳瓨淇℃伅 |
| | | /// </summary> |
| | | /// <param name="materielCode"></param> |
| | | /// <returns></returns> |
| | | public List<StockSelectViewDTO> GetStockSelectViews(string materielCode) |
| | | { |
| | | List<string> roadways = _basicRepository.RoadwayInfoRepository.CanOutRoadwayNos; |