private void barBtnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (this.gridLookUpEdit.EditValue == null)
            {
                XtraMessageBox.Show("请选择大数据分析模型", "消息");
                return;
            }
            if (groupControlForm.Controls.Count == 0)
            {
                XtraMessageBox.Show("请选择大数据分析模型", "消息");
                return;
            }

            string daID = this.gridLookUpEdit.EditValue.ToString();  //是ookUpEdit.Properties.ValueMember的值
            EmergencyLinkageConfigBusinessModel emergencyLinkageConfigBusinessModel = new EmergencyLinkageConfigBusinessModel();

            emergencyLinkageConfigBusinessModel.AnalysisModelId = daID;
            JC_EmergencyLinkageConfigInfo emergencyLinkageConfigInfo = new JC_EmergencyLinkageConfigInfo();

            if (groupControlForm.Controls.Count > 0)
            {
                //保存联动
                var    graph  = new GraphicOperations();
                string result = graph.DoSaveDrawing(GraphDrawing.Mapobj);

                if (string.IsNullOrWhiteSpace(result))
                {
                    XtraMessageBox.Show("请配置应急联动范围", "消息");
                    return;
                }
                else
                {
                    emergencyLinkageConfigInfo.CreatorId       = UserID;
                    emergencyLinkageConfigInfo.CreatorName     = UserName;
                    emergencyLinkageConfigInfo.Id              = Guid.NewGuid().ToString();
                    emergencyLinkageConfigInfo.AnalysisModelId = daID;
                    emergencyLinkageConfigInfo.Coordinate      = result;
                }
            }
            emergencyLinkageConfigBusinessModel.EmergencyLinkageConfigInfo = emergencyLinkageConfigInfo;
            //保存配置信息
            string error = emergencyLinkageBusiness.AddEmergencyLinkageConfig(emergencyLinkageConfigBusinessModel);

            if (error == "100")
            {
                XtraMessageBox.Show("保存成功", "消息");
                OperateLogHelper.InsertOperateLog(16, "应急联动-更新【" + this.gridLookUpEdit.Text + "】," + string.Format("内容:{0}", JSONHelper.ToJSONString(emergencyLinkageConfigBusinessModel)), "应急联动-更新");
            }
            else
            {
                XtraMessageBox.Show(error, "消息");
            }
        }
        /// <summary>
        /// 新增应急联动
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public string AddEmergencyLinkageConfig(EmergencyLinkageConfigBusinessModel data)
        {
            try
            {
                string error = "";

                //1.删除
                BasicResponse deleteByAnalysisModelIdResult =
                    emergencyLinkageConfigService.DeleteJC_EmergencylinkageconfigByAnalysisModelId(
                        new EmergencyLinkageConfigGetByAnalysisModelIdRequest()
                {
                    AnalysisModelId = data.AnalysisModelId
                }
                        );

                //2.新增
                // 调用接口
                BasicResponse <JC_EmergencyLinkageConfigInfo> analysisTemplateResult =
                    emergencyLinkageConfigService.AddJC_Emergencylinkageconfig(
                        new EmergencyLinkageConfigAddRequest()
                {
                    JC_EmergencyLinkageConfigInfo = data.EmergencyLinkageConfigInfo
                });

                if (analysisTemplateResult.IsSuccess == false)
                {
                    error = analysisTemplateResult.Message;
                }
                else
                {
                    if (analysisTemplateResult.Code != 100)
                    {
                        error = analysisTemplateResult.Message;
                    }
                    else
                    {
                        error = "100";
                    }
                }


                return(error);
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }