diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js index c0fc654ac..9c86e3d17 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js @@ -32,7 +32,14 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); - $('#Semester').lrDataItemSelect({ code: 'Semester' }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); $('#TeachDeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js index baf34ed51..69e5d826c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js @@ -34,7 +34,14 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); - $('#Semester').lrDataItemSelect({ code: 'Semester' }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); $("#MajorNo").lrselect(); $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); // 刷新 @@ -205,18 +212,7 @@ var bootstrap = function ($, learun) { } }, { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, - { - label: "学期", name: "Semester", width: 50, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'Semester', - callback: function (_data) { - callback(_data.text); - } - }); - } - }, + { label: "学期", name: "Semester", width: 50, align: "left" }, { label: "专业", name: "MajorNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js index 14ffc8aab..fec7fd98a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js @@ -34,7 +34,14 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); - $('#Semester').lrDataItemSelect({ code: 'Semester' }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); $("#MajorNo").lrselect(); $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); // 刷新 @@ -85,16 +92,20 @@ var bootstrap = function ($, learun) { $('#lr_qzteach').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { - learun.layerForm({ - id: 'form', - title: '强制设置教师', - url: top.$.rootUrl + - '/EducationalAdministration/ClassPlanTeach/TeachFormQZ?keyValue=' + - keyValue, - width: 400, - height: 300, - callBack: function (id) { - return top[id].acceptClick(); + learun.layerConfirm('是否确认强制设置教师,请谨慎操作!!!', function (item) { + if (item) { + learun.layerForm({ + id: 'form', + title: '强制设置教师', + url: top.$.rootUrl + + '/EducationalAdministration/ClassPlanTeach/TeachFormQZ?keyValue=' + + keyValue, + width: 400, + height: 300, + callBack: function (id) { + return top[id].acceptClick(); + } + }); } }); } @@ -150,18 +161,7 @@ var bootstrap = function ($, learun) { } }, { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, - { - label: "学期", name: "Semester", width: 50, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'Semester', - callback: function (_data) { - callback(_data.text); - } - }); - } - }, + { label: "学期", name: "Semester", width: 50, align: "left" }, { label: "系部", name: "DeptNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs index 90524bf2b..d09fcddb9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs @@ -795,6 +795,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration CheckMarkDept = "1", CheckMark = "1", TestMark = 0, + State = 0, F_SchoolId = item.schoolId }; if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && @@ -838,14 +839,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest var insertDatastuselect = new StuSelectLessonListEntity(); insertDatastuselect.NoticeBookNo = stu.NoticeNo; insertDatastuselect.StuNo = stu.StuNo; - //insertDatastuselect.DeptNo = stu.DeptNo; + 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.OpenLessonDeptNo = itemteachclass.DeptNo; insertDatastuselect.OpenLessonMajorNo = itemteachclass.MajorNo; insertDatastuselect.LessonNo = itemteachclass.LessonNo; insertDatastuselect.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == itemteachclass.LessonNo)?.LessonName; @@ -861,6 +862,8 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest insertDatastuselect.StudyScore = lessonData.FirstOrDefault(m => m.LessonNo == itemteachclass.LessonNo).StudyScore == null ? 0 : lessonData.FirstOrDefault(m => m.LessonNo == itemteachclass.LessonNo).StudyScore; insertDatastuselect.TotalStudyHour = lessonData.FirstOrDefault(m => m.LessonNo == itemteachclass.LessonNo).TotalStudyHour == null ? 0 : lessonData.FirstOrDefault(m => m.LessonNo == itemteachclass.LessonNo).TotalStudyHour; insertDatastuselect.IsInEffect = "1"; + insertDatastuselect.OpenLessonDeptNo = stu.DeptNo; + insertDatastuselect.OpenLessonMajorNo = stu.MajorNo; insertDatastuselect.EmpNo = itemteachclass.EmpNo; insertDatastuselect.IsPitchOn = "1"; insertDatastuselect.CheckMark = "0"; @@ -869,22 +872,22 @@ 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.DeptNo == insertDatastuselect.DeptNo && m.MajorNo == insertDatastuselect.MajorNo && m.LessonNo == insertDatastuselect.LessonNo && m.Grade == insertDatastuselect.Grade && - //m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo && + 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.DeptNo == insertDatastuselect.DeptNo && m.MajorNo == insertDatastuselect.MajorNo && m.LessonNo == insertDatastuselect.LessonNo && m.Grade == insertDatastuselect.Grade && - //m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo && + m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo && m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo && m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo && m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0) @@ -1176,7 +1179,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest LEFT JOIN tb_course cour ON cour.id= p.`course` LEFT JOIN tb_curriculum curr ON curr.id=cour.`course` WHERE s.year = '" + entity.AcademicYearNo + "' AND s.number = '" + entity.Semester - + "' AND sc.sid = '" + entity.F_SchoolId + "' AND curr.`ification` ='1' ORDER BY p.`major` "); + + "' AND curr.`ification` ='1' ORDER BY p.`major` "); var majorData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); var lessonData = (await BaseRepository("CollegeMIS").FindListAsync()).ToList(); if (TeachList.Count() > 0) @@ -1187,7 +1190,8 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest foreach (var item in TeachList) { - foreach (var itemTeach in item.EmpNo.Split(',')) + var TeachClass = item.EmpNo.Split(','); + foreach (var itemTeach in TeachClass) { var insertData = new OpenLessonPlanEntity() { @@ -1261,15 +1265,15 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest var insertDatastuselect = new StuSelectLessonListEntity(); insertDatastuselect.NoticeBookNo = stu.NoticeNo; insertDatastuselect.StuNo = stu.StuNo; - //insertDatastuselect.DeptNo = stu.DeptNo; + 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.OpenLessonDeptNo = stu.DeptNo; + insertDatastuselect.OpenLessonMajorNo = stu.MajorNo; insertDatastuselect.LessonNo = itemteachclass.LessonNo; insertDatastuselect.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == itemteachclass.LessonNo)?.LessonName; insertDatastuselect.PartCode = ""; @@ -1292,22 +1296,22 @@ 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.DeptNo == insertDatastuselect.DeptNo && m.MajorNo == insertDatastuselect.MajorNo && m.LessonNo == insertDatastuselect.LessonNo && m.Grade == insertDatastuselect.Grade && - //m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo && + 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.DeptNo == insertDatastuselect.DeptNo && m.MajorNo == insertDatastuselect.MajorNo && m.LessonNo == insertDatastuselect.LessonNo && m.Grade == insertDatastuselect.Grade && - //m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo && + m.OpenLessonDeptNo == insertDatastuselect.OpenLessonDeptNo && m.OpenLessonMajorNo == insertDatastuselect.OpenLessonMajorNo && m.EmpNo == insertDatastuselect.EmpNo && m.ClassNo == insertDatastuselect.ClassNo && m.F_SchoolId == insertDatastuselect.F_SchoolId) == 0)