diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.cshtml index 33e8b4c71..20ba9930f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.cshtml @@ -12,15 +12,15 @@
学年
- +
学期
- +
课程名称
- +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.js index 4b2a8f7da..97cc143e0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ElectiveMerge/Index.js @@ -29,6 +29,22 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#LessonName').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); // 管理合班 $('#lr_add').on('click', function () { //选课开始后无法进行编辑 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml index df2d59172..81d47da87 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml @@ -12,19 +12,20 @@
学年
- +
学期
- +
-
课程号
- +
课程名称
+ @**@ +
-
课程名称
- +
课程号
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js index 81d1e9311..7bc826a3b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js @@ -30,6 +30,22 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#LessonName').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); //设置选课专业 $('#lr_editMajor').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); @@ -198,7 +214,7 @@ var bootstrap = function ($, learun) { headData: [ { label: "学年", name: "AcademicYearNo", width: 45, align: "left" }, { label: "学期", name: "Semester", width: 35, align: "left" }, - { label: "课程号", name: "LessonNo", width: 70, align: "left" }, + { label: "课程号", name: "LessonNo", width: 100, align: "left" }, //{ // label: "课程名称", name: "LessonNo2", width: 170, align: "left", // formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.cshtml index 85aff3434..c667c5b65 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.cshtml @@ -24,7 +24,8 @@
推荐教师
-
+
+ @*
*@
姓名
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js index 9299fb83a..3aadb01a4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuEnroll/EnrollIndexTJ.js @@ -85,6 +85,7 @@ var bootstrap = function ($, learun) { //老师 $('#EmpNo').lrselect({ //type: 'multiple', + allowSearch: true, url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', param: { strWhere: "1=1 " }, value: "empno", diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorService.cs index 106cc3bd4..06ac6763b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMajor/ElectiveMajorService.cs @@ -267,7 +267,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration foreach (var item in dataList) { //判断是否已选 - if (list.Where(x => x.MajorId == item.ID).Count() <= 0) + if (list.Where(x => x.MajorId == item.ID && x.Grade == item.Grade).Count() <= 0) { var entity = new ElectiveMajorEntity(); entity.Create(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMerge/ElectiveMergeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMerge/ElectiveMergeService.cs index a7474d45a..99b092f59 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMerge/ElectiveMergeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ElectiveMerge/ElectiveMergeService.cs @@ -50,10 +50,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } if (!queryParam["LessonName"].IsEmpty()) { - dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); - strSql.Append(" AND a.LessonName Like @LessonName "); + dp.Add("LessonName", "" + queryParam["LessonName"].ToString() + "", DbType.String); + strSql.Append(" AND a.LessonNo = @LessonName "); + } - return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) { @@ -81,7 +82,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var stumax = this.BaseRepository("CollegeMIS").FindObject(@"select distinct isnull(c.StuNumMax,0) from ElectiveMerge a left join ElectiveMergeItem b on a.EMId = b.EmId left join OpenLessonPlanOfElective c - on b.OLPOEId = c.Id where a.EMId = '"+keyValue+"'"); + on b.OLPOEId = c.Id where a.EMId = '" + keyValue + "'"); ementity.StuNumMax = Convert.ToInt32(stumax); return ementity; } @@ -113,9 +114,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { db.BeginTrans(); - var deldatalist = db.FindList(m => m.EmId == keyValue).OrderBy(m=>Convert.ToInt32(m.LessonSection)); + var deldatalist = db.FindList(m => m.EmId == keyValue).OrderBy(m => Convert.ToInt32(m.LessonSection)); var deldatafirst = deldatalist.First(); - var deldatalast= deldatalist.Last(); + var deldatalast = deldatalist.Last(); var opfirst = db.FindEntity(m => m.Id == deldatafirst.OLPOEId); opfirst.LessonSection = deldatafirst.LessonSection; opfirst.LessonTime = deldatafirst.LessonTime; @@ -160,17 +161,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration db.BeginTrans(); db.Insert(entity); db.Insert(electiveMergeItemEntity); - var ids =string.Join(",",electiveMergeItemEntity.Select(n => n.OLPOEId)); + var ids = string.Join(",", electiveMergeItemEntity.Select(n => n.OLPOEId)); var olplist = db.FindList(m => - ids.Contains(m.Id)).OrderBy(c=>Convert.ToInt32(c.LessonSection)); + ids.Contains(m.Id)).OrderBy(c => Convert.ToInt32(c.LessonSection)); var opfirst = olplist.First(); var oplast = olplist.Last(); - opfirst.LessonSection +=","+ oplast.LessonSection; + opfirst.LessonSection += "," + oplast.LessonSection; opfirst.LessonTime += "," + oplast.LessonTime; db.Update(opfirst); db.ExecuteBySql($@"insert into OpenLessonPlanOfElectiveDel(Id, MakeDate, AcademicYearNo, Semester, LessonNo, PartCode, LessonName, LessonSortNo, LessonSortDetailNo, LessonSection, LessonTime, StudyScore, StartWeek, EndWeek, StartDate, EndDate, CheckStyleNo, ScoreRecordStyleNo, EmpNo, EmpName, ClassRoomNo, ClassRoomName, CheckMark, StuNumMax, StuNum, ModifyTime, ModifyUserId, ModifyUserName, F_SchoolId ) select Id, MakeDate, AcademicYearNo, Semester, LessonNo, PartCode, LessonName, LessonSortNo, LessonSortDetailNo, LessonSection, LessonTime, StudyScore, StartWeek, EndWeek, StartDate, EndDate, CheckStyleNo, ScoreRecordStyleNo, EmpNo, EmpName, ClassRoomNo, ClassRoomName, CheckMark, StuNumMax, StuNum, ModifyTime, ModifyUserId, ModifyUserName, F_SchoolId from OpenLessonPlanOfElective - where id ='"+ oplast.Id+ "'"); + where id ='" + oplast.Id + "'"); db.Delete(oplast); db.Commit(); } @@ -202,7 +203,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var olpl = db.FindList(@"select c.id from ElectiveMerge a left join ElectiveMergeItem b on a.EMId = b.EmId left join OpenLessonPlanOfElective c - on b.OLPOEId = c.Id where a.EMId = '"+ keyValue + "'"); + on b.OLPOEId = c.Id where a.EMId = '" + keyValue + "'"); foreach (var opitem in olpl) { opitem.StuNumMax = entityStuNumMax; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs index be1622439..091e191f3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs @@ -645,8 +645,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } if (!queryParam["LessonName"].IsEmpty()) { - dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); - strSql.Append(" AND t.LessonName Like @LessonName "); + dp.Add("LessonName", queryParam["LessonName"].ToString(), DbType.String); + strSql.Append(" AND t.LessonNo = @LessonName "); + //dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); + //strSql.Append(" AND t.LessonName Like @LessonName "); } var list = new List();