dengjunjie
2024-11-06 36230cd4dd0ebe5d21eede3eff6216908f7f7a8e
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -15,7 +15,6 @@
using System.Threading.Tasks;
using WIDESEAWCS_Common.StackerCraneEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Common.WMSInfo;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IShuttleCar;
@@ -31,12 +30,11 @@
using WIDESEAWCS_TaskInfoService;
using WIDESEAWCS_Tasks.ConveyorLineJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
using static WIDESEAWCS_Common.WMSInfo.RequestWMS;
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public partial class CommonStackerCraneJob : IJob
    public partial class CommonStackerCraneJob : JobBase, IJob
    {
        private readonly ITaskService _taskService;
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
@@ -104,9 +102,11 @@
                                        }
                                        else
                                        {
                                            SendTask(commonStackerCrane, task);//下发堆垛机任务
                                            task.ShuttleCarCode = ShuttleCar?.ShuttleCarCode;
                                            _taskService.UpdateData(task);
                                        }
                                    }
                                    SendTask(commonStackerCrane, task);//下发堆垛机任务
                                }
                            }
@@ -130,7 +130,7 @@
            if (stackerCraneTaskCommand != null)
            {
                bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
                bool worktype = commonStackerCrane.SetValue(StackerCraneDBName.WorkType, task.TaskType == (int)TaskOtherTypeEnum.RelocationCar ? 2 : 1);
                bool worktype = commonStackerCrane.SetValue(StackerCraneDBName.WorkType, task.TaskType == (int)TaskOtherTypeEnum.RelocationCar ? (short)WorkType.Car : (short)WorkType.Cargo);
                if (sendFlag && worktype)
                {
                    if (commonStackerCrane.SetValue(StackerCraneDBName.CommandSend, sendFlag))
@@ -226,7 +226,7 @@
                    task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
                }
            }
            if (task != null && task.TargetAddress != "SC01") return task;//入库任务判断是否已分配货位,WMS判断货位状态是否允许放货
            if (task != null && !string.IsNullOrEmpty(task.TargetAddress)) return task;//入库任务判断是否已分配货位,WMS判断货位状态是否允许放货
            return task;
        }
@@ -271,10 +271,7 @@
        {
            StackerCraneTaskCommandW stackerCraneTaskCommand = new StackerCraneTaskCommandW();
            stackerCraneTaskCommand.Barcode = task.PalletCode;
            stackerCraneTaskCommand.TaskNum = task.TaskNum;
            stackerCraneTaskCommand.WorkType = (short)WorkType.Cargo;
            stackerCraneTaskCommand.TrayType = 0;
            if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//判断是否是入库任务
            {
                List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway);