Procházet zdrojové kódy

移动端掌上评教课程列表新增选修课显示

娄底高职分支
zhangli před 1 rokem
rodič
revize
8c01e46afd
1 změnil soubory, kde provedl 10 přidání a 2 odebrání
  1. +10
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs

+ 10
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs Zobrazit soubor

@@ -70,17 +70,25 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach
//取库名
var misdbname = BaseRepository("CollegeMIS").getDbConnection().Database;
var queryParam = queryJson.ToJObject();
//必修
var strSql = new StringBuilder();
strSql.Append("select aa.*,bb.UID,cc.EmpName,dd.LessonName from (select a.LessonNo,a.EmpNo,a.AcademicYearNo,a.Semester,b.VID,a.StuNo from " + misdbname + ".dbo.StuSelectLessonList a ");
strSql.Append("left join Eval_Main b on a.AcademicYearNo=b.AcademicYearNo and a.Semester=b.Semester where b.Status=1 and a.StuNo='" + queryParam["StuNo"] + "' and a.StuNo not in (select StuNo from " + misdbname + ".dbo.StuInfoBasic where ChangeStatus=1) ) aa ");
strSql.Append("left join (select distinct b.EmpNo, b.LessonNo, b.UID from Eval_Question a left join Eval_QuestionResult b on a.QID=b.QID) bb on aa.EmpNo=bb.EmpNo and aa.LessonNo=bb.LessonNo and aa.StuNo=bb.UID ");
strSql.Append("left join " + misdbname + ".dbo.EmpInfo cc on aa.EmpNo=cc.EmpNo left join " + misdbname + ".dbo.LessonInfo dd on aa.LessonNo = dd.LessonNo ");
//选修
var strSql_Elective = new StringBuilder();
strSql_Elective.Append("select aa.*,bb.UID,cc.EmpName,dd.LessonName+'(选)' as LessonName from (select a.LessonNo,a.EmpNo,a.AcademicYearNo,a.Semester,b.VID,a.StuNo from " + misdbname + ".dbo.StuSelectLessonListOfElective a ");
strSql_Elective.Append("left join Eval_Main b on a.AcademicYearNo=b.AcademicYearNo and a.Semester=b.Semester where b.Status=1 and a.StuNo='" + queryParam["StuNo"] + "' and a.StuNo not in (select StuNo from " + misdbname + ".dbo.StuInfoBasic where ChangeStatus=1) ) aa ");
strSql_Elective.Append("left join (select distinct b.EmpNo, b.LessonNo, b.UID from Eval_Question a left join Eval_QuestionResult b on a.QID=b.QID) bb on aa.EmpNo=bb.EmpNo and aa.LessonNo=bb.LessonNo and aa.StuNo=bb.UID ");
strSql_Elective.Append("left join " + misdbname + ".dbo.EmpInfo cc on aa.EmpNo=cc.EmpNo left join " + misdbname + ".dbo.LessonInfo dd on aa.LessonNo = dd.LessonNo ");

if (pagination != null)
{
return this.BaseRepository().FindList<Eval_QuestionResultEntity>(strSql.ToString(), pagination);
return this.BaseRepository().FindList<Eval_QuestionResultEntity>(strSql.ToString(), pagination).Union(this.BaseRepository().FindList<Eval_QuestionResultEntity>(strSql_Elective.ToString(), pagination));
}
else
return BaseRepository().FindList<Eval_QuestionResultEntity>(strSql.ToString());
return BaseRepository().FindList<Eval_QuestionResultEntity>(strSql.ToString()).Union(BaseRepository().FindList<Eval_QuestionResultEntity>(strSql_Elective.ToString()));
}
catch (Exception ex)
{


Načítá se…
Zrušit
Uložit