Browse Source

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

中职版本
dyy 4 years ago
parent
commit
d9ca66c6b6
18 changed files with 32 additions and 173 deletions
  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 View File

@@ -87,7 +87,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult GetList(string queryJson) public ActionResult GetList(string queryJson)
{ {
var data = arrangeLessonTermIBLL.GetList(queryJson).ToList() 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); return Success(data);
} }
/// <summary> /// <summary>


+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuAttendanceLeaveController.cs View File

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


+ 0
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/Index.js View File

@@ -123,7 +123,6 @@ var bootstrap = function ($, learun) {
{ label: '上课日期', name: 'LessonDate', width: 200, align: "left" }, { label: '上课日期', name: 'LessonDate', width: 200, align: "left" },
{ label: '学年度', name: 'AcademicYearNo', width: 200, align: "left" }, { label: '学年度', name: 'AcademicYearNo', width: 200, align: "left" },
{ label: '学期', name: 'Semester', 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: 'MajorNo', width: 200, align: "left" },
{ label: '课程号', name: 'LessonNo', width: 200, align: "left" }, { label: '课程号', name: 'LessonNo', width: 200, align: "left" },
{ label: '课程名称', name: 'LessonName', 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 View File

@@ -25,14 +25,6 @@
<div class="lr-form-item-title">年级</div> <div class="lr-form-item-title">年级</div>
<input id="Grade" type="text" readonly class="form-control" /> <input id="Grade" type="text" readonly class="form-control" />
</div> </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="col-xs-6 lr-form-item" hidden data-table="StuAttendanceLeave">
<div class="lr-form-item-title">专业码</div> <div class="lr-form-item-title">专业码</div>
<input id="MajorNo" type="text" readonly class="from-control" /> <input id="MajorNo" type="text" readonly class="from-control" />


+ 0
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/Form.cshtml View File

@@ -23,14 +23,6 @@
<div class="lr-form-item-title">年级</div> <div class="lr-form-item-title">年级</div>
<input id="Grade" type="text" class="form-control" /> <input id="Grade" type="text" class="form-control" />
</div> </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="col-xs-6 lr-form-item" data-table="StuAttendanceLeave">
<div class="lr-form-item-title">专业码</div> <div class="lr-form-item-title">专业码</div>
<input id="MajorNo" type="text" class="form-control" /> <input id="MajorNo" type="text" class="form-control" />


+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuAttendanceLeave/Index.js View File

@@ -157,8 +157,6 @@ var bootstrap = function ($, learun) {
{ label: "学号", name: "StuNo", width: 100, align: "left" }, { label: "学号", name: "StuNo", width: 100, align: "left" },
{ label: "姓名", name: "StuName", width: 100, align: "left" }, { label: "姓名", name: "StuName", width: 100, align: "left" },
{ label: "年级", name: "Grade", 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: "MajorNo", width: 100, align: "left" },
{ label: "专业名", name: "MajorName", width: 100, align: "left" }, { label: "专业名", name: "MajorName", width: 100, align: "left" },
{ label: "所在行政班号 ", name: "ClassNo", 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 View File

@@ -157,8 +157,6 @@ var bootstrap = function ($, learun) {
{ label: "学号", name: "StuNo", width: 100, align: "left" }, { label: "学号", name: "StuNo", width: 100, align: "left" },
{ label: "姓名", name: "StuName", width: 100, align: "left" }, { label: "姓名", name: "StuName", width: 100, align: "left" },
{ label: "年级", name: "Grade", 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: "MajorNo", width: 100, align: "left" },
{ label: "专业名", name: "MajorName", width: 100, align: "left" }, { label: "专业名", name: "MajorName", width: 100, align: "left" },
{ label: "所在行政班号 ", name: "ClassNo", 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 View File

@@ -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", label: "专业", name: "MajorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) { formatterAsync: function (callback, value, row, op, $cell) {


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

@@ -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", label: "专业", name: "MajorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) { formatterAsync: function (callback, value, row, op, $cell) {


+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/TimeTableController.cs View File

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


+ 0
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/AttendanceList.cshtml View File

@@ -18,10 +18,6 @@
<div class="lr-form-item-title">学期</div> <div class="lr-form-item-title">学期</div>
<div id="Semester"></div> <div id="Semester"></div>
</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="col-xs-6 lr-form-item">
<div class="lr-form-item-title">专业</div> <div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div> <div id="MajorNo"></div>


+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/AttendanceList.js View File

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

@@ -26,14 +26,6 @@
<div class="lr-form-item-title">年级</div> <div class="lr-form-item-title">年级</div>
<input id="Grade" type="text" readonly class="form-control" /> <input id="Grade" type="text" readonly class="form-control" />
</div> </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="col-xs-6 lr-form-item" hidden data-table="StuAttendanceLeave">
<div class="lr-form-item-title">专业码</div> <div class="lr-form-item-title">专业码</div>
<input id="MajorNo" type="text" readonly class="from-control" /> <input id="MajorNo" type="text" readonly class="from-control" />


+ 1
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/Leave.js View File

@@ -29,7 +29,6 @@ var bootstrap = function ($, learun) {
for (var id in data) { for (var id in data) {
$('[data-table="' + id + '"]').lrSetFormData(data[id]); $('[data-table="' + id + '"]').lrSetFormData(data[id]);
} }
console.log(lessonNo);
$("#AcademicYearNo").val(academicyear); $("#AcademicYearNo").val(academicyear);
$("#EmpNo").val(empNo); $("#EmpNo").val(empNo);
$("#LessonNo").val(lessonNo); $("#LessonNo").val(lessonNo);
@@ -40,15 +39,7 @@ var bootstrap = function ($, learun) {
$("#LessonSortNo").val(lessonSortNo); $("#LessonSortNo").val(lessonSortNo);
$("#ClassRoomNo").val(classRoomNo); $("#ClassRoomNo").val(classRoomNo);
$("#TeachClassNo").val(teachClassNo); $("#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', { learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: $("#MajorNo").val(), key: $("#MajorNo").val(),


+ 22
- 71
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs View File

@@ -42,7 +42,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
t.LessonDate, t.LessonDate,
t.AcademicYearNo, t.AcademicYearNo,
t.Semester, t.Semester,
t.DeptNo,
t.MajorNo, t.MajorNo,
t.LessonNo, t.LessonNo,
t.LessonName, t.LessonName,
@@ -273,7 +272,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSql.Append("SELECT "); strSql.Append("SELECT ");
strSql.Append(@" strSql.Append(@"
a.[StuNo] a.[StuNo]
,a.[DeptNo]
,a.[MajorNo] ,a.[MajorNo]
,a.[ClassNo] ,a.[ClassNo]
,a.[StuName] ,a.[StuName]
@@ -341,7 +339,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
LessonDate = DateTime.Parse(item.times), LessonDate = DateTime.Parse(item.times),
AcademicYearNo = item.schoolYear, AcademicYearNo = item.schoolYear,
Semester = item.paike.semester, Semester = item.paike.semester,
DeptNo = classinfo?.DeptNo,
MajorNo = classinfo?.MajorNo, MajorNo = classinfo?.MajorNo,
LessonNo = item.paike.curriculunId, LessonNo = item.paike.curriculunId,
LessonName = item.paike.curriculunName, LessonName = item.paike.curriculunName,
@@ -358,13 +355,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSemester = insertData.Semester; strSemester = insertData.Semester;
if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate && 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.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime && m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0 && m.F_SchoolId == insertData.F_SchoolId) == 0
&& insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester && insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate && 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.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime && m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0) && m.F_SchoolId == insertData.F_SchoolId) == 0)
@@ -375,9 +372,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var insertResult = await BaseRepository("CollegeMIS").InsertAsync(insertDataList); var insertResult = await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
//TeachClass数据处理 //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 + @"' 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 * var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
FROM TeachClass FROM TeachClass
WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemester + "' ")).ToList(); WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemester + "' ")).ToList();
@@ -390,7 +387,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
{ {
AcademicYearNo = altitem.AcademicYearNo, AcademicYearNo = altitem.AcademicYearNo,
Semester = altitem.Semester, Semester = altitem.Semester,
DeptNo = altitem.DeptNo,
MajorNo = altitem.MajorNo, MajorNo = altitem.MajorNo,
LessonNo = altitem.LessonNo, LessonNo = altitem.LessonNo,
Grade = classData.FirstOrDefault(m => m.ClassNo == altitem.TeachClassNo)?.Grade, 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 && 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.MajorNo == insertTeachClassData.MajorNo && m.LessonNo == insertTeachClassData.LessonNo &&
m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo && m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo &&
m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo && m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo &&
m.F_SchoolId == insertTeachClassData.F_SchoolId) == 0 m.F_SchoolId == insertTeachClassData.F_SchoolId) == 0
&& insertTeachClassDataList.Count(m => m.AcademicYearNo == insertTeachClassData.AcademicYearNo && && 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.MajorNo == insertTeachClassData.MajorNo && m.LessonNo == insertTeachClassData.LessonNo &&
m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo && m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo &&
m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo && m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo &&
@@ -470,7 +466,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
MakeDate = DateTime.Now, MakeDate = DateTime.Now,
AcademicYearNo = item.schoolYear, AcademicYearNo = item.schoolYear,
Semester = item.semester.shangxia, Semester = item.semester.shangxia,
DeptNo = majorData.Find(m => m.MajorNo == item.majorNumber).DeptNo,
MajorNo = item.majorNumber, MajorNo = item.majorNumber,
LessonNo = item.curriculumNumber, LessonNo = item.curriculumNumber,
LessonName = item.curriculumName, 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, EndWeek = !string.IsNullOrEmpty(item.semester.zhouci) ? Convert.ToInt32(item.semester.zhouci) : 1,
CheckStyleNo = "1", CheckStyleNo = "1",
ScoreRecordStyleNo = "1", ScoreRecordStyleNo = "1",
TeachDeptNo = majorData.Find(m => m.MajorNo == item.majorNumber).DeptNo,
StudyScore = lessonData.FirstOrDefault(m => m.LessonNo == item.curriculumNumber)?.StudyScore, StudyScore = lessonData.FirstOrDefault(m => m.LessonNo == item.curriculumNumber)?.StudyScore,
AmendDate = DateTime.Now, AmendDate = DateTime.Now,
ClassroomType = 1, ClassroomType = 1,
@@ -494,7 +488,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
}; };
if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester && m.Semester == insertData.Semester &&
m.DeptNo == insertData.DeptNo &&
m.MajorNo == insertData.MajorNo && m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo && m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade && m.Grade == insertData.Grade &&
@@ -502,7 +495,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
m.LessonName == insertData.LessonName && m.LessonName == insertData.LessonName &&
m.F_SchoolId == insertData.F_SchoolId) == 0 && insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.F_SchoolId == insertData.F_SchoolId) == 0 && insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester && m.Semester == insertData.Semester &&
m.DeptNo == insertData.DeptNo &&
m.MajorNo == insertData.MajorNo && m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo && m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade && m.Grade == insertData.Grade &&
@@ -533,14 +525,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
var insertDatastuselect = new StuSelectLessonListEntity(); var insertDatastuselect = new StuSelectLessonListEntity();
insertDatastuselect.NoticeBookNo = stu.NoticeNo; insertDatastuselect.NoticeBookNo = stu.NoticeNo;
insertDatastuselect.StuNo = stu.StuNo; insertDatastuselect.StuNo = stu.StuNo;
insertDatastuselect.DeptNo = stu.DeptNo;
insertDatastuselect.ClassNo = stu.ClassNo; insertDatastuselect.ClassNo = stu.ClassNo;
insertDatastuselect.MajorNo = stu.MajorNo; insertDatastuselect.MajorNo = stu.MajorNo;
insertDatastuselect.StuName = stu.StuName; insertDatastuselect.StuName = stu.StuName;
insertDatastuselect.GenderNo = stu.GenderNo != null && stu.GenderNo.Value ? "1" : "0"; insertDatastuselect.GenderNo = stu.GenderNo != null && stu.GenderNo.Value ? "1" : "0";
insertDatastuselect.AcademicYearNo = itemteachclass.AcademicYearNo; insertDatastuselect.AcademicYearNo = itemteachclass.AcademicYearNo;
insertDatastuselect.Semester = itemteachclass.Semester; insertDatastuselect.Semester = itemteachclass.Semester;
insertDatastuselect.OpenLessonDeptNo = itemteachclass.DeptNo;
insertDatastuselect.OpenLessonMajorNo = itemteachclass.MajorNo; insertDatastuselect.OpenLessonMajorNo = itemteachclass.MajorNo;
insertDatastuselect.LessonNo = itemteachclass.LessonNo; insertDatastuselect.LessonNo = itemteachclass.LessonNo;
insertDatastuselect.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == itemteachclass.LessonNo)?.LessonName; 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 && if (stuSelectLessonListEntityData.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo && m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester && m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
m.MajorNo == insertDatastuselect.MajorNo && m.MajorNo == insertDatastuselect.MajorNo &&
m.LessonNo == insertDatastuselect.LessonNo && m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade && m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo && m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo &&
m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo && m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo &&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0 && m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0 &&
insertStuSelectLessonListDataList.Count(m => m.StuNo == insertDatastuselect.StuNo && insertStuSelectLessonListDataList.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo && m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester && m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
m.MajorNo == insertDatastuselect.MajorNo && m.MajorNo == insertDatastuselect.MajorNo &&
m.LessonNo == insertDatastuselect.LessonNo && m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade && m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo && m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo &&
m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo && m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo &&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0) m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0)
@@ -705,7 +691,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
LessonDate = DateTime.Parse(timesItem), LessonDate = DateTime.Parse(timesItem),
AcademicYearNo = item.year, AcademicYearNo = item.year,
Semester = item.number, Semester = item.number,
DeptNo = classinfo?.DeptNo,
MajorNo = classinfo?.MajorNo, MajorNo = classinfo?.MajorNo,
LessonNo = item.curriculunNumber, LessonNo = item.curriculunNumber,
LessonName = item.curriculunName, LessonName = item.curriculunName,
@@ -723,34 +708,19 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
stringSemester = insertData.Semester; stringSemester = insertData.Semester;
if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate && 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.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime && m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0 && m.F_SchoolId == insertData.F_SchoolId) == 0
&& insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester && insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate && 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.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime && m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0) && m.F_SchoolId == insertData.F_SchoolId) == 0)
{ {
insertDataList.Add(insertData); 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 else
@@ -761,7 +731,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
LessonDate = DateTime.Parse(timesItem), LessonDate = DateTime.Parse(timesItem),
AcademicYearNo = item.year, AcademicYearNo = item.year,
Semester = item.number, Semester = item.number,
DeptNo = classinfo?.DeptNo,
MajorNo = classinfo?.MajorNo, MajorNo = classinfo?.MajorNo,
LessonNo = item.curriculunNumber, LessonNo = item.curriculunNumber,
LessonName = item.curriculunName, LessonName = item.curriculunName,
@@ -779,13 +748,13 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
stringSemester = insertData.Semester; stringSemester = insertData.Semester;
if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate && 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.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime && m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0 && m.F_SchoolId == insertData.F_SchoolId) == 0
&& insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester && insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate && 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.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime && m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0) && m.F_SchoolId == insertData.F_SchoolId) == 0)
@@ -798,9 +767,9 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
var insertResult = await BaseRepository("CollegeMIS").InsertAsync(insertDataList); var insertResult = await BaseRepository("CollegeMIS").InsertAsync(insertDataList);


//TeachClass数据处理 //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 + @"' 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 * var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
FROM TeachClass FROM TeachClass
WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + stringSemester + "' and F_SchoolId='" + stringSchoolId + "' ")).ToList(); WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + stringSemester + "' and F_SchoolId='" + stringSchoolId + "' ")).ToList();
@@ -813,7 +782,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
{ {
AcademicYearNo = altitem.AcademicYearNo, AcademicYearNo = altitem.AcademicYearNo,
Semester = altitem.Semester, Semester = altitem.Semester,
DeptNo = altitem.DeptNo,
MajorNo = altitem.MajorNo, MajorNo = altitem.MajorNo,
LessonNo = altitem.LessonNo, LessonNo = altitem.LessonNo,
Grade = classData.FirstOrDefault(m => m.ClassNo == altitem.TeachClassNo)?.Grade, 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 && 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.MajorNo == insertTeachClassData.MajorNo && m.LessonNo == insertTeachClassData.LessonNo &&
m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo && m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo &&
m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo && m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo &&
m.F_SchoolId == insertTeachClassData.F_SchoolId) == 0 m.F_SchoolId == insertTeachClassData.F_SchoolId) == 0
&& insertTeachClassDataList.Count(m => m.AcademicYearNo == insertTeachClassData.AcademicYearNo && && 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.MajorNo == insertTeachClassData.MajorNo && m.LessonNo == insertTeachClassData.LessonNo &&
m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo && m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo &&
m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo && m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo &&
@@ -897,7 +865,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
MakeDate = now, MakeDate = now,
AcademicYearNo = item.semester.year, AcademicYearNo = item.semester.year,
Semester = item.semester.number, Semester = item.semester.number,
DeptNo = majorData.FirstOrDefault(m => m.ID == item.major.sid)?.DeptNo,
MajorNo = item.major.number, MajorNo = item.major.number,
LessonNo = item.course.course.number, LessonNo = item.course.course.number,
LessonName = item.course.course.name, LessonName = item.course.course.name,
@@ -909,7 +876,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
EndWeek = item.semester.week, EndWeek = item.semester.week,
CheckStyleNo = "1", CheckStyleNo = "1",
ScoreRecordStyleNo = "1", ScoreRecordStyleNo = "1",
TeachDeptNo = majorData.FirstOrDefault(m => m.ID == item.major.sid)?.DeptNo,
StudyScore = 0, StudyScore = 0,
AmendDate = now, AmendDate = now,
ClassroomType = 1, ClassroomType = 1,
@@ -921,7 +887,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
}; };
if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester && m.Semester == insertData.Semester &&
m.DeptNo == insertData.DeptNo &&
m.MajorNo == insertData.MajorNo && m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo && m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade && m.Grade == insertData.Grade &&
@@ -929,7 +894,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
m.LessonName == insertData.LessonName && m.LessonName == insertData.LessonName &&
m.F_SchoolId == insertData.F_SchoolId) == 0 && insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.F_SchoolId == insertData.F_SchoolId) == 0 && insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester && m.Semester == insertData.Semester &&
m.DeptNo == insertData.DeptNo &&
m.MajorNo == insertData.MajorNo && m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo && m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade && m.Grade == insertData.Grade &&
@@ -960,14 +924,12 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
var insertDatastuselect = new StuSelectLessonListEntity(); var insertDatastuselect = new StuSelectLessonListEntity();
insertDatastuselect.NoticeBookNo = stu.NoticeNo; insertDatastuselect.NoticeBookNo = stu.NoticeNo;
insertDatastuselect.StuNo = stu.StuNo; insertDatastuselect.StuNo = stu.StuNo;
insertDatastuselect.DeptNo = stu.DeptNo;
insertDatastuselect.ClassNo = stu.ClassNo; insertDatastuselect.ClassNo = stu.ClassNo;
insertDatastuselect.MajorNo = stu.MajorNo; insertDatastuselect.MajorNo = stu.MajorNo;
insertDatastuselect.StuName = stu.StuName; insertDatastuselect.StuName = stu.StuName;
insertDatastuselect.GenderNo = stu.GenderNo != null && stu.GenderNo.Value ? "1" : "0"; insertDatastuselect.GenderNo = stu.GenderNo != null && stu.GenderNo.Value ? "1" : "0";
insertDatastuselect.AcademicYearNo = itemteachclass.AcademicYearNo; insertDatastuselect.AcademicYearNo = itemteachclass.AcademicYearNo;
insertDatastuselect.Semester = itemteachclass.Semester; insertDatastuselect.Semester = itemteachclass.Semester;
insertDatastuselect.OpenLessonDeptNo = itemteachclass.DeptNo;
insertDatastuselect.OpenLessonMajorNo = itemteachclass.MajorNo; insertDatastuselect.OpenLessonMajorNo = itemteachclass.MajorNo;
insertDatastuselect.LessonNo = itemteachclass.LessonNo; insertDatastuselect.LessonNo = itemteachclass.LessonNo;
insertDatastuselect.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == itemteachclass.LessonNo)?.LessonName; 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 && if (stuSelectLessonListEntityData.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo && m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester && m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
m.MajorNo == insertDatastuselect.MajorNo && m.MajorNo == insertDatastuselect.MajorNo &&
m.LessonNo == insertDatastuselect.LessonNo && m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade && m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo && m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo &&
m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo && m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo &&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0 && m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0 &&
insertStuSelectLessonListDataList.Count(m => m.StuNo == insertDatastuselect.StuNo && insertStuSelectLessonListDataList.Count(m => m.StuNo == insertDatastuselect.StuNo &&
m.AcademicYearNo == insertDatastuselect.AcademicYearNo && m.AcademicYearNo == insertDatastuselect.AcademicYearNo &&
m.Semester == insertDatastuselect.Semester && m.Semester == insertDatastuselect.Semester &&
m.DeptNo == insertDatastuselect.DeptNo &&
m.MajorNo == insertDatastuselect.MajorNo && m.MajorNo == insertDatastuselect.MajorNo &&
m.LessonNo == insertDatastuselect.LessonNo && m.LessonNo == insertDatastuselect.LessonNo &&
m.Grade == insertDatastuselect.Grade && m.Grade == insertDatastuselect.Grade &&
m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo &&
m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo && m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo &&
m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo && m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo &&
m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0) m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0)
@@ -1479,7 +1437,7 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
{ {
try 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; //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "8"); 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 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"); var db = BaseRepository("CollegeMIS");
@@ -1540,7 +1498,7 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
{ {
try 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 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'"); dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
return data; return data;
@@ -1556,8 +1514,8 @@ dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_E
{ {
try 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; return data;
} }
catch (Exception e) catch (Exception e)
@@ -1581,7 +1539,7 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
var semesterAndYear = Common.GetSemesterAndYear(startDate); var semesterAndYear = Common.GetSemesterAndYear(startDate);
var strAcademicYear = semesterAndYear.AcademicYearShort; var strAcademicYear = semesterAndYear.AcademicYearShort;
var strSemester = semesterAndYear.Semester; 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 from ArrangeLessonTerm b
left join ClassroomInfo c on c.ClassroomNo=b.classroomNo left join ClassroomInfo c on c.ClassroomNo=b.classroomNo
left join ClassInfo d on replace(b.TeachClassNo,b.LessonName,'')=d.ClassNo 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 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 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 from ArrangeLessonTerm b
left 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 join ClassInfo d on replace(b.TeachClassNo, b.LessonName, '') = d.ClassNo
where b.AcademicYearNo = '" + academicYearNo + "' and b.Semester = '" + semester + @"' where b.AcademicYearNo = '" + academicYearNo + "' and b.Semester = '" + semester + @"'
and b.CheckMark = 1 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) catch (Exception ex)
@@ -1984,13 +1942,6 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
{ {
foreach (var tablename in entity.SyncBasicTable.Split(',')) 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") if (tablename == "CdMajor")
{ {
//清空同步记录表 //清空同步记录表


+ 6
- 22
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuAttendance/StuAttendanceService.cs View File

@@ -95,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
// 虚拟参数 // 虚拟参数
var dp = new DynamicParameters(new { }); var dp = new DynamicParameters(new { });
strSql.Append(@"( 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 ,a.LessonDate,a.LessonTime
from StuSelectLessonList t 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 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(" and a.LessonDate <= @EndTime ");
} }
strSql.Append(") union ( "); 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 ,a.LessonDate,a.LessonSection as LessonTime
from StuSelectLessonListOfElective t 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 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 queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { }); var dp = new DynamicParameters(new { });
var strSql = new StringBuilder(); 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 "); where 1=1 ");


if (!queryParam["AcademicYearNo"].IsEmpty()) if (!queryParam["AcademicYearNo"].IsEmpty())
@@ -336,11 +336,6 @@ where 1=1 ");
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" and s.Semester=@Semester "); 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()) if (!queryParam["MajorNo"].IsEmpty())
{ {
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
@@ -367,8 +362,8 @@ where 1=1 ");
strSql.Append(" and s.StuName like @StuName "); strSql.Append(" and s.StuName like @StuName ");
} }
strSql.Append(" union "); 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 "); where 1=1 ");
if (!queryParam["AcademicYearNo"].IsEmpty()) if (!queryParam["AcademicYearNo"].IsEmpty())
{ {
@@ -380,11 +375,6 @@ where 1=1 ");
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" and s.Semester=@Semester "); 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()) if (!queryParam["MajorNo"].IsEmpty())
{ {
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
@@ -505,7 +495,6 @@ where 1=1 ");
if (data.Any()) if (data.Any())
{ {
var majorList = BaseRepository("CollegeMIS").FindList<CdMajorEntity>().ToList(); var majorList = BaseRepository("CollegeMIS").FindList<CdMajorEntity>().ToList();
var deptList = BaseRepository("CollegeMIS").FindList<CdDeptEntity>().ToList();
var classList = BaseRepository("CollegeMIS").FindList<ClassInfoEntity>().ToList(); var classList = BaseRepository("CollegeMIS").FindList<ClassInfoEntity>().ToList();
var lessonSortList = BaseRepository("CollegeMIS").FindList<CdLessonSortEntity>().ToList(); var lessonSortList = BaseRepository("CollegeMIS").FindList<CdLessonSortEntity>().ToList();
var classRoomList = BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>().ToList(); var classRoomList = BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>().ToList();
@@ -521,8 +510,6 @@ where 1=1 ");
model.StuName = stuSelectLessonListEntity.StuName; model.StuName = stuSelectLessonListEntity.StuName;
model.Gender = stuSelectLessonListEntity.GenderNo == "0" ? "女" : "男"; model.Gender = stuSelectLessonListEntity.GenderNo == "0" ? "女" : "男";
model.Grade = stuSelectLessonListEntity.Grade; model.Grade = stuSelectLessonListEntity.Grade;
model.DeptNo = stuSelectLessonListEntity.DeptNo;
model.DeptName = deptList.Find(m => m.DeptNo == stuSelectLessonListEntity.DeptNo)?.DeptName;
model.MajorNo = stuSelectLessonListEntity.MajorNo; model.MajorNo = stuSelectLessonListEntity.MajorNo;
model.MajorName = majorList.Find(m => m.MajorNo == stuSelectLessonListEntity.MajorNo)?.MajorName; model.MajorName = majorList.Find(m => m.MajorNo == stuSelectLessonListEntity.MajorNo)?.MajorName;
model.ClassNo = stuSelectLessonListEntity.ClassNo; model.ClassNo = stuSelectLessonListEntity.ClassNo;
@@ -588,7 +575,6 @@ where 1=1 ");
if (data.Any()) if (data.Any())
{ {
var majorList = BaseRepository("CollegeMIS").FindList<CdMajorEntity>().ToList(); var majorList = BaseRepository("CollegeMIS").FindList<CdMajorEntity>().ToList();
var deptList = BaseRepository("CollegeMIS").FindList<CdDeptEntity>().ToList();
var classList = BaseRepository("CollegeMIS").FindList<ClassInfoEntity>().ToList(); var classList = BaseRepository("CollegeMIS").FindList<ClassInfoEntity>().ToList();
var lessonSortList = BaseRepository("CollegeMIS").FindList<CdLessonSortEntity>().ToList(); var lessonSortList = BaseRepository("CollegeMIS").FindList<CdLessonSortEntity>().ToList();
var classRoomList = BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>().ToList(); var classRoomList = BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>().ToList();
@@ -605,8 +591,6 @@ where 1=1 ");
model.StuName = stuSelectLessonListEntity.StuName; model.StuName = stuSelectLessonListEntity.StuName;
model.Gender = stuSelectLessonListEntity.GenderNo == "0" ? "女" : "男"; model.Gender = stuSelectLessonListEntity.GenderNo == "0" ? "女" : "男";
model.Grade = stuSelectLessonListEntity.Grade; model.Grade = stuSelectLessonListEntity.Grade;
model.DeptNo = stuSelectLessonListEntity.DeptNo;
model.DeptName = deptList.Find(m => m.DeptNo == stuSelectLessonListEntity.DeptNo)?.DeptName;
model.MajorNo = stuSelectLessonListEntity.MajorNo; model.MajorNo = stuSelectLessonListEntity.MajorNo;
model.MajorName = majorList.Find(m => m.MajorNo == stuSelectLessonListEntity.MajorNo)?.MajorName; model.MajorName = majorList.Find(m => m.MajorNo == stuSelectLessonListEntity.MajorNo)?.MajorName;
model.ClassNo = stuSelectLessonListEntity.ClassNo; model.ClassNo = stuSelectLessonListEntity.ClassNo;


+ 1
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuAttendanceLeave/StuAttendanceLeaveService.cs View File

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


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

@@ -31,7 +31,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try try
{ {
var strSql = new StringBuilder(); 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(" 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 "); strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject(); var queryParam = queryJson.ToJObject();


Loading…
Cancel
Save