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.

PsychologyReplyInfoController.cs 9.3 KiB

1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.LR_Desktop;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. using Learun.Application.TwoDevelopment.EducationalAdministration;
  7. using Learun.Application.Base.AuthorizeModule;
  8. using Learun.Application.Organization;
  9. namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
  10. {
  11. /// <summary>
  12. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  13. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  14. /// 创 建:超级管理员
  15. /// 日 期:2023-03-06 12:21
  16. /// 描 述:心理咨询回复
  17. /// </summary>
  18. public class PsychologyReplyInfoController : MvcControllerBase
  19. {
  20. private PsychologyReplyInfoIBLL psychologyReplyInfoIBLL = new PsychologyReplyInfoBLL();
  21. private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
  22. private UserRelationIBLL userRelationIBLL = new UserRelationBLL();
  23. private UserIBLL userIBLL = new UserBLL();
  24. #region 视图功能
  25. /// <summary>
  26. /// 主页面
  27. /// <summary>
  28. /// <returns></returns>
  29. [HttpGet]
  30. public ActionResult Index()
  31. {
  32. return View();
  33. }
  34. /// <summary>
  35. /// 表单页
  36. /// <summary>
  37. /// <returns></returns>
  38. [HttpGet]
  39. public ActionResult Form()
  40. {
  41. return View();
  42. }
  43. /// <summary>
  44. /// 表单页
  45. /// <summary>
  46. /// <returns></returns>
  47. [HttpGet]
  48. public ActionResult FormSix()
  49. {
  50. return View();
  51. }
  52. /// <summary>
  53. /// 表单页
  54. /// <summary>
  55. /// <returns></returns>
  56. [HttpGet]
  57. public ActionResult FormFive()
  58. {
  59. return View();
  60. }
  61. /// <summary>
  62. /// 表单页
  63. /// <summary>
  64. /// <returns></returns>
  65. [HttpGet]
  66. public ActionResult FormFiveView()
  67. {
  68. return View();
  69. }
  70. /// <summary>
  71. /// 表单页
  72. /// <summary>
  73. /// <returns></returns>
  74. [HttpGet]
  75. public ActionResult FormView()
  76. {
  77. return View();
  78. }
  79. /// <summary>
  80. /// 分院心理辅导站负责人列表
  81. /// <summary>
  82. /// <returns></returns>
  83. [HttpGet]
  84. public ActionResult Index3()
  85. {
  86. return View();
  87. }
  88. /// <summary>
  89. /// 学工处心理老师
  90. /// <summary>
  91. /// <returns></returns>
  92. [HttpGet]
  93. public ActionResult Index4()
  94. {
  95. return View();
  96. }
  97. /// <summary>
  98. /// 心理总站负责人
  99. /// <summary>
  100. /// <returns></returns>
  101. [HttpGet]
  102. public ActionResult IndexFive()
  103. {
  104. return View();
  105. }
  106. /// <summary>
  107. /// 指派教师审核
  108. /// <summary>
  109. /// <returns></returns>
  110. [HttpGet]
  111. public ActionResult IndexSix()
  112. {
  113. return View();
  114. }
  115. /// <summary>
  116. ///
  117. /// <summary>
  118. /// <returns></returns>
  119. [HttpGet]
  120. public ActionResult IndexGather()
  121. {
  122. return View();
  123. }
  124. /// <summary>
  125. /// 汇总表
  126. /// <summary>
  127. /// <returns></returns>
  128. [HttpGet]
  129. public ActionResult FormGatherView()
  130. {
  131. return View();
  132. }
  133. /// <summary>
  134. /// 回复列表
  135. /// <summary>
  136. /// <returns></returns>
  137. [HttpGet]
  138. public ActionResult IndexReply()
  139. {
  140. return View();
  141. }
  142. #endregion
  143. #region 获取数据
  144. /// <summary>
  145. /// 根据角色id获取成员
  146. /// </summary>
  147. /// <param name="objectId">用户主键</param>
  148. /// <returns></returns>
  149. [HttpGet]
  150. [AjaxOnly]
  151. public ActionResult GetUserIdLists(string objectId)
  152. {
  153. var data = userRelationIBLL.GetUserIdList(objectId);
  154. string userIds = "";
  155. foreach (var item in data)
  156. {
  157. if (userIds != "")
  158. {
  159. userIds += ",";
  160. }
  161. userIds += item.F_UserId;
  162. }
  163. var userList = userIBLL.GetListByUserIds(userIds);
  164. return JsonResult(userList);
  165. }
  166. /// <summary>
  167. /// 获取页面显示列表数据
  168. /// </summary>
  169. /// <param name="pagination">分页参数</param>
  170. /// <param name="queryJson">查询参数</param>
  171. /// <returns></returns>
  172. [HttpGet]
  173. [AjaxOnly]
  174. public ActionResult GetPageList(string pagination, string queryJson, int type = 2)
  175. {
  176. Pagination paginationobj = pagination.ToObject<Pagination>();
  177. var data = psychologyReplyInfoIBLL.GetPageList(paginationobj, queryJson, type);
  178. var jsonData = new
  179. {
  180. rows = data,
  181. total = paginationobj.total,
  182. page = paginationobj.page,
  183. records = paginationobj.records
  184. };
  185. return Success(jsonData);
  186. }
  187. /// <summary>
  188. /// 获取页面显示列表数据
  189. /// </summary>
  190. /// <param name="pagination">分页参数</param>
  191. /// <param name="queryJson">查询参数</param>
  192. /// <returns></returns>
  193. [HttpGet]
  194. [AjaxOnly]
  195. public ActionResult GetPageList2(string pagination, string queryJson, int type)
  196. {
  197. Pagination paginationobj = pagination.ToObject<Pagination>();
  198. var data = psychologyReplyInfoIBLL.GetPageList2(paginationobj, queryJson, type);
  199. var jsonData = new
  200. {
  201. rows = data,
  202. total = paginationobj.total,
  203. page = paginationobj.page,
  204. records = paginationobj.records
  205. };
  206. return Success(jsonData);
  207. }
  208. /// <summary>
  209. /// 获取页面显示列表数据
  210. /// </summary>
  211. /// <param name="pagination">分页参数</param>
  212. /// <param name="queryJson">查询参数</param>
  213. /// <returns></returns>
  214. [HttpGet]
  215. [AjaxOnly]
  216. public ActionResult GetPageListForReply(string pagination, string queryJson, int type)
  217. {
  218. Pagination paginationobj = pagination.ToObject<Pagination>();
  219. var data = psychologyReplyInfoIBLL.GetPageListForReply(paginationobj, queryJson, type);
  220. var jsonData = new
  221. {
  222. rows = data,
  223. total = paginationobj.total,
  224. page = paginationobj.page,
  225. records = paginationobj.records
  226. };
  227. return Success(jsonData);
  228. }
  229. /// <summary>
  230. /// 获取表单数据
  231. /// </summary>
  232. /// <param name="keyValue">主键</param>
  233. /// <returns></returns>
  234. [HttpGet]
  235. [AjaxOnly]
  236. public ActionResult GetFormData(string keyValue)
  237. {
  238. var PsychologyReplyInfoData = psychologyReplyInfoIBLL.GetPsychologyReplyInfoEntity(keyValue);
  239. var StuInfoBasicData = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(PsychologyReplyInfoData.StuNo);
  240. var jsonData = new
  241. {
  242. PsychologyReplyInfo = PsychologyReplyInfoData,
  243. StuInfoBasic = StuInfoBasicData,
  244. };
  245. return Success(jsonData);
  246. }
  247. /// <summary>
  248. /// 获取表单数据
  249. /// </summary>
  250. /// <param name="keyValue">主键</param>
  251. /// <returns></returns>
  252. [HttpGet]
  253. [AjaxOnly]
  254. public ActionResult GetFormDataByPsychologyInfoId(string PsychologyInfoId, int type = 2)
  255. {
  256. var PsychologyReplyInfoData = psychologyReplyInfoIBLL.GetEntityByPsychologyInfoId(PsychologyInfoId, type);
  257. var StuInfoBasicData = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(PsychologyReplyInfoData.StuNo);
  258. var jsonData = new
  259. {
  260. PsychologyReplyInfo = PsychologyReplyInfoData,
  261. StuInfoBasic = StuInfoBasicData,
  262. };
  263. return Success(jsonData);
  264. }
  265. #endregion
  266. #region 提交数据
  267. /// <summary>
  268. /// 删除实体数据
  269. /// </summary>
  270. /// <param name="keyValue">主键</param>
  271. /// <returns></returns>
  272. [HttpPost]
  273. [AjaxOnly]
  274. public ActionResult DeleteForm(string keyValue)
  275. {
  276. psychologyReplyInfoIBLL.DeleteEntity(keyValue);
  277. return Success("删除成功!");
  278. }
  279. /// <summary>
  280. /// 班级辅导员审核
  281. /// </summary>
  282. /// <param name="keyValue">主键</param>
  283. /// <param name="strEntity">实体</param>
  284. /// <returns></returns>
  285. [HttpPost]
  286. [ValidateAntiForgeryToken]
  287. [AjaxOnly]
  288. public ActionResult SaveForm(string keyValue, string strEntity)
  289. {
  290. PsychologyReplyInfoEntity entity = strEntity.ToObject<PsychologyReplyInfoEntity>();
  291. psychologyReplyInfoIBLL.SaveEntity(keyValue, entity);
  292. if (string.IsNullOrEmpty(keyValue))
  293. {
  294. }
  295. return Success("保存成功!");
  296. }
  297. #endregion
  298. }
  299. }