taskResult AjaxGetTaskList(string UserID, string Status, int PageIndex, string MessageBody, string IsAutofresh) { taskResult result = new taskResult(); result.IsSuccess = "1"; EngineServicesBLL bll = new EngineServicesBLL(); MsgParms msgParams = new MsgParms(); msgParams.BeginDate = DateTime.MinValue; msgParams.EndDate = DateTime.MinValue; msgParams.MessageBody = MessageBody; msgParams.PageIndex = PageIndex; msgParams.Status = Status; msgParams.UserID = UserID; msgParams.PageSize = 20;//写死显示20条 msgParams.Top = 20;//写死显示20条 msgParams.LastDay = 30;//参数最近30天,然而并没有什么卵用 if (!string.IsNullOrEmpty(IsAutofresh))//是否自动刷新 { if (IsAutofresh == "0") { result.IsAutofresh = false; } else { result.IsAutofresh = true; } } else { result.IsAutofresh = true; } result.ObjData = bll.PendingTasksParmsPageIndex(msgParams, ref result.IsAutofresh, ref result.HaveNewTask, ref result.rowCount, ref result.pageCount); if(result.ObjData==null) { result.IsSuccess = "0"; } return result; }
public Dictionary<string, T_FLOW_ENGINEMSGLIST> GetPendingTaskPrevNext(MsgParms msgParams) { EngineServicesDAL dal = new EngineServicesDAL(); return dal.GetPendingTaskPrevNext(msgParams.MessageId, msgParams.Status, msgParams.UserID); }
/// <summary> /// 待办任务数据(主节) /// </summary> /// <param name="msgParams"></param> /// <returns></returns> public List<T_FLOW_ENGINEMSGLIST> PendingMainTasksParms(MsgParms msgParams) { EngineServicesDAL dal = new EngineServicesDAL(); try { List<T_FLOW_ENGINEMSGLIST> List = dal.GetEngineMainMsgList(msgParams.UserID, msgParams.Status, msgParams.MessageBody, msgParams.Top, msgParams.LastDay).ToList(); return List; } catch { return null; } }
/// <summary> /// 平台待办分页接口 /// </summary> /// <param name="msgParams"></param> /// <param name="IsAutofresh"></param> /// <param name="HaveNewTask"></param> /// <param name="rowCount"></param> /// <param name="pageCount"></param> /// <returns></returns> public List<T_FLOW_ENGINEMSGLIST> PendingTasksParmsPageIndex(MsgParms msgParams, ref bool IsAutofresh, ref bool HaveNewTask, ref int rowCount, ref int pageCount) { EngineServicesDAL dal = new EngineServicesDAL(); try { HaveNewTask = TaskCache.CurrentUserTaskStatus(msgParams.UserID, true); //Tracer.Debug("获取缓存状态Page:" + HaveNewTask + "||索引页:" + msgParams.PageIndex + "||IsAutofresh:" + IsAutofresh); if (!IsAutofresh)//主动切换 { List<T_FLOW_ENGINEMSGLIST> List = dal.MsgListByPaging(msgParams.PageIndex, msgParams.PageSize, msgParams.UserID, msgParams.Status, msgParams.MessageBody, msgParams.BeginDate, msgParams.EndDate, ref rowCount, ref pageCount); //Tracer.Debug("手动获取缓存状态1:" + HaveNewTask + msgParams.UserID + " RowCount:" + List.Count); return List; } else//如果是自动刷新 { List<T_FLOW_ENGINEMSGLIST> List = new List<T_FLOW_ENGINEMSGLIST>(); if (HaveNewTask)//判断是否有待办任务变更 { List = dal.MsgListByPaging(msgParams.PageIndex, msgParams.PageSize, msgParams.UserID, msgParams.Status, msgParams.MessageBody, msgParams.BeginDate, msgParams.EndDate, ref rowCount, ref pageCount); //Tracer.Debug("自动获取缓存状态2:" + HaveNewTask + msgParams.UserID + " RowCount:" + List.Count); } return List; } } catch { return null; } }
/// <summary> /// 手机版待办任务分页查询 /// </summary> /// <param name="msgParams"></param> /// <param name="rowCount"></param> /// <param name="pageCount"></param> /// <returns></returns> public List<T_FLOW_ENGINEMSGLIST> PendingTasksParmsPageIndexForMobile(MsgParms msgParams, ref int rowCount, ref int pageCount) { EngineServicesDAL dal = new EngineServicesDAL(); try { return dal.MsgListByPagingForMobile(msgParams.PageIndex, msgParams.PageSize, msgParams.UserID, msgParams.Status, msgParams.MessageBody, msgParams.BeginDate, msgParams.EndDate, ref rowCount, ref pageCount); } catch { return null; } }
/// <summary> /// 待办任务主数据(分页) /// </summary> /// <param name="msgParams"></param> /// <returns></returns> public List<T_FLOW_ENGINEMSGLIST> PendingTasksParmsPageIndex(MsgParms msgParams, ref int rowCount, ref int pageCount) { string ss = "测试一:BeginDate:" + msgParams.BeginDate + "||EndDate:" + msgParams.EndDate + "||LastDay:" + msgParams.LastDay; ss += "||MessageBody:" + msgParams.MessageBody + "||MessageId:" + msgParams.MessageId + "||PageIndex:" + msgParams.PageIndex; ss += "||PageSize:" + msgParams.PageSize + "||Status:" + msgParams.Status + "||Top:" + msgParams.Top; ss += "||UserID:" + msgParams.UserID + ""; Record.WriteLogFunction("PendingTasksParmsPageIndex()msgParams:" + ss + "||rowCount:" + rowCount + "||pageCount:" + pageCount + ""); EngineServicesBLL bll = new EngineServicesBLL(); return bll.PendingTasksParmsPageIndex(msgParams, ref rowCount, ref pageCount); }
/// <summary> /// 待办任务主节(门户自动刷新缓存处理) /// </summary> /// <param name="msgParams">参数</param> /// <param name="IsAutofresh">是否自动刷新</param> /// <returns></returns> public List<T_FLOW_ENGINEMSGLIST> PendingMainTasksParms(MsgParms msgParams, ref bool IsAutofresh, ref bool HaveNewTask) { EngineServicesDAL dal = new EngineServicesDAL(); try { HaveNewTask = TaskCache.CurrentUserTaskStatus(msgParams.UserID, false); //Tracer.Debug("获取缓存状态:" + HaveNewTask + "索引页:" + msgParams.PageIndex); if (!IsAutofresh)//主动切换 { List<T_FLOW_ENGINEMSGLIST> List = dal.GetEngineMainMsgList(msgParams.UserID, msgParams.Status, msgParams.MessageBody, msgParams.Top, msgParams.LastDay).ToList(); //Tracer.Debug("手动获取缓存状态3:" + HaveNewTask + msgParams.UserID + " RowCount:" + List.Count); return List; } else//如果是自动刷新 { List<T_FLOW_ENGINEMSGLIST> List = new List<T_FLOW_ENGINEMSGLIST>(); if (HaveNewTask)//判断是否有待办任务变更 { List = dal.GetEngineMainMsgList(msgParams.UserID, msgParams.Status, msgParams.MessageBody, msgParams.Top, msgParams.LastDay).ToList(); //Tracer.Debug("自动获取缓存状态4:" + HaveNewTask + msgParams.UserID + " RowCount:" + List.Count); } return List; } } catch (Exception ex) { return null; } }
/// <summary> /// 手机版待办任务主数据(分页)kangxf /// </summary> /// <param name="msgParams"></param> /// <param name="rowCount"></param> /// <param name="pageCount"></param> /// <returns></returns> public List<T_FLOW_ENGINEMSGLIST> PendingTasksParmsPageIndexForMobile(MsgParms msgParams, ref int rowCount, ref int pageCount) { //Record.WriteLogFunction("PendingTasksParmsPageIndexForMobile()msgParams:" + ss + "rowCount:" + rowCount + "pageCount:" + pageCount + ""); //日志内容:PendingTasksParmsPageIndexForMobile()msgParams:BeginDate:0001-1-1 0:00:00EndDate:0001-1-1 0:00:00LastDay:0MessageBody:MessageId:PageIndex:1PageSize:10000Status:close //Top:0UserID:1bc4b78a-d178-4499-b948-16e18a9d73d3rowCount:0pageCount:0 EngineServicesBLL bll = new EngineServicesBLL(); return bll.PendingTasksParmsPageIndexForMobile(msgParams, ref rowCount, ref pageCount); }
/// <summary> /// 平台待办任务不第一次显示的数据,未分页 kangxf /// </summary> /// <param name="msgParams">msgParams:BeginDate:0001-1-1 0:00:00EndDate:0001-1-1 0:00:00LastDay:0MessageBody:MessageId: /// PageIndex:0PageSize:0Status:CloseTop:20UserID:1bc4b78a-d178-4499-b948-16e18a9d73d3IsAutofresh:TrueHaveNewTask:False</param> /// <param name="IsAutofresh">是否是门户自动刷新</param> /// <returns></returns> public List<T_FLOW_ENGINEMSGLIST> PendingMainTasksParms(MsgParms msgParams, ref bool IsAutofresh, ref bool HaveNewTask) { EngineServicesBLL bll = new EngineServicesBLL(); return bll.PendingMainTasksParms(msgParams, ref IsAutofresh, ref HaveNewTask); }
/// <summary> /// 平台待办任务不第一次显示的数据,未分页 kangxf /// </summary> /// <param name="msgParams"> /// msgParams:BeginDate:0001-1-1 0:00:00EndDate:0001-1-1 0:00:00LastDay:0MessageBody:MessageId:PageIndex:0PageSize:0Status:openTop:20 /// UserID:1bc4b78a-d178-4499-b948-16e18a9d73d3 /// </param> /// <returns></returns> public List<T_FLOW_ENGINEMSGLIST> PendingMainTasksParms(MsgParms msgParams) { EngineServicesBLL bll = new EngineServicesBLL(); return bll.PendingMainTasksParms(msgParams); }
/// <summary> /// 平台待办任务分页数据 kangxf /// </summary> /// <param name="msgParams"></param> /// :BeginDate:0001-1-1 0:00:00||EndDate:0001-1-1 0:00:00||LastDay:0||MessageBody:||MessageId:|| /// PageIndex:1||PageSize:14||Status:open||Top:0||UserID:f1a472dc-d1be-4a06-a52e-a2b296397704||IsAutofresh:True||HaveNewTask:False /// <param name="IsAutofresh"></param> /// <param name="HaveNewTask"></param> /// <param name="rowCount"></param> /// <param name="pageCount"></param> /// <returns></returns> public List<T_FLOW_ENGINEMSGLIST> PendingTasksParmsPageIndex(MsgParms msgParams, ref bool IsAutofresh, ref bool HaveNewTask, ref int rowCount, ref int pageCount) { //string ss = "测试二:BeginDate:" + msgParams.BeginDate + "||EndDate:" + msgParams.EndDate + "||LastDay:" + msgParams.LastDay; //ss += "||MessageBody:" + msgParams.MessageBody + "||MessageId:" + msgParams.MessageId + "||PageIndex:" + msgParams.PageIndex; //ss += "||PageSize:" + msgParams.PageSize + "||Status:" + msgParams.Status + "||Top:" + msgParams.Top; //ss += "||UserID:" + msgParams.UserID + ""; //Record.WriteLogFunction("PendingTasksParmsPageIndex()msgParams:" + ss + "||IsAutofresh:" + IsAutofresh + "||HaveNewTask:" + HaveNewTask + ""); EngineServicesBLL bll = new EngineServicesBLL(); return bll.PendingTasksParmsPageIndex(msgParams, ref IsAutofresh, ref HaveNewTask, ref rowCount, ref pageCount); }
/// <summary> /// 根据MessageId获取上一条、下一条记录 /// </summary> /// <param name="msgParms"></param> /// <returns></returns> public Dictionary<string, T_FLOW_ENGINEMSGLIST> GetPendingTaskPrevNext(MsgParms msgParams) { string ss = "BeginDate:" + msgParams.BeginDate + "EndDate:" + msgParams.EndDate + "LastDay:" + msgParams.LastDay; ss += "MessageBody:" + msgParams.MessageBody + "MessageId:" + msgParams.MessageId + "PageIndex:" + msgParams.PageIndex; ss += "PageSize:" + msgParams.PageSize + "Status:" + msgParams.Status + "Top:" + msgParams.Top; ss += "UserID:" + msgParams.UserID + ""; Record.WriteLogFunction("GetPendingTaskPrevNext()msgParams:" + ss + ""); EngineServicesBLL bll = new EngineServicesBLL(); return bll.GetPendingTaskPrevNext(msgParams); }