1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- 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
- {
- /// <summary>
- /// 财务模块
- /// </summary>
- [Route("api/[controller]/[action]")]
- [ApiController]
- public class FinancialController : ControllerBase
- {
- private readonly IMapper _mapper;
- private readonly IConfiguration _config;
- private readonly DailyFeePaymentRepository _daiRep;
- /// <summary>
- /// 初始化
- /// </summary>
- public FinancialController(IMapper mapper, IConfiguration configuration, DailyFeePaymentRepository daiRep)
- {
- this._mapper = mapper;
- this._config = configuration;
- this._daiRep = daiRep;
- }
- #region 日付申请
- /// <summary>
- /// 获取日付申请 List
- /// </summary>
- /// <param name="dto"> 日付申请 分页 dto</param>
- /// <returns></returns>
- [HttpPost]
- [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
- public async Task<IActionResult> 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
- }
- }
|