/// <summary> /// 检索数据 /// </summary> /// <param name="filter"></param> /// <param name="responseEntity"></param> public void SearchData(EveryDueRepayReportSearchFilter filter, ResponseEntity responseEntity) { if (filter == null) { ServiceUtility.SetResponseStatus(responseEntity, EnumResponseState.RequestCommandError); return; } var reportDetailList = Singleton <EveryDueRepayReportSearchDAL <EveryDueRepayDetailReportViewData> > .Instance.SearchData(filter); if (reportDetailList == null || reportDetailList.Count == 0) { ServiceUtility.SetResponseStatus(responseEntity, EnumResponseState.NoResult); m_Logger.Info("未查询到数据!。"); } else { ConvertUtil.ConvertEveryDueRepayDetailReportViewData(reportDetailList); IDictionary <string, object> outPutParam = filter.outParams; int totalCount = 0; if (!int.TryParse(outPutParam["@TotalCount"].ToString(), out totalCount)) { totalCount = reportDetailList.Count; } reportDetailList.ForEach(x => x.TotalCount = totalCount); var responseResult = new ResponseListResult <EveryDueRepayDetailReportViewData>(); responseResult.TotalCount = totalCount; responseResult.LstResult = reportDetailList; ServiceUtility.SetResponseStatus(responseEntity, EnumResponseState.Success); responseEntity.Results = responseResult; } }
/// <summary> /// 检索数据 /// </summary> /// <param name="baseFilter"></param> /// <param name="responseEntity"></param> public void SearchData(EveryDueRepayReportSearchFilter baseFilter, ResponseEntity responseEntity) { if (baseFilter == null) { ServiceUtility.SetResponseStatus(responseEntity, EnumResponseState.RequestCommandError); return; } var reportDetailList = Singleton <EveryDueRepayReportSearchDAL <EveryDueRepayDetailReportViewData> > .Instance.SearchData(baseFilter); if (reportDetailList == null || reportDetailList.Count == 0) { ServiceUtility.SetResponseStatus(responseEntity, EnumResponseState.NoResult); m_Logger.Info("未查询到数据!。"); } else { ConvertUtil.ConvertEveryDueRepayDetailReportViewData(reportDetailList); // 设置输出文件 SetExportFile(baseFilter, reportDetailList, responseEntity); } }