diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs index 5a8050e97..a474e3408 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs @@ -537,6 +537,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuInfoBasicIBLL.SyncMajor(); return Success("同步成功"); } + + /// + /// 生成新生信息 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult GenerateFreshInfo(string grade) + { + stuInfoBasicIBLL.GenerateFreshInfo(grade); + return Success("生成成功"); + } + + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml index 3c338ac37..a5e3601e6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml @@ -55,6 +55,7 @@  学生简历表   同步系部   同步专业 +   生成新生信息 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js index c9cbca4da..4dc1ba613 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js @@ -229,6 +229,16 @@ var bootstrap = function ($, learun) { }); }); + //生成新生信息 + $('#lr_generateFresh').on('click', function () { + learun.prompt('请输入新生年级:例如24', function (value, index, elem) { + if (value) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GenerateFreshInfo', { grade: value }, function () { + + }); + } + }); + }); }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js index 93f552b0e..8d5c6ddb2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js @@ -245,6 +245,7 @@ var bootstrap = function ($, learun) { } }, { label: '身份证号', name: 'IdentityCardNo', width: 150, align: "left" }, + { label: '联系电话', name: 'telephone', width: 100, align: "left" }, { label: '民族', name: 'NationalityNo', width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs index 0b931dfd8..a58dce71e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs @@ -396,6 +396,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 生成新生信息 + /// + public void GenerateFreshInfo(string grade) + { + try + { + stuInfoBasicService.GenerateFreshInfo(grade); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } public void UpdateAccount() { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs index 739525f51..036fb8543 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs @@ -28,7 +28,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// StuInfoBasicEntity GetStuInfoBasicEntity(string keyValue); List GetMajorInfoWithGraduation(); - void CreateGraduateNoByMajor(string CityCode,string SchoolCode,string MajorList); + void CreateGraduateNoByMajor(string CityCode, string SchoolCode, string MajorList); StuInfoBasicEntity GetStuNoByAccount(string keyValue); List GetSaveClassStudents(string account); @@ -48,7 +48,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 审核全部 /// void CheckAll(); - void AllowGraduate(string stuNo,string status); + void AllowGraduate(string stuNo, string status); void SynPhoto(); /// /// 删除实体数据 @@ -79,5 +79,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration IEnumerable GetStuInfoByClassNo(string classNo); void SyncDept(); void SyncMajor(); + /// + /// 生成新生信息 + /// + void GenerateFreshInfo(string grade); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index 504288bfa..918ee8e7c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -961,5 +961,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 生成新生信息 + /// + public void GenerateFreshInfo(string grade) + { + try + { + var strSql = $@"insert into StuInfoFresh(ID, NoticeNo, ksh, StuNo, StuName, GenderNo, Birthday, ClassNo, DeptNo, MajorNo, MajorDetailNok, + MajorDetailName, PartyFaceNo, FamilyOriginNo, NationalityNo, ResidenceNo, TestStuSortNo, HealthStatusNo, WillNo, + TestStuSubjectNo, GraduateNo, PlanFormNo, IsThreeGood, IsExcellent, IsNormalCadre, IsProvinceFirstThree, OverseasChineseNo, + MatriculateSort, ProvinceNo, HighSchoolNo, RegionNo, Remark, IdentityCardNo, HighSchoolName, + GoodAt, telephone, MailAddress, Grade, ArriveDate, RegisterStatus, Photo, + CreateUserId,DepositBank, BankCard, BankLocation) +( +select NEWID(),NoticeNo,ksh,StuNo,StuName,GenderNo,Birthday,ClassNo,DeptNo,MajorNo,MajorDetailNo, +MajorDetailName,PartyFaceNo,FamilyOriginNo,NationalityNo,ResidenceNo,TestStuSortNo,HealthStatusNo, +WillNo,TestStuSubjectNo,GraduateNo,PlanFormNo,IsThreeGood,IsExcellent,IsNormalCadre, +IsProvinceFirstThree,OverseasChineseNo,MatriculateSort,ProvinceNo,HighSchoolNo,RegionNo,Remark, +IdentityCardNo,HighSchoolName,GoodAt,mobile,MailAddress,Grade,RegisterDate,RegisterStatus,Photo, +'{LoginUserInfo.Get().userId}',DepositBank,BankCard,BankLocation +from StuInfoBasic bb where bb.Grade='{grade}' +and bb.StuNo not in (select ff.StuNo from StuInfoFresh ff where ff.StuNo is not null) +)"; + this.BaseRepository("CollegeMIS").ExecuteBySql(strSql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } }