var insertResult = await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
var insertResult = await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
//TeachClass数据处理
//TeachClass数据处理
var arrangeLessonTermData = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>(@"select AcademicYearNo,Semester,DeptNo,majorno,lessonno,replace(teachclassno,lessonname,'') as teachclassno,empno from [dbo].[ArrangeLessonTerm]
var arrangeLessonTermData = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>(@"select AcademicYearNo,Semester,majorno,lessonno,replace(teachclassno,lessonname,'') as teachclassno,empno from [dbo].[ArrangeLessonTerm]
where (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemester + @"'
where (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemester + @"'
group by AcademicYearNo,Semester,DeptNo,majorno,lessonno,replace(teachclassno,lessonname,'') ,empno ")).ToList();
group by AcademicYearNo,Semester,majorno,lessonno,replace(teachclassno,lessonname,'') ,empno ")).ToList();
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
FROM TeachClass
FROM TeachClass
WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemester + "' ")).ToList();
WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemester + "' ")).ToList();
@@ -390,7 +387,6 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
@@ -798,9 +767,9 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
var insertResult = await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
var insertResult = await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
//TeachClass数据处理
//TeachClass数据处理
var arrangeLessonTermData = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>(@"select F_SchoolId,AcademicYearNo,Semester,DeptNo,majorno,lessonno,replace(teachclassno,lessonname,'') as teachclassno,empno from [dbo].[ArrangeLessonTerm]
var arrangeLessonTermData = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>(@"select F_SchoolId,AcademicYearNo,Semester,majorno,lessonno,replace(teachclassno,lessonname,'') as teachclassno,empno from [dbo].[ArrangeLessonTerm]
where (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + stringSemester + "' and F_SchoolId = '" + stringSchoolId + @"'
where (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + stringSemester + "' and F_SchoolId = '" + stringSchoolId + @"'
group by F_SchoolId,AcademicYearNo,Semester,DeptNo,majorno,lessonno,replace(teachclassno,lessonname,'') ,empno ")).ToList();
group by F_SchoolId,AcademicYearNo,Semester,majorno,lessonno,replace(teachclassno,lessonname,'') ,empno ")).ToList();
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
FROM TeachClass
FROM TeachClass
WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + stringSemester + "' and F_SchoolId='" + stringSchoolId + "' ")).ToList();
WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + stringSemester + "' and F_SchoolId='" + stringSchoolId + "' ")).ToList();
@@ -813,7 +782,6 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
@@ -1479,7 +1437,7 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
{
{
try
try
{
{
//var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.DeptNo,a.MajorNo,a.Grade,a.ClassNo,a.StuName,a.GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
//var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.MajorNo,a.Grade,a.ClassNo,a.StuName,a.GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "8");
var aa = this.BaseRepository("CollegeMIS").FindEntity<ArrangeLessonSyncEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester && x.STypeId == "8");
@@ -1519,7 +1477,7 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
{
{
try
try
{
{
//var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.DeptNo,a.MajorNo,a.Grade,a.ClassNo,a.StuName,a.GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
//var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.MajorNo,a.Grade,a.ClassNo,a.StuName,a.GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
//数据
//数据
var db = BaseRepository("CollegeMIS");
var db = BaseRepository("CollegeMIS");
@@ -1540,7 +1498,7 @@ WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + string
{
{
try
try
{
{
var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.DeptNo,a.MajorNo,a.Grade,a.ClassNo,
var data = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(@"select a.StuId,a.StuNo,a.MajorNo,a.Grade,a.ClassNo,
a.StuName,GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from
a.StuName,GenderNo,a.Birthday,b.F_Password,b.F_Secretkey from
dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_EnCode where a.CheckMark='1'");
return data;
return data;
@@ -1556,8 +1514,8 @@ dbo.StuInfoBasic a left join adms7ultimate2.dbo.LR_Base_User b on a.StuNo=b.F_E
{
{
try
try
{
{
var data = BaseRepository("CollegeMIS").FindList<TeachClassEntity>(@"select AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,LessonSortNo from TeachClass
group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,LessonSortNo");
var data = BaseRepository("CollegeMIS").FindList<TeachClassEntity>(@"select AcademicYearNo,Semester,MajorNo,LessonNo,TeachClassNo,EmpNo,LessonSortNo from TeachClass
group by AcademicYearNo,Semester,MajorNo,LessonNo,TeachClassNo,EmpNo,LessonSortNo");
return data;
return data;
}
}
catch (Exception e)
catch (Exception e)
@@ -1581,7 +1539,7 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
var semesterAndYear = Common.GetSemesterAndYear(startDate);
var semesterAndYear = Common.GetSemesterAndYear(startDate);
var strAcademicYear = semesterAndYear.AcademicYearShort;
var strAcademicYear = semesterAndYear.AcademicYearShort;
var strSemester = semesterAndYear.Semester;
var strSemester = semesterAndYear.Semester;
string sql = @"select b.F_SchoolId,b.DeptNo,b.MajorNo,b.AcademicYearNo as AcademicYear,b.LessonNo,b.LessonName,b.LessonTime,b.LessonDate,b.EmpNo,b.Empname EmpName,replace (b.TeachClassNo,b.LessonName,'') TeachClassNo, c.ClassroomName,b.Semester,b.ClassroomNo as ClassRoomNo,b.LessonSortNo,d.ClassName
string sql = @"select b.F_SchoolId,b.MajorNo,b.AcademicYearNo as AcademicYear,b.LessonNo,b.LessonName,b.LessonTime,b.LessonDate,b.EmpNo,b.Empname EmpName,replace (b.TeachClassNo,b.LessonName,'') TeachClassNo, c.ClassroomName,b.Semester,b.ClassroomNo as ClassRoomNo,b.LessonSortNo,d.ClassName
from ArrangeLessonTerm b
from ArrangeLessonTerm b
left join ClassroomInfo c on c.ClassroomNo=b.classroomNo
left join ClassroomInfo c on c.ClassroomNo=b.classroomNo
left join ClassInfo d on replace(b.TeachClassNo,b.LessonName,'')=d.ClassNo
left join ClassInfo d on replace(b.TeachClassNo,b.LessonName,'')=d.ClassNo
@@ -1946,7 +1904,7 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
{
{
try
try
{
{
return this.BaseRepository("CollegeMIS").FindList<TimeTable>(@"select b.F_SchoolId,b.DeptNo,b.MajorNo,b.AcademicYearNo as AcademicYear,b.Semester,b.LessonNo,
return this.BaseRepository("CollegeMIS").FindList<TimeTable>(@"select b.F_SchoolId,b.MajorNo,b.AcademicYearNo as AcademicYear,b.Semester,b.LessonNo,
left join ArrangeLessonTermOfElective a on t.AcademicYearNo=a.AcademicYearNo and t.Semester=a.Semester and t.LessonNo=a.LessonNo and t.EmpNo=a.EmpNo and t.ClassRoomNo=a.ClassRoomNo
left join ArrangeLessonTermOfElective a on t.AcademicYearNo=a.AcademicYearNo and t.Semester=a.Semester and t.LessonNo=a.LessonNo and t.EmpNo=a.EmpNo and t.ClassRoomNo=a.ClassRoomNo
@@ -322,8 +322,8 @@ and t.Status=2");
var queryParam = queryJson.ToJObject();
var queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { });
var dp = new DynamicParameters(new { });
var strSql = new StringBuilder();
var strSql = new StringBuilder();
strSql.Append(@"select s.AcademicYearNo,s.Semester,s.DeptNo,s.MajorNo,s.ClassNo,s.LessonNo,s.EmpNo,s.LessonSortNo,s.StuNo,s.StuName,a.AttendOrNo,a.Sort from StuSelectLessonList s
left join StuAttendance a on s.AcademicYearNo = a.AcademicYearNo and s.Semester = a.Semester and s.DeptNo = a.DeptNo and s.MajorNo = a.MajorNo and s.ClassNo = a.ClassNo and s.LessonNo = a.LessonNo and s.EmpNo = a.EmpNo and s.LessonSortNo = a.LessonSortNo and s.StuNo = a.StuNo
strSql.Append(@"select s.AcademicYearNo,s.Semester,s.MajorNo,s.ClassNo,s.LessonNo,s.EmpNo,s.LessonSortNo,s.StuNo,s.StuName,a.AttendOrNo,a.Sort from StuSelectLessonList s
left join StuAttendance a on s.AcademicYearNo = a.AcademicYearNo and s.Semester = a.Semester and s.MajorNo = a.MajorNo and s.ClassNo = a.ClassNo and s.LessonNo = a.LessonNo and s.EmpNo = a.EmpNo and s.LessonSortNo = a.LessonSortNo and s.StuNo = a.StuNo
strSql.Append(@"select s.AcademicYearNo,s.Semester,s.DeptNo,s.MajorNo,s.ClassNo,s.LessonNo,s.EmpNo,s.LessonSortNo,s.StuNo,s.StuName,a.AttendOrNo,a.Sort from StuSelectLessonListOfElective s
left join StuAttendance a on s.AcademicYearNo=a.AcademicYearNo and s.Semester=a.Semester and s.DeptNo=a.DeptNo and s.MajorNo=a.MajorNo and s.ClassNo=a.ClassNo and s.LessonNo=a.LessonNo and s.EmpNo=a.EmpNo and s.LessonSortNo=a.LessonSortNo and s.ClassRoomNo=a.ClassRoomNo and a.LessonTime in (s.LessonSection) and s.StuNo=a.StuNo and s.Status=2
strSql.Append(@"select s.AcademicYearNo,s.Semester,s.MajorNo,s.ClassNo,s.LessonNo,s.EmpNo,s.LessonSortNo,s.StuNo,s.StuName,a.AttendOrNo,a.Sort from StuSelectLessonListOfElective s
left join StuAttendance a on s.AcademicYearNo=a.AcademicYearNo and s.Semester=a.Semester and s.MajorNo=a.MajorNo and s.ClassNo=a.ClassNo and s.LessonNo=a.LessonNo and s.EmpNo=a.EmpNo and s.LessonSortNo=a.LessonSortNo and s.ClassRoomNo=a.ClassRoomNo and a.LessonTime in (s.LessonSection) and s.StuNo=a.StuNo and s.Status=2