1
huanghongfeng
2025-06-25 b1c2dd1869a51b8f0e4acb9ddeb148f796db147f
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/genAgvSchedulingTask.cs
@@ -26,11 +26,20 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (input.RequestType == "999")
                {
                    int CZInfotli = _task_CZInfoRepository.QueryData(x => x.CurrentStatue == "3").Count();
                    if (CZInfotli == 0)
                    {
                        return content.Error($"没有自动取轴任务,无自动任务");
                    }
                }
                if (string.IsNullOrEmpty(input.Position)) { return content.Error($"agv任务下发申请目标地址为空!!!请检查"); }
                //查找当前在车轴线末端需要agv搬运的车轴
                List<Dt_CZInfo_mes> CZInfotlist = _task_CZInfoRepository.QueryData(x => x.CurrentStatue == "3" || x.CurrentStatue == "4" || x.CurrentStatue == "5" || x.CurrentStatue == "13");
                List<Dt_CZInfo_mes> CZInfotlist = _task_CZInfoRepository.QueryData(x => x.CurrentStatue == "3" /*|| x.CurrentStatue == "4" || x.CurrentStatue == "5"*/ || x.CurrentStatue == "13");
                if (CZInfotlist.Count >= 2) { return content.Error($"已有agv任务正在进行中,下发失败!!!"); }
@@ -59,7 +68,7 @@
                //agv参数调取
                genAgvSchedulingTask schedulingTask = new genAgvSchedulingTask
                {
                    reqCode = Guid.NewGuid().ToString().Replace("-", ""),
                    reqCode = $"{DateTime.Now:yyyyMMddHHmmss}",
                    clientCode = "WMS",
                    taskTyp = "BY",
                    ctnrTyp = "1",
@@ -108,7 +117,7 @@
            catch (Exception ex)
            {
                LogFactory.GetLog("下发AGV任务").Error(true, ex.Message);
                return content.Error($"请求异常:{ex.Message}");
                return content.Error($"下发任务接口异常:{ex.Message}");
            }
        }
    }