From e883d7e4bf057f7a2ed7cc001fe27083d82baa22 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 16 四月 2024 19:17:44 +0800 Subject: [PATCH] 优化NG下料位任务触发逻辑 --- 代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs" index 8680c72..863e064 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/RestockHCJ.cs" @@ -9,12 +9,14 @@ using WIDESEA_Core.BaseProvider; using WIDESEA_Core.EFDbContext; using WIDESEA_Entity.DomainModels; +using WIDESEA_Entity.ToAGV; using WIDESEA_WCS.IRepositories; using WIDESEA_WCS.Repositories; using WIDESEA_WCS.WCSClient; using WIDESEA_WMS.IRepositories; using WIDESEA_WMS.IServices; using WIDESEA_WMS.Repositories; +using static FreeSql.Internal.GlobalFilter; namespace WIDESEA_WCS.JobsPart.Common { @@ -100,6 +102,27 @@ #endregion } } + else if (task.agv_tasktype == "TaskType_OutsourceInbound")//涓嬫枡鍘诲鍗忓彛 + { + if (task.agv_toaddress == "") + { + var TargetLocation = StationTask.GetEmptyLocation(stationinfoRepository); + if (TargetLocation != null) + { + if (agvtaskService.Find(x => x.agv_toaddress == TargetLocation.stationCode).Any()) continue; + var stationinfo = stationinfoRepository.Find(x => x.stationCode == task.agv_fromaddress).FirstOrDefault(); + task.agv_taskstate = "Create"; + task.agv_toaddress = TargetLocation.stationCode; + TargetLocation.location_state = LocationStateEnum.InBusy.ToString(); + TargetLocation.billetID = stationinfo.billetID; + TargetLocation.stationType = task.agv_materielid; + TargetLocation.heatNumber = stationinfo.heatNumber; + TargetLocation.Number = task.jobID; + stationinfoRepository.Update(TargetLocation, true); + agvtaskService.Update(task, true); + } + } + } else if (task.agv_tasktype == "TaskType_OutsourceOutbound" || task.agv_tasktype == "TaskType_Outbound")//澶栧崗搴撳嚭搴�/AB搴撳嚭搴� { if (task.agv_toaddress == "") -- Gitblit v1.9.3