Parcourir la source

同步排课计划处理一个教师情况

临城职教中职
ndbs il y a 2 ans
Parent
révision
e261bfb23b
4 fichiers modifiés avec 59 ajouts et 52 suppressions
  1. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js
  2. +9
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js
  3. +23
    -23
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js
  4. +19
    -15
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs

+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js Voir le fichier

@@ -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' });


+ 9
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Index.js Voir le fichier

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


+ 23
- 23
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js Voir le fichier

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


+ 19
- 15
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs Voir le fichier

@@ -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<CdMajorEntity>()).ToList();
var lessonData = (await BaseRepository("CollegeMIS").FindListAsync<LessonInfoEntity>()).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)


Chargement…
Annuler
Enregistrer