wanshenmean
11 小时以前 e4921e003cc293fea714bdaf74dc6a6b6b750295
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RobotTaskService.cs
@@ -192,10 +192,11 @@
                StockDTO stock = BuildRobotTaskStock(task, configKey);
                // 获取抓取和放置地址的线体配置(如果有)
                var section = App.Configuration.GetSection("RobotTaskAddressRules").GetSection(stock?.TargetLineNo ?? string.Empty).GetChildren().Select(c => c.Value).ToArray();
                var section = App.Configuration.GetSection("RobotAddressRules").GetSection(stock?.TargetLineNo ?? string.Empty).GetChildren().Select(c => c.Value).ToArray();
                if (section.Length < 2)
                    return WebResponseContent.Instance.Error($"未找到线体[{stock?.TargetLineNo}]的地址配置");
                int taskType = MapConfigKeyToRobotTaskType(configKey);
                // 创建本地机器人任务
                Dt_RobotTask robotTask = new()
                {
@@ -204,14 +205,14 @@
                    RobotTargetAddress = section[1]!,
                    RobotSourceAddressLineCode = stock?.SourceLineNo ?? string.Empty,
                    RobotTargetAddressLineCode = stock?.TargetLineNo ?? string.Empty,
                    RobotRoadway = stock?.Roadway ?? string.Empty,
                    RobotRoadway = stock?.TargetLineNo == "11068" ? "注液组盘机械手" : "换盘机械手" ?? string.Empty, // todo
                    RobotSourceAddressPalletCode = stock?.SourcePalletNo ?? string.Empty,
                    RobotTargetAddressPalletCode = stock?.TargetPalletNo ?? string.Empty,
                    RobotTaskType = MapConfigKeyToRobotTaskType(configKey),
                    RobotTaskType = taskType,
                    RobotTaskState = (int)TaskRobotStatusEnum.RobotNew,
                    RobotGrade = task.Grade,
                    Creater = "WCS_Local",
                    RobotTaskTotalNum = 1,
                    RobotTaskTotalNum = taskType == (int)RobotTaskTypeEnum.GroupPallet ? 48 : 1,
                    CreateDate = DateTime.Now
                };