@@ -380,7 +380,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var arrangeLessonTermData = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>(@"select AcademicYearNo,Semester,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,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();
var insertTeachClassDataList = new List<TeachClassEntity>();
var insertTeachClassDataList = new List<TeachClassEntity>();
@@ -661,7 +661,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
}
}
return result;
return result;
}
}
/// <summary>
/// <summary>
/// 按条件同步排课数据
/// 按条件同步排课数据
/// </summary>
/// </summary>
@@ -676,175 +676,70 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
var classroomData = (await BaseRepository("CollegeMIS").FindListAsync<ClassroomInfoEntity>()).ToList();
var classroomData = (await BaseRepository("CollegeMIS").FindListAsync<ClassroomInfoEntity>()).ToList();
if (entity.SyncType == "1")
if (entity.SyncType == "1")
{
{
HttpContent httpContent = new StringContent("{\"school\":\"" + entity.F_SchoolId + "\",\"year\":\"" + entity.AcademicYearNo + "\",\"number\":\"" + entity.Semester + "\"}");
httpContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json");
string apiData = await Client.PostAsync(Config.GetValue("ArrangeLessonAPI"), httpContent).Result.Content.ReadAsStringAsync();
if (!string.IsNullOrEmpty(apiData))
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 + " '");
if (LessonList.Count() > 0)
{
{
var data = JsonConvert.DeserializeObject<RootByCondition>(apiData);
var dataList = data.entity.list;
if (dataList.Any())
var oldArrangeLessonTermList = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>()).ToList( );
var insertDataList = new List<ArrangeLessonTermEntity>() ;
foreach (var item in LessonList )
{
{
var oldArrangeLessonTermList = (await BaseRepository("CollegeMIS").FindListAsync<ArrangeLessonTermEntity>()).ToList();
var insertDataList = new List<ArrangeLessonTermEntity>();
foreach (var item in dataList)
{
var classinfo = classData.FirstOrDefault(m => m.ClassId == item.clazzSid);
var classinfo = classData.FirstOrDefault(m => m.ClassId == item.classnumber);
var timesArr = item.timeText.Substring(0, item.timeText.Length - 1).Split(',');
foreach (var timesItem in timesArr)
{
if (item.section.Contains(","))
{
foreach (var sec in item.section.Split(','))
{
var insertData = new ArrangeLessonTermEntity
{
ALTId = Guid.NewGuid().ToString(),
LessonDate = DateTime.Parse(timesItem),
AcademicYearNo = item.year,
Semester = item.number,
//DeptNo = classinfo?.DeptNo,
MajorNo = classinfo?.MajorNo,
LessonNo = item.curriculunNumber,
LessonName = item.curriculunName,
TeachClassNo = item.curriculunName + classinfo?.ClassNo,
EmpNo = item.teacherNumber,
EmpName = item.teacherName,
LessonSortNo = lessonData.FirstOrDefault(m => m.LessonId == item.curriculunSid)?.LessonSortNo,
ClassroomNo = classroomData.FirstOrDefault(m => m.ClassroomId == item.classRoomSid)?.ClassroomNo,
LessonTime = item.week + sec,
CheckMark = "1",
F_SchoolId = item.schoolSid
};
if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
//&& m.DeptNo == insertData.DeptNo
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0
&& insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
//&& m.DeptNo == insertData.DeptNo
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0)
{
insertDataList.Add(insertData);
}
//if (!oldArrangeLessonTermList.Any(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
// && m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
// //&& m.DeptNo == insertData.DeptNo
// && m.MajorNo == insertData.MajorNo
// && m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
// && m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
// && m.F_SchoolId == insertData.F_SchoolId)
// && !insertDataList.Any(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
// && m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
// //&& m.DeptNo == insertData.DeptNo
// && m.MajorNo == insertData.MajorNo
// && m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
// && m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
// && m.F_SchoolId == insertData.F_SchoolId))
//{
// insertDataList.Add(insertData);
//}
}
}
else
{
var insertData = new ArrangeLessonTermEntity
{
ALTId = Guid.NewGuid().ToString(),
LessonDate = DateTime.Parse(timesItem),
AcademicYearNo = item.year,
Semester = item.number,
//DeptNo = classinfo?.DeptNo,
MajorNo = classinfo?.MajorNo,
LessonNo = item.curriculunNumber,
LessonName = item.curriculunName,
TeachClassNo = item.curriculunName + classinfo?.ClassNo,
EmpNo = item.teacherNumber,
EmpName = item.teacherName,
LessonSortNo = lessonData.FirstOrDefault(m => m.LessonId == item.curriculunSid)?.LessonSortNo,
ClassroomNo = classroomData.FirstOrDefault(m => m.ClassroomId == item.classRoomSid)?.ClassroomNo,
LessonTime = item.week + item.section,
CheckMark = "1",
F_SchoolId = item.schoolSid
};
if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
//&& m.DeptNo == insertData.DeptNo
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0
&& insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
//&& m.DeptNo == insertData.DeptNo
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0)
{
insertDataList.Add(insertData);
}
}
}
var insertData = new ArrangeLessonTermEntity
{
ALTId = Guid.NewGuid().ToString(),
LessonDate = DateTime.Parse(item.timetext),
AcademicYearNo = item.year,
Semester = item.semester,
MajorNo = classinfo?.MajorNo,
LessonNo = item.curriculunNumber,
LessonName = item.curriculunName,
TeachClassNo = item.curriculunName + classinfo?.ClassNo,
EmpNo = item.teacherNumber,
EmpName = item.teachername,
LessonSortNo = lessonData.FirstOrDefault(m => m.LessonId == item.curriculunNumber)?.LessonSortNo,
ClassroomNo = classroomData.FirstOrDefault(m => m.ClassroomId == item.classRoomSid)?.ClassroomNo,
LessonTime = item.week + item.section,
CheckMark = "1",
F_SchoolId = item.schoolid
};
if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0
&& insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
&& m.MajorNo == insertData.MajorNo
&& m.TeachClassNo == insertData.TeachClassNo && m.EmpNo == insertData.EmpNo
&& m.ClassroomNo == insertData.ClassroomNo && m.LessonTime == insertData.LessonTime
&& m.F_SchoolId == insertData.F_SchoolId) == 0)
{
insertDataList.Add(insertData);
}
}
await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
//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]
//where (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + stringSemester + "' and F_SchoolId = '" + stringSchoolId + @"'
//group by F_SchoolId,AcademicYearNo,Semester,DeptNo,majorno,lessonno,replace(teachclassno,lessonname,'') ,empno ")).ToList();
// var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
//FROM TeachClass
//WHERE (AcademicYearNo = '" + stringAcademicYear + "') and semester='" + stringSemester + "' and F_SchoolId='" + stringSchoolId + "' ")).ToList();
// var insertTeachClassDataList = new List<TeachClassEntity>();
// if (arrangeLessonTermData.Any())
// {
// foreach (var altitem in arrangeLessonTermData)
// {
// var insertTeachClassData = new TeachClassEntity()
// {
// AcademicYearNo = altitem.AcademicYearNo,
// Semester = altitem.Semester,
// DeptNo = altitem.DeptNo,
// MajorNo = altitem.MajorNo,
// LessonNo = altitem.LessonNo,
// Grade = classData.FirstOrDefault(m => m.ClassNo == altitem.TeachClassNo)?.Grade,
// LessonSortNo ="1",
// TeachClassNo = altitem.TeachClassNo,
// EmpNo = altitem.EmpNo,
// F_SchoolId = altitem.F_SchoolId
// };
// //非空判断
// if (TeachClassData.Count(m => m.AcademicYearNo == insertTeachClassData.AcademicYearNo &&
// m.Semester == insertTeachClassData.Semester && m.DeptNo == insertTeachClassData.DeptNo &&
// m.MajorNo == insertTeachClassData.MajorNo && m.LessonNo == insertTeachClassData.LessonNo &&
// m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo &&
// m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo &&
// m.F_SchoolId == insertTeachClassData.F_SchoolId) == 0
// && insertTeachClassDataList.Count(m => m.AcademicYearNo == insertTeachClassData.AcademicYearNo &&
// m.Semester == insertTeachClassData.Semester && m.DeptNo == insertTeachClassData.DeptNo &&
// m.MajorNo == insertTeachClassData.MajorNo && m.LessonNo == insertTeachClassData.LessonNo &&
// m.Grade == insertTeachClassData.Grade && m.LessonSortNo == insertTeachClassData.LessonSortNo &&
// m.TeachClassNo == insertTeachClassData.TeachClassNo && m.EmpNo == insertTeachClassData.EmpNo &&
// m.F_SchoolId == insertTeachClassData.F_SchoolId) == 0)
// {
// insertTeachClassDataList.Add(insertTeachClassData);
// }
// }
// await BaseRepository("CollegeMIS").InsertAsync(insertTeachClassDataList);
// }
}
}
await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
}
}
}
}
else
else
@@ -869,8 +764,8 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
LEFT JOIN tb_curriculum curriculum ON curriculum.id = a.curriculum
LEFT JOIN tb_curriculum curriculum ON curriculum.id = a.curriculum
LEFT JOIN tb_classroom room ON room.id = a.classroom
LEFT JOIN tb_classroom room ON room.id = a.classroom
LEFT JOIN tb_teacher teacher ON teacher.id = a.teacher
LEFT JOIN tb_teacher teacher ON teacher.id = a.teacher
WHERE semester.year = '" + entity.AcademicYearNo
+ "' AND semester.number = '"
WHERE semester.year = '" + entity.AcademicYearNo
+ "' AND semester.number = '"
+ entity.Semester + "'");
+ entity.Semester + "'");
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
FROM TeachClass
FROM TeachClass
@@ -938,41 +833,62 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
{
{
try
try
{
{
HttpContent httpContent = new StringContent("{\"school\":\"" + entity.F_SchoolId + "\",\"year\":\"" + entity.AcademicYearNo + "\",\"number\":\"" + entity.Semester + "\"}");
httpContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json");
string apiData = await Client.PostAsync(Config.GetValue("OpenLessonPlanAPI"), httpContent).Result.Content.ReadAsStringAsync();
var TeachList = BaseRepository("paikeDbString").FindList<TeachClassEntity>(
@"select m.name AS 'MajorName', m.number AS 'MajorNo', tt.EmpNo AS 'EmpNo',
tt.EmpName AS 'EmpName', sc.name AS 'F_SchoolName', sc.id AS 'F_SchoolId',
p.grade AS 'Grade', p.classhour AS 'classhour', curr.name AS 'LessonName', curr.number AS 'LessonNo',
s.year AS 'AcademicYearNo', s.number AS 'Semester' FROM tb_major_plan p
LEFT JOIN (
SELECT
t.teacher,
GROUP_CONCAT(DISTINCT c.`name`) AS 'EmpName',
GROUP_CONCAT(DISTINCT c.number) AS 'EmpNo'
FROM
tb_major_plan t
LEFT JOIN tb_teacher c ON FIND_IN_SET(c.id, t.teacher) > 0
GROUP BY
t.teacher
) tt ON tt.teacher = p.teacher
LEFT JOIN tb_semester s ON s.id=p.`semester`
LEFT JOIN tb_school sc ON sc.`id`= p.`school`
LEFT JOIN tb_major m ON m.id=p.major
LEFT JOIN tb_course cour ON cour.id= p.`course`
LEFT JOIN tb_curriculum curr ON curr.id=cour.`course`
WHERE s.year = '" + entity.AcademicYearNo + "' AND s.number = '"
+ entity.Semester + "' ORDER BY p.`major` "); // AND semester.number = '"+ entity.F_SchoolId + "' ORDER BY p.`major` ");
var majorData = (await BaseRepository("CollegeMIS").FindListAsync<CdMajorEntity>()).ToList();
var majorData = (await BaseRepository("CollegeMIS").FindListAsync<CdMajorEntity>()).ToList();
var lessonData = (await BaseRepository("CollegeMIS").FindListAsync<LessonInfoEntity>()).ToList();
var lessonData = (await BaseRepository("CollegeMIS").FindListAsync<LessonInfoEntity>()).ToList();
if (!string.IsNullOrEmpty(apiData))
if (TeachList.Count() > 0 )
{
{
var data = JsonConvert.DeserializeObject<RootOfPlanByCondition>(apiData);
var dataList = data.entity.list;
var openLessonPlanData = await BaseRepository("CollegeMIS").FindListAsync<OpenLessonPlanEntity>();
var openLessonPlanData = await BaseRepository("CollegeMIS").FindListAsync<OpenLessonPlanEntity>();
if (dataList.Any())
var now = DateTime.Now;
var insertDataList = new List<OpenLessonPlanEntity>();
foreach (var item in TeachList)
{
{
var insertDataList = new List<OpenLessonPlanEntity>();
var now = DateTime.Now;
foreach (var item in dataList)
foreach (var itemTeach in item.EmpNo.Split(','))
{
{
var insertData = new OpenLessonPlanEntity()
var insertData = new OpenLessonPlanEntity()
{
{
TeachNo = itemTeach,
MakeDate = now,
MakeDate = now,
AcademicYearNo = item.semester.year,
Semester = item.semester.number,
AcademicYearNo = item.AcademicYearNo ,
Semester = item.Semest er,
//DeptNo = majorData.FirstOrDefault(m => m.ID == item.major.sid)?.DeptNo,
//DeptNo = majorData.FirstOrDefault(m => m.ID == item.major.sid)?.DeptNo,
MajorNo = item.major.number ,
LessonNo = item.course.course.number ,
LessonName = item.course.course.n ame,
MajorNo = item.MajorNo ,
LessonNo = item.LessonNo ,
LessonName = item.LessonN ame,
PartCode = "",
PartCode = "",
Grade = item.grade,
LessonSortNo = lessonData.FirstOrDefault(m => m.LessonNo == item.course.course.number)?.LessonSortNo,
LessonSortDetailNo = lessonData.FirstOrDefault(m => m.LessonNo == item.course.course.number)?.LessonSortDetailNo,
StartWeek = item.semester.yesNo,
EndWeek = item.semester.week,
Grade = item.Grade,
LessonSortNo = lessonData.FirstOrDefault(m => m.LessonNo == item.LessonSortNo)
?.LessonSortNo,
LessonSortDetailNo = lessonData
.FirstOrDefault(m => m.LessonNo == item.LessonSortDetailNo)?.LessonSortDetailNo,
StartWeek = item.StartWeek,
EndWeek = item.EndWeek,
CheckStyleNo = "1",
CheckStyleNo = "1",
ScoreRecordStyleNo = "1",
ScoreRecordStyleNo = "1",
// TeachDeptNo = majorData.FirstOrDefault(m => m.ID == item.major.sid )?.DeptNo,
TeachDeptNo = majorData.FirstOrDefault(m => m.ID == item.MajorNo )?.DeptNo,
StudyScore = 0,
StudyScore = 0,
AmendDate = now,
AmendDate = now,
ClassroomType = 1,
ClassroomType = 1,
@@ -980,36 +896,36 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
CheckMarkDept = "1",
CheckMarkDept = "1",
CheckMark = "1",
CheckMark = "1",
TestMark = 0,
TestMark = 0,
F_SchoolId = item.school.si d
F_SchoolId = item.F_SchoolI d
};
};
if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
if (openLessonPlanData.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester &&
m.Semester == insertData.Semester &&
//m.DeptNo == insertData.DeptNo &&
m.MajorNo == insertData.MajorNo &&
m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo &&
m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade &&
m.Grade == insertData.Grade &&
m.LessonSortNo == insertData.LessonSortNo &&
m.LessonSortNo == insertData.LessonSortNo &&
m.LessonName == insertData.LessonName &&
m.LessonName == insertData.LessonName &&
m.F_SchoolId == insertData.F_SchoolId) == 0 && insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester &&
//m.DeptNo == insertData.DeptNo &&
m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade &&
m.LessonSortNo == insertData.LessonSortNo &&
m.LessonName == insertData.LessonName &&
m.F_SchoolId == insertData.F_SchoolId) == 0)
m.F_SchoolId == insertData.F_SchoolId) == 0 &&
insertDataList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo &&
m.Semester == insertData.Semester &&
m.MajorNo == insertData.MajorNo &&
m.LessonNo == insertData.LessonNo &&
m.Grade == insertData.Grade &&
m.LessonSortNo == insertData.LessonSortNo &&
m.LessonName == insertData.LessonName &&
m.F_SchoolId == insertData.F_SchoolId) == 0)
{
{
insertDataList.Add(insertData);
insertDataList.Add(insertData);
}
}
}
}
await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
}
}
await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
}
}
#region MyRegion
//学生选课数据
//学生选课数据
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
FROM TeachClass
WHERE (AcademicYearNo = '" + entity.AcademicYearNo + "') and semester='" + entity.Semester + "' and F_SchoolId='" + entity.F_SchoolId + "' ")).ToList();
FROM TeachClass
WHERE (AcademicYearNo = '" + entity.AcademicYearNo + "') and semester='" + entity.Semester + "' and F_SchoolId='" + entity.F_SchoolId + "' ")).ToList();
var stuinfobasicData = (await BaseRepository("CollegeMIS").FindListAsync<StuInfoBasicEntity>()).ToList();
var stuinfobasicData = (await BaseRepository("CollegeMIS").FindListAsync<StuInfoBasicEntity>()).ToList();
var stuSelectLessonListEntityData = (await BaseRepository("CollegeMIS").FindListAsync<StuSelectLessonListEntity>()).ToList();
var stuSelectLessonListEntityData = (await BaseRepository("CollegeMIS").FindListAsync<StuSelectLessonListEntity>()).ToList();
var insertStuSelectLessonListDataList = new List<StuSelectLessonListEntity>();
var insertStuSelectLessonListDataList = new List<StuSelectLessonListEntity>();
@@ -1081,6 +997,7 @@ WHERE (AcademicYearNo = '" + entity.AcademicYearNo + "') and semester='" + ent
}
}
await BaseRepository("CollegeMIS").InsertAsync(insertStuSelectLessonListDataList);
await BaseRepository("CollegeMIS").InsertAsync(insertStuSelectLessonListDataList);
}
}
#endregion
}
}
catch (Exception ex)
catch (Exception ex)
{
{
@@ -2465,7 +2382,7 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
public string message { get; set; }
public string message { get; set; }
/// <summary>
/// <summary>
/// List
/// List
/// </summary>
/// </summary>ListByCondition
public List<ListByCondition> list { get; set; }
public List<ListByCondition> list { get; set; }
}
}
public class ListByCondition
public class ListByCondition
@@ -2748,6 +2665,23 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
}
}
public class paikeList
{
public string week { get; set; }
public string section { get; set; }
public string timetext { get; set; }
public string classname { get; set; }
public string classnumber { get; set; }
public string roomname { get; set; }
public string classRoomSid { get; set; }
public string teachername { get; set; }
public string teacherNumber { get; set; }
public string curriculunName { get; set; }
public string curriculunNumber { get; set; }
public string year { get; set; }
public string semester { get; set; }
public string schoolid { get; set; }
}
#endregion
#endregion