using Learun.DataBase.Repository; using Learun.Util; using System; using System.Collections.Generic; namespace Learun.Application.WorkFlow { /// /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 /// Copyright (c) 2013-2018 北京泉江科技有限公司 /// 创建人:陈彬彬 /// 日 期:2017.04.17 /// 描 述:会签记录操作 /// public class WfConfluenceService : RepositoryFactory { #region 获取数据 /// /// 获取会签记录 /// /// 流程实例主键 /// 节点主键 /// public IEnumerable GetList(string processId, string nodeId) { try { return this.BaseRepository().FindList(t => t.F_ProcessId == processId && t.F_NodeId == nodeId); } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowServiceException(ex); } } } #endregion #region 提交数据 /// /// 保存成功的会前记录 /// /// 实体 public void SaveEntity(WfConfluenceEntity entity) { try { string processId = entity.F_ProcessId; string nodeId = entity.F_NodeId; string formNodeId = entity.F_FormNodeId; WfConfluenceEntity oldEntity = this.BaseRepository().FindEntity(t => t.F_ProcessId == processId && t.F_NodeId == nodeId && t.F_FormNodeId == formNodeId); if (oldEntity == null) { entity.Create(); this.BaseRepository().Insert(entity); } } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowServiceException(ex); } } } /// /// 删除会签节点数据 /// /// 实例主键 /// 节点主键 public void DeleteEntity(string processId, string nodeId) { try { this.BaseRepository().Delete(t => t.F_ProcessId == processId && t.F_NodeId == nodeId); } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowServiceException(ex); } } } #endregion } }