You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

986 lines
26 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. /// <returns></returns>
  246. [HttpGet]
  247. [AjaxOnly]
  248. public ActionResult GetFormDataForEnroll(string keyValue)
  249. {
  250. var StuEnrollData = stuEnrollIBLL.GetStuEnrollEntity(keyValue);
  251. var jsonData = new
  252. {
  253. StuEnroll = new
  254. {
  255. StuId = StuEnrollData.StuId,
  256. Gender = StuEnrollData.Gender,
  257. StuName = StuEnrollData.StuName,
  258. IDCard = StuEnrollData.IDCard,
  259. IdCardPto1 = StuEnrollData.IdCardPto1,
  260. //StuId= StuEnrollData.StuId,
  261. //StuId= StuEnrollData.StuId,
  262. //StuId= StuEnrollData.StuId,
  263. //StuId= StuEnrollData.StuId,
  264. //StuId= StuEnrollData.StuId,
  265. },
  266. };
  267. return Success(jsonData);
  268. }
  269. /// <summary>
  270. /// 招生统计
  271. /// <summary>
  272. /// <param name="queryJson">查询参数</param>
  273. /// <returns></returns>
  274. [HttpGet]
  275. [AjaxOnly]
  276. public ActionResult GetTJList(string queryJson)
  277. {
  278. var data = stuEnrollIBLL.GetTJList(queryJson);
  279. return Success(data);
  280. }
  281. /// <summary>
  282. /// 获取页面显示列表数据
  283. /// <summary>
  284. /// <param name="queryJson">查询参数</param>
  285. /// <returns></returns>
  286. [HttpGet]
  287. [AjaxOnly]
  288. public ActionResult GetPageList(string pagination, string queryJson)
  289. {
  290. Pagination paginationobj = pagination.ToObject<Pagination>();
  291. var data = stuEnrollIBLL.GetPageList(paginationobj, queryJson);
  292. var jsonData = new
  293. {
  294. rows = data,
  295. total = paginationobj.total,
  296. page = paginationobj.page,
  297. records = paginationobj.records
  298. };
  299. return Success(jsonData);
  300. }
  301. /// <summary>
  302. /// 审核页面 获取考试科目信息
  303. /// </summary>
  304. /// <returns></returns>
  305. public ActionResult GetExamDataByStuId(string keyValue)
  306. {
  307. var data = stuEnrollIBLL.GetExamDataByStuId(keyValue);
  308. return Success(data);
  309. }
  310. [HttpGet]
  311. [AjaxOnly]
  312. public ActionResult GetDormitorys(string pagination, string queryJson)
  313. {
  314. Pagination paginationobj = pagination.ToObject<Pagination>();
  315. var data = stuEnrollIBLL.GetDormitorys(paginationobj, queryJson);
  316. var jsonData = new
  317. {
  318. rows = data,
  319. total = paginationobj.total,
  320. page = paginationobj.page,
  321. records = paginationobj.records
  322. };
  323. return Success(jsonData);
  324. }
  325. /// <summary>
  326. /// 获取页面显示列表数据
  327. /// <summary>
  328. /// <param name="queryJson">查询参数</param>
  329. /// <returns></returns>
  330. [HttpGet]
  331. [AjaxOnly]
  332. public ActionResult GetReportPageList(string pagination, string queryJson)
  333. {
  334. Pagination paginationobj = pagination.ToObject<Pagination>();
  335. var data = stuEnrollIBLL.GetReportPageList(paginationobj, queryJson);
  336. var jsonData = new
  337. {
  338. rows = data,
  339. total = paginationobj.total,
  340. page = paginationobj.page,
  341. records = paginationobj.records
  342. };
  343. return Success(jsonData);
  344. }
  345. /// <summary>
  346. /// 获取表单数据
  347. /// <summary>
  348. /// <returns></returns>
  349. [HttpGet]
  350. [AjaxOnly]
  351. public ActionResult GetFormData(string keyValue)
  352. {
  353. var StuEnrollData = stuEnrollIBLL.GetStuEnrollEntity(keyValue);
  354. if (string.IsNullOrEmpty(StuEnrollData.CheckInUrl))
  355. {
  356. StuEnrollData.CheckInUrl = Guid.NewGuid().ToString();
  357. }
  358. if (string.IsNullOrEmpty(StuEnrollData.SubsidizeUrl))
  359. {
  360. StuEnrollData.SubsidizeUrl = Guid.NewGuid().ToString();
  361. }
  362. if (string.IsNullOrEmpty(StuEnrollData.MilitaryUrl))
  363. {
  364. StuEnrollData.MilitaryUrl = Guid.NewGuid().ToString();
  365. }
  366. var jsonData = new
  367. {
  368. StuEnroll = StuEnrollData,
  369. };
  370. return Success(jsonData);
  371. }
  372. [HttpPost]
  373. [AjaxOnly]
  374. public ActionResult RealationPhoto()
  375. {
  376. var studentList = stuEnrollIBLL.AllStudent().ToList();
  377. foreach (var student in studentList)
  378. {
  379. if (string.IsNullOrEmpty(student.PhotoUrl))
  380. {
  381. student.PhotoUrl = Guid.NewGuid().ToString();
  382. stuEnrollIBLL.SaveEntity(student.StuId,student);
  383. }
  384. var annexEntity = annexesFileIBLL.GetEntityByFolderId(student.PhotoUrl);
  385. if (annexEntity == null)
  386. {
  387. annexEntity=new AnnexesFileEntity();
  388. annexEntity.Create();
  389. annexEntity.F_Id = Guid.NewGuid().ToString();
  390. }
  391. }
  392. return Success("");
  393. }
  394. [HttpGet]
  395. [AjaxOnly]
  396. public ActionResult GetStuInfo(string stuId)
  397. {
  398. var result = stuEnrollIBLL.GetStuInfo(stuId);
  399. return Success(result);
  400. }
  401. [HttpGet]
  402. [AjaxOnly]
  403. public ActionResult GetYearListByClass()
  404. {
  405. var classList = classInfoIBLL.GetAllClass().ToList();
  406. var result = classList.GroupBy(a => a.Grade).Select(m=>m.Key).ToList();
  407. List<object> list=new List<object>();
  408. foreach (var item in result)
  409. {
  410. list.Add(new{year=item});
  411. }
  412. return Success(list);
  413. }
  414. [HttpPost]
  415. [AjaxOnly]
  416. public ActionResult GetStuDefaultInfo(string StuId)
  417. {
  418. var result = stuEnrollIBLL.GetStuDefaultInfo(StuId);
  419. return Success(result);
  420. }
  421. [HttpPost]
  422. [AjaxOnly]
  423. public ActionResult GetPaymentInfo()
  424. {
  425. var result = stuEnrollIBLL.GetPaymentInfo();
  426. return Success(result);
  427. }
  428. [HttpPost]
  429. [AjaxOnly]
  430. public ActionResult GetCheckInStatistics(string DeptNo, string MajorNo, string ClassNo)
  431. {
  432. var result = stuEnrollIBLL.GetCheckInStatistics(DeptNo, MajorNo, ClassNo);
  433. return Success(result);
  434. }
  435. [HttpPost]
  436. [AjaxOnly]
  437. public ActionResult GetHelpStatistics(string DeptNo, string MajorNo, string ClassNo)
  438. {
  439. var result = stuEnrollIBLL.GetHelpStatistics(DeptNo, MajorNo, ClassNo);
  440. return Success(result);
  441. }
  442. [HttpPost]
  443. [AjaxOnly]
  444. public ActionResult GetMilitaryStatistics(string DeptNo, string MajorNo, string ClassNo)
  445. {
  446. var result = stuEnrollIBLL.GetMilitaryStatistics(DeptNo, MajorNo, ClassNo);
  447. return Success(result);
  448. }
  449. /// <summary>
  450. /// 获取左侧树形数据
  451. /// <summary>
  452. /// <returns></returns>
  453. [HttpGet]
  454. [AjaxOnly]
  455. public ActionResult GetTreeNew()
  456. {
  457. var data = stuEnrollIBLL.GetTree();
  458. return Success(data);
  459. }
  460. /// <summary>
  461. /// 获取左侧树形数据
  462. /// <summary>
  463. /// <returns></returns>
  464. [HttpGet]
  465. [AjaxOnly]
  466. public ActionResult GetBedTree(string classNo, string gender)
  467. {
  468. var data = stuEnrollIBLL.GetBedTree(classNo, gender);
  469. return Success(data);
  470. }
  471. #endregion
  472. #region 提交数据
  473. /// <summary>
  474. /// 删除实体数据
  475. /// <param name="keyValue">主键</param>
  476. /// <summary>
  477. /// <returns></returns>
  478. [HttpPost]
  479. [AjaxOnly]
  480. public ActionResult DeleteForm(string keyValue)
  481. {
  482. stuEnrollIBLL.DeleteEntity(keyValue);
  483. return Success("删除成功!");
  484. }
  485. /// <summary>
  486. /// 保存实体数据(新增、修改)
  487. /// <param name="keyValue">主键</param>
  488. /// <summary>
  489. /// <returns></returns>
  490. [HttpPost]
  491. [ValidateAntiForgeryToken]
  492. [AjaxOnly]
  493. public ActionResult SaveForm(string keyValue, string strEntity)
  494. {
  495. StuEnrollEntity entity = strEntity.ToObject<StuEnrollEntity>();
  496. stuEnrollIBLL.SaveEntity(keyValue, entity);
  497. return Success("保存成功!");
  498. }
  499. /// <summary>
  500. /// 保存实收金额
  501. /// <param name="keyValue">主键</param>
  502. /// <summary>
  503. /// <returns></returns>
  504. [HttpPost]
  505. [ValidateAntiForgeryToken]
  506. [AjaxOnly]
  507. public ActionResult SaveActualPayAmount(string keyValue, string strEntity)
  508. {
  509. StuEnrollEntity entity = strEntity.ToObject<StuEnrollEntity>();
  510. var newEntity = stuEnrollIBLL.GetStuEnrollEntity(keyValue);
  511. newEntity.ActualPayAmount = entity.ActualPayAmount;
  512. stuEnrollIBLL.SaveEntity(keyValue, newEntity);
  513. return Success("保存成功!");
  514. }
  515. /// <summary>
  516. /// 保存实体数据(新增、修改)
  517. /// <param name="keyValue">主键</param>
  518. /// <summary>
  519. /// <returns></returns>
  520. [HttpPost]
  521. [AjaxOnly]
  522. public ActionResult EditEnrollType(string stuIds, string enrollType)
  523. {
  524. if (!string.IsNullOrEmpty(stuIds))
  525. {
  526. stuEnrollIBLL.EditEnrollType(stuIds, enrollType);
  527. }
  528. return Success("保存成功!");
  529. }
  530. [HttpPost]
  531. [AjaxOnly]
  532. public ActionResult AllocationClass(string classNo, string dataJson)
  533. {
  534. stuEnrollIBLL.AllocationClass(classNo, dataJson);
  535. return Success("分配成功!");
  536. }
  537. [HttpPost]
  538. [AjaxOnly]
  539. public ActionResult NewAllocationDormitory(string classNo, string dataJson)
  540. {
  541. stuEnrollIBLL.NewAllocationDormitory(classNo, dataJson);
  542. return Success("分配成功!");
  543. }
  544. [HttpPost]
  545. [AjaxOnly]
  546. public ActionResult AllocationDormitory(string dormitoryNo, string stuId, string dormitoryName)
  547. {
  548. stuEnrollIBLL.AllocationDormiotry(dormitoryNo, stuId, dormitoryName);
  549. return Success("分配成功!");
  550. }
  551. [HttpPost]
  552. [AjaxOnly]
  553. public ActionResult SyncDept()
  554. {
  555. stuEnrollIBLL.SyncDept();
  556. return Success("同步成功");
  557. }
  558. [HttpPost]
  559. [AjaxOnly]
  560. public ActionResult SyncMajor()
  561. {
  562. stuEnrollIBLL.SyncMajor();
  563. return Success("同步成功");
  564. }
  565. [HttpPost]
  566. [AjaxOnly]
  567. public ActionResult Sign(string stuId, bool status)
  568. {
  569. var result = stuEnrollIBLL.Sign(stuId, status);
  570. if (result.Item1)
  571. {
  572. return Success(result.Item2);
  573. }
  574. else
  575. {
  576. return Fail(result.Item2);
  577. }
  578. }
  579. [HttpPost]
  580. [AjaxOnly]
  581. public ActionResult AllReport()
  582. {
  583. stuEnrollIBLL.AllReport();
  584. return Success("操作成功");
  585. }
  586. [HttpPost]
  587. [AjaxOnly]
  588. public ActionResult AllPhoto()
  589. {
  590. stuEnrollIBLL.AllPhoto();
  591. return Success("操作成功");
  592. }
  593. [HttpPost]
  594. [AjaxOnly]
  595. public ActionResult AllGetCloth()
  596. {
  597. stuEnrollIBLL.AllGetCloth();
  598. return Success("操作成功");
  599. }
  600. [HttpPost]
  601. [AjaxOnly]
  602. public ActionResult AllGetSize()
  603. {
  604. stuEnrollIBLL.AllGetSize();
  605. return Success("操作成功");
  606. }
  607. [HttpPost]
  608. [AjaxOnly]
  609. public ActionResult AllGetArticle()
  610. {
  611. stuEnrollIBLL.AllGetArticle();
  612. return Success("操作成功");
  613. }
  614. [HttpPost]
  615. [AjaxOnly]
  616. public ActionResult Report(string stuId, bool status)
  617. {
  618. var result = stuEnrollIBLL.Report(stuId, status);
  619. if (result.Item1)
  620. {
  621. return Success(result.Item2);
  622. }
  623. else
  624. {
  625. return Fail(result.Item2);
  626. }
  627. }
  628. [HttpPost]
  629. [AjaxOnly]
  630. public ActionResult Stay(string stuId, bool status, bool payAfter = false)
  631. {
  632. var result = stuEnrollIBLL.Stay(stuId, status, payAfter);
  633. if (result.Item1)
  634. {
  635. return Success(result.Item2);
  636. }
  637. else
  638. {
  639. return Fail(result.Item2);
  640. }
  641. }
  642. [HttpPost]
  643. [AjaxOnly]
  644. public ActionResult AllStay()
  645. {
  646. stuEnrollIBLL.AllStay();
  647. return Success("操作成功");
  648. }
  649. [HttpPost]
  650. [AjaxOnly]
  651. public ActionResult Help(string stuId, bool status, bool payAfter = false)
  652. {
  653. var result = stuEnrollIBLL.Help(stuId, status, payAfter);
  654. if (result.Item1)
  655. {
  656. return Success(result.Item2);
  657. }
  658. else
  659. {
  660. return Fail(result.Item2);
  661. }
  662. }
  663. [HttpPost]
  664. [AjaxOnly]
  665. public ActionResult AllHelp()
  666. {
  667. stuEnrollIBLL.AllHelp();
  668. return Success("操作成功");
  669. }
  670. [HttpPost]
  671. [AjaxOnly]
  672. public ActionResult Military(string stuId, bool status, bool payAfter = false)
  673. {
  674. var result = stuEnrollIBLL.Military(stuId, status, payAfter);
  675. if (result.Item1)
  676. {
  677. return Success(result.Item2);
  678. }
  679. else
  680. {
  681. return Fail(result.Item2);
  682. }
  683. }
  684. [HttpPost]
  685. [AjaxOnly]
  686. public ActionResult AllMilitary()
  687. {
  688. stuEnrollIBLL.AllMilitary();
  689. return Success("成功");
  690. }
  691. [HttpPost]
  692. [AjaxOnly]
  693. public ActionResult IsPay(string stuId, bool status)
  694. {
  695. var result = stuEnrollIBLL.IsPay(stuId, status);
  696. if (result.Item1)
  697. {
  698. return Success(result.Item2);
  699. }
  700. else
  701. {
  702. return Fail(result.Item2);
  703. }
  704. }
  705. [HttpPost]
  706. [AjaxOnly]
  707. public ActionResult IsPhoto(string stuId, string base64url)
  708. {
  709. var loginuser = LoginUserInfo.Get();
  710. //头像处理
  711. var folderId = Guid.NewGuid().ToString();
  712. string filePath = Config.GetValue("AnnexesFile");
  713. string uploadDate = DateTime.Now.ToString("yyyyMMdd");
  714. string FileEextension = ".png";
  715. string fileGuid = Guid.NewGuid().ToString();
  716. string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, loginuser.account, uploadDate, fileGuid, FileEextension);
  717. //创建文件夹
  718. string path = Path.GetDirectoryName(virtualPath);
  719. Directory.CreateDirectory(path);
  720. AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity();
  721. if (!System.IO.File.Exists(virtualPath))
  722. {
  723. byte[] bytes = Convert.FromBase64String(base64url.Replace("data:image/png;base64,", ""));
  724. FileInfo file = new FileInfo(virtualPath);
  725. FileStream fs = file.Create();
  726. fs.Write(bytes, 0, bytes.Length);
  727. fs.Close();
  728. //文件信息写入数据库
  729. fileAnnexesEntity.F_Id = fileGuid;
  730. fileAnnexesEntity.F_FileName = "userphoto.png";
  731. fileAnnexesEntity.F_FilePath = virtualPath;
  732. fileAnnexesEntity.F_FileSize = bytes.Length.ToString();
  733. fileAnnexesEntity.F_FileExtensions = FileEextension;
  734. fileAnnexesEntity.F_FileType = FileEextension.Replace(".", "");
  735. fileAnnexesEntity.F_CreateUserId = loginuser.userId;
  736. fileAnnexesEntity.F_CreateUserName = loginuser.realName;
  737. annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity);
  738. }
  739. var result = stuEnrollIBLL.IsPhoto(stuId, true, fileGuid);
  740. if (result.Item1)
  741. {
  742. return Success(result.Item2);
  743. }
  744. else
  745. {
  746. return Fail(result.Item2);
  747. }
  748. }
  749. [HttpPost]
  750. [AjaxOnly]
  751. public ActionResult GetCloth(string stuId, bool status)
  752. {
  753. var result = stuEnrollIBLL.GetCloth(stuId, status);
  754. if (result.Item1)
  755. {
  756. return Success(result.Item2);
  757. }
  758. else
  759. {
  760. return Fail(result.Item2);
  761. }
  762. }
  763. [HttpPost]
  764. [AjaxOnly]
  765. public ActionResult GetClothSize(string stuId, bool status)
  766. {
  767. var result = stuEnrollIBLL.GetClothSize(stuId, status);
  768. if (result.Item1)
  769. {
  770. return Success(result.Item2);
  771. }
  772. else
  773. {
  774. return Fail(result.Item2);
  775. }
  776. }
  777. [HttpPost]
  778. [AjaxOnly]
  779. public ActionResult GetArticles(string stuId, bool status)
  780. {
  781. var result = stuEnrollIBLL.GetArticles(stuId, status);
  782. if (result.Item1)
  783. {
  784. return Success(result.Item2);
  785. }
  786. else
  787. {
  788. return Fail(result.Item2);
  789. }
  790. }
  791. [HttpPost]
  792. [AjaxOnly]
  793. public ActionResult GetMoney()
  794. {
  795. stuEnrollIBLL.GetMoney();
  796. return Success("操作成功");
  797. }
  798. /// <summary>
  799. /// 下载文件
  800. /// </summary>
  801. /// <param name="fileId">文件id</param>
  802. /// <returns></returns>
  803. [HttpPost]
  804. public void DownWrod()
  805. {
  806. ExcelHelper.aaaaa();
  807. }
  808. /// <summary>
  809. /// 关联照片
  810. /// </summary>
  811. /// <returns></returns>
  812. public ActionResult RelationPhoto()
  813. {
  814. stuEnrollIBLL.RelationPhoto();
  815. return Success("关联成功");
  816. }
  817. /// <summary>
  818. /// 同步学生数据
  819. /// </summary>
  820. /// <returns></returns>
  821. public ActionResult Synchronization()
  822. {
  823. stuEnrollIBLL.Synchronization();
  824. return Success("同步成功");
  825. }
  826. /// <summary>
  827. /// 报名审核
  828. /// </summary>
  829. /// <returns></returns>
  830. public ActionResult UpdateEnrollStatus(string keyValue, string strEntity)
  831. {
  832. stuEnrollIBLL.UpdateEnrollStatus(keyValue, 2);
  833. return Success("保存成功");
  834. }
  835. /// <summary>
  836. /// 报名--去审核
  837. /// </summary>
  838. /// <returns></returns>
  839. public ActionResult NoCheck(string keyValue)
  840. {
  841. stuEnrollIBLL.UpdateEnrollStatus(keyValue, 0);
  842. return Success("保存成功");
  843. }
  844. /// <summary>
  845. /// 录取
  846. /// </summary>
  847. /// <returns></returns>
  848. public ActionResult Admission(string keyValue, int IsAdmission)
  849. {
  850. var count = stuEnrollScoreIBLL.GetNoCheck(keyValue);
  851. if (count > 0)
  852. {
  853. return Fail("该学生有未审核的科目成绩");
  854. }
  855. stuEnrollIBLL.Admission(keyValue, IsAdmission);
  856. return Success("保存成功");
  857. }
  858. #endregion
  859. }
  860. }