|
|
@@ -321,6 +321,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 增加工作安排 |
|
|
|
/// </summary> |
|
|
|
/// <param name="workName">工作名称</param> |
|
|
|
public void AddWork(string workName) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
var yearAndSemester = Common.GetSemesterAndYear(); |
|
|
|
if (!string.IsNullOrEmpty(workName)) |
|
|
|
{ |
|
|
|
//判断是否存在 |
|
|
|
var model = this.BaseRepository("CollegeMIS").FindEntity<EADateArrangeEntity>(x => x.WorkName == workName); |
|
|
|
if (model == null) |
|
|
|
{ |
|
|
|
//不存在的话写入一条 |
|
|
|
var strSql = new StringBuilder(); |
|
|
|
strSql.Append($@"insert into EADateArrange(dm, WorkName, MakeDate, AcademicYearNo, Semester, EndDate, CheckMark, WhoArrange) |
|
|
|
values((select Max(CONVERT(int, dm)) + 1 from EADateArrange),'{workName}' , GETDATE(), '{yearAndSemester.AcademicYearShort}', '{yearAndSemester.Semester}', DATEADD(month, 1, GETDATE()), 0, '超级管理员') "); |
|
|
|
this.BaseRepository("CollegeMIS").ExecuteBySql(strSql.ToString()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
if (ex is ExceptionEx) |
|
|
|
{ |
|
|
|
throw; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw ExceptionEx.ThrowServiceException(ex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
/// <summary> |
|
|
@@ -532,6 +569,5 @@ and a.Academicyearno='" + entity.AcademicYearNo + "' and a.Semester='" + entity. |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |