Browse Source

在线排课

新疆警官学校中职
ndbs 9 months ago
parent
commit
491e63765c
4 changed files with 89 additions and 90 deletions
  1. +19
    -19
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js
  3. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermTeach.js
  4. +64
    -65
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs

+ 19
- 19
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTerm.js View File

@@ -60,7 +60,7 @@ var bootstrap = function ($, learun) {
//某节课空
function tdHandle() {
var html = '';
for (var j = 0; j < 11; j++) {
for (var j = 0; j < 7; j++) {
html += '<td class="active" id="" num="' + (j + 1) + '"><div></div><div></div><div></div><div></div></td>';
}
return html;
@@ -69,7 +69,7 @@ var bootstrap = function ($, learun) {
//某节课不空
function tdHandles(lists) {
var html = '';
for (var k = 1; k < 12; k++) {
for (var k = 1; k < 8; k++) {
(function (arg) {
var args = arg - 1;
var datas = flogs2(arg, lists, 'day');
@@ -79,27 +79,27 @@ var bootstrap = function ($, learun) {
if (i > 0) {
html += '<hr>';
}
html += '<div>' +
item.curriculum +
'</div>' +
'<div>' +
item.teacher +
'</div>' +
'<div>' +
item.classRoom +
'</div>';
//html += '<div>课程:' +
//html += '<div>' +
// item.curriculum +
// '</div>' +
// '<div>教师:' +
// '<div>' +
// item.teacher +
// '</div>' +
// '<div>班级:' +
// item.className +
// '</div>' +
// '<div>教室:' +
// '<div>' +
// item.classRoom +
// '</div>';
html += '<div>课程:' +
item.curriculum +
'</div>' +
'<div>教师:' +
item.teacher +
'</div>' +
'<div>班级:' +
item.className +
'</div>' +
'<div>教室:' +
item.classRoom +
'</div>';
});
html += '</td>';

@@ -268,7 +268,7 @@ var bootstrap = function ($, learun) {
LODOP.SET_PRINT_MODE("PRINT_DUPLEX", 2);
LODOP.SET_PRINT_MODE("PRINT_DEFAULTSOURCE", 7);

LODOP.ADD_PRINT_HTM(10, 10, '284mm', '185mm', strFormHtml);
LODOP.ADD_PRINT_HTM(10,10, '284mm', '185mm', strFormHtml);
//打印预览
LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1); //横向时的正向显示
var TaskID1 = LODOP.PREVIEW();
@@ -320,7 +320,7 @@ var bootstrap = function ($, learun) {
maxHeight: 300,
allowSearch: true,
//type: 'multiple',
data: [{ text: '星期一', value: '1' }, { text: '星期二', value: '2' }, { text: '星期三', value: '3' }, { text: '星期四', value: '4' }, { text: '星期五', value: '5' }, { text: '星期六', value: '6' }, { text: '星期日', value: '7' }, { text: '星期八', value: '8' }, { text: '星期九', value: '9' }, { text: '星期十', value: '10' }],
data: [{ text: '星期一', value: '1' }, { text: '星期二', value: '2' }, { text: '星期三', value: '3' }, { text: '星期四', value: '4' }, { text: '星期五', value: '5' }, { text: '星期六', value: '6' }, { text: '星期日', value: '7' }],
value: 'value',
text: 'text'
});


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermStu.js View File

@@ -86,7 +86,7 @@ var bootstrap = function ($, learun) {
//某节课空
function tdHandle() {
var html = '';
for (var j = 0; j < 11; j++) {
for (var j = 0; j < 7; j++) {
html += '<td class="active" id="" num="' + (j + 1) + '"><div></div><div></div><div></div><div></div></td>';
}
return html;
@@ -95,7 +95,7 @@ var bootstrap = function ($, learun) {
//某节课不空
function tdHandles(lists) {
var html = '';
for (var k = 1; k < 12; k++) {
for (var k = 1; k < 8; k++) {
(function (arg) {
var args = arg - 1;
var datas = flogs2(arg, lists, 'day');


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTerm/IndexLessonTermTeach.js View File

@@ -13,7 +13,7 @@ var bootstrap = function ($, learun) {
function (data) {
//console.log('res', data);
// 数据处理
var html = '<tr style="height: 30px;"><td>节次/星期</td><td>星期一</td><td>星期二</td><td>星期三</td><td>星期四</td><td>星期五</td><td>星期六</td><td>星期日</td><td>星期八</td><td>星期九</td><td>星期十</td></tr>';
var html = '<tr style="height: 30px;"><td>节次/星期</td><td>星期一</td><td>星期二</td><td>星期三</td><td>星期四</td><td>星期五</td><td>星期六</td><td>星期日</td></tr>';
var weekLists = data.weekList;
//十节课
for (var i = 1; i < 12; i++) {
@@ -60,7 +60,7 @@ var bootstrap = function ($, learun) {
//某节课空
function tdHandle() {
var html = '';
for (var j = 0; j < 11; j++) {
for (var j = 0; j < 7; j++) {
html += '<td class="active" id="" num="' + (j + 1) + '"><div></div><div></div><div></div><div></div></td>';
}
return html;
@@ -69,7 +69,7 @@ var bootstrap = function ($, learun) {
//某节课不空
function tdHandles(lists) {
var html = '';
for (var k = 1; k < 12; k++) {
for (var k = 1; k < 8; k++) {
(function (arg) {
var args = arg - 1;
var datas = flogs2(arg, lists, 'day');
@@ -182,7 +182,7 @@ var bootstrap = function ($, learun) {
LODOP.SET_PRINT_MODE("PRINT_DUPLEX", 2);
LODOP.SET_PRINT_MODE("PRINT_DEFAULTSOURCE", 7);

LODOP.ADD_PRINT_HTM(10, 10, '284mm', '185mm', strFormHtml);
LODOP.ADD_PRINT_HTM(7, 7, '284mm', '185mm', strFormHtml);
//打印预览
LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1); //横向时的正向显示
var TaskID1 = LODOP.PREVIEW();


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

@@ -216,32 +216,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
var weektime = Convert.ToInt32(weekTime);
var lessonDate = GetLessonDate(weektime, Convert.ToInt32(entity.LessonTime.Split('-')[0]));
//2024-2-23修改删除
//var model =
// db.FindEntity<ArrangeLessonTermEntity>(x =>
// x.LessonDate == lessonDate && x.LessonTime == entity.LessonTime && x.ALTId == keyValue);

var model =
db.FindEntity<ArrangeLessonTermEntity>(x =>
x.LessonDate == lessonDate && x.LessonTime == entity.LessonTime);

if (model != null)
{

//更改课程表标记
model.CheckMark = "0";
model.Modify(keyValue);
db.Update(model);
//if (model != null)
//{

//新增修改记录表
ArgLessonTermUpdRecordEntity record = new ArgLessonTermUpdRecordEntity();
record.Create();
record.ALTId = model.ALTId;
record.LessonNoOld = model.LessonNo;
record.LessonNoNew = "";
record.EmpNoOld = model.EmpNo;
record.EmpNoNew = "";
record.ClassroomNoOld = model.ClassroomNo;
record.ClassroomNoNew = "";
record.Remark = "删除";
db.Insert(record);
}
//更改课程表标记
entity.CheckMark = "0";
entity.Modify(keyValue);
db.Update(entity);

//新增修改记录表
ArgLessonTermUpdRecordEntity record = new ArgLessonTermUpdRecordEntity();
record.Create();
record.ALTId = entity.ALTId;
record.LessonNoOld = entity.LessonNo;
record.LessonNoNew = "";
record.EmpNoOld = entity.EmpNo;
record.EmpNoNew = "";
record.ClassroomNoOld = entity.ClassroomNo;
record.ClassroomNoNew = "";
record.Remark = "删除";
db.Insert(record);
//}
}

db.Commit();
@@ -358,10 +358,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
// db.Update(entity);
//}
#endregion
var entity =
db.FindEntity<ArrangeLessonTermEntity>(x =>
x.LessonDate == lessonDate && x.LessonTime == LessonTimeOld);
//24-2-23 武鑫修改 entity 注释改为ArrangeLessonTerm
//var entity =
// db.FindEntity<ArrangeLessonTermEntity>(x =>
// x.LessonDate == lessonDate && x.LessonTime == LessonTimeOld);
//当前星期-节次
var lessiontimeNow = model.WeekSelect + "-" + model.NodeSelect;
if (LessonTimeOld_week == 0)
@@ -374,30 +374,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var semesterAndYear = Common.GetSemesterAndYear(startDate);
var classInfo = db.FindEntity<ClassInfoEntity>(x => x.ClassNo == model.TeachClassNo);

entity = new ArrangeLessonTermEntity();
entity.Create();
entity.LessonDate = lessonDateNew;
entity.AcademicYearNo = semesterAndYear.AcademicYearShort;
entity.Semester = semesterAndYear.Semester;
entity.DeptNo = classInfo?.DeptNo;
entity.MajorNo = classInfo?.MajorNo;
entity.LessonNo = model.LessonNo;
entity.LessonName = model.LessonName;
entity.EmpNo = model.EmpNo;
entity.EmpName = model.EmpName;
entity.TeachClassNo = model.TeachClassNo;
entity.ClassroomNo = model.ClassroomNo;
entity.LessonTime = lessiontimeNow;
entity.CheckMark = "1";
entity.F_SchoolId = LoginUserInfo.Get().companyId;
db.Insert(entity);
ArrangeLessonTerm = new ArrangeLessonTermEntity();
ArrangeLessonTerm.Create();
ArrangeLessonTerm.LessonDate = lessonDateNew;
ArrangeLessonTerm.AcademicYearNo = semesterAndYear.AcademicYearShort;
ArrangeLessonTerm.Semester = semesterAndYear.Semester;
ArrangeLessonTerm.DeptNo = classInfo?.DeptNo;
ArrangeLessonTerm.MajorNo = classInfo?.MajorNo;
ArrangeLessonTerm.LessonNo = model.LessonNo;
ArrangeLessonTerm.LessonName = model.LessonName;
ArrangeLessonTerm.EmpNo = model.EmpNo;
ArrangeLessonTerm.EmpName = model.EmpName;
ArrangeLessonTerm.TeachClassNo = model.TeachClassNo;
ArrangeLessonTerm.ClassroomNo = model.ClassroomNo;
ArrangeLessonTerm.LessonTime = lessiontimeNow;
ArrangeLessonTerm.CheckMark = "1";
ArrangeLessonTerm.F_SchoolId = LoginUserInfo.Get().companyId;
db.Insert(ArrangeLessonTerm);

//新增修改记录表
ArgLessonTermUpdRecordEntity record = new ArgLessonTermUpdRecordEntity();
record.Create();
record.ALTId = entity.ALTId;
record.ALTId = ArrangeLessonTerm.ALTId;
record.LessonDateNew = lessonDateNew;
record.LessonNoOld = "";
record.LessonNoNew = model.LessonNo;
@@ -418,34 +418,33 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
return "第" + weektime + "周当前课程冲突!";
}

//新增修改记录表
ArgLessonTermUpdRecordEntity record = new ArgLessonTermUpdRecordEntity();
record.Create();
record.ALTId = entity.ALTId;
record.LessonDateOld = entity.LessonDate;
record.ALTId = keyValue;
record.LessonDateOld = ArrangeLessonTerm.LessonDate;
record.LessonDateNew = lessonDateNew;
record.LessonNoOld = entity.LessonNo;
record.LessonNoOld = ArrangeLessonTerm.LessonNo;
record.LessonNoNew = model.LessonNo;
record.EmpNoOld = entity.EmpNo;
record.EmpNoOld = ArrangeLessonTerm.EmpNo;
record.EmpNoNew = model.EmpNo;
record.ClassroomNoOld = entity.ClassroomNo;
record.ClassroomNoOld = ArrangeLessonTerm.ClassroomNo;
record.ClassroomNoNew = model.ClassroomNo;
record.LessonTimeOld = entity.LessonTime;
record.LessonTimeOld = ArrangeLessonTerm.LessonTime;
record.LessonTimeNew = lessiontimeNow;
record.Remark = "修改";
db.Insert(record);

//存在 修改
entity.LessonDate = lessonDateNew;
entity.TeachClassNo = model.TeachClassNo;
entity.LessonNo = model.LessonNo;
entity.LessonName = model.LessonName;
entity.EmpNo = model.EmpNo;
entity.EmpName = model.EmpName;
entity.ClassroomNo = model.ClassroomNo;
entity.LessonTime = lessiontimeNow;
db.Update(entity);
ArrangeLessonTerm.LessonDate = lessonDateNew;
ArrangeLessonTerm.TeachClassNo = model.TeachClassNo;
ArrangeLessonTerm.LessonNo = model.LessonNo;
ArrangeLessonTerm.LessonName = model.LessonName;
ArrangeLessonTerm.EmpNo = model.EmpNo;
ArrangeLessonTerm.EmpName = model.EmpName;
ArrangeLessonTerm.ClassroomNo = model.ClassroomNo;
ArrangeLessonTerm.LessonTime = lessiontimeNow;
db.Update(ArrangeLessonTerm);
}
}

@@ -491,7 +490,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
else
{
var start = Common.CalculateFirstDateOfWeek(schoolCalendar.StartTime.Value).AddDays((weektime - 1) * 14);
var start = Common.CalculateFirstDateOfWeek(schoolCalendar.StartTime.Value).AddDays((weektime - 1) * 7);
lessonDate = start.AddDays(WeekSelect - 1);
}



Loading…
Cancel
Save