diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs
index fecee5d5c..1e81ddef1 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs
@@ -29,6 +29,9 @@ namespace Learun.Application.WebApi.Modules
Get["/teacher"] = GetTeachers;
Get["/class"] = GetClasses;
Get["/stu"] = GetStus;
+ Get["/classroomtype"] = GetClassroomType;
+ Get["/departments"] = GetDepartments;
+
//以下返回全部
Get["/department"] = GetDepartment;
Get["/allteacher"] = GetAllTeachers;
@@ -173,9 +176,10 @@ namespace Learun.Application.WebApi.Modules
}
private Response GetDepts(dynamic _)
{
- string AcademicYearNo = Request.Query["AcademicYearNo"];
- string Semester = Request.Query["Semester"];
- var result = arrangeLessonTermIBLL.GetDepts(AcademicYearNo, Semester);
+ //string AcademicYearNo = Request.Query["AcademicYearNo"];
+ //string Semester = Request.Query["Semester"];
+ //var result = arrangeLessonTermIBLL.GetDepts(AcademicYearNo, Semester);
+ var result = arrangeLessonTermIBLL.GetDepts();
return Success(result);
}
private Response GetDeptsNotRecord(dynamic _)
@@ -188,9 +192,10 @@ namespace Learun.Application.WebApi.Modules
private Response GetSchools(dynamic _)
{
- string AcademicYearNo = Request.Query["AcademicYearNo"];
- string Semester = Request.Query["Semester"];
- var result = arrangeLessonTermIBLL.GetSchools(AcademicYearNo, Semester);
+ //string AcademicYearNo = Request.Query["AcademicYearNo"];
+ //string Semester = Request.Query["Semester"];
+ //var result = arrangeLessonTermIBLL.GetSchools(AcademicYearNo, Semester);
+ var result = arrangeLessonTermIBLL.GetSchools();
return Success(result);
}
private Response GetSchoolsNotRecord(dynamic _)
@@ -223,9 +228,9 @@ namespace Learun.Application.WebApi.Modules
}
public Response GetMajors(dynamic _)
{
- string AcademicYearNo = Request.Query["AcademicYearNo"];
- string Semester = Request.Query["Semester"];
- var result = arrangeLessonTermIBLL.GetMajors(AcademicYearNo, Semester);
+ //string AcademicYearNo = Request.Query["AcademicYearNo"];
+ //string Semester = Request.Query["Semester"];
+ var result = arrangeLessonTermIBLL.GetMajors();
return Success(result);
}
public Response GetMajorsNotRecord(dynamic _)
@@ -238,9 +243,7 @@ namespace Learun.Application.WebApi.Modules
public Response GetClassrooms(dynamic _)
{
- string AcademicYearNo = Request.Query["AcademicYearNo"];
- string Semester = Request.Query["Semester"];
- var result = arrangeLessonTermIBLL.GetClassrooms(AcademicYearNo, Semester);
+ var result = arrangeLessonTermIBLL.GetClassrooms();
return Success(result);
}
public Response GetClassroomsNotRecord(dynamic _)
@@ -258,9 +261,17 @@ namespace Learun.Application.WebApi.Modules
}
public Response GetLessons(dynamic _)
{
- string AcademicYearNo = Request.Query["AcademicYearNo"];
- string Semester = Request.Query["Semester"];
- var result = arrangeLessonTermIBLL.GetLessons(AcademicYearNo, Semester);
+ var result = arrangeLessonTermIBLL.GetLessons();
+ return Success(result);
+ }
+ public Response GetClassroomType(dynamic _)
+ {
+ var result = arrangeLessonTermIBLL.GetClassroomType();
+ return Success(result);
+ }
+ public Response GetDepartments(dynamic _)
+ {
+ var result = arrangeLessonTermIBLL.GetDepartments();
return Success(result);
}
public Response GetLessonsNotRecord(dynamic _)
@@ -283,9 +294,7 @@ namespace Learun.Application.WebApi.Modules
public Response GetTeachers(dynamic _)
{
- string AcademicYearNo = Request.Query["AcademicYearNo"];
- string Semester = Request.Query["Semester"];
- var result = arrangeLessonTermIBLL.GetTeachers(AcademicYearNo, Semester);
+ var result = arrangeLessonTermIBLL.GetTeachers();
return Success(result);
}
public Response GetTeachersNotRecord(dynamic _)
@@ -298,9 +307,7 @@ namespace Learun.Application.WebApi.Modules
public Response GetClasses(dynamic _)
{
- string AcademicYearNo = Request.Query["AcademicYearNo"];
- string Semester = Request.Query["Semester"];
- var result = arrangeLessonTermIBLL.GetClasses(AcademicYearNo, Semester);
+ var result = arrangeLessonTermIBLL.GetClasses();
return Success(result);
}
public Response GetClassesNotRecord(dynamic _)
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonSync/ArrangeLessonSyncEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonSync/ArrangeLessonSyncEntity.cs
index 01ee73108..28394c30b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonSync/ArrangeLessonSyncEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonSync/ArrangeLessonSyncEntity.cs
@@ -30,7 +30,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("SEMESTER")]
public string Semester { get; set; }
///
- /// 基础数据类型(1校区,2系部,3专业,4班级,5课程,6教室,7老师,8学生)
+ /// 基础数据类型(1校区,2系部,3专业,4班级,5课程,6教室,7老师,8学生,9教室类型, 10部门)
///
[Column("STYPEID")]
public string STypeId { get; set; }
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs
index 61c0d36ff..4f59063b2 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.cs
@@ -242,9 +242,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
return data;
}
- public IEnumerable GetMajors(string academicYearNo, string semester)
+ public IEnumerable GetMajors()
{
- var data = arrangeLessonTermService.GetMajors(academicYearNo, semester);
+ var data = arrangeLessonTermService.GetMajors();
return data;
}
public IEnumerable GetMajorsNotRecord(string academicYearNo, string semester)
@@ -253,9 +253,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
return data;
}
- public IEnumerable GetClassrooms(string academicYearNo, string semester)
+ public IEnumerable GetClassrooms()
{
- var data = arrangeLessonTermService.GetClassrooms(academicYearNo, semester);
+ var data = arrangeLessonTermService.GetClassrooms();
return data;
}
public IEnumerable GetClassroomsNotRecord(string academicYearNo, string semester)
@@ -270,11 +270,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
return data;
}
- public IEnumerable GetLessons(string academicYearNo, string semester)
+ public IEnumerable GetLessons()
{
- var data = arrangeLessonTermService.GetLessons(academicYearNo, semester);
+ var data = arrangeLessonTermService.GetLessons();
return data;
}
+ public IEnumerable GetClassroomType()
+ {
+ var data = arrangeLessonTermService.GetClassroomType();
+ return data;
+ }
+ public IEnumerable GetDepartments()
+ {
+ var data = arrangeLessonTermService.GetDepartments();
+ return data;
+ }
public IEnumerable GetLessonsNotRecord(string academicYearNo, string semester)
{
var data = arrangeLessonTermService.GetLessonsNotRecord(academicYearNo, semester);
@@ -310,9 +320,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
- public IEnumerable GetDepts(string academicYearNo, string semester)
+ public IEnumerable GetDepts()
{
- var data = arrangeLessonTermService.GetDepts(academicYearNo, semester);
+ var data = arrangeLessonTermService.GetDepts();
return data;
}
public IEnumerable GetDeptsNotRecord(string academicYearNo, string semester)
@@ -321,9 +331,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
return data;
}
- public IEnumerable GetSchools(string academicYearNo, string semester)
+ public IEnumerable GetSchools()
{
- var data = arrangeLessonTermService.GetSchools(academicYearNo, semester);
+ var data = arrangeLessonTermService.GetSchools();
return data;
}
public IEnumerable GetSchoolsNotRecord(string academicYearNo, string semester)
@@ -386,9 +396,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
return data;
}
- public IEnumerable GetTeachers(string academicYearNo, string semester)
+ public IEnumerable GetTeachers()
{
- var data = arrangeLessonTermService.GetTeachers(academicYearNo, semester);
+ var data = arrangeLessonTermService.GetTeachers();
return data;
}
public IEnumerable GetTeachersNotRecord(string academicYearNo, string semester)
@@ -397,9 +407,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
return data;
}
- public IEnumerable GetClasses(string academicYearNo, string semester)
+ public IEnumerable GetClasses()
{
- var data = arrangeLessonTermService.GetClasses(academicYearNo, semester);
+ var data = arrangeLessonTermService.GetClasses();
return data;
}
public IEnumerable GetClassesNotRecord(string academicYearNo, string semester)
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs
index 9e3b330e2..67155e902 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.cs
@@ -20,16 +20,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
IEnumerable AttendanceStudents(Pagination pagination, string queryJson);
- IEnumerable GetMajors(string academicYearNo, string semester);
+ IEnumerable GetMajors();
IEnumerable GetMajorsNotRecord(string academicYearNo, string semester);
- IEnumerable GetClassrooms(string academicYearNo, string semester);
+ IEnumerable GetClassrooms();
IEnumerable GetClassroomsNotRecord(string academicYearNo, string semester);
IEnumerable GetClassType();
- IEnumerable GetLessons(string academicYearNo, string semester);
+ IEnumerable GetLessons();
+ IEnumerable GetClassroomType();
+ IEnumerable GetDepartments();
+
IEnumerable GetLessonsNotRecord(string academicYearNo, string semester);
- IEnumerable GetTeachers(string academicYearNo, string semester);
+ IEnumerable GetTeachers();
IEnumerable GetTeachersNotRecord(string academicYearNo, string semester);
- IEnumerable GetClasses(string academicYearNo, string semester);
+ IEnumerable GetClasses();
IEnumerable GetClassesNotRecord(string academicYearNo, string semester);
IEnumerable GetStus(string academicYearNo, string semester);
@@ -138,9 +141,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
IEnumerable GetClassroomData(string schoolId);
bool GetAny();
- IEnumerable GetDepts(string academicYearNo, string semester);
+ IEnumerable GetDepts();
IEnumerable GetDeptsNotRecord(string academicYearNo, string semester);
- IEnumerable GetSchools(string academicYearNo, string semester);
+ IEnumerable GetSchools();
IEnumerable GetSchoolsNotRecord(string academicYearNo, string semester);
IEnumerable GetLessonTypes();
IEnumerable GetPageListForTeacherWorkload(Pagination paginationobj, string queryJson);
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
index 6400be4e8..332c2f032 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
@@ -1303,14 +1303,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
}
}
}
- public IEnumerable GetMajors(string academicYearNo, string semester)
+ public IEnumerable GetMajors()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true);
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
- var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "3");
+ var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "3");
if (aa == null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update CdMajor set SyncFlag='false' ");
@@ -1319,14 +1319,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
//数据
var db = BaseRepository("CollegeMIS");
db.BeginTrans();
- var data = db.FindList("select * from CdMajor where CheckMark=1 and ID not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
+ var data = db.FindList("select * from CdMajor where CheckMark=1 and ID not in (select STableId from ArrangeLessonSync )");
DateTime syncdate = DateTime.Now;
foreach (var item in data.Select(m => m.ID))
{
ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity();
alsEntity.Create();
- alsEntity.AcademicYearNo = academicYearNo;
- alsEntity.Semester = semester;
alsEntity.STypeId = "3";
alsEntity.SDate = syncdate;
alsEntity.STableId = item;
@@ -1361,14 +1359,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
}
}
- public IEnumerable GetClassrooms(string academicYearNo, string semester)
+ public IEnumerable GetClassrooms()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true);
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
- var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "6");
+ var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "6");
if (aa == null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update ClassroomInfo set SyncFlag='false' ");
@@ -1377,14 +1375,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
//数据
var db = BaseRepository("CollegeMIS");
db.BeginTrans();
- var data = db.FindList("select * from ClassroomInfo where CheckMark=1 and ClassroomId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
+ var data = db.FindList("select * from ClassroomInfo where CheckMark=1 and ClassroomId not in (select STableId from ArrangeLessonSync )");
DateTime syncdate = DateTime.Now;
foreach (var item in data.Select(m => m.ClassroomId))
{
ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity();
alsEntity.Create();
- alsEntity.AcademicYearNo = academicYearNo;
- alsEntity.Semester = semester;
alsEntity.STypeId = "6";
alsEntity.SDate = syncdate;
alsEntity.STableId = item;
@@ -1432,15 +1428,89 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
throw;
}
}
+
+ public IEnumerable GetClassroomType()
+ {
+ try
+ {
+ //var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true);
+
+ //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
+ var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "9");
+ if (aa == null)
+ {
+ this.BaseRepository("CollegeMIS").ExecuteBySql("update CdClassType set SyncFlag='false' ");
+ }
+
+ //数据
+ var db = BaseRepository("CollegeMIS");
+ db.BeginTrans();
+ var data = db.FindList("select * from CdClassType where 1=1 and ClassroomTypeId not in (select STableId from ArrangeLessonSync )");
+ DateTime syncdate = DateTime.Now;
+ foreach (var item in data.Select(m => m.ClassroomTypeId))
+ {
+ ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity();
+ alsEntity.Create();
+ alsEntity.STypeId = "9";
+ alsEntity.SDate = syncdate;
+ alsEntity.STableId = item;
+ db.Insert(alsEntity);
+ }
+ db.Commit();
+ return data;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ throw;
+ }
+ }
+
+ public IEnumerable GetDepartments()
+ {
+ try
+ {
+ //var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true);
- public IEnumerable GetLessons(string academicYearNo, string semester)
+ //根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
+ var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "10");
+ if (aa == null)
+ {
+ this.BaseRepository().ExecuteBySql("update LR_Base_Department set SyncFlag='false' ");
+ }
+
+ //数据
+ var db = BaseRepository("CollegeMIS");
+ var dbbase = BaseRepository();
+ db.BeginTrans();
+ var data = db.FindList("select * from " + dbbase.getDbConnection().Database + ".dbo.LR_Base_Department where F_EnabledMark = 1 AND F_DeleteMark = 0 and F_DepartmentId not in (select STableId from ArrangeLessonSync )");
+ DateTime syncdate = DateTime.Now;
+ foreach (var item in data.Select(m => m.F_DepartmentId))
+ {
+ ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity();
+ alsEntity.Create();
+ alsEntity.STypeId = "10";
+ alsEntity.SDate = syncdate;
+ alsEntity.STableId = item;
+ db.Insert(alsEntity);
+ }
+ db.Commit();
+ return data;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ throw;
+ }
+ }
+ public IEnumerable GetLessons()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true);
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
- var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "5");
+ var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "5");
if (aa == null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update LessonInfo set SyncFlag='false' ");
@@ -1449,14 +1519,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
//数据
var db = BaseRepository("CollegeMIS");
db.BeginTrans();
- var data = db.FindList("select * from LessonInfo where CheckMark=1 and LessonId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
+ var data = db.FindList("select * from LessonInfo where CheckMark=1 and LessonId not in (select STableId from ArrangeLessonSync )");
DateTime syncdate = DateTime.Now;
foreach (var item in data.Select(m => m.LessonId))
{
ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity();
alsEntity.Create();
- alsEntity.AcademicYearNo = academicYearNo;
- alsEntity.Semester = semester;
alsEntity.STypeId = "5";
alsEntity.SDate = syncdate;
alsEntity.STableId = item;
@@ -1519,14 +1587,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
}
}
- public IEnumerable GetTeachers(string academicYearNo, string semester)
+ public IEnumerable GetTeachers()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList("select a.*,b.F_Password,b.F_Secretkey from dbo.EmpInfo a left join adms7ultimate2.dbo.LR_Base_User b on a.EmpNo=b.F_EnCode where a.CheckMark=1");
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
- var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "7");
+ var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "7");
if (aa == null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update EmpInfo set SyncFlag='false' ");
@@ -1536,14 +1604,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
var db = BaseRepository("CollegeMIS");
var dbbase = BaseRepository();
db.BeginTrans();
- var data = db.FindList("select a.*,b.F_Password,b.F_Secretkey from dbo.EmpInfo a left join " + dbbase.getDbConnection().Database + ".dbo.LR_Base_User b on a.EmpNo=b.F_EnCode where a.CheckMark=1 and a.ishaslesson=1 and b.F_DeleteMark=0 and a.EmpId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
+ var data = db.FindList("select a.*,b.F_Password,b.F_Secretkey from dbo.EmpInfo a left join " + dbbase.getDbConnection().Database + ".dbo.LR_Base_User b on a.EmpNo=b.F_EnCode where a.CheckMark=1 and a.ishaslesson=1 and b.F_DeleteMark=0 and a.EmpId not in (select STableId from ArrangeLessonSync )");
DateTime syncdate = DateTime.Now;
foreach (var item in data.Select(m => m.EmpId))
{
ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity();
alsEntity.Create();
- alsEntity.AcademicYearNo = academicYearNo;
- alsEntity.Semester = semester;
alsEntity.STypeId = "7";
alsEntity.SDate = syncdate;
alsEntity.STableId = item;
@@ -1579,14 +1645,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
}
}
- public IEnumerable GetClasses(string academicYearNo, string semester)
+ public IEnumerable GetClasses()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList(m => m.CheckMark == true);
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
- var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "4");
+ var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "4");
if (aa == null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update ClassInfo set SyncFlag='false' ");
@@ -1595,14 +1661,12 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
//数据
var db = BaseRepository("CollegeMIS");
db.BeginTrans();
- var data = db.FindList("select * from ClassInfo where CheckMark=1 and ClassId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
+ var data = db.FindList("select * from ClassInfo where CheckMark=1 and ClassId not in (select STableId from ArrangeLessonSync )");
DateTime syncdate = DateTime.Now;
foreach (var item in data.Select(m => m.ClassId))
{
ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity();
alsEntity.Create();
- alsEntity.AcademicYearNo = academicYearNo;
- alsEntity.Semester = semester;
alsEntity.STypeId = "4";
alsEntity.SDate = syncdate;
alsEntity.STableId = item;
@@ -1948,14 +2012,14 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
}
}
- public IEnumerable GetDepts(string academicYearNo, string semester)
+ public IEnumerable GetDepts()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList();
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
- var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "2");
+ var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "2");
if (aa == null)
{
this.BaseRepository("CollegeMIS").ExecuteBySql("update CdDept set SyncFlag='false' ");
@@ -1964,14 +2028,12 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
//数据
var db = BaseRepository("CollegeMIS");
db.BeginTrans();
- var data = db.FindList("select * from CdDept where DeptId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
+ var data = db.FindList("select * from CdDept where DeptId not in (select STableId from ArrangeLessonSync )");
DateTime syncdate = DateTime.Now;
foreach (var item in data.Select(m => m.DeptId))
{
ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity();
alsEntity.Create();
- alsEntity.AcademicYearNo = academicYearNo;
- alsEntity.Semester = semester;
alsEntity.STypeId = "2";
alsEntity.SDate = syncdate;
alsEntity.STableId = item;
@@ -2006,14 +2068,14 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
}
}
- public IEnumerable GetSchools(string academicYearNo, string semester)
+ public IEnumerable GetSchools()
{
try
{
//var data = BaseRepository().FindList();
//根据学年学期判断排课同步数据表中是否有数据:若有,说明该学年学期同步过;若没有,修改基础表,false;
- var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "1");
+ var aa = this.BaseRepository("CollegeMIS").FindEntity(x => x.STypeId == "1");
if (aa == null)
{
this.BaseRepository().ExecuteBySql("update LR_Base_Company set SyncFlag='false' ");
@@ -2022,14 +2084,12 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
//数据
var dbCollegeMIS = BaseRepository("CollegeMIS");
dbCollegeMIS.BeginTrans();
- var data = BaseRepository().FindList("select * from LR_Base_Company where F_CompanyId not in (select STableId from " + dbCollegeMIS.getDbConnection().Database + ".dbo.ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
+ var data = BaseRepository().FindList("select * from LR_Base_Company where F_CompanyId not in (select STableId from " + dbCollegeMIS.getDbConnection().Database + ".dbo.ArrangeLessonSync )");
DateTime syncdate = DateTime.Now;
foreach (var item in data.Select(m => m.F_CompanyId))
{
ArrangeLessonSyncEntity alsEntity = new ArrangeLessonSyncEntity();
alsEntity.Create();
- alsEntity.AcademicYearNo = academicYearNo;
- alsEntity.Semester = semester;
alsEntity.STypeId = "1";
alsEntity.SDate = syncdate;
alsEntity.STableId = item;