|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- using Learun.Application.TwoDevelopment.EducationalAdministration;
- using Learun.Util;
- using System.Data;
- using System.Linq;
- using System.Web.Mvc;
-
- namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
- {
- /// <summary>
- /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
- /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
- /// 创 建:超级管理员
- /// 日 期:2023-03-13 10:37
- /// 描 述:定制功能助学金
- /// </summary>
- public class StuFellowshipController : MvcControllerBase
- {
- private StuFellowshipIBLL stuFellowshipIBLL = new StuFellowshipBLL();
- private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
- private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
-
- #region 视图功能
-
- /// <summary>
- /// 主页面
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Index()
- {
- return View();
- }
- /// <summary>
- /// 表单页
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Form()
- {
- var logUser = LoginUserInfo.Get();
- var ClassNos = "";
- var Classinfo = classInfoIBLL.GetAllClass().Where(x => x.ClassTutorNo == logUser.account).ToList();
- if (Classinfo.Any())
- {
- foreach (var item in Classinfo)
- {
- ClassNos += item.ClassNo + ",";
- }
- }
- ViewBag.ClassNo = ClassNos.TrimEnd(',');
- return View();
- }
- /// <summary>
- /// 表单页【查看】
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult FormView()
- {
- var logUser = LoginUserInfo.Get();
- var ClassNos = "";
- var Classinfo = classInfoIBLL.GetAllClass().Where(x => x.ClassTutorNo == logUser.account).ToList();
- if (Classinfo.Any())
- {
- foreach (var item in Classinfo)
- {
- ClassNos += item.ClassNo + ",";
- }
- }
- ViewBag.ClassNo = ClassNos.TrimEnd(',');
- return View();
- }
- /// <summary>
- /// 主页面【二级学院】
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IndexOfTwo()
- {
- return View();
- }
- /// <summary>
- /// 主页面【学工部】
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IndexOfThree()
- {
- return View();
- }
- /// <summary>
- /// 主页面【学生】
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IndexOfStudent()
- {
- return View();
- }
- /// <summary>
- /// 表单页【学生】
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult FormOfStudent()
- {
- var logUser = LoginUserInfo.Get();
- var stuinfo = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(logUser.account);
- ViewBag.StuNo = stuinfo?.StuNo;
- ViewBag.StuName = stuinfo?.StuName;
- ViewBag.DeptNo = stuinfo?.DeptNo;
- ViewBag.ClassNo = stuinfo?.ClassNo;
- ViewBag.IdentityCardNo = stuinfo?.IdentityCardNo;
- ViewBag.OpenBank = stuinfo?.DepositBank;
- ViewBag.OpenAccount = stuinfo?.BankCard;
-
- return View();
- }
-
- /// <summary>
- /// 主页面【统计】
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult StatisticIndex()
- {
- return View();
- }
- #endregion
-
- #region 获取数据
-
- /// <summary>
- /// 获取列表数据
- /// </summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetList(string queryJson)
- {
- var data = stuFellowshipIBLL.GetList(queryJson);
- return Success(data);
- }
- /// <summary>
- /// 获取列表分页数据
- /// </summary>
- /// <param name="pagination">分页参数</param>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = stuFellowshipIBLL.GetPageList(paginationobj, queryJson);
- 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 data = stuFellowshipIBLL.GetEntity(keyValue);
- //return Success(data);
- var stuFellowshipData = stuFellowshipIBLL.GetEntity(keyValue);
- var jsonData = new
- {
- StuFellowship = stuFellowshipData,
- };
- return Success(jsonData);
- }
-
- /// <summary>
- /// 获取统计列表数据
- /// </summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetStatisticList(string queryJson)
- {
- var data = stuFellowshipIBLL.GetStatisticList(queryJson);
- return Success(data);
- }
- #endregion
-
- #region 提交数据
-
- /// <summary>
- /// 删除实体数据
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult DeleteForm(string keyValue)
- {
- stuFellowshipIBLL.DeleteEntity(keyValue);
- return Success("删除成功!");
- }
- /// <summary>
- /// 保存实体数据(新增、修改)
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <param name="entity">实体</param>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SaveForm(string keyValue, string strEntity)
- {
- StuFellowshipEntity entity = strEntity.ToObject<StuFellowshipEntity>();
- stuFellowshipIBLL.SaveEntity(keyValue, entity);
- return Success("保存成功!");
- }
-
- /// <summary>
- /// 提交
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult DoSubmit(string keyValue, string status, string step)
- {
- stuFellowshipIBLL.DoSubmit(keyValue, status, step);
- return Success("操作成功!");
- }
- /// <summary>
- /// 退回
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult DoBack(string keyValue, string status, string step)
- {
- stuFellowshipIBLL.DoBack(keyValue, status, step);
- return Success("操作成功!");
- }
-
- #endregion
-
- }
- }
|