Browse Source

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

临城职教中职
ndbs 2 years ago
parent
commit
45b9361c0d
1 changed files with 8 additions and 13 deletions
  1. +8
    -13
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs

+ 8
- 13
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs View File

@@ -327,32 +327,27 @@ where l.EPLId='{EPLId}'
//排考记录表 //排考记录表
var examPlan = db.FindEntity<Exam_ExamPlanEntity>(EPId); var examPlan = db.FindEntity<Exam_ExamPlanEntity>(EPId);
//查询当前考试记录所有考试课程 //查询当前考试记录所有考试课程
var lessonList = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == EPId);
var lessonList = db.FindList<Exam_ExamPlanLessonEntity>($@"select a.*,b.LessonTypeId,b.MajorNo as TeachMajorNo FROM [dbo].[Exam_ExamPlanLesson] a
left join [dbo].[Exam_ExamLesson] b on a.ELId=b.ELId
where a.EPId='{EPId}'");
foreach (var lesson in lessonList) foreach (var lesson in lessonList)
{ {
var lessonno = lesson.LessonNo;
if (lesson.LessonNo.Contains("("))
{
lessonno = lesson.LessonNo.Split('(')[0];
}

//查询课程信息 //查询课程信息
var lessoninfo = db.FindList<LessonInfoEntity>($@"select top 1 t.LessonTypeName,l.* from lessoninfo l
join [dbo].[CdLessonType] t on l.LessonTypeId = t.LTId where l.LessonNo='{lessonno}' ").FirstOrDefault();
if (lessoninfo != null)
var cdLessonType = db.FindEntity<CdLessonTypeEntity>(lesson.LessonTypeId);
if (cdLessonType != null)
{ {
if (lessoninfo.LessonTypeName.Contains("专业"))
if (cdLessonType.LessonTypeName.Contains("专业"))
{ {
//专业课添加此专业的所有班级 //专业课添加此专业的所有班级
var addSql = $@"insert into Exam_ExamPlanClass var addSql = $@"insert into Exam_ExamPlanClass
SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t 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.ESType='{examPlan.PlanType}' and c.majorno='{lessoninfo.TeachMajorNo}'
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}') 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 "; group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName ";
db.ExecuteBySql(addSql); db.ExecuteBySql(addSql);
} }
else if (lessoninfo.LessonTypeName.Contains("公共") || lessoninfo.LessonTypeName.Contains("公开"))
else if (cdLessonType.LessonTypeName.Contains("公共") || cdLessonType.LessonTypeName.Contains("公开"))
{ {
//公共课添加所有班级 //公共课添加所有班级
var addSql = $@"insert into Exam_ExamPlanClass var addSql = $@"insert into Exam_ExamPlanClass


Loading…
Cancel
Save