Browse Source

【修改】教学调度优化;

新疆体育高职分支
dyy 1 year ago
parent
commit
9560219319
8 changed files with 88 additions and 62 deletions
  1. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ArrangeLessonTermAttemperController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Form.js
  3. +4
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.cshtml
  4. +28
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js
  5. +10
    -17
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js
  6. +1
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TimeTable/IndexInEducationSelect_.js
  7. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperEntity.cs
  8. +40
    -24
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperService.cs

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

@@ -157,7 +157,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
int index = 0; int index = 0;
foreach (var item in jo["predata"]) foreach (var item in jo["predata"])
{ {
index++;
//index++;
if (string.IsNullOrEmpty(lastdata) || lastdata != item["LessonTime"].ToString()) if (string.IsNullOrEmpty(lastdata) || lastdata != item["LessonTime"].ToString())
{ {
lastdata = item["LessonTime"].ToString(); lastdata = item["LessonTime"].ToString();
@@ -177,6 +177,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
NewLessonTime = newlessontime NewLessonTime = newlessontime
}; };
query.Add(term); query.Add(term);
index++;
} }
entity.query = query; entity.query = query;
} }


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

@@ -484,7 +484,7 @@ var bootstrap = function ($, learun) {
learun.alert.warning("校区、学年、学期不一致!"); learun.alert.warning("校区、学年、学期不一致!");
return false; return false;
} }
} else if (formData.AttemperType == "01") { //课:调度时间比较;教师或教室必填一个;
} else if (formData.AttemperType == "01") { //课:调度时间比较;教师或教室必填一个;
if ((formData.NewEmpNo == null || formData.NewEmpNo == "") && (formData.NewClassroomNo == null || formData.NewClassroomNo == "")) { if ((formData.NewEmpNo == null || formData.NewEmpNo == "") && (formData.NewClassroomNo == null || formData.NewClassroomNo == "")) {
learun.alert.warning("课程新安排中教师或教室不能为空!"); learun.alert.warning("课程新安排中教师或教室不能为空!");
return false; return false;
@@ -493,7 +493,7 @@ var bootstrap = function ($, learun) {
learun.alert.warning("调度结束时间不能小于调度开始时间!"); learun.alert.warning("调度结束时间不能小于调度开始时间!");
return false; return false;
} }
} else if (formData.AttemperType == "04") {
} else if (formData.AttemperType == "04") { //调课
if (formData) { if (formData) {
formData.predata = JSON.parse($('#gridtable').attr("data-val")); formData.predata = JSON.parse($('#gridtable').attr("data-val"));
formData.tardata = JSON.parse( $('#gridtable1').attr("data-val")); formData.tardata = JSON.parse( $('#gridtable1').attr("data-val"));


+ 4
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.cshtml View File

@@ -142,11 +142,13 @@
</div> </div>
<div class="col-xs-6 lr-form-item AttemperType AttemperTypeTiao" data-table="ArrangeLessonTermAttemper"> <div class="col-xs-6 lr-form-item AttemperType AttemperTypeTiao" data-table="ArrangeLessonTermAttemper">
<div class="lr-form-item-title">调度开始时间<font face="宋体">*</font></div> <div class="lr-form-item-title">调度开始时间<font face="宋体">*</font></div>
<div id="AttemperStartTime"></div>
@*<div id="AttemperStartTime"></div>*@
<input id="AttemperStartTime" type="text" class="form-control" readonly />
</div> </div>
<div class="col-xs-6 lr-form-item AttemperType AttemperTypeTiao" data-table="ArrangeLessonTermAttemper"> <div class="col-xs-6 lr-form-item AttemperType AttemperTypeTiao" data-table="ArrangeLessonTermAttemper">
<div class="lr-form-item-title">调度结束时间<font face="宋体">*</font></div> <div class="lr-form-item-title">调度结束时间<font face="宋体">*</font></div>
<div id="AttemperEndTime"></div>
@*<div id="AttemperEndTime"></div>*@
<input id="AttemperEndTime" type="text" class="form-control" readonly />
</div> </div>
</div> </div>




+ 28
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/FormView.js View File

@@ -189,7 +189,7 @@ var bootstrap = function ($, learun) {
$('#NewEmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); $('#NewEmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' });
$('#ClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); $('#ClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' });
$('#NewClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); $('#NewClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' });
}, },
initData: function () { initData: function () {
if (!!keyValue) { if (!!keyValue) {
@@ -274,7 +274,7 @@ var bootstrap = function ($, learun) {
} }
html1 += '日期:' + oldtime + ' <br>节次:' + oldjieci.join(';') + ' <br>课程:' + course + ' <br>教师:' + teacher + '; <br>班级:' + class_.join(';') + '<br>教室:' + classroom; html1 += '日期:' + oldtime + ' <br>节次:' + oldjieci.join(';') + ' <br>课程:' + course + ' <br>教师:' + teacher + '; <br>班级:' + class_.join(';') + '<br>教室:' + classroom;
html2 += '调整到:' + newtime + '的' + newjieci.join(';'); html2 += '调整到:' + newtime + '的' + newjieci.join(';');
console.log(html1)
//console.log(html1)
$("#gridtable").html(html1); $("#gridtable").html(html1);
//{"targettime":"2023-6-24","targetjieci":"1节;2节;"} //{"targettime":"2023-6-24","targetjieci":"1节;2节;"}
var target_json = { "targettime": newtime, "targetjieci": newjieci.join(';') } var target_json = { "targettime": newtime, "targetjieci": newjieci.join(';') }
@@ -282,7 +282,7 @@ var bootstrap = function ($, learun) {
$("#gridtable1").html(html2) $("#gridtable1").html(html2)
} }
} }
} }
}); });
} }
@@ -290,15 +290,30 @@ var bootstrap = function ($, learun) {
}; };
bindData = function (temprow) { bindData = function (temprow) {
if (!!temprow) { if (!!temprow) {
//$('#F_SchoolId').lrselectSet(temprow.schooldId);
$('#AcademicYearNo').lrselectSet(temprow.academicyear);
$('#Semester').lrselectSet(temprow.semester);
$('#DeptNo').lrselectSet(temprow.deptNo);
$('#MajorNo').lrselectSet(temprow.majorNo);
$('#LessonNo').lrselectSet(temprow.lessonNo);
$('#TeachClassNo').lrselectSet(temprow.teachClassNo);
$('#EmpNo').lrselectSet(temprow.empno);
$('#ClassroomNo').lrselectSet(temprow.classRoomNo);
if ($("#AttemperType").lrselectGet() == "04") {
//console.log(temprow)
var dataparams = temprow.predata;
//$('#gridtable').jfGridSet('refreshdata', temprow.predata);
var datahtml = temprow.predatastr;//tardata.targettime + '的' + tardata.targetjieci;
$('#gridtable').html(datahtml);
$('#gridtable').attr("data-val", JSON.stringify(dataparams))
var tardata = (temprow.tardata);
var html = '调整到:' + tardata.targettime + '的' + tardata.targetjieci;
$('#gridtable1').html(html);
$('#gridtable1').attr("data-val", JSON.stringify(tardata))
//$('#gridtable1').jfGridSet('refreshdata', temprow.predata);
//$('#gridtable').
} else {
//$('#F_SchoolId').lrselectSet(temprow.schooldId);
$('#AcademicYearNo').lrselectSet(temprow.academicyear);
$('#Semester').lrselectSet(temprow.semester);
$('#DeptNo').lrselectSet(temprow.deptNo);
$('#MajorNo').lrselectSet(temprow.majorNo);
$('#LessonNo').lrselectSet(temprow.lessonNo);
$('#TeachClassNo').lrselectSet(temprow.teachClassNo);
$('#EmpNo').lrselectSet(temprow.empno);
$('#ClassroomNo').lrselectSet(temprow.classRoomNo);
}
page.query(); page.query();
} }
}; };
@@ -402,7 +417,7 @@ var bootstrap = function ($, learun) {
} }
html1 += '日期:' + oldtime + ' <br>节次:' + oldjieci.join(';') + ' <br>课程:' + course + ' <br>教师:' + teacher + '; <br>班级:' + class_.join(';') + '<br>教室:' + classroom; html1 += '日期:' + oldtime + ' <br>节次:' + oldjieci.join(';') + ' <br>课程:' + course + ' <br>教师:' + teacher + '; <br>班级:' + class_.join(';') + '<br>教室:' + classroom;
html2 += '调整到:' + newtime + '的' + newjieci.join(';'); html2 += '调整到:' + newtime + '的' + newjieci.join(';');
console.log(html1)
//console.log(html1)
$("#gridtable").html(html1); $("#gridtable").html(html1);
//{"targettime":"2023-6-24","targetjieci":"1节;2节;"} //{"targettime":"2023-6-24","targetjieci":"1节;2节;"}
var target_json = { "targettime": newtime, "targetjieci": newjieci.join(';') } var target_json = { "targettime": newtime, "targetjieci": newjieci.join(';') }


+ 10
- 17
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeLessonTermAttemper/Index.js View File

@@ -254,7 +254,8 @@ var bootstrap = function ($, learun) {
}); });
} }
}, },
{ label: "日期", name: "AcademicYearNo", width: 100, align: "left",
{
label: "日期", name: "AcademicYearNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) { formatterAsync: function (callback, value, row, op, $cell) {
learun.httpAsyncGet('/EducationalAdministration/ArrangeLessonTermAttemper/GetchildData?code=' + row.Id, function (res) { learun.httpAsyncGet('/EducationalAdministration/ArrangeLessonTermAttemper/GetchildData?code=' + row.Id, function (res) {
if (res.code == learun.httpCode.success) { if (res.code == learun.httpCode.success) {
@@ -275,7 +276,7 @@ var bootstrap = function ($, learun) {
learun.httpAsyncGet('/EducationalAdministration/ArrangeLessonTermAttemper/GetchildData?code=' + row.Id, function (res) { learun.httpAsyncGet('/EducationalAdministration/ArrangeLessonTermAttemper/GetchildData?code=' + row.Id, function (res) {
if (res.code == learun.httpCode.success) { if (res.code == learun.httpCode.success) {
var t_data = []; var t_data = [];
var t_w=[]
var t_w = []
for (var i = 0; i < res.data.length; i++) { for (var i = 0; i < res.data.length; i++) {
if (t_data.indexOf(res.data[i].LessonTime.substring(1)) < 0) { if (t_data.indexOf(res.data[i].LessonTime.substring(1)) < 0) {
t_data.push(res.data[i].LessonTime.substring(1)) t_data.push(res.data[i].LessonTime.substring(1))
@@ -285,7 +286,7 @@ var bootstrap = function ($, learun) {
} }
} }
if (row.AttemperType == '04') { if (row.AttemperType == '04') {
callback("星期" + weekChina[t_w.join(',') - 1]+'第'+t_data.join(',')+'节');
callback("星期" + weekChina[t_w.join(',') - 1] + '第' + t_data.sort((a, b) => { return a - b; }).join(',') + '节');
} else { } else {
callback(''); callback('');
} }
@@ -301,7 +302,7 @@ var bootstrap = function ($, learun) {
if (res.code == learun.httpCode.success) { if (res.code == learun.httpCode.success) {
var t_data = []; var t_data = [];
for (var i = 0; i < res.data.length; i++) { for (var i = 0; i < res.data.length; i++) {
if (t_data.indexOf(res.data[i].NewLessonDate.substring(0,10)) < 0) {
if (t_data.indexOf(res.data[i].NewLessonDate.substring(0, 10)) < 0) {
t_data.push(res.data[i].NewLessonDate.substring(0, 10)) t_data.push(res.data[i].NewLessonDate.substring(0, 10))
} }
} }
@@ -317,7 +318,7 @@ var bootstrap = function ($, learun) {
{ {
label: "调课星期/节次", name: "AcademicYearNo", width: 100, align: "left", label: "调课星期/节次", name: "AcademicYearNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) { formatterAsync: function (callback, value, row, op, $cell) {
learun.httpAsyncGet( '/EducationalAdministration/ArrangeLessonTermAttemper/GetchildData?code=' + row.Id, function (res) {
learun.httpAsyncGet('/EducationalAdministration/ArrangeLessonTermAttemper/GetchildData?code=' + row.Id, function (res) {
if (res.code == learun.httpCode.success) { if (res.code == learun.httpCode.success) {
var t_data = []; var t_data = [];
var t_w = [] var t_w = []
@@ -330,21 +331,10 @@ var bootstrap = function ($, learun) {
} }
} }
if (row.AttemperType == '04') { if (row.AttemperType == '04') {
callback("星期" + weekChina[t_w.join(',') - 1] + '第' + t_data.join(',') + '节');
callback("星期" + weekChina[t_w.join(',') - 1] + '第' + t_data.sort((a, b) => { return a - b; }).join(',') + '节');
} else { } else {
callback(''); callback('');
} }
//var t_data = [];
//for (var i = 0; i < res.data.length; i++) {
// if (t_data.indexOf(res.data[i].NewLessonTime.substring(1)) < 0) {
// t_data.push(res.data[i].NewLessonTime.substring(1))
// }
//}
//if (row.AttemperType == '04') {
// callback(t_data.join(',') + '节');
//} else {
// callback('');
//}
} }
}); });
} }
@@ -543,6 +533,9 @@ var bootstrap = function ($, learun) {
}, },
search: function (param) { search: function (param) {
param = param || {}; param = param || {};
if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") {
param.CreateUserId = learun.clientdata.get(['userinfo']).userId;
}
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
} }
}; };


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

@@ -15,8 +15,7 @@ var bootstrap = function ($, learun) {
if ($("#predata").text()) { if ($("#predata").text()) {
//当前班级 //当前班级
var dataval = JSON.parse($("#predata .card-box").attr("data-val")) var dataval = JSON.parse($("#predata .card-box").attr("data-val"))
//var classno = dataval.map(item =>} {})
param.ClassNo = dataval.map(item => { return item.className }).filter(function (itm, i, a) {
param.ClassNo = dataval.map(item => { return item.teachClassNo }).filter(function (itm, i, a) {
return i == a.indexOf(itm); return i == a.indexOf(itm);
}).join(','); }).join(',');




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

@@ -21,7 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("ID")] [Column("ID")]
public string Id { get; set; } public string Id { get; set; }
/// <summary> /// <summary>
/// 调度类型:1调课,2停课,3对调
/// 调度类型:1换课,2停课,3对调,4调课
/// </summary> /// </summary>
[Column("ATTEMPERTYPE")] [Column("ATTEMPERTYPE")]
public string AttemperType { get; set; } public string AttemperType { get; set; }


+ 40
- 24
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermAttemper/ArrangeLessonTermAttemperService.cs View File

@@ -89,9 +89,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{ {
dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String);
strSql.Append(" AND (t.EmpNo = @EmpNo or t.NewEmpNo=@EmpNo) "); strSql.Append(" AND (t.EmpNo = @EmpNo or t.NewEmpNo=@EmpNo) ");
}
}
if (!queryParam["CreateUserId"].IsEmpty())
{
dp.Add("CreateUserId", queryParam["CreateUserId"].ToString(), DbType.String);
strSql.Append(" AND t.CreateUserId = @CreateUserId ");
}
var result = this.BaseRepository("CollegeMIS").FindList<ArrangeLessonTermAttemperEntity>(strSql.ToString(), dp, pagination); var result = this.BaseRepository("CollegeMIS").FindList<ArrangeLessonTermAttemperEntity>(strSql.ToString(), dp, pagination);
return result; return result;
} }
catch (Exception ex) catch (Exception ex)
@@ -117,15 +122,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try try
{ {
var db = this.BaseRepository("CollegeMIS").BeginTrans(); var db = this.BaseRepository("CollegeMIS").BeginTrans();
var result=db.FindEntity<ArrangeLessonTermAttemperEntity>(c => c.Id == keyValue);
//result.query = db.FindList<ArrangeLessonTermAttrmperChildEntity>(c => c.AttemperId == keyValue).ToList();
result.query = db.FindList<ArrangeLessonTermAttrmperChildEntity>(@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a
var result = db.FindEntity<ArrangeLessonTermAttemperEntity>(c => c.Id == keyValue);
if (result != null)
{
result.query = db.FindList<ArrangeLessonTermAttrmperChildEntity>($@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a
left join arrangelessonterm b on a.LessonId=b.ALTId left join arrangelessonterm b on a.LessonId=b.ALTId
left join classinfo c on c.classno=replace(b.teachclassno,b.lessonname,'') left join classinfo c on c.classno=replace(b.teachclassno,b.lessonname,'')
left join classroominfo d on d.classroomno=b.ClassroomNo").ToList();
left join classroominfo d on d.classroomno=b.ClassroomNo
where 1=1 and a.AttemperId='{result.Id}' ").ToList();
}
return result; return result;

//return this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonTermAttemperEntity>(keyValue);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -151,13 +157,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{ {
var db = this.BaseRepository("CollegeMIS").BeginTrans(); var db = this.BaseRepository("CollegeMIS").BeginTrans();
var result = db.FindEntity<ArrangeLessonTermAttemperEntity>(t => t.ProcessId == processId); var result = db.FindEntity<ArrangeLessonTermAttemperEntity>(t => t.ProcessId == processId);
//result.query = db.FindList<ArrangeLessonTermAttrmperChildEntity>(c => c.AttemperId == keyValue).ToList();
result.query = db.FindList<ArrangeLessonTermAttrmperChildEntity>(@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a
if (result != null)
{
result.query = db.FindList<ArrangeLessonTermAttrmperChildEntity>($@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a
left join arrangelessonterm b on a.LessonId=b.ALTId left join arrangelessonterm b on a.LessonId=b.ALTId
left join classinfo c on c.classno=replace(b.teachclassno,b.lessonname,'') left join classinfo c on c.classno=replace(b.teachclassno,b.lessonname,'')
left join classroominfo d on d.classroomno=b.ClassroomNo").ToList();
left join classroominfo d on d.classroomno=b.ClassroomNo
where 1=1 and a.AttemperId='{result.Id}' ").ToList();
}
return result; return result;
//return this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonTermAttemperEntity>(t => t.ProcessId == processId);
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -214,23 +222,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{ {
entity.Modify(keyValue); entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity); this.BaseRepository("CollegeMIS").Update(entity);
this.BaseRepository("CollegeMIS").Delete<ArrangeLessonTermAttrmperChildEntity>(c => c.AttemperId == keyValue);
foreach (ArrangeLessonTermAttrmperChildEntity item in entity.query)
if (entity.AttemperType == "04")
{ {
item.AttemperId = entity.Id;
item.Create();
this.BaseRepository("CollegeMIS").Insert(item);
this.BaseRepository("CollegeMIS").Delete<ArrangeLessonTermAttrmperChildEntity>(c => c.AttemperId == keyValue);
foreach (ArrangeLessonTermAttrmperChildEntity item in entity.query)
{
item.AttemperId = entity.Id;
item.Create();
this.BaseRepository("CollegeMIS").Insert(item);
}
} }

} }
else else
{ {
entity.Create(); entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity); this.BaseRepository("CollegeMIS").Insert(entity);
foreach (ArrangeLessonTermAttrmperChildEntity item in entity.query)
if (entity.AttemperType == "04")
{ {
item.AttemperId = entity.Id;
item.Create();
this.BaseRepository("CollegeMIS").Insert(item);
foreach (ArrangeLessonTermAttrmperChildEntity item in entity.query)
{
item.AttemperId = entity.Id;
item.Create();
this.BaseRepository("CollegeMIS").Insert(item);
}
} }
} }
} }
@@ -428,12 +443,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
} }
} }
} }
else if(entity.AttemperType == "04")//调课
else if (entity.AttemperType == "04")//调课
{ {
entity.query = db.FindList<ArrangeLessonTermAttrmperChildEntity>(@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a
entity.query = db.FindList<ArrangeLessonTermAttrmperChildEntity>($@"select a.*,b.lessonname,b.EmpName,b.empno,c.classname,d.classroomname from ArrangeLessonTermAttrmperChild a
left join arrangelessonterm b on a.LessonId=b.ALTId left join arrangelessonterm b on a.LessonId=b.ALTId
left join classinfo c on c.classno=replace(b.teachclassno,b.lessonname,'') left join classinfo c on c.classno=replace(b.teachclassno,b.lessonname,'')
left join classroominfo d on d.classroomno=b.ClassroomNo").ToList();
left join classroominfo d on d.classroomno=b.ClassroomNo
where 1=1 and a.AttemperId='{entity.Id}' ").ToList();
foreach (var item in entity.query) foreach (var item in entity.query)
{ {
string updatesql = "update ArrangeLessonTerm set LessonDate='" + item.NewLessonDate + "',LessonTime='" + item.NewLessonTime + "' where ALTId='" + item.LessonId + "'"; string updatesql = "update ArrangeLessonTerm set LessonDate='" + item.NewLessonDate + "',LessonTime='" + item.NewLessonTime + "' where ALTId='" + item.LessonId + "'";


Loading…
Cancel
Save