diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs index 3d95b8ccf..a1de116d8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs @@ -173,17 +173,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration // 虚拟参数 var dp = new DynamicParameters(new { }); var strSql = new StringBuilder(); - strSql.Append(@"select isnull(ssnp.score,0) as BKScore ,ssnp.checkmark as IsSubmit,a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) -else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, -case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) -else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, -case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) -else CONVERT(varchar,a.Score) end as Score2,b.MoveType,b.StudyModality "); - strSql.Append(@" from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo "); - strSql.Append( - @" left join StuScoreNotPass ssnp on ssnp.StuNo = a.StuNo and ssnp.lessonno = a.lessonno "); - strSql.Append(@" where 1=1 and ( ssnp.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) - and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); + + //旧 + // strSql.Append(@"select isnull(ssnp.score,0) as BKScore ,ssnp.checkmark as IsSubmit,a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) + //else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, + //case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) + //else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, + //case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) + //else CONVERT(varchar,a.Score) end as Score2,b.MoveType,b.StudyModality "); + // strSql.Append(@" from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo "); + // strSql.Append( + // @" left join StuScoreNotPass ssnp on ssnp.StuNo = a.StuNo and ssnp.lessonno = a.lessonno "); + // strSql.Append(@" where 1=1 and ( ssnp.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) + // and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); + + //新 + strSql.Append(@"select ISNULL(ssnp.Score,0) as BKScore,ssnp.CheckMark as IsSubmit,c.classname,a.*,CONVERT(varchar,a.OrdinaryScore) as OrdinaryScore2,CONVERT(varchar,a.TermEndScore) as TermEndScore2,CONVERT(varchar,a.Score) as Score2,b.MoveType,b.StudyModality +from StuScore a +left join StuScoreNotPass ssnp on ssnp.StuNo=a.StuNo and ssnp.AcademicYearNo=a.AcademicYearNo and ssnp.Semester=a.Semester and ssnp.LessonNo=a.LessonNo +left join ClassInfo c on c.ClassNo=a.ClassNo +left join StuInfoBasic b on b.StuNo=a.StuNo +where 1=1 and a.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus =1) +and a.LessonSortNo='1' +and a.Score<60 +and b.StuId is not null +and (b.EduSystem is null or b.EduSystem != '6') "); + if (!queryParam["AcademicYearNo"].IsEmpty()) { strSql.Append($" and a.AcademicYearNo ='{queryParam["AcademicYearNo"].ToString()}'"); @@ -220,8 +235,8 @@ else CONVERT(varchar,a.Score) end as Score2,b.MoveType,b.StudyModality "); { strSql.Append($" and ssnp.CheckMark ='{queryParam["CheckMark"].ToString()}'"); } - - strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); + //旧 + //strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs index 83600541c..f0ae6cf25 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs @@ -265,17 +265,33 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration // 虚拟参数 var dp = new DynamicParameters(new { }); var strSql = new StringBuilder(); - strSql.Append(@"select isnull(ssnpt.score,0) as BKScore,ssnpt.checkmark as IsSubmit,a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) -else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, -case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) -else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, -case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) -else CONVERT(varchar,a.Score) end as Score2 "); - strSql.Append(@" from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo "); - strSql.Append( - @" left join StuScoreNotPassTwo ssnpt on ssnpt.StuNo = a.StuNo and ssnpt.lessonno = a.lessonno "); - strSql.Append(@"where 1=1 and ( ssnpt.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) -and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); + + //旧 + // strSql.Append(@"select isnull(ssnpt.score,0) as BKScore,ssnpt.checkmark as IsSubmit,a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) + //else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, + //case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) + //else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, + //case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) + //else CONVERT(varchar,a.Score) end as Score2 "); + // strSql.Append(@" from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo "); + // strSql.Append( + // @" left join StuScoreNotPassTwo ssnpt on ssnpt.StuNo = a.StuNo and ssnpt.lessonno = a.lessonno "); + // strSql.Append(@"where 1=1 and ( ssnpt.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' ) + //and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); + + //新 + strSql.Append(@"select ISNULL(ssnpt.Score,0) as BKScore,ssnpt.CheckMark as IsSubmit,c.classname,a.*,CONVERT(varchar,a.OrdinaryScore) as OrdinaryScore2,CONVERT(varchar,a.TermEndScore) as TermEndScore2,CONVERT(varchar,a.Score) as Score2,b.MoveType,b.StudyModality +from StuScoreNotPass a +left join StuScoreNotPassTwo ssnpt on ssnpt.StuNo = a.StuNo and ssnpt.AcademicYearNo = a.AcademicYearNo and ssnpt.Semester = a.Semester and ssnpt.LessonNo = a.LessonNo +left join ClassInfo c on c.ClassNo = a.ClassNo +left join StuInfoBasic b on b.StuNo = a.StuNo +where 1 = 1 +and a.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus = 1) +and a.LessonSortNo = '1' +and a.Score < 60 +and b.StuId is not null +and (b.EduSystem is null or b.EduSystem != '6') "); + if (!queryParam["AcademicYearNo"].IsEmpty()) { strSql.Append($" and a.AcademicYearNo ='{queryParam["AcademicYearNo"].ToString()}'"); @@ -312,7 +328,8 @@ and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Sco { strSql.Append($" and ssnpt.CheckMark ='{queryParam["CheckMark"].ToString()}'"); } - strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); + //旧 + //strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); } catch (Exception ex)