From 4c7f2d26fd6041d32f4e291559bc443671493246 Mon Sep 17 00:00:00 2001
From: chengsc <11752@DESKTOP-DS49RCP>
Date: 星期四, 19 六月 2025 16:52:45 +0800
Subject: [PATCH] 修改问题
---
Admin.NET/WCS.Application/PLC/PLCService.cs | 47 ++++++++++++++++++++++++++++++++++++++---------
1 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/Admin.NET/WCS.Application/PLC/PLCService.cs b/Admin.NET/WCS.Application/PLC/PLCService.cs
index 7167186..0177093 100644
--- a/Admin.NET/WCS.Application/PLC/PLCService.cs
+++ b/Admin.NET/WCS.Application/PLC/PLCService.cs
@@ -9,6 +9,8 @@
using Furion.Logging;
using IoTClient;
using NewLife.Reflection;
+using Newtonsoft.Json;
+using Org.BouncyCastle.Ocsp;
using SixLabors.ImageSharp.ColorSpaces;
using WCS.Application.Entity;
using WCS.Application.Util;
@@ -1424,11 +1426,33 @@
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}
- };
+ //var code = "[{\"type\":\"SITE\",\"code\":\"B100101\"},{\"type\":\"PILE_COUNT\",\"code\":\"8\"}]";
+ var code = new List<object>()
+ {
+ new {type = "SITE" , code = modTask.StartLocate},
+ new { type = "PILE_COUNT", code = modTask.Qty }
+ };
+
+ taskModel.targetRoute.Add(new targetRoute() {
+ seq = 0,
+ type = "MIX_CONDITION",
+ code = JsonConvert.SerializeObject(code) // "[{\"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 +1463,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")
{
--
Gitblit v1.8.0