You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.8 KiB

  1. using EasyBL;
  2. using EasyBL.WebApi;
  3. using EasyBL.WebApi.Common;
  4. using EasyBL.WebApi.Filters;
  5. using EasyBL.WebApi.Message;
  6. using EasyBL.WEBAPP;
  7. using EasyBL.WEBAPP.SYS;
  8. using Entity.ShowEasyDtos;
  9. using Entity.Sugar;
  10. using Entity.ViewModels;
  11. using Newtonsoft.Json;
  12. using SqlSugar.Base;
  13. using System;
  14. using System.Collections.Generic;
  15. using System.Linq;
  16. using System.Net;
  17. using System.Net.Http;
  18. using System.Web;
  19. using System.Web.Http;
  20. namespace WebApp.Controllers
  21. {
  22. public class BookingOnlineController : ApiController
  23. {
  24. /// <summary>
  25. /// 子類別查詢API (服務有包含該類別才列出)
  26. /// </summary>
  27. /// <param name="argumentClassID"></param>
  28. /// <returns></returns>
  29. [HttpGet]
  30. [SEApiSecurityFilter]
  31. public HttpResponseMessage GetBookingCategory(string LangType)
  32. {
  33. var SEToken = SETokenUtil.GetToken(this.Request);
  34. return new BookingOnlineService().GetBookingCategory(SEToken.Account, LangType);
  35. }
  36. /// <summary>
  37. /// 子類別查詢API (服務有包含該類別才列出)
  38. /// </summary>
  39. /// <param name="argumentClassID"></param>
  40. /// <returns></returns>
  41. [HttpGet]
  42. [SEApiSecurityFilter]
  43. public HttpResponseMessage BookingCardList(string Lang, string SubCategoryIDs, string BookingStatuses, string PaymentStatuses)
  44. {
  45. var SEToken = SETokenUtil.GetToken(this.Request);
  46. List<string> rsSubCategoryIDs = new List<string>();
  47. List<string> rsBookingStatuses = new List<string>();
  48. List<string> rsPaymentStatuses = new List<string>();
  49. if (!string.IsNullOrEmpty(SubCategoryIDs))
  50. {
  51. rsSubCategoryIDs = JsonConvert.DeserializeObject<List<string>>(SubCategoryIDs);
  52. }
  53. if (!string.IsNullOrEmpty(BookingStatuses))
  54. {
  55. rsBookingStatuses = JsonConvert.DeserializeObject<List<string>>(BookingStatuses);
  56. }
  57. if (!string.IsNullOrEmpty(PaymentStatuses))
  58. {
  59. rsPaymentStatuses = JsonConvert.DeserializeObject<List<string>>(PaymentStatuses);
  60. }
  61. return new BookingOnlineService().BookingCardList(SEToken.Account, Lang, rsSubCategoryIDs, rsBookingStatuses, rsPaymentStatuses);
  62. }
  63. /// <summary>
  64. /// 上傳匯款單
  65. /// </summary>
  66. /// <param name="argumentClassID"></param>
  67. /// <returns></returns>
  68. [HttpGet]
  69. [SEApiSecurityFilter]
  70. public HttpResponseMessage UploadRemittance(string BookingID)
  71. {
  72. var SEToken = SETokenUtil.GetToken(this.Request);
  73. return new BookingOnlineService().UploadRemittance(SEToken.OrgID, SEToken.Account, BookingID);
  74. }
  75. }
  76. }