Browse Source

【修改】学生请假管理-PC:涉及到辅导员的由单个改为多个;

应县
dyy 7 months ago
parent
commit
80e8395071
3 changed files with 48 additions and 28 deletions
  1. +17
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.js
  2. +17
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Index.js
  3. +14
    -12
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs

+ 17
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.js View File

@@ -151,14 +151,23 @@ var bootstrap = function ($, learun) {
{
label: "辅导员", name: "ClassTutorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empno',
callback: function (_data) {
callback(_data['empname']);
}
});
if (value) {
var result = "";
$.each(value.split(","), function (index, item) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: item,
keyId: 'empno',
callback: function (_data) {
result += _data['empname'];
}
});
if (index < value.split(",").length - 1) {
result += ",";
}
});
callback(result);
}
}
},



+ 17
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Index.js View File

@@ -181,14 +181,23 @@ var bootstrap = function ($, learun) {
{
label: "辅导员", name: "ClassTutorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empno',
callback: function (_data) {
callback(_data['empname']);
}
});
if (value) {
var result = "";
$.each(value.split(","), function (index, item) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: item,
keyId: 'empno',
callback: function (_data) {
result += _data['empname'];
}
});
if (index < value.split(",").length - 1) {
result += ",";
}
});
callback(result);
}
}
},



+ 14
- 12
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs View File

@@ -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)


Loading…
Cancel
Save