/// <summary>
        /// 更新网络模块定义信息(只更新定义相关字段)
        /// </summary>
        /// <param name="item"></param>
        private void UpdateNetworkModuleCacheByProperty(Jc_MacInfo item)
        {
            Dictionary <string, object> paramater = new Dictionary <string, object>();

            paramater.Add("IP", item.IP);
            paramater.Add("Wzid", item.Wzid);
            paramater.Add("Wz", item.Wz);
            paramater.Add("Istmcs", item.Istmcs);
            paramater.Add("Type", item.Type);
            paramater.Add("Bz1", item.Bz1);
            paramater.Add("Bz2", item.Bz2);
            paramater.Add("Bz3", item.Bz3);
            paramater.Add("Bz4", item.Bz4);
            paramater.Add("Bz5", item.Bz5);
            paramater.Add("Bz6", item.Bz6);
            paramater.Add("Upflag", item.Upflag);

            paramater.Add("IsMemoryData", item.IsMemoryData);//是否内存数据标记

            //修改标记
            paramater.Add("InfoState", item.InfoState);

            NetworkModuleCacheUpdatePropertiesRequest networkModuleCacheUpdatePropertiesRequest = new NetworkModuleCacheUpdatePropertiesRequest();

            networkModuleCacheUpdatePropertiesRequest.Mac         = item.MAC;
            networkModuleCacheUpdatePropertiesRequest.UpdateItems = paramater;
            _NetworkModuleCacheService.UpdateNetworkInfo(networkModuleCacheUpdatePropertiesRequest);
        }
Exemple #2
0
        /// <summary>
        /// 更新网络模块指定字段值
        /// </summary>
        /// <param name="mac"></param>
        /// <param name="updateItems"></param>
        public static void UpdateNetworkModeuleCacheByPropertys(string mac, Dictionary <string, object> updateItems)
        {
            NetworkModuleCacheUpdatePropertiesRequest networkModuleCacheUpdatePropertiesRequest = new NetworkModuleCacheUpdatePropertiesRequest();

            networkModuleCacheUpdatePropertiesRequest.Mac         = mac;
            networkModuleCacheUpdatePropertiesRequest.UpdateItems = updateItems;
            networkModuleCacheService.UpdateNetworkInfo(networkModuleCacheUpdatePropertiesRequest);
        }
Exemple #3
0
 public static void UpdateNetWorkInfoByProperties(string pointID, Dictionary <string, object> paramater)
 {
     try
     {
         NetworkModuleCacheUpdatePropertiesRequest pointDefineCacheRequest = new NetworkModuleCacheUpdatePropertiesRequest();
         pointDefineCacheRequest.Mac         = pointID;
         pointDefineCacheRequest.UpdateItems = paramater;
         networkModuleService.UpdateNetworkInfo(pointDefineCacheRequest);
     }
     catch (Exception ex)
     {
         LogHelper.Error("ElectricityStatistics-UpdateNetWorkInfoByProperties Error【Mac = " + pointID + "】" + ex.Message);
     }
 }