1
xiazhengtongxue
2026-02-07 4f2fb79143f0545e96f114c92e1da733b2d9716a
ÏîÄ¿´úÂë/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}");