using Microsoft.AspNetCore.Mvc; using SMP.Model; using SMP.Model.Compute; using SMP.Service; using SMP.Service.Compute; using XYY.Common.Standard; namespace SMP.Api.Base.Controllers { [ApiController] [Route("[controller]")] public class QueryExpenseItemCategoryController : ControllerBase { public QueryExpenseItemCategoryController(IComputeExpenseItemCategoryService ExpenseCategoryService) { this.ExpenseCategoryService = ExpenseCategoryService; } public IComputeExpenseItemCategoryService ExpenseCategoryService { get; } [HttpPost] public async Task> Post([FromBody] QueryModel model) { return await ExpenseCategoryService.QueryExpenseItemCategory(model); } [HttpGet] public async Task> Get() { return (await ExpenseCategoryService.GetAllExpenseItemCategory()).OrderBy(x => x.Name).ToList(); } } }