From 2a73ec6d537d9b55f60fe0088678c99930eb84d8 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 10 三月 2026 18:52:49 +0800
Subject: [PATCH] 优化成品库入库逻辑
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
index 0761bf8..a94fe87 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
@@ -27,6 +27,13 @@
try
{
int containerType = taskDTO.containerCode.Contains("LLM") ? LocationTypeEnum.LargePallet.ObjToInt() : LocationTypeEnum.SmallPallet.ObjToInt();
+ #region 鐐瑰埌鐐�
+ if (!string.IsNullOrEmpty(taskDTO.toLocationCode))
+ {
+ var LocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == taskDTO.toLocationCode) ?? throw new Exception($"鏈壘鍒扮粓鐐硅揣浣嶃�恵taskDTO.toLocationCode}銆�");
+ if (LocationInfo.LocationStatus != LocationStatusEnum.Free.ObjToInt()) throw new Exception($"缁堢偣璐т綅銆恵taskDTO.toLocationCode}銆戣揣浣嶇姸鎬佷笉涓虹┖璐т綅");
+ }
+ #endregion
//鑾峰彇璐т綅淇℃伅
Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode, containerType) ?? throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�");
Dt_Task dt_Task = new()
@@ -58,7 +65,7 @@
Db.Ado.RollbackTran();
throw new Exception(ex.Message);
}
-
+
return content.OK(data: new
{
taskCode = taskDTO.taskCode,
--
Gitblit v1.9.3