Преглед на файлове

优化排课计划 获取专业开课计划

临城职教中职
ndbs преди 2 години
родител
ревизия
cc10b526c9
променени са 4 файла, в които са добавени 155 реда и са изтрити 212 реда
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config
  2. +139
    -205
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs
  3. +12
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs
  4. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config Целия файл

@@ -20,8 +20,8 @@
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_西昌;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />-->

<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_金隅;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_金隅;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_长阳;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_长阳;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="paikeDbString" connectionString="Data Source=139.196.217.128;Database=cypaike;User ID=root;Password=123456;" providerName="MySql.Data.MySqlClient" /><!--金隅-->
<!--<add name="BaseDb" connectionString="Server=192.168.100.224;Initial Catalog=adms7ultimate2;User ID=sa;Password=Jykj@2019" providerName="System.Data.SqlClient" />


+ 139
- 205
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs Целия файл

@@ -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]
where (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemester + @"'
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
WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemester + "' ")).ToList();
var insertTeachClassDataList = new List<TeachClassEntity>();
@@ -661,7 +661,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
}
return result;
}
/// <summary>
/// 按条件同步排课数据
/// </summary>
@@ -676,175 +676,70 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
var classroomData = (await BaseRepository("CollegeMIS").FindListAsync<ClassroomInfoEntity>()).ToList();
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
@@ -869,8 +764,8 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
LEFT JOIN tb_curriculum curriculum ON curriculum.id = a.curriculum
LEFT JOIN tb_classroom room ON room.id = a.classroom
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 + "'");
var TeachClassData = (await BaseRepository("CollegeMIS").FindListAsync<TeachClassEntity>(@"SELECT *
FROM TeachClass
@@ -938,41 +833,62 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
{
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 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>();
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()
{
TeachNo = itemTeach,
MakeDate = now,
AcademicYearNo = item.semester.year,
Semester = item.semester.number,
AcademicYearNo = item.AcademicYearNo,
Semester = item.Semester,
//DeptNo = majorData.FirstOrDefault(m => m.ID == item.major.sid)?.DeptNo,
MajorNo = item.major.number,
LessonNo = item.course.course.number,
LessonName = item.course.course.name,
MajorNo = item.MajorNo,
LessonNo = item.LessonNo,
LessonName = item.LessonName,
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",
ScoreRecordStyleNo = "1",
//TeachDeptNo = majorData.FirstOrDefault(m => m.ID == item.major.sid)?.DeptNo,
TeachDeptNo = majorData.FirstOrDefault(m => m.ID == item.MajorNo)?.DeptNo,
StudyScore = 0,
AmendDate = now,
ClassroomType = 1,
@@ -980,36 +896,36 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
CheckMarkDept = "1",
CheckMark = "1",
TestMark = 0,
F_SchoolId = item.school.sid
F_SchoolId = item.F_SchoolId
};
if (openLessonPlanData.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 && 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);
}
}
await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
}
await BaseRepository("CollegeMIS").InsertAsync(insertDataList);
}
#region MyRegion
//学生选课数据
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 stuSelectLessonListEntityData = (await BaseRepository("CollegeMIS").FindListAsync<StuSelectLessonListEntity>()).ToList();
var insertStuSelectLessonListDataList = new List<StuSelectLessonListEntity>();
@@ -1081,6 +997,7 @@ WHERE (AcademicYearNo = '" + entity.AcademicYearNo + "') and semester='" + ent
}
await BaseRepository("CollegeMIS").InsertAsync(insertStuSelectLessonListDataList);
}
#endregion
}
catch (Exception ex)
{
@@ -2465,7 +2382,7 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
public string message { get; set; }
/// <summary>
/// List
/// </summary>
/// </summary>ListByCondition
public List<ListByCondition> list { get; set; }
}
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



+ 12
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassEntity.cs Целия файл

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 日 期:2019-03-27 14:50
/// 描 述:教学班级表
/// </summary>
public class TeachClassEntity
public class TeachClassEntity
{
#region 实体成员
/// <summary>
@@ -99,7 +99,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <returns></returns>
[Column("RELATEDCLASSNO")]
public string RelatedClassNo { get; set; }
/// <summary>
/// LessonSortNo
/// </summary>
@@ -107,11 +107,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("LESSONSORTNO")]
public string LessonSortNo { get; set; }
/// <summary>
/// 学校主键
/// 学校主键Week
/// </summary>
/// <returns></returns>
[Column("F_SCHOOLID")]
public string F_SchoolId { get; set; }
[NotMapped]
public int? StartWeek { get; set; }
[NotMapped]
public int? EndWeek { get; set; }
[NotMapped]
public string LessonName { get; set; }
[NotMapped]
public string LessonSortDetailNo { get; set; }

#endregion

#region 扩展操作


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Целия файл

@@ -111,6 +111,7 @@
<Compile Include="EducationalAdministration\ArrangeLessonTermAttemper\ArrangeLessonTermAttemperEntity.cs" />
<Compile Include="EducationalAdministration\ArrangeLessonTermAttemper\ArrangeLessonTermAttemperIBLL.cs" />
<Compile Include="EducationalAdministration\ArrangeLessonTermAttemper\ArrangeLessonTermAttemperService.cs" />
<Compile Include="EducationalAdministration\ArrangeLessonTerm\ArrangeLessonTermEntity.cs" />
<Compile Include="EducationalAdministration\AwardAndPunishment\AwardAndPunishmentBLL.cs" />
<Compile Include="EducationalAdministration\AwardAndPunishment\AwardAndPunishmentEntity.cs" />
<Compile Include="EducationalAdministration\AwardAndPunishment\AwardAndPunishmentIBLL.cs" />
@@ -542,7 +543,6 @@
<Compile Include="EducationalAdministration\DIC_AREA\DIC_AREAService.cs" />
<Compile Include="EducationalAdministration\DIC_AREA\DIC_AREABLL.cs" />
<Compile Include="EducationalAdministration\DIC_AREA\DIC_AREAIBLL.cs" />
<Compile Include="EducationalAdministration\ArrangeLessonTerm\ArrangeLessonTermEntity.cs" />
<Compile Include="EducationalAdministration\ArrangeLessonTerm\ArrangeLessonTermService.cs" />
<Compile Include="EducationalAdministration\ArrangeLessonTerm\ArrangeLessonTermIBLL.cs" />
<Compile Include="EducationalAdministration\ArrangeLessonTerm\ArrangeLessonTermBLL.cs" />
@@ -1834,11 +1834,11 @@
<Analyzer Include="..\..\..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\cs\Microsoft.DependencyValidation.Analyzers.resources.dll" />
<Analyzer Include="..\..\..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\Microsoft.DependencyValidation.Analyzers.dll" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="EducationalAdministration\ClassPlanTeach\" />
</ItemGroup>
<ItemGroup />
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">


Зареждане…
Отказ
Запис