Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js파일 보기
@@ -99,10 +99,10 @@ var bootstrap = function ($, learun) {
return false;
}
var EmpNoMain = $('#gridtable').jfGridValue('EmpNoMain');
if (EmpNoMain) {
learun.alert.warning("已完成强制设置!");
return false;
}
//if (EmpNoMain) {
// learun.alert.warning("已完成强制设置!");
// return false;
//}
learun.layerForm({
id: 'form',
title: '强制设置教师',
+ 24- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassBLL.cs파일 보기
public void DoQzSetTeach(string keyValue, string EmpNo)
{
try
{
teachClassEntity.DoQzSetTeach(keyValue, EmpNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
+ 2- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs파일 보기
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassIBLL.cs파일 보기
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs파일 보기
strSql.Append(" left join openlessonplan op on op.academicyearno=t.academicyearno and op.semester=t.semester and op.DeptNo=t.DeptNo and op.majorno =t.majorno ");
strSql.Append(" and op.grade =t.grade and op.lessonno =t.lessonno and op.F_SchoolId =t.F_SchoolId ");
var teachclassEntity = this.BaseRepository("CollegeMIS").FindEntity<TeachClassEntity>(ID);
return this.BaseRepository("CollegeMIS").FindList<EmpInfoEntity>($"select * from EmpInfo e where EmpNo in ({teachclassEntity.EmpNo}) ");
return this.BaseRepository("CollegeMIS").FindList<EmpInfoEntity>($"select * from EmpInfo e where EmpNo in ('{teachclassEntity.EmpNo.Replace(",", "','")}') ");
public void DoQzSetTeach(string keyValue, string EmpNo)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
foreach (var item in keyValue.Split(','))
{
var entityList = this.GetTeachClassEntity(item);
if (entityList != null && entityList.EmpNoMain != EmpNo)
{
//选课
var ssllstr = $"update StuSelectLessonList set EmpNo ='{EmpNo}' where classno = '{entityList.TeachClassNo}' and Semester ='{entityList.Semester}' and AcademicYearNo ='{entityList.AcademicYearNo}' and LessonNo ='{entityList.LessonNo}' and empno = '{(!string.IsNullOrEmpty(entityList.EmpNoMain) ? entityList.EmpNoMain : entityList.EmpNo)}' and Grade = '{entityList.Grade}' and LessonSortNo='{entityList.LessonSortNo}' ";
db.ExecuteBySql(ssllstr);
//成绩
var ssstr = $"update StuScore set EmpNo ='{EmpNo}' where classno = '{entityList.TeachClassNo}' and Semester ='{entityList.Semester}' and AcademicYearNo ='{entityList.AcademicYearNo}' and LessonNo ='{entityList.LessonNo}' and empno = '{(!string.IsNullOrEmpty(entityList.EmpNoMain) ? entityList.EmpNoMain : entityList.EmpNo)}' and Grade='{entityList.Grade}' and LessonSortNo='{entityList.LessonSortNo}' ";
db.ExecuteBySql(ssstr);
//教师成绩单
var ercstr = $"update EmpReportCard set EmpNo='{EmpNo}',EmpName=(select EmpName from EmpInfo where EmpNo='{EmpNo}') where AcademicYearNo='{entityList.AcademicYearNo}' and Semester='{entityList.Semester}' and LessonNo='{entityList.LessonNo}' and ClassNo='{entityList.TeachClassNo}' and EmpNo='{(!string.IsNullOrEmpty(entityList.EmpNoMain) ? entityList.EmpNoMain : entityList.EmpNo)}' and LessonSortNo='{entityList.LessonSortNo}' ";