Bladeren bron

Merge branch '塔里木分支' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 塔里木分支

新疆体育高职分支
dyy 1 jaar geleden
bovenliggende
commit
bb902adf55
11 gewijzigde bestanden met toevoegingen van 72 en 44 verwijderingen
  1. +8
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs
  3. +10
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs
  4. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs
  5. +9
    -8
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs
  6. +16
    -7
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs
  7. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanTime/Exam_ExamPlanTimeEntity.cs
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs
  9. +14
    -13
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs
  10. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherEntity.cs
  11. +4
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs

+ 8
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js Bestand weergeven

@@ -95,11 +95,14 @@ var bootstrap = function ($, learun) {
if (data[id].EmpNo && (data[id].EmpNo).indexOf(',') != -1) {
var empnoArr = data[id].EmpNo.split(',');
var empnameArr = data[id].EmpName.split(',');
$.each(empnoArr, function (i, val) {
if (!!val) {
tempdatra.push({ EmpNo: val, EmpName: empnameArr[i] });
}
});
$.each(empnoArr,
function(i, val) {
if (!!val) {
tempdatra.push({ EmpNo: val, EmpName: empnameArr[i] });
}
});
} else {
tempdatra.push({ EmpNo: data[id].EmpNo, EmpName: data[id].EmpName });
}
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra);
}


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs Bestand weergeven

@@ -278,7 +278,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
string sqldept = "";
if (!string.IsNullOrEmpty(ImportDeptNo))
{
sqldept = $" and t.DeptNo='{ImportDeptNo}'";
sqldept = $" and t.DeptNo='{ImportDeptNo}' and LessonTypeId in (select LTId from CdLessonType where LessonTypeCode like 'Professional%') ";
}
//导入专业开课计划中是必修的(lessonsortno=1)、考核方式是考试的(ExamType='1',2022.6.23新增)
string sql = $@"insert into Exam_ExamLesson([ELId]


+ 10
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs Bestand weergeven

@@ -329,7 +329,7 @@ where l.EPLId='{EPLId}'
//查询当前考试记录所有考试课程
var lessonList = db.FindList<Exam_ExamPlanLessonEntity>($@"select a.*,b.MajorNo as TeachMajorNo FROM [dbo].[Exam_ExamPlanLesson] a
left join [dbo].[Exam_ExamPlan] c on c.epid=a.epid
left join [dbo].[Exam_ExamLesson] b on a.lessonno=b.lessonno and b.AcademicYearNo=c.AcademicYearNo and b.Semester=c.Semester and b.Grade=a.Grade
left join [dbo].[Exam_ExamLesson] b on a.lessonno=b.lessonno and b.AcademicYearNo=c.AcademicYearNo and b.Semester=c.Semester and b.Grade=a.Grade and b.ImportDeptNo=c.ImportDeptNo
where a.EPId='{EPId}'");
foreach (var lesson in lessonList)
{
@@ -337,30 +337,34 @@ where a.EPId='{EPId}'");
var cdLessonType = db.FindEntity<CdLessonTypeEntity>(lesson.LessonTypeId);
if (cdLessonType != null)
{
if (cdLessonType.LessonTypeName.Contains("专业"))
if (cdLessonType.LessonTypeName.Contains("专业") ||
cdLessonType.LessonTypeCode.Contains("Professional"))
{
//专业课添加此专业的所有班级
var addSql = $@"insert into Exam_ExamPlanClass
SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.Grade='{lesson.Grade}'
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.Grade='{lesson.Grade}' and t.ImportDeptNo='{examPlan.ImportDeptNo}'
and t.ESType='{examPlan.PlanType}' and c.majorno='{lesson.TeachMajorNo}'
and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}')
group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName ";
db.ExecuteBySql(addSql);
}
else if (cdLessonType.LessonTypeName.Contains("公共") || cdLessonType.LessonTypeName.Contains("公开"))
else if (cdLessonType.LessonTypeName.Contains("公共") ||
cdLessonType.LessonTypeName.Contains("公开") ||
cdLessonType.LessonTypeCode.Contains("OpenLesson"))
{
//公共课添加所有班级
var addSql = $@"insert into Exam_ExamPlanClass
SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' and t.Grade='{lesson.Grade}'
left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' and t.Grade='{lesson.Grade}' and t.ImportDeptNo='{examPlan.ImportDeptNo}'
and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}')
group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName ";
db.ExecuteBySql(addSql);
}

}

else
continue;
//更新排考安排课程表实排班级数、实排人数和应排班级数、应排人数(如果没有点击【一键安排班级】,应排班级数、应排人数在安排考试页面切换课程时候更新)
string sql = $@"update l
set l.RealStuCount=t.RealStuCount,l.RealClassNum=t.RealClassNum,ClassNum=t.RealClassNum,StuCount=t.RealStuCount


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs Bestand weergeven

@@ -130,6 +130,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[NotMapped]
public string LessonTypeName { get; set; }
/// <summary>
/// 课程类型编号
/// </summary>
[NotMapped]
public string LessonTypeCode { get; set; }
/// <summary>
/// 专业
/// </summary>
[NotMapped]


+ 9
- 8
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs Bestand weergeven

@@ -329,7 +329,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
//必修+'('+grade+')'
string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId,Grade)
select NEWID(),'{EPId}',LessonName,LessonNo,LessonTypeId,grade from Exam_ExamLesson where ELEnabled=1 and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}'
select NEWID(),'{EPId}',LessonName,LessonNo,LessonTypeId,grade from Exam_ExamLesson where ELEnabled=1 and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' and ImportDeptNo='{exam_ExamPlan.ImportDeptNo}'
and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}')
group by LessonNo,grade,LessonName,LessonTypeId,grade";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
@@ -340,7 +340,7 @@ select NEWID(),'{EPId}',LessonName,LessonNo,LessonTypeId,grade from Exam_ExamLes
string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId,Grade)
select NEWID(),'{EPId}',a.lessonname,a.LessonNo,t.LessonTypeId,b.Grade
from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo
join (select l.lessonno,l.LessonTypeId,lt.ltorder from Exam_ExamLesson l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.elenabled=1 and l.AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and l.Semester='{exam_ExamPlan.Semester}' ) t on a.lessonno=t.lessonno
join (select l.lessonno,l.LessonTypeId,lt.ltorder from Exam_ExamLesson l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.elenabled=1 and l.AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and l.Semester='{exam_ExamPlan.Semester}' and ImportDeptNo='{exam_ExamPlan.ImportDeptNo}' ) t on a.lessonno=t.lessonno
--left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno
where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10))
and (b.ChangeStatus<>'1' or len(b.ChangeStatus)=0 or b.ChangeStatus is null)
@@ -355,7 +355,7 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan
string sql = $@" insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo,LessonTypeId,Grade)
select NEWID(),'{EPId}',a.lessonname,a.LessonNo,t.LessonTypeId,b.Grade
from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo
join (select l.lessonno,l.LessonTypeId,lt.ltorder from Exam_ExamLesson l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.elenabled=1 and l.AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and l.Semester='{exam_ExamPlan.Semester}' ) t on a.lessonno=t.lessonno
join (select l.lessonno,l.LessonTypeId,lt.ltorder from Exam_ExamLesson l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.elenabled=1 and l.AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and l.Semester='{exam_ExamPlan.Semester}' and ImportDeptNo='{exam_ExamPlan.ImportDeptNo}' ) t on a.lessonno=t.lessonno
--left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno
where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10))
and (b.ChangeStatus<>'1' or len(b.ChangeStatus)=0 or b.ChangeStatus is null)
@@ -592,8 +592,8 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId
return (false, "请先安排考试记录时间!");
}
//考试课程数据
var EPLessonList = db.FindList<Exam_ExamPlanLessonEntity>($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeName,elesson.MajorNo as TeachMajorNo,t.* from Exam_ExamPlanLesson t
join Exam_ExamLesson elesson on t.LessonNo=elesson.LessonNo and [AcademicYearNo]='{examPlan.AcademicYearNo}' and [Semester]='{examPlan.Semester}'
var EPLessonList = db.FindList<Exam_ExamPlanLessonEntity>($@" select distinct elesson.ExamTime as ExamLength,ltype.LessonTypeCode,ltype.LessonTypeName,elesson.MajorNo as TeachMajorNo,t.* from Exam_ExamPlanLesson t
join Exam_ExamLesson elesson on t.LessonNo=elesson.LessonNo and [AcademicYearNo]='{examPlan.AcademicYearNo}' and [Semester]='{examPlan.Semester}' and elesson.ImportDeptNo='{examPlan.ImportDeptNo}'
left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId
where t.EPId='{EPId}' and elesson.ELEnabled=1 ");
// if (examPlan.PlanType == "1")
@@ -618,8 +618,9 @@ left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId
{
EPLesson.ExamDate = null;
EPLesson.ExamTime = null;
if (!string.IsNullOrEmpty(EPLesson.LessonTypeName) && (EPLesson.LessonTypeName.Contains("公共") || EPLesson.LessonTypeName.Contains("公开")))
if (!string.IsNullOrEmpty(EPLesson.LessonTypeName) && (EPLesson.LessonTypeName.Contains("公共") || EPLesson.LessonTypeName.Contains("公开")||EPLesson.LessonTypeCode.Contains("OpenLesson")))
{
//获取公共课时间安排
var EPTimes = EPTimeList.Where(x => x.ExamType == "2" && x.ExamTimeLength == EPLesson.ExamLength).ToList();
foreach (var EPTime in EPTimes)
{
@@ -627,7 +628,7 @@ left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId
//不存在同专业同时间段的考试课程,修改考试时间
if (!EPLessonList.ToList().Exists(x =>
x.TeachMajorNo == EPLesson.TeachMajorNo && x.ExamLength == EPTime.ExamTimeLength && x.ExamDate != null &&
x.ExamDate == EPTime.ExamDate && x.ExamTime == time))
x.ExamDate == EPTime.ExamDate && x.ExamTime == time&&x.Grade==EPLesson.Grade))
{
EPLesson.ExamDate = EPTime.ExamDate;
EPLesson.ExamTime = time;
@@ -652,7 +653,7 @@ left join CdLessonType ltype on elesson.LessonTypeId=ltype.LTId
//不存在同专业同时间段的考试课程,修改考试时间
if (!EPLessonList.ToList().Exists(x =>
x.TeachMajorNo == EPLesson.TeachMajorNo && x.ExamLength == EPTime.ExamTimeLength && x.ExamDate != null &&
x.ExamDate == EPTime.ExamDate && x.ExamTime == time))
x.ExamDate == EPTime.ExamDate && x.ExamTime == time && x.Grade == EPLesson.Grade))
{

EPLesson.ExamDate = EPTime.ExamDate;


+ 16
- 7
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs Bestand weergeven

@@ -343,7 +343,7 @@ where l.EPLId='{EPLId}'";
//考场座位数
int? seatCount = 0;
var roomListSql =
$"select * from Exam_ExamRoom where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and EREnabled=1 ";
$"select * from Exam_ExamRoom where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ImportDeptNo='{examPlan.ImportDeptNo}' and EREnabled=1 ";
if (conflictRoom.Count() > 0)
{
var classroomNo = string.Join("','", conflictRoom.ToList());
@@ -461,9 +461,9 @@ where l.EPLId='{EPLId}'";
}

//查询课程信息
var lessoninfo = db.FindList<LessonInfoEntity>($@"select top 1 t.LessonTypeName,l.* from lessoninfo l
var lessoninfo = db.FindList<LessonInfoEntity>($@"select top 1 t.LessonTypeName,t.LessonTypeCode,l.* from lessoninfo l
join [dbo].[CdLessonType] t on l.LessonTypeId = t.LTId where l.LessonNo='{LessonNo}' ").FirstOrDefault();
if (lessoninfo != null && !lessoninfo.LessonTypeName.Contains("公共") && !lessoninfo.LessonTypeName.Contains("公开"))
if (lessoninfo != null && !lessoninfo.LessonTypeName.Contains("公共") && !lessoninfo.LessonTypeName.Contains("公开")&&!lessoninfo.LessonTypeCode.Contains("OpenLesson"))
{
//如果是专业课,监考老师不能添加这门课的代课老师
var teachClass = db.FindList<TeachClassEntity>(
@@ -502,14 +502,23 @@ where l.EPLId='{EPLId}'";
empnos.Add(examRoom.EmpNo);
}
}

var sql = $@"select * from Exam_InvigilateTeacher where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ITEnabled=1 ";
//20230614增加已排监考次数算法
//排过监考的老师顺序往后调整
//var sql = $@"select * from Exam_InvigilateTeacher where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ImportDeptNo='{examPlan.ImportDeptNo}' and ITEnabled=1 ";
var sql = $@"select aa.EmpName,aa.EmpNo,count(b.EmpNo) as times from Exam_InvigilateTeacher aa
left join(select EPRId, SUBSTRING(a.EmpNo, number, CHARINDEX(',',a.EmpNo + ',',number)-number) as EmpNo
from[Exam_ExamPlanRoom] a with(nolock) ,master..spt_values with(nolock)
where number>= 1 and number<len(a.EmpNo) and type = 'p'
and sUBSTRING(',' + a.EmpNo , number,1)= ',' and eplid in ({string.Join(",", examLessonList.Select(m=>"'"+m.EPLId+"'"))})
) b on aa.empno = b.empno
where aa.AcademicYearNo = '{examPlan.AcademicYearNo}' and aa.Semester = '{examPlan.Semester}' and aa.ImportDeptNo = '{examPlan.ImportDeptNo}' and aa.ITEnabled = 1";
if (empnos.Count() > 0)
{
string nos = string.Join("','", empnos);
sql += $" and EmpNo not in ('{nos}')";
sql += $" and aa.EmpNo not in ('{nos}')";
}
var Exam_InvigilateTeacher = db.FindList<Exam_InvigilateTeacherEntity>(sql).OrderBy(x => Guid.NewGuid()).ToList();
sql += " group by aa.EmpName,aa.EmpNo order by times";
var Exam_InvigilateTeacher = db.FindList<Exam_InvigilateTeacherEntity>(sql).OrderBy(x => Guid.NewGuid()).OrderBy(x=>x.times).ToList();

//查询考场
var examPlanRooms = db.FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == epLesson.EPLId).ToList();


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanTime/Exam_ExamPlanTimeEntity.cs Bestand weergeven

@@ -45,7 +45,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("EXAMTIMELENGTH")]
public double? ExamTimeLength { get; set; }
/// <summary>
/// 排考名称
/// 课程类型
/// </summary>
[Column("EXAMTYPE")]
public string ExamType { get; set; }


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs Bestand weergeven

@@ -84,6 +84,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
strSql.Append($" AND t.AcademicYearNo = '{ELEntity.AcademicYearNo}' ");
strSql.Append($" AND t.Semester = '{ELEntity.Semester}' ");
strSql.Append($" AND t.ImportDeptNo = '{ELEntity.ImportDeptNo}' ");
}
strSql.Append($" AND t.ClassroomNo not in (select ClassroomNo from Exam_ExamPlanRoom where EPLId='{queryParam["EPLId"].ToString()}') ");



+ 14
- 13
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs Bestand weergeven

@@ -117,6 +117,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSql.Append(@" t.ClassNo,count(1) as StuNum,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName ");
strSql.Append(" FROM Exam_ExamStudent t ");
strSql.Append(" left join classinfo c on t.ClassNo=c.ClassNo ");
strSql.Append(" left join Exam_ExamPlan d on t.ImportDeptNo=d.ImportDeptNo ");
strSql.Append(" WHERE t.ESEnabled=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
@@ -151,19 +152,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuName Like @StuName ");
}
if (!queryParam["ImportDeptNo"].IsEmpty())
{
if (queryParam["ImportDeptNo"].ToString() == "0")
{
strSql.Append(" AND t.ImportDeptNo='' ");
}
else
{
dp.Add("ImportDeptNo", queryParam["ImportDeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.ImportDeptNo = @ImportDeptNo ");
}
//if (!queryParam["ImportDeptNo"].IsEmpty())
//{
// if (queryParam["ImportDeptNo"].ToString() == "0")
// {
// strSql.Append(" AND t.ImportDeptNo='' ");
// }
// else
// {
// dp.Add("ImportDeptNo", queryParam["ImportDeptNo"].ToString(), DbType.String);
// strSql.Append(" AND t.ImportDeptNo = @ImportDeptNo ");
// }

}
//}
if (!queryParam["ESType"].IsEmpty())
{
dp.Add("ESType", queryParam["ESType"].ToString(), DbType.String);
@@ -184,7 +185,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var examPlan = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanEntity>(queryParam["EPId"].ToString());
if (examPlan != null)
{
strSql.Append($" AND t.AcademicYearNo = '{examPlan.AcademicYearNo}' AND t.Semester = '{examPlan.Semester}' AND t.ESType = '{examPlan.PlanType}' ");
strSql.Append($" AND t.AcademicYearNo = '{examPlan.AcademicYearNo}' AND t.Semester = '{examPlan.Semester}' AND t.ESType = '{examPlan.PlanType}' and t.ImportDeptNo='{examPlan.ImportDeptNo}' ");
}
}
strSql.Append(" group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName ");


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherEntity.cs Bestand weergeven

@@ -72,6 +72,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
#endregion
#region 扩展字段

[NotMapped] public int times { get; set; }

#endregion
}
}


+ 4
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs Bestand weergeven

@@ -88,6 +88,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
strSql.Append($" AND t.AcademicYearNo = '{ELEntity.AcademicYearNo}' ");
strSql.Append($" AND t.Semester = '{ELEntity.Semester}' ");
strSql.Append($" AND t.ImportDeptNo = '{ELEntity.ImportDeptNo}' ");
}
//同一考试课程下考场的监考老师不重复
var empSql = "SELECT STUFF( (SELECT ',' + empno FROM Exam_ExamPlanRoom WHERE 1=1 ";
@@ -97,7 +98,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}

empSql += $@" and EPLId = T.EPLId FOR XML PATH('') ), 1, 1, '') AS empno FROM Exam_ExamPlanRoom AS T
where EPLId ='{queryParam["EPLId"].ToString()}'";
where EPLId ='{queryParam["EPLId"].ToString()}' and empno is not null ";
var obj = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(empSql).Select(x => x.EmpNo).Distinct().ToList();
if (obj.Count() > 0)
{
@@ -113,9 +114,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
LessonNo = LessonNo.Split('(')[0];
}
//查询课程信息
var lessoninfo = this.BaseRepository("CollegeMIS").FindList<LessonInfoEntity>($@"select top 1 t.LessonTypeName,l.* from lessoninfo l
var lessoninfo = this.BaseRepository("CollegeMIS").FindList<LessonInfoEntity>($@"select top 1 t.LessonTypeName,t.LessonTypeCode,l.* from lessoninfo l
join [dbo].[CdLessonType] t on l.LessonTypeId = t.LTId where l.LessonNo='{LessonNo}' ").FirstOrDefault();
if (lessoninfo != null && !lessoninfo.LessonTypeName.Contains("公共") && !lessoninfo.LessonTypeName.Contains("公开"))
if (lessoninfo != null && !lessoninfo.LessonTypeName.Contains("公共") && !lessoninfo.LessonTypeName.Contains("公开")&&!lessoninfo.LessonTypeCode.Contains("OpenLesson"))
{
//如果是专业课,监考老师不能添加这门课的代课老师
var teachClass = this.BaseRepository("CollegeMIS").FindList<TeachClassEntity>(


Laden…
Annuleren
Opslaan