From 0c66dec0d9b415277c110c90891aad13075db3fe Mon Sep 17 00:00:00 2001 From: ndbs Date: Sat, 22 Jan 2022 16:21:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E8=BD=AC=E5=85=A5=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=94=9F=E6=88=90=E5=AD=A6=E7=B1=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuInfoBasicChangeController.cs | 15 +++++++++++ .../Views/StuInfoBasic/Form.cshtml | 2 +- .../Views/StuInfoBasicChange/Index.cshtml | 1 + .../Views/StuInfoBasicChange/Index.js | 22 ++++++++++++++++ .../StuInfoBasicChangeBLL.cs | 24 +++++++++++++++++ .../StuInfoBasicChangeIBLL.cs | 8 +++++- .../StuInfoBasicChangeService.cs | 26 +++++++++++++++++-- 7 files changed, 94 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs index f699ac48a..dcf285011 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs @@ -166,6 +166,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuInfoBasicChangeIBLL.DoUnCheck(keyValue); return Success("操作成功!"); } + + /// + /// 生成学籍 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + + public ActionResult GenerateStu(string stuNo) + { + stuInfoBasicChangeIBLL.GenerateStu(stuNo); + return Success("生成成功!"); + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml index 63711fe01..66e5e6da3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml @@ -25,7 +25,7 @@
省编学号
- +
身份证号*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.cshtml index 13363e638..7adba77f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.cshtml @@ -30,6 +30,7 @@  去审核  异动前信息  异动后信息 +  生成学籍
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js index 24033455e..e7bb6daec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Index.js @@ -140,6 +140,28 @@ var bootstrap = function ($, learun) { }); } }); + $('#lr_stuCode').on('click', function () { + var StuNo = $('#gridtable').jfGridValue('StuNo'); + if (learun.checkrow(StuNo)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus != 1) { + learun.alert.warning("当前项目未审核无法去审!"); + return; + } + var StuChangeType = $('#gridtable').jfGridValue('StuChangeType'); + if (StuChangeType != "02") { + learun.alert.warning("只有转入学生才可生成学籍!"); + return; + } + learun.layerConfirm('是否确认生成学籍!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/GenerateStu', { stuNo: StuNo }, function () { + refreshGirdData(); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs index c3076b071..ea78f808d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeBLL.cs @@ -165,6 +165,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 生成学籍 + /// 主键 + /// + /// + public void GenerateStu(string stuNo) + { + try + { + stuInfoBasicChangeService.GenerateStu(stuNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs index 3380c21a7..7935e6ff0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeIBLL.cs @@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void SaveEntity(string keyValue, StuInfoBasicChangeEntity entity); - + /// /// 审核实体数据 /// 主键 @@ -57,6 +57,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void DoUnCheck(string keyValue); + /// + /// 生成学籍 + /// + /// + void GenerateStu(string stuNo); + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs index 5fb126220..739d03722 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs @@ -153,7 +153,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (entity != null) { //处理数据 - if (entity.StuChangeType == "01" || entity.StuChangeType == "02" || entity.StuChangeType == "03") //降级、转班、转专业 + if (entity.StuChangeType == "01" || entity.StuChangeType == "03") //降级、转班、转专业 { //改信息; var classInfoEntity = db.FindEntity(x => x.ClassNo == entity.NewClassNo); @@ -162,7 +162,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration db.ExecuteBySql($"update StuInfoBasic set DeptNo='{entity.NewDeptNo}',MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' "); } } - else if (entity.StuChangeType == "04" || entity.StuChangeType == "05") //退学、休学 + else if (entity.StuChangeType == "02" || entity.StuChangeType == "04") //退学、休学 { //改信息;不显示成绩; db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' "); @@ -237,6 +237,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public void GenerateStu(string stuNo) + { + try + { + var entity = this.BaseRepository("CollegeMIS").FindEntity(s => s.StuNo == stuNo); + entity.StuCode = "G" + entity.IdentityCardNo; + this.BaseRepository("CollegeMIS").Update(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion }