瀏覽代碼

专业开课计划

临城职教中职
ndbs 2 年之前
父節點
當前提交
b5c3ea4ee4
共有 3 個檔案被更改,包括 56 行新增40 行删除
  1. +19
    -15
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs
  2. +15
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs
  3. +22
    -12
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs

+ 19
- 15
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs 查看文件

@@ -118,6 +118,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}
entity.State = 0;
entity.IsAllowEdit = true;
entity.LessonSortNo = "1";
entity.CheckMark = "1";
entity.MakeDate = DateTime.Now;
var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.MajorNo, entity.Grade, entity.LessonNo);
if (model != null)
@@ -144,27 +146,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult CourseArranging(string keyValue)
{
var entity = classPlanIBLL.GetListById(keyValue);

List<TeachClassEntity> TeachList = new List<TeachClassEntity>();

for (int i = 0; i < entity.Count; i++)
{
var lessonList = classInfoIBLL.GetAllClass().
var classList = classInfoIBLL.GetAllClass().
Where(x => x.MajorNo == entity[i].MajorNo && x.Grade == entity[i].Grade)
.OrderBy(x => x.ClassNo).Select(x => x.ClassNo).ToList();
if (lessonList.Count > 0)
.OrderBy(x => x.ClassNo).Select(stringClass => new { stringClass.ClassNo, stringClass.ClassName }).ToList();
if (classList.Count > 0)
{
for (int j = 0; j < lessonList.Count; j++)
for (int j = 0; j < classList.Count; j++)
{
TeachClassEntity TeachEntity = new TeachClassEntity();
TeachEntity.TeachClassNo = lessonList[j];
TeachEntity.AcademicYearNo = entity[i].AcademicYearNo;
TeachEntity.MajorNo = entity[i].MajorNo;
TeachEntity.Grade = entity[i].Grade;
TeachEntity.Semester = entity[i].Semester;
TeachEntity.LessonNo = entity[i].LessonNo;
TeachEntity.StuNum = entity[i].StuNum;
TeachEntity.LessonSortNo = entity[i].LessonSortNo;
TeachEntity.F_SchoolId = entity[i].F_SchoolId;
TeachClassEntity TeachEntity = new TeachClassEntity
{
TeachClassNo = classList[j].ClassNo,
AcademicYearNo = entity[i].AcademicYearNo
MajorNo = entity[i].MajorNo,
Grade = entity[i].Grade,
Semester = entity[i].Semester,
LessonNo = entity[i].LessonNo,
StuNum = entity[i].StuNum,
LessonSortNo = entity[i].LessonSortNo,
F_SchoolId = entity[i].F_SchoolId
};
TeachList.Add(TeachEntity);
}
}


+ 15
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs 查看文件

@@ -22,6 +22,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
private TeachClassIBLL teachClassIBLL = new TeachClassBLL();
private StuSelectLessonListIBLL StuSelectLesson = new StuSelectLessonListBLL();
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL();

#region 视图功能

@@ -142,48 +143,50 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult SetTeach(string keyValue, string EmpNo)
{
var entityList = teachClassIBLL.GetTeachListById(keyValue);
var lessonData = lessonInfoIBLL.GetAllLesson();

List<StuSelectLessonListEntity> TeachList = new List<StuSelectLessonListEntity>();
for (int i = 0; i < entityList.Count; i++)
{
var stuDataList = stuInfoBasicIBLL.GetAllList().Where(s =>
s.MajorNo == entityList[i].MajorNo
&& s.F_SchoolId == entityList[i].F_SchoolId
&& s.ClassNo == entityList[i].TeachClassNo
var stuDataList = stuInfoBasicIBLL.GetAllList().Where(
s => s.DeptNo == entityList[i].DeptNo && s.MajorNo == entityList[i].MajorNo
&& s.F_SchoolId == entityList[i].F_SchoolId && s.ClassNo == entityList[i].TeachClassNo
).ToList();
if (stuDataList.Count > 0)
{
for (int j = 0; j < stuDataList.Count; j++)
{
StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity();
TeachEntity.NoticeBookNo = stuDataList[j].StuNo;
TeachEntity.StuNo = stuDataList[j].StuNo;
TeachEntity.DeptNo = entityList[i].DeptNo;
TeachEntity.MajorNo = entityList[i].MajorNo;
TeachEntity.ClassNo = stuDataList[j].ClassNo;
TeachEntity.GenderNo = stuDataList[j].GenderNo == true ? "0" : "1";
TeachEntity.MajorDetailNo = entityList[i].MajorDetailNo;
TeachEntity.MajorDetailName = entityList[i].MajorDetailName;
TeachEntity.StuName = stuDataList[j].StuName;
TeachEntity.GenderNo = Convert.ToInt32(stuDataList[j].GenderNo).ToString();
TeachEntity.AcademicYearNo = entityList[i].AcademicYearNo;
TeachEntity.Semester = entityList[i].Semester;
TeachEntity.OpenLessonDeptNo = entityList[i].DeptNo;
TeachEntity.OpenLessonMajorNo = entityList[i].MajorNo;
TeachEntity.LessonNo = entityList[i].LessonNo;
TeachEntity.PartCode = entityList[i].PartCode;
TeachEntity.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == TeachEntity.LessonNo)?.LessonName;
TeachEntity.PartCode = "";
TeachEntity.OrdinaryScoreScale = 0;
TeachEntity.TermInScoreScale = 0;
TeachEntity.TermEndScoreScale = 0;
TeachEntity.OtherScoreScale = 0;
TeachEntity.TeachClassNo = entityList[i].TeachClassNo;
TeachEntity.LessonSortNo = entityList[i].LessonSortNo;
TeachEntity.StuSortNo = entityList[i].LessonSortNo;
TeachEntity.StuSortNo = "02";
TeachEntity.Grade = entityList[i].Grade;
TeachEntity.StudyScore = 2;
TeachEntity.TotalStudyHour = 2;
TeachEntity.StudyScore = 0;
TeachEntity.TotalStudyHour = 0;
TeachEntity.IsInEffect = "1";
TeachEntity.IsPitchOn = "1";
TeachEntity.EmpNo = EmpNo;
TeachEntity.F_SchoolId = entityList[i].F_SchoolId;
TeachEntity.CheckMark = "1";
TeachEntity.InsertTime = DateTime.Now;
TeachList.Add(TeachEntity);
}
}
else
@@ -211,7 +214,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
&& y.F_SchoolId == entityList[i].F_SchoolId
&& y.ClassNo == entityList[i].TeachClassNo
&& y.LessonNo == entityList[i].LessonNo
&& y.CheckMark == "1"
).Select(x => x.SelectId.ToString()).ToList();
Nid += string.Join(",", ssList) + ",";
}


+ 22
- 12
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs 查看文件

@@ -266,18 +266,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
foreach (var item in List)
{
TeachClassEntity Teach = new TeachClassEntity();
Teach.TeachClassNo = item.TeachClassNo;
Teach.AcademicYearNo = item.AcademicYearNo;
Teach.DeptNo = item.DeptNo;
Teach.MajorNo = item.MajorNo;
Teach.Grade = item.Grade;
Teach.Semester = item.Semester;
Teach.LessonNo = item.LessonNo;
Teach.StuNum = item.StuNum;
Teach.LessonSortNo = item.LessonSortNo;
Teach.F_SchoolId = item.F_SchoolId;
db.Insert(Teach);
TeachClassEntity Teach = new TeachClassEntity
{
TeachClassNo = item.TeachClassNo,
AcademicYearNo = item.AcademicYearNo,
DeptNo = item.DeptNo,
MajorNo = item.MajorNo,
Grade = item.Grade,
EmpNo = item.EmpNo,
Semester = item.Semester,
LessonNo = item.LessonNo,
StuNum = item.StuNum,
LessonSortNo = item.LessonSortNo,
F_SchoolId = item.F_SchoolId
};
if (db.FindEntity<TeachClassEntity>(
x => x.F_SchoolId == Teach.F_SchoolId && x.AcademicYearNo == Teach.AcademicYearNo
&& x.Semester == Teach.Semester && x.DeptNo == Teach.DeptNo
&& x.MajorNo == Teach.MajorNo && x.TeachClassNo == Teach.TeachClassNo
&& x.Grade == Teach.Grade && x.LessonNo == Teach.LessonNo) == null)
{
db.Insert(Teach);
}
}
db.Commit();
}


Loading…
取消
儲存