wei
2021-09-23 4f2dbd1f6a1ec2d9c3c39b4a37b0b7c9ddece4aa
HDL_ON/Entity/FunctionList.cs
@@ -5,6 +5,7 @@
using HDL_ON.Common;
using HDL_ON.DAL;
using HDL_ON.DAL.Server;
using HDL_ON.DriverLayer;
using Shared;
namespace HDL_ON.Entity
@@ -127,7 +128,7 @@
        /// </summary>
        public List<Function> GetEnvirSensorsList()
        {
            var spkList = SPK.EnvironSpkList();
            var spkList = SPK.EnvironDeviceSpkList();
            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
        }
        /// <summary>
@@ -174,6 +175,7 @@
        /// </summary>
        public List<SecurityAlarm> securities = new List<SecurityAlarm>();
        /// <summary>
        /// 加载功能列表
        /// </summary>
@@ -184,7 +186,6 @@
        /// <para>false:直接无条件添加</para></param>
        public void IniFunctionList(string filePath, bool checkRepeat = false)
        {
            MainPage.Log("初始化功能数据");
            // todo 增加设备,增加功能进功能列表
            if (filePath.StartsWith("FunctionData_"))
            {
@@ -433,6 +434,17 @@
                            //        break;
                            //}
                        }
                        if(DB_ResidenceData.Instance.GatewayType == 1)
                        {
                            Dictionary<string, string> pairs = new Dictionary<string, string>();
                            string sendId = Control.Ins.msg_id.ToString();
                            pairs.Add("id", sendId);
                            pairs.Add("time_stamp", Utlis.GetTimestamp());
                            var readSecurityStatusJson = Newtonsoft.Json.JsonConvert.SerializeObject(pairs);
                            var sendBytes = Control.Ins.ConvertSendBodyData(CommunicationTopic.ct.ReadSecurityStatus, readSecurityStatusJson);
                            MainPage.Log($"本地通讯 读取安防状态:{readSecurityStatusJson}");
                            new Control_Udp().SendLocalHdlLinkData(sendBytes, sendId);
                        }
                    }
                    else
                    {