| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using SqlSugar; |
| | | using ZTICInterface.Application; |
| | | using ZTICInterface.Application.Service; |
| | | using ZTICInterface.Core.Entity; |
| | | using ZTICInterface.Core.Extend; |
| | | using ZTICInterface.Core.Method; |
| | | |
| | | namespace ZTICInterface.Application.App; |
| | | |
| | |
| | | /// </summary> |
| | | public class IndustryPolicyApp:IDynamicApiController |
| | | { |
| | | private readonly Repository<IndustryPolicy> _industryPolicyService; |
| | | public IndustryPolicyApp(Repository<IndustryPolicy> industryPolicyService) |
| | | private readonly IndustryPolicyService _industryPolicyService; |
| | | public IndustryPolicyApp(IndustryPolicyService industryPolicyService) |
| | | { |
| | | _industryPolicyService = industryPolicyService; |
| | | } |
| | |
| | | return await _industryPolicyService.GetPagesAsync(pageIndex, pageSize,null,a=>a.PublishDate,OrderByType.Desc); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 高级查询分页 |
| | | /// </summary> |
| | | /// <param name="param"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<Page<IndustryPolicy>> GetPages([FromBody] PageSearchParam param) |
| | | { |
| | | var where = param.ColCondition.ToIConditionalModels(); |
| | | return await _industryPolicyService.GetPagesByConditionalAsync(param.PageIndex, param.PageSize, where, a => a.PublishDate, OrderByType.Desc); |
| | | } |
| | | } |
| | |
| | | return res; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分页 |
| | | /// </summary> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页 |
| | | /// </summary> |
| | | /// <param name="parm">分页参数</param> |
| | | /// <param name="where">条件</param> |
| | | /// <param name="order">排序值</param> |
| | | /// <param name="orderEnum">排序方式OrderByType</param> |
| | | /// <returns></returns> |
| | | public async Task<Page<T>> GetPagesByConditionalAsync(int pageIndex, int pageSize, List<IConditionalModel> where, |
| | | Expression<Func<T, object>> order, OrderByType orderEnum, bool Async = true) |
| | | { |
| | | var query = Context.Queryable<T>() |
| | | .Where(where) |
| | | .OrderBy(order, orderEnum); |
| | | var res = Async ? await query.ToPageAsync(pageIndex, pageSize) : query.ToPage(pageIndex, pageSize); |
| | | return res; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获得列表 |
| | | /// </summary> |
| | | /// <param name="parm">PageParm</param> |
| New file |
| | |
| | | using Furion.DependencyInjection; |
| | | using ZTICInterface.Core.Entity; |
| | | |
| | | namespace ZTICInterface.Application.Service; |
| | | |
| | | public class IndustryPolicyService : Repository<IndustryPolicy>, ISingleton |
| | | { |
| | | |
| | | } |
| | |
| | | <param name="pageSize"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:ZTICInterface.Application.App.IndustryPolicyApp.GetPages(ZTICInterface.Core.Extend.PageSearchParam)"> |
| | | <summary> |
| | | 高级查询分页 |
| | | </summary> |
| | | <param name="param"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="T:ZTICInterface.Application.App.TableProductionSalesApp"> |
| | | <summary> |
| | | 报表-生成及销售数据 |
| | |
| | | <param name="orderEnum">排序方式OrderByType</param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:ZTICInterface.Application.Repository`1.GetPagesByConditionalAsync(System.Int32,System.Int32,System.Collections.Generic.List{SqlSugar.IConditionalModel},System.Linq.Expressions.Expression{System.Func{`0,System.Object}},SqlSugar.OrderByType,System.Boolean)"> |
| | | <summary> |
| | | 分页 |
| | | </summary> |
| | | <param name="parm">分页参数</param> |
| | | <param name="where">条件</param> |
| | | <param name="order">排序值</param> |
| | | <param name="orderEnum">排序方式OrderByType</param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="M:ZTICInterface.Application.Repository`1.GetListAsync(System.Linq.Expressions.Expression{System.Func{`0,System.Boolean}},System.Linq.Expressions.Expression{System.Func{`0,System.Object}},SqlSugar.OrderByType,System.Boolean)"> |
| | | <summary> |
| | | 获得列表 |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace ZTICInterface.Core.Extend; |
| | | |
| | | /// <summary> |
| | | /// 分页高级搜索条件 |
| | | /// </summary> |
| | | public class PageSearchParam |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 页码 |
| | | /// </summary> |
| | | public int PageIndex { get; set; } |
| | | /// <summary> |
| | | /// 条数 |
| | | /// </summary> |
| | | public int PageSize { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 指标查询条件 |
| | | /// </summary> |
| | | public List<SugarTableSearchSimple> ColCondition { get; set; } |
| | | |
| | | } |
| | |
| | | <param name="isOrderBy"></param> |
| | | <returns></returns> |
| | | </member> |
| | | <member name="T:ZTICInterface.Core.Extend.PageSearchParam"> |
| | | <summary> |
| | | 分页高级搜索条件 |
| | | </summary> |
| | | </member> |
| | | <member name="P:ZTICInterface.Core.Extend.PageSearchParam.PageIndex"> |
| | | <summary> |
| | | 页码 |
| | | </summary> |
| | | </member> |
| | | <member name="P:ZTICInterface.Core.Extend.PageSearchParam.PageSize"> |
| | | <summary> |
| | | 条数 |
| | | </summary> |
| | | </member> |
| | | <member name="P:ZTICInterface.Core.Extend.PageSearchParam.ColCondition"> |
| | | <summary> |
| | | 指标查询条件 |
| | | </summary> |
| | | </member> |
| | | <member name="P:ZTICInterface.Core.Extend.SugarTableSearchSimple.FieldName"> |
| | | <summary> |
| | | 字段名 |