Преглед на файлове

Merge branch 'master' into 大厂分支

大厂分支
liangkun преди 4 години
родител
ревизия
3b3b60a8b9
променени са 2 файла, в които са добавени 25 реда и са изтрити 4 реда
  1. +15
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs
  2. +10
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs

+ 15
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTermOfElective/ArrangeLessonTermOfElectiveService.cs Целия файл

@@ -191,6 +191,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
//ArrangeLessonTermOfElective数据处理
var insertDataList = new List<ArrangeLessonTermOfElectiveEntity>();
var lessonData = (await BaseRepository("CollegeMIS").FindListAsync<LessonInfoEntity>()).ToList();
var oldArrangeLessonTermOfElectiveDataList = BaseRepository("CollegeMIS")
.FindList<ArrangeLessonTermOfElectiveEntity>(m => m.F_SchoolId == entity.F_SchoolId
&& m.AcademicYearNo == entity.AcademicYearNo && m.Semester == entity.Semester).ToList();
foreach (var item in dataList)
{
if (!string.IsNullOrEmpty(item.paike.timeText))
@@ -217,7 +220,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
F_SchoolId = entity.F_SchoolId,
CheckMark = "1"
};
insertDataList.Add(insertData);
if (oldArrangeLessonTermOfElectiveDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo
&& m.Semester == insertData.Semester && m.LessonNo == insertData.LessonNo
&& m.LessonSection == insertData.LessonSection && m.EmpNo == insertData.EmpNo
&& m.ClassRoomNo == insertData.ClassRoomNo) == 0)
{
insertDataList.Add(insertData);
}
}
}

@@ -284,7 +293,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
x.ClassRoomNo == insertOpenLessonPlanOfElectiveData.ClassRoomNo &&
x.F_SchoolId == insertOpenLessonPlanOfElectiveData.F_SchoolId) == 0)
{
insertOpenLessonPlanOfElectiveDataList.Add(insertOpenLessonPlanOfElectiveData);
if (BaseRepository("CollegeMIS").FindEntity<OpenLessonPlanOfElectiveEntity>(m => m.Id == insertOpenLessonPlanOfElectiveData.Id) == null
&& BaseRepository("CollegeMIS").FindEntity<OpenLessonPlanOfElectiveDelEntity>(m => m.Id == insertOpenLessonPlanOfElectiveData.Id) == null)
{
insertOpenLessonPlanOfElectiveDataList.Add(insertOpenLessonPlanOfElectiveData);
}
}
}



+ 10
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs Целия файл

@@ -95,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSql.Append(@"select b.*,c.StuNo,c.StuName,c.Status,cp.Status as StatusPre from ElectiveMajor a left join OpenLessonPlanOfElective b on a.OLPOEId=b.Id
left join StuSelectLessonListOfElective c on b.Id=c.OLPEId and c.StuNo=@StuNo
left join StuSelectLessonListOfElectivePre cp on b.Id=cp.OLPEId and cp.StuNo=@StuNo
where 1=1 ");
where 1=1 and a.MajorId is not null and a.Grade is not null ");
//学号
if (!queryParam["StuNo"].IsEmpty())
{
@@ -106,18 +106,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("StuMajorNo", queryParam["StuMajorNo"].ToString(), DbType.String);
strSql.Append(" and a.MajorId=@StuMajorNo ");
}
else
{
strSql.Append(" and a.MajorId='' ");
}
if (!queryParam["StuGrade"].IsEmpty())
{
dp.Add("StuGrade", queryParam["StuGrade"].ToString(), DbType.String);
strSql.Append(" and a.Grade=@StuGrade ");
}
else
{
strSql.Append(" and a.Grade='' ");
}
//教学工作安排中“选课”工作设置的学年学期
var now = DateTime.Now;
var EADateArrangeEntityAboutElective = this.BaseRepository("CollegeMIS").FindEntity<EADateArrangeEntity>(x => x.WorkName == "选课" && x.MakeDate <= now && x.EndDate >= now && x.CheckMark == "1");
if (EADateArrangeEntityAboutElective != null)
{
strSql.Append(" AND b.AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and b.Semester='" + EADateArrangeEntityAboutElective?.Semester + "'");
strSql.Append(" and b.LessonName not in(select LessonName from StuSelectLessonListOfElective where AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and Semester='" + EADateArrangeEntityAboutElective?.Semester + "' and StuNo='"+ queryParam["StuNo"].ToString() + "' and Status<>3)");
strSql.Append(" and b.LessonName not in(select LessonName from StuSelectLessonListOfElective where AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and Semester='" + EADateArrangeEntityAboutElective?.Semester + "' and StuNo='" + queryParam["StuNo"].ToString() + "' and Status<>3)");
}
else
{


Зареждане…
Отказ
Запис