dengjunjie
2024-11-06 36230cd4dd0ebe5d21eede3eff6216908f7f7a8e
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs
@@ -75,8 +75,16 @@
                //});
            }
            //_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)
@@ -92,6 +100,11 @@
            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;