ソースを参照

排考记录表--安排班级关联课程信息表修改

临城职教中职
zhangli 2年前
コミット
6ab08f98a1
1個のファイルの変更8行の追加13行の削除
  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 ファイルの表示

@@ -327,32 +327,27 @@ where l.EPLId='{EPLId}'
//排考记录表
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)
{
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
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}'
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}')
group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName ";
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


読み込み中…
キャンセル
保存