From 88676143aeceaeec3bd108f9cd609c4f3470ba96 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期三, 30 七月 2025 15:07:32 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 30 +++++++++++++++++++++--------- 1 files changed, 21 insertions(+), 9 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" index 3deae56..f7f350b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" @@ -100,6 +100,7 @@ PalletType = stockInfo.PalletType, MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode, Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity), + BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo }; //鑾峰彇鏄惁瀛樺湪鍏ュ簱鍗� Dt_InboundOrder? inboundOrder = null; @@ -275,7 +276,7 @@ _stockRepository.StockInfoRepository.AddData(stockInfo); _unitOfWorkManage.CommitTran(); PushTasksToWCS(new List<Dt_Task> { newTask }); - PutFinish(address, newTask.PalletCode, newTask.TaskNum.ToString()); + //PutFinish(address, newTask.PalletCode, newTask.TaskNum.ToString()); return WebResponseContent.Instance.OK(); } catch (Exception ex) @@ -395,10 +396,12 @@ }; string MaterielCodeGMPP = stockInfoPPorGM.Details?.Where(x => x.StockId == stockInfoPPorGM.Id).FirstOrDefault()?.MaterielCode; float QuantityGMPP = (float)stockInfoPPorGM.Details?.Where(x => x.StockId == stockInfoPPorGM.Id).Sum(x => x.StockQuantity); - if (MaterielCodeGMPP != null && QuantityGMPP != null) + string batchNo = stockInfoPPorGM.Details?.Where(x => x.StockId == stockInfoPPorGM.Id).FirstOrDefault()?.BatchNo; + if (MaterielCodeGMPP != null && QuantityGMPP != null && batchNo != null) { newTaskPPorGM.MaterielCode = MaterielCodeGMPP; newTaskPPorGM.Quantity = QuantityGMPP; + newTaskPPorGM.BatchNo = batchNo; } //鑾峰彇鏄惁瀛樺湪鍏ュ簱鍗� @@ -469,10 +472,12 @@ }; string MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode; float Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity); - if (MaterielCode != null && Quantity != null) + string BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo; + if (MaterielCode != null && Quantity != null && BatchNo != null) { newTask.MaterielCode = MaterielCode; newTask.Quantity = Quantity; + newTask.BatchNo = BatchNo; } //鑾峰彇鏄惁瀛樺湪鍏ュ簱鍗� @@ -533,7 +538,7 @@ WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask); PushTasksToWCS(new List<Dt_Task> { newTask }); - if (newTask.WarehouseId == 5) PutFinish(stationCode.ToString(),newTask.PalletCode, newTask.TaskNum.ToString()); + //if (newTask.WarehouseId == 5) PutFinish(stationCode.ToString(),newTask.PalletCode, newTask.TaskNum.ToString()); return WebResponseContent.Instance.OK(data: wMSTaskDTO); } catch (Exception ex) @@ -594,10 +599,12 @@ }; string MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode; float Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity); - if (MaterielCode != null && Quantity != null) + string BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo; + if (MaterielCode != null && Quantity != null && BatchNo != null) { newTask.MaterielCode = MaterielCode; - newTask.Quantity = (float)Quantity; + newTask.Quantity = Quantity; + newTask.BatchNo = BatchNo; } if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt()) @@ -634,7 +641,7 @@ WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask); PushTasksToWCS(new List<Dt_Task> { newTask }); - if (newTask.WarehouseId == 5) PutFinish(stationCode, newTask.PalletCode, newTask.TaskNum.ToString()); + //if (newTask.WarehouseId == 5) PutFinish(stationCode, newTask.PalletCode, newTask.TaskNum.ToString()); return WebResponseContent.Instance.OK(data: wMSTaskDTO); } catch (Exception ex) @@ -700,10 +707,12 @@ }; string MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode; float Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity); - if (MaterielCode != null && Quantity != null) + string BatchNo = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.BatchNo; + if (MaterielCode != null && Quantity != null && BatchNo != null) { newTask.MaterielCode = MaterielCode; newTask.Quantity = Quantity; + newTask.BatchNo = BatchNo; } if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt()) { @@ -921,6 +930,7 @@ WarehouseId = warehouse.WarehouseId, MaterielCode = mesLotInfo.Product, Quantity = (float)mesLotInfo.Qty, + BatchNo = mesLotInfo.LotNo }; _unitOfWorkManage.BeginTran(); Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand(); @@ -1033,7 +1043,9 @@ WarehouseId = warePoint.WarehouseId, PalletType = proStockInfo.PalletType, MaterielCode = proStockInfo.proStockInfoDetails?.Where(x => x.ProStockId == proStockInfo.Id).FirstOrDefault()?.ProductCode, - Quantity = (float)proStockInfo.proStockInfoDetails?.Where(x => x.ProStockId == proStockInfo.Id).Sum(x => x.StockPcsQty) + Quantity = (float)proStockInfo.proStockInfoDetails?.Where(x => x.ProStockId == proStockInfo.Id).Sum(x => x.StockPcsQty), + BatchNo = proStockInfo.proStockInfoDetails?.Where(x => x.ProStockId == proStockInfo.Id).FirstOrDefault()?.LotNumber + }; _unitOfWorkManage.BeginTran(); int taskId = BaseDal.AddData(newTask); -- Gitblit v1.9.3