public ResponseViewModel OperOrgJob(TreePostData postData)
        {
            Guard.Against.Null(postData, nameof(postData));
            ResponseViewModel vm = new ResponseViewModel();

            if (postData.Operation == TreeNodeOper.DELETE_NODE)
            {
                vm.success = _dbContext.Delete <OrgJob>(postData.Id);
            }
            else if (postData.Operation == TreeNodeOper.CREATE_NODE)
            {
                string pid       = postData.Id;
                var    parentJob = _dbContext.Get <OrgJob>(pid);
                OrgJob job       = new OrgJob()
                {
                    Pid       = postData.Id,
                    JobName   = postData.Text,
                    TreeLevel = parentJob == null ? 1 : parentJob.TreeLevel + 1,
                    IsFinal   = parentJob == null ? 0 : 1,
                    FullName  = parentJob == null?postData.Text:$"{parentJob.FullName}/{postData.Text}"
                };
                if (parentJob != null)
                {
                    parentJob.IsFinal = 0;
                    _dbContext.Update(parentJob);
                }
                _dbContext.Insert(job);
                vm.success = true;
                vm.data    = job.Fid;
            }
            else if (postData.Operation == TreeNodeOper.RENAME_NODE)
            {
                var job = _dbContext.Get <OrgJob>(postData.Id);
                job.FullName = job.FullName.Replace(job.JobName, postData.Text);
                job.JobName  = postData.Text;
                vm.success   = _dbContext.Update(job);
            }
            else if (postData.Operation == "move_node")
            {
                var job = _dbContext.Get <OrgJob>(postData.Id);
                job.Pid = postData.Parent;
                var parentJob = _dbContext.Get <OrgJob>(postData.Parent);
                job.FullName  = parentJob == null ? postData.Text : $"{parentJob.FullName}/{postData.Text}";
                job.TreeLevel = parentJob == null ? 1 : parentJob.TreeLevel + 1;
                job.IsFinal   = parentJob == null ? 0 : job.IsFinal;
                if (parentJob != null)
                {
                    parentJob.IsFinal = 0;
                    _dbContext.Update(parentJob);
                }
                vm.success = _dbContext.Update(job);
            }
            else if (postData.Operation == TreeNodeOper.COPY_NODE)
            {
                throw new NotImplementedException();
            }
            return(vm);
        }
        public override void BeforeDynamicObjectUpdate(FapDynamicObject fapDynamicData)
        {
            string fid    = fapDynamicData.Get("Fid").ToString();
            OrgJob orgJob = _dbContext.Get <OrgJob>(fid);
            string pid    = fapDynamicData.Get("Pid").ToString();

            //父部门没变化
            if (pid != orgJob.Pid)
            {
                HandleJob(fapDynamicData);
            }
        }