|
- using Learun.Util;
- using System.Data;
- using Learun.Application.TwoDevelopment.LR_Desktop;
- using System.Web.Mvc;
- using System.Collections.Generic;
- using Learun.Application.TwoDevelopment.EducationalAdministration;
- using Learun.Application.Base.AuthorizeModule;
- using Learun.Application.Organization;
-
- namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
- {
- /// <summary>
- /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
- /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
- /// 创 建:超级管理员
- /// 日 期:2023-03-06 12:21
- /// 描 述:心理咨询回复
- /// </summary>
- public class PsychologyReplyInfoController : MvcControllerBase
- {
- private PsychologyReplyInfoIBLL psychologyReplyInfoIBLL = new PsychologyReplyInfoBLL();
- private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
-
- private UserRelationIBLL userRelationIBLL = new UserRelationBLL();
- private UserIBLL userIBLL = new UserBLL();
- #region 视图功能
-
- /// <summary>
- /// 主页面
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Index()
- {
- return View();
- }
- /// <summary>
- /// 表单页
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Form()
- {
- return View();
- }
- /// <summary>
- /// 表单页
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult FormSix()
- {
- return View();
- }
-
- /// <summary>
- /// 表单页
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult FormFive()
- {
- return View();
- }
- /// <summary>
- /// 表单页
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult FormFiveView()
- {
- return View();
- }
-
- /// <summary>
- /// 表单页
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult FormView()
- {
- return View();
- }
-
- /// <summary>
- /// 分院心理辅导站负责人列表
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Index3()
- {
- return View();
- }
- /// <summary>
- /// 学工处心理老师
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Index4()
- {
- return View();
- }
- /// <summary>
- /// 心理总站负责人
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IndexFive()
- {
- return View();
- }
- /// <summary>
- /// 指派教师审核
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IndexSix()
- {
- return View();
- }
- /// <summary>
- ///
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IndexGather()
- {
- return View();
- }
- /// <summary>
- /// 汇总表
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult FormGatherView()
- {
- return View();
- }
- /// <summary>
- /// 回复列表
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IndexReply()
- {
- return View();
- }
-
- #endregion
-
- #region 获取数据
- /// <summary>
- /// 根据角色id获取成员
- /// </summary>
- /// <param name="objectId">用户主键</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetUserIdLists(string objectId)
- {
- var data = userRelationIBLL.GetUserIdList(objectId);
- string userIds = "";
- foreach (var item in data)
- {
- if (userIds != "")
- {
- userIds += ",";
- }
- userIds += item.F_UserId;
- }
- var userList = userIBLL.GetListByUserIds(userIds);
- return JsonResult(userList);
- }
- /// <summary>
- /// 获取页面显示列表数据
- /// </summary>
- /// <param name="pagination">分页参数</param>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageList(string pagination, string queryJson, int type = 2)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = psychologyReplyInfoIBLL.GetPageList(paginationobj, queryJson, type);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- /// <summary>
- /// 获取页面显示列表数据
- /// </summary>
- /// <param name="pagination">分页参数</param>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageList2(string pagination, string queryJson, int type)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = psychologyReplyInfoIBLL.GetPageList2(paginationobj, queryJson, type);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
-
- /// <summary>
- /// 获取页面显示列表数据
- /// </summary>
- /// <param name="pagination">分页参数</param>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageListForReply(string pagination, string queryJson, int type)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = psychologyReplyInfoIBLL.GetPageListForReply(paginationobj, queryJson, type);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- /// <summary>
- /// 获取表单数据
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetFormData(string keyValue)
- {
- var PsychologyReplyInfoData = psychologyReplyInfoIBLL.GetPsychologyReplyInfoEntity(keyValue);
- var StuInfoBasicData = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(PsychologyReplyInfoData.StuNo);
- var jsonData = new
- {
- PsychologyReplyInfo = PsychologyReplyInfoData,
- StuInfoBasic = StuInfoBasicData,
- };
- return Success(jsonData);
- }
-
- /// <summary>
- /// 获取表单数据
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetFormDataByPsychologyInfoId(string PsychologyInfoId, int type = 2)
- {
- var PsychologyReplyInfoData = psychologyReplyInfoIBLL.GetEntityByPsychologyInfoId(PsychologyInfoId, type);
- var StuInfoBasicData = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(PsychologyReplyInfoData.StuNo);
- var jsonData = new
- {
- PsychologyReplyInfo = PsychologyReplyInfoData,
- StuInfoBasic = StuInfoBasicData,
- };
- return Success(jsonData);
- }
-
-
- #endregion
-
- #region 提交数据
-
- /// <summary>
- /// 删除实体数据
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult DeleteForm(string keyValue)
- {
- psychologyReplyInfoIBLL.DeleteEntity(keyValue);
- return Success("删除成功!");
- }
- /// <summary>
- /// 班级辅导员审核
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <param name="strEntity">实体</param>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SaveForm(string keyValue, string strEntity)
- {
- PsychologyReplyInfoEntity entity = strEntity.ToObject<PsychologyReplyInfoEntity>();
- psychologyReplyInfoIBLL.SaveEntity(keyValue, entity);
- if (string.IsNullOrEmpty(keyValue))
- {
- }
- return Success("保存成功!");
- }
-
- #endregion
-
- }
- }
|