From 97073e9e6d03114221436ee0aa1e143d6e2c4a09 Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期一, 04 八月 2025 13:07:39 +0800 Subject: [PATCH] 出入库代码逻辑优化 --- WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs index 7c0a2d6..9d5b14f 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs @@ -46,11 +46,12 @@ return WebResponseContent.Instance.Error($"璇ョ珯鐐瑰凡鏈夋湭鎵ц鐨勪换鍔�"); } Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First(); - var details = stockInfo.Details.FirstOrDefault(); + if (stockInfo == null) { return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�"); } + var details = stockInfo.Details.FirstOrDefault(); if (!string.IsNullOrEmpty(stockInfo.LocationCode)) { return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅"); @@ -235,7 +236,7 @@ return WebResponseContent.Instance.Error(checkResult.Item2); // 鍒嗛厤搴撲綅骞舵洿鏂版暟鎹� - Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayNo, dt_Stock.PalletType);//, dt_Stock.WarehouseId + Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayNo, dt_Stock.PalletType, dt_Stock.WarehouseId);// //Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(stationCode, TaskTypeEnum.Inbound.ObjToInt()); if (locationInfo == null) { -- Gitblit v1.9.3