Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs파일 보기
@@ -677,33 +677,24 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
if (entity.SyncType == "1")
{
var LessonList = BaseRepository("paikeDbString").FindList<paikeList>(
@"SELECT a.week AS 'week',
a.section AS 'section',
a.timetext AS 'timetext',
c.name AS 'classname',
c.number AS 'classnumber',
r.name AS 'roomname',
r.number AS 'classRoomSid',
t.name AS 'teachername',
t.number AS 'teacherNumber',
cu.name AS 'curriculunName',
cu.number AS 'curriculunNumber',
s.year AS 'year',
s.number AS 'semester'
FROM tb_paike a
LEFT JOIN tb_clazz c ON c.id= a.`clazzid`
LEFT JOIN tb_classroom r ON r.id =a.`classroomid`
LEFT JOIN tb_teacher t ON t.id =a.`teacherid`
LEFT JOIN tb_curriculum cu ON cu.id=a.`curriculunid`
LEFT JOIN tb_semester s ON s.id=a.`semester`
WHERE 1=1 AND s.year = '" + entity.AcademicYearNo + "' AND s.number ='" + entity.Semester + "'"); //AND a.school='" + entity.F_SchoolId + " '");
@"SELECT a.week AS 'week', a.section AS 'section',a.timetext AS 'timetext',c.name AS 'classname',c.number AS 'classnumber',
r.name AS 'roomname',r.number AS 'ClassroomNo',t.name AS 'teachername',t.number AS 'teacherNumber', cu.name AS 'curriculunName',
cu.number AS 'curriculunNumber', s.year AS 'year', s.number AS 'semester', sc.name AS 'schoolname', sc.sid AS 'schoolno'
FROM tb_paike a
LEFT JOIN tb_clazz c ON c.id= a.`clazzid`
LEFT JOIN tb_classroom r ON r.id =a.`classroomid`
LEFT JOIN tb_teacher t ON t.id =a.`teacherid`
LEFT JOIN tb_curriculum cu ON cu.id=a.`curriculunid`
LEFT JOIN tb_semester s ON s.id=a.`semester`
LEFT JOIN tb_school sc ON sc.`id`= a.`school`
WHERE 1=1 AND s.year = '" + entity.AcademicYearNo + "' AND s.number ='" + entity.Semester + "'AND sc.sid = '" + entity.F_SchoolId + " '");
if (LessonList.Count() > 0)
{
var oldArrangeLessonTermList = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>()).ToList();
var insertDataList = new List<ArrangeLessonTermEntity>();
foreach (var item in LessonList)
{
var classinfo = classData.FirstOrDefault(m => m.ClassId == item.classnumber);
var classinfo = classData.FirstOrDefault(m => m.ClassNo == item.classnumber);
var insertData = new ArrangeLessonTermEntity
{
@@ -711,17 +702,18 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest