123456789101112131415161718192021222324252627282930313233 |
- 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<PageResult<Compute_ExpenseItemCategory>> Post([FromBody] QueryModel model)
- {
- return await ExpenseCategoryService.QueryExpenseItemCategory(model);
- }
- [HttpGet]
- public async Task<IEnumerable<Compute_ExpenseItemCategory>> Get()
- {
- return (await ExpenseCategoryService.GetAllExpenseItemCategory()).OrderBy(x => x.Name).ToList();
- }
- }
- }
|