@@ -537,6 +537,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
stuInfoBasicIBLL.SyncMajor(); | stuInfoBasicIBLL.SyncMajor(); | ||||
return Success("同步成功"); | return Success("同步成功"); | ||||
} | } | ||||
/// <summary> | |||||
/// 生成新生信息 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult GenerateFreshInfo(string grade) | |||||
{ | |||||
stuInfoBasicIBLL.GenerateFreshInfo(grade); | |||||
return Success("生成成功"); | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } |
@@ -55,6 +55,7 @@ | |||||
<a id="lr_printInfo" class="btn btn-default"><i class="fa fa-print"></i> 学生简历表</a> | <a id="lr_printInfo" class="btn btn-default"><i class="fa fa-print"></i> 学生简历表</a> | ||||
<a id="lr_syn" class="btn btn-default"><i class="fa fa-plus"></i> 同步系部</a> | <a id="lr_syn" class="btn btn-default"><i class="fa fa-plus"></i> 同步系部</a> | ||||
<a id="lr_synmajor" class="btn btn-default"><i class="fa fa-plus"></i> 同步专业</a> | <a id="lr_synmajor" class="btn btn-default"><i class="fa fa-plus"></i> 同步专业</a> | ||||
<a id="lr_generateFresh" class="btn btn-default"><i class="fa fa-plus"></i> 生成新生信息</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -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 () { | initGird: function () { | ||||
@@ -245,6 +245,7 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ label: '身份证号', name: 'IdentityCardNo', width: 150, align: "left" }, | { 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) { | label: '民族', name: 'NationalityNo', width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('dataItem', { | learun.clientdata.getAsync('dataItem', { | ||||
@@ -396,6 +396,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 生成新生信息 | |||||
/// </summary> | |||||
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() | public void UpdateAccount() | ||||
{ | { | ||||
@@ -28,7 +28,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <returns></returns> | /// <returns></returns> | ||||
StuInfoBasicEntity GetStuInfoBasicEntity(string keyValue); | StuInfoBasicEntity GetStuInfoBasicEntity(string keyValue); | ||||
List<CdMajorEntity> GetMajorInfoWithGraduation(); | List<CdMajorEntity> GetMajorInfoWithGraduation(); | ||||
void CreateGraduateNoByMajor(string CityCode,string SchoolCode,string MajorList); | |||||
void CreateGraduateNoByMajor(string CityCode, string SchoolCode, string MajorList); | |||||
StuInfoBasicEntity GetStuNoByAccount(string keyValue); | StuInfoBasicEntity GetStuNoByAccount(string keyValue); | ||||
List<string> GetSaveClassStudents(string account); | List<string> GetSaveClassStudents(string account); | ||||
@@ -48,7 +48,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// 审核全部 | /// 审核全部 | ||||
/// </summary> | /// </summary> | ||||
void CheckAll(); | void CheckAll(); | ||||
void AllowGraduate(string stuNo,string status); | |||||
void AllowGraduate(string stuNo, string status); | |||||
void SynPhoto(); | void SynPhoto(); | ||||
/// <summary> | /// <summary> | ||||
/// 删除实体数据 | /// 删除实体数据 | ||||
@@ -79,5 +79,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
IEnumerable<StuInfoBasicEntity> GetStuInfoByClassNo(string classNo); | IEnumerable<StuInfoBasicEntity> GetStuInfoByClassNo(string classNo); | ||||
void SyncDept(); | void SyncDept(); | ||||
void SyncMajor(); | void SyncMajor(); | ||||
/// <summary> | |||||
/// 生成新生信息 | |||||
/// </summary> | |||||
void GenerateFreshInfo(string grade); | |||||
} | } | ||||
} | } |
@@ -961,5 +961,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 生成新生信息 | |||||
/// </summary> | |||||
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); | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
} | } |