Browse Source

【修改】学籍异动管理:增加几种异动类型;异动操作后计入异动日志表;

临城职教中职
dyy 2 years ago
parent
commit
eb2e8db462
11 changed files with 383 additions and 109 deletions
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs
  2. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml
  3. +42
    -33
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js
  4. +11
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.cshtml
  5. +43
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js
  6. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs
  7. +44
    -23
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs
  8. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs
  9. +215
    -22
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs
  10. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogEntity.cs
  11. +4
    -13
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicChangeController.cs View File

@@ -116,7 +116,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers

var loginUserInfo = LoginUserInfo.Get();
entity.CreateTime = DateTime.Now;
entity.CreateUserId = loginUserInfo.account;
entity.CreateUserId = loginUserInfo.userId;
entity.CheckStatus = 0;

stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity);


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.cshtml View File

@@ -29,11 +29,11 @@
<div class="col-xs-12 text-center">学籍异动前信息</div>
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange">
<div class="lr-form-item-title">系部<font face="宋体">*</font></div>
<div id="DeptNo" readonly="readonly"></div>
<div id="DeptNo" readonly="readonly"></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" readonly="readonly"></div>
<div id="MajorNo" readonly="readonly"></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange">
<div class="lr-form-item-title">班级<font face="宋体">*</font></div>
@@ -47,20 +47,20 @@
</div>
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange">
<div class="lr-form-item-title" data-title="新专业">新专业</div>
<div id="NewMajorNo" class="contentDiv "></div>
<div id="NewMajorNo" class="contentDiv zhuanzhuanye"></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="StuInfoBasicChange">
<div class="lr-form-item-title" data-title="新班级">新班级</div>
<div id="NewClassNo" class="contentDiv zhuanban"></div>
</div>
</div>
<div class="col-xs-12 text-center">异动说明</div>
<div class="NewSchool" style="display:none;">
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasicChange">
<div class="lr-form-item-title" data-title="转出学校">转出学校</div>
<input id="OutSchool" type="text" class="form-control" />
</div>
</div>
<div class="col-xs-12 text-center">异动说明</div>
<div class="col-xs-12 lr-form-item" data-table="StuInfoBasicChange">
<div class="lr-form-item-title">备注</div>
<textarea id="StuChangeRemark" class="form-control" style="height:50px;"></textarea>


+ 42
- 33
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicChange/Form.js View File

@@ -32,37 +32,37 @@ var bootstrap = function ($, learun) {
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>');
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>');
$(".NewContainer").show();
$('#OutSchool').removeAttr("isvalid");
$('#OutSchool').removeAttr("checkexpession");
$("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title'));
$('#OutSchool').val('');
$(".NewSchool").hide();
if (item.id === "01" ) { //留级
$(".NewSchool").hide();
if (item.id === "01" || item.id === "07") { //留级、转班
$(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly');
$("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet());
$("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet());
$('#OutSchool').val('');
} else if (item.id === "02") {//转校
$(".NewSchool").show();
$(".NewContainer").find('.contentDiv').removeAttr("isvalid");
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession");
$(".NewContainer").find('.contentDiv').removeAttr('readonly');
$(".NewSchool").find('.OutSchool').attr("isvalid", 'yes');
$(".NewSchool").find('.OutSchool').attr("checkexpession");
$(".NewSchool").find('.OutSchool').attr('readonly');
$("#NewDeptNo").siblings('div').html($("#NewDeptNo").siblings('div').attr('data-title'));
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title'));
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title'));
$(".NewContainer").hide();
$('#OutSchool').attr("isvalid", 'yes');
$('#OutSchool').attr("checkexpession", "NotNull");
$("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title') + '<font face="宋体">*</font>');
$(".NewSchool").show();
} else if (item.id === "03") { //复学
$(".NewSchool").hide();
$(".NewContainer").find('.contentDiv').removeAttr('readonly');
$(".NewSchool").find('.OutSchool').attr("isvalid", "Null");
$('#OutSchool').val('');
} else if (item.id === "04") { //转入
$(".NewSchool").hide();
$(".NewContainer").find('.contentDiv').removeAttr('readonly');
$(".NewSchool").find('.OutSchool').attr("isvalid", "Null");
$('#OutSchool').val('');
$("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet());
$("#NewMajorNo").lrselectSet($("#MajorNo").lrselectGet());
$("#NewClassNo").lrselectSet($("#ClassNo").lrselectGet());
} else if (item.id === "04") { //转入/进
learun.alert.warning("异动转进请点击学籍信息管理-异动转入按钮!");
$("#StuNo").val("");
$("#StuName").val("");
}
else { //退学、休学、
else if (item.id === "05" || item.id === "06") { //退学、休学、
$(".NewContainer").find('.contentDiv').removeAttr("isvalid");
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession");
$(".NewContainer").find('.contentDiv').removeAttr('readonly');
@@ -70,8 +70,11 @@ var bootstrap = function ($, learun) {
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title'));
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title'));
$(".NewContainer").hide();
$(".NewSchool").hide();
$('#OutSchool').val('');
}
else if (item.id === "08") { //转专业、
$(".NewContainer").find('.contentDiv.zhuanzhuanye').removeAttr('readonly');
$(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly');
$("#NewDeptNo").lrselectSet($("#DeptNo").lrselectGet());
}

}
@@ -171,29 +174,33 @@ var bootstrap = function ($, learun) {
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>');
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title') + '<font face="宋体">*</font>');
$(".NewContainer").show();
if (data[id].StuChangeType == "01") { //降级、转班
$('#OutSchool').removeAttr("isvalid");
$('#OutSchool').removeAttr("checkexpession");
$("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title'));
$('#OutSchool').val('');
$(".NewSchool").hide();
if (data[id].StuChangeType == "01" || data[id].StuChangeType == "07") { //留级、转班
$(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly');
$(".NewSchool").hide();
$('#OutSchool').val('');
}
else if (data[id].StuChangeType == "02") {//转校
$(".NewSchool").show();
$(".NewContainer").find('.contentDiv').removeAttr("isvalid");
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession");
$(".NewContainer").find('.contentDiv').removeAttr('readonly');
$(".NewSchool").find('.OutSchool').attr("isvalid");
$(".NewSchool").find('.OutSchool').attr("checkexpession");
$(".NewSchool").find('.OutSchool').attr('readonly');
$("#NewDeptNo").siblings('div').html($("#NewDeptNo").siblings('div').attr('data-title'));
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title'));
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title'));
$(".NewContainer").hide();
} else if (data[id].StuChangeType == "03") { //转专业
$('#OutSchool').attr("isvalid", 'yes');
$('#OutSchool').attr("checkexpession", "NotNull");
$("#OutSchool").siblings('div').html($("#OutSchool").siblings('div').attr('data-title') + '<font face="宋体">*</font>');
$(".NewSchool").show();
} else if (data[id].StuChangeType == "03") { //复学
$(".NewContainer").find('.contentDiv').removeAttr('readonly');
$(".NewSchool").hide();
$('#OutSchool').val('');
}
else { //退学、休学、转校
} else if (data[id].StuChangeType == "04") { //转入/进
learun.alert.warning("异动转进请点击学籍信息管理-异动转入按钮!");
$("#StuNo").val("");
$("#StuName").val("");
} else if (data[id].StuChangeType == "05" || data[id].StuChangeType == "06") { //退学、休学、
$(".NewContainer").find('.contentDiv').removeAttr("isvalid");
$(".NewContainer").find('.contentDiv').removeAttr("checkexpession");
$(".NewContainer").find('.contentDiv').removeAttr('readonly');
@@ -201,8 +208,10 @@ var bootstrap = function ($, learun) {
$("#NewMajorNo").siblings('div').html($("#NewMajorNo").siblings('div').attr('data-title'));
$("#NewClassNo").siblings('div').html($("#NewClassNo").siblings('div').attr('data-title'));
$(".NewContainer").hide();
$(".NewSchool").hide();
$('#OutSchool').val('');
}
else if (data[id].StuChangeType == "08") { //转专业、
$(".NewContainer").find('.contentDiv.zhuanzhuanye').removeAttr('readonly');
$(".NewContainer").find('.contentDiv.zhuanban').removeAttr('readonly');
}
}
}


+ 11
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.cshtml View File

@@ -2,6 +2,9 @@
ViewBag.Title = "学籍信息异动";
Layout = "~/Views/Shared/_Index.cshtml";
}
<script>
var stuId = "@ViewBag.keyValue";
</script>
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
@@ -14,16 +17,20 @@
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">字段</div>
<div class="lr-form-item-title">异动类型</div>
<div id="StuChangeType"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">修改属性</div>
<input id="FieldName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学生主键</div>
<input id="StuID" value="@ViewBag.keyValue" type="text" class="form-control" />
<div class="lr-form-item-title">学生姓名</div>
<div id="StuID"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">修改人</div>
<input id="UpdateBy" type="text" class="form-control" />
<div id="UpdateBy"></div>
</div>
</div>
</div>


+ 43
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic_ChangeLog/Index.js View File

@@ -45,6 +45,10 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#StuChangeType').lrDataItemSelect({ code: 'StuChangeType' });
$('#StuID').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' });
$('#UpdateBy').lrDataSourceSelect({ code: 'BaseUser', value: 'f_account', text: 'f_realname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
@@ -98,9 +102,35 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_ChangeLog/GetPageList',
headData: [
{
label: "异动类型", name: "StuChangeType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'StuChangeType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "异动备注", name: "StuChangeRemark", width: 250, align: "left" },
{
label: "学生姓名", name: "StuID", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic',
key: value,
keyId: 'stuid',
callback: function (_data) {
callback(_data['stuname']);
}
});
}
},
{ label: "修改属性", name: "FieldName", width: 200, align: "left" },
{ label: "修改前", name: "BeforeChange", width: 200, align: "left" },
{ label: "修改后", name: "AfterChange", width: 200, align: "left" },
@@ -110,7 +140,7 @@ var bootstrap = function ($, learun) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
key: value,
keyId: 'f_account',
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
@@ -119,7 +149,6 @@ var bootstrap = function ($, learun) {

},
{ label: "修改时间", name: "UpdateTime", width: 200, align: "left" },
{ label: "数据主键", name: "StuID", width: 250, align: "left" },
],
mainId: 'ID',
isPage: true,
@@ -130,9 +159,18 @@ var bootstrap = function ($, learun) {
search: function (param) {

param = param || {};
if ($("#StuID").val() != "" && $("#StuID").length > 0) {
param.StuID = $("#StuID").val();

//赋值
if (stuId != "" && stuId != undefined && stuId != null) {
$('#StuID').lrselectSet(stuId);
$('#StuID').attr('readonly', 'readonly');
$('#StuID').parent().attr('display','none');
param.StuID = stuId;
} else {
$('#StuID').removeAttr('readonly');
$('#StuID').parent().attr('display', 'block');
}

param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicEntity.cs View File

@@ -464,7 +464,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("STUDYMODALITY")]
public string StudyModality { get; set; }
/// <summary>
/// 学籍异动状态
/// 学籍异动状态(1表示不显示成绩)
/// </summary>
/// <returns></returns>
[Column("CHANGESTATUS")]


+ 44
- 23
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs View File

@@ -1064,17 +1064,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns>
public void SaveEntity(string keyValue, StuInfoBasicEntity entity)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
UserIBLL userIBLL = new UserBLL();
var loginUser = LoginUserInfo.Get();
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);

var oldEntity = this.BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(keyValue);
var oldEntity = db.FindEntity<StuInfoBasicEntity>(keyValue);
List<StuInfoBasic_ChangeLogEntity> list = new List<StuInfoBasic_ChangeLogEntity>();
var loginUser = LoginUserInfo.Get();
var tableInfos = this.BaseRepository("CollegeMIS").FindTable(@"SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value]
var tableInfos = db.FindTable(@"SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value]
as varchar(100)) AS [字段说明]
FROM sys.tables AS t
INNER JOIN sys.columns
@@ -1111,7 +1112,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
AfterChange = newValue.ToString(),
FieldName = columnName,
UpdateBy = loginUser.userId,
UpdateTime = DateTime.Now
UpdateTime = DateTime.Now,
StuChangeType="09",
StuChangeRemark="点击学籍信息管理-修改按钮进行操作"
};
changeEntity.Create();
list.Add(changeEntity);
@@ -1121,7 +1124,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

if (list.Count > 0)
{
this.BaseRepository("CollegeMIS").Insert(list);
db.Insert(list);
}


@@ -1142,37 +1145,55 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
userIBLL.SaveEntity(baseUser.F_UserId, baseUser);
}

this.BaseRepository("CollegeMIS").Update(entity);
db.Update(entity);
}
else
{
entity.Create();
if (entity.IsTran == "0")
if (entity.IsTran == "0")//转入/进
{
StuInfoBasicChangeEntity stuinfoChange = new StuInfoBasicChangeEntity
//学籍异动表
//StuInfoBasicChangeEntity stuinfoChange = new StuInfoBasicChangeEntity
//{
// Id = Guid.NewGuid().ToString(),
// StuNo = entity.StuNo,
// StuName = entity.StuName,
// DeptNo = entity.DeptNo,
// MajorNo = entity.MajorNo,
// ClassNo = entity.ClassNo,
// StuChangeRemark = entity.Remark,
// NewDeptNo = entity.DeptNo,
// NewMajorNo = entity.MajorNo,
// NewClassNo = entity.ClassNo,
// CreateUserId = entity.StuNo,
// StuChangeType = "04",
// StuChangeReason = "10",
// CreateTime = DateTime.Now,
//};
//db.Insert(stuinfoChange);
//学籍异动日志表
var changeEntity = new StuInfoBasic_ChangeLogEntity
{
Id = Guid.NewGuid().ToString(),
StuNo = entity.StuNo,
StuName = entity.StuName,
DeptNo = entity.DeptNo,
MajorNo = entity.MajorNo,
ClassNo = entity.ClassNo,
StuChangeRemark = entity.Remark,
NewDeptNo = entity.DeptNo,
NewMajorNo = entity.MajorNo,
NewClassNo = entity.ClassNo,
CreateUserId = entity.StuNo,
StuID = entity.StuId,
BeforeChange = "",
AfterChange = "",
FieldName = "",
UpdateBy = loginUser.userId,
UpdateTime = DateTime.Now,
StuChangeType = "04",
StuChangeReason = "10",
CreateTime = DateTime.Now,
StuChangeRemark = "点击学籍信息管理-异动转入按钮进行操作"
};
this.BaseRepository("CollegeMIS").Insert(stuinfoChange);
changeEntity.Create();
db.Insert(changeEntity);
}
this.BaseRepository("CollegeMIS").Insert(entity);
db.Insert(entity);
}

db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeEntity.cs View File

@@ -45,17 +45,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// StuChangeType
/// 异动类型(留级01,转出/校02,复学03,转入/进04,退学05,休学06,转班07,转专业08,学籍关键信息更改09)
/// </summary>
[Column("STUCHANGETYPE")]
public string StuChangeType { get; set; }
/// <summary>
/// StuChangeReason
/// 异动原因
/// </summary>
[Column("STUCHANGEREASON")]
public string StuChangeReason { get; set; }
/// <summary>
/// StuChangeRemark
/// 异动备注
/// </summary>
[Column("STUCHANGEREMARK")]
public string StuChangeRemark { get; set; }


+ 215
- 22
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasicChange/StuInfoBasicChangeService.cs View File

@@ -149,30 +149,215 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var loginUserInfo = LoginUserInfo.Get();
var now = DateTime.Now;
var logList = new List<StuInfoBasic_ChangeLogEntity>();
var entity = db.FindEntity<StuInfoBasicChangeEntity>(x => x.Id == keyValue);
if (entity != null)
{
//处理数据
if (entity.StuChangeType == "01" || entity.StuChangeType == "03") //降级、转班、转专业
var stuInfoBasicEntity = db.FindEntity<StuInfoBasicEntity>(x => x.StuNo == entity.StuNo);
if (stuInfoBasicEntity != null)
{
//改信息;
var classInfoEntity = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.NewClassNo);
if (classInfoEntity != null)
//处理数据
if (entity.StuChangeType == "01" || entity.StuChangeType == "07") //降级、转班、
{
db.ExecuteBySql($"update StuInfoBasic set DeptNo='{entity.NewDeptNo}',MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' ");
if (stuInfoBasicEntity.ClassNo != entity.NewClassNo)
{
var classInfoEntity = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.NewClassNo);
if (classInfoEntity != null)
{
if (stuInfoBasicEntity.Grade != classInfoEntity.Grade)
{
//增加异动日志表:年级
var logentity2 = new StuInfoBasic_ChangeLogEntity()
{
FieldName = "年级",
BeforeChange = stuInfoBasicEntity.Grade,
AfterChange = classInfoEntity.Grade,
UpdateBy = loginUserInfo.userId,
UpdateTime = now,
StuID = stuInfoBasicEntity.StuId,
StuChangeType = entity.StuChangeType,
StuChangeRemark = entity.StuChangeRemark,
StuChangeId = entity.Id
};
logentity2.Create();
logList.Add(logentity2);
}
//改学籍信息表;
db.ExecuteBySql($"update StuInfoBasic set ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' ");
//增加异动日志表:班级
var logentity = new StuInfoBasic_ChangeLogEntity()
{
FieldName = "班级",
BeforeChange = entity.ClassNo,
AfterChange = entity.NewClassNo,
UpdateBy = loginUserInfo.userId,
UpdateTime = now,
StuID = stuInfoBasicEntity.StuId,
StuChangeType = entity.StuChangeType,
StuChangeRemark = entity.StuChangeRemark,
StuChangeId = entity.Id
};
logentity.Create();
logList.Add(logentity);
}
}

}
}
else if (entity.StuChangeType == "02" || entity.StuChangeType == "04") //退学、休学
{
//改信息;不显示成绩;
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' ");
}
else if (entity.StuChangeType == "02" || entity.StuChangeType == "05" || entity.StuChangeType == "06") //转校、退学、休学、
{
//增加异动日志表:学籍异动状态
var logentity = new StuInfoBasic_ChangeLogEntity()
{
FieldName = "学籍异动状态",
BeforeChange = stuInfoBasicEntity.ChangeStatus?.ToString(),
AfterChange = "1",
UpdateBy = loginUserInfo.userId,
UpdateTime = now,
StuID = stuInfoBasicEntity.StuId,
StuChangeType = entity.StuChangeType,
StuChangeRemark = entity.StuChangeRemark,
StuChangeId = entity.Id
};
logentity.Create();
logList.Add(logentity);
//改学籍信息(异动状态为1表示不显示成绩);
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' ");
}
else if (entity.StuChangeType == "03") //复学
{
//增加异动日志表:学籍异动状态
var logentity = new StuInfoBasic_ChangeLogEntity()
{
FieldName = "学籍异动状态",
BeforeChange = stuInfoBasicEntity.ChangeStatus?.ToString(),
AfterChange = "0",
UpdateBy = loginUserInfo.userId,
UpdateTime = now,
StuID = stuInfoBasicEntity.StuId,
StuChangeType = entity.StuChangeType,
StuChangeRemark = entity.StuChangeRemark,
StuChangeId = entity.Id
};
logentity.Create();
logList.Add(logentity);
//改学籍信息(异动状态为0表示显示成绩);
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=null where StuNo='{entity.StuNo}' ");
}
else if (entity.StuChangeType == "08") //转专业、
{
if (stuInfoBasicEntity.MajorNo != entity.NewMajorNo)
{
var classInfoEntity2 = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.NewClassNo);
if (classInfoEntity2 != null)
{
if (stuInfoBasicEntity.Grade != classInfoEntity2.Grade)
{
//增加异动日志表:年级
var logentity3 = new StuInfoBasic_ChangeLogEntity()
{
FieldName = "年级",
BeforeChange = stuInfoBasicEntity.Grade,
AfterChange = classInfoEntity2.Grade,
UpdateBy = loginUserInfo.userId,
UpdateTime = now,
StuID = stuInfoBasicEntity.StuId,
StuChangeType = entity.StuChangeType,
StuChangeRemark = entity.StuChangeRemark,
StuChangeId = entity.Id
};
logentity3.Create();
logList.Add(logentity3);
}
//改学籍信息;
db.ExecuteBySql($"update StuInfoBasic set MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity2.Grade}' where StuNo='{entity.StuNo}' ");
//增加异动日志表:专业
var logentity = new StuInfoBasic_ChangeLogEntity()
{
FieldName = "专业",
BeforeChange = entity.MajorNo,
AfterChange = entity.NewMajorNo,
UpdateBy = loginUserInfo.userId,
UpdateTime = now,
StuID = stuInfoBasicEntity.StuId,
StuChangeType = entity.StuChangeType,
StuChangeRemark = entity.StuChangeRemark,
StuChangeId = entity.Id
};
logentity.Create();
logList.Add(logentity);
//增加异动日志表:班级
var logentity2 = new StuInfoBasic_ChangeLogEntity()
{
FieldName = "班级",
BeforeChange = entity.ClassNo,
AfterChange = entity.NewClassNo,
UpdateBy = loginUserInfo.userId,
UpdateTime = now,
StuID = stuInfoBasicEntity.StuId,
StuChangeType = entity.StuChangeType,
StuChangeRemark = entity.StuChangeRemark,
StuChangeId = entity.Id
};
logentity2.Create();
logList.Add(logentity2);
}
}
else
{
if (stuInfoBasicEntity.ClassNo != entity.NewClassNo)
{
var classInfoEntity2 = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.NewClassNo);
if (classInfoEntity2 != null)
{
if (stuInfoBasicEntity.Grade != classInfoEntity2.Grade)
{
//增加异动日志表:年级
var logentity2 = new StuInfoBasic_ChangeLogEntity()
{
FieldName = "年级",
BeforeChange = stuInfoBasicEntity.Grade,
AfterChange = classInfoEntity2.Grade,
UpdateBy = loginUserInfo.userId,
UpdateTime = now,
StuID = stuInfoBasicEntity.StuId,
StuChangeType = entity.StuChangeType,
StuChangeRemark = entity.StuChangeRemark,
StuChangeId = entity.Id
};
logentity2.Create();
logList.Add(logentity2);
}
//改学籍信息表;
db.ExecuteBySql($"update StuInfoBasic set MajorNo='{entity.NewMajorNo}',ClassNo='{entity.NewClassNo}',Grade='{classInfoEntity2.Grade}' where StuNo='{entity.StuNo}' ");
//增加异动日志表:班级
var logentity = new StuInfoBasic_ChangeLogEntity()
{
FieldName = "班级",
BeforeChange = entity.ClassNo,
AfterChange = entity.NewClassNo,
UpdateBy = loginUserInfo.userId,
UpdateTime = now,
StuID = stuInfoBasicEntity.StuId,
StuChangeType = entity.StuChangeType,
StuChangeRemark = entity.StuChangeRemark,
StuChangeId = entity.Id
};
logentity.Create();
logList.Add(logentity);
}
}
}
}
db.Insert(logList);

//修改状态
entity.CheckTime = DateTime.Now;
entity.CheckUserId = LoginUserInfo.Get().account;
entity.CheckStatus = 1;
db.Update(entity);
//修改异动表:审批状态、审批人、
entity.CheckTime = now;
entity.CheckUserId = loginUserInfo.userId;
entity.CheckStatus = 1;
db.Update(entity);
}
}
db.Commit();
}
@@ -204,23 +389,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (entity != null)
{
//处理数据
if (entity.StuChangeType == "01" || entity.StuChangeType == "02" || entity.StuChangeType == "03") //降级、转班、转专业
if (entity.StuChangeType == "01" || entity.StuChangeType == "07" || entity.StuChangeType == "08") //降级、转班、转专业、
{
//改信息;
//改学籍信息;
var classInfoEntity = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == entity.ClassNo);
if (classInfoEntity != null)
{
db.ExecuteBySql($"update StuInfoBasic set DeptNo='{entity.DeptNo}',MajorNo='{entity.MajorNo}',ClassNo='{entity.ClassNo}',Grade='{classInfoEntity.Grade}' where StuNo='{entity.StuNo}' ");
}
}
else if (entity.StuChangeType == "04" || entity.StuChangeType == "05") //退学、休学
else if (entity.StuChangeType == "02" || entity.StuChangeType == "05" || entity.StuChangeType == "06") //转校、退学、休学
{
//改信息;显示成绩
//改学籍信息(异动状态为null表示显示成绩)
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=null where StuNo='{entity.StuNo}' ");
}
else if (entity.StuChangeType == "03") //复学
{
//改学籍信息(异动状态为1表示不显示成绩);
db.ExecuteBySql($"update StuInfoBasic set ChangeStatus=1 where StuNo='{entity.StuNo}' ");
}

//修改状态
//修改异动表:审批状态、审批人、
db.ExecuteBySql("update StuInfoBasicChange set CheckTime=null,CheckUserId=null,CheckStatus=0 where Id='" + keyValue + "' ");
//删除异动日志表:学籍异动主键id
db.ExecuteBySql("delete from StuInfoBasic_ChangeLog where StuChangeId='" + keyValue + "' ");

}
db.Commit();
}


+ 15
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogEntity.cs View File

@@ -51,6 +51,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("STUID")]
public string StuID { get; set; }
/// <summary>
/// 学籍异动类型(留级01,转出/校02,复学03,转入/进04,退学05,休学06,转班07,转专业08,学籍关键信息更改09)
/// </summary>
[Column("STUCHANGETYPE")]
public string StuChangeType { get; set; }
/// <summary>
/// 学籍异动备注
/// </summary>
[Column("STUCHANGEREMARK")]
public string StuChangeRemark { get; set; }
/// <summary>
/// StuInfoBasicChange主键
/// </summary>
[Column("STUCHANGEID")]
public string StuChangeId { get; set; }
#endregion

#region 扩展操作


+ 4
- 13
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic_ChangeLog/StuInfoBasic_ChangeLogService.cs View File

@@ -29,16 +29,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.FieldName,
t.BeforeChange,
t.AfterChange,
t.UpdateBy,
t.UpdateTime,
t.StuID
");
strSql.Append("SELECT t.*");
strSql.Append(" FROM StuInfoBasic_ChangeLog t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
@@ -57,7 +48,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
if (!queryParam["StuID"].IsEmpty())
{
dp.Add("StuID", "" + queryParam["StuID"].ToString() + "", DbType.String);
dp.Add("StuID", queryParam["StuID"].ToString(), DbType.String);
strSql.Append(" AND t.StuID = @StuID ");
}
if (!queryParam["UpdateTime"].IsEmpty())
@@ -67,8 +58,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
if (!queryParam["UpdateBy"].IsEmpty())
{
dp.Add("UpdateBy", "%" + queryParam["UpdateBy"].ToString() + "%", DbType.String);
strSql.Append(" AND t.UpdateBy Like @UpdateBy ");
dp.Add("UpdateBy", queryParam["UpdateBy"].ToString(), DbType.String);
strSql.Append(" AND t.UpdateBy = @UpdateBy ");
}
return this.BaseRepository("CollegeMIS").FindList<StuInfoBasic_ChangeLogEntity>(strSql.ToString(),dp, pagination);
}


Loading…
Cancel
Save