12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using EMIS.CommonLogic.Students;
- using EMIS.ViewModel;
- using EMIS.Web.Controls;
- using Bowin.Web.Controls.Mvc;
- using Bowin.Common.Data;
- using Bowin.Common.Utility;
- namespace EMIS.Web.Controllers.StudentManage.StudentChange
- {
- [Authorization]
- public class StudentReentryController : Controller
- {
- public IReentryServices ReentryServices { get; set; }
- /// <summary>
- ///
- /// </summary>
- /// <returns></returns>
- public ActionResult List()
- {
- return View();
- }
- /// <summary>
- /// 列表查询
- /// </summary>
- /// <param name="pararms"></param>
- /// <returns></returns>
- [HttpPost]
- public ActionResult List(QueryParamsModel pararms)
- {
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(pararms);
- var schoolYearID = pararms.getExtraGuid("ddlSchoolYear"); //学年学期
- var campusID = pararms.getExtraGuid("cbgCampus"); //校区
- var collegeID = pararms.getExtraGuid("cbgCollege"); //院系所
- var education = pararms.getExtraInt("ddlEducation") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("ddlEducation"); //培养层次
- var year = pararms.getExtraInt("ddlYear") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("ddlYear"); //年级
- var standard = pararms.getExtraInt("cbgStandard") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("cbgStandard"); //专业名称
- var learningform = pararms.getExtraInt("ddlLearningform") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("ddlLearningform"); //学习形式
- var differentDynamicStatus = pararms.getExtraInt("ddlStatus") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("ddlStatus"); //审批状态
- var result = ReentryServices.GetStudentReentryViewGrid(configuretView, schoolYearID, campusID, collegeID, education, year, standard,
- learningform, (int)pararms.page, (int)pararms.rows);
- return Json(result);
- }
- [HttpPost]
- public ActionResult Excel()
- {
- NpoiExcelHelper neh = new NpoiExcelHelper();
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(null);
- var schoolYearID = Request.Form["ddlSchoolYear"].ParseStrTo<Guid>(); //学年学期
- var campusID = Request.Form["cbgCampus"].ParseStrTo<Guid>(); //校区
- var collegeID = Request.Form["cbgCollege"].ParseStrTo<Guid>(); //院系所
- var education = Request.Form["ddlEducation"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["ddlEducation"].ParseStrTo<int>(); //培养层次
- var year = Request.Form["ddlYear"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["ddlYear"].ParseStrTo<int>(); //年级
- var standard = Request.Form["cbgStandard"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["cbgStandard"].ParseStrTo<int>(); //专业名称
- var learningform = Request.Form["ddlLearningform"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["ddlLearningform"].ParseStrTo<int>(); //学习形式
- var differentDynamicStatus = Request.Form["ddlStatus"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["ddlStatus"].ParseStrTo<int>(); //审批状态
- var result = ReentryServices.GetStudentReentryViewList(configuretView, schoolYearID, campusID, collegeID, education, year, standard,
- learningform);
- var dt = result.Select(s => new
- {
- s.LoginID,
- s.UserName,
- EndDateString = (s.EndDate.HasValue ? s.EndDate.Value.ToString("yyyy-MM-dd") : ""),
- s.DifferentDynamicTypeDesc,
- s.ClassmajorName,
- s.StudentStatusDesc,
- s.AfterClassmajorName,
- s.AfterStudentStatusDesc,
- s.ReasonDesc,
- IsReturnedDesc = s.IsReentriedDesc,
- s.CollegeName,
- s.CampusName
- }).ToTable();
- string[] liststring = { "学号", "姓名", "结束日期", "异动类型", "异动前班级", "异动前学籍状态", "异动后班级", "异动后学籍状态", "异动原因", "是否已复学处理", "所属学院", "所属校区" };
- neh.Export(dt, liststring, "复学名单");
- return RedirectToAction("MsgShow", "Common", new
- {
- msg = "导出成功!",
- url = Url.Action("List").AddMenuParameter()
- });
- }
- }
- }
|