/// <summary> /// 获取代办列表 /// </summary> /// <param name="loginName"></param> /// <param name="user"></param> public static List <TodoEntity> GetTodoList(string loginName, UserInfo user) { List <TodoEntity> list = new List <TodoEntity>(); string auditorStr = ""; SecurityBll.LogIn(loginName, user); if (user != null && user.Roles != null && user.inn != null) { List <PrManageModel> prList = GetPrTodoList(user); List <ExpenseReimbursementModel> erList = GetErTodoList(user); List <TripReimbursementModel> trList = GetTrTodoList(user); if (prList != null && prList.Count > 0) { foreach (var item in prList) { TodoEntity entity = new TodoEntity(); entity.RecordName = "PR单" + "(" + item.b_PrRecordNo + ")"; entity.Applicant = item.b_Applicant; entity.FlowStatus = item.status; entity.ApplicationDate = item.nb_RaisedDate.ToString("yyyy-MM-dd"); entity.AuditorStr = ActivityDA.GetActivityOperator(user.inn, item.activityId); entity.LinkStr = "https://oa.bordrin.com/PrManage"; list.Add(entity); } } if (erList != null && erList.Count > 0) { foreach (var item in erList) { TodoEntity entity = new TodoEntity(); entity.RecordName = "费用报销单" + "(" + item.b_RecordNo + ")"; entity.Applicant = item.b_Employee; entity.FlowStatus = item.status; entity.ApplicationDate = item.nb_ApplicationDate.GetValueOrDefault().ToString("yyyy-MM-dd"); entity.AuditorStr = ActivityDA.GetActivityOperator(user.inn, item.activityId); entity.LinkStr = "https://oa.bordrin.com/ExpenseReimbursement"; list.Add(entity); } } if (trList != null && trList.Count > 0) { foreach (var item in trList) { TodoEntity entity = new TodoEntity(); entity.RecordName = "差旅报销单" + "(" + item.b_RecordNo + ")"; entity.Applicant = item.b_Employee; entity.FlowStatus = item.status; entity.ApplicationDate = item.nb_ApplicationDate.GetValueOrDefault().ToString("yyyy-MM-dd"); entity.AuditorStr = ActivityDA.GetActivityOperator(user.inn, item.activityId); entity.LinkStr = "https://oa.bordrin.com/TripReimbursement"; list.Add(entity); } } } return(list); }