PaymentController.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using LeaRun.Application.Busines.InstallManage;
  2. using LeaRun.Application.Entity.InstallManage;
  3. using LeaRun.Util;
  4. using LeaRun.Util.WebControl;
  5. using Newtonsoft.Json;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Web;
  10. using System.Web.Mvc;
  11. namespace LeaRun.Application.Web.Areas.InstallManage.Controllers
  12. {
  13. public class PaymentController : MvcControllerBase
  14. {
  15. private InstallApplyBLL InstallApplybll = new InstallApplyBLL();
  16. //
  17. // GET: /InstallManage/Payment/
  18. public ActionResult Index()
  19. {
  20. return View();
  21. }
  22. public ActionResult Form()
  23. {
  24. return View();
  25. }
  26. public ActionResult GetListJson(string startTime, string endTime, String type, Pagination pagination)
  27. {
  28. InstallApplyEntity entity = new InstallApplyEntity();
  29. if (type == null)
  30. {
  31. entity.SurveyType = 1;
  32. entity.budgetType = 1;
  33. entity.MasterVerifyType = 1;
  34. entity.PayMentType = 0;
  35. }
  36. else
  37. {
  38. entity.SurveyType = 1;
  39. entity.budgetType = 1;
  40. entity.MasterVerifyType = 1;
  41. entity.PayMentType = int.Parse(type);
  42. }
  43. if (!string.IsNullOrEmpty(startTime) && !string.IsNullOrEmpty(endTime))
  44. {
  45. var data = InstallApplybll.getInstallApplyList(startTime, endTime, pagination, entity);
  46. var watch = CommonHelper.TimerStart();
  47. var JsonData = new
  48. {
  49. rows = JsonConvert.DeserializeObject(data),
  50. total = pagination.total,
  51. page = pagination.page,
  52. records = pagination.records,
  53. costtime = CommonHelper.TimerEnd(watch)
  54. };
  55. return Content(JsonData.ToJson());
  56. }
  57. else
  58. {
  59. entity.SurveyType = 1;
  60. entity.budgetType = 1;
  61. entity.MasterVerifyType = 1;
  62. entity.PayMentType = 0;
  63. var data = InstallApplybll.getInstallApplyList(startTime, endTime, pagination, entity);
  64. var watch = CommonHelper.TimerStart();
  65. var JsonData = new
  66. {
  67. rows = JsonConvert.DeserializeObject(data),
  68. total = pagination.total,
  69. page = pagination.page,
  70. records = pagination.records,
  71. costtime = CommonHelper.TimerEnd(watch)
  72. };
  73. return Content(JsonData.ToJson());
  74. }
  75. return Content("");
  76. }
  77. public ActionResult PaymentForm(String applyId)
  78. {
  79. InstallApplybll.PaymentForm(applyId);
  80. return Success("操作成功");
  81. }
  82. }
  83. }