/// <summary> /// </summary> public List <OverWork> GetConfirmOverWorkByNextOperatorID(int accountID) { List <OverWork> OverWorkList = _OverWorkDal.GetNeedConfirmOverWork(); List <OverWork> returnlist = new List <OverWork>(); foreach (OverWork application in OverWorkList) { bool error = false; foreach (OverWorkItem item in application.Item) { Account nextOperator = _OverWorkDiyProcessUtility.GetNextOperator(application.DiyProcess, item, application.Account.Id); if (nextOperator == null || nextOperator.AccountType == VisibleType.None) { if (item.OverWorkFlow[item.OverWorkFlow.Count - 1].Step != -1) { _OverWorkDal.UpdateOverWorkItemStatusByItemID(item.ItemID, RequestUtility.MakeDisAggree( item.Status)); error = true; continue; } } else if (accountID == nextOperator.Id) { returnlist.Add(application); break; } } if (error) { new OverWorkMail().SendErrorMail(application.PKID); } } AccountDetail(returnlist); return(returnlist); }