From 42b1f73a0dc584c781aad3a028ffab17e60637f1 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Wed, 16 Nov 2022 14:34:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=8C=89=E5=A4=A9=E8=AF=B7?= =?UTF-8?q?=E5=81=87=E5=AE=A1=E6=A0=B8=E9=80=9A=E8=BF=87=E5=90=8E=E8=AF=BE?= =?UTF-8?q?=E5=A0=82=E8=80=83=E5=8B=A4=E8=87=AA=E5=8A=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E6=9D=A1=E5=AD=A6=E7=94=9F=E8=AF=B7=E5=81=87=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeLessonTermEntity.cs | 1 + .../StuLeaveManagementService.cs | 43 ++++++++++++++++++- .../LearunApp-2.2.0/config.js | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermEntity.cs index 5bafb28a7..a63fb6e8e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermEntity.cs @@ -159,6 +159,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [NotMapped] public string StuName { get; set; } [NotMapped] public string Grade { get; set; } + [NotMapped] public string GenderNo { get; set; } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs index 400edee4b..2786c3ce1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs @@ -263,7 +263,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var endTime = Convert.ToDateTime(model.EndTime?.ToString("yyyy-MM-dd") + " 23:59:59"); //排课数据 - var arrangeLessonTermList = db.FindList($@"select a.*,b.StuName,b.Grade from [dbo].[ArrangeLessonTerm] a + var arrangeLessonTermList = db.FindList($@"select a.*,b.StuName,b.Grade,b.GenderNo from [dbo].[ArrangeLessonTerm] a join stuinfobasic b on a.teachclassno=b.classno where b.stuno='{model.CreateUserNo}' and a.lessondate between '{startTime}' and '{endTime}'"); @@ -271,6 +271,8 @@ and a.lessondate between '{startTime}' and '{endTime}'"); var deptList = db.FindList(); var majorList = db.FindList(); var classInfoList = db.FindList(); + var classRoomList = db.FindList().ToList(); + var lessonSortList = db.FindList().ToList(); foreach (var arrangeLessonTerm in arrangeLessonTermList) { StuAttendanceLeaveEntity stuAttendanceLeave = new StuAttendanceLeaveEntity(); @@ -299,8 +301,47 @@ and a.lessondate between '{startTime}' and '{endTime}'"); stuAttendanceLeave.LeaveType = "1"; stuAttendanceLeave.EmpNo = arrangeLessonTerm.EmpNo; stuAttendanceLeave.ClassRoomNo = arrangeLessonTerm.ClassroomNo; + stuAttendanceLeave.UpdateDate = DateTime.Now; + stuAttendanceLeave.IsCheck = "1"; + stuAttendanceLeave.TecRemark = "按天请假"; db.Insert(stuAttendanceLeave); + + //学生考勤 + StuAttendanceEntity stuAttendanceEntity = new StuAttendanceEntity(); + stuAttendanceEntity.AcademicYearNo = arrangeLessonTerm.AcademicYearNo; + stuAttendanceEntity.ClassName = classInfoList + .Where(x => x.ClassNo == arrangeLessonTerm.TeachClassNo).FirstOrDefault()?.ClassName; + stuAttendanceEntity.ClassNo = arrangeLessonTerm.TeachClassNo; + stuAttendanceEntity.DeptName = deptList.Where(x => x.DeptNo == arrangeLessonTerm.DeptNo) + .FirstOrDefault()?.DeptName; + stuAttendanceEntity.DeptNo = arrangeLessonTerm.DeptNo; + stuAttendanceEntity.EmpNo = arrangeLessonTerm.EmpNo; + stuAttendanceEntity.Grade = arrangeLessonTerm.Grade; + stuAttendanceEntity.InertDate = DateTime.Now; + stuAttendanceEntity.LessonDate = arrangeLessonTerm.LessonDate; + stuAttendanceEntity.LessonName = arrangeLessonTerm.LessonName; + stuAttendanceEntity.LessonNo = arrangeLessonTerm.LessonNo; + stuAttendanceEntity.LessonSortName = lessonSortList.Find(m => m.LessonSortNo == arrangeLessonTerm.LessonSortNo)?.LessonSortName; + stuAttendanceEntity.LessonSortNo = arrangeLessonTerm.LessonSortNo; + stuAttendanceEntity.LessonTime = arrangeLessonTerm.LessonTime; + stuAttendanceEntity.MajorName = majorList.Where(x => x.MajorNo == arrangeLessonTerm.MajorNo).FirstOrDefault()?.MajorName; + stuAttendanceEntity.MajorNo = arrangeLessonTerm.MajorNo; + stuAttendanceEntity.PlanWeek = null; + stuAttendanceEntity.Semester = arrangeLessonTerm.Semester; + stuAttendanceEntity.StuName = arrangeLessonTerm.StuName; + stuAttendanceEntity.StuNo = model.CreateUserNo; + stuAttendanceEntity.TeachClassNo = arrangeLessonTerm.TeachClassNo; + stuAttendanceEntity.Sort = "请假"; + stuAttendanceEntity.AttendOrNo = "否"; + stuAttendanceEntity.ClassRoomName = classRoomList.Find(x => x.ClassroomId.Trim() == arrangeLessonTerm.ClassroomNo.Trim())?.ClassroomName.Trim(); + stuAttendanceEntity.ClassRoomNo = arrangeLessonTerm.ClassroomNo; + stuAttendanceEntity.Gender = arrangeLessonTerm.GenderNo == "1" ? "男" : "女"; + stuAttendanceEntity.CheckMarkDept = ""; + stuAttendanceEntity.CheckMark = ""; + stuAttendanceEntity.Create(); + db.Insert(stuAttendanceEntity); + } } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index b14aeb67f..175f4aba8 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -23,7 +23,7 @@ export default { "apiHost": [ // "http://cyzjzx.gnway.cc:31218/"//测试地址接口 // "http://cyzjzx.gnway.cc:29904/"//正式地址接口 - "http://192.168.10.31:8088/" + "http://192.168.10.58:8012/" ], // "webHost":"http://cyzjzx.gnway.cc:30549/",//测试地址 // "webHost":"http://wxd3f.cyzjzx.com/",//正式地址