123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using Bowin.Web.Controls.Mvc;
- using Bowin.Common.Utility;
- using Bowin.Common.Data;
- using EMIS.Web.Controls;
- using EMIS.Utility;
- using EMIS.ViewModel;
- using EMIS.ViewModel.EducationManage.EducationArrange;
- using EMIS.CommonLogic.EducationManage.EducationArrange;
- namespace EMIS.Web.Controllers.EducationManage.EducationArrange
- {
- [Authorization]
- public class EducationMissionClassStudentController : Controller
- {
- public IEducationMissionClassStudentServices EducationMissionClassStudentServices { 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("SchoolyearDropdown");
- var campusID = pararms.getExtraGuid("CampusDropdown");
- var collegeID = pararms.getExtraGuid("CollegeDropdown");
- var yearID = pararms.getExtraInt("DictionarySchoolyear") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionarySchoolyear");
- var standardID = pararms.getExtraInt("DictionaryStandard") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryStandard");
- var educationID = pararms.getExtraInt("DictionaryEducation") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryEducation");
- var learningformID = pararms.getExtraInt("DictionaryLearningform") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryLearningform");
- var learnSystem = pararms.getExtraString("DictionaryLearnSystem");
- var classmajorID = pararms.getExtraGuid("ClassmajorComboGrid");
- var coursematerialID = pararms.getExtraGuid("CourseComboGrid");
- var inSchoolStatus = pararms.getExtraInt("DictionaryInschoolStatus") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryInschoolStatus");
- var approvalStatus = pararms.getExtraInt("DictionaryApprovalStatus") == DropdownList.SELECT_ALL ? null : pararms.getExtraInt("DictionaryApprovalStatus");
- return base.Json(EducationMissionClassStudentServices.GetEducationMissionClassStudentViewGrid(configuretView, schoolyearID, campusID, collegeID,
- yearID, standardID, educationID, learningformID, learnSystem, classmajorID, coursematerialID, inSchoolStatus, approvalStatus, (int)pararms.page, (int)pararms.rows));
- }
- /// <summary>
- /// Excel导出
- /// </summary>
- /// <returns></returns>
- [HttpPost]
- public ActionResult Excel()
- {
- NpoiExcelHelper neh = new NpoiExcelHelper();
- ConfiguretView configuretView = ConfiguretExtensions.GetConfiguretermsView(null);
- var schoolyearID = Request.Form["SchoolyearDropdown"] == DropdownList.SELECT_ALL.ToString() ? null : Request.Form["SchoolyearDropdown"].ParseStrTo<Guid>();
- var campusID = Request.Form["CampusDropdown"].ParseStrTo<Guid>();
- var collegeID = Request.Form["CollegeDropdown"].ParseStrTo<Guid>();
- var yearID = Request.Form["DictionarySchoolyear"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionarySchoolyear"].ParseStrTo<int>();
- var standardID = Request.Form["DictionaryStandard"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryStandard"].ParseStrTo<int>();
- var educationID = Request.Form["DictionaryEducation"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryEducation"].ParseStrTo<int>();
- var learningformID = Request.Form["DictionaryLearningform"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryLearningform"].ParseStrTo<int>();
- var learnSystem = Request.Form["DictionaryLearnSystem"].ToString();
- var classmajorID = Request.Form["ClassmajorComboGrid"].ParseStrTo<Guid>();
- var coursematerialID = Request.Form["CourseComboGrid"].ParseStrTo<Guid>();
- var inschoolStatus = Request.Form["DictionaryInschoolStatus"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryInschoolStatus"].ParseStrTo<int>();
- var approvalStatus = Request.Form["DictionaryApprovalStatus"].ParseStrTo<int>() == DropdownList.SELECT_ALL ? null : Request.Form["DictionaryApprovalStatus"].ParseStrTo<int>();
- var dt = EducationMissionClassStudentServices.GetEducationMissionClassStudentViewList(configuretView, schoolyearID, campusID, collegeID, yearID,
- standardID, educationID, learningformID, learnSystem, classmajorID, coursematerialID, inschoolStatus, approvalStatus)
- .Select(x => new
- {
- x.StudentNo,
- x.Name,
- x.SexName,
- x.InSchoolStatusName,
- x.StudentStatusName,
- x.StandardID,
- x.StandardCode,
- x.StandardName,
- x.EducationName,
- x.LearningformName,
- x.LearnSystem,
- x.ClassmajorNo,
- x.ClassmajorName,
- x.ClassNum,
- x.GradeID,
- x.GrademajorCode,
- x.GrademajorName,
- x.CollegeCode,
- x.CollegeName,
- x.CampusNo,
- x.CampusName,
- x.SchoolyearCode,
- x.MissionName,
- x.MissionClassName,
- x.SchedulingClassName,
- x.MainScheduleClassNo,
- x.MainScheduleClassName,
- x.MissionSourceName,
- x.MissionTypeName,
- x.OrderNo,
- x.CourseCode,
- x.CourseName,
- x.DepartmentName,
- x.CourseCollegeName,
- x.CourseStructureName,
- x.CourseCategoryName,
- x.CourseTypeName,
- x.CourseQualityName,
- Credit = x.Credit.HasValue ? x.Credit.Value.ToString("#.#") : null,
- x.TheoryCourse,
- x.Practicehours,
- x.Trialhours,
- x.Totalhours,
- x.ExecHours,
- x.TheoryWeeklyNum,
- x.PracticeWeeklyNum,
- x.TrialWeeklyNum,
- x.SchoolweeksNum,
- x.WeeklyHours,
- x.WeeklyNum,
- x.StartWeeklyNum,
- x.EndWeeklyNum,
- x.StartEndWeeklyNum,
- x.ExecWeeklyNum,
- x.ClassroomTypeName,
- x.ClassroomCode,
- x.ClassroomName,
- x.IsNeedMaterialName,
- x.TeachinglanguageName,
- x.ExaminationModeName,
- x.ResultTypeName,
- x.HandleModeName,
- x.TeachingModeName,
- x.ApprovalStatusName,
- x.Remark
- }).ToTable();
- string[] liststring = {
- "学号", "姓名", "性别", "在校状态", "学籍状态", "专业ID(Value)", "专业代码", "专业名称", RSL.Get("EducationID"), "学习形式",
- "学制", "班级编号", "班级名称", "班序", "年级", "年级专业编号", "年级专业名称", RSL.Get("CollegeCode"), RSL.Get("CollegeName"),
- RSL.Get("CampusCode"), RSL.Get("Campus"), "学年学期", "任务名称", "任务班名称", "排课班名称", "主排课班级编号", "主排课班级名称",
- "任务来源", "任务类型", "任务班序", "课程代码", "课程名称", "开课教研室", "开课院系", "课程结构", "课程属性", "课程类型",
- "课程性质", "课程学分", "理论学时", "实践学时", "实验学时", "总学时", "执行学时", "理论周次", "实践周次", "实验周次", "总周次",
- "周学时", "每周次数", "开始周次", "结束周次", "起止周次", "执行周次", "教室类型", "教室编号", "教室名称", "是否需要教材",
- "授课语言", "考试方式", "成绩类型", "处理方式", "授课方式", "状态", "备注"
- };
- neh.Export(dt, liststring, "任务名单信息" + DateTime.Now.ToString("yyyyMMdd"));
- return Json(new ReturnMessage()
- {
- IsSuccess = true,
- Message = "导出成功。"
- });
- }
- }
- }
|