From 4f2fb79143f0545e96f114c92e1da733b2d9716a Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期六, 07 二月 2026 21:31:05 +0800
Subject: [PATCH] 1
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MESTaskService.cs | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MESTaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MESTaskService.cs"
index 42ce9c5..ffa09ea 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MESTaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MESTaskService.cs"
@@ -32,7 +32,7 @@
{
public partial class TaskService
{
- public static List<string> InStationareaList = new List<string>() { "1113", "1114", "1115", "1116", "1117", "1118", "1119", "1120", "1121", "1122" };
+ public static List<string> InStationareaList = new List<string>() { "1113", "1114", "1115", "1116", "1117", "1118", "1119", "1120", "1121", "1122" ,"1123"};
//鍏ュ簱锛岀┖鐩樺洖搴�
public ApiResponse AddInStoreDoc(MES_InTask mES_In)
{
@@ -176,7 +176,18 @@
if (string.IsNullOrWhiteSpace(mES_In.containerNo)) return apiResponse.Error("鎵樼洏鐮佷笉鑳戒负绌�");
if (string.IsNullOrWhiteSpace(mES_In.endPosition)) return apiResponse.Error("鐩爣浣嶇疆涓嶈兘涓虹┖");
-
+ // 褰撳墠浠诲姟mES_In.endPosition鐩爣浣嶇疆1113 - 1122
+ var restrictedPositions = new List<string> { "1113", "1114", "1115", "1116", "1117", "1118", "1119", "1120", "1121", "1122", "1123" };
+ bool isRestrictedPosition = restrictedPositions.Contains(mES_In.endPosition);
+ if (isRestrictedPosition)
+ {
+ bool hasExistingTask = BaseDal.QueryData(x => x.TargetAddress == mES_In.endPosition).Any();
+ if (hasExistingTask)
+ {
+ // 鐩爣浣嶇疆鍦�1113-1122鑼冨洿鍐呯殑澶勭悊閫昏緫
+ return apiResponse.Error($"褰撳墠鏈夊幓鐩爣浣嶇疆{mES_In.endPosition}鐨勪换鍔★紝璇烽噸鏂版搷浣�");
+ }
+ }
Dt_StockInfo dt_Stock=_stockInfoService.Repository.QueryData(x=>x.PalletCode== mES_In.containerNo).FirstOrDefault();
if (dt_Stock == null) return apiResponse.Error($"WMS鏈兘鏌ユ壘閬撹鎵樼洏鏉$爜鐨勫簱瀛樿揣浣嶄俊鎭紝鏉$爜锛歿mES_In.containerNo}");
--
Gitblit v1.9.3