///<summary>
        ///获取详情:
        ///</summary>
        /// <param name="id">数据Id</param>
        /// <returns>数据详情model</returns>
        public Result <ReformRecordView> GetReformRecordModel(long id)
        {
            Result <ReformRecordView> result = new Result <ReformRecordView>();

            try
            {
                ReformRecordView view = new ReformRecordView();
                var model             = DataOperateBusiness <Epm_ReformRecord> .Get().GetModel(id);

                var tzAttachsList = GetFilesByTZTable("Epm_ReformRecord", id).Data;
                if (tzAttachsList != null && tzAttachsList.Any())
                {
                    view.Attachs = tzAttachsList;
                }

                view.ReformRecord = model;
                view.StationIds   = model.StationId.ToString();
                view.CompanyIds   = model.CompanyId.ToString();

                result.Data = view;
                result.Flag = EResultFlag.Success;
            }
            catch (Exception ex)
            {
                result.Data      = null;
                result.Flag      = EResultFlag.Failure;
                result.Exception = new ExceptionEx(ex, "GetReformRecordModel");
            }
            return(result);
        }
        ///<summary>
        ///添加:
        ///</summary>
        /// <param name="model">要添加的model</param>
        /// <returns>受影响的行数</returns>
        public Result <int> AddReformRecord(ReformRecordView model)
        {
            Result <int> result = new Result <int>();

            try
            {
                model.ReformRecord                 = base.SetCurrentUser(model.ReformRecord);
                model.ReformRecord.State           = 0;
                model.ReformRecord.AreaCompanyCode = "10";
                model.ReformRecord.AreaCompanyName = "陕西";
                var rows = DataOperateBusiness <Epm_ReformRecord> .Get().Add(model.ReformRecord);

                if (model.Attachs != null)
                {
                    //新增投资管理附件
                    AddFilesBytzTable(model.ReformRecord, model.Attachs);
                }

                result.Data = rows;
                result.Flag = EResultFlag.Success;
                WriteLog(AdminModule.ReformRecord.GetText(), SystemRight.Add.GetText(), "新增: " + model.ReformRecord.Id);
            }
            catch (Exception ex)
            {
                result.Data      = -1;
                result.Flag      = EResultFlag.Failure;
                result.Exception = new ExceptionEx(ex, "AddReformRecord");
            }
            return(result);
        }
        public ActionResult Add(Epm_ReformRecord model)
        {
            ReformRecordView view = new ReformRecordView();

            view.ReformRecord = model;
            Result <int> result       = new Result <int>();
            string       fileDataJson = Request.Form["fileDataJsonFile"];//获取上传文件json字符串

            if (!string.IsNullOrEmpty(fileDataJson))
            {
                view.Attachs = JsonConvert.DeserializeObject <List <Epm_TzAttachs> >(fileDataJson);//将文件信息json字符
            }

            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddReformRecord(view);
            }
            return(Json(result.ToResultView()));
        }