/// <summary> /// 删除审批类型 /// </summary> /// <param name="proc_phid">审批类型id</param> /// <returns></returns> public DeletedResult PostDeleteProcType(long proc_phid) { if (proc_phid == 0) { return(null); } IList <GAppvalProcModel> procModels = GAppvalProcFacade.Find(t => t.SPLXPhid == proc_phid).Data; //批量删除审批流程 GAppvalProcFacade.DeleteAppvalProc(procModels); DeletedResult deletedResult = QTSysSetFacade.Delete(proc_phid); return(deletedResult); }
/// <summary> /// 批量删除审批类型 /// </summary> /// <param name="ids">审批类型id集合</param> /// <returns></returns> public DeletedResult PostDeleteProcTypes(List <long> ids) { if (ids == null || ids.Count == 0) { return(null); } foreach (long proc_phid in ids) { IList <GAppvalProcModel> procModels = GAppvalProcFacade.Find(t => t.SPLXPhid == proc_phid).Data; //批量删除审批流程 GAppvalProcFacade.DeleteAppvalProc(procModels); } Dictionary <string, object> dicWhere = new Dictionary <string, object>(); new CreateCriteria(dicWhere) .Add(ORMRestrictions <List <long> > .In("PhId", ids)); DeletedResult deletedResult = QTSysSetFacade.Delete(dicWhere); return(deletedResult); }
/// <summary> /// 查找审批流程 /// </summary> /// <param name="phid">审批流程phid</param> /// <returns></returns> public GAppvalProcModel FindSingle(long phid) { return(GAppvalProcFacade.Find(phid).Data); }