/// <summary> /// 修改审批类型 /// </summary> /// <param name="sysSetModel"></param> /// <returns></returns> public SavedResult <Int64> PostUpdateProcType(QTSysSetModel sysSetModel) { //先进行判断,审批流数据不能重复 var oldsets = this.QTSysSetFacade.Find(t => t.DicType == "splx" && t.Value == sysSetModel.Value && t.PhId != sysSetModel.PhId).Data; if (oldsets != null && oldsets.Count > 0) { throw new Exception("审批流类型配置不能重复!"); } else { var oldset = this.QTSysSetFacade.Find(t => t.PhId == sysSetModel.PhId).Data; if (oldset != null && oldset.Count > 0) { if (!oldset[0].Value.Equals(sysSetModel.Value)) { var procs = this.GAppvalProcFacade.Find(t => t.SPLXPhid == oldset[0].PhId).Data; if (procs != null && procs.Count > 0) { throw new Exception("此类型下已存在审批流,不能修改审批流类型!"); } } } } return(QTSysSetFacade.PostUpdateProcType(sysSetModel)); }