From 53e307777553f6f15819b4e1f14c01fd98e50f13 Mon Sep 17 00:00:00 2001
From: dyy <807692433@qq.com>
Date: Wed, 9 Aug 2023 15:59:51 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E6=95=99?=
=?UTF-8?q?=E5=AD=A6=E5=B7=A5=E4=BD=9C=E5=AE=89=E6=8E=92=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=8E=A5=E5=8F=A3=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../EADateArrange/EADateArrangeService.cs | 38 ++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EADateArrange/EADateArrangeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EADateArrange/EADateArrangeService.cs
index 01565ae86..61a974a10 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EADateArrange/EADateArrangeService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EADateArrange/EADateArrangeService.cs
@@ -321,6 +321,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
+
+ ///
+ /// 增加工作安排
+ ///
+ /// 工作名称
+ public void AddWork(string workName)
+ {
+ try
+ {
+ var yearAndSemester = Common.GetSemesterAndYear();
+ if (!string.IsNullOrEmpty(workName))
+ {
+ //判断是否存在
+ var model = this.BaseRepository("CollegeMIS").FindEntity(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
///
@@ -532,6 +569,5 @@ and a.Academicyearno='" + entity.AcademicYearNo + "' and a.Semester='" + entity.
}
}
-
}
}