Ver a proveniência

考试学生管理优化执行时长

西昌缴费二期
ndbs há 2 anos
ascendente
cometimento
0ae826cd02
4 ficheiros alterados com 24 adições e 70 eliminações
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentBLL.cs
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentIBLL.cs
  4. +20
    -66
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs Ver ficheiro

@@ -175,7 +175,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success("清空(" + res + ")条数据成功!");
}

public ActionResult ImportTable(string AcademicYearNo, string Semester, string ESType)
public ActionResult ImportTable(string AcademicYearNo, int Semester, string ESType)
{
int res = exam_ExamStudentIBLL.ImportForm(AcademicYearNo, Semester, ESType);
return Success("同步(" + res + ")条数据成功!");


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentBLL.cs Ver ficheiro

@@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public IEnumerable<Exam_ExamStudentEntity> GetPageListForExam(Pagination pagination, string queryJson)
public IEnumerable<Exam_ExamStudentEntity> GetPageListForExam(Pagination pagination, string queryJson)
{
try
{
@@ -217,7 +217,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="Semester"></param>
/// <param name="ESType"></param>
/// <returns></returns>
public int ImportForm(string AcademicYearNo, string Semester, string ESType)
public int ImportForm(string AcademicYearNo, int Semester, string ESType)
{
try
{


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentIBLL.cs Ver ficheiro

@@ -72,7 +72,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="Semester"></param>
/// <param name="ESType"></param>
/// <returns></returns>
int ImportForm(string AcademicYearNo, string Semester, string ESType);
int ImportForm(string AcademicYearNo, int Semester, string ESType);
#endregion

}


+ 20
- 66
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs Ver ficheiro

@@ -343,83 +343,37 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="AcademicYearNo"></param>
/// <param name="Semester"></param>
/// <returns></returns>
public int ImportForm(string AcademicYearNo, string Semester, string ESType)
public int ImportForm(string AcademicYearNo, int Semester, string ESType)
{
try
{
var historyStu = this.BaseRepository("CollegeMIS").FindList<Exam_ExamStudentEntity>();
int XQ = Convert.ToInt32(Semester);
List<Exam_ExamStudentEntity> AddLStuist = new List<Exam_ExamStudentEntity>();
StringBuilder strSql = new StringBuilder();
if (ESType == "1")
{
var StuInfoBasic = this.BaseRepository("CollegeMIS")
.FindList<StuInfoBasicEntity>(x => x.CheckMark == "1");
foreach (var item in StuInfoBasic)
{
var stuList = new Exam_ExamStudentEntity
{
ESId = Guid.NewGuid().ToString(),
ClassNo = item.ClassNo,
AcademicYearNo = AcademicYearNo,
Semester = XQ,
StuNo = item.StuNo,
StuName = item.StuName,
ESType = "1",
ESEnabled = true
};
if (historyStu.Count(x => x.StuNo == stuList.StuNo && x.StuName == stuList.StuName && x.AcademicYearNo == AcademicYearNo && x.Semester == XQ && x.ESType == "1") == AddLStuist.Count(s => s.StuNo == stuList.StuNo && s.StuName == stuList.StuName && s.AcademicYearNo == AcademicYearNo && s.Semester == XQ && s.ESType == "1"))
{
AddLStuist.Add(stuList);
}
}
strSql.Append(
$@"insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled)
select newid(), a.classno, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1 from StuInfoBasic a where CheckMark = '1' and stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1')");
}
else if (ESType == "2")
else
{
var StuScoreNotPass = this.BaseRepository("CollegeMIS")
.FindList<StuScoreNotPassEntity>(x => x.CheckMark == "1");
foreach (var item in StuScoreNotPass)
strSql.Append(@" insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled) ");
strSql.Append($"select newid(),a.classno,'{AcademicYearNo}','{Semester}',a.stuno,a.stuname,'{ESType}',1 from ");
if (ESType == "2")
{
var stuList = new Exam_ExamStudentEntity
{
ESId = Guid.NewGuid().ToString(),
ClassNo = item.ClassNo,
AcademicYearNo = AcademicYearNo,
Semester = XQ,
StuNo = item.StuNo,
StuName = item.StuName,
ESType = "2",
ESEnabled = true
};
if (historyStu.Count(x => x.StuNo == stuList.StuNo && x.StuName == stuList.StuName && x.AcademicYearNo == AcademicYearNo && x.Semester == XQ && x.ESType == "2") == AddLStuist.Count(s => s.StuNo == stuList.StuNo && s.StuName == stuList.StuName && s.AcademicYearNo == AcademicYearNo && s.Semester == XQ && s.ESType == "2"))
{
AddLStuist.Add(stuList);
}
strSql.Append(" StuScore ");
}
}
else if (ESType == "3")
{
var StuScoreNotPassTwo = this.BaseRepository("CollegeMIS")
.FindList<StuScoreNotPassTwoEntity>(x => x.CheckMark == "1");
foreach (var item in StuScoreNotPassTwo)
else
{
var stuList = new Exam_ExamStudentEntity
{
ESId = Guid.NewGuid().ToString(),
ClassNo = item.ClassNo,
AcademicYearNo = AcademicYearNo,
Semester = XQ,
StuNo = item.StuNo,
StuName = item.StuName,
ESType = "3",
ESEnabled = true
};
if (historyStu.Count(x => x.StuNo == stuList.StuNo && x.StuName == stuList.StuName && x.AcademicYearNo == AcademicYearNo && x.Semester == XQ && x.ESType == "3") == AddLStuist.Count(s => s.StuNo == stuList.StuNo && s.StuName == stuList.StuName && s.AcademicYearNo == AcademicYearNo && s.Semester == XQ && s.ESType == "3"))
{
AddLStuist.Add(stuList);
}
strSql.Append(" StuScoreNotPass ");
}
}
return this.BaseRepository("CollegeMIS").Insert(AddLStuist);
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) or a.Score=(-5) or a.Score=(-10)) ");
strSql.Append(" and a.AcademicYearNo ='" + AcademicYearNo + "' and a.Semester ='" + Semester + "' ");
strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) ");
strSql.Append($@" and a.stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' ) ");
strSql.Append(" group by a.stuno,a.stuname,a.classno");
}
return this.BaseRepository("CollegeMIS").ExecuteBySql(strSql.ToString());
}
catch (Exception ex)
{


Carregando…
Cancelar
Guardar