|
|
@@ -56,7 +56,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
if (!queryParam["ClassManagerNo"].IsEmpty()) |
|
|
|
{ |
|
|
|
dp.Add("ClassManagerNo", queryParam["ClassManagerNo"].ToString(), DbType.String); |
|
|
|
strSql.Append(" AND (c.ClassDiredctorNo = @ClassManagerNo or c.ClassTutorNo = @ClassManagerNo "); |
|
|
|
dp.Add("ClassManagerNo2", "%" + queryParam["ClassManagerNo"].ToString() + "%", DbType.String); |
|
|
|
strSql.Append(" AND (c.ClassDiredctorNo = @ClassManagerNo or c.ClassTutorNo like @ClassManagerNo2 "); |
|
|
|
//登录用户是否是系主任:若是,展示大于2天的请假记录; |
|
|
|
var deptDirectorRoleId = Config.GetValue("DeptDirectorRoleId"); |
|
|
|
if (deptDirectorRoleId != null) |
|
|
@@ -137,7 +138,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
if (!string.IsNullOrEmpty(ClassManagerNo)) |
|
|
|
{ |
|
|
|
dp.Add("ClassManagerNo", ClassManagerNo, DbType.String); |
|
|
|
strSql.Append(" AND (c.ClassDiredctorNo = @ClassManagerNo or c.ClassTutorNo = @ClassManagerNo "); |
|
|
|
dp.Add("ClassManagerNo2", "%" + ClassManagerNo + "%", DbType.String); |
|
|
|
strSql.Append(" AND (c.ClassDiredctorNo = @ClassManagerNo or c.ClassTutorNo like @ClassManagerNo2 "); |
|
|
|
//登录用户是否是系主任:若是,展示大于2天的请假记录; |
|
|
|
var deptDirectorRoleId = Config.GetValue("DeptDirectorRoleId"); |
|
|
|
if (deptDirectorRoleId != null) |
|
|
@@ -206,8 +208,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
data.ClassNo = studentlist.ClassNo; |
|
|
|
data.CreateUserName = studentlist.StuName; |
|
|
|
} |
|
|
|
var classlist = this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(x =>x.ClassNo == data.ClassNo).FirstOrDefault(); |
|
|
|
if (classlist!=null) |
|
|
|
var classlist = this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(x => x.ClassNo == data.ClassNo).FirstOrDefault(); |
|
|
|
if (classlist != null) |
|
|
|
{ |
|
|
|
data.ClassDiredctorNo = classlist.ClassDiredctorNo; |
|
|
|
data.ClassTutorNo = classlist.ClassTutorNo; |
|
|
@@ -270,7 +272,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
{ |
|
|
|
entity.Modify(keyValue); |
|
|
|
db.Update(entity); |
|
|
|
|
|
|
|
|
|
|
|
if (entity.CheckStatus.Trim() == "1" && entity.StartTime != null) |
|
|
|
{ |
|
|
|
//请假审核通过后,该学生的对应日期的课表改为请假 |
|
|
@@ -324,12 +326,12 @@ and a.lessondate between '{startTime}' and '{endTime}'"); |
|
|
|
stuAttendanceLeave.ClassRoomName = classRoomList.FirstOrDefault(x => x.ClassroomNo == arrangeLessonTerm.ClassroomNo)?.ClassroomName; |
|
|
|
//去重 |
|
|
|
var isExistModel = this.BaseRepository("CollegeMIS").FindEntity<StuAttendanceLeaveEntity>(x => |
|
|
|
x.AcademicYearNo == stuAttendanceLeave.AcademicYearNo && x.Semester == stuAttendanceLeave.Semester && |
|
|
|
x.StuNo == stuAttendanceLeave.StuNo &&x.LessonNo == stuAttendanceLeave.LessonNo && x.TeachClassNo == stuAttendanceLeave.TeachClassNo && |
|
|
|
x.LessonSortNo == stuAttendanceLeave.LessonSortNo &&x.LessonDate == stuAttendanceLeave.LessonDate && x.LessonTime == stuAttendanceLeave.LessonTime && |
|
|
|
x.EmpNo == stuAttendanceLeave.EmpNo &&x.ClassRoomNo == stuAttendanceLeave.ClassRoomNo |
|
|
|
x.AcademicYearNo == stuAttendanceLeave.AcademicYearNo && x.Semester == stuAttendanceLeave.Semester && |
|
|
|
x.StuNo == stuAttendanceLeave.StuNo && x.LessonNo == stuAttendanceLeave.LessonNo && x.TeachClassNo == stuAttendanceLeave.TeachClassNo && |
|
|
|
x.LessonSortNo == stuAttendanceLeave.LessonSortNo && x.LessonDate == stuAttendanceLeave.LessonDate && x.LessonTime == stuAttendanceLeave.LessonTime && |
|
|
|
x.EmpNo == stuAttendanceLeave.EmpNo && x.ClassRoomNo == stuAttendanceLeave.ClassRoomNo |
|
|
|
); |
|
|
|
if (isExistModel!=null) |
|
|
|
if (isExistModel != null) |
|
|
|
{ |
|
|
|
stuAttendanceLeave.Modify(isExistModel.ID); |
|
|
|
db.Update(stuAttendanceLeave); |
|
|
@@ -339,14 +341,14 @@ and a.lessondate between '{startTime}' and '{endTime}'"); |
|
|
|
stuAttendanceLeave.Create(); |
|
|
|
db.Insert(stuAttendanceLeave); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//学生考勤 |
|
|
|
StuAttendanceEntity stuAttendanceEntity = new StuAttendanceEntity(); |
|
|
|
stuAttendanceEntity.AcademicYearNo = arrangeLessonTerm.AcademicYearNo; |
|
|
|
stuAttendanceEntity.Semester = arrangeLessonTerm.Semester; |
|
|
|
stuAttendanceEntity.StuNo = model.CreateUserNo; |
|
|
|
stuAttendanceEntity.StuName = arrangeLessonTerm.StuName; |
|
|
|
stuAttendanceEntity.Gender = arrangeLessonTerm.GenderNo.ToLower()=="true"?"男":"女"; |
|
|
|
stuAttendanceEntity.Gender = arrangeLessonTerm.GenderNo.ToLower() == "true" ? "男" : "女"; |
|
|
|
stuAttendanceEntity.Grade = arrangeLessonTerm.Grade; |
|
|
|
stuAttendanceEntity.DeptNo = arrangeLessonTerm.DeptNo; |
|
|
|
stuAttendanceEntity.DeptName = deptList.Where(x => x.DeptNo == arrangeLessonTerm.DeptNo) |
|
|
|