111
cjs
2025-06-19 ad678d0d42f126e5c0d0e2f22f373d9727fb37a5
HH.WCS.Mobox3.NongFuLinZhi/util/Settings.cs
@@ -2,6 +2,7 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using static HH.WCS.Mobox3.NFLZ.util.Settings;
namespace HH.WCS.Mobox3.NFLZ.util
{
@@ -9,6 +10,10 @@
    {
        public static string HostToAgvServerUrl { get; set; }
        public static string HASeverUrl { get; set; }
        public static string ProjectName { get; set; }
        public static string FactoryCode { get; set; }
        public static string FactoryName { get; set; }
        public static string OneSign { get; set; }
        public static string AppKey { get; set; }
        public static string AppSecret { get; set; }
        public static string MoboxSeverUrl { get; set; }
@@ -16,11 +21,14 @@
        public static string SqlServer1 { get; set; }
        public static List<deviceInfo> deviceInfos { get; set; } = new List<deviceInfo>();
        public static List<areaInfo> areaInfos { get; set; } = new List<areaInfo>();
        public static List<Tasktype> Tasktypes { get; set; } = new List<Tasktype>();
        public static List<pPZSJSite> pPZSJSites { get; set; } = new List<pPZSJSite>();
        public static List<thirdPartyUrl> thirdPartyUrls { get; set; } = new List<thirdPartyUrl>();
        public static List<httpApiVerify> httpApiVerifys { get; set; } = new List<httpApiVerify>();
        public static int port { get; set; }
        public static string WHCode { get; set; }
        public static string FacCode { get; set; }
        public static int tcpPort { get; set; }
        public static void Init()
        {
@@ -40,9 +48,9 @@
                            {
                                HostToAgvServerUrl = keyValue.Value.ToString();
                            }
                            if (keyValue.Name == "Tasktype")
                            if (keyValue.Name == "PPZSJSite")
                            {
                                Tasktypes = JsonConvert.DeserializeObject<List<Tasktype>>(keyValue.Value.ToString());
                                pPZSJSites = JsonConvert.DeserializeObject<List<pPZSJSite>>(keyValue.Value.ToString());
                            }
                            if (keyValue.Name == "HASeverUrl")
                            {
@@ -76,6 +84,10 @@
                            {
                                FacCode = keyValue.Value.ToString();
                            }
                            if (keyValue.Name == "TcpPort")
                            {
                                tcpPort = int.Parse(keyValue.Value.ToString());
                            }
                            if (keyValue.Name == "ApiPort")
                            {
                                port = int.Parse(keyValue.Value.ToString());
@@ -87,6 +99,14 @@
                            if (keyValue.Name == "AreaInfo")
                            {
                                areaInfos = JsonConvert.DeserializeObject<List<areaInfo>>(keyValue.Value.ToString());
                            }
                            if (keyValue.Name == "ThirdPartyUrl")
                            {
                                thirdPartyUrls = JsonConvert.DeserializeObject<List<thirdPartyUrl>>(keyValue.Value.ToString());
                            }
                            if (keyValue.Name == "HttpApiVerify")
                            {
                                httpApiVerifys = JsonConvert.DeserializeObject<List<httpApiVerify>>(keyValue.Value.ToString());
                            }
                        }
                    }
@@ -100,15 +120,26 @@
        }
        public class Tasktype
        public class httpApiVerify
        {
            public string StartArea { get; set; }
            public string EndArea { get; set; }
            public string TaskType { get; set; }
            public string VerifyNo { get; set; }
            public string Project { get; set; }
            public string[] Extend { get; set; }
            public int enable { get; set; }
        }
        public class thirdPartyUrl
        {
            public string UrlNo { get; set; }
            public string UrlName { get; set; }
            public string Url { get; set; }
            public int enable { get; set; }
        }
        public class pPZSJSite
        {
            public string siteName { get; set; }
            public string[] site { get; set; }
            public int enable { get; set; }
        }
        public class deviceInfo
        {
            public string address { get; set; }