From 3ecd03b3a0a30a57153468beaed3199bfe906772 Mon Sep 17 00:00:00 2001 From: huanghongfeng <huanghongfeng@hnkhzn.com> Date: 星期一, 11 十一月 2024 16:58:37 +0800 Subject: [PATCH] 1 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 29 +++++++---------------------- 1 files changed, 7 insertions(+), 22 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" index 3093bdf..06ac083 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" @@ -125,30 +125,15 @@ Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode); //鏌ヨ揣浣� Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress); - + Dt_StockInfoDetail dt_StockInfodetail = _stockService.StockInfoDetailService.Repository.QueryFirst(x => x.StockId == stockInfo.Id); CheckCompleted(stockInfo, locationInfo); + stockInfo.LocationCode = task.TargetAddress; stockInfo.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt(); _stockService.StockInfoService.Repository.UpdateData(stockInfo); - if (_stockService.StockInfoService.Repository.UpdateData(stockInfo)) - { - string[] Pallet = stockInfo.PalletCode.Split("-"); - Dt_StockInfoDetail dt_StockInfoDetail = new() - { - StockId = stockInfo.Id, - MaterielCode = Pallet[0], //鐗╂枡缂栧彿 - MaterielName = Pallet[1], //鏉愯川 - OrderNo = stockInfo.PalletCode, //鍗曟嵁锛堟墭鐩樻潯鐮侊級 - BatchNo = Pallet[2], //鎵规鍙� - SerialNumber = Pallet[2], //搴忓垪鍙� - StockQuantity = decimal.Parse(Pallet[3]), //搴忓垪鍙� - OutboundQuantity = decimal.Parse(Pallet[3]), //搴忓垪鍙� - Status = (int)StockStatusEmun.宸插叆搴�, - Creater = "WMS", - CreateDate = DateTime.Now, - }; - _stockService.StockInfoDetailService.AddData(dt_StockInfoDetail); - } + dt_StockInfodetail.Status = StockStatusEmun.宸插叆搴�.ObjToInt(); + _stockService.StockInfoDetailService.Repository.UpdateData(dt_StockInfodetail); + beforeQuantity = stockInfo.Details.Where(x => x.Id != 0).Sum(x => x.StockQuantity); @@ -219,10 +204,10 @@ return (false, "鏈壘鍒拌揣浣嶄俊鎭�"); } - /*if (isCheckStockDetail && (stockInfo.Details == null || stockInfo.Details.Count == 0)) + if (isCheckStockDetail && (stockInfo.Details == null || stockInfo.Details.Count == 0)) { return (false, "鏈壘鍒扮粍鐩樻槑缁嗕俊鎭�"); - }*/ + } return (true, "鎴愬姛"); } -- Gitblit v1.9.3