浏览代码

【修改】必修课排课、全院/教师/学生课程表、课表请假/请假、考勤功能取消系;

中职版本
dyy 4 年前
父节点
当前提交
d9ca66c6b6
共有 18 个文件被更改,包括 32 次插入173 次删除
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs
  2. +0
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuAttendanceLeaveController.cs
  3. +0
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/Index.js
  4. +0
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/CheckForm.cshtml
  5. +0
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/Form.cshtml
  6. +0
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/Index.js
  7. +0
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/IndexInStudent.js
  8. +0
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.js
  9. +0
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Index.js
  10. +0
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs
  11. +0
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/AttendanceList.cshtml
  12. +0
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/AttendanceList.js
  13. +0
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/Leave.cshtml
  14. +1
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/Leave.js
  15. +22
    -71
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
  16. +6
    -22
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuAttendance/StuAttendanceService.cs
  17. +1
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuAttendanceLeave/StuAttendanceLeaveService.cs
  18. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermController.cs 查看文件

@@ -87,7 +87,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult GetList(string queryJson)
{
var data = arrangeLessonTermIBLL.GetList(queryJson).ToList()
.OrderBy(x => x.AcademicYearNo).ThenBy(x => x.Semester).ThenBy(x => x.DeptNo).ThenBy(x => x.MajorNo).ThenBy(x => x.LessonNo).ThenBy(x => x.TeachClassNo.Replace(x.LessonName, "")).ThenBy(x => x.EmpNo).ThenBy(x => x.ClassroomNo).ThenBy(x => x.LessonDate);
.OrderBy(x => x.AcademicYearNo).ThenBy(x => x.Semester).ThenBy(x => x.MajorNo).ThenBy(x => x.LessonNo).ThenBy(x => x.TeachClassNo.Replace(x.LessonName, "")).ThenBy(x => x.EmpNo).ThenBy(x => x.ClassroomNo).ThenBy(x => x.LessonDate);
return Success(data);
}
/// <summary>


+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuAttendanceLeaveController.cs 查看文件

@@ -146,8 +146,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
stuAttendanceEntity.AcademicYearNo = entity.AcademicYearNo;
stuAttendanceEntity.ClassName = entity.ClassName;
stuAttendanceEntity.ClassNo = entity.ClassNo;
stuAttendanceEntity.DeptName = entity.DeptName;
stuAttendanceEntity.DeptNo = entity.DeptNo;
stuAttendanceEntity.EmpNo = entity.EmpNo;
stuAttendanceEntity.Grade = entity.Grade;
stuAttendanceEntity.InertDate = DateTime.Now;


+ 0
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/Index.js 查看文件

@@ -123,7 +123,6 @@ var bootstrap = function ($, learun) {
{ label: '上课日期', name: 'LessonDate', width: 200, align: "left" },
{ label: '学年度', name: 'AcademicYearNo', width: 200, align: "left" },
{ label: '学期', name: 'Semester', width: 200, align: "left" },
{ label: '系所码', name: 'DeptNo', width: 200, align: "left" },
{ label: '专业码', name: 'MajorNo', width: 200, align: "left" },
{ label: '课程号', name: 'LessonNo', width: 200, align: "left" },
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" },


+ 0
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/CheckForm.cshtml 查看文件

@@ -25,14 +25,6 @@
<div class="lr-form-item-title">年级</div>
<input id="Grade" type="text" readonly class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" hidden data-table="StuAttendanceLeave">
<div class="lr-form-item-title">系所码</div>
<input id="DeptNo" type="text" readonly class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="StuAttendanceLeave">
<div class="lr-form-item-title">系名</div>
<input id="DeptName" type="text" readonly class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" hidden data-table="StuAttendanceLeave">
<div class="lr-form-item-title">专业码</div>
<input id="MajorNo" type="text" readonly class="from-control" />


+ 0
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/Form.cshtml 查看文件

@@ -23,14 +23,6 @@
<div class="lr-form-item-title">年级</div>
<input id="Grade" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="StuAttendanceLeave">
<div class="lr-form-item-title">系所码</div>
<input id="DeptNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="StuAttendanceLeave">
<div class="lr-form-item-title">系名</div>
<input id="DeptName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="StuAttendanceLeave">
<div class="lr-form-item-title">专业码</div>
<input id="MajorNo" type="text" class="form-control" />


+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/Index.js 查看文件

@@ -157,8 +157,6 @@ var bootstrap = function ($, learun) {
{ label: "学号", name: "StuNo", width: 100, align: "left" },
{ label: "姓名", name: "StuName", width: 100, align: "left" },
{ label: "年级", name: "Grade", width: 100, align: "left" },
{ label: "系所码", name: "DeptNo", width: 100, align: "left" },
{ label: "系名", name: "DeptName", width: 100, align: "left" },
{ label: "专业码", name: "MajorNo", width: 100, align: "left" },
{ label: "专业名", name: "MajorName", width: 100, align: "left" },
{ label: "所在行政班号 ", name: "ClassNo", width: 100, align: "left" },


+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/IndexInStudent.js 查看文件

@@ -157,8 +157,6 @@ var bootstrap = function ($, learun) {
{ label: "学号", name: "StuNo", width: 100, align: "left" },
{ label: "姓名", name: "StuName", width: 100, align: "left" },
{ label: "年级", name: "Grade", width: 100, align: "left" },
{ label: "系所码", name: "DeptNo", width: 100, align: "left" },
{ label: "系名", name: "DeptName", width: 100, align: "left" },
{ label: "专业码", name: "MajorNo", width: 100, align: "left" },
{ label: "专业名", name: "MajorName", width: 100, align: "left" },
{ label: "所在行政班号 ", name: "ClassNo", width: 100, align: "left" },


+ 0
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/CheckIndex.js 查看文件

@@ -109,19 +109,6 @@ var bootstrap = function ($, learun) {
});
}
},
{
label: "系部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {


+ 0
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuLeaveManagement/Index.js 查看文件

@@ -139,19 +139,6 @@ var bootstrap = function ($, learun) {
});
}
},
{
label: "系部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {


+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs 查看文件

@@ -125,7 +125,6 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
var stuInfo = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(userInfo.account);
StuAttendanceLeaveEntity entity = new StuAttendanceLeaveEntity();
entity.ClassNo = stuInfo.ClassNo;
entity.DeptNo = stuInfo.DeptNo;
entity.Grade = stuInfo.Grade;
entity.MajorNo = stuInfo.MajorNo;
entity.StuNo = userInfo.account;
@@ -411,7 +410,6 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
schooldId = e?.F_SchoolId,
academicyear = semesterAndYear.AcademicYearShort,
semester = strSemester,
deptNo = e?.DeptNo,
majorNo = e?.MajorNo,
lessonNo = e?.LessonNo,
curriculum = e.LessonSortNo == "2" ? e.LessonName + "[选修]" : e.LessonName,


+ 0
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/AttendanceList.cshtml 查看文件

@@ -18,10 +18,6 @@
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">系部</div>
<div id="DeptNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>


+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/AttendanceList.js 查看文件

@@ -36,7 +36,6 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text'
});
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' });
@@ -48,7 +47,6 @@ var bootstrap = function ($, learun) {
headData: [
{ label: "学年", name: "AcademicYearNo", width: 70, align: "left" },
{ label: "学期", name: "Semester", width: 70, align: "left" },
{ label: "系部编号", name: "DeptNo", width: 80, align: "left" },
{ label: "专业编号", name: "MajorNo", width: 80, align: "left" },
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" },
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" },


+ 0
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/Leave.cshtml 查看文件

@@ -26,14 +26,6 @@
<div class="lr-form-item-title">年级</div>
<input id="Grade" type="text" readonly class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" hidden data-table="StuAttendanceLeave">
<div class="lr-form-item-title">系所码</div>
<input id="DeptNo" type="text" readonly class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="StuAttendanceLeave">
<div class="lr-form-item-title">系名</div>
<input id="DeptName" type="text" readonly class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" hidden data-table="StuAttendanceLeave">
<div class="lr-form-item-title">专业码</div>
<input id="MajorNo" type="text" readonly class="from-control" />


+ 1
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/Leave.js 查看文件

@@ -29,7 +29,6 @@ var bootstrap = function ($, learun) {
for (var id in data) {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
console.log(lessonNo);
$("#AcademicYearNo").val(academicyear);
$("#EmpNo").val(empNo);
$("#LessonNo").val(lessonNo);
@@ -40,15 +39,7 @@ var bootstrap = function ($, learun) {
$("#LessonSortNo").val(lessonSortNo);
$("#ClassRoomNo").val(classRoomNo);
$("#TeachClassNo").val(teachClassNo);

learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: $("#DeptNo").val(),
keyId: 'deptno',
callback: function (_data) {
$("#DeptName").val(_data.deptname);
}
});
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: $("#MajorNo").val(),


+ 22
- 71
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs 查看文件

@@ -42,7 +42,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
t.LessonDate,
t.AcademicYearNo,
t.Semester,
t.DeptNo,
t.MajorNo,
t.LessonNo,
t.LessonName,
@@ -273,7 +272,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSql.Append("SELECT ");
strSql.Append(@"
a.[StuNo]
,a.[DeptNo]
,a.[MajorNo]
,a.[ClassNo]
,a.[StuName]
@@ -341,7 +339,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
LessonDate = DateTime.Parse(item.times),
AcademicYearNo = item.schoolYear,
Semester = item.paike.semester,
DeptNo = classinfo?.DeptNo,
MajorNo = classinfo?.MajorNo,
LessonNo = item.paike.curriculunId,
LessonName = item.paike.curriculunName,
@@ -358,13 +355,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSemester = insertData.Semester;
if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
&& m.DeptNo == insertData.DeptNo && m.MajorNo == insertData.MajorNo
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0
&& insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
&& m.DeptNo == insertData.DeptNo && m.MajorNo == insertData.MajorNo
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0)
@@ -375,9 +372,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var insertResult = await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
//TeachClass数据处理

var arrangeLessonTermData = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>(@"select AcademicYearNo,Semester,DeptNo,majorno,lessonno,replace(teachclassno,lessonname,'') as teachclassno,empno from [dbo].[ArrangeLessonTerm]
var arrangeLessonTermData = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>(@"select AcademicYearNo,Semester,majorno,lessonno,replace(teachclassno,lessonname,'') as teachclassno,empno from [dbo].[ArrangeLessonTerm]
where (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemester + @"'
group by AcademicYearNo,Semester,DeptNo,majorno,lessonno,replace(teachclassno,lessonname,'') ,empno ")).ToList();
group by AcademicYearNo,Semester,majorno,lessonno,replace(teachclassno,lessonname,'') ,empno ")).ToList();
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
FROM TeachClass
WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemester + "' ")).ToList();
@@ -390,7 +387,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
{
AcademicYearNo = altitem.AcademicYearNo,
Semester = altitem.Semester,
DeptNo = altitem.DeptNo,
MajorNo = altitem.MajorNo,
LessonNo = altitem.LessonNo,
Grade = classData.FirstOrDefault(m => m.ClassNo == altitem.TeachClassNo)?.Grade,
@@ -401,13 +397,13 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
};
//非空判断
if (TeachClassData.Count(m => m.AcademicYearNo == insertTeachClassData.AcademicYearNo &&
m.Semester == insertTeachClassData.Semester && m.DeptNo == insertTeachClassData.DeptNo &&
m.Semester == insertTeachClassData.Semester &&
m.MajorNo == insertTeachClassData.MajorNo && m.LessonNo == insertTeachClassData.LessonNo &&
m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo &&
m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo &&
m.F_SchoolId == insertTeachClassData.F_SchoolId) == 0
&& insertTeachClassDataList.Count(m => m.AcademicYearNo == insertTeachClassData.AcademicYearNo &&
m.Semester == insertTeachClassData.Semester && m.DeptNo == insertTeachClassData.DeptNo &&
m.Semester == insertTeachClassData.Semester &&
m.MajorNo == insertTeachClassData.MajorNo && m.LessonNo == insertTeachClassData.LessonNo &&
m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo &&
m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo &&
@@ -470,7 +466,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
MakeDate = DateTime.Now,
AcademicYearNo = item.schoolYear,
Semester = item.semester.shangxia,
DeptNo = majorData.Find(m => m.MajorNo == item.majorNumber).DeptNo,
MajorNo = item.majorNumber,
LessonNo = item.curriculumNumber,
LessonName = item.curriculumName,
@@ -482,7 +477,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
EndWeek = !string.IsNullOrEmpty(item.semester.zhouci) ? Convert.ToInt32(item.semester.zhouci) : 1,
CheckStyleNo = "1",
ScoreRecordStyleNo = "1",
TeachDeptNo = majorData.Find(m => m.MajorNo == item.majorNumber).DeptNo,
StudyScore = lessonData.FirstOrDefault(m => m.LessonNo == item.curriculumNumber)?.StudyScore,
AmendDate = DateTime.Now,
ClassroomType = 1,
@@ -494,7 +488,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
};
if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester &&
m.DeptNo == insertData.DeptNo &&
m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade &&
@@ -502,7 +495,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
m.LessonName == insertData.LessonName &&
m.F_SchoolId == insertData.F_SchoolId) == 0 && insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester &&
m.DeptNo == insertData.DeptNo &&
m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade &&
@@ -533,14 +525,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
var insertDatastuselect = new StuSelectLessonListEntity();
insertDatastuselect.NoticeBookNo = stu.NoticeNo;
insertDatastuselect.StuNo = stu.StuNo;
insertDatastuselect.DeptNo = stu.DeptNo;
insertDatastuselect.ClassNo = stu.ClassNo;
insertDatastuselect.MajorNo = stu.MajorNo;
insertDatastuselect.StuName = stu.StuName;
insertDatastuselect.GenderNo = stu.GenderNo != null && stu.GenderNo.Value ? "1" : "0";
insertDatastuselect.AcademicYearNo = itemteachclass.AcademicYearNo;
insertDatastuselect.Semester = itemteachclass.Semester;
insertDatastuselect.OpenLessonDeptNo = itemteachclass.DeptNo;
insertDatastuselect.OpenLessonMajorNo = itemteachclass.MajorNo;
insertDatastuselect.LessonNo = itemteachclass.LessonNo;
insertDatastuselect.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == itemteachclass.LessonNo)?.LessonName;
@@ -564,22 +554,18 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
if (stuSelectLessonListEntityData.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
m.MajorNo == insertDatastuselect.MajorNo &&
m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo &&
m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo &&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0 &&
insertStuSelectLessonListDataList.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
m.MajorNo == insertDatastuselect.MajorNo &&
m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo &&
m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo &&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0)
@@ -705,7 +691,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
LessonDate = DateTime.Parse(timesItem),
AcademicYearNo = item.year,
Semester = item.number,
DeptNo = classinfo?.DeptNo,
MajorNo = classinfo?.MajorNo,
LessonNo = item.curriculunNumber,
LessonName = item.curriculunName,
@@ -723,34 +708,19 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
stringSemester = insertData.Semester;
if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
&& m.DeptNo == insertData.DeptNo && m.MajorNo == insertData.MajorNo
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0
&& insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
&& m.DeptNo == insertData.DeptNo && m.MajorNo == insertData.MajorNo
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0)
{
insertDataList.Add(insertData);
}
//if (!oldArrangeLessonTermList.Any(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
// && m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
// && m.DeptNo == insertData.DeptNo && m.MajorNo == insertData.MajorNo
// && m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
// && m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
// && m.F_SchoolId == insertData.F_SchoolId)
// && !insertDataList.Any(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
// && m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
// && m.DeptNo == insertData.DeptNo && m.MajorNo == insertData.MajorNo
// && m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
// && m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
// && m.F_SchoolId == insertData.F_SchoolId))
//{
// insertDataList.Add(insertData);
//}
}
}
else
@@ -761,7 +731,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
LessonDate = DateTime.Parse(timesItem),
AcademicYearNo = item.year,
Semester = item.number,
DeptNo = classinfo?.DeptNo,
MajorNo = classinfo?.MajorNo,
LessonNo = item.curriculunNumber,
LessonName = item.curriculunName,
@@ -779,13 +748,13 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
stringSemester = insertData.Semester;
if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
&& m.DeptNo == insertData.DeptNo && m.MajorNo == insertData.MajorNo
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0
&& insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
&& m.DeptNo == insertData.DeptNo && m.MajorNo == insertData.MajorNo
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0)
@@ -798,9 +767,9 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
var insertResult = await BaseRepository("CollegeMIS").InsertAsync(insertDataList);

//TeachClass数据处理
var arrangeLessonTermData = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>(@"select F_SchoolId,AcademicYearNo,Semester,DeptNo,majorno,lessonno,replace(teachclassno,lessonname,'') as teachclassno,empno from [dbo].[ArrangeLessonTerm]
var arrangeLessonTermData = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>(@"select F_SchoolId,AcademicYearNo,Semester,majorno,lessonno,replace(teachclassno,lessonname,'') as teachclassno,empno from [dbo].[ArrangeLessonTerm]
where (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + stringSemester + "' and F_SchoolId = '" + stringSchoolId + @"'
group by F_SchoolId,AcademicYearNo,Semester,DeptNo,majorno,lessonno,replace(teachclassno,lessonname,'') ,empno ")).ToList();
group by F_SchoolId,AcademicYearNo,Semester,majorno,lessonno,replace(teachclassno,lessonname,'') ,empno ")).ToList();
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
FROM TeachClass
WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + stringSemester + "' and F_SchoolId='" + stringSchoolId + "' ")).ToList();
@@ -813,7 +782,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
{
AcademicYearNo = altitem.AcademicYearNo,
Semester = altitem.Semester,
DeptNo = altitem.DeptNo,
MajorNo = altitem.MajorNo,
LessonNo = altitem.LessonNo,
Grade = classData.FirstOrDefault(m => m.ClassNo == altitem.TeachClassNo)?.Grade,
@@ -824,13 +792,13 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
};
//非空判断
if (TeachClassData.Count(m => m.AcademicYearNo == insertTeachClassData.AcademicYearNo &&
m.Semester == insertTeachClassData.Semester && m.DeptNo == insertTeachClassData.DeptNo &&
m.Semester == insertTeachClassData.Semester &&
m.MajorNo == insertTeachClassData.MajorNo && m.LessonNo == insertTeachClassData.LessonNo &&
m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo &&
m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo &&
m.F_SchoolId == insertTeachClassData.F_SchoolId) == 0
&& insertTeachClassDataList.Count(m => m.AcademicYearNo == insertTeachClassData.AcademicYearNo &&
m.Semester == insertTeachClassData.Semester && m.DeptNo == insertTeachClassData.DeptNo &&
m.Semester == insertTeachClassData.Semester &&
m.MajorNo == insertTeachClassData.MajorNo && m.LessonNo == insertTeachClassData.LessonNo &&
m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo &&
m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo &&
@@ -897,7 +865,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
MakeDate = now,
AcademicYearNo = item.semester.year,
Semester = item.semester.number,
DeptNo = majorData.FirstOrDefault(m => m.ID == item.major.sid)?.DeptNo,
MajorNo = item.major.number,
LessonNo = item.course.course.number,
LessonName = item.course.course.name,
@@ -909,7 +876,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
EndWeek = item.semester.week,
CheckStyleNo = "1",
ScoreRecordStyleNo = "1",
TeachDeptNo = majorData.FirstOrDefault(m => m.ID == item.major.sid)?.DeptNo,
StudyScore = 0,
AmendDate = now,
ClassroomType = 1,
@@ -921,7 +887,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
};
if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester &&
m.DeptNo == insertData.DeptNo &&
m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade &&
@@ -929,7 +894,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
m.LessonName == insertData.LessonName &&
m.F_SchoolId == insertData.F_SchoolId) == 0 && insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester &&
m.DeptNo == insertData.DeptNo &&
m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade &&
@@ -960,14 +924,12 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
var insertDatastuselect = new StuSelectLessonListEntity();
insertDatastuselect.NoticeBookNo = stu.NoticeNo;
insertDatastuselect.StuNo = stu.StuNo;
insertDatastuselect.DeptNo = stu.DeptNo;
insertDatastuselect.ClassNo = stu.ClassNo;
insertDatastuselect.MajorNo = stu.MajorNo;
insertDatastuselect.StuName = stu.StuName;
insertDatastuselect.GenderNo = stu.GenderNo != null && stu.GenderNo.Value ? "1" : "0";
insertDatastuselect.AcademicYearNo = itemteachclass.AcademicYearNo;
insertDatastuselect.Semester = itemteachclass.Semester;
insertDatastuselect.OpenLessonDeptNo = itemteachclass.DeptNo;
insertDatastuselect.OpenLessonMajorNo = itemteachclass.MajorNo;
insertDatastuselect.LessonNo = itemteachclass.LessonNo;
insertDatastuselect.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == itemteachclass.LessonNo)?.LessonName;
@@ -991,22 +953,18 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
if (stuSelectLessonListEntityData.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
m.MajorNo == insertDatastuselect.MajorNo &&
m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo &&
m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo &&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0 &&
insertStuSelectLessonListDataList.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
m.MajorNo == insertDatastuselect.MajorNo &&
m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo &&
m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo &&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0)
@@ -1479,7 +1437,7 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
{
try
{
//var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.DeptNo,a.MajorNo,a.Grade,a.ClassNo,a.StuName,a.GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
//var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.MajorNo,a.Grade,a.ClassNo,a.StuName,a.GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");

//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "8");
@@ -1519,7 +1477,7 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
{
try
{
//var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.DeptNo,a.MajorNo,a.Grade,a.ClassNo,a.StuName,a.GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
//var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.MajorNo,a.Grade,a.ClassNo,a.StuName,a.GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
//数据
var db = BaseRepository("CollegeMIS");
@@ -1540,7 +1498,7 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
{
try
{
var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.DeptNo,a.MajorNo,a.Grade,a.ClassNo,
var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.MajorNo,a.Grade,a.ClassNo,
a.StuName,GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from
dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
return data;
@@ -1556,8 +1514,8 @@ dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_E
{
try
{
var data = BaseRepository("CollegeMIS").FindList<TeachClassEntity>(@"select AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,LessonSortNo from TeachClass
group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,LessonSortNo");
var data = BaseRepository("CollegeMIS").FindList<TeachClassEntity>(@"select AcademicYearNo,Semester,MajorNo,LessonNo,TeachClassNo,EmpNo,LessonSortNo from TeachClass
group by AcademicYearNo,Semester,MajorNo,LessonNo,TeachClassNo,EmpNo,LessonSortNo");
return data;
}
catch (Exception e)
@@ -1581,7 +1539,7 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
var semesterAndYear = Common.GetSemesterAndYear(startDate);
var strAcademicYear = semesterAndYear.AcademicYearShort;
var strSemester = semesterAndYear.Semester;
string sql = @"select b.F_SchoolId,b.DeptNo,b.MajorNo,b.AcademicYearNo as AcademicYear,b.LessonNo,b.LessonName,b.LessonTime,b.LessonDate,b.EmpNo,b.Empname EmpName,replace (b.TeachClassNo,b.LessonName,'') TeachClassNo, c.ClassroomName,b.Semester,b.ClassroomNo as ClassRoomNo,b.LessonSortNo,d.ClassName
string sql = @"select b.F_SchoolId,b.MajorNo,b.AcademicYearNo as AcademicYear,b.LessonNo,b.LessonName,b.LessonTime,b.LessonDate,b.EmpNo,b.Empname EmpName,replace (b.TeachClassNo,b.LessonName,'') TeachClassNo, c.ClassroomName,b.Semester,b.ClassroomNo as ClassRoomNo,b.LessonSortNo,d.ClassName
from ArrangeLessonTerm b
left join ClassroomInfo c on c.ClassroomNo=b.classroomNo
left join ClassInfo d on replace(b.TeachClassNo,b.LessonName,'')=d.ClassNo
@@ -1946,7 +1904,7 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
{
try
{
return this.BaseRepository("CollegeMIS").FindList<TimeTable>(@"select b.F_SchoolId,b.DeptNo,b.MajorNo,b.AcademicYearNo as AcademicYear,b.Semester,b.LessonNo,
return this.BaseRepository("CollegeMIS").FindList<TimeTable>(@"select b.F_SchoolId,b.MajorNo,b.AcademicYearNo as AcademicYear,b.Semester,b.LessonNo,
b.LessonName, b.LessonTime, b.EmpNo, b.Empname EmpName, replace(b.TeachClassNo, b.LessonName, '') TeachClassNo, c.ClassroomName, b.ClassroomNo as ClassRoomNo, d.ClassName
from ArrangeLessonTerm b
left
@@ -1956,7 +1914,7 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
join ClassInfo d on replace(b.TeachClassNo, b.LessonName, '') = d.ClassNo
where b.AcademicYearNo = '" + academicYearNo + "' and b.Semester = '" + semester + @"'
and b.CheckMark = 1
group by b.F_SchoolId, b.DeptNo, b.MajorNo, b.AcademicYearNo, b.Semester, b.LessonNo, b.LessonName, b.LessonTime, b.EmpNo, b.Empname, b.TeachClassNo, c.ClassroomName, b.ClassroomNo, d.ClassName
group by b.F_SchoolId, b.MajorNo, b.AcademicYearNo, b.Semester, b.LessonNo, b.LessonName, b.LessonTime, b.EmpNo, b.Empname, b.TeachClassNo, c.ClassroomName, b.ClassroomNo, d.ClassName
");
}
catch (Exception ex)
@@ -1984,13 +1942,6 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
{
foreach (var tablename in entity.SyncBasicTable.Split(','))
{
if (tablename == "CdDept")
{
//清空同步记录表
db.ExecuteBySql("delete from ArrangeLessonSync where AcademicYearNo='" +
entity.AcademicYearNo + "' and Semester='" + entity.Semester +
"' and STypeId='2'");
}
if (tablename == "CdMajor")
{
//清空同步记录表


+ 6
- 22
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuAttendance/StuAttendanceService.cs 查看文件

@@ -95,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
// 虚拟参数
var dp = new DynamicParameters(new { });
strSql.Append(@"(
select distinct t.AcademicYearNo,t.Semester,t.DeptNo,t.MajorNo,t.ClassNo,t.LessonNo,t.LessonName,t.LessonSortNo,t.EmpNo
select distinct t.AcademicYearNo,t.Semester,t.MajorNo,t.ClassNo,t.LessonNo,t.LessonName,t.LessonSortNo,t.EmpNo
,a.LessonDate,a.LessonTime
from StuSelectLessonList t
left join ArrangeLessonTerm a on t.AcademicYearNo=a.AcademicYearNo and t.Semester=a.Semester and t.LessonNo=a.LessonNo and t.EmpNo=a.EmpNo
@@ -126,7 +126,7 @@ where t.StuNo not in (select sa.StuNo from StuAttendance sa where sa.AcademicYea
strSql.Append(" and a.LessonDate <= @EndTime ");
}
strSql.Append(") union ( ");
strSql.Append(@"select distinct t.AcademicYearNo,t.Semester,t.DeptNo,t.MajorNo,t.ClassNo,t.LessonNo,t.LessonName,t.LessonSortNo,t.EmpNo
strSql.Append(@"select distinct t.AcademicYearNo,t.Semester,t.MajorNo,t.ClassNo,t.LessonNo,t.LessonName,t.LessonSortNo,t.EmpNo
,a.LessonDate,a.LessonSection as LessonTime
from StuSelectLessonListOfElective t
left join ArrangeLessonTermOfElective a on t.AcademicYearNo=a.AcademicYearNo and t.Semester=a.Semester and t.LessonNo=a.LessonNo and t.EmpNo=a.EmpNo and t.ClassRoomNo=a.ClassRoomNo
@@ -322,8 +322,8 @@ and t.Status=2");
var queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { });
var strSql = new StringBuilder();
strSql.Append(@"select s.AcademicYearNo,s.Semester,s.DeptNo,s.MajorNo,s.ClassNo,s.LessonNo,s.EmpNo,s.LessonSortNo,s.StuNo,s.StuName,a.AttendOrNo,a.Sort from StuSelectLessonList s
left join StuAttendance a on s.AcademicYearNo = a.AcademicYearNo and s.Semester = a.Semester and s.DeptNo = a.DeptNo and s.MajorNo = a.MajorNo and s.ClassNo = a.ClassNo and s.LessonNo = a.LessonNo and s.EmpNo = a.EmpNo and s.LessonSortNo = a.LessonSortNo and s.StuNo = a.StuNo
strSql.Append(@"select s.AcademicYearNo,s.Semester,s.MajorNo,s.ClassNo,s.LessonNo,s.EmpNo,s.LessonSortNo,s.StuNo,s.StuName,a.AttendOrNo,a.Sort from StuSelectLessonList s
left join StuAttendance a on s.AcademicYearNo = a.AcademicYearNo and s.Semester = a.Semester and s.MajorNo = a.MajorNo and s.ClassNo = a.ClassNo and s.LessonNo = a.LessonNo and s.EmpNo = a.EmpNo and s.LessonSortNo = a.LessonSortNo and s.StuNo = a.StuNo
where 1=1 ");

if (!queryParam["AcademicYearNo"].IsEmpty())
@@ -336,11 +336,6 @@ where 1=1 ");
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" and s.Semester=@Semester ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" and s.DeptNo=@DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
@@ -367,8 +362,8 @@ where 1=1 ");
strSql.Append(" and s.StuName like @StuName ");
}
strSql.Append(" union ");
strSql.Append(@"select s.AcademicYearNo,s.Semester,s.DeptNo,s.MajorNo,s.ClassNo,s.LessonNo,s.EmpNo,s.LessonSortNo,s.StuNo,s.StuName,a.AttendOrNo,a.Sort from StuSelectLessonListOfElective s
left join StuAttendance a on s.AcademicYearNo=a.AcademicYearNo and s.Semester=a.Semester and s.DeptNo=a.DeptNo and s.MajorNo=a.MajorNo and s.ClassNo=a.ClassNo and s.LessonNo=a.LessonNo and s.EmpNo=a.EmpNo and s.LessonSortNo=a.LessonSortNo and s.ClassRoomNo=a.ClassRoomNo and a.LessonTime in (s.LessonSection) and s.StuNo=a.StuNo and s.Status=2
strSql.Append(@"select s.AcademicYearNo,s.Semester,s.MajorNo,s.ClassNo,s.LessonNo,s.EmpNo,s.LessonSortNo,s.StuNo,s.StuName,a.AttendOrNo,a.Sort from StuSelectLessonListOfElective s
left join StuAttendance a on s.AcademicYearNo=a.AcademicYearNo and s.Semester=a.Semester and s.MajorNo=a.MajorNo and s.ClassNo=a.ClassNo and s.LessonNo=a.LessonNo and s.EmpNo=a.EmpNo and s.LessonSortNo=a.LessonSortNo and s.ClassRoomNo=a.ClassRoomNo and a.LessonTime in (s.LessonSection) and s.StuNo=a.StuNo and s.Status=2
where 1=1 ");
if (!queryParam["AcademicYearNo"].IsEmpty())
{
@@ -380,11 +375,6 @@ where 1=1 ");
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" and s.Semester=@Semester ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" and s.DeptNo=@DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
@@ -505,7 +495,6 @@ where 1=1 ");
if (data.Any())
{
var majorList = BaseRepository("CollegeMIS").FindList<CdMajorEntity>().ToList();
var deptList = BaseRepository("CollegeMIS").FindList<CdDeptEntity>().ToList();
var classList = BaseRepository("CollegeMIS").FindList<ClassInfoEntity>().ToList();
var lessonSortList = BaseRepository("CollegeMIS").FindList<CdLessonSortEntity>().ToList();
var classRoomList = BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>().ToList();
@@ -521,8 +510,6 @@ where 1=1 ");
model.StuName = stuSelectLessonListEntity.StuName;
model.Gender = stuSelectLessonListEntity.GenderNo == "0" ? "女" : "男";
model.Grade = stuSelectLessonListEntity.Grade;
model.DeptNo = stuSelectLessonListEntity.DeptNo;
model.DeptName = deptList.Find(m => m.DeptNo == stuSelectLessonListEntity.DeptNo)?.DeptName;
model.MajorNo = stuSelectLessonListEntity.MajorNo;
model.MajorName = majorList.Find(m => m.MajorNo == stuSelectLessonListEntity.MajorNo)?.MajorName;
model.ClassNo = stuSelectLessonListEntity.ClassNo;
@@ -588,7 +575,6 @@ where 1=1 ");
if (data.Any())
{
var majorList = BaseRepository("CollegeMIS").FindList<CdMajorEntity>().ToList();
var deptList = BaseRepository("CollegeMIS").FindList<CdDeptEntity>().ToList();
var classList = BaseRepository("CollegeMIS").FindList<ClassInfoEntity>().ToList();
var lessonSortList = BaseRepository("CollegeMIS").FindList<CdLessonSortEntity>().ToList();
var classRoomList = BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>().ToList();
@@ -605,8 +591,6 @@ where 1=1 ");
model.StuName = stuSelectLessonListEntity.StuName;
model.Gender = stuSelectLessonListEntity.GenderNo == "0" ? "女" : "男";
model.Grade = stuSelectLessonListEntity.Grade;
model.DeptNo = stuSelectLessonListEntity.DeptNo;
model.DeptName = deptList.Find(m => m.DeptNo == stuSelectLessonListEntity.DeptNo)?.DeptName;
model.MajorNo = stuSelectLessonListEntity.MajorNo;
model.MajorName = majorList.Find(m => m.MajorNo == stuSelectLessonListEntity.MajorNo)?.MajorName;
model.ClassNo = stuSelectLessonListEntity.ClassNo;


+ 1
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuAttendanceLeave/StuAttendanceLeaveService.cs 查看文件

@@ -109,9 +109,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
t.Semester,
t.StuNo,
t.StuName,
t.Grade,
t.DeptNo,
t.DeptName,
t.Grade,
t.MajorNo,
t.MajorName,
t.ClassNo


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs 查看文件

@@ -31,7 +31,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.*,s.StuName as CreateUserName,s.ClassNo,s.DeptNo,s.MajorNo,c.ClassDiredctorNo,c.ClassTutorNo ");
strSql.Append("SELECT t.*,s.StuName as CreateUserName,s.ClassNo,s.MajorNo,c.ClassDiredctorNo,c.ClassTutorNo ");
strSql.Append(" FROM StuLeaveManagement t left join StuInfoBasic s on t.CreateUserNo=s.StuNo left join ClassInfo c on s.ClassNo=c.ClassNo ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();


正在加载...
取消
保存