Browse Source

考务管理-安排考试-新增班级 学年学期等附加添加不起作用

新疆体育高职分支
ndbs 1 year ago
parent
commit
6955514e0b
1 changed files with 12 additions and 10 deletions
  1. +12
    -10
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs

+ 12
- 10
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs View File

@@ -113,12 +113,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try try
{ {
var strSql = new StringBuilder(); var strSql = new StringBuilder();
strSql.Append("SELECT ");
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 ");
strSql.Append(@" SELECT zb.ClassNo,zb.AcademicYearNo,zb.Semester,zb.ESType,zb.ImportDeptNo, zb.StuNum,zb.ClassName
FROM (select t.ClassNo,count(1) as StuNum,t.AcademicYearNo,t.Semester,t.ESType,t.ImportDeptNo,c.ClassName from Exam_ExamStudent t
left join classinfo c on t.ClassNo=c.ClassNo
where 1=1 ");
var queryParam = queryJson.ToJObject(); var queryParam = queryJson.ToJObject();
// 虚拟参数 // 虚拟参数
var dp = new DynamicParameters(new { }); var dp = new DynamicParameters(new { });
@@ -134,8 +132,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
} }
if (!queryParam["ClassNo"].IsEmpty()) if (!queryParam["ClassNo"].IsEmpty())
{ {
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
dp.Add("ClassNo", "%" + queryParam["ClassNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ClassNo like @ClassNo ");
} }
if (!queryParam["ClassName"].IsEmpty()) if (!queryParam["ClassName"].IsEmpty())
{ {
@@ -188,7 +186,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSql.Append($" AND t.AcademicYearNo = '{examPlan.AcademicYearNo}' AND t.Semester = '{examPlan.Semester}' AND t.ESType = '{examPlan.PlanType}' and t.ImportDeptNo='{examPlan.ImportDeptNo}' "); 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 ");
strSql.Append(@" group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,t.ImportDeptNo,c.ClassName
)zb
left join classinfo c on zb.ClassNo=c.ClassNo
left join Exam_ExamPlan d on zb.ImportDeptNo=d.ImportDeptNo
group by zb.ClassNo,zb.AcademicYearNo,zb.Semester,zb.ESType,zb.ImportDeptNo,zb.StuNum,zb.ClassName ");
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamStudentEntity>(strSql.ToString(), dp, pagination); return this.BaseRepository("CollegeMIS").FindList<Exam_ExamStudentEntity>(strSql.ToString(), dp, pagination);
} }
catch (Exception ex) catch (Exception ex)
@@ -429,7 +431,7 @@ from StuInfoBasic a where CheckMark = '1' and (ChangeStatus is null or len(Chang
strSql.Append(@" a left join StuInfoBasic b on b.StuNo=a.StuNo strSql.Append(@" a left join StuInfoBasic b on b.StuNo=a.StuNo
where 1=1 and a.LessonSortNo='1' and a.Score>=0 and a.Score<60 "); where 1=1 and a.LessonSortNo='1' and a.Score>=0 and a.Score<60 ");
strSql.Append(" and a.AcademicYearNo ='" + AcademicYearNo + "' and a.Semester ='" + Semester + "' "); strSql.Append(" and a.AcademicYearNo ='" + AcademicYearNo + "' and a.Semester ='" + Semester + "' ");
strSql.Append(" and (b.ChangeStatus<>'1' or len(b.ChangeStatus)=0 or b.ChangeStatus is null) "+ sqldept2);
strSql.Append(" and (b.ChangeStatus<>'1' or len(b.ChangeStatus)=0 or b.ChangeStatus is null) " + sqldept2);
strSql.Append($@" and a.stuno not in strSql.Append($@" and a.stuno not in
(select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' and ImportDeptNo='{ImportDeptNo}' (select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' and ImportDeptNo='{ImportDeptNo}'




Loading…
Cancel
Save