From 36230cd4dd0ebe5d21eede3eff6216908f7f7a8e Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期三, 06 十一月 2024 16:48:32 +0800 Subject: [PATCH] AGV任务下发,AGV任务状态更新 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs" index 7372c41..3a4315c 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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; -- Gitblit v1.9.3