Administrator
2025-06-12 4b4afa78f556199e5778d5cac88d3d6de6d8c1da
Admin.NET/WCS.Application/PLC/PLCService.cs
@@ -9,6 +9,7 @@
using Furion.Logging;
using IoTClient;
using NewLife.Reflection;
using Newtonsoft.Json;
using Org.BouncyCastle.Ocsp;
using SixLabors.ImageSharp.ColorSpaces;
using WCS.Application.Entity;
@@ -1430,14 +1431,19 @@
            
            if (taskModel.taskType == "DPJRK")
            {
                //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 = new List<object>() {
                        new { type = "SITE", code = modTask.StartLocate },
                        new { type = "PILE_COUNT", code = modTask.Qty }
                    }
                    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 });
            }