MacOrderController.cs 977 B

12345678910111213141516171819202122232425262728293031323334
  1. using DllEapDal.OFILM;
  2. using DllEapEntity.Dtos;
  3. using DllEapEntity.OFILM;
  4. using Microsoft.AspNetCore.Authorization;
  5. using Microsoft.AspNetCore.Hosting;
  6. using Microsoft.AspNetCore.Mvc;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace DllEapBll.OFILM
  12. {
  13. [ApiController]
  14. [Route("eap/api/[controller]/[action]")]
  15. [Authorize]
  16. public class MacOrderController : ControllerBase
  17. {
  18. private IHostingEnvironment hostEnvironment;
  19. public MacOrderController(IHostingEnvironment hostingEnvironment)
  20. {
  21. this.hostEnvironment = hostingEnvironment;
  22. }
  23. [HttpGet]
  24. public async Task<LayuiModel<MacOrderDescDto>> Get(string order)
  25. {
  26. var path = hostEnvironment.WebRootPath + "/doc/ASM指令解释.xls";
  27. var dal = new MacOrderDescDal();
  28. var data = await dal.Get(order, path);
  29. return data;
  30. }
  31. }
  32. }