/// <summary> /// 如果有加签人,就返回到加签人,如果没有加签人,直接忽略 /// </summary> /// <param name="InstanceStepId"></param> /// <param name="currentUser"></param> private void BackToAdditionalSource(string InstanceStepId, string currentUser) { var instanceStep = WFDA.Instance.GetInstanceStep(InstanceStepId); if (!string.IsNullOrWhiteSpace(instanceStep.Extend04)) { var item = InstanceStepExecutorDAO.Get(instanceStep.Extend04); if (item != null) { var list = InstanceStepExecutorDAO.QueryByExecuteStatus(InstanceStepId, Pub.Unfinished); list.ForEach(a => a.Extend01 = string.Format("{0}", a.Extend01)); if (!list.Any(a => a.Extend01.Contains("签"))) { // 转签加签都完成了 ExecutorImp.InsertOneAndProxy(InstanceStepId, item.ExecutorId, item.ExecutorName, string.Empty, currentUser, true); // 需要返回到加签的来源人 WFDA.Instance.UpdateInstanceStepExt(InstanceStepId, "Extend04", null, currentUser); } } } }
/// <summary> /// 是否隐藏下一步 /// 不管是加签还是转签,加签的用户和转签的用户都要签核完成 /// </summary> /// <param name="InstanceStepId"></param> /// <returns></returns> public bool IsHideNextStep(string InstanceStepId) { var extend04 = WFDA.Instance.GetInstanceStep(InstanceStepId).Extend04; if (!string.IsNullOrWhiteSpace(extend04)) { // 需要返回到加签的来源人,需要隐藏下一步 return(true); } var list = InstanceStepExecutorDAO.QueryByExecuteStatus(InstanceStepId, Pub.Unfinished); list.ForEach(a => a.Extend01 = string.Format("{0}", a.Extend01)); if (list.Count(a => a.Extend01.Contains("签")) >= 2) { return(true); } else { // 默认显示选择下一步的下拉框 return(false); } }