/// <summary> /// 查询回复列表 /// </summary> /// <param name="filter"></param> /// <returns></returns> public static QueryResult <SubjectReplyEntity> SearchReplyPageList(QF_Subject filter) { var cmd = new DataCommand("Subject.SearchReplyPageList"); cmd.SetParameter("@Id", DbType.Int32, filter.SubjectId); return(cmd.Query <SubjectReplyEntity>(filter, "id ASC", null, true)); }
private static void SetCondition(DataCommand command, QF_Subject filter, string type) { if (!string.IsNullOrEmpty(filter.Keyword)) { command.ReplaceAndSetSQLTag("TagFilterKeyword", filter.Keyword); command.ReplaceSQLTag("TagFilterKeyword", string.Empty); } else { command.ReplaceSQLTag("TagFilterKeyword", string.Empty); } command.QuerySetCondition("ts.create_time", ConditionOperation.MoreThanEqual, DbType.DateTime, filter.StartTime); if (filter.EndTime.HasValue) { command.QuerySetCondition("ts.create_time", ConditionOperation.LessThan, DbType.DateTime, filter.EndTime.Value.AddDays(1)); } command.QuerySetCondition("tc.id", ConditionOperation.Equal, DbType.Int32, filter.CatId); command.QuerySetCondition("ts.department_id", ConditionOperation.Equal, DbType.Int32, filter.DepartmentId); command.QuerySetCondition("ts.is_delete", ConditionOperation.Equal, DbType.Int32, DeletedEnums.Actived); if (type == "Search") { command.QuerySetCondition("d.name", ConditionOperation.Like, DbType.String, filter.VendorName); } else { command.QuerySetCondition("vn.name", ConditionOperation.Like, DbType.String, filter.VendorName); } command.CommandText = command.CommandText.Replace("#STRWHERE#", command.QueryConditionString); }
/// <summary> /// 查询主题导出列表 /// </summary> /// <param name="filter"></param> /// <returns></returns> public static List <SearchExportVO> SearchExportList(QF_Subject filter) { var cmd = new DataCommand("Subject.SearchExportList"); SetCondition(cmd, filter, "Export"); return(cmd.ExecuteEntityList <SearchExportVO>()); }
/// <summary> /// 查询主题导出列表 /// </summary> /// <param name="filter"></param> /// <returns></returns> public static List <SearchExportAvgVO> SearchExportAvg(QF_Subject filter) { var cmd = new DataCommand("Subject.SearchExportAvg"); cmd.SetParameter("@startTime", DbType.String, filter.StartTime?.ToString("yyyy-MM-dd")); cmd.SetParameter("@endTime", DbType.String, filter.EndTime?.ToString("yyyy-MM-dd")); return(cmd.ExecuteEntityList <SearchExportAvgVO>()); }
/// <summary> /// 查询主题列表 /// </summary> /// <param name="filter"></param> /// <returns></returns> public static QueryResult <SubjectVO> SearchPageList(QF_Subject filter) { var cmd = new DataCommand("Subject.SearchPageList"); cmd.SetParameter("@keyWords", DbType.String, filter.Keyword + ""); cmd.SetParameter("@beginDate", DbType.DateTime, filter.StartTime.HasValue ? filter.StartTime.Value.ToString("yyyy-MM-dd") : null); cmd.SetParameter("@endDate", DbType.DateTime, filter.EndTime.HasValue ? filter.EndTime.Value.ToString("yyyy-MM-dd") : null); //cmd.SetParameter("@beginDate", DbType.DateTime, filter.StartTime); //cmd.SetParameter("@endDate", DbType.DateTime, filter.EndTime); cmd.SetParameter("@catId", DbType.Int32, filter.CatId); cmd.SetParameter("@departmentId", DbType.Int32, filter.DepartmentId); cmd.SetParameter("@vendorName", DbType.String, filter.VendorName); //cmd.SetParameter("@StartNum", DbType.Int32, filter.sta); //cmd.SetParameter("@PageSize", DbType.Int32, id); //SetCondition(cmd, filter, "Search"); var result = cmd.Query <SubjectVO>(filter, "MaxCommentTime DESC, CreateTime DESC", null, true); return(result); }
/// <summary> /// 查询主题导出列表 /// </summary> /// <param name="filter"></param> /// <returns></returns> public List <SearchExportVO> SearchExportList(QF_Subject filter) { return(SubjectDA.SearchExportList(filter)); }
/// <summary> /// 查询回复列表 /// </summary> /// <param name="filter"></param> /// <returns></returns> public static QueryResult <SubjectReplyEntity> SearchReplyPageList(QF_Subject filter) { return(SubjectDA.SearchReplyPageList(filter)); }
/// <summary> /// 查询主题列表 /// </summary> /// <param name="filter"></param> /// <returns></returns> public QueryResult <SubjectVO> SearchPageList(QF_Subject filter) { return(SubjectDA.SearchPageList(filter)); }
/// <summary> /// 查询主题导出列表 /// </summary> /// <param name="filter"></param> /// <returns></returns> public List <SearchExportAvgVO> SearchExportAvg(QF_Subject filter) { return(SubjectDA.SearchExportAvg(filter)); }
public JsonResult Query() { QF_Subject filter = BuildQueryFilterEntity <QF_Subject>(); return(AjaxGridJson(SubjectBasisService.SearchPageList(filter))); }