|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009 |
- using Learun.Application.TwoDevelopment.EducationalAdministration;
- using Learun.Util;
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Web.Mvc;
- using Learun.Application.Base.SystemModule;
- using Newtonsoft.Json;
-
- namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
- {
- /// <summary>
- /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
- /// Copyright (c) 2013-2018 北京泉江科技有限公司
- /// 创 建:超级管理员
- /// 日 期:2019-07-17 11:20
- /// 描 述:新生录取管理
- /// </summary>
- public class StuEnrollController : MvcControllerBase
- {
- private StuEnrollIBLL stuEnrollIBLL = new StuEnrollBLL();
- private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL();
- private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
- private StuEnrollScoreIBLL stuEnrollScoreIBLL = new StuEnrollScoreBLL();
-
- #region 视图功能
-
- /// <summary>
- /// 主页面
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Index()
- {
- return View();
- }
-
- /// <summary>
- /// 新生报名
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult EnrollForm()
- {
- return View();
- }
- /// <summary>
- /// 新生报名
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult EnrollFormView()
- {
- return View();
- }
-
- /// <summary>
- /// 新生报名
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult EnrollIndex()
- {
- return View();
- }
- /// <summary>
- /// 新生报名审核
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult EnrollSH()
- {
- return View();
- }
- /// <summary>
- /// 新生报名审核
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult EnrollLQ()
- {
- return View();
- }
- /// <summary>
- /// 招生统计
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult EnrollIndexTJ()
- {
- return View();
- }
- [HttpGet]
- public ActionResult StudentStatus()
- {
- return View();
- }
- [HttpGet]
- public ActionResult AmountForm()
- {
- return View();
- }
- [HttpGet]
- public ActionResult CardPrint()
- {
- return View();
- }
-
- [HttpGet]
- public ActionResult Report()
- {
- return View();
- }
- [HttpGet]
- public ActionResult EnrollTypeForm()
- {
- return View();
- }
-
-
- /// <summary>
- /// 是否住宿
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult CheckIn()
- {
- return View();
- }
-
- /// <summary>
- /// 是否住宿
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult PayAfter()
- {
- return View();
- }
- /// <summary>
- /// 是否资助
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IsHelp()
- {
- return View();
- }
-
- /// <summary>
- /// 是否军训
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Military()
- {
- return View();
- }
-
- /// <summary>
- /// 是否军训
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IsPay()
- {
- return View();
- }
-
-
- [HttpGet]
- public ActionResult CheckInUrl()
- {
- return View();
- }
-
- [HttpGet]
- public ActionResult SubsidizeUrl()
- {
- return View();
- }
-
- [HttpGet]
- public ActionResult MilitaryUrl()
- {
- return View();
- }
-
- /// <summary>
- /// 是否拍照
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult IsPhoto()
- {
- return View();
- }
-
- /// <summary>
- /// 是否领取军训服
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult GetCloth()
- {
- return View();
- }
-
- /// <summary>
- /// 是否量校服尺寸
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult GetClothSize()
- {
- return View();
- }
-
- /// <summary>
- /// 是否领取床上用品
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult GetArticles()
- {
- return View();
- }
-
-
-
-
- /// <summary>
- /// 表单页
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Form()
- {
- return View();
- }
-
- [HttpGet]
- public ActionResult FormView()
- {
- return View();
- }
-
- public ActionResult AllocationClass()
- {
- return View();
- }
-
- public ActionResult AllocationDormitory()
- {
- return View();
- }
-
- public ActionResult NewAllocationDormitory()
- {
- return View();
- }
-
- public ActionResult NewAllocationBed()
- {
- return View();
- }
-
- #endregion
-
- #region 获取数据
-
- /// <summary>
- /// 获取表单数据
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetFormDataForEnroll(string keyValue)
- {
- var StuEnrollData = stuEnrollIBLL.GetStuEnrollEntity(keyValue);
-
- var jsonData = new
- {
- StuEnroll = new
- {
- StuId = StuEnrollData.StuId,
- Gender = StuEnrollData.Gender,
- StuName = StuEnrollData.StuName,
- IDCard = StuEnrollData.IDCard,
- IdCardPto1 = StuEnrollData.IdCardPto1,
- },
- };
- return Success(jsonData);
- }
- /// <summary>
- /// 招生统计
- /// <summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetTJList(string queryJson)
- {
- var data = stuEnrollIBLL.GetTJList(queryJson);
- return Success(data);
- }
- /// <summary>
- /// 获取页面显示列表数据
- /// <summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = stuEnrollIBLL.GetPageList(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
-
- /// <summary>
- /// 获取页面显示列表数据
- /// <summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetPageListForTJ(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = stuEnrollIBLL.GetPageListForTJ(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
-
- /// <summary>
- /// 审核页面 获取考试科目信息
- /// </summary>
- /// <returns></returns>
- public ActionResult GetExamDataByStuId(string keyValue)
- {
- var data = stuEnrollIBLL.GetExamDataByStuId(keyValue);
- return Success(data);
- }
-
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetDormitorys(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = stuEnrollIBLL.GetDormitorys(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
-
- /// <summary>
- /// 获取页面显示列表数据
- /// <summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetReportPageList(string pagination, string queryJson)
- {
- Pagination paginationobj = pagination.ToObject<Pagination>();
- var data = stuEnrollIBLL.GetReportPageList(paginationobj, queryJson);
- var jsonData = new
- {
- rows = data,
- total = paginationobj.total,
- page = paginationobj.page,
- records = paginationobj.records
- };
- return Success(jsonData);
- }
-
- /// <summary>
- /// 获取表单数据
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetFormData(string keyValue)
- {
- var StuEnrollData = stuEnrollIBLL.GetStuEnrollEntity(keyValue);
- //获取中考成绩
- var MidExamScoreData = stuEnrollIBLL.GetMidExamScoreData(keyValue).OrderBy(x => x.sort);
-
- if (string.IsNullOrEmpty(StuEnrollData.CheckInUrl))
- {
- StuEnrollData.CheckInUrl = Guid.NewGuid().ToString();
- }
- if (string.IsNullOrEmpty(StuEnrollData.SubsidizeUrl))
- {
- StuEnrollData.SubsidizeUrl = Guid.NewGuid().ToString();
-
- }
- if (string.IsNullOrEmpty(StuEnrollData.MilitaryUrl))
- {
- StuEnrollData.MilitaryUrl = Guid.NewGuid().ToString();
-
- }
- var jsonData = new
- {
- StuEnroll = StuEnrollData,
- StuEnrollMidExamScore = MidExamScoreData
- };
- return Success(jsonData);
- }
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult RealationPhoto()
- {
- var studentList = stuEnrollIBLL.AllStudent().ToList();
- foreach (var student in studentList)
- {
- if (string.IsNullOrEmpty(student.PhotoUrl))
- {
- student.PhotoUrl = Guid.NewGuid().ToString();
- stuEnrollIBLL.SaveEntity(student.StuId, student);
- }
-
- var annexEntity = annexesFileIBLL.GetEntityByFolderId(student.PhotoUrl);
- if (annexEntity == null)
- {
- annexEntity = new AnnexesFileEntity();
- annexEntity.Create();
- annexEntity.F_Id = Guid.NewGuid().ToString();
- }
-
-
- }
-
- return Success("");
- }
-
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetStuInfo(string stuId)
- {
- var result = stuEnrollIBLL.GetStuInfo(stuId);
- return Success(result);
- }
-
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetYearListByClass()
- {
- var classList = classInfoIBLL.GetAllClass().ToList();
- var result = classList.GroupBy(a => a.Grade).Select(m => m.Key).ToList();
- List<object> list = new List<object>();
- foreach (var item in result)
- {
- list.Add(new { year = item });
- }
-
- return Success(list);
- }
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult GetStuDefaultInfo(string StuId)
- {
- var result = stuEnrollIBLL.GetStuDefaultInfo(StuId);
- return Success(result);
-
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult GetPaymentInfo()
- {
- var result = stuEnrollIBLL.GetPaymentInfo();
- return Success(result);
-
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult GetCheckInStatistics(string DeptNo, string MajorNo, string ClassNo)
- {
- var result = stuEnrollIBLL.GetCheckInStatistics(DeptNo, MajorNo, ClassNo);
- return Success(result);
-
- }
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult GetHelpStatistics(string DeptNo, string MajorNo, string ClassNo)
- {
- var result = stuEnrollIBLL.GetHelpStatistics(DeptNo, MajorNo, ClassNo);
- return Success(result);
-
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult GetMilitaryStatistics(string DeptNo, string MajorNo, string ClassNo)
- {
- var result = stuEnrollIBLL.GetMilitaryStatistics(DeptNo, MajorNo, ClassNo);
- return Success(result);
-
- }
-
- /// <summary>
- /// 获取左侧树形数据
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetTreeNew()
- {
- var data = stuEnrollIBLL.GetTree();
- return Success(data);
- }
- /// <summary>
- /// 获取左侧树形数据
- /// <summary>
- /// <returns></returns>
- [HttpGet]
- [AjaxOnly]
- public ActionResult GetBedTree(string classNo, string gender)
- {
- var data = stuEnrollIBLL.GetBedTree(classNo, gender);
- return Success(data);
- }
-
-
- #endregion
-
- #region 提交数据
-
- /// <summary>
- /// 删除实体数据
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult DeleteForm(string keyValue)
- {
- stuEnrollIBLL.DeleteEntity(keyValue);
- return Success("删除成功!");
- }
- /// <summary>
- /// 保存实体数据(新增、修改)
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SaveForm(string keyValue, string strEntity)
- {
- StuEnrollEntity entity = strEntity.ToObject<StuEnrollEntity>();
- stuEnrollIBLL.SaveEntity(keyValue, entity);
- return Success("保存成功!");
- }
- /// <summary>
- /// 保存实收金额
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [ValidateAntiForgeryToken]
- [AjaxOnly]
- public ActionResult SaveActualPayAmount(string keyValue, string strEntity)
- {
- StuEnrollEntity entity = strEntity.ToObject<StuEnrollEntity>();
-
- var newEntity = stuEnrollIBLL.GetStuEnrollEntity(keyValue);
- newEntity.ActualPayAmount = entity.ActualPayAmount;
- stuEnrollIBLL.SaveEntity(keyValue, newEntity);
- return Success("保存成功!");
- }
-
- /// <summary>
- /// 保存实体数据(新增、修改)
- /// <param name="keyValue">主键</param>
- /// <summary>
- /// <returns></returns>
- [HttpPost]
- [AjaxOnly]
- public ActionResult EditEnrollType(string stuIds, string enrollType)
- {
-
- if (!string.IsNullOrEmpty(stuIds))
- {
-
- stuEnrollIBLL.EditEnrollType(stuIds, enrollType);
-
- }
- return Success("保存成功!");
- }
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult AllocationClass(string classNo, string dataJson)
- {
- stuEnrollIBLL.AllocationClass(classNo, dataJson);
- return Success("分配成功!");
- }
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult NewAllocationDormitory(string classNo, string dataJson)
- {
- stuEnrollIBLL.NewAllocationDormitory(classNo, dataJson);
- return Success("分配成功!");
- }
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult AllocationDormitory(string dormitoryNo, string stuId, string dormitoryName)
- {
- stuEnrollIBLL.AllocationDormiotry(dormitoryNo, stuId, dormitoryName);
- return Success("分配成功!");
-
- }
- [HttpPost]
- [AjaxOnly]
- public ActionResult SyncDept()
- {
- stuEnrollIBLL.SyncDept();
- return Success("同步成功");
- }
- [HttpPost]
- [AjaxOnly]
- public ActionResult SyncMajor()
- {
- stuEnrollIBLL.SyncMajor();
- return Success("同步成功");
- }
-
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult Sign(string stuId, bool status)
- {
- var result = stuEnrollIBLL.Sign(stuId, status);
- if (result.Item1)
- {
- return Success(result.Item2);
- }
- else
- {
- return Fail(result.Item2);
- }
-
- }
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult AllReport()
- {
- stuEnrollIBLL.AllReport();
- return Success("操作成功");
-
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult AllPhoto()
- {
- stuEnrollIBLL.AllPhoto();
- return Success("操作成功");
-
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult AllGetCloth()
- {
- stuEnrollIBLL.AllGetCloth();
- return Success("操作成功");
-
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult AllGetSize()
- {
- stuEnrollIBLL.AllGetSize();
- return Success("操作成功");
-
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult AllGetArticle()
- {
- stuEnrollIBLL.AllGetArticle();
- return Success("操作成功");
-
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult Report(string stuId, bool status)
- {
- var result = stuEnrollIBLL.Report(stuId, status);
- if (result.Item1)
- {
- return Success(result.Item2);
- }
- else
- {
- return Fail(result.Item2);
- }
-
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult Stay(string stuId, bool status, bool payAfter = false)
- {
- var result = stuEnrollIBLL.Stay(stuId, status, payAfter);
- if (result.Item1)
- {
- return Success(result.Item2);
- }
- else
- {
- return Fail(result.Item2);
- }
- }
-
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult AllStay()
- {
- stuEnrollIBLL.AllStay();
- return Success("操作成功");
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult Help(string stuId, bool status, bool payAfter = false)
- {
- var result = stuEnrollIBLL.Help(stuId, status, payAfter);
- if (result.Item1)
- {
- return Success(result.Item2);
- }
- else
- {
- return Fail(result.Item2);
- }
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult AllHelp()
- {
- stuEnrollIBLL.AllHelp();
- return Success("操作成功");
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult Military(string stuId, bool status, bool payAfter = false)
- {
- var result = stuEnrollIBLL.Military(stuId, status, payAfter);
- if (result.Item1)
- {
- return Success(result.Item2);
- }
- else
- {
- return Fail(result.Item2);
- }
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult AllMilitary()
- {
- stuEnrollIBLL.AllMilitary();
- return Success("成功");
- }
-
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult IsPay(string stuId, bool status)
- {
- var result = stuEnrollIBLL.IsPay(stuId, status);
- if (result.Item1)
- {
- return Success(result.Item2);
- }
- else
- {
- return Fail(result.Item2);
- }
- }
-
-
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult IsPhoto(string stuId, 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 result = stuEnrollIBLL.IsPhoto(stuId, true, fileGuid);
- if (result.Item1)
- {
- return Success(result.Item2);
- }
- else
- {
- return Fail(result.Item2);
- }
- }
- [HttpPost]
- [AjaxOnly]
- public ActionResult GetCloth(string stuId, bool status)
- {
- var result = stuEnrollIBLL.GetCloth(stuId, status);
- if (result.Item1)
- {
- return Success(result.Item2);
- }
- else
- {
- return Fail(result.Item2);
- }
- }
- [HttpPost]
- [AjaxOnly]
- public ActionResult GetClothSize(string stuId, bool status)
- {
- var result = stuEnrollIBLL.GetClothSize(stuId, status);
- if (result.Item1)
- {
- return Success(result.Item2);
- }
- else
- {
- return Fail(result.Item2);
- }
- }
- [HttpPost]
- [AjaxOnly]
- public ActionResult GetArticles(string stuId, bool status)
- {
- var result = stuEnrollIBLL.GetArticles(stuId, status);
- if (result.Item1)
- {
- return Success(result.Item2);
- }
- else
- {
- return Fail(result.Item2);
- }
- }
-
- [HttpPost]
- [AjaxOnly]
- public ActionResult GetMoney()
- {
- stuEnrollIBLL.GetMoney();
- return Success("操作成功");
- }
- /// <summary>
- /// 下载文件
- /// </summary>
- /// <param name="fileId">文件id</param>
- /// <returns></returns>
- [HttpPost]
- public void DownWrod()
- {
- ExcelHelper.aaaaa();
- }
-
- /// <summary>
- /// 关联照片
- /// </summary>
- /// <returns></returns>
- public ActionResult RelationPhoto()
- {
-
- stuEnrollIBLL.RelationPhoto();
- return Success("关联成功");
- }
-
-
- /// <summary>
- /// 同步学生数据
- /// </summary>
- /// <returns></returns>
- public ActionResult Synchronization()
- {
- stuEnrollIBLL.Synchronization();
- return Success("同步成功");
- }
-
-
-
- /// <summary>
- /// 报名审核
- /// </summary>
- /// <returns></returns>
- public ActionResult UpdateEnrollStatus(string keyValue, string strEntity)
- {
- var StuEnrollData = stuEnrollIBLL.GetStuEnrollEntity(keyValue);
- if (string.IsNullOrEmpty(StuEnrollData.SubjectNo))
- {
- return Fail("考试科目不能为空!");
- }
-
- stuEnrollIBLL.UpdateEnrollStatus(keyValue, 2);
- return Success("保存成功");
- }
- /// <summary>
- /// 报名--去审核
- /// </summary>
- /// <returns></returns>
- public ActionResult NoCheck(string keyValue)
- {
- stuEnrollIBLL.UpdateEnrollStatus(keyValue, 0);
- return Success("保存成功");
- }
-
- /// <summary>
- /// 录取
- /// </summary>
- /// <returns></returns>
- public ActionResult Admission(string keyValue, int IsAdmission)
- {
- var count = stuEnrollScoreIBLL.GetNoCheck(keyValue);
- if (count > 0)
- {
- return Fail("该学生有未审核的科目成绩");
- }
-
- stuEnrollIBLL.Admission(keyValue, IsAdmission);
- return Success("保存成功");
- }
-
- #endregion
-
- }
- }
|