Admin
2026-01-26 2046dbcbb6e69a2460c2c37ca9e25b7ffe1d1d29
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/Partial/SCExecutionBlock.cs
@@ -51,8 +51,30 @@
                }
                if (shallowLocation.LocationStatus == (int)LocationStatusEnum.Free) return content.OK();
                //判断是否有移库任务
                //判断当前浅货位是否有出库任务
                var OutTask = _taskService.GeOutCuTaskQueue(shallowLocation.LocationCode);
                if (OutTask != null)
                {
                    //进行下发给堆垛机任务
                    WCSginseng outresult = _taskService.SC_IssueTasks(OutTask.TaskId, int.Parse(OutTask.Roadway), OutTask.TaskNum, OutTask.PalletCode, int.Parse(OutTask.PalletType), OutTask.CurrentAddress, OutTask.NextAddress, OutTask.TargetAddress);
                    if (outresult.IsSuccess)
                    {
                        OutTask.TaskStatus = (int)OutTaskStatusEnum.SC_OutExecuting;
                        _taskService.UpdateData(OutTask);
                        return content.OK();
                    }
                    else
                    {
                        UpdateTaskStatus(dt_Task, outresult,0, 1);
                        return content.Error($"下发wcs失败,原因:{outresult.Message}");
                    }
                }
                //判断是否有移库任务
                var TransferTask = _taskService.GeRelocationTaskQueue(shallowLocation.LocationCode);
                if (TransferTask != null)
                {
@@ -66,8 +88,7 @@
                    }
                    else
                    {
                        UpdateTaskStatus(dt_Task, result,
                        successStatus: dt_Task.TaskStatus == (int)InTaskStatusEnum.PLC_InFinish ? (int)InTaskStatusEnum.SC_IntExecuting : (int)OutTaskStatusEnum.SC_OutExecuting, 1);
                        UpdateTaskStatus(dt_Task, result,0,1);  //默认不需要更改状态传0
                        return content.Error($"下发wcs失败,原因:{result.Message}");
                    }
@@ -91,6 +112,8 @@
        }
        public WebResponseContent GenerateTransferTask(string shallowLocation)
        {
            WebResponseContent webResponse = new WebResponseContent();