Exemple #1
0
        /// <summary>
        /// 批量更新属性
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public BasicResponse BatchUpdatePointDefineInfo(DefineCacheBatchUpdatePropertiesRequest request)
        {
            BatchUpdatePropertiesRequest UpdatePointDefineCacheRequest = new BatchUpdatePropertiesRequest();

            UpdatePointDefineCacheRequest.PointItems = request.PointItems;
            return(_b_DefCacheService.BatchUpdateInfo(UpdatePointDefineCacheRequest));
        }
        private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            try
            {
                int     rowhandle = gridView1.FocusedRowHandle;
                DataRow dr        = gridView1.GetDataRow(rowhandle);
                PointDefineGetByPointRequest PointDefineRequest = new PointDefineGetByPointRequest();
                PointDefineRequest.Point = dr["Point"].ToString().Substring(0, 3) + "0000";
                Jc_DefInfo def = pointDefineService.GetPointDefineCacheByPoint(PointDefineRequest).Data;
                Dictionary <string, Dictionary <string, object> > PointItemsList = new Dictionary <string, Dictionary <string, object> >();
                Dictionary <string, object> PointItems = new Dictionary <string, object>();
                PointItems.Add("DefIsInit", true);
                PointItemsList.Add(def.PointID, PointItems);

                //调用服务端批量更新缓存业务来更新,修改为更新定义保存之后的是否发初始化标记,并保存巡检调用驱动预处理发初始化  20170720
                DefineCacheBatchUpdatePropertiesRequest PointDefineUpdateRequest = new DefineCacheBatchUpdatePropertiesRequest();
                PointDefineUpdateRequest.PointItems = PointItemsList;
                pointDefineService.BatchUpdatePointDefineInfo(PointDefineUpdateRequest);

                _ConfigService.SaveInspection();//保存巡检
            }
            catch (Exception ex)
            {
                Basic.Framework.Logging.LogHelper.Error(ex);
            }
        }
        public static void UpdateJC_defByProperties(Dictionary <string, Dictionary <string, object> > updateItems)
        {
            DefineCacheBatchUpdatePropertiesRequest request = new DefineCacheBatchUpdatePropertiesRequest();

            request.PointItems = updateItems;
            pointDefineService.BatchUpdatePointDefineInfo(request);
        }
        /// <summary>
        /// 批量更新测点缓存字段
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public BasicResponse BatchUpdatePointDefineInfo(DefineCacheBatchUpdatePropertiesRequest request)
        {
            //added by  20170719
            Dictionary <string, Dictionary <string, object> > dic = new Dictionary <string, Dictionary <string, object> >();

            PointWriteCache.GetInstance.BatchUpdatePointInfo(request.PointItems);

            return(new BasicResponse());
        }
 public BasicResponse BatchUpdatePointDefineInfo(DefineCacheBatchUpdatePropertiesRequest request)
 {
     return(_PointDefineService.BatchUpdatePointDefineInfo(request));
 }
Exemple #6
0
        public BasicResponse BatchUpdatePointDefineInfo(DefineCacheBatchUpdatePropertiesRequest request)
        {
            var responseStr = HttpClientHelper.Post(Webapi + "/v1/PersonPointDefine/BatchUpdatePointDefineInfo?token=" + Token, JSONHelper.ToJSONString(request));

            return(JSONHelper.ParseJSONString <BasicResponse>(responseStr));
        }