var result = arrangeLessonTermIBLL.GetClasses(AcademicYearNo, Semester);
var result = arrangeLessonTermIBLL.GetClasses();
return Success(result);
}
public Response GetClassesNotRecord(dynamic _)
+ 1- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonSync/ArrangeLessonSyncEntity.csZobrazit soubor
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermBLL.csZobrazit soubor
public IEnumerable<ClassInfoEntity> GetClasses(string academicYearNo, string semester)
public IEnumerable<ClassInfoEntity> GetClasses()
{
var data = arrangeLessonTermService.GetClasses(academicYearNo, semester);
var data = arrangeLessonTermService.GetClasses();
return data;
}
public IEnumerable<ClassInfoEntity> GetClassesNotRecord(string academicYearNo, string semester)
+ 10- 7
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermIBLL.csZobrazit soubor
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.csZobrazit soubor
@@ -1303,14 +1303,14 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
}
}
}
public IEnumerable<CdMajorEntity> GetMajors(string academicYearNo, string semester)
public IEnumerable<CdMajorEntity> GetMajors()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList<CdMajorEntity>(m => m.CheckMark == true);
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "3");
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<CdMajorEntity>("select * from CdMajor where CheckMark=1 and ID not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
var data = db.FindList<CdMajorEntity>("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<ClassroomInfoEntity> GetClassrooms(string academicYearNo, string semester)
public IEnumerable<ClassroomInfoEntity> GetClassrooms()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList<ClassroomInfoEntity>(m => m.CheckMark == true);
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "6");
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<ClassroomInfoEntity>("select * from ClassroomInfo where CheckMark=1 and ClassroomId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
var data = db.FindList<ClassroomInfoEntity>("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<CdClassTypeEntity> GetClassroomType()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList<LessonInfoEntity>(m => m.CheckMark == true);
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<DepartmentEntity>("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<LessonInfoEntity> GetLessons()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList<LessonInfoEntity>(m => m.CheckMark == true);
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "5");
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<LessonInfoEntity>("select * from LessonInfo where CheckMark=1 and LessonId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
var data = db.FindList<LessonInfoEntity>("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<EmpInfoEntity> GetTeachers(string academicYearNo, string semester)
public IEnumerable<EmpInfoEntity> GetTeachers()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList<EmpInfoEntity>("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");
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "7");
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<EmpInfoEntity>("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<EmpInfoEntity>("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<ClassInfoEntity> GetClasses(string academicYearNo, string semester)
public IEnumerable<ClassInfoEntity> GetClasses()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(m => m.CheckMark == true);
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "4");
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<ClassInfoEntity>("select * from ClassInfo where CheckMark=1 and ClassId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
var data = db.FindList<ClassInfoEntity>("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<CdDeptEntity> GetDepts(string academicYearNo, string semester)
public IEnumerable<CdDeptEntity> GetDepts()
{
try
{
//var data = BaseRepository("CollegeMIS").FindList<CdDeptEntity>();
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "2");
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<CdDeptEntity>("select * from CdDept where DeptId not in (select STableId from ArrangeLessonSync where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "' )");
var data = db.FindList<CdDeptEntity>("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<CompanyEntity> GetSchools(string academicYearNo, string semester)
public IEnumerable<CompanyEntity> GetSchools()
{
try
{
//var data = BaseRepository().FindList<CompanyEntity>();
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "1");
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(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<CompanyEntity>("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<CompanyEntity>("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();