public async Task <List <OrderPrintIssueEntity> > GetList(OrderPrintIssueListParam param) { var expression = ListFilter(param); var list = await this.BaseRepository().FindList(expression); return(list.ToList()); }
private Expression <Func <OrderPrintIssueEntity, bool> > ListFilter(OrderPrintIssueListParam param) { var expression = LinqExtensions.True <OrderPrintIssueEntity>(); if (param != null) { } return(expression); }
public async Task <TData <List <OrderPrintIssueEntity> > > GetPageList(OrderPrintIssueListParam param, Pagination pagination) { TData <List <OrderPrintIssueEntity> > obj = new TData <List <OrderPrintIssueEntity> >(); obj.Data = await orderPrintIssueService.GetPageList(param, pagination); obj.Total = pagination.TotalCount; obj.Tag = 1; return(obj); }
public async Task <TData <List <OrderPrintIssueEntity> > > GetList(OrderPrintIssueListParam param) { TData <List <OrderPrintIssueEntity> > obj = new TData <List <OrderPrintIssueEntity> >(); obj.Data = await orderPrintIssueService.GetList(param); obj.Total = obj.Data.Count; obj.Tag = 1; return(obj); }
public async Task <List <OrderPrintIssueEntity> > GetPageList(OrderPrintIssueListParam param, Pagination pagination) { /* * var expression = ListFilter(param); * var list= await this.BaseRepository().FindList(expression, pagination); * return list.ToList(); */ StringBuilder sql = CreateListSql(param); var data = await this.BaseRepository().FindList <OrderPrintIssueEntity>(sql.ToString(), pagination); return(data.list.ToList <OrderPrintIssueEntity>()); }
/// <summary> /// 创建查询sql /// </summary> /// <param name="param">查询条件数据</param> /// <returns></returns> private StringBuilder CreateListSql(OrderPrintIssueListParam param) { StringBuilder sql = new StringBuilder(); sql.AppendFormat(" SELECT a.*"); sql.AppendFormat(" ,b.RealName AS BaseCreatorTxt"); sql.AppendFormat(" from ("); sql.AppendFormat(" SELECT * FROM order_print_issue "); sql.AppendFormat(" where 1=1 "); if (param != null) { if (!string.IsNullOrEmpty(param.CustName)) { sql.AppendFormat(" AND CustName LIKE '%{0}%'", param.CustName); } if (!string.IsNullOrEmpty(param.LinkName)) { sql.AppendFormat(" AND LinkName LIKE '%{0}%'", param.LinkName); } if (!string.IsNullOrEmpty(param.LinkPhone)) { sql.AppendFormat(" AND LinkPhone LIKE '%{0}%'", param.LinkPhone); } if (!string.IsNullOrEmpty(param.StartTime)) { sql.AppendFormat(" AND BaseCreateTime >'{0} 00:00:00'", param.StartTime); } if (!string.IsNullOrEmpty(param.EndTime)) { sql.AppendFormat(" AND BaseCreateTime <'{0} 23:59:59'", param.EndTime); } } sql.AppendFormat(" ) a "); sql.AppendFormat(" JOIN "); sql.AppendFormat(" ( "); sql.AppendFormat(" SELECT Id,RealName from sysuser "); sql.AppendFormat(" WHERE 1=1 "); sql.AppendFormat(" ) b"); sql.AppendFormat(" on a.BaseCreatorId = b.Id "); return(sql); }
public async Task <ActionResult> GetPageListJson(OrderPrintIssueListParam param, Pagination pagination) { TData <List <OrderPrintIssueEntity> > obj = await orderPrintIssueBLL.GetPageList(param, pagination); return(Json(obj)); }