From f21906b6464a0e6b42aade6f70127f7b8d6611f3 Mon Sep 17 00:00:00 2001 From: chengsc <11752@DESKTOP-DS49RCP> Date: 星期三, 11 六月 2025 16:56:39 +0800 Subject: [PATCH] 修改任务模板问题 --- Admin.NET/WCS.Application/PLC/PLCService.cs | 41 ++++++++++++++++---- Admin.NET/WCS.Application/Util/HttpService.cs | 3 + Admin.NET/WCS.Application/Model/AGVModel.cs | 2 Admin.NET/WCS.Application/Model/TaskRequest.cs | 5 ++ Admin.NET/WCS.Application/Util/AGVStorageUtil.cs | 10 ++++ 5 files changed, 49 insertions(+), 12 deletions(-) diff --git a/Admin.NET/WCS.Application/Model/AGVModel.cs b/Admin.NET/WCS.Application/Model/AGVModel.cs index 607a0ef..370a320 100644 --- a/Admin.NET/WCS.Application/Model/AGVModel.cs +++ b/Admin.NET/WCS.Application/Model/AGVModel.cs @@ -77,7 +77,7 @@ /// DELIVERY閫佽揣 /// ROTATE鏃嬭浆 /// </summary> - public string code { get; set; } + public object code { get; set; } } public class extra { diff --git a/Admin.NET/WCS.Application/Model/TaskRequest.cs b/Admin.NET/WCS.Application/Model/TaskRequest.cs index c1d5d91..0bb40f0 100644 --- a/Admin.NET/WCS.Application/Model/TaskRequest.cs +++ b/Admin.NET/WCS.Application/Model/TaskRequest.cs @@ -128,6 +128,11 @@ /// </summary> public string LotNo { get; set; } + /// <summary> + /// 鏁伴噺 + /// </summary> + public int? Qty { get; set; } + } /// <summary> diff --git a/Admin.NET/WCS.Application/PLC/PLCService.cs b/Admin.NET/WCS.Application/PLC/PLCService.cs index 7167186..0a6df94 100644 --- a/Admin.NET/WCS.Application/PLC/PLCService.cs +++ b/Admin.NET/WCS.Application/PLC/PLCService.cs @@ -9,6 +9,7 @@ using Furion.Logging; using IoTClient; using NewLife.Reflection; +using Org.BouncyCastle.Ocsp; using SixLabors.ImageSharp.ColorSpaces; using WCS.Application.Entity; using WCS.Application.Util; @@ -1424,11 +1425,28 @@ taskModel.taskType = taskTypeModel; if (jiebo == "") { - taskModel.targetRoute = new List<targetRoute>() + + taskModel.targetRoute = new List<targetRoute>(); + + if (taskModel.taskType == "DPJRK") { - new targetRoute(){seq = 0,type = type1,code = modTask.StartLocate}, - new targetRoute(){seq = 1,type = type2,code = modTask.EndLocate} - }; + taskModel.targetRoute.Add(new targetRoute() { + seq = 0, + type = "MIX_CONDITION", + code = new List<object>() { + new { type = "SITE", code = modTask.StartLocate }, + new { type = "PILE_COUNT", code = modTask.Qty } + } + + }); + taskModel.targetRoute.Add(new targetRoute() { seq = 1, type = type2, code = modTask.EndLocate }); + } + else + { + taskModel.targetRoute.Add(new targetRoute() { seq = 0, type = type1, code = modTask.StartLocate }); + taskModel.targetRoute.Add(new targetRoute() { seq = 1, type = type2, code = modTask.EndLocate }); + } + } else { @@ -1439,14 +1457,19 @@ new targetRoute(){seq = 2,type = type2,code = modTask.EndLocate} }; } - - taskModel.extra = new extra() + + taskModel.extra = new extra(); + + if (taskModel.taskType != "DPJRK") { - carrierInfo = new List<carrierInfo>() + taskModel.extra.carrierInfo = new List<carrierInfo>() { new carrierInfo(){ carrierType = "TP",carrierCode = modTask.PalletNo} - } - }; + }; + } + + + var response = new HttpService().GenAgvSendTask(taskModel).Result; if (response.code == "SUCCESS") { diff --git a/Admin.NET/WCS.Application/Util/AGVStorageUtil.cs b/Admin.NET/WCS.Application/Util/AGVStorageUtil.cs index b594fd6..2177065 100644 --- a/Admin.NET/WCS.Application/Util/AGVStorageUtil.cs +++ b/Admin.NET/WCS.Application/Util/AGVStorageUtil.cs @@ -99,11 +99,16 @@ case "STORAGE" when type2 == "SITE": { taskModle = "FJ"; + if (locate1.AreaNo == "B10") + { + taskModle = "DPJRK"; + } } break; case "SITE" when type2 == "STORAGE": { taskModle = "YCRK"; + } break; case "SITE" when type2 == "SITE": @@ -124,7 +129,10 @@ { taskModle = "YCLSX2"; } - + else if (locate2.AreaNo == "B10") + { + taskModle = "PF-FMR-STACK-NOTIFY-TASK"; + } } break; default: diff --git a/Admin.NET/WCS.Application/Util/HttpService.cs b/Admin.NET/WCS.Application/Util/HttpService.cs index 03cfa9d..0b69ad6 100644 --- a/Admin.NET/WCS.Application/Util/HttpService.cs +++ b/Admin.NET/WCS.Application/Util/HttpService.cs @@ -62,7 +62,8 @@ Status = TaskStatusEnum.Wait, Type = PLCTypeEnum.ConveyorLine, Origin = "WMS", - + + Qty = result.TaskList.Qty, PalletNo = model.PalletNo, TaskNo = result.TaskList.TaskNo, Levels = 999, -- Gitblit v1.8.0