huangxiaoqiang
6 小时以前 b06b33248bcc19f8ea6c574124d5c536b7fa6c49
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -113,7 +113,16 @@
                                            //builder.AppendLine();
                                            //ConsoleHelper.WriteColorLine(builder, ConsoleColor.Blue);
                                            commonStackerCrane.LastTaskType = task.TaskType;
                                            _taskService.UpdateTaskStatusToNext(task.TaskNum);
                                            if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut)
                                            {
                                                task.TaskState = (int)TaskOutStatusEnum.SC_OutExecuting;
                                                _taskRepository.AddData(task);
                                                _taskService.StackCraneTaskCompleted(task.TaskNum);
                                            }
                                            else
                                            {
                                                _taskService.UpdateTaskStatusToNext(task.TaskNum);
                                            }
                                        }
                                    }
                                    else
@@ -264,7 +273,6 @@
            if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                #region 静置出库判断是否能执行任务
                //if (task != null && task.Roadway.Contains("JZ") && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                if (task != null && task.Roadway.Contains("JZ") && task.TaskType==(int)TaskOutboundTypeEnum.Outbound)
                {
                    // 查询是否存在静置入库任务
@@ -459,6 +467,8 @@
            stackerCraneTaskCommand.WorkType = 1;
            stackerCraneTaskCommand.TrayType = 0;
            stackerCraneTaskCommand.StartCommand = 1;
            stackerCraneTaskCommand.FireCommand = Convert.ToInt16(task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm ? 2 : 0);
            if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//判断是否是入库任务
            {
                var value = _sys_ConfigService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStation, SysConfigKeyConst.JZNGInBoundStation).ConfigValue;
@@ -553,7 +563,18 @@
            }
            else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                if (task.Roadway.Contains("GW") || task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm)
                if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut)
                {
                    string[] endCodes = task.TargetAddress.Split("-");
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(endCodes[1]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(endCodes[2]);
                    string[] sourceCodes = task.SourceAddress.Split("-");
                    stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]) % 2 != 0 ? (short)1 : (short)2;
                    stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
                    stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
                }
                else if (task.Roadway.Contains("GW") || task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm)
                {
                    string[] endCodes = task.NextAddress.Split("-");
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]);