Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

957 rader
25 KiB

  1. using Learun.Application.TwoDevelopment.EducationalAdministration;
  2. using Learun.Util;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Web.Mvc;
  8. using Learun.Application.Base.SystemModule;
  9. using Newtonsoft.Json;
  10. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  11. {
  12. /// <summary>
  13. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  14. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  15. /// 创 建:超级管理员
  16. /// 日 期:2019-07-17 11:20
  17. /// 描 述:新生录取管理
  18. /// </summary>
  19. public class StuEnrollController : MvcControllerBase
  20. {
  21. private StuEnrollIBLL stuEnrollIBLL = new StuEnrollBLL();
  22. private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL();
  23. private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
  24. private StuEnrollScoreIBLL stuEnrollScoreIBLL = new StuEnrollScoreBLL();
  25. #region 视图功能
  26. /// <summary>
  27. /// 主页面
  28. /// <summary>
  29. /// <returns></returns>
  30. [HttpGet]
  31. public ActionResult Index()
  32. {
  33. return View();
  34. }
  35. /// <summary>
  36. /// 新生报名
  37. /// <summary>
  38. /// <returns></returns>
  39. [HttpGet]
  40. public ActionResult EnrollForm()
  41. {
  42. return View();
  43. }
  44. /// <summary>
  45. /// 新生报名
  46. /// <summary>
  47. /// <returns></returns>
  48. [HttpGet]
  49. public ActionResult EnrollFormView()
  50. {
  51. return View();
  52. }
  53. /// <summary>
  54. /// 新生报名
  55. /// <summary>
  56. /// <returns></returns>
  57. [HttpGet]
  58. public ActionResult EnrollIndex()
  59. {
  60. return View();
  61. }
  62. /// <summary>
  63. /// 新生报名审核
  64. /// <summary>
  65. /// <returns></returns>
  66. [HttpGet]
  67. public ActionResult EnrollSH()
  68. {
  69. return View();
  70. }
  71. /// <summary>
  72. /// 新生报名审核
  73. /// <summary>
  74. /// <returns></returns>
  75. [HttpGet]
  76. public ActionResult EnrollLQ()
  77. {
  78. return View();
  79. }
  80. /// <summary>
  81. /// 招生统计
  82. /// <summary>
  83. /// <returns></returns>
  84. [HttpGet]
  85. public ActionResult EnrollIndexTJ()
  86. {
  87. return View();
  88. }
  89. [HttpGet]
  90. public ActionResult StudentStatus()
  91. {
  92. return View();
  93. }
  94. [HttpGet]
  95. public ActionResult AmountForm()
  96. {
  97. return View();
  98. }
  99. [HttpGet]
  100. public ActionResult CardPrint()
  101. {
  102. return View();
  103. }
  104. [HttpGet]
  105. public ActionResult Report()
  106. {
  107. return View();
  108. }
  109. [HttpGet]
  110. public ActionResult EnrollTypeForm()
  111. {
  112. return View();
  113. }
  114. /// <summary>
  115. /// 是否住宿
  116. /// </summary>
  117. /// <returns></returns>
  118. [HttpGet]
  119. public ActionResult CheckIn()
  120. {
  121. return View();
  122. }
  123. /// <summary>
  124. /// 是否住宿
  125. /// </summary>
  126. /// <returns></returns>
  127. [HttpGet]
  128. public ActionResult PayAfter()
  129. {
  130. return View();
  131. }
  132. /// <summary>
  133. /// 是否资助
  134. /// </summary>
  135. /// <returns></returns>
  136. [HttpGet]
  137. public ActionResult IsHelp()
  138. {
  139. return View();
  140. }
  141. /// <summary>
  142. /// 是否军训
  143. /// </summary>
  144. /// <returns></returns>
  145. [HttpGet]
  146. public ActionResult Military()
  147. {
  148. return View();
  149. }
  150. /// <summary>
  151. /// 是否军训
  152. /// </summary>
  153. /// <returns></returns>
  154. [HttpGet]
  155. public ActionResult IsPay()
  156. {
  157. return View();
  158. }
  159. [HttpGet]
  160. public ActionResult CheckInUrl()
  161. {
  162. return View();
  163. }
  164. [HttpGet]
  165. public ActionResult SubsidizeUrl()
  166. {
  167. return View();
  168. }
  169. [HttpGet]
  170. public ActionResult MilitaryUrl()
  171. {
  172. return View();
  173. }
  174. /// <summary>
  175. /// 是否拍照
  176. /// </summary>
  177. /// <returns></returns>
  178. [HttpGet]
  179. public ActionResult IsPhoto()
  180. {
  181. return View();
  182. }
  183. /// <summary>
  184. /// 是否领取军训服
  185. /// </summary>
  186. /// <returns></returns>
  187. [HttpGet]
  188. public ActionResult GetCloth()
  189. {
  190. return View();
  191. }
  192. /// <summary>
  193. /// 是否量校服尺寸
  194. /// </summary>
  195. /// <returns></returns>
  196. [HttpGet]
  197. public ActionResult GetClothSize()
  198. {
  199. return View();
  200. }
  201. /// <summary>
  202. /// 是否领取床上用品
  203. /// </summary>
  204. /// <returns></returns>
  205. [HttpGet]
  206. public ActionResult GetArticles()
  207. {
  208. return View();
  209. }
  210. /// <summary>
  211. /// 表单页
  212. /// <summary>
  213. /// <returns></returns>
  214. [HttpGet]
  215. public ActionResult Form()
  216. {
  217. return View();
  218. }
  219. [HttpGet]
  220. public ActionResult FormView()
  221. {
  222. return View();
  223. }
  224. public ActionResult AllocationClass()
  225. {
  226. return View();
  227. }
  228. public ActionResult AllocationDormitory()
  229. {
  230. return View();
  231. }
  232. public ActionResult NewAllocationDormitory()
  233. {
  234. return View();
  235. }
  236. public ActionResult NewAllocationBed()
  237. {
  238. return View();
  239. }
  240. #endregion
  241. #region 获取数据
  242. /// <summary>
  243. /// 获取页面显示列表数据
  244. /// <summary>
  245. /// <param name="queryJson">查询参数</param>
  246. /// <returns></returns>
  247. [HttpGet]
  248. [AjaxOnly]
  249. public ActionResult GetPageList(string pagination, string queryJson)
  250. {
  251. Pagination paginationobj = pagination.ToObject<Pagination>();
  252. var data = stuEnrollIBLL.GetPageList(paginationobj, queryJson);
  253. var jsonData = new
  254. {
  255. rows = data,
  256. total = paginationobj.total,
  257. page = paginationobj.page,
  258. records = paginationobj.records
  259. };
  260. return Success(jsonData);
  261. }
  262. /// <summary>
  263. /// 招生统计
  264. /// <summary>
  265. /// <param name="queryJson">查询参数</param>
  266. /// <returns></returns>
  267. [HttpGet]
  268. [AjaxOnly]
  269. public ActionResult GetTJList( string queryJson)
  270. {
  271. var data = stuEnrollIBLL.GetTJList(queryJson);
  272. return Success(data);
  273. }
  274. [HttpGet]
  275. [AjaxOnly]
  276. public ActionResult GetDormitorys(string pagination, string queryJson)
  277. {
  278. Pagination paginationobj = pagination.ToObject<Pagination>();
  279. var data = stuEnrollIBLL.GetDormitorys(paginationobj, queryJson);
  280. var jsonData = new
  281. {
  282. rows = data,
  283. total = paginationobj.total,
  284. page = paginationobj.page,
  285. records = paginationobj.records
  286. };
  287. return Success(jsonData);
  288. }
  289. /// <summary>
  290. /// 获取页面显示列表数据
  291. /// <summary>
  292. /// <param name="queryJson">查询参数</param>
  293. /// <returns></returns>
  294. [HttpGet]
  295. [AjaxOnly]
  296. public ActionResult GetReportPageList(string pagination, string queryJson)
  297. {
  298. Pagination paginationobj = pagination.ToObject<Pagination>();
  299. var data = stuEnrollIBLL.GetReportPageList(paginationobj, queryJson);
  300. var jsonData = new
  301. {
  302. rows = data,
  303. total = paginationobj.total,
  304. page = paginationobj.page,
  305. records = paginationobj.records
  306. };
  307. return Success(jsonData);
  308. }
  309. /// <summary>
  310. /// 获取表单数据
  311. /// <summary>
  312. /// <returns></returns>
  313. [HttpGet]
  314. [AjaxOnly]
  315. public ActionResult GetFormData(string keyValue)
  316. {
  317. var StuEnrollData = stuEnrollIBLL.GetStuEnrollEntity(keyValue);
  318. if (string.IsNullOrEmpty(StuEnrollData.CheckInUrl))
  319. {
  320. StuEnrollData.CheckInUrl = Guid.NewGuid().ToString();
  321. }
  322. if (string.IsNullOrEmpty(StuEnrollData.SubsidizeUrl))
  323. {
  324. StuEnrollData.SubsidizeUrl = Guid.NewGuid().ToString();
  325. }
  326. if (string.IsNullOrEmpty(StuEnrollData.MilitaryUrl))
  327. {
  328. StuEnrollData.MilitaryUrl = Guid.NewGuid().ToString();
  329. }
  330. var jsonData = new
  331. {
  332. StuEnroll = StuEnrollData,
  333. };
  334. return Success(jsonData);
  335. }
  336. [HttpPost]
  337. [AjaxOnly]
  338. public ActionResult RealationPhoto()
  339. {
  340. var studentList = stuEnrollIBLL.AllStudent().ToList();
  341. foreach (var student in studentList)
  342. {
  343. if (string.IsNullOrEmpty(student.PhotoUrl))
  344. {
  345. student.PhotoUrl = Guid.NewGuid().ToString();
  346. stuEnrollIBLL.SaveEntity(student.StuId,student);
  347. }
  348. var annexEntity = annexesFileIBLL.GetEntityByFolderId(student.PhotoUrl);
  349. if (annexEntity == null)
  350. {
  351. annexEntity=new AnnexesFileEntity();
  352. annexEntity.Create();
  353. annexEntity.F_Id = Guid.NewGuid().ToString();
  354. }
  355. }
  356. return Success("");
  357. }
  358. [HttpGet]
  359. [AjaxOnly]
  360. public ActionResult GetStuInfo(string stuId)
  361. {
  362. var result = stuEnrollIBLL.GetStuInfo(stuId);
  363. return Success(result);
  364. }
  365. [HttpGet]
  366. [AjaxOnly]
  367. public ActionResult GetYearListByClass()
  368. {
  369. var classList = classInfoIBLL.GetAllClass().ToList();
  370. var result = classList.GroupBy(a => a.Grade).Select(m=>m.Key).ToList();
  371. List<object> list=new List<object>();
  372. foreach (var item in result)
  373. {
  374. list.Add(new{year=item});
  375. }
  376. return Success(list);
  377. }
  378. [HttpPost]
  379. [AjaxOnly]
  380. public ActionResult GetStuDefaultInfo(string StuId)
  381. {
  382. var result = stuEnrollIBLL.GetStuDefaultInfo(StuId);
  383. return Success(result);
  384. }
  385. [HttpPost]
  386. [AjaxOnly]
  387. public ActionResult GetPaymentInfo()
  388. {
  389. var result = stuEnrollIBLL.GetPaymentInfo();
  390. return Success(result);
  391. }
  392. [HttpPost]
  393. [AjaxOnly]
  394. public ActionResult GetCheckInStatistics(string DeptNo, string MajorNo, string ClassNo)
  395. {
  396. var result = stuEnrollIBLL.GetCheckInStatistics(DeptNo, MajorNo, ClassNo);
  397. return Success(result);
  398. }
  399. [HttpPost]
  400. [AjaxOnly]
  401. public ActionResult GetHelpStatistics(string DeptNo, string MajorNo, string ClassNo)
  402. {
  403. var result = stuEnrollIBLL.GetHelpStatistics(DeptNo, MajorNo, ClassNo);
  404. return Success(result);
  405. }
  406. [HttpPost]
  407. [AjaxOnly]
  408. public ActionResult GetMilitaryStatistics(string DeptNo, string MajorNo, string ClassNo)
  409. {
  410. var result = stuEnrollIBLL.GetMilitaryStatistics(DeptNo, MajorNo, ClassNo);
  411. return Success(result);
  412. }
  413. /// <summary>
  414. /// 获取左侧树形数据
  415. /// <summary>
  416. /// <returns></returns>
  417. [HttpGet]
  418. [AjaxOnly]
  419. public ActionResult GetTreeNew()
  420. {
  421. var data = stuEnrollIBLL.GetTree();
  422. return Success(data);
  423. }
  424. /// <summary>
  425. /// 获取左侧树形数据
  426. /// <summary>
  427. /// <returns></returns>
  428. [HttpGet]
  429. [AjaxOnly]
  430. public ActionResult GetBedTree(string classNo, string gender)
  431. {
  432. var data = stuEnrollIBLL.GetBedTree(classNo, gender);
  433. return Success(data);
  434. }
  435. #endregion
  436. #region 提交数据
  437. /// <summary>
  438. /// 删除实体数据
  439. /// <param name="keyValue">主键</param>
  440. /// <summary>
  441. /// <returns></returns>
  442. [HttpPost]
  443. [AjaxOnly]
  444. public ActionResult DeleteForm(string keyValue)
  445. {
  446. stuEnrollIBLL.DeleteEntity(keyValue);
  447. return Success("删除成功!");
  448. }
  449. /// <summary>
  450. /// 保存实体数据(新增、修改)
  451. /// <param name="keyValue">主键</param>
  452. /// <summary>
  453. /// <returns></returns>
  454. [HttpPost]
  455. [ValidateAntiForgeryToken]
  456. [AjaxOnly]
  457. public ActionResult SaveForm(string keyValue, string strEntity)
  458. {
  459. StuEnrollEntity entity = strEntity.ToObject<StuEnrollEntity>();
  460. stuEnrollIBLL.SaveEntity(keyValue, entity);
  461. return Success("保存成功!");
  462. }
  463. /// <summary>
  464. /// 保存实收金额
  465. /// <param name="keyValue">主键</param>
  466. /// <summary>
  467. /// <returns></returns>
  468. [HttpPost]
  469. [ValidateAntiForgeryToken]
  470. [AjaxOnly]
  471. public ActionResult SaveActualPayAmount(string keyValue, string strEntity)
  472. {
  473. StuEnrollEntity entity = strEntity.ToObject<StuEnrollEntity>();
  474. var newEntity = stuEnrollIBLL.GetStuEnrollEntity(keyValue);
  475. newEntity.ActualPayAmount = entity.ActualPayAmount;
  476. stuEnrollIBLL.SaveEntity(keyValue, newEntity);
  477. return Success("保存成功!");
  478. }
  479. /// <summary>
  480. /// 保存实体数据(新增、修改)
  481. /// <param name="keyValue">主键</param>
  482. /// <summary>
  483. /// <returns></returns>
  484. [HttpPost]
  485. [AjaxOnly]
  486. public ActionResult EditEnrollType(string stuIds, string enrollType)
  487. {
  488. if (!string.IsNullOrEmpty(stuIds))
  489. {
  490. stuEnrollIBLL.EditEnrollType(stuIds, enrollType);
  491. }
  492. return Success("保存成功!");
  493. }
  494. [HttpPost]
  495. [AjaxOnly]
  496. public ActionResult AllocationClass(string classNo, string dataJson)
  497. {
  498. stuEnrollIBLL.AllocationClass(classNo, dataJson);
  499. return Success("分配成功!");
  500. }
  501. [HttpPost]
  502. [AjaxOnly]
  503. public ActionResult NewAllocationDormitory(string classNo, string dataJson)
  504. {
  505. stuEnrollIBLL.NewAllocationDormitory(classNo, dataJson);
  506. return Success("分配成功!");
  507. }
  508. [HttpPost]
  509. [AjaxOnly]
  510. public ActionResult AllocationDormitory(string dormitoryNo, string stuId, string dormitoryName)
  511. {
  512. stuEnrollIBLL.AllocationDormiotry(dormitoryNo, stuId, dormitoryName);
  513. return Success("分配成功!");
  514. }
  515. [HttpPost]
  516. [AjaxOnly]
  517. public ActionResult SyncDept()
  518. {
  519. stuEnrollIBLL.SyncDept();
  520. return Success("同步成功");
  521. }
  522. [HttpPost]
  523. [AjaxOnly]
  524. public ActionResult SyncMajor()
  525. {
  526. stuEnrollIBLL.SyncMajor();
  527. return Success("同步成功");
  528. }
  529. [HttpPost]
  530. [AjaxOnly]
  531. public ActionResult Sign(string stuId, bool status)
  532. {
  533. var result = stuEnrollIBLL.Sign(stuId, status);
  534. if (result.Item1)
  535. {
  536. return Success(result.Item2);
  537. }
  538. else
  539. {
  540. return Fail(result.Item2);
  541. }
  542. }
  543. [HttpPost]
  544. [AjaxOnly]
  545. public ActionResult AllReport()
  546. {
  547. stuEnrollIBLL.AllReport();
  548. return Success("操作成功");
  549. }
  550. [HttpPost]
  551. [AjaxOnly]
  552. public ActionResult AllPhoto()
  553. {
  554. stuEnrollIBLL.AllPhoto();
  555. return Success("操作成功");
  556. }
  557. [HttpPost]
  558. [AjaxOnly]
  559. public ActionResult AllGetCloth()
  560. {
  561. stuEnrollIBLL.AllGetCloth();
  562. return Success("操作成功");
  563. }
  564. [HttpPost]
  565. [AjaxOnly]
  566. public ActionResult AllGetSize()
  567. {
  568. stuEnrollIBLL.AllGetSize();
  569. return Success("操作成功");
  570. }
  571. [HttpPost]
  572. [AjaxOnly]
  573. public ActionResult AllGetArticle()
  574. {
  575. stuEnrollIBLL.AllGetArticle();
  576. return Success("操作成功");
  577. }
  578. [HttpPost]
  579. [AjaxOnly]
  580. public ActionResult Report(string stuId, bool status)
  581. {
  582. var result = stuEnrollIBLL.Report(stuId, status);
  583. if (result.Item1)
  584. {
  585. return Success(result.Item2);
  586. }
  587. else
  588. {
  589. return Fail(result.Item2);
  590. }
  591. }
  592. [HttpPost]
  593. [AjaxOnly]
  594. public ActionResult Stay(string stuId, bool status, bool payAfter = false)
  595. {
  596. var result = stuEnrollIBLL.Stay(stuId, status, payAfter);
  597. if (result.Item1)
  598. {
  599. return Success(result.Item2);
  600. }
  601. else
  602. {
  603. return Fail(result.Item2);
  604. }
  605. }
  606. [HttpPost]
  607. [AjaxOnly]
  608. public ActionResult AllStay()
  609. {
  610. stuEnrollIBLL.AllStay();
  611. return Success("操作成功");
  612. }
  613. [HttpPost]
  614. [AjaxOnly]
  615. public ActionResult Help(string stuId, bool status, bool payAfter = false)
  616. {
  617. var result = stuEnrollIBLL.Help(stuId, status, payAfter);
  618. if (result.Item1)
  619. {
  620. return Success(result.Item2);
  621. }
  622. else
  623. {
  624. return Fail(result.Item2);
  625. }
  626. }
  627. [HttpPost]
  628. [AjaxOnly]
  629. public ActionResult AllHelp()
  630. {
  631. stuEnrollIBLL.AllHelp();
  632. return Success("操作成功");
  633. }
  634. [HttpPost]
  635. [AjaxOnly]
  636. public ActionResult Military(string stuId, bool status, bool payAfter = false)
  637. {
  638. var result = stuEnrollIBLL.Military(stuId, status, payAfter);
  639. if (result.Item1)
  640. {
  641. return Success(result.Item2);
  642. }
  643. else
  644. {
  645. return Fail(result.Item2);
  646. }
  647. }
  648. [HttpPost]
  649. [AjaxOnly]
  650. public ActionResult AllMilitary()
  651. {
  652. stuEnrollIBLL.AllMilitary();
  653. return Success("成功");
  654. }
  655. [HttpPost]
  656. [AjaxOnly]
  657. public ActionResult IsPay(string stuId, bool status)
  658. {
  659. var result = stuEnrollIBLL.IsPay(stuId, status);
  660. if (result.Item1)
  661. {
  662. return Success(result.Item2);
  663. }
  664. else
  665. {
  666. return Fail(result.Item2);
  667. }
  668. }
  669. [HttpPost]
  670. [AjaxOnly]
  671. public ActionResult IsPhoto(string stuId, string base64url)
  672. {
  673. var loginuser = LoginUserInfo.Get();
  674. //头像处理
  675. var folderId = Guid.NewGuid().ToString();
  676. string filePath = Config.GetValue("AnnexesFile");
  677. string uploadDate = DateTime.Now.ToString("yyyyMMdd");
  678. string FileEextension = ".png";
  679. string fileGuid = Guid.NewGuid().ToString();
  680. string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, loginuser.account, uploadDate, fileGuid, FileEextension);
  681. //创建文件夹
  682. string path = Path.GetDirectoryName(virtualPath);
  683. Directory.CreateDirectory(path);
  684. AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity();
  685. if (!System.IO.File.Exists(virtualPath))
  686. {
  687. byte[] bytes = Convert.FromBase64String(base64url.Replace("data:image/png;base64,", ""));
  688. FileInfo file = new FileInfo(virtualPath);
  689. FileStream fs = file.Create();
  690. fs.Write(bytes, 0, bytes.Length);
  691. fs.Close();
  692. //文件信息写入数据库
  693. fileAnnexesEntity.F_Id = fileGuid;
  694. fileAnnexesEntity.F_FileName = "userphoto.png";
  695. fileAnnexesEntity.F_FilePath = virtualPath;
  696. fileAnnexesEntity.F_FileSize = bytes.Length.ToString();
  697. fileAnnexesEntity.F_FileExtensions = FileEextension;
  698. fileAnnexesEntity.F_FileType = FileEextension.Replace(".", "");
  699. fileAnnexesEntity.F_CreateUserId = loginuser.userId;
  700. fileAnnexesEntity.F_CreateUserName = loginuser.realName;
  701. annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity);
  702. }
  703. var result = stuEnrollIBLL.IsPhoto(stuId, true, fileGuid);
  704. if (result.Item1)
  705. {
  706. return Success(result.Item2);
  707. }
  708. else
  709. {
  710. return Fail(result.Item2);
  711. }
  712. }
  713. [HttpPost]
  714. [AjaxOnly]
  715. public ActionResult GetCloth(string stuId, bool status)
  716. {
  717. var result = stuEnrollIBLL.GetCloth(stuId, status);
  718. if (result.Item1)
  719. {
  720. return Success(result.Item2);
  721. }
  722. else
  723. {
  724. return Fail(result.Item2);
  725. }
  726. }
  727. [HttpPost]
  728. [AjaxOnly]
  729. public ActionResult GetClothSize(string stuId, bool status)
  730. {
  731. var result = stuEnrollIBLL.GetClothSize(stuId, status);
  732. if (result.Item1)
  733. {
  734. return Success(result.Item2);
  735. }
  736. else
  737. {
  738. return Fail(result.Item2);
  739. }
  740. }
  741. [HttpPost]
  742. [AjaxOnly]
  743. public ActionResult GetArticles(string stuId, bool status)
  744. {
  745. var result = stuEnrollIBLL.GetArticles(stuId, status);
  746. if (result.Item1)
  747. {
  748. return Success(result.Item2);
  749. }
  750. else
  751. {
  752. return Fail(result.Item2);
  753. }
  754. }
  755. [HttpPost]
  756. [AjaxOnly]
  757. public ActionResult GetMoney()
  758. {
  759. stuEnrollIBLL.GetMoney();
  760. return Success("操作成功");
  761. }
  762. /// <summary>
  763. /// 下载文件
  764. /// </summary>
  765. /// <param name="fileId">文件id</param>
  766. /// <returns></returns>
  767. [HttpPost]
  768. public void DownWrod()
  769. {
  770. ExcelHelper.aaaaa();
  771. }
  772. /// <summary>
  773. /// 关联照片
  774. /// </summary>
  775. /// <returns></returns>
  776. public ActionResult RelationPhoto()
  777. {
  778. stuEnrollIBLL.RelationPhoto();
  779. return Success("关联成功");
  780. }
  781. /// <summary>
  782. /// 同步学生数据
  783. /// </summary>
  784. /// <returns></returns>
  785. public ActionResult Synchronization()
  786. {
  787. stuEnrollIBLL.Synchronization();
  788. return Success("同步成功");
  789. }
  790. /// <summary>
  791. /// 审核页面 获取考试科目信息
  792. /// </summary>
  793. /// <returns></returns>
  794. public ActionResult GetExamDataByStuId(string keyValue)
  795. {
  796. var data= stuEnrollIBLL.GetExamDataByStuId(keyValue);
  797. return Success(data);
  798. }
  799. /// <summary>
  800. /// 报名审核
  801. /// </summary>
  802. /// <returns></returns>
  803. public ActionResult UpdateEnrollStatus(string keyValue, string strEntity)
  804. {
  805. //StuEnrollEntity entity = strEntity.ToObject<StuEnrollEntity>();
  806. //entity.EnrollStatus = 2;
  807. stuEnrollIBLL.UpdateEnrollStatus(keyValue, 2);
  808. return Success("保存成功");
  809. }
  810. /// <summary>
  811. /// 报名--去审核
  812. /// </summary>
  813. /// <returns></returns>
  814. public ActionResult NoCheck(string keyValue)
  815. {
  816. //StuEnrollEntity entity = new StuEnrollEntity();
  817. //entity.EnrollStatus = 0;
  818. stuEnrollIBLL.UpdateEnrollStatus(keyValue, 0);
  819. return Success("保存成功");
  820. }
  821. /// <summary>
  822. /// 录取
  823. /// </summary>
  824. /// <returns></returns>
  825. public ActionResult Admission(string keyValue, int IsAdmission)
  826. {
  827. var count= stuEnrollScoreIBLL.GetNoCheck(keyValue);
  828. if (count > 0)
  829. {
  830. return Fail("该学生有未审核的科目成绩");
  831. }
  832. stuEnrollIBLL.Admission(keyValue, IsAdmission);
  833. return Success("保存成功");
  834. }
  835. #endregion
  836. }
  837. }