ReimbursementController.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using Microsoft.AspNetCore.Authorization;
  2. using Microsoft.AspNetCore.Mvc;
  3. using System.Threading.Tasks;
  4. using XYY.Common.Standard;
  5. using XYY.Core.Standard.Mvc;
  6. using XYY.Service.Standard.Finance;
  7. namespace XYY.Api.Finance.Controllers
  8. {
  9. [Route("api/[controller]/[action]")]
  10. [ApiController]
  11. public class ReimbursementController : ApiControllerBase
  12. {
  13. private readonly IDingTalk_ReimbursementService _ReimbursementService;
  14. public ReimbursementController(IDingTalk_ReimbursementService ReimbursementService)
  15. {
  16. _ReimbursementService = ReimbursementService;
  17. }
  18. [AllowAnonymous]
  19. [HttpPost]
  20. public async Task<IActionResult> QueryPage(QueryModel qm)
  21. {
  22. if (qm.QueryParamer == null)
  23. qm.QueryParamer = new System.Collections.Generic.List<QueryParamer>();
  24. var data = await _ReimbursementService.QueryPage(qm);
  25. return Ok(data);
  26. }
  27. [AllowAnonymous]
  28. [HttpGet]
  29. public async Task<IActionResult> GetOptionsByType(int OptionType)
  30. {
  31. var data = await _ReimbursementService.GetOptionsByType(OptionType);
  32. return Ok(data);
  33. }
  34. [AllowAnonymous]
  35. [HttpGet]
  36. public async Task<IActionResult> GetReimbursementDetails(int ReimbursementId)
  37. {
  38. var data = await _ReimbursementService.GetReimbursementDetails(ReimbursementId);
  39. return Ok(data);
  40. }
  41. [AllowAnonymous]
  42. [HttpGet]
  43. public async Task<IActionResult> GetReimbursementCascadeChoice()
  44. {
  45. var data = await _ReimbursementService.GetReimbursementCascadeChoice();
  46. return Ok(data);
  47. }
  48. [AllowAnonymous]
  49. [HttpGet]
  50. public async Task<IActionResult> TestCreate(string code)
  51. {
  52. await _ReimbursementService.DingTalkStartProcessEvent(code);
  53. return Ok();
  54. }
  55. }
  56. }