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.
 
 
 
 
 
 

199 lines
5.4 KiB

  1. using System;
  2. using Learun.Util;
  3. using System.Data;
  4. using Learun.Application.TwoDevelopment.EducationalAdministration;
  5. using System.Web.Mvc;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using Learun.Application.Organization;
  9. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  10. {
  11. /// <summary>
  12. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  13. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  14. /// 创 建:超级管理员
  15. /// 日 期:2021-12-16 10:14
  16. /// 描 述:长阳迎新
  17. /// </summary>
  18. public class StuVolunteerPhoneController : MvcControllerBaseNoLogin
  19. {
  20. private StuVolunteerIBLL stuVolunteerIBLL = new StuVolunteerBLL();
  21. #region 视图功能
  22. /// <summary>
  23. /// 生成二维码
  24. /// <summary>
  25. /// <returns></returns>
  26. [HttpGet]
  27. public ActionResult QRCode()
  28. {
  29. return View();
  30. }
  31. /// <summary>
  32. /// 生成二维码
  33. /// <summary>
  34. /// <returns></returns>
  35. [HttpGet]
  36. public ActionResult Link()
  37. {
  38. return View();
  39. }
  40. /// <summary>
  41. /// 报名
  42. /// <summary>
  43. /// <returns></returns>
  44. [HttpGet]
  45. public ActionResult FormApply()
  46. {
  47. return View();
  48. }
  49. /// <summary>
  50. /// 查询报名
  51. /// <summary>
  52. /// <returns></returns>
  53. [HttpGet]
  54. public ActionResult Search()
  55. {
  56. return View();
  57. }
  58. /// <summary>
  59. /// 查询报名
  60. /// <summary>
  61. /// <returns></returns>
  62. [HttpGet]
  63. public ActionResult SearchResult()
  64. {
  65. return View();
  66. }
  67. #endregion
  68. #region 获取数据
  69. /// <summary>
  70. /// 获取页面显示列表数据
  71. /// </summary>
  72. /// <param name="pagination">分页参数</param>
  73. /// <param name="queryJson">查询参数</param>
  74. /// <returns></returns>
  75. [HttpGet]
  76. [AjaxOnly]
  77. public ActionResult GetPageList(string pagination, string queryJson)
  78. {
  79. Pagination paginationobj = pagination.ToObject<Pagination>();
  80. var data = stuVolunteerIBLL.GetPageList(paginationobj, queryJson);
  81. var jsonData = new
  82. {
  83. rows = data,
  84. total = paginationobj.total,
  85. page = paginationobj.page,
  86. records = paginationobj.records
  87. };
  88. return Success(jsonData);
  89. }
  90. /// <summary>
  91. /// 获取表单数据
  92. /// </summary>
  93. /// <param name="keyValue">主键</param>
  94. /// <returns></returns>
  95. [HttpGet]
  96. [AjaxOnly]
  97. public ActionResult GetFormData(string keyValue)
  98. {
  99. var StuVolunteerData = stuVolunteerIBLL.GetStuVolunteerEntity(keyValue);
  100. var jsonData = new
  101. {
  102. StuVolunteer = StuVolunteerData,
  103. };
  104. return Success(jsonData);
  105. }
  106. #endregion
  107. #region 提交数据
  108. #endregion
  109. #region 扩展数据
  110. /// <summary>
  111. /// 登录查询
  112. /// </summary>
  113. /// <returns></returns>
  114. [HttpPost]
  115. [AjaxOnly]
  116. public ActionResult IsExist(string CardNo, string Password)
  117. {
  118. var entity = stuVolunteerIBLL.GetEntityByCardNo(CardNo);
  119. if (entity == null)
  120. {
  121. return Fail("身份证号不存在!");
  122. }
  123. if (Password != CardNo.Substring(CardNo.Length - 6))
  124. {
  125. return Fail("密码错误!");
  126. }
  127. return Success("查询成功!");
  128. }
  129. /// <summary>
  130. /// 报名提交
  131. /// </summary>
  132. /// <param name="keyValue"></param>
  133. /// <param name="strEntity"></param>
  134. /// <returns></returns>
  135. [HttpPost]
  136. [AjaxOnly]
  137. public ActionResult SubmitForm(string keyValue, string strEntity)
  138. {
  139. StuVolunteerEntity entity = strEntity.ToObject<StuVolunteerEntity>();
  140. entity.EnrollTime = DateTime.Now;
  141. stuVolunteerIBLL.SubmitForm(keyValue, entity);
  142. return Success("提交成功!");
  143. }
  144. //public ActionResult Search(string CardNo, string txtPass)
  145. //{
  146. // var StuVolunteerData = new StuVolunteerEntity();// stuVolunteerIBLL.IsEnrollByCard(CardNo);
  147. // if (StuVolunteerData != null)
  148. // {
  149. // var jsonData = new
  150. // {
  151. // StuVolunteer = StuVolunteerData,
  152. // };
  153. // return Success(jsonData);
  154. // }
  155. // else
  156. // {
  157. // return Success(null);
  158. // }
  159. //}
  160. [HttpGet]
  161. [AjaxOnly]
  162. public ActionResult SearchForm(string CardNo)
  163. {
  164. var StuVolunteerData = stuVolunteerIBLL.GetEntityByCardNo(CardNo);
  165. return Success(StuVolunteerData);
  166. }
  167. public ActionResult SearchCard(string CardNo)
  168. {
  169. var StuVolunteerData = stuVolunteerIBLL.GetEntityByCardNo(CardNo);
  170. var jsonData = new
  171. {
  172. StuVolunteer = StuVolunteerData,
  173. };
  174. return Success(jsonData);
  175. }
  176. #endregion
  177. }
  178. }