diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_Main/_sgbak/Index.cshtml.45677.2.2019-11-19.15-27-53.3210 b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_Main/_sgbak/Index.cshtml.45677.2.2019-11-19.15-27-53.3210
deleted file mode 100644
index 0b2354503..000000000
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_Main/_sgbak/Index.cshtml.45677.2.2019-11-19.15-27-53.3210
+++ /dev/null
@@ -1,57 +0,0 @@
-@{
- ViewBag.Title = "问卷管理";
- Layout = "~/Views/Shared/_Index.cshtml";
-}
-
-@Html.AppendJsFile("/Areas/Ask/Views/Ask_Main/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/_sgbak/StuInfoFreshController.cs.97030.5.2020-07-22.15-00-54.4936 b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/_sgbak/StuInfoFreshController.cs.97030.5.2020-07-22.15-00-54.4936
deleted file mode 100644
index a7da809b4..000000000
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/_sgbak/StuInfoFreshController.cs.97030.5.2020-07-22.15-00-54.4936
+++ /dev/null
@@ -1,1055 +0,0 @@
-using Learun.Application.Base.SystemModule;
-using Learun.Application.TwoDevelopment.EducationalAdministration;
-using Learun.Application.TwoDevelopment.LogisticsManagement;
-using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement;
-using Learun.Util;
-using Newtonsoft.Json;
-using NPOI.HSSF.UserModel;
-using NPOI.SS.UserModel;
-using NPOI.XSSF.UserModel;
-using System;
-using System.Collections.Generic;
-using System.Data;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Web;
-using System.Web.Mvc;
-
-namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
-{
- ///
- /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
- /// Copyright (c) 2013-2018 北京泉江科技有限公司
- /// 创 建:超级管理员
- /// 日 期:2019-08-08 17:21
- /// 描 述:新生信息管理
- ///
- public class StuInfoFreshController : MvcControllerBase
- {
- private StuInfoFreshIBLL stuInfoFreshIBLL = new StuInfoFreshBLL();
- private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL();
- private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
- private FinaChargesStandardIBLL finaChargesStandardIBLL = new FinaChargesStandardBLL();
- private AccommodationIBLL accommodationIBLL = new AccommodationBLL();
- private CdMajorIBLL cdMajorIBLL = new CdMajorBLL();
- private CdDeptIBLL cdDeptIBLL = new CdDeptBLL();
-
- #region 视图功能
-
- ///
- /// 主页面
- ///
- ///
- [HttpGet]
- public ActionResult Index()
- {
- return View();
- }
- [HttpGet]
- public ActionResult IndexDC()
- {
- return View();
- }
- [HttpGet]
- public ActionResult PrintSignFlow(string Id)
- {
- if (!string.IsNullOrEmpty(Id))
- {
- var vwinfo = stuInfoFreshIBLL.GetStuInfoFreshEntity(Id);
- vwinfo.MajorName = cdMajorIBLL.GetCdMajorEntityByMajorNo(vwinfo.MajorNo).MajorName;
- return View(vwinfo);
- }
- else
- {
- return View();
- }
- }
-
- ///
- /// 根据区域统计
- ///
- ///
- [HttpGet]
- public ActionResult StatisticsArea()
- {
- return View();
- }
-
-
- ///
- /// 表单页
- ///
- ///
- [HttpGet]
- public ActionResult Form()
- {
- var url = Config.GetValue("defaultheadimg");
- ViewBag.Url = url;
- return View();
- }
- [HttpGet]
- public ActionResult FormDC()
- {
- var url = Config.GetValue("defaultheadimg");
- ViewBag.Url = url;
- return View();
- }
- ///
- /// 表单查看页
- ///
- ///
- [HttpGet]
- public ActionResult FormView()
- {
- var url = Config.GetValue("defaultheadimg");
- ViewBag.Url = url;
- return View();
- }
- ///
- /// 表单【学子在线】
- ///
- ///
- [HttpGet]
- public ActionResult FormOfStudent()
- {
- var url = Config.GetValue("defaultheadimg");
- ViewBag.Url = url;
- return View();
- }
- ///
- /// 新生报到管理页面
- ///
- ///
- [HttpGet]
- public ActionResult RegisterIndex()
- {
- return View();
- }
- ///
- /// 新生档案管理页面
- ///
- ///
- [HttpGet]
- public ActionResult CollectFileIndex()
- {
- return View();
- }
- ///
- /// 新生领取用品页面
- ///
- ///
- [HttpGet]
- public ActionResult GetKeyIndex()
- {
- return View();
- }
- ///
- /// 新生缴费管理页面
- ///
- ///
- [HttpGet]
- public ActionResult PayFeeIndex()
- {
- return View();
- }
- ///
- /// 新生缴费管理表单页
- ///
- ///
- [HttpGet]
- public ActionResult PayFeeForm()
- {
- return View();
- }
-
- ///
- /// 主页面【学子在线-新生信息完善】
- ///
- ///
- [HttpGet]
- public ActionResult IndexOfStudent()
- {
- return View();
- }
- ///
- /// 分配班级
- ///
- ///
- [HttpGet]
- public ActionResult AllocationClass()
- {
- return View();
- }
- [HttpGet]
- public ActionResult AllocationClassDC()
- {
- return View();
- }
- ///
- /// 分配宿舍
- ///
- ///
- [HttpGet]
- public ActionResult AllocationDormitory()
- {
- return View();
- }
- ///
- /// 分配床位
- ///
- ///
- [HttpGet]
- public ActionResult AllocationBed()
- {
- return View();
- }
- ///
- /// 导入床位页
- ///
- ///
- [HttpGet]
- public ActionResult ImportBedForm()
- {
- return View();
- }
- ///
- /// 导出学生宿页舍
- ///
- ///
- [HttpGet]
- public ActionResult ExportBedForm()
- {
- return View();
- }
- ///
- /// 新生信息统计
- ///
- ///
- [HttpGet]
- public ActionResult StatisticIndex()
- {
- var academic = Common.GetSemesterAndYear();
- ViewBag.Grade = academic.AcademicYearShort.Substring(0, 2);
- return View();
- }
- #endregion
-
- #region 获取数据
-
- ///
- /// 获取列表数据
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetList(string queryJson)
- {
- var data = stuInfoFreshIBLL.GetList(queryJson);
- return Success(data);
- }
- ///
- /// 获取列表分页数据
- /// 分页参数
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject();
- var data = stuInfoFreshIBLL.GetPageList(paginationobj, queryJson);
- foreach (var item in data)
- {
- if (item.SignUpTime.HasValue)
- item.SignUpTime = item.SignUpTime.Value.ToShortDateString();
- }
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- ///
- /// 获取表单数据
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetFormData(string keyValue)
- {
- var StuInfoFreshData = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue);
- //获取头像地址
- var url = Config.GetValue("defaultheadimg");
- if (StuInfoFreshData.IsPhoto == true && !string.IsNullOrEmpty(StuInfoFreshData.Photo))
- {
- var annexesFileEntity = annexesFileIBLL.GetEntity(StuInfoFreshData.Photo);
- if (annexesFileEntity != null)
- {
- url = "/" + annexesFileEntity.F_FilePath.Substring(annexesFileEntity.F_FilePath.IndexOf("Resource"));
- }
- }
- var StuInfoFreshEmergePeopleData = stuInfoFreshIBLL.GetStuInfoFreshEmergePeopleList(StuInfoFreshData.ID);
- var StuInfoFreshFamilyData = stuInfoFreshIBLL.GetStuInfoFreshFamilyList(StuInfoFreshData.ID);
- var jsonData = new
- {
- StuInfoFresh = StuInfoFreshData,
- StuInfoFreshEmergePeople = StuInfoFreshEmergePeopleData,
- StuInfoFreshFamily = StuInfoFreshFamilyData,
- Url = url
- };
- return Success(jsonData);
- }
- ///
- /// 获取分配宿舍列表
- ///
- ///
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetDormitorys(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject();
- var data = stuInfoFreshIBLL.GetDormitorys(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- ///
- /// 获取分配宿舍列表
- ///
- ///
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetDormitorys2(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject();
- var data = stuInfoFreshIBLL.GetDormitorys2(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
-
- ///
- /// 获取分配宿舍左侧树形数据
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetDormitoryTree()
- {
- var data = stuInfoFreshIBLL.GetTree().OrderBy(x => x.value);
- return Success(data);
- }
-
- ///
- /// 获取分配床位左侧树形数据
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetBedTree(string classNo, string gender)
- {
- var data = stuInfoFreshIBLL.GetBedTree(classNo, gender).OrderBy(x => x.text);
- return Success(data);
- }
- #endregion
-
- #region 提交数据
- ///
- /// 删除实体数据
- /// 主键
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult DeleteForm(string keyValue)
- {
- stuInfoFreshIBLL.DeleteEntity(keyValue);
- return Success("删除成功!");
- }
- ///
- /// 保存实体数据(新增、修改)
- /// 主键
- ///
- ///
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SaveForm(string keyValue, string strEntity, string strstuInfoFreshEmergePeopleList, string strstuInfoFreshFamilyList)
- {
- StuInfoFreshEntity entity = strEntity.ToObject();
- if (!string.IsNullOrEmpty(entity.Photo))
- {
- entity.IsPhoto = true;
- }
- else
- {
- entity.IsPhoto = false;
- }
- List stuInfoFreshEmergePeopleList = strstuInfoFreshEmergePeopleList.ToObject>();
- List stuInfoFreshFamilyList = strstuInfoFreshFamilyList.ToObject>();
- stuInfoFreshIBLL.SaveEntity(keyValue, entity, stuInfoFreshEmergePeopleList, stuInfoFreshFamilyList);
- return Success("保存成功!");
- }
-
- #endregion
-
- #region 扩展数据
-
- ///
- /// 拍照
- ///
- ///
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult DoPhoto(string base64url)
- {
- var loginuser = LoginUserInfo.Get();
- //头像处理
- var folderId = Guid.NewGuid().ToString();
-
- string filePath = Config.GetValue("AnnexesFile");
- string uploadDate = DateTime.Now.ToString("yyyyMMdd");
- string FileEextension = ".png";
- string fileGuid = Guid.NewGuid().ToString();
-
- string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, loginuser.account, uploadDate, fileGuid, FileEextension);
-
- //创建文件夹
- string path = Path.GetDirectoryName(virtualPath);
- Directory.CreateDirectory(path);
- AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity();
- if (!System.IO.File.Exists(virtualPath))
- {
- byte[] bytes = Convert.FromBase64String(base64url.Replace("data:image/png;base64,", ""));
- FileInfo file = new FileInfo(virtualPath);
- FileStream fs = file.Create();
- fs.Write(bytes, 0, bytes.Length);
- fs.Close();
-
- //文件信息写入数据库
- fileAnnexesEntity.F_Id = fileGuid;
- fileAnnexesEntity.F_FileName = "userphoto.png";
- fileAnnexesEntity.F_FilePath = virtualPath;
- fileAnnexesEntity.F_FileSize = bytes.Length.ToString();
- fileAnnexesEntity.F_FileExtensions = FileEextension;
- fileAnnexesEntity.F_FileType = FileEextension.Replace(".", "");
- fileAnnexesEntity.F_CreateUserId = loginuser.userId;
- fileAnnexesEntity.F_CreateUserName = loginuser.realName;
- annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity);
- }
-
- var data = new
- {
- Url = virtualPath,
- AnnexesFileId = fileGuid
- };
- return Success(data);
- }
-
- ///
- ///确认报到、取消报到
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult IsRegister(string keyValue, string status)
- {
- stuInfoFreshIBLL.IsRegister(keyValue, status);
- return Success("操作成功");
- }
- ///
- ///收取学生档案
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult IsCollectFile(string keyValue, string status)
- {
- stuInfoFreshIBLL.IsCollectFile(keyValue, status);
- return Success("操作成功");
- }
- ///
- ///领取用品
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult IsGetKey(string keyValue, string status)
- {
- stuInfoFreshIBLL.IsGetKey(keyValue, status);
- return Success("操作成功");
- }
- ///
- ///缴费
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult IsPayFee(string keyValue, string status)
- {
- stuInfoFreshIBLL.IsPayFee(keyValue, status);
- return Success("操作成功");
- }
- ///
- /// 获取新生缴费明细
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPayFeeDetail(string keyValue)
- {
- var StuInfoFreshData = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue);
- var FinaChargesStandardList = new List();
- if (!string.IsNullOrEmpty(StuInfoFreshData.ClassNo) && !string.IsNullOrEmpty(StuInfoFreshData.MajorNo))
- {
- var ClassInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(StuInfoFreshData.ClassNo);
- if (ClassInfoEntity != null)
- {
- var academicAndYear = Common.GetSemesterAndYear();
- FinaChargesStandardList = finaChargesStandardIBLL.GetFinaChargesStandardListByMajorNoOfNotAll(StuInfoFreshData.MajorNo, academicAndYear.AcademicYearShort, academicAndYear.Semester, ClassInfoEntity.Grade).ToList();
- }
- }
- var PayFeeTotal = FinaChargesStandardList.Select(x => x.Standard).Sum();
- var jsonData = new
- {
- FinaChargesStandardList = FinaChargesStandardList,
- PayFeeTotal = PayFeeTotal
- };
- return Success(jsonData);
- }
-
- ///
- /// 分配班级
- ///
- ///
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult DoAllocationClass(string classNo, string dataJson)
- {
- var StuInfoFreshList = JsonConvert.DeserializeObject>(dataJson);
- var ClassInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(classNo);
- if (ClassInfoEntity == null)
- {
- return Fail("分配的班级不存在!");
- }
- //获取当前班级已有人数
- var hasList = stuInfoFreshIBLL.GetStuInfoFreshListByClassNo(classNo);
- var hasLength = hasList.Count();
- var tempLength = hasLength;
- if (StuInfoFreshList.Any())
- {
- foreach (var item in StuInfoFreshList)
- {
- tempLength++;
- item.ClassNo = classNo;
- item.DeptNo = ClassInfoEntity.DeptNo;
- item.MajorNo = ClassInfoEntity.MajorNo;
- item.Grade = ClassInfoEntity.Grade;
- item.StuNo = string.Format("{0}{1}", classNo, tempLength < 10 ? "0" + tempLength : tempLength.ToString());
- }
- }
- stuInfoFreshIBLL.DoAllocationClass(StuInfoFreshList);
-
- return Success("分配成功!");
- }
-
- ///
- /// 分配宿舍
- ///
- ///
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult DoAllocationDormitory(string classNo, string dataJson)
- {
- var acc_DormitoryBuildEntities = JsonConvert.DeserializeObject>(dataJson);
- foreach (var entity in acc_DormitoryBuildEntities)
- {
- //预分床位数量是否合理
- if (entity.PlanBedNum < 1)
- {
- return Fail("预分床位数量至少为1位!");
- }
- if (entity.PlanBedNum > entity.RemainBedNum)
- {
- return Fail("预分床位数量不能超出可分配床位数量!");
- }
-
- entity.PlanClassNo = classNo;
- }
- stuInfoFreshIBLL.DoAllocationDormitory(acc_DormitoryBuildEntities);
- return Success("分配成功!");
- }
-
- ///
- /// 取消分配宿舍
- ///
- ///
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult CancelAllocationDormitory(string classNo, string dataJson)
- {
- var acc_DormitoryBuildEntities = JsonConvert.DeserializeObject>(dataJson);
- foreach (var entity in acc_DormitoryBuildEntities)
- {
- //取消已分配床位数量是否合理
- if (entity.CancelUseBedNum < 1)
- {
- return Fail("取消已分配床位数量至少为1位!");
- }
- if (entity.CancelUseBedNum > entity.UseBedNum)
- {
- return Fail("取消已分配床位数量不能超出已分配床位数量!");
- }
-
- entity.PlanClassNo = classNo;
- }
- stuInfoFreshIBLL.CancelAllocationDormitory(acc_DormitoryBuildEntities);
- return Success("取消分配成功!");
- }
-
- ///
- /// 分配床位
- ///
- ///
- ///
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult DoAllocationBed(string dormitoryNo, string keyValue)
- {
- stuInfoFreshIBLL.DoAllocationBed(dormitoryNo, keyValue);
- return Success("分配成功!");
-
- }
-
- ///
- /// 自动分配床位
- ///
- ///
- ///
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult DoAllocationBedOfAuto(string classNo)
- {
- stuInfoFreshIBLL.DoAllocationBedOfAuto(classNo);
- return Success("分配成功!");
-
- }
- [HttpGet]
- [AjaxOnly]
- public ActionResult ConfirmDormitory()
- {
- stuInfoFreshIBLL.ConfirmDormitory();
- return Success("操作成功!");
-
- }
- [HttpGet]
- [AjaxOnly]
- public ActionResult ConfirmDormitoryTwo()
- {
- stuInfoFreshIBLL.ConfirmDormitoryTwo();
- return Success("操作成功!");
-
- }
-
- ///
- /// 导入学籍信息
- ///
- ///
- ///
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult ImportStuInfoBasic()
- {
- stuInfoFreshIBLL.ImportStuInfoBasic();
- return Success("导入学籍信息成功!");
-
- }
-
-
- ///
- /// 导入床位
- ///
- ///
- public ActionResult ImportBed(HttpPostedFileBase filedata)
- {
-
- if (filedata == null || filedata.FileName == null || filedata.ContentLength == 0)
- {
- if (Request.Files.Count > 0)
- {
- filedata = Request.Files[0];
- }
- }
- if (filedata == null)
- {
- return Fail("未获取到文件");
- }
-
- var pathoffirst = Config.GetValue("AnnexesFile");
- var pathofsecond = "/DormitoryBuildImportFile";
- var pathofthird = DateTime.Now.ToString("yyyyMMdd");
- var filename = filedata.FileName;
- var exten = Path.GetExtension(filename);
- var fileguid = Guid.NewGuid().ToString();
- var pathoffull = string.Format("{0}/{1}/{2}/{3}{4}", pathoffirst, pathofsecond, pathofthird, fileguid, exten);
- var pathofdown = string.Format("{0}/{1}/{2}{3}", pathofsecond, pathofthird, fileguid, exten);
- var directory = Path.GetDirectoryName(pathoffull);
- if (!Directory.Exists(directory))
- {
- Directory.CreateDirectory(directory);
- }
- //保存文件
- filedata.SaveAs(pathoffull);
- //读取文件
- var filePath = pathoffull;
- var strMsg = string.Empty;
- IWorkbook wk = null;
- string extension = System.IO.Path.GetExtension(filePath);
- try
- {
- FileStream fs = System.IO.File.OpenRead(filePath);
- if (extension.Equals(".xls"))
- {
- wk = new HSSFWorkbook(fs);
- }
- else
- {
- wk = new XSSFWorkbook(fs);
- }
-
- fs.Close();
- //读取当前表数据
- ISheet sheet = wk.GetSheetAt(0);
-
- IRow row = sheet.GetRow(0);
- int offset = 0;
- //导入床位成功数量
- int bedSuccNum = 0;
- var stuinfofreshlist = stuInfoFreshIBLL.GetList("{}");
- var accommodationList = accommodationIBLL.GetList();
- for (int i = 1; i <= sheet.LastRowNum; i++)
- {
- row = sheet.GetRow(i);
- if (row != null)
- {
- //姓名0、学号1、班级2、宿舍楼3、单元4、楼层5、房间6、床位7
- var stuInfoFreshEntity = stuinfofreshlist.FirstOrDefault(m => m.StuNo == row.GetCell(1).ToString());
- if (stuInfoFreshEntity == null)
- {
- continue;
- }
- var classInfoEntity = classInfoIBLL.GetClassInfoEntityByClassName(row.GetCell(2).ToString());
- if (classInfoEntity == null)
- {
- continue;
- }
- if (accommodationList.Any())
- {
- var build = accommodationList.FirstOrDefault(x => x.BuildType == "1" && x.Name == row.GetCell(3).ToString());
- if (build != null)
- {
- var unit = accommodationList.FirstOrDefault(x => x.BuildType == "2" && x.ParentID == build.ID && x.Name == row.GetCell(4).ToString());
- if (unit != null)
- {
- var floor = accommodationList.FirstOrDefault(x => x.BuildType == "3" && x.ParentID == unit.ID && x.Name == row.GetCell(5).ToString());
- if (floor != null)
- {
- var room = accommodationList.FirstOrDefault(x => x.BuildType == "4" && x.ParentID == floor.ID && x.Name == row.GetCell(6).ToString());
- if (room != null)
- {
- var bed = accommodationList.FirstOrDefault(x => x.BuildType == "5" && x.ParentID == room.ID && x.Name == row.GetCell(7).ToString());
- if (bed != null)
- {
- //分配床位
- stuInfoFreshIBLL.DoAllocationBed(bed.ID, stuInfoFreshEntity.ID);
- bedSuccNum++;
- //分配宿舍
- var alist = new List();
- var accommodationEntity = new Acc_DormitoryBuildEntity();
- accommodationEntity.ID = room.ID;
- accommodationEntity.PlanBedNum = 1;
- accommodationEntity.PlanClassNo = classInfoEntity.ClassNo;
- accommodationEntity.bedId = bed.ID;
- alist.Add(accommodationEntity);
- stuInfoFreshIBLL.ImportDormitory(alist);
- }
- }
- }
- }
- }
- }
-
- }
- }
- strMsg = "导入床位成功" + bedSuccNum + "个!";
- }
-
- catch (Exception e)
- {
- return Fail("导入床位失败!" + strMsg);
- }
-
- return Success("导入床位成功!" + strMsg);
-
- }
-
- ///
- /// 导出学生宿舍信息
- ///
- ///
- public FileResult ExportBed(string queryJson)
- {
- var fileHead = "学生宿舍信息";
- var postData = JsonConvert.DeserializeObject(queryJson);
- if (!string.IsNullOrEmpty(postData.ClassNo))
- {
- var classInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(postData.ClassNo);
- fileHead = classInfoEntity?.ClassName + fileHead;
- }
- else if (!string.IsNullOrEmpty(postData.MajorNo))
- {
- var majorEntity = cdMajorIBLL.GetCdMajorEntityByMajorNo(postData.MajorNo);
- fileHead = majorEntity?.MajorName + fileHead;
- }
- else if (!string.IsNullOrEmpty(postData.DeptNo))
- {
- var deptEntity = cdDeptIBLL.GetCdDeptEntityByNo(postData.DeptNo);
- fileHead = deptEntity?.DeptName + fileHead;
- }
-
- FileStreamResult result = null;
-
- HSSFWorkbook book = new HSSFWorkbook();
- ISheet sheet = book.CreateSheet("Sheet0");
- for (int i = 0; i <= 9; i++)
- {
- sheet.SetColumnWidth(i, 256 * 15);
- }
- IRow headrow = sheet.CreateRow(0);
- headrow.CreateCell(0).SetCellValue(fileHead);
- sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0, 0, 0, 9));
- IRow cellrow = sheet.CreateRow(1);
- cellrow.CreateCell(0).SetCellValue("姓名");
- cellrow.CreateCell(1).SetCellValue("学号");
- cellrow.CreateCell(2).SetCellValue("系");
- cellrow.CreateCell(3).SetCellValue("专业");
- cellrow.CreateCell(4).SetCellValue("班级");
- cellrow.CreateCell(5).SetCellValue("宿舍楼");
- cellrow.CreateCell(6).SetCellValue("单元");
- cellrow.CreateCell(7).SetCellValue("楼层");
- cellrow.CreateCell(8).SetCellValue("房间");
- cellrow.CreateCell(9).SetCellValue("床位");
-
- //获取数据源
- var data = stuInfoFreshIBLL.GetList(queryJson).ToList();
- foreach (var item in data)
- {
- var i = data.IndexOf(item);
- IRow row = sheet.CreateRow(2 + i);
- row.CreateCell(0).SetCellValue(item.StuName);
- row.CreateCell(1).SetCellValue(item.StuNo);
- row.CreateCell(2).SetCellValue(item.DeptName);
- row.CreateCell(3).SetCellValue(item.MajorName);
- row.CreateCell(4).SetCellValue(item.ClassName);
- row.CreateCell(5).SetCellValue(item.Build);
- row.CreateCell(6).SetCellValue(item.Unit);
- row.CreateCell(7).SetCellValue(item.floor);
- row.CreateCell(8).SetCellValue(item.Room);
- row.CreateCell(9).SetCellValue(item.Bed);
- }
-
- var fileguid = Guid.NewGuid().ToString();
- var path = Server.MapPath("~/Resource/DormitoryBuildExportFile/" + DateTime.Now.ToString("yyyyMMdd") + "/");
- var pathoffull = path + fileguid + ".xls";
- if (!Directory.Exists(path))
- {
- Directory.CreateDirectory(path);
- }
-
- FileStream fswrite = new FileStream(pathoffull, FileMode.OpenOrCreate, FileAccess.Write);
- book.Write(fswrite);
- fswrite.Close();
- FileStream fsread = new FileStream(pathoffull, FileMode.OpenOrCreate, FileAccess.Read);
- result = File(fsread, "application/ms-excel", fileHead + ".xls");
-
- return result;
- }
-
- ///
- /// 删除宿舍信息
- ///
- ///
- ///
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult DeleteBed(string keyValue)
- {
- stuInfoFreshIBLL.DeleteBed(keyValue);
- return Success("删除成功!");
-
- }
-
-
- ///
- /// 年级下拉框信息【新生信息统计】
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetGradeData()
- {
- var data = WebHelper.GenerateNearByYear2();
-
- return Success(data);
- }
- ///
- /// 获取列表数据
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetStatisticList(string queryJson)
- {
- var data = stuInfoFreshIBLL.GetList(queryJson);
- var list = data.Where(x => !string.IsNullOrEmpty(x.MajorNo)).GroupBy(x => x.MajorNo).Select(x => new StatisticModel
- {
- MajorNo = x.Key,
- MajorName = x.FirstOrDefault()?.MajorName,
- Grade = x.FirstOrDefault()?.Grade,
- TotalNum = x.Count(),
- InfoNum = x.Count(y => y.IsStudentEdit == true),
- RegisterNum = x.Count(y => y.RegisterStatus == "1"),
- PayFeeNum = x.Count(y => y.PayFeeStatus == "1"),
- GetKeyNum = x.Count(y => y.GetKeyStatus == "1"),
- }).OrderBy(x => x.MajorNo);
-
- //var aa = new StatisticModel
- //{
- // MajorNo = "全校",
- // MajorName = "全校",
- // Grade = list.FirstOrDefault()?.Grade,
- // TotalNum = list.Select(x => x.TotalNum).Sum(),
- // InfoNum = list.Select(x => x.InfoNum).Sum(),
- // RegisterNum = list.Select(x => x.RegisterNum).Sum(),
- // PayFeeNum = list.Select(x => x.PayFeeNum).Sum(),
- // GetKeyNum = list.Select(x => x.GetKeyNum).Sum(),
- //};
-
- //var allList = new List();
- //allList.Add(aa);
- //allList.AddRange(list);
-
- return Success(list);
-
-
- }
- public class StatisticModel
- {
- public string MajorNo { get; set; }
- public string MajorName { get; set; }
- public string Grade { get; set; }
- public int TotalNum { get; set; }
- public int InfoNum { get; set; }
- public int RegisterNum { get; set; }
- public int PayFeeNum { get; set; }
- public int GetKeyNum { get; set; }
- }
- ///
- /// 获取列表数据
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetStatisticArea(string queryJson)
- {
- var data = stuInfoFreshIBLL.GetList(queryJson);
- var list = data.GroupBy(x => x.ProvinceNo).Select(x => new
- {
- ProvinceNo = x.Key,
- TotalNum = x.Count(),
- RegisterNum = x.Count(y => y.RegisterStatus == "1"),
- BoyNum = x.Count(y => y.GenderNo == "1"),
- GirlNum = x.Count(y => y.GenderNo == "0"),
- }).OrderByDescending(a => a.TotalNum).ToList();
- var item = new
- {
- ProvinceNo = "总计",
- TotalNum = data.Count(),
- RegisterNum = data.Count(y => y.RegisterStatus == "1"),
- BoyNum = data.Count(y => y.GenderNo == "1"),
- GirlNum = data.Count(y => y.GenderNo == "0"),
- };
- var zhounei = data.Where(a => a.ProvinceNo.Contains("5121"));
- var item1 = new
- {
- ProvinceNo = "州内",
- TotalNum = zhounei.Count(),
- RegisterNum = zhounei.Count(y => y.RegisterStatus == "1"),
- BoyNum = zhounei.Count(y => y.GenderNo == "1"),
- GirlNum = zhounei.Count(y => y.GenderNo == "0"),
-
- };
- var zhouwai = data.Where(a => !a.ProvinceNo.Contains("5121"));
- var item2 = new
- {
-
- ProvinceNo = "州外",
- TotalNum = zhouwai.Count(),
- RegisterNum = zhouwai.Count(y => y.RegisterStatus == "1"),
- BoyNum = zhouwai.Count(y => y.GenderNo == "1"),
- GirlNum = zhouwai.Count(y => y.GenderNo == "0"),
- };
- list.Add(item);
- list.Add(item1);
- list.Add(item2);
-
- // var jsonData = new
- // {
- // rows = list,
- // total = list.Count(),
- // page = 1,
- // records = list.Count();
- //};
- return Success(list);
-
-
- }
-
- #endregion
-
- }
-}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/_sgbak/StuScoreController.cs.49455.6.2020-01-07.16-34-05.7536 b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/_sgbak/StuScoreController.cs.49455.6.2020-01-07.16-34-05.7536
deleted file mode 100644
index af3335705..000000000
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/_sgbak/StuScoreController.cs.49455.6.2020-01-07.16-34-05.7536
+++ /dev/null
@@ -1,807 +0,0 @@
-using Hangfire;
-using Learun.Application.Organization;
-using Learun.Application.TwoDevelopment.EducationalAdministration;
-using Learun.Util;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Data;
-using System.Linq;
-using System.Web.Mvc;
-
-namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
-{
- ///
- /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
- /// Copyright (c) 2013-2018 北京泉江科技有限公司
- /// 创 建:超级管理员
- /// 日 期:2019-06-14 11:02
- /// 描 述:考试成绩同步
- ///
- public class StuScoreController : MvcControllerBase
- {
- private StuScoreIBLL stuScoreIBLL = new StuScoreBLL();
- private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
- private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
- private CdMajorIBLL cdMajorIBLL = new CdMajorBLL();
- private UserIBLL userIBLL = new UserBLL();
-
- #region 视图功能
-
- ///
- /// 主页面
- ///
- ///
- [HttpGet]
- public ActionResult Index()
- {
- return View();
- }
- [HttpGet]
- public ActionResult Monitor()
- {
- return View();
- }
- ///
- /// 表单页
- ///
- ///
- [HttpGet]
- public ActionResult Form()
- {
- return View();
- }
- ///
- /// 主页面【班级学生成绩初始化】
- ///
- ///
- [HttpGet]
- public ActionResult ClassIndex()
- {
- return View();
- }
- ///
- /// 班级成绩查看页面
- ///
- ///
- [HttpGet]
- public ActionResult ScoreQueryIndex()
- {
- return View();
- }
- ///
- /// 全院班级成绩查看页面
- ///
- ///
- [HttpGet]
- public ActionResult AllScoreQueryIndex()
- {
- return View();
- }
- ///
- /// 新版成绩录入
- ///
- ///
- [HttpGet]
- public ActionResult InputScoreIndex()
- {
- return View();
- }
- ///
- /// 新版成绩录入
- ///
- ///
- [HttpGet]
- public ActionResult InputScoreIndexInTeacher()
- {
- return View();
- }
- ///
- /// 成绩统计分析
- ///
- ///
- [HttpGet]
- public ActionResult ScoreStatisticAnalysis()
- {
- return View();
- }
-
- ///
- /// 学生成绩录入可去审核页面
- ///
- ///
- [HttpGet]
- public ActionResult ScoreInputCancelIndex()
- {
- return View();
- }
- ///
- /// 学生成绩录入可去审核页面
- ///
- ///
- [HttpGet]
- public ActionResult ScoreInputCancelForm()
- {
- return View();
- }
- #endregion
-
- #region 获取数据
-
- ///
- /// 获取列表数据
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetList(string queryJson)
- {
- var data = stuScoreIBLL.GetList(queryJson);
- return Success(data);
- }
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetMonitorList(string queryJson)
- {
- var data = stuScoreIBLL.GetMonitorList(queryJson);
- return Success(data);
- }
- ///
- /// 获取列表分页数据
- /// 分页参数
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject();
- var data = stuScoreIBLL.GetPageList(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- ///
- /// 获取表单数据
- /// 主键
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetFormData(string keyValue)
- {
- var data = stuScoreIBLL.GetEntity(keyValue);
- return Success(data);
- }
- ///
- /// 获取列表分页数据
- /// 分页参数
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetScoreInputCancelPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject();
-
- var aa = JsonConvert.DeserializeObject(queryJson);
-
- var data = new List();
- if (!string.IsNullOrEmpty(aa.AcademicYearNo) || !string.IsNullOrEmpty(aa.Semester) || !string.IsNullOrEmpty(aa.EmpNo) || !string.IsNullOrEmpty(aa.LessonNo) || !string.IsNullOrEmpty(aa.ClassNo) || !string.IsNullOrEmpty(aa.StuNo))
- {
- data = stuScoreIBLL.GetScoreInputCancelPageList(paginationobj, queryJson).ToList();
- }
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
- ///
- /// 获取表单数据
- /// 主键
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetScoreInputCancelFormData(string keyValue)
- {
- var data = stuScoreIBLL.GetEntity(keyValue);
- var StuSelectLessonListData = stuScoreIBLL.GetStuSelectLessonListEntity(data);
- var jsonData = new
- {
- StuScore = data,
- StuSelectLessonList = StuSelectLessonListData
- };
- return Success(jsonData);
- }
-
- ///
- /// 获取列表数据
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetEntityByJson(string queryJson)
- {
- var data = stuScoreIBLL.GetEntityByJson(queryJson);
- return Success(data);
- }
- #endregion
-
- #region 提交数据
-
- ///
- /// 删除实体数据
- /// 主键
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult DeleteForm(string keyValue)
- {
- stuScoreIBLL.DeleteEntity(keyValue);
- return Success("删除成功!");
- }
- [HttpPost]
- [AjaxOnly]
- public ActionResult Submit(string AcademicYearNo, string Semester, string LessonNo, string TeachClassNo, string EmpNo, string EditUserId)
- {
- stuScoreIBLL.SubmitStuScore(AcademicYearNo, Semester, LessonNo, TeachClassNo, EmpNo);
-
- var userEntity = userIBLL.GetEntityByAccount(EditUserId);
- var name = EditUserId + "_" + userEntity?.F_RealName + "_成绩录入";
- //删除任务
- RecurringJob.RemoveIfExists(name);
-
- return Success("操作成功!");
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult SyncList()
- {
- stuScoreIBLL.SyncList();
- return Success("同步成功!");
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult DeleteList()
- {
- stuScoreIBLL.DeleteList();
- return Success("清空成功!");
- }
- ///
- /// 保存实体数据(新增、修改)
- /// 主键
- ///
- ///
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SaveForm(string keyValue, StuScoreEntity entity)
- {
- stuScoreIBLL.SaveEntity(keyValue, entity);
- return Success("保存成功!");
- }
- #endregion
-
- #region 扩展数据
-
- ///
- /// 获取班级成绩初始化分页数据
- /// 分页参数
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageListAboutClass(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject();
- var data = stuScoreIBLL.GetPageListAboutClass(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
-
- ///
- /// 班级学生成绩录入初始化
- ///
- ///
- [HttpPost]
- [AjaxOnly]
- public ActionResult DoInitAboutClass(string academicYearNo, string semester, string classNo)
- {
- stuScoreIBLL.DoInitAboutClass(academicYearNo, semester, classNo);
- return Success("初始化成功!");
- }
-
- ///
- /// 学年下拉框信息【班级成绩查看】
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetAcademicYearNoData()
- {
- var data = stuScoreIBLL.GetAcademicYearNoData();
-
- return Success(data);
- }
- ///
- /// 学期下拉框信息【班级成绩查看】
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetSemesterData()
- {
- var data = WebHelper.GenerateNearBySemeter();
-
- return Success(data);
- }
- ///
- /// 班级下拉框信息【成绩录入新页面】
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetClassNoDataOfAll(string lessonNo)
- {
- var data = stuScoreIBLL.GetClassNoData("", "", lessonNo);
-
- return Success(data);
- }
- ///
- /// 班级下拉框信息【班级成绩查看】
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetClassNoData(string lessonNo)
- {
- var loginInfo = LoginUserInfo.Get();
- var data = stuScoreIBLL.GetClassNoData(loginInfo.account, loginInfo.Description, lessonNo);
-
- return Success(data);
- }
- ///
- /// 班级下拉框信息【全院班级成绩查看】
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetAllClassNoData()
- {
- var data = stuScoreIBLL.GetClassNoData("", "", "");
-
- return Success(data);
- }
- ///
- /// 教师下拉框信息【学生成绩录入可去审核】
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetEmpNoData()
- {
- var loginInfo = LoginUserInfo.Get();
- var data = stuScoreIBLL.GetEmpNoData(loginInfo.account, loginInfo.Description);
-
- return Success(data);
- }
- ///
- /// 课程下拉框信息【学生成绩录入可去审核】
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetLessonNoDataOfAll()
- {
- var loginInfo = LoginUserInfo.Get();
- var data = stuScoreIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description);
-
- return Success(data);
- }
- ///
- /// 课程下拉框 带编号
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetLessonNoDataOfAllWithNo()
- {
- var data = stuScoreIBLL.GetLessonNoDataOfAll("", "");
- foreach (var item in data)
- {
- item.text = string.Format("{0}({1})", item.text, item.value);
- }
-
- return Success(data);
- }
- ///
- /// 课程下拉框 带编号
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetLessonNoDataWithNo()
- {
- var loginInfo = LoginUserInfo.Get();
- var data = stuScoreIBLL.GetLessonNoDataOfAll(loginInfo.account, loginInfo.Description);
- foreach (var item in data)
- {
- item.text = string.Format("{0}({1})", item.text, item.value);
- }
-
- return Success(data);
- }
- ///
- /// 课程信息【班级成绩查看】
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetLessonNoData(string academicYearNo, string semester, string classNo)
- {
- var data = stuScoreIBLL.GetLessonNoData(academicYearNo, semester, classNo).OrderBy(x => x.value);
-
- return Success(data);
- }
-
- ///
- /// 获取班级成绩列表
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetScoreListByClassNo(string queryJson)
- {
- var data = stuScoreIBLL.GetScoreListByClassNo(queryJson);
-
- var aa = data.GroupBy(x => new { x.StuNo, x.StuName, x.StuId }).Select(x => new
- {
- StuId = x.Key.StuId,
- StuNo = x.Key.StuNo,
- StuName = x.Key.StuName,
- TotalScore = x.Select(y => y.Score).Sum(),
- LessonInfo = x.Select(y => new { y.LessonNo, y.LessonName, y.Score }).OrderBy(y => y.LessonNo)
- }).OrderByDescending(x => x.TotalScore);
-
- var result = new List>();
- foreach (var item in aa)
- {
- var aaa = new Dictionary();
- aaa.Add("StuId", item.StuId);
- aaa.Add("StuNo", item.StuNo);
- aaa.Add("StuName", item.StuName);
- aaa.Add("TotalScore", item.TotalScore.ToString());
- foreach (var lessonInfoItem in item.LessonInfo)
- {
- aaa.Add(lessonInfoItem.LessonNo, lessonInfoItem.Score.ToString());
- }
-
- result.Add(aaa);
- }
-
- return Success(result);
- }
-
- public ActionResult GetScoreCharts(string AcademicYearNo, string Semester, string ClassNo, string LessonNo)
- {
- var data = stuScoreIBLL.GetScoreCharts(AcademicYearNo, Semester, ClassNo, LessonNo);
- return Success(data);
- }
-
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetScoreInfo(string queryJson)
- {
- var data = stuScoreIBLL.GetScoreInfo(queryJson);
- return JsonResult(data);
- }
-
- ///
- /// 导出班级成绩列表
- ///
- ///
- //[HttpGet]
- //[AjaxOnly]
- [HttpPost, ValidateInput(false)]
- public ActionResult ExportScoreListByClassNo(string queryJson)
- {
- var queryModel = JsonConvert.DeserializeObject(queryJson);
- var className = string.Empty;
- if (!string.IsNullOrEmpty(queryModel.ClassNo))
- {
- var classInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(queryModel.ClassNo);
- className = classInfoEntity != null ? classInfoEntity.ClassName : string.Empty;
- }
-
- var data = stuScoreIBLL.GetScoreListByClassNo(queryJson);
- var aa = data.GroupBy(x => new { x.StuNo, x.StuName }).Select(x => new
- {
- StuNo = x.Key.StuNo,
- StuName = x.Key.StuName,
- TotalScore = x.Select(y => y.Score).Sum(),
- LessonInfo = x.Select(y => new { y.LessonNo, y.LessonName, y.Score }).OrderBy(y => y.LessonNo)
- }).OrderByDescending(x => x.TotalScore);
- var result = new List>();
- foreach (var item in aa)
- {
- var aaa = new Dictionary();
- aaa.Add("StuNo", item.StuNo);
- aaa.Add("StuName", item.StuName);
- aaa.Add("TotalScore", item.TotalScore.ToString());
- foreach (var lessonInfoItem in item.LessonInfo)
- {
- aaa.Add(lessonInfoItem.LessonNo, lessonInfoItem.Score.ToString());
- }
-
- result.Add(aaa);
- }
- var resultStr = JsonConvert.SerializeObject(result);
-
- //班级成绩源
- var exportTable = resultStr.ToTable();
- //设置导出格式
- ExcelConfig excelconfig = new ExcelConfig();
- excelconfig.Title = className + " 班级成绩列表";
- excelconfig.TitleFont = "微软雅黑";
- excelconfig.TitlePoint = 20;
- excelconfig.FileName = className + " 班级成绩导出.xls";
- excelconfig.IsAllSizeColumn = true;
- //每一列的设置,没有设置的列信息,系统将按datatable中的列名导出
- excelconfig.ColumnEntity = new List();
- excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "StuNo", ExcelColumn = "学号" });
- excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "StuName", ExcelColumn = "姓名" });
- excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "TotalScore", ExcelColumn = "总分" });
-
- //课程动态列
- var lessonTemp = stuScoreIBLL.GetLessonNoData(queryModel.AcademicYearNo, queryModel.Semester, queryModel.ClassNo).OrderBy(x => x.value);
- foreach (var lessonTempItem in lessonTemp)
- {
- excelconfig.ColumnEntity.Add(new ColumnModel() { Column = lessonTempItem.value, ExcelColumn = lessonTempItem.text });
- }
-
- //调用导出方法
- ExcelHelper.ExcelDownload(exportTable, excelconfig);
-
- return Success("导出成功!");
- }
- ///
- /// 查询条件模型【班级成绩查看】
- ///
- public class QueryModel
- {
- public string AcademicYearNo { get; set; }
- public string Semester { get; set; }
- public string ClassNo { get; set; }
- }
-
- ///
- /// 获取打印成绩单数据
- ///
- ///
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetScoreListByStuNoList(string stuNoList)
- {
- var dataList = new List