@@ -166,6 +166,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
stuInfoBasicChangeIBLL.DoUnCheck(keyValue); | stuInfoBasicChangeIBLL.DoUnCheck(keyValue); | ||||
return Success("操作成功!"); | return Success("操作成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 生成学籍 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult GenerateStu(string stuNo) | |||||
{ | |||||
stuInfoBasicChangeIBLL.GenerateStu(stuNo); | |||||
return Success("生成成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -25,7 +25,7 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">省编学号</div> | <div class="lr-form-item-title">省编学号</div> | ||||
<input id="ProvinceCode" type="text" /> | |||||
<input id="ProvinceCode" type="text" class="form-control"/> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | <div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | ||||
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | <div class="lr-form-item-title">身份证号<font face="宋体">*</font></div> | ||||
@@ -30,6 +30,7 @@ | |||||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | <a id="lr_uncheck" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | ||||
<a id="lr_before" class="btn btn-default"><i class="fa fa-square"></i> 异动前信息</a> | <a id="lr_before" class="btn btn-default"><i class="fa fa-square"></i> 异动前信息</a> | ||||
<a id="lr_after" class="btn btn-default"><i class="fa fa-trash"></i> 异动后信息</a> | <a id="lr_after" class="btn btn-default"><i class="fa fa-trash"></i> 异动后信息</a> | ||||
<a id="lr_stuCode" class="btn btn-default"><i class="fa fa-lock"></i> 生成学籍</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -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 () { | initGird: function () { | ||||
@@ -165,6 +165,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 生成学籍 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public void GenerateStu(string stuNo) | |||||
{ | |||||
try | |||||
{ | |||||
stuInfoBasicChangeService.GenerateStu(stuNo); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
void SaveEntity(string keyValue, StuInfoBasicChangeEntity entity); | void SaveEntity(string keyValue, StuInfoBasicChangeEntity entity); | ||||
/// <summary> | /// <summary> | ||||
/// 审核实体数据 | /// 审核实体数据 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -57,6 +57,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
void DoUnCheck(string keyValue); | void DoUnCheck(string keyValue); | ||||
/// <summary> | |||||
/// 生成学籍 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
void GenerateStu(string stuNo); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -153,7 +153,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
if (entity != null) | if (entity != null) | ||||
{ | { | ||||
//处理数据 | //处理数据 | ||||
if (entity.StuChangeType == "01" || entity.StuChangeType == "02" || entity.StuChangeType == "03") //降级、转班、转专业 | |||||
if (entity.StuChangeType == "01" || entity.StuChangeType == "03") //降级、转班、转专业 | |||||
{ | { | ||||
//改信息; | //改信息; | ||||
var classInfoEntity = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.NewClassNo); | var classInfoEntity = db.FindEntity<ClassInfoEntity>(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}' "); | 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}' "); | 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<StuInfoBasicEntity>(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 | #endregion | ||||
} | } | ||||