Bladeren bron

优化长阳需求 长阳排课课表功能

临城职教中职
ndbs 2 jaren geleden
bovenliggende
commit
ee99fd553b
2 gewijzigde bestanden met toevoegingen van 44 en 52 verwijderingen
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.cshtml
  2. +43
    -51
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.cshtml Bestand weergeven

@@ -9,7 +9,7 @@
<input id="F_FullHead" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" />
</div>
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">下发CMS<font face="宋体">*</font></div>
<div class="lr-form-item-title">下发官网<font face="宋体">*</font></div>
<div id="IsSend" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="OANews">


+ 43
- 51
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ArrangeLessonTerm/ArrangeLessonTermService.cs Bestand weergeven

@@ -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
LessonDate = DateTime.Parse(item.timetext),
AcademicYearNo = item.year,
Semester = item.semester,
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.curriculunNumber)?.LessonSortNo,
ClassroomNo = classroomData.FirstOrDefault(m => m.ClassroomId == item.classRoomSid)?.ClassroomNo,
LessonSortNo = lessonData.FirstOrDefault(m => m.LessonNo == item.curriculunNumber)?.LessonSortNo,
ClassroomNo = classroomData.FirstOrDefault(m => m.ClassroomNo == item.ClassroomNo)?.ClassroomNo,
LessonTime = item.week + item.section,
CheckMark = "1",
F_SchoolId = item.schoolid
F_SchoolId = item.schoolno
};
if (oldArrangeLessonTermList.Count(m => m.AcademicYearNo == insertData.AcademicYearNo && m.Semester == insertData.Semester
&& m.LessonNo == insertData.LessonNo && m.LessonDate == insertData.LessonDate
@@ -765,8 +757,8 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
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 = '"
+ entity.Semester + "'");
+ "' AND semester.number = '"
+ entity.Semester + "'");
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();
@@ -834,28 +826,28 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
try
{
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` ");
@"select m.name AS 'MajorName', m.number AS 'MajorNo', tt.EmpNo AS 'EmpNo',
tt.EmpName AS 'EmpName', sc.name AS 'F_SchoolName', sc.sid 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
+ "' AND sc.sid = '" + entity.F_SchoolId + "' ORDER BY p.`major` ");
var majorData = (await BaseRepository("CollegeMIS").FindListAsync<CdMajorEntity>()).ToList();
var lessonData = (await BaseRepository("CollegeMIS").FindListAsync<LessonInfoEntity>()).ToList();
if (TeachList.Count() > 0)
@@ -888,7 +880,7 @@ WHERE (AcademicYearNo = '" + strAcademicYear + "') and semester='" + strSemest
EndWeek = item.EndWeek,
CheckStyleNo = "1",
ScoreRecordStyleNo = "1",
TeachDeptNo = majorData.FirstOrDefault(m => m.ID == item.MajorNo)?.DeptNo,
TeachDeptNo = majorData.FirstOrDefault(m => m.MajorNo == item.MajorNo)?.DeptNo,
StudyScore = 0,
AmendDate = now,
ClassroomType = 1,
@@ -2673,14 +2665,14 @@ group by AcademicYearNo,Semester,DeptNo,MajorNo,LessonNo,TeachClassNo,EmpNo,Les
public string classname { get; set; }
public string classnumber { get; set; }
public string roomname { get; set; }
public string classRoomSid { get; set; }
public string ClassroomNo { 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; }
public string schoolno { get; set; }
}

#endregion


Laden…
Annuleren
Opslaan