Browse Source

学籍异动 休学不保留学籍 记录异动情况

和田中职
ndbs 4 months ago
parent
commit
8eab8ccb37
1 changed files with 58 additions and 50 deletions
  1. +58
    -50
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs

+ 58
- 50
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuTransferInfo/StuTransferInfoService.cs View File

@@ -970,73 +970,81 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (upTrua.AnomalousType != "04" && upTrua.AnomalousType != "05" && upTrua.AnomalousType != "06" && upTrua.AnomalousType != "10" && upTrua.AnomalousType != "11" && upTrua.AnomalousType != "12" && upTrua.AnomalousType != "13" && upTrua.AnomalousType != "14")
{
var tableInfos = this.BaseRepository("CollegeMIS").FindTable(
@"SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value]
as varchar(100)) AS [字段说明]
@"SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value]
as varchar(100)) AS [字段说明]
FROM sys.tables AS t
INNER JOIN sys.columns
AS c ON t.object_id = c.object_id
LEFT JOIN sys.extended_properties AS ep
ON ep.major_id = c.object_id AND ep.minor_id = c.column_id WHERE ep.class =1
AND t.name='StuInfoBasicTran'");

PropertyInfo[] properties = stulist.GetType().GetProperties();
foreach (System.Reflection.PropertyInfo items in properties)
DataTable dt = tableInfos;
if (dt.Rows.Count > 0)
{
string name = items.Name;
object oldValue = items.GetValue(oldEntity);
object newValue = items.GetValue(stulist);
if (oldValue == null || newValue == null)
if (stulist == null)
{
continue;
stulist = addTruan;
}
if (!oldValue.Equals(newValue))
PropertyInfo[] properties = stulist.GetType().GetProperties();
foreach (System.Reflection.PropertyInfo items in properties)
{
var columnName = "";
foreach (DataRow rows in tableInfos.Rows)
string name = items.Name;
object oldValue = items.GetValue(oldEntity);
object newValue = items.GetValue(stulist);
if (oldValue == null || newValue == null)
{
continue;
}
if (!oldValue.Equals(newValue))
{
if (rows["字段名"].ToString() == items.Name)
var columnName = "";
foreach (DataRow rows in tableInfos.Rows)
{
columnName = rows["字段说明"].ToString();
}
if (rows["字段名"].ToString() == items.Name)
{
columnName = rows["字段说明"].ToString();
}

}
}

var NewClassName = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == upTrua.NewClassNo).ClassName;
var HisClassName = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == upTrua.ClassNo).ClassName;
var NewDeptName = db.FindEntity<CdDeptEntity>(x => x.DeptNo == upTrua.NewDeptNo).DeptName;
var HisDeptName = db.FindEntity<CdDeptEntity>(x => x.DeptNo == upTrua.DeptNo).DeptName;
var NewMajorName = db.FindEntity<CdMajorEntity>(x => x.MajorNo == upTrua.NewMajorNo).MajorName;
var HisMajorName = db.FindEntity<CdMajorEntity>(x => x.MajorNo == upTrua.MajorNo).MajorName;
if (name == "ClassNo")
{
oldValue = HisClassName;
newValue = NewClassName;
}
if (name == "DeptNo")
{
oldValue = HisDeptName;
newValue = NewDeptName;
}
if (name == "MajorNo")
{
oldValue = HisMajorName;
newValue = NewMajorName;
var NewClassName = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == upTrua.NewClassNo).ClassName;
var HisClassName = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == upTrua.ClassNo).ClassName;
var NewDeptName = db.FindEntity<CdDeptEntity>(x => x.DeptNo == upTrua.NewDeptNo).DeptName;
var HisDeptName = db.FindEntity<CdDeptEntity>(x => x.DeptNo == upTrua.DeptNo).DeptName;
var NewMajorName = db.FindEntity<CdMajorEntity>(x => x.MajorNo == upTrua.NewMajorNo).MajorName;
var HisMajorName = db.FindEntity<CdMajorEntity>(x => x.MajorNo == upTrua.MajorNo).MajorName;
if (name == "ClassNo")
{
oldValue = HisClassName;
newValue = NewClassName;
}
if (name == "DeptNo")
{
oldValue = HisDeptName;
newValue = NewDeptName;
}
if (name == "MajorNo")
{
oldValue = HisMajorName;
newValue = NewMajorName;
}
var changeEntity = new StuInfoBasic_ChangeLogEntity
{
StuID = oldEntity.StuId,
BeforeChange = oldValue.ToString(),
AfterChange = newValue.ToString(),
FieldName = columnName,
UpdateBy = LoginUserInfo.Get().userId,
UpdateTime = DateTime.Now,
StuChangeType = upTrua.AnomalousType,
StuChangeRemark = "学籍异动-学籍异动审核操作"
};
changeEntity.Create();
list.Add(changeEntity);
}
var changeEntity = new StuInfoBasic_ChangeLogEntity
{
StuID = oldEntity.StuId,
BeforeChange = oldValue.ToString(),
AfterChange = newValue.ToString(),
FieldName = columnName,
UpdateBy = LoginUserInfo.Get().userId,
UpdateTime = DateTime.Now,
StuChangeType = upTrua.AnomalousType,
StuChangeRemark = "学籍异动-学籍异动审核操作"
};
changeEntity.Create();
list.Add(changeEntity);
}
}
tableInfos.Clear();
}
else if (upTrua.AnomalousType != "04")
{


Loading…
Cancel
Save