using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using OASystem.Domain; using OASystem.Domain.Dtos.Financial; using OASystem.Domain.Entities.Groups; using OASystem.Domain.ViewModels.Groups; using OASystem.Infrastructure.Repositories.Financial; namespace OASystem.API.Controllers { /// /// 财务模块 /// [Route("api/[controller]/[action]")] [ApiController] public class FinancialController : ControllerBase { private readonly IMapper _mapper; private readonly IConfiguration _config; private readonly DailyFeePaymentRepository _daiRep; /// /// 初始化 /// public FinancialController(IMapper mapper, IConfiguration configuration, DailyFeePaymentRepository daiRep) { this._mapper = mapper; this._config = configuration; this._daiRep = daiRep; } #region 日付申请 /// /// 获取日付申请 List /// /// 日付申请 分页 dto /// [HttpPost] [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] public async Task PostPageDailyPaymentList(PageDailyFeePaymentDto dto) { var result = await _daiRep.GetPageSelectAll(dto); if (result == null || result.Code != 0) { return Ok(JsonView(false, result.Msg)); } var data = result.Data; if (data == null) { return Ok(JsonView(false, result.Msg)); } return Ok(JsonView(data.Data, Convert.ToInt32(data.Rows))); } #endregion } }