Exemplo n.º 1
0
        public async Task <List <OrderPrintIssueEntity> > GetList(OrderPrintIssueListParam param)
        {
            var expression = ListFilter(param);
            var list       = await this.BaseRepository().FindList(expression);

            return(list.ToList());
        }
Exemplo n.º 2
0
        private Expression <Func <OrderPrintIssueEntity, bool> > ListFilter(OrderPrintIssueListParam param)
        {
            var expression = LinqExtensions.True <OrderPrintIssueEntity>();

            if (param != null)
            {
            }
            return(expression);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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>());
        }
Exemplo n.º 6
0
        /// <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));
        }