MasterVerifyController.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 MasterVerifyController : MvcControllerBase
  14. {
  15. private InstallDudgetBLL installDudgetbll = new InstallDudgetBLL();
  16. private InstallApplyBLL InstallApplybll = new InstallApplyBLL();
  17. //
  18. // GET: /InstallManage/MasterVerify/
  19. public ActionResult Index()
  20. {
  21. return View();
  22. }
  23. public ActionResult Form()
  24. {
  25. return View();
  26. }
  27. public ActionResult GetListJson(string startTime, string endTime, String type, Pagination pagination)
  28. {
  29. InstallApplyEntity entity = new InstallApplyEntity();
  30. if (type == null)
  31. {
  32. entity.SurveyType = 1;
  33. entity.budgetType = 1;
  34. entity.MasterVerifyType = 0;
  35. }
  36. else
  37. {
  38. entity.SurveyType = 1;
  39. entity.budgetType = 1;
  40. entity.MasterVerifyType = int.Parse(type);
  41. }
  42. if (!string.IsNullOrEmpty(startTime) && !string.IsNullOrEmpty(endTime))
  43. {
  44. var data = InstallApplybll.getInstallApplyList(startTime, endTime, pagination, entity);
  45. var watch = CommonHelper.TimerStart();
  46. var JsonData = new
  47. {
  48. rows = JsonConvert.DeserializeObject(data),
  49. total = pagination.total,
  50. page = pagination.page,
  51. records = pagination.records,
  52. costtime = CommonHelper.TimerEnd(watch)
  53. };
  54. return Content(JsonData.ToJson());
  55. }
  56. else
  57. {
  58. entity.SurveyType = 1;
  59. entity.budgetType = 1;
  60. entity.MasterVerifyType = 0;
  61. var data = InstallApplybll.getInstallApplyList(startTime, endTime, pagination, entity);
  62. var watch = CommonHelper.TimerStart();
  63. var JsonData = new
  64. {
  65. rows = JsonConvert.DeserializeObject(data),
  66. total = pagination.total,
  67. page = pagination.page,
  68. records = pagination.records,
  69. costtime = CommonHelper.TimerEnd(watch)
  70. };
  71. return Content(JsonData.ToJson());
  72. }
  73. return Content("");
  74. }
  75. public ActionResult VerityForm(String applyId)
  76. {
  77. InstallApplybll.MasterVerify(applyId);
  78. return Success("审核通过");
  79. }
  80. }
  81. }