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.
 
 
 
 
 
 

340 lines
11 KiB

  1. using Learun.Application.TwoDevelopment.AdmissionsPlatform;
  2. using Learun.Util;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data;
  6. using System.Web.Mvc;
  7. namespace Learun.Application.Web.Areas.AdmissionsPlatform.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  11. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2020-04-17 15:45
  14. /// 描 述:招生人员信息
  15. /// </summary>
  16. public class AP_OnlineUserInfoController : MvcControllerBase
  17. {
  18. private AP_OnlineUserInfoIBLL onlineUserInfoIBLL = new AP_OnlineUserInfoBLL();
  19. #region 视图功能
  20. /// <summary>
  21. /// 主页面
  22. /// <summary>
  23. /// <returns></returns>
  24. [HttpGet]
  25. public ActionResult Index()
  26. {
  27. return View();
  28. }
  29. /// <summary>
  30. /// 表单页
  31. /// <summary>
  32. /// <returns></returns>
  33. [HttpGet]
  34. public ActionResult Form()
  35. {
  36. return View();
  37. }
  38. /// <summary>
  39. /// 主页面【报名信息】
  40. /// <summary>
  41. /// <returns></returns>
  42. [HttpGet]
  43. public ActionResult RegistrateIndex()
  44. {
  45. return View();
  46. }
  47. /// <summary>
  48. /// 关联教师
  49. /// <summary>
  50. /// <returns></returns>
  51. [HttpGet]
  52. public ActionResult BindTeacherForm()
  53. {
  54. return View();
  55. }
  56. /// <summary>
  57. /// 缴费
  58. /// <summary>
  59. /// <returns></returns>
  60. [HttpGet]
  61. public ActionResult PaymentForm()
  62. {
  63. return View();
  64. }
  65. /// <summary>
  66. /// 报到
  67. /// <summary>
  68. /// <returns></returns>
  69. [HttpGet]
  70. public ActionResult ReportForm()
  71. {
  72. return View();
  73. }
  74. /// <summary>
  75. /// 表单【报名信息】
  76. /// <summary>
  77. /// <returns></returns>
  78. [HttpGet]
  79. public ActionResult RegistrateForm()
  80. {
  81. return View();
  82. }
  83. /// <summary>
  84. /// 主页面【缴费信息】
  85. /// <summary>
  86. /// <returns></returns>
  87. [HttpGet]
  88. public ActionResult PaymentIndex()
  89. {
  90. return View();
  91. }
  92. /// <summary>
  93. /// 主页面【报到信息】
  94. /// <summary>
  95. /// <returns></returns>
  96. [HttpGet]
  97. public ActionResult ReportIndex()
  98. {
  99. return View();
  100. }
  101. /// <summary>
  102. /// 主页面【退学信息】
  103. /// <summary>
  104. /// <returns></returns>
  105. [HttpGet]
  106. public ActionResult DropOutIndex()
  107. {
  108. return View();
  109. }
  110. #endregion
  111. #region 获取数据
  112. /// <summary>
  113. /// 获取列表数据
  114. /// <summary>
  115. /// <returns></returns>
  116. [HttpGet]
  117. [AjaxOnly]
  118. public ActionResult GetList(string queryJson)
  119. {
  120. var data = onlineUserInfoIBLL.GetList(queryJson);
  121. return Success(data);
  122. }
  123. /// <summary>
  124. /// 获取列表分页数据
  125. /// <param name="pagination">分页参数</param>
  126. /// <summary>
  127. /// <returns></returns>
  128. [HttpGet]
  129. [AjaxOnly]
  130. public ActionResult GetPageList(string pagination, string queryJson)
  131. {
  132. Pagination paginationobj = pagination.ToObject<Pagination>();
  133. var data = onlineUserInfoIBLL.GetPageList(paginationobj, queryJson);
  134. var jsonData = new
  135. {
  136. rows = data,
  137. total = paginationobj.total,
  138. page = paginationobj.page,
  139. records = paginationobj.records
  140. };
  141. return Success(jsonData);
  142. }
  143. /// <summary>
  144. /// 获取列表分页数据
  145. /// <param name="pagination">分页参数</param>
  146. /// <summary>
  147. /// <returns></returns>
  148. [HttpGet]
  149. [AjaxOnly]
  150. public ActionResult GetPageListOfRegistrate(string pagination, string queryJson)
  151. {
  152. Pagination paginationobj = pagination.ToObject<Pagination>();
  153. var data = onlineUserInfoIBLL.GetPageListOfRegistrate(paginationobj, queryJson);
  154. var jsonData = new
  155. {
  156. rows = data,
  157. total = paginationobj.total,
  158. page = paginationobj.page,
  159. records = paginationobj.records
  160. };
  161. return Success(jsonData);
  162. }
  163. /// <summary>
  164. /// 获取表单数据
  165. /// <param name="keyValue">主键</param>
  166. /// <summary>
  167. /// <returns></returns>
  168. [HttpGet]
  169. [AjaxOnly]
  170. public ActionResult GetFormData(string keyValue)
  171. {
  172. var data = onlineUserInfoIBLL.GetEntity(keyValue);
  173. return Success(data);
  174. }
  175. /// <summary>
  176. /// 获取表单数据
  177. /// <summary>
  178. /// <returns></returns>
  179. [HttpGet]
  180. [AjaxOnly]
  181. public ActionResult GetRegistrateFormData(string keyValue)
  182. {
  183. var AP_OnlineUserInfoData = onlineUserInfoIBLL.GetEntity(keyValue);
  184. var AP_OnlineStudentInfoData = onlineUserInfoIBLL.GetAP_OnlineStudentInfoEntity(keyValue);
  185. var AP_OnlineStudentResumeInfoData = onlineUserInfoIBLL.GetAP_OnlineStudentResumeInfoList(keyValue);
  186. var AP_OnlineStudentFamilyInfoData = onlineUserInfoIBLL.GetAP_OnlineStudentFamilyInfoList(keyValue);
  187. var jsonData = new
  188. {
  189. AP_OnlineUserInfo = AP_OnlineUserInfoData,
  190. AP_OnlineStudentInfo = AP_OnlineStudentInfoData,
  191. AP_OnlineStudentResumeInfo = AP_OnlineStudentResumeInfoData,
  192. AP_OnlineStudentFamilyInfo = AP_OnlineStudentFamilyInfoData,
  193. };
  194. return Success(jsonData);
  195. }
  196. #endregion
  197. #region 提交数据
  198. /// <summary>
  199. /// 删除实体数据
  200. /// <param name="keyValue">主键</param>
  201. /// <summary>
  202. /// <returns></returns>
  203. [HttpPost]
  204. [AjaxOnly]
  205. public ActionResult DeleteForm(string keyValue)
  206. {
  207. onlineUserInfoIBLL.DeleteEntity(keyValue);
  208. return Success("删除成功!");
  209. }
  210. /// <summary>
  211. /// 保存实体数据(新增、修改)
  212. /// <param name="keyValue">主键</param>
  213. /// <summary>
  214. /// <returns></returns>
  215. [HttpPost]
  216. [ValidateAntiForgeryToken]
  217. [AjaxOnly]
  218. public ActionResult SaveForm(string keyValue, AP_OnlineUserInfoEntity entity)
  219. {
  220. onlineUserInfoIBLL.SaveEntity(keyValue, entity);
  221. return Success("保存成功!");
  222. }
  223. /// <summary>
  224. /// 保存实体数据(新增、修改)
  225. /// <param name="keyValue">主键</param>
  226. /// <summary>
  227. /// <returns></returns>
  228. [HttpPost]
  229. [ValidateAntiForgeryToken]
  230. [AjaxOnly]
  231. public ActionResult SaveRegistrateForm(string keyValue, string strEntity, string strStudentEntity, string strOnlineStudentResumeList, string strOnlineStudentFamilyList)
  232. {
  233. AP_OnlineUserInfoEntity entity = strEntity.ToObject<AP_OnlineUserInfoEntity>();
  234. if (string.IsNullOrEmpty(keyValue))
  235. {
  236. entity.Password = "123456";
  237. entity.TypeId = "1";
  238. }
  239. entity.CreateDate = DateTime.Now;
  240. entity.AppStatus = "0";
  241. AP_OnlineStudentInfoEntity studentEntity = strStudentEntity.ToObject<AP_OnlineStudentInfoEntity>();
  242. entity.CampusId = studentEntity.SchoolId;
  243. studentEntity.IsReportId = "0";
  244. studentEntity.CreateDate = DateTime.Now;
  245. List<AP_OnlineStudentResumeInfoEntity> onlineStudentResumeList = strOnlineStudentResumeList.ToObject<List<AP_OnlineStudentResumeInfoEntity>>();
  246. List<AP_OnlineStudentFamilyInfoEntity> onlineStudentFamilyList = strOnlineStudentFamilyList.ToObject<List<AP_OnlineStudentFamilyInfoEntity>>();
  247. onlineUserInfoIBLL.SaveRegistrateForm(keyValue, entity, studentEntity, onlineStudentResumeList, onlineStudentFamilyList);
  248. return Success("保存成功!");
  249. }
  250. /// <summary>
  251. /// 删除实体数据
  252. /// <param name="keyValue">主键</param>
  253. /// <summary>
  254. /// <returns></returns>
  255. [HttpPost]
  256. [AjaxOnly]
  257. public ActionResult DeleteRegistrateInfo(string keyValue)
  258. {
  259. onlineUserInfoIBLL.DeleteRegistrateInfo(keyValue);
  260. return Success("删除成功!");
  261. }
  262. /// <summary>
  263. /// 审核
  264. /// <param name="keyValue">主键</param>
  265. /// <summary>
  266. /// <returns></returns>
  267. [HttpPost]
  268. [AjaxOnly]
  269. public ActionResult DoCheck(string keyValue, string status)
  270. {
  271. onlineUserInfoIBLL.DoCheck(keyValue, status);
  272. return Success("操作成功!");
  273. }
  274. /// <summary>
  275. /// 退学
  276. /// <param name="keyValue">主键</param>
  277. /// <summary>
  278. /// <returns></returns>
  279. [HttpPost]
  280. [AjaxOnly]
  281. public ActionResult DoDropOut(string keyValue, string status)
  282. {
  283. onlineUserInfoIBLL.DoDropOut(keyValue, status);
  284. return Success("操作成功!");
  285. }
  286. /// <summary>
  287. /// 关联教师
  288. /// <param name="keyValue">主键</param>
  289. /// <summary>
  290. /// <returns></returns>
  291. [HttpPost]
  292. [ValidateAntiForgeryToken]
  293. [AjaxOnly]
  294. public ActionResult BindTeacher(string keyValue, AP_OnlineUserInfoEntity entity)
  295. {
  296. onlineUserInfoIBLL.BindTeacher(keyValue, entity);
  297. return Success("保存成功!");
  298. }
  299. /// <summary>
  300. /// 缴费
  301. /// <param name="keyValue">主键</param>
  302. /// <summary>
  303. /// <returns></returns>
  304. [HttpPost]
  305. [ValidateAntiForgeryToken]
  306. [AjaxOnly]
  307. public ActionResult DoPayment(string keyValue, AP_OnlineUserInfoEntity entity)
  308. {
  309. onlineUserInfoIBLL.DoPayment(keyValue, entity);
  310. return Success("保存成功!");
  311. }
  312. /// <summary>
  313. /// 报到
  314. /// <param name="keyValue">主键</param>
  315. /// <summary>
  316. /// <returns></returns>
  317. [HttpPost]
  318. [ValidateAntiForgeryToken]
  319. [AjaxOnly]
  320. public ActionResult DoReport(string keyValue, AP_OnlineUserInfoEntity entity)
  321. {
  322. onlineUserInfoIBLL.DoReport(keyValue, entity);
  323. return Success("保存成功!");
  324. }
  325. #endregion
  326. }
  327. }