1
huangxiaoqiang
2025-04-09 b8cd98f0a2d8a7e644563eb67d4c88371279a729
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -819,7 +819,39 @@
                if (stationManagers == null)
                    throw new Exception("未找到空托盘入库站台和入库站台配置");
            }
            List<string> strings = stationManagers.Roadway.Split(',').ToList();
            List<string> strings;
            if (input.Position == "1016-3")
            {
                var configOne = _configService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStacker, SysConfigConst.CHInboundEmptyProductLineOne);
                var configTwo = _configService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStacker, SysConfigConst.CHInboundEmptyProductLineTwo);
                List<string>  productLineconfigOne = configOne.ConfigValue.Split(',').ToList();
                List<string>  productLineconfigTwo = configTwo.ConfigValue.Split(',').ToList();
                if (productLineconfigOne.Count == 0 && productLineconfigTwo.Count() == 0)
                {
                    ConsoleHelper.WriteErrorLine($"未找到配置文件产线配置");
                    return content.Error("未找到配置文件产线配置");
                }
                if (productLineconfigOne.Contains(result.ProductionLine))
                {
                    strings = configOne.Remark.Split(',').ToList();
                }
                else if (productLineconfigTwo.Contains(result.ProductionLine))
                {
                    strings = configTwo.Remark.Split(',').ToList();
                }
                else
                {
                    ConsoleHelper.WriteErrorLine($"未找到{result.ProductionLine}对应配置巷道");
                    return content.Error($"未找到{result.ProductionLine}对应配置巷道");
                }
            }
            else
            {
                strings = stationManagers.Roadway.Split(',').ToList();
            }
            return await CreateNewTask(input, result.ProductionLine, result.ProcessCode, strings, 1);
        }
@@ -1231,7 +1263,15 @@
            if (stockInfo.AreaCode.Contains("CH"))
            {
                // 创建并添加任务到数据库
                task = CreateTask(stockInfo, "1020-1", taskType);
                if(stockInfo.LocationInfo.RoadwayNo=="CHSC1"|| stockInfo.LocationInfo.RoadwayNo == "CHSC2"|| stockInfo.LocationInfo.RoadwayNo == "CHSC3")
                {
                    task = CreateTask(stockInfo, "1020-1", taskType);
                }
                else
                {
                    task = CreateTask(stockInfo, "1049-1", taskType);
                }
            }
            else
            {